/* ==========================================================================
   Mail Deliverability Scanner — UI
   Recreated from the design handoff (design_handoff_mail_deliverability_scanner)
   in the project's native vanilla-CSS stack. Tokens & specs are 1:1 with the
   handoff; inline prototype styles are lifted into reusable classes here.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:        #0a0a0c;
  --surface:   #111116;
  --surface-2: #0e0e12;
  --surface-3: #14141a;
  --surface-4: #1c1c22;

  /* Borders */
  --border:      rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-hard: rgba(255, 255, 255, 0.1);

  /* Text */
  --text:       #f2f2f0;
  --text-2:     #c9c9cd;
  --text-muted: #9a9aa3;
  --text-dim:   #8b8b93;
  --text-faint: #6f6f78;

  /* Accent — tweakable (sky #38bdf8, violet #a78bfa, orange #fb923c) */
  --accent: #34d399;

  /* Status */
  --pass: #34d399;
  --warn: #fbbf24;
  --fail: #f87171;

  /* Radius tiers */
  --r-sm: 7px;   /* chips / buttons        */
  --r-md: 10px;  /* inputs / rows          */
  --r-lg: 14px;  /* cards                  */

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--accent) 27%, transparent); }

/* ── Animations & dot-grid background ─────────────────────────────────────── */
@keyframes mds-spin  { to { transform: rotate(360deg); } }
@keyframes mds-dots  { from { background-position: 0 0; } to { background-position: 40px 40px; } }
@keyframes mds-fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.dotbg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  animation: mds-dots 6s linear infinite;
  opacity: 0.5;
}

/* ── App frame ────────────────────────────────────────────────────────────── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.screen {
  flex: 1;
  position: relative;
  z-index: 1;
  animation: mds-fadein 0.25s ease;
}
.screen--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}
.screen--page {
  padding: 40px 32px 60px;
  margin: 0 auto;
  width: 100%;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  flex: none;
  position: relative;
  z-index: 1;
}
.nav__left  { display: flex; align-items: center; gap: 28px; }
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__logo {
  width: 26px; height: 26px;
  border-radius: var(--r-sm);
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  color: var(--bg);
}
.nav__wordmark { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  color: var(--text-2);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.nav__right { display: flex; align-items: center; gap: 14px; }
.nav__tests { font-size: 12.5px; color: var(--text-dim); font-family: var(--mono); }
.nav__admin-toggle {
  font-size: 11px; color: var(--text-faint);
  cursor: pointer; text-decoration: underline;
}
.nav__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-4); border: 1px solid var(--border-hard);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer;
}

/* ── Badges / pills ───────────────────────────────────────────────────────── */
.badge {
  padding: 4px 9px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
}
.badge--free { background: var(--surface-4); color: var(--text-muted); }
.badge--pro  { background: var(--accent); color: var(--bg); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  background: var(--surface-3); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; text-align: center;
  border: none; cursor: pointer;
  font-family: inherit;
  border-radius: var(--r-md);
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn--primary {
  background: var(--accent); color: var(--bg);
  font-weight: 700; font-size: 14.5px;
  padding: 13px 28px;
}
.btn--block { display: block; width: 100%; padding: 13px; }
.btn--ghost {
  background: var(--surface-3); border: 1px solid var(--border-hard);
  color: var(--text-2); font-weight: 600; font-size: 13px;
  padding: 11px 18px; border-radius: 8px;
}
.btn--signin {
  background: var(--accent); color: var(--bg);
  font-weight: 700; font-size: 13px;
  padding: 8px 16px; border-radius: var(--r-sm);
}

/* ── Cards & shared bits ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}
.section-label {
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.divider { height: 1px; background: rgba(255, 255, 255, 0.07); margin: 22px 0; }

/* ── Landing ──────────────────────────────────────────────────────────────── */
.landing { max-width: 640px; width: 100%; }
.landing__head { text-align: center; margin-bottom: 40px; }
.landing__h1 {
  font-size: 38px; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.15; margin: 20px 0 12px;
}
.landing__sub { font-size: 15.5px; color: var(--text-muted); line-height: 1.6; }
.landing__cta-wrap { text-align: center; padding: 14px 0; }
.landing__helper { font-size: 12.5px; color: var(--text-faint); margin-top: 12px; }

.addr-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border-hard);
  border-radius: var(--r-md); padding: 14px 16px;
}
.addr-row__value {
  flex: 1; font-family: var(--mono); font-size: 15px; color: var(--accent);
  overflow-x: auto; white-space: nowrap;
}
.copy-btn {
  flex: none; padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--surface-4); border: 1px solid var(--border-hard);
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text-2);
}
.copy-btn.is-copied { color: var(--pass); }
.help-copy { font-size: 13px; color: var(--text-faint); margin-top: 10px; line-height: 1.5; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.stat-cell {
  text-align: center; padding: 14px 8px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border-soft);
}
.stat-cell__num { font-size: 17px; font-weight: 700; color: var(--accent); }
.stat-cell__label { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

/* ── Scanning ─────────────────────────────────────────────────────────────── */
.scanning { max-width: 480px; width: 100%; text-align: center; }
.spinner {
  width: 56px; height: 56px; margin: 0 auto 22px;
  border-radius: 50%;
  border: 3px solid var(--border-hard); border-top-color: var(--accent);
  animation: mds-spin 0.9s linear infinite;
}
.scanning__title { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.scanning__addr { font-size: 13px; color: var(--text-faint); font-family: var(--mono); margin-bottom: 28px; }
.scan-steps {
  text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px;
}
.scan-step {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13.5px;
  transition: color 0.3s, opacity 0.3s;
}
.scan-step__glyph { width: 16px; text-align: center; font-family: var(--mono); }
.scan-note { font-size: 12.5px; color: var(--text-faint); margin-top: 16px; }

/* ── Results ──────────────────────────────────────────────────────────────── */
.page-1180 { max-width: 1180px; }
.page-1040 { max-width: 1040px; }
.page-920  { max-width: 920px; }

.results__head {
  display: flex; gap: 28px; align-items: flex-start;
  margin-bottom: 32px; flex-wrap: wrap;
}
.gauge {
  flex: none; width: 168px; height: 168px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.gauge__ring {
  width: 140px; height: 140px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--_c) var(--_deg), rgba(255, 255, 255, 0.07) 0deg);
}
.gauge__inner {
  width: 112px; height: 112px; border-radius: 50%;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge__score { font-size: 34px; font-weight: 800; font-family: var(--mono); color: var(--_c); }
.gauge__unit { font-size: 11px; color: var(--text-faint); margin-top: -2px; }

.results__meta { flex: 1; min-width: 280px; }
.results__tier { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.results__addr { font-size: 13px; color: var(--text-faint); font-family: var(--mono); margin-bottom: 18px; }
.counters { display: flex; gap: 10px; flex-wrap: wrap; }
.counter {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
}
.counter__num { font-weight: 700; }
.counter__label { font-size: 12.5px; color: var(--text-dim); }
.c-pass { color: var(--pass); } .c-warn { color: var(--warn); } .c-fail { color: var(--fail); }

/* Tabs (underline) */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.tab {
  padding: 10px 4px; margin-right: 22px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

/* Overview category grid */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.cat-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cat-card__title { font-size: 14.5px; font-weight: 700; }
.cat-card__link { font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 600; }
.cat-check { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13px; }
.cat-check__glyph { width: 14px; text-align: center; font-family: var(--mono); font-weight: 700; }
.cat-check__name { color: var(--text-2); }

/* Filter chips */
.chips { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 100px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border-hard);
  transition: background 0.15s, color 0.15s;
}
.chip.is-active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Accordion */
.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.acc__row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.acc__glyph {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 12.5px;
}
.acc__name { flex: 1; font-size: 13.5px; font-weight: 600; }
.acc__cat { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }
.acc__chev { color: var(--text-faint); font-size: 12px; transition: transform 0.2s; }
.acc.is-open .acc__chev { transform: rotate(180deg); }
.acc__detail {
  padding: 0 16px 16px 50px;
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
}
.acc__detail pre {
  margin: 8px 0 0; font-family: var(--mono); font-size: 12px;
  color: var(--text-2); white-space: pre-wrap;
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 12px;
}

/* SpamAssassin table inside detail */
.sa-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.sa-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.sa-table .pts-pos { color: var(--fail); font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.sa-table .pts-neg { color: var(--pass); font-family: var(--mono); font-weight: 600; white-space: nowrap; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.page-sub { font-size: 13.5px; color: var(--text-faint); }
.pro-flag { font-size: 12px; color: var(--accent); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat-box__label { font-size: 11.5px; color: var(--text-dim); margin-bottom: 8px; }
.stat-box__value { font-size: 24px; font-weight: 800; font-family: var(--mono); }
.stat-box__sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.trend-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; margin-bottom: 24px; }
.trend-card__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.trend-card__title { font-size: 14px; font-weight: 700; }
.trend-delta { font-size: 12px; font-weight: 600; }
.trend-bars { display: flex; align-items: flex-end; gap: 14px; height: 120px; }
.trend-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.trend-bar__score { font-size: 10.5px; color: var(--text-dim); font-family: var(--mono); }
.trend-bar__fill { width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px; }
.trend-bar__day { font-size: 10.5px; color: var(--text-faint); }

.list-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 10px; }
.hist-list { display: flex; flex-direction: column; gap: 8px; }
.hist-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.hist-row--clickable { cursor: pointer; }
.hist-row--clickable:hover { border-color: var(--border-hard); }
.hist-score {
  width: 42px; height: 42px; border-radius: var(--r-md); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 800; font-size: 14px;
}
.hist-main { flex: 1; min-width: 0; }
.hist-addr { font-size: 13.5px; font-weight: 600; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-date { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.hist-tier { font-size: 12.5px; color: var(--text-muted); flex: none; }
.hist-arrow { color: var(--text-faint); flex: none; }

/* Locked overlay */
.lock-wrap { position: relative; }
.lock-blur { filter: blur(5px); opacity: 0.55; pointer-events: none; user-select: none; }
.lock-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lock-card {
  background: var(--surface); border: 1px solid var(--border-hard);
  border-radius: var(--r-lg); padding: 28px 32px; text-align: center;
  max-width: 340px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.lock-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin: 0 auto 14px;
}
.lock-title { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.lock-copy { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 18px; }

/* Gate card (sandbox / api signed-out) */
.gate {
  max-width: 400px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px;
}
.gate__icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin: 0 auto 14px;
}
.gate__title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.gate__copy { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-head { text-align: center; margin-bottom: 40px; }
.pricing-head__h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.pricing-head__sub { font-size: 14.5px; color: var(--text-dim); }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px; position: relative;
}
.plan.is-featured { background: #12161a; border-color: color-mix(in srgb, var(--accent) 33%, transparent); }
.plan__badge {
  position: absolute; top: -11px; left: 26px;
  background: var(--accent); color: var(--bg);
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px;
}
.plan__name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.plan__price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 16px; }
.plan__price { font-size: 30px; font-weight: 800; }
.plan__period { font-size: 13px; color: var(--text-faint); }
.plan__features { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.plan__feature { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); }
.plan__feature-check { color: var(--accent); }
.plan__cta {
  text-align: center; padding: 11px; border-radius: 8px;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.plan__cta--featured { background: var(--accent); color: var(--bg); }
.plan__cta--plain { background: var(--surface-4); color: #e5e5e6; }

/* ── Sandbox ──────────────────────────────────────────────────────────────── */
.sandbox { display: flex; gap: 24px; }
.sandbox__list { flex: none; width: 340px; }
.sandbox__title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.sandbox__intro { font-size: 13px; color: var(--text-faint); margin-bottom: 18px; line-height: 1.5; }
.mail-list { display: flex; flex-direction: column; gap: 6px; }
.mail-item {
  padding: 12px 14px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.mail-item.is-active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: color-mix(in srgb, var(--accent) 33%, transparent);
}
.mail-item__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mail-item__subject { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mail-item__to { font-size: 11.5px; color: var(--text-dim); margin-top: 3px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item__time { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.mail-detail { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; min-width: 0; }
.mail-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.mail-detail__subject { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
.mail-detail__route { font-size: 12.5px; color: var(--text-dim); font-family: var(--mono); }
.mail-status { display: flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; }

.email-render { background: #fff; border-radius: 8px; padding: 28px; color: #111; font-size: 14px; line-height: 1.6; }
.email-render__h { font-weight: 700; font-size: 16px; margin-bottom: 10px; color: #111; }
.email-render__body { color: #444; margin-bottom: 16px; }
.email-render__cta { display: inline-block; padding: 10px 18px; background: var(--accent); color: var(--bg); border-radius: 6px; font-weight: 700; font-size: 13px; }

.mono-block { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; line-height: 1.7; }
.raw-block {
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  white-space: pre-wrap; line-height: 1.7;
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 16px; max-height: 420px; overflow: auto;
}
.spam-rows { display: flex; flex-direction: column; gap: 8px; }
.spam-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: var(--surface-2);
  border: 1px solid var(--border-soft); border-radius: 8px;
}
.spam-row__glyph {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 11.5px;
}
.spam-row__label { font-size: 13px; color: var(--text-2); }

/* ── API & SMTP ───────────────────────────────────────────────────────────── */
.creds-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-bottom: 18px; }
.creds-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.creds-card__title { font-size: 14.5px; font-weight: 700; }
.creds-card__action { font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; }
.cred-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cred-field__label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.cred-field__value {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border-hard);
  border-radius: 8px; padding: 10px 12px;
}
.cred-field__mono { flex: 1; font-family: var(--mono); font-size: 13px; color: #e5e5e6; overflow-x: auto; white-space: nowrap; }
.cred-field__copy { font-size: 11.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; flex: none; }
.cred-field__copy.is-copied { color: var(--pass); }

.lang-tabs { display: flex; gap: 4px; }
.lang-tab {
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-muted);
}
.lang-tab.is-active { background: var(--accent); color: var(--bg); }
.code-block {
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 16px;
  font-family: var(--mono); font-size: 12px; color: var(--text-2);
  white-space: pre; overflow-x: auto; line-height: 1.7;
}
.mini-stats { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.mini-stat { flex: 1; min-width: 160px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px 14px; }
.mini-stat__label { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.mini-stat__value { font-size: 18px; font-weight: 800; font-family: var(--mono); color: var(--accent); }
.mini-stat__value--muted { font-size: 13px; color: #e5e5e6; }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-table { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.admin-table__head, .admin-table__row {
  display: grid; grid-template-columns: 2fr 1fr 0.8fr 0.8fr 1fr;
  padding: 14px 18px; align-items: center;
}
.admin-table__head {
  font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-soft); padding: 12px 18px;
}
.admin-table__row { border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 13px; }
.admin-user__name { font-weight: 600; }
.admin-user__email { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); }
.plan-pill { padding: 4px 9px; border-radius: 5px; font-size: 11px; font-weight: 700; display: inline-block; }
.admin-mono { font-family: var(--mono); color: var(--text-2); }
.admin-joined { color: var(--text-dim); }
.admin-status { font-weight: 600; text-transform: capitalize; }

/* Admin: user management rows */
.admin-rows { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  transition: opacity 0.15s;
}
.admin-row.is-busy { opacity: 0.5; pointer-events: none; }
.admin-row__user { flex: 1; min-width: 200px; }
.admin-badge { font-size: 9.5px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); padding: 2px 6px; border-radius: 4px; letter-spacing: 0.04em; vertical-align: middle; }
.admin-row__meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-dim); flex-wrap: wrap; }
.admin-row__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-switch { display: inline-flex; gap: 3px; margin-right: 6px; padding: 2px; background: var(--surface-2); border-radius: 8px; }
.mini-btn {
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  background: var(--surface-3); border: 1px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.mini-btn:hover { color: var(--text); }
.mini-btn.is-on { background: var(--accent); color: var(--bg); }
.mini-btn--warn { color: var(--warn); }
.mini-btn--warn:hover { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.mini-btn--ok { color: var(--pass); }
.mini-btn--ok:hover { background: color-mix(in srgb, var(--pass) 15%, transparent); }
.mini-btn--danger { color: var(--fail); }
.mini-btn--danger:hover { background: color-mix(in srgb, var(--fail) 15%, transparent); }
.admin-self { font-size: 11.5px; color: var(--text-faint); font-style: italic; padding: 5px 8px; }

/* Admin: activity log */
.log-list { display: flex; flex-direction: column; }
.log-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.log-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.log-type {
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
  width: 116px; flex: none; text-transform: uppercase; letter-spacing: 0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.log-msg { flex: 1; color: var(--text-2); min-width: 0; }
.log-time { font-size: 11.5px; color: var(--text-faint); flex: none; }

@media (max-width: 860px) {
  .log-type { width: 90px; }
  .admin-row__actions { width: 100%; }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav { padding: 0 16px; gap: 8px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav__left { gap: 14px; flex-wrap: wrap; }
  .nav__links { flex-wrap: wrap; }
  .screen--page { padding: 28px 16px 48px; }
  .cat-grid, .stat-grid, .plan-grid, .cred-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .sandbox { flex-direction: column; }
  .sandbox__list { width: 100%; }
  .landing__h1 { font-size: 30px; }
  .admin-table__head, .admin-table__row { grid-template-columns: 2fr 1fr 1fr; }
  .admin-table__head > :nth-child(3), .admin-table__row > :nth-child(3),
  .admin-table__head > :nth-child(4), .admin-table__row > :nth-child(4) { display: none; }
}
