/* Letter — admin styling. Jalma brand: paper bg, near-black ink, ember accent. */
:root {
  --paper:  #FAFAF7;
  --ink:    #1A1A1A;
  --ember:  #c84812;
  --line:   #E3E1DA;
  --muted:  #6b6b66;
  --card:   #ffffff;
  --ok:     #2f7d4f;
  --err:    #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26,26,26,.04), 0 8px 24px rgba(26,26,26,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; margin: 0 0 .2em; }
h2 { font-size: 1.2rem; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .85em; }

/* ---- Top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--card);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Inter Tight'; font-weight: 600; font-size: 1.15rem; }
/* Envelope brand mark (replaces the old square). */
.brand .dot {
  width: 26px; height: 26px; display: inline-block; border-radius: 0; background: none;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%23c84812'/%3E%3Crect x='6.5' y='9.5' width='19' height='13' rx='2.5' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3Cpath d='M7.5 11.5 16 17.5l8.5-6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.login-card .brand .dot { width: 34px; height: 34px; }
.topbar .who { color: var(--muted); font-size: .9rem; display: flex; gap: 14px; align-items: center; }

/* ---- Layout ---- */
.wrap { max-width: 920px; margin: 0 auto; padding: 34px 28px 80px; }
.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---- Cards ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; }
.site-card { margin-bottom: 26px; }
.site-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.site-head .domain { color: var(--muted); font-size: .9rem; }
.from-tag { font-size: .8rem; color: var(--muted); }
.from-tag b { color: var(--ink); font-weight: 500; }

/* ---- Lists table ---- */
.lists { display: grid; gap: 10px; margin-top: 14px; }
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.list-row:hover { border-color: #d6d3c9; }
.list-row .meta { color: var(--muted); font-size: .85rem; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 500; }
.pill.count { background: #eef0ea; color: #3a4a3a; }
.pill.pending { background: #fdf1e7; color: #a5521f; }

/* ---- Forms ---- */
label { display: block; font-weight: 500; margin: 14px 0 5px; font-size: .9rem; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0; }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(200,72,18,.35); border-color: var(--ember); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--ember);
  background: var(--ember); color: #fff; font: inherit; font-weight: 500;
}
.btn:hover { background: #b23f0f; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ember); }
.btn.ghost:hover { background: #fdf1e7; }
.btn.sub { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn.sub:hover { background: #f0eee8; }
.btn.small { padding: 6px 11px; font-size: .85rem; }
.btn.danger { border-color: var(--err); color: var(--err); background: transparent; }
.btn.danger:hover { background: #fbeceb; }
.btn-row { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }

/* ---- Subscribers table ---- */
table.subs { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.subs th, table.subs td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: .9rem; }
table.subs th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.status { font-size: .78rem; font-weight: 500; padding: 2px 8px; border-radius: 999px; }
.status.confirmed { background: #e7f3ec; color: var(--ok); }
.status.pending { background: #fdf1e7; color: #a5521f; }
.status.unsubscribed, .status.bounced { background: #f1efe9; color: var(--muted); }

/* ---- Stats tiles ---- */
.tiles { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 8px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; min-width: 120px; }
.tile .n { font-family: 'Inter Tight'; font-size: 1.6rem; font-weight: 600; }
.tile .l { color: var(--muted); font-size: .8rem; }

/* ---- Flash ---- */
.flash { padding: 11px 16px; border-radius: 9px; margin-bottom: 16px; font-size: .92rem; }
.flash.ok  { background: #e7f3ec; color: #1f5c39; border: 1px solid #cbe6d5; }
.flash.err { background: #fbeceb; color: #8f1c16; border: 1px solid #f2cfcc; }

/* ---- Login ---- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 34px 30px; box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; font-size: 1.4rem; margin-bottom: 4px; }
.login-card .tagline { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 18px; }

/* ---- Public result pages ---- */
.centered { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.centered .card { max-width: 440px; }

pre.snippet { background: #1A1A1A; color: #f5f3ee; padding: 16px; border-radius: 10px; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: .82rem; line-height: 1.5; }
