/* SecureLayer7 "Sage Calm" — soft, natural light theme for mental peace.
   Warm oat surfaces + muted eucalyptus accent, deep slate-green ink, Poppins.
   Low chroma, gentle contrast: calm and focused, never harsh or distracting. */
:root {
  --bg: oklch(0.940 0.010 115);          /* warm oat, with body */
  --surface: oklch(0.978 0.007 115);     /* soft cream card */
  --surface-2: oklch(0.995 0.004 115);   /* crisp white card */
  --nav: oklch(0.955 0.010 125);         /* faintly green nav */
  --muted-surface: oklch(0.910 0.014 130);
  --ink: oklch(0.255 0.035 156);         /* deep slate-green, strong text */
  --muted: oklch(0.44 0.026 155);        /* sage grey, legible */
  --faint: oklch(0.55 0.022 155);
  --line: oklch(0.28 0.03 150 / 0.16);   /* visible hairline */
  --line-strong: oklch(0.28 0.03 150 / 0.28);
  --accent: oklch(0.535 0.105 153);      /* deeper, present eucalyptus */
  --accent-press: oklch(0.455 0.105 153);
  --accent-weak: oklch(0.535 0.105 153 / 0.15);
  --accent-soft: oklch(0.535 0.105 153 / 0.09);
  --purple: oklch(0.62 0.05 200);
  --ok: oklch(0.52 0.13 150);
  --ok-weak: oklch(0.52 0.13 150 / 0.15);
  --warn: oklch(0.60 0.13 70);
  --warn-weak: oklch(0.60 0.13 70 / 0.16);
  --err: oklch(0.55 0.15 25);
  --err-weak: oklch(0.55 0.15 25 / 0.13);

  --sans: var(--font-poppins, "Poppins"), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --r: 10px;
  --shadow-1: 0 1px 2px oklch(0.35 0.04 155 / 0.10), 0 2px 6px oklch(0.35 0.04 155 / 0.06);
  --shadow-2: 0 12px 30px oklch(0.35 0.04 155 / 0.14), 0 3px 10px oklch(0.35 0.04 155 / 0.09);
  --glow: 0 0 0 1px oklch(0.58 0.075 152 / 0.25), 0 8px 22px -10px oklch(0.58 0.075 152 / 0.35);
  --glow-hover: 0 0 0 1px oklch(0.58 0.075 152 / 0.40), 0 14px 30px -12px oklch(0.58 0.075 152 / 0.40);
  --ease: cubic-bezier(0.83, 0, 0.17, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.grid-tex {
  background-image:
    linear-gradient(to right, oklch(0.34 0.018 150 / 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.34 0.018 150 / 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}
::selection { background: var(--accent); color: oklch(1 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; }

/* ============ login (split brand / form) ============ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden; padding: 56px;
  display: flex; align-items: center;
  background:
    radial-gradient(820px 560px at 72% 22%, oklch(0.58 0.075 152 / 0.16), transparent 60%),
    radial-gradient(760px 620px at 8% 96%, oklch(0.70 0.06 150 / 0.28), transparent 70%),
    linear-gradient(160deg, oklch(0.93 0.018 140), oklch(0.965 0.01 110));
}
.auth-brand::before { content: ""; position: absolute; inset: 0; opacity: 0.6; pointer-events: none;
  background-image:
    linear-gradient(to right, oklch(0.34 0.018 150 / 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.34 0.018 150 / 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(120% 120% at 30% 30%, black, transparent 80%); }
.auth-brand-inner { position: relative; max-width: 420px; }
.auth-brand .mark { display: flex; align-items: center; gap: 13px; margin-bottom: 44px; }
.auth-brand .mark b { font-size: 15px; font-weight: 600; display: block; }
.auth-brand .mark span { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }
.auth-brand h1 { font-size: 38px; line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
.auth-brand > .auth-brand-inner > p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 18px; max-width: 38ch; }
.auth-pipe { display: flex; align-items: center; margin-top: 52px; }
.apn { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; }
.apn.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px oklch(0.58 0.075 152 / 0.7); }
.aps { height: 1.5px; flex: 1; background: var(--line-strong); }
.auth-stages { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.auth-stages span:first-child, .auth-stages span:nth-child(2), .auth-stages span:nth-child(3) { color: var(--accent); }

.auth-form { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-form-inner { width: 360px; max-width: 100%; }
.ribbon { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-weak); padding: 4px 10px; border-radius: 6px; margin-bottom: 18px; }
.auth-form h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.auth-form .hint { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 8px 0 24px; }
.auth-form form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .err-msg { color: var(--err); font-size: 13px; min-height: 18px; }
.auth-form .btn-primary { padding: 12px; font-size: 14px; }
.sent-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--ok-weak); color: var(--ok);
  display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.dev-link { margin-top: 16px; padding: 13px 15px; border: 1px dashed var(--line-strong); border-radius: 10px; background: oklch(0.34 0.018 150 / 0.03); }
.dev-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--warn); font-family: var(--mono); margin-bottom: 7px; }
.dev-link a { font-family: var(--mono); font-size: 12.5px; word-break: break-all; color: var(--accent); }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } }

/* ============ logo ============ */
.logo {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent); color: oklch(1 0 0);
  display: grid; place-items: center; font-family: var(--mono);
  font-weight: 700; font-size: 13px; letter-spacing: -0.5px;
  box-shadow: 0 6px 18px -6px oklch(0.58 0.075 152 / 0.7);
}
.logo.lg { width: 40px; height: 40px; font-size: 16px; border-radius: 11px; }

/* ============ shell ============ */
.app { display: none; min-height: 100vh; grid-template-rows: 58px 1fr; }
.app.show { display: grid; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  background: linear-gradient(to bottom, var(--surface), var(--nav));
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .brand b { font-size: 14.5px; font-weight: 600; }
.topbar .brand span { color: var(--faint); font-size: 11.5px; font-family: var(--mono); letter-spacing: 0.02em; }
.topbar .right { display: flex; align-items: center; gap: 16px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status-dot.up i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status-dot.down i { background: var(--err); }
.who { font-size: 13px; color: var(--muted); font-family: var(--mono); }

.body { display: grid; grid-template-columns: 212px 1fr; min-height: 0; }
.side { background: var(--nav); border-right: 1px solid var(--line); padding: 18px 13px; display: flex; flex-direction: column; gap: 3px; }
.navlink {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 500; cursor: pointer; font-size: 13.5px;
  transition: background var(--dur, 0.15s) var(--ease), color 0.15s; user-select: none;
}
.navlink:hover { background: oklch(0.34 0.018 150 / 0.05); color: var(--ink); }
.navlink.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent-soft); }
.navlink svg { width: 16px; height: 16px; stroke-width: 1.7; }
.side .grow { flex: 1; }
.side button.logout { background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 12.5px; }
.side button.logout:hover { border-color: var(--line-strong); color: var(--ink); }

.content { padding: 32px 40px; overflow: auto; position: relative; }
.content::before { content: ""; position: fixed; top: 58px; right: 0; width: 60%; height: 70%; pointer-events: none; z-index: 0;
  background: radial-gradient(700px 460px at 90% 0%, oklch(0.58 0.075 152 / 0.07), transparent 65%); }
.content > * { position: relative; z-index: 1; max-width: 1180px; }

/* ckicker + console head + trace */
.ckicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.console-head h2 { font-size: 25px; font-weight: 600; letter-spacing: -0.025em; }
.lead-sub { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 62ch; line-height: 1.55; }
.lead-stat { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.lead-stat b { color: var(--ink); font-weight: 600; }
.lead-stat .hl { color: var(--accent); font-weight: 600; }
/* A short caption sits between the heading and the hairline. Empty traces stay
   a pure decorative rule; ones with text show it small and muted, then the line
   fills whatever space is left. */
.section-title .trace { flex: 1; margin-left: 16px; display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); white-space: nowrap; }
.section-title .trace::after { content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, oklch(0.58 0.075 152 / 0.5), transparent 70%); }
.section-title .dom-fresh { font-size: 11px; color: var(--faint); font-family: var(--mono);
  margin-left: 14px; white-space: nowrap; }
.refresh-ic { margin-left: 10px; width: 26px; height: 26px; flex: 0 0 auto; display: inline-flex;
  align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--dim); font-size: 14px; cursor: pointer; line-height: 1;
  transition: color .15s, border-color .15s, background .15s; }
.refresh-ic:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-weak); }
.refresh-ic.spin { animation: rfspin .7s linear infinite; color: var(--accent); }
.refresh-ic svg { width: 15px; height: 15px; stroke-width: 1.9; }
@keyframes rfspin { to { transform: rotate(360deg); } }
/* clean icon-button sizing (SVG, not glyphs) */
.ws-mini svg, .tl-del svg, .drawer .close svg { width: 15px; height: 15px; stroke-width: 1.9; display: block; }
.ok-line { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 500; }
.ok-line svg { width: 15px; height: 15px; stroke-width: 2.2; }
.claim-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; }
.claim-add { display: flex; gap: 8px; margin-top: 6px; }
.claim-add input { flex: 1; }
.claim-add .btn-primary { flex: 0 0 auto; }
.claim-sub { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint);
  font-family: var(--mono); margin-bottom: 10px; }
/* replies & bounces: accordion so 1000s of rows never grow the page */
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px;
  height: 20px; padding: 0 7px; border-radius: 999px; background: var(--accent-weak); color: var(--accent);
  font-size: 11px; font-weight: 700; font-family: var(--mono); margin-left: 6px; vertical-align: middle; }
.reply-acc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden auto;
  max-height: 360px; background: var(--surface); box-shadow: var(--shadow-1); }
.rx + .rx { border-top: 1px solid var(--line); }
.rx-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: none; border: none; cursor: pointer; text-align: left; color: var(--ink); }
.rx-head:hover { background: var(--accent-soft); }
.rx-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.rx-dot.is-reply { background: var(--ok); }
.rx-dot.is-bounce { background: var(--err); }
.rx-from { font-size: 12.5px; flex: 0 0 auto; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-subj { font-size: 13px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rx-when { font-size: 11.5px; flex: 0 0 auto; font-family: var(--mono); }
.rx-caret { flex: 0 0 auto; color: var(--faint); transition: transform 0.18s var(--ease-out); }
.rx-caret svg { width: 15px; height: 15px; display: block; }
.rx.open .rx-caret { transform: rotate(180deg); }
.rx.open .rx-subj { color: var(--ink); }
.rx-body { display: none; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: var(--muted);
  padding: 4px 16px 16px 31px; }
.rx.open .rx-body { display: block; }
/* ============ confirm modal (replaces native confirm) ============ */
.cd-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: oklch(0.25 0.03 155 / 0); backdrop-filter: blur(0px); transition: background .14s ease, backdrop-filter .14s ease; }
.cd-overlay.show { background: oklch(0.25 0.03 155 / 0.5); backdrop-filter: blur(3px); }
.cd-overlay.closing { background: oklch(0.25 0.03 155 / 0); backdrop-filter: blur(0px); }
.cd-modal { width: 420px; max-width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 16px; padding: 22px 22px 18px; box-shadow: var(--shadow-2);
  transform: translateY(8px) scale(0.98); opacity: 0; transition: transform .16s var(--ease-out), opacity .16s; }
.cd-overlay.show .cd-modal { transform: none; opacity: 1; }
.cd-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.cd-msg { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.cd-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ============ Google setup wizard ============ */
.wiz-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
  background: oklch(0.25 0.03 155 / 0.58); backdrop-filter: blur(3px); }
.wiz-card { width: 640px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-2); overflow: hidden; }
.wiz-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.wiz-head b { font-size: 15px; }
.wiz-x { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 7px; }
.wiz-x:hover { color: var(--ink); background: var(--accent-soft); }
.wiz-x svg { width: 18px; height: 18px; display: block; }
.wiz-steps { display: flex; gap: 6px; padding: 14px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wiz-dot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.wiz-dot span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px;
  border: 1px solid var(--line-strong); color: var(--faint); }
.wiz-dot.on { color: var(--ink); }
.wiz-dot.on span { background: var(--accent); color: #fff; border-color: var(--accent); }
.wiz-dot.done span { background: var(--ok-weak); color: var(--ok); border-color: var(--ok); }
.wiz-body { padding: 22px; overflow-y: auto; }
.wiz-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.wiz-p { color: var(--ink); font-size: 14px; line-height: 1.62; margin-bottom: 14px; }
.wiz-list, .wiz-ol { margin: 0 0 6px 18px; color: var(--ink); font-size: 14px; line-height: 1.75; }
.wiz-ol li { margin-bottom: 10px; }
.wiz-inline { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.wiz-link { color: var(--accent); font-weight: 500; white-space: nowrap; }
.wiz-link:hover { text-decoration: underline; }
.wiz-ta { font-family: var(--mono); font-size: 12px; }
.wiz-status { margin-top: 10px; font-size: 13px; }
.wiz-kv { margin-bottom: 14px; }
.wiz-kv label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-family: var(--mono); margin-bottom: 5px; }
.wiz-copy { display: flex; align-items: center; gap: 8px; }
.wiz-copy code { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 12px; overflow-x: auto; white-space: nowrap; }
.wiz-copy code.wrap { white-space: normal; word-break: break-all; }
.wiz-note { font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.wiz-test { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wiz-err { color: var(--err); font-size: 13px; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-top: 1px solid var(--line); }
.wiz-foot .btn-primary[disabled] { opacity: 0.5; cursor: not-allowed; }

/* inbox create preview */
.mb-preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.mb-preview:empty { display: none; }
.mbp-lbl { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }
.mbp-addr { font-size: 12.5px; font-family: var(--mono); background: var(--accent-weak); color: var(--accent); padding: 3px 9px; border-radius: 7px; }

/* account health indicator (Settings rows) */
.acct-health { margin-top: 5px; font-size: 11.5px; font-family: var(--mono); display: flex; align-items: center; gap: 8px; }
.hl-checking { color: var(--faint); }
.hl-ok { color: var(--ok); }
.hl-bad { color: var(--err); cursor: help; }
.hl-fix { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-weak); border: none; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-family: var(--sans); }
.hl-fix:hover { background: var(--accent); color: #fff; }

/* domain reputation */
.rep-chip { font-size: 10.5px; font-weight: 600; font-family: var(--mono); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.rep-chip.ok { color: var(--ok); background: var(--ok-weak); }
.rep-chip.warn { color: var(--warn); background: var(--warn-weak); }
.rep-chip.bad { color: var(--err); background: var(--err-weak); }
.rep-chip.neutral { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.rep-chip.checking { color: var(--faint); background: var(--surface-2); }
/* verdict banner */
.rep-verdict { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); }
.rep-verdict.ok { background: var(--ok-weak); border-color: oklch(0.52 0.13 150 / 0.3); }
.rep-verdict.warn { background: var(--warn-weak); border-color: oklch(0.60 0.13 70 / 0.3); }
.rep-verdict.bad { background: var(--err-weak); border-color: oklch(0.55 0.15 25 / 0.3); }
.rep-verdict.neutral { background: var(--surface-2); }
.rv-icon { flex: 0 0 auto; width: 30px; height: 30px; }
.rv-icon svg { width: 30px; height: 30px; stroke-width: 1.8; }
.rep-verdict.ok .rv-icon { color: var(--ok); } .rep-verdict.warn .rv-icon { color: var(--warn); }
.rep-verdict.bad .rv-icon { color: var(--err); } .rep-verdict.neutral .rv-icon { color: var(--faint); }
.rv-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.rv-sub { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; max-width: 70ch; }
/* two plain facts */
.rep-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.rep-fact { border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; background: var(--surface-2); }
.rf-k { display: block; font-size: 12.5px; color: var(--muted); }
.rf-v { display: block; font-size: 15px; margin: 4px 0 5px; color: var(--ink); }
.rf-v .ok { color: var(--ok); } .rf-v .bad { color: var(--err); } .rf-v .warn { color: var(--warn); }
.rf-note { display: block; font-size: 11.5px; color: var(--faint); }
.rf-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; vertical-align: middle; }
.rf-tag { font-size: 10px; font-family: var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--muted-surface); color: var(--muted); }
.rep-vt { margin-top: 12px; }
/* get-approved vendor list */
.rep-approve { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.ra-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ra-head b { font-size: 14.5px; }
.ra-count { font-size: 12px; font-family: var(--mono); color: var(--accent); background: var(--accent-weak); padding: 2px 9px; border-radius: 999px; }
.ra-sub { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 8px 0 14px; max-width: 75ch; }
.ra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ra-vendor { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ra-vendor.done { background: var(--ok-weak); border-color: oklch(0.52 0.13 150 / 0.25); }
.ra-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-go { font-size: 12.5px; font-weight: 600; color: #fff; background: var(--accent); padding: 5px 12px; border-radius: 8px; flex: 0 0 auto; }
.ra-go:hover { background: var(--accent-press); }
.ra-vendor.done .ra-go { background: transparent; color: var(--accent); border: 1px solid var(--line-strong); }
.ra-done { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); flex: 0 0 auto; cursor: pointer; }
.rep-optional > summary { cursor: pointer; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.rep-optional > summary::-webkit-details-marker { display: none; }
.rep-optional > summary::before { content: "›"; color: var(--faint); transition: transform 0.15s; }
.rep-optional[open] > summary::before { transform: rotate(90deg); }
.rep-optional .ra-count { margin-left: auto; }
@media (max-width: 760px) { .rep-facts { grid-template-columns: 1fr; } }

/* blocklist removal (close-the-loop on the reputation monitor) */
.rep-delist { margin-top: 18px; padding: 16px; border: 1px solid var(--err-weak); border-radius: 12px; background: var(--err-weak); }
.rep-delist .ra-head b { color: var(--err); }
.rep-delist .ra-sub { margin-bottom: 12px; }
.rep-delist .ra-vendor { align-items: flex-start; background: var(--surface-2); }
.rep-delist .ra-name { white-space: normal; overflow: visible; font-weight: 600; }
.rep-delist .rf-note { font-weight: 400; }
.ra-openall { font-size: 12.5px; font-weight: 600; color: var(--accent); background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; }

/* campaign builder: deliverability guide (3-5 inboxes/domain, ~40/day) */
.deliv-guide { margin: 12px 0 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.dg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.dg-stat { font-size: 13px; color: var(--muted); } .dg-stat b { color: var(--ink); font-size: 15px; }
.dg-health { font-size: 11.5px; font-family: var(--mono); padding: 2px 9px; border-radius: 999px; }
.dg-health.ok { color: var(--ok); background: var(--ok-weak); }
.dg-health.warn { color: var(--warn); background: var(--warn-weak); }
.dg-health.dim { color: var(--faint); background: var(--muted-surface); }
.dg-info { display: inline-flex; width: 15px; height: 15px; color: var(--faint); cursor: help; margin-left: -6px; }
.dg-info svg { width: 15px; height: 15px; }
.dg-chip { font-size: 10.5px; font-family: var(--mono); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.dg-chip.ok { color: var(--ok); background: var(--ok-weak); } .dg-chip.warn { color: var(--warn); background: var(--warn-weak); }

/* reputation isolation, the edge over shared-IP infra (Settings) */
.iso-card { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 24px; padding: 16px 18px; border: 1px solid var(--accent-weak); border-radius: 13px; background: var(--accent-weak); }
.iso-ic { width: 26px; height: 26px; flex: 0 0 auto; color: var(--accent); margin-top: 1px; }
.iso-card b { font-size: 14.5px; color: var(--ink); }
.iso-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 5px; max-width: 75ch; }

/* provider capability chips (Settings account row) */
.caps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cap { font-size: 10px; font-family: var(--mono); padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.cap.off { color: var(--warn); border-color: var(--warn-weak); border-style: dashed; background: var(--warn-weak); cursor: help; }
.cd-rep-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cd-rep-counts { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.cd-rep-counts b { color: var(--ink); font-size: 18px; margin-right: 4px; }

/* ============ nav badge ============ */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 6px; margin-left: auto; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; font-family: var(--mono); }
.navlink { display: flex; align-items: center; }

/* ============ Inbox (master-detail) ============ */
.inbox-toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.ib-search { flex: 1; }
.inbox-toolbar select { width: auto; min-width: 140px; }
.inbox-split { display: grid; grid-template-columns: 380px 1fr; gap: 0; height: calc(100vh - 250px);
  min-height: 420px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-1); }
.inbox-list { overflow-y: auto; border-right: 1px solid var(--line); }
.ib-item { width: 100%; display: flex; gap: 10px; padding: 13px 15px; background: none; border: none;
  border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.ib-item:hover { background: var(--accent-soft); }
.ib-item.active { background: var(--accent-weak); }
.ib-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--faint); }
.ib-item.unread .ib-dot { background: var(--accent); box-shadow: none; }
.ib-dot.is-bounce { box-shadow: inset 0 0 0 1.5px var(--err); }
.ib-item.unread .ib-dot.is-bounce { background: var(--err); box-shadow: none; }
.ib-item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ib-item-top { display: flex; align-items: baseline; gap: 8px; }
.ib-from { font-size: 12.5px; color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item.unread .ib-from { font-weight: 700; }
.ib-when { font-size: 11px; flex: 0 0 auto; font-family: var(--mono); }
.ib-subj { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item.unread .ib-subj { font-weight: 600; }
.ib-prev { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-more { width: 100%; padding: 12px; background: none; border: none; border-top: 1px solid var(--line);
  color: var(--accent); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.ib-more:hover { background: var(--accent-soft); }
.ib-end { text-align: center; padding: 14px; font-size: 11.5px; font-family: var(--mono); }
.ib-empty { display: grid; place-items: center; height: 100%; color: var(--faint); font-size: 13.5px; padding: 30px; text-align: center; }
.inbox-read { overflow-y: auto; padding: 24px 26px; }
.ib-read-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.ib-read-subj { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.ib-read-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; }
.ib-read-sub2 { margin-top: 8px; font-size: 12.5px; }
.ib-read-body { white-space: pre-wrap; font-size: 14px; line-height: 1.65; color: var(--ink); }
.ib-read-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .inbox-split { grid-template-columns: 1fr; height: auto; } .inbox-read { display: none; } }

/* ============ buy bar ============ */
.buybar { padding: 18px 20px; }
.buy-row { display: flex; gap: 10px; }
.buy-row input { flex: 1; }
.buy-row .btn-ghost { flex: 0 0 auto; padding: 10px 18px; }
.buy-hit { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: oklch(0.34 0.018 150 / 0.02); flex-wrap: wrap; }
.buy-price { font-family: var(--mono); font-size: 17px; font-weight: 600; color: var(--ink); }
.buy-price span { font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 2px; }
.buy-err { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--err-weak); color: var(--err); font-size: 13px; line-height: 1.5; }
.buy-or { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--faint); font-size: 11.5px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.buy-or::before, .buy-or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.idea-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 14px; }
.idea { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: oklch(0.34 0.018 150 / 0.02);
  color: var(--ink); transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.idea:hover { border-color: var(--accent); background: var(--accent-soft); }
.idea-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.idea .mono { font-size: 13.5px; font-weight: 500; }
.idea-why { font-size: 11px; color: var(--faint); }
.idea .pill { padding: 2px 7px; font-size: 10px; }

/* connect buttons */
/* add-account actions — clearly "add", with a brand tile + plus (no status dot) */
.add-acct { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 11px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-2);
  color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s; }
.add-acct:hover { border-color: var(--accent); background: var(--accent-soft); }
.add-acct.ghost { border-style: dashed; color: var(--muted); }
.add-plus { color: var(--accent); font-size: 17px; line-height: 1; font-weight: 600; }
.add-logo { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 6px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; font-family: var(--mono); }
.add-logo.google { background: #1a73e8; } .add-logo.zoho { background: #d93025; } .add-logo.microsoft { background: #0078d4; }
.connect-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.connect-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--surface);
  border: 1px solid var(--line-strong); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 500; }
.connect-btn:hover:not(:disabled) { border-color: var(--accent); }
.connect-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.connect-btn.ghost { color: var(--muted); }
.connect-btn .cmuted { color: var(--faint); font-size: 11px; font-weight: 400; }
.cdot { width: 9px; height: 9px; border-radius: 50%; }
.cdot.zoho { background: oklch(0.58 0.075 152); }
.cdot.microsoft { background: oklch(0.6 0.15 250); }
.cdot.google { background: oklch(0.7 0.16 145); }

/* add-account guide */
.guide { background: oklch(0.34 0.018 150 / 0.03); border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; }
.guide-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.guide-head a { font-size: 12px; }
.guide ol { margin: 0 0 0 16px; padding: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.guide code.copy { display: inline-block; margin-top: 4px; font-size: 11px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 8px; color: var(--accent); cursor: pointer; word-break: break-all; }
.guide code.copy:hover { border-color: var(--accent); }
.guide-note { margin-top: 10px; font-size: 11.5px; color: var(--warn); }
#buy_suggest { flex: 0 0 auto; color: var(--accent); border-color: var(--accent-weak); }
@media (max-width: 700px) { .idea-grid { grid-template-columns: 1fr; } }

/* ============ console board (domain pipelines) ============ */
/* consistent empty state (every page) */
.es { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 20px; }
.es-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.es-ic svg { width: 24px; height: 24px; stroke-width: 1.7; }
.es-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.es-text { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 6px; max-width: 46ch; }
.es-cta { margin-top: 16px; }

.board { display: flex; flex-direction: column; gap: 12px; }
.drow { cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px;
  cursor: pointer; transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.drow:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.drow-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drow-name { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.drow-name .reg { color: var(--faint); font-size: 11.5px; margin-left: 10px; font-weight: 400; }
.drow-go { color: var(--faint); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.drow:hover .drow-go { color: var(--accent); }
.drow-go { transition: color .15s, transform .15s; }
.drow:hover .drow-go { transform: translateX(2px); }
/* compact CTA for not-yet-configured domains (instead of an empty pipeline) */
.drow-cta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted);
  padding: 4px 2px; }
.drow-cta-go { color: var(--accent); font-weight: 600; }
.drow:hover .drow-cta-go { text-decoration: underline; }

.pipe { display: flex; align-items: flex-start; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 0 0 auto; width: 78px; }
.stage .node { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); background: oklch(0.34 0.018 150 / 0.02); position: relative; }
.stage .node svg { width: 12px; height: 12px; stroke-width: 2.4; opacity: 0; }
.stage.done .node { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px oklch(0.58 0.075 152 / 0.45); }
.stage.done .node svg { opacity: 1; stroke: oklch(1 0 0); }
.stage.warn .node { border-color: var(--warn); background: var(--warn-weak); }
.stage.warn .node::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
/* DKIM not detected but domain is send-ready: optional, neutral (never alarming) */
.stage.opt .node { border-color: var(--line-strong); border-style: dashed; background: var(--surface-2); }
.stage.opt .node::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.stage.opt .lbl { color: var(--faint); }
.stage .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.stage.done .lbl { color: var(--muted); }
.seg { height: 1.5px; flex: 1; margin: 10px -6px 0; background: var(--line-strong); align-self: flex-start; }
.seg.done { background: var(--accent); }
.page { display: none; }
.page.active { display: block; animation: rise 0.4s var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { margin-bottom: 24px; }
.page-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ============ summary strip ============ */
.strip { display: flex; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow-1); }
.strip .cell { padding: 18px 24px; border-right: 1px solid var(--line); flex: 1; }
.strip .cell:last-child { border-right: none; }
.strip .n { font-size: 27px; font-weight: 600; font-family: var(--mono); letter-spacing: -1.5px; }
.strip .n.accent { color: var(--accent); }
.strip .n.ok { color: var(--ok); }
.strip .l { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.7px; margin-top: 5px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 13px; }
.section-title h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.section-title .sub { font-size: 12px; color: var(--faint); font-family: var(--mono); }

/* ============ panel / table ============ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); }
.panel.pad { padding: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; color: var(--faint); font-weight: 500; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s var(--ease); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: oklch(0.34 0.018 150 / 0.035); }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }

/* ============ pills / chips ============ */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; font-family: var(--mono); }
.pill.ok { background: var(--ok-weak); color: var(--ok); }
.pill.warn { background: var(--warn-weak); color: var(--warn); }
.pill.err { background: var(--err-weak); color: var(--err); }
.pill.neutral { background: oklch(0.34 0.018 150 / 0.07); color: var(--muted); }
.pill.accent { background: var(--accent-weak); color: var(--accent); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12px; padding: 6px 12px; border-radius: 9px; background: oklch(0.34 0.018 150 / 0.03);
  border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); display: inline-flex; gap: 8px; align-items: center; }
.chip b { color: var(--ink); font-weight: 500; }
.chip .led { width: 7px; height: 7px; border-radius: 50%; }
.chip .led.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.chip .led.off { background: var(--line-strong); }

/* ============ forms ============ */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 12.5px; font-weight: 500; }
.field .help { font-size: 11.5px; color: var(--faint); font-weight: 400; }
input, select, textarea {
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: 9px; padding: 10px 12px; font-size: 13px; font-family: var(--sans); width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select option { background: var(--surface); color: var(--ink); }
textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical; min-height: 140px; line-height: 1.6; }
.checkline { display: flex; align-items: center; gap: 10px; }
.checkline input { width: 16px; height: 16px; accent-color: var(--accent); }
.checkline label { color: var(--muted); font-weight: 400; }

/* ============ buttons ============ */
button { font-family: var(--sans); cursor: pointer; border-radius: 9px; font-size: 13px; font-weight: 500;
  padding: 10px 16px; border: 1px solid transparent; transition: all 0.2s var(--ease); }
.btn-primary { background: var(--accent); color: oklch(1 0 0); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent); box-shadow: var(--glow-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: oklch(0.34 0.018 150 / 0.04); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err-weak); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
button.sm { padding: 6px 12px; font-size: 12px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* ============ detail ============ */
.detail-head { margin-bottom: 6px; }
.detail-head .back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
  cursor: pointer; font-size: 13px; background: none; border: none; padding: 6px 0; }
.detail-head .back:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--mono); text-align: right; }

/* ============ states ============ */
.empty { text-align: center; padding: 46px 24px; color: var(--muted); }
.empty .big { font-size: 14px; color: var(--ink); font-weight: 500; margin-bottom: 6px; }
.empty .sm { font-size: 13px; color: var(--muted); }
.skel { padding: 14px 18px; }
.skel .bar { height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, oklch(0.34 0.018 150 / 0.05) 25%, oklch(0.34 0.018 150 / 0.10) 50%, oklch(0.34 0.018 150 / 0.05) 75%);
  background-size: 200% 100%; animation: sh 1.3s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-strong);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-status { font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }

/* ============ toasts ============ */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.toast { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 11px; padding: 13px 16px;
  font-size: 13px; max-width: 380px; box-shadow: var(--shadow-2); display: flex; gap: 11px; align-items: flex-start;
  animation: toastin 0.3s var(--ease-out); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--accent); }
.toast.ok i { background: var(--ok); }
.toast.err i { background: var(--err); }

/* ============ drawer ============ */
.drawer-bg { position: fixed; inset: 0; background: rgba(6, 10, 26, 0.6); display: none; z-index: 40; }
.drawer-bg.show { display: block; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 580px; max-width: 92vw;
  background: var(--surface); border-left: 1px solid var(--line); z-index: 41; padding: 26px; overflow: auto;
  transform: translateX(100%); transition: transform 0.3s var(--ease-out); box-shadow: var(--shadow-2); }
.drawer.show { transform: none; }
.drawer h3 { font-size: 15px; font-family: var(--mono); margin-bottom: 4px; }
.drawer .close { position: absolute; top: 22px; right: 24px; cursor: pointer; color: var(--muted); background: none; border: none; font-size: 16px; }
.drawer .close:hover { color: var(--ink); }

@media (max-width: 820px) {
  .body { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; }
  .side .grow, .side .logout { display: none; }
  .grid2, .detail-grid { grid-template-columns: 1fr; }
  .strip { flex-wrap: wrap; }
  .strip .cell { min-width: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Launch: one-click chain */
.cost-line { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; }
.run-log { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; max-height: 420px; overflow-y: auto; }
.run-log .rl { display: flex; gap: 9px; padding: 1px 0; color: var(--faint); }
.run-log .rl-i { width: 13px; flex-shrink: 0; text-align: center; }
.run-log .rl-step { color: var(--ink); font-weight: 600; margin-top: 9px; }
.run-log .rl-step .rl-i { color: var(--accent); }
.run-log .rl-ok { color: oklch(0.86 0.06 280); }
.run-log .rl-ok .rl-i { color: var(--ok); }
.run-log .rl-warn .rl-i { color: var(--warn); }
.run-log .rl-err { color: var(--err); }
.run-log .rl-err .rl-i { color: var(--err); }

/* Audience: provider split + routing */
.seg-bar { display: flex; width: 100%; height: 14px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.seg-fill { height: 100%; transition: width 0.5s cubic-bezier(0.22,1,0.36,1); }
.seg-legend { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 14px; }
.seg-key { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.seg-key i, .dotlbl i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.seg-key b { color: var(--ink); }
.dotlbl { display: inline-flex; align-items: center; gap: 8px; }
.gap-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gap-row:last-child { border-bottom: none; }

/* Advanced disclosure (Launch) */
.adv { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.adv > summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; user-select: none; display: inline-flex; align-items: center; gap: 7px; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::before { content: "›"; display: inline-block; transition: transform 0.2s ease; color: var(--faint); }
.adv[open] > summary::before { transform: rotate(90deg); }
.adv > summary:hover { color: var(--ink); }

/* Launch: domain status + "what happens" checklist */
.help.status-ok { color: var(--ok); }
.help.status-ok b { color: var(--ok); }
.willdo { list-style: none; margin: 18px 0 0; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 9px; }
.willdo li { position: relative; padding-left: 26px; font-size: 13px; color: var(--muted); }
.willdo li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 17px; height: 17px; border-radius: 50%; background: var(--ok-weak); color: var(--ok); font-size: 11px; display: grid; place-items: center; }
.willdo li.off { color: var(--faint); text-decoration: none; }
.willdo li.off::before { content: "–"; background: oklch(0.34 0.018 150 / 0.06); color: var(--faint); }

.help.status-warn { color: var(--warn); }
.help.status-warn b { color: var(--warn); }

/* Quiet inline tag (e.g. account reuse marker) */
.tag-soft { font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; color: var(--faint); background: oklch(0.34 0.018 150 / 0.06); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; text-transform: none; cursor: help; }

/* Campaigns */
.cmp-metrics { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.cmp-metrics b { color: var(--ink); }
.step-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; display: grid; gap: 9px; }
.step-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.step-head .st-del { margin-left: auto; }
.step-card input.st-subj, .step-card textarea.st-body { width: 100%; }
.step-card .st-wait { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); padding: 2px 6px; }
.seq-step { padding: 8px 0; border-bottom: 1px solid var(--line); }
.seq-step:last-child { border-bottom: none; }
.day-row { display: flex; gap: 6px; }
.day { flex: 1; padding: 8px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--faint); font-size: 12px; cursor: pointer; transition: all 0.15s ease; }
.day.on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent); }

/* ============ Campaign builder (full-page, calm) ============ */
.builder-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; margin-bottom: 8px; background: linear-gradient(var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.builder-bar .back { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 6px 4px; }
.builder-bar .back:hover { color: var(--ink); }
.builder-actions { display: flex; gap: 10px; }
.builder-body { max-width: 680px; margin: 0 auto; padding: 8px 0 80px; }
.title-input { width: 100%; background: none; border: none; outline: none; color: var(--ink);
  font-family: var(--font-poppins); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; padding: 8px 0; }
.title-input::placeholder { color: var(--faint); }
.builder-sub { color: var(--muted); font-size: 14.5px; margin: 2px 0 38px; max-width: 60ch; line-height: 1.55; }
.bsection { margin-bottom: 40px; }
.bsection > h4, .bsection-head h4 { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; }
.bsection-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.bsection-head h4 { margin: 0; }
.varchips { display: flex; gap: 6px; }
.varchip { font-family: var(--mono); font-size: 11.5px; color: var(--accent); background: var(--accent-weak);
  border: none; border-radius: 7px; padding: 4px 9px; cursor: pointer; transition: filter 0.15s ease; }
.varchip:hover { filter: brightness(1.2); }

/* sequence timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-node { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-weak); color: var(--accent);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.tl-rail::after { content: ""; flex: 1; width: 2px; background: var(--line); margin: 6px 0; }
.tl-step:last-child .tl-rail::after { display: none; }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; display: grid; gap: 12px; }
.tl-card:focus-within { border-color: var(--line-strong); }
.tl-card-head { display: flex; align-items: center; justify-content: space-between; }
.tl-when { font-size: 13px; color: var(--muted); }
.tl-when .st-wait { width: 50px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); padding: 3px 7px; text-align: center; font-family: var(--mono); }
.tl-del { background: none; border: none; color: var(--faint); font-size: 15px; cursor: pointer; line-height: 1; padding: 4px; border-radius: 6px; }
.tl-del:hover { color: var(--err); background: var(--err-weak); }
.tl-card .st-subj { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--ink); font-size: 15px; font-weight: 500; }
.tl-card .st-body { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; color: var(--ink); font-size: 14px; line-height: 1.6; resize: vertical; min-height: 120px; }

/* One email, several wordings. Numbered tabs swap the editor pane in place so a
   15-wording step stays as compact as a 1-wording one. */
.st-wbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-wtabs { display: flex; flex-wrap: wrap; gap: 5px; }
.st-wtab { min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 7px; font-family: var(--mono); font-size: 12px; cursor: pointer; }
.st-wtab:hover { border-color: var(--line-strong); color: var(--ink); }
.st-wtab.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.st-wpanes { display: grid; }
.st-wpane { display: none; gap: 12px; }
.st-wpane.on { display: grid; }
.st-addvar { background: none; border: 1px dashed var(--line-strong); color: var(--muted); border-radius: 9px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.st-addvar:hover { color: var(--ink); border-color: var(--ink); }
.st-var-del { justify-self: start; background: none; border: none; color: var(--faint); font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.st-var-del:hover { color: var(--err); }
.st-wpane .st-subj, .st-wpane .sv-subj { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--ink); font-size: 15px; font-weight: 500; }
.st-wpane .st-body, .st-wpane .sv-body { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; color: var(--ink); font-size: 14px; line-height: 1.6; resize: vertical; min-height: 150px; font-family: inherit; }
.st-varhint { font-size: 12.5px; color: var(--faint); line-height: 1.5; }

/* One email, several wordings. Numbered chips switch the body in place, so a
   15-wording step never reads as a 15-step sequence. */
.cd-wbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cd-wlabel { font-size: 12.5px; color: var(--muted); }
.cd-wtabs { display: flex; flex-wrap: wrap; gap: 5px; }
.cd-wtab { min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 7px; font-family: var(--mono); font-size: 12px; cursor: pointer; }
.cd-wtab:hover { border-color: var(--line-strong); color: var(--ink); }
.cd-wtab.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.cd-wpane { display: none; padding-top: 14px; }
.cd-wpane.on { display: block; }
.tl-card .st-subj:focus, .tl-card .st-body:focus { border-color: var(--accent); outline: none; }
.add-step { width: 100%; background: none; border: 1.5px dashed var(--line-strong); border-radius: 14px; color: var(--muted);
  padding: 14px; font-size: 14px; cursor: pointer; transition: all 0.15s ease; margin-top: 2px; }
.add-step:hover { border-color: var(--accent); color: var(--accent); }

/* leads + schedule */
.lead-input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--ink); font-size: 14px; line-height: 1.6; resize: vertical; }
.lead-input:focus { border-color: var(--accent); outline: none; }
.bhint { color: var(--faint); font-size: 12.5px; margin: 10px 2px 0; }
.when-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.when-row input[type=time], .tz-input, .num-input { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--ink); font-size: 14px; }
.when-row input[type=time]:focus, .tz-input:focus, .num-input:focus { border-color: var(--accent); outline: none; }
.tz-input { min-width: 180px; font-family: var(--mono); font-size: 13px; }
.num-input { width: 70px; text-align: center; }
.builder-adv { max-width: 680px; margin: -16px auto 0; border: none; padding: 0; }
.builder-adv > summary { color: var(--muted); }

.title-input:focus { box-shadow: none; border: none; outline: none; }

/* ============ Campaign detail (full-page) ============ */
.cd-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.cd-title h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.stat-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat b { display: block; font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--faint); }
.cd-progress { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 16px; }
.cd-progress-bar { height: 100%; background: var(--accent); transition: width 0.6s cubic-bezier(0.22,1,0.36,1); }
.tl-card.tl-readonly { background: var(--surface); }
.cd-subj { font-size: 15px; font-weight: 600; color: var(--ink); }
.cd-body { font-size: 13.5px; line-height: 1.65; color: var(--muted); white-space: normal; }
.cd-line { font-size: 14px; color: var(--muted); line-height: 1.7; }
#cd_live::before { content: "● "; color: var(--ok); }
@media (max-width: 720px) { .stat-tiles { grid-template-columns: repeat(2, 1fr); } }

/* Saved-list picker (builder) */
.list-pick { display: grid; gap: 8px; margin-bottom: 12px; }
.list-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; }
.list-opt input { width: 16px; height: 16px; accent-color: var(--accent); }
.prov-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* Lead search/filter bar (detail) */
.lead-filters { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.lead-search { flex: 1; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; color: var(--ink); font-size: 14px; }
.lead-search:focus { border-color: var(--accent); outline: none; }
.lead-filters select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--ink); font-size: 13px; }

/* Locked (already-sent) steps when editing an active campaign */
.tl-locked-card { opacity: 0.72; }
.tl-locked { font-size: 11px; color: var(--warn); background: var(--warn-weak); padding: 2px 8px; border-radius: 999px; margin-left: auto; }
.tl-card input:disabled, .tl-card textarea:disabled { opacity: 0.7; cursor: not-allowed; }

.csv-hint { margin-top: 10px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.csv-hint code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--muted); font-size: 11.5px; }

/* First-run "Get started" checklist (Console) */
.getstarted { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 4px 0 26px; }
.gs-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.gs-head b { font-size: 15px; }
.gs-step { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.gs-step:first-of-type { border-top: none; }
.gs-num { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--accent-weak); color: var(--accent); }
.gs-step.done .gs-num { background: var(--ok-weak); color: var(--ok); }
.gs-step.done .gs-num svg { width: 14px; height: 14px; }
.gs-body { flex: 1; }
.gs-label { font-size: 14px; font-weight: 500; color: var(--ink); }
.gs-step.done .gs-label { color: var(--muted); }
.gs-desc { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.btn-primary.sm, .btn-ghost.sm, .btn-danger.sm { padding: 6px 12px; font-size: 12.5px; }

/* Workspace switcher (top bar) */
/* Top-right product/workspace switcher (account-switcher pattern) */
.wsbar { position: relative; margin-left: 6px; }
.ws-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px; padding: 5px 9px 5px 6px; color: var(--ink);
  font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.ws-btn:hover { border-color: var(--accent); background: var(--accent-weak); }
.ws-tile { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, oklch(0.58 0.075 152), oklch(0.50 0.08 165)); }
.ws-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.ws-cap { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-family: var(--mono); }
.ws-meta #wsName, #wsName { font-size: 13px; font-weight: 600; color: var(--ink); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-caret { color: var(--faint); font-size: 10px; margin-left: 2px; }
.ws-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 280px; background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: 14px; padding: 7px; z-index: 40;
  box-shadow: 0 16px 48px oklch(0 0 0 / 0.45); }
.ws-mhead { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
  font-family: var(--mono); padding: 6px 10px 8px; }
.ws-list { max-height: 320px; overflow-y: auto; }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--muted); }
.ws-item:hover { background: oklch(0.34 0.018 150 / 0.05); color: var(--ink); }
.ws-item.active { color: var(--ink); background: var(--accent-weak); }
.ws-itile { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, oklch(0.55 0.12 265), oklch(0.5 0.13 290)); }
.ws-item.active .ws-itile { background: linear-gradient(135deg, oklch(0.58 0.075 152), oklch(0.50 0.08 165)); }
.ws-iname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-check { color: var(--accent); display: inline-flex; }
.ws-check svg { width: 15px; height: 15px; }
.ws-actions { display: flex; gap: 2px; opacity: 0; }
.ws-item:hover .ws-actions { opacity: 1; }
.ws-mini { background: none; border: none; color: var(--faint); cursor: pointer; padding: 2px 5px; border-radius: 5px; font-size: 12px; }
.ws-mini:hover { color: var(--ink); background: oklch(0.34 0.018 150 / 0.08); }
.ws-new { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: none;
  border: none; border-top: 1px solid var(--line); margin-top: 5px; color: var(--accent); font-size: 13px;
  font-weight: 500; padding: 11px 10px 6px; cursor: pointer; }
.ws-new:hover { color: var(--ink); }
.ws-plus { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; display: inline-flex; align-items: center;
  justify-content: center; border: 1px dashed var(--accent); color: var(--accent); font-size: 15px; line-height: 1; }

/* Floating setup guide (bottom-left, app-wide, collapsible) */
.setup-guide { position: fixed; left: 20px; bottom: 20px; z-index: 60; width: 300px; }
.setup-guide.collapsed { width: auto; }
.sg-pill { display: inline-flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px 9px 10px; color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: 0 8px 28px oklch(0 0 0 / 0.38); }
.sg-pill:hover { border-color: var(--accent); }
.sg-ring { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); font-size: 11px; font-weight: 600; }
.sg-card { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; box-shadow: 0 14px 44px oklch(0 0 0 / 0.42); }
.sg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sg-head b { font-size: 14px; }
.sg-prog { font-size: 11.5px; color: var(--faint); }
.sg-min { margin-left: auto; background: none; border: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.sg-min:hover { color: var(--ink); }
.sg-step { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; padding: 9px 8px; border-radius: 9px; cursor: pointer; color: var(--ink); font-size: 13px; }
.sg-step:hover:not([disabled]) { background: var(--accent-weak); }
.sg-step[disabled] { cursor: default; color: var(--muted); }
.sg-box { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; display: grid; place-items: center; }
.sg-step.done .sg-box { background: var(--ok-weak); border-color: transparent; color: var(--ok); }
.sg-step.done .sg-box svg { width: 11px; height: 11px; }
.sg-step.done .sg-label { text-decoration: line-through; opacity: 0.7; }
.sg-label { flex: 1; }
.sg-go { color: var(--accent); }
@media (max-width: 720px) { .setup-guide { left: 12px; right: 12px; bottom: 12px; width: auto; } }

/* Manual DNS records (domains whose DNS isn't on Cloudflare/Porkbun) */
.mdns { margin-top: 16px; border: 1px solid var(--warn); border-radius: 12px; background: var(--warn-weak); padding: 14px 16px; }
.mdns-head b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.mdns-head span { display: block; font-size: 12px; color: var(--muted); line-height: 1.55; }
.mdns-scroll { overflow-x: auto; margin-top: 12px; }
.mdns-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mdns-tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mdns-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mdns-tbl tr:last-child td { border-bottom: 0; }
.mdns-val { word-break: break-all; }

/* MCP / API keys */
.ak-new { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.ak-new input { flex: 0 0 260px; }
.ak-list { display: flex; flex-direction: column; gap: 8px; }
.ak-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ak-row code { font-family: var(--mono); font-size: 12px; }
.ak-meta { display: flex; align-items: center; gap: 12px; }
.ak-meta .dim { font-size: 12px; white-space: nowrap; }
.ak-fresh { border: 1px solid var(--accent); background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: 13px; }
.ak-fresh-key { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ak-fresh-key code { flex: 1; word-break: break-all; font-family: var(--mono); font-size: 12.5px; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); }
.ws-move { font-size: 12px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); max-width: 140px; cursor: pointer; }

/* Domain setup flow banner — adaptive "what to do next" guidance */
.flow-banner { margin: 6px 0 20px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); font-size: 13px; color: var(--ink); line-height: 1.55; }
.flow-banner b { color: var(--ink); }
.fb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
.fb-dot.ok { background: var(--ok); }
.fb-dot.warn { background: var(--warn); }
.pf-fix { font-size: 11.5px; color: var(--muted); margin: -4px 0 12px; line-height: 1.5; }
.pf-fix a { color: var(--accent); white-space: nowrap; font-weight: 600; }

/* Sending inboxes list (Settings) */
.snd-list { display: flex; flex-direction: column; gap: 16px; }
.snd-domain { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.snd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); margin-bottom: 6px; }
.snd-row:last-child { margin-bottom: 0; }
.snd-row code { font-family: var(--mono); font-size: 13px; color: var(--ink); }

/* Team: members, roles, pending invitations. */
.tm-list { display: grid; gap: 2px; }
.tm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tm-row:last-child { border-bottom: none; }
.tm-who { min-width: 220px; font-size: 14px; }
.tm-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-role { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink); font-size: 13px; text-transform: capitalize; }
.tm-role:disabled { opacity: .55; }
.tm-pending { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tm-cap { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.tm-invite { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tm-invite input { flex: 1 1 220px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; color: var(--ink); font-size: 14px; }
.tm-invite select { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; color: var(--ink); font-size: 13px; text-transform: capitalize; }
.ws-pick { display: grid; gap: 8px; text-align: left; margin-top: 4px; }

/* Role badge next to the signed-in address, so a missing control is explained. */
.role-tag { margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* Settings sub-tabs — one concern at a time, so the page stops reading as a
   jumble of unrelated panels. */
.subtabs { display: flex; gap: 4px; margin: 4px 0 24px; border-bottom: 1px solid var(--line); }
.subtab { appearance: none; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 16px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: color .15s; }
.subtab:hover { color: var(--ink); }
.subtab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.setpane { display: none; }
.setpane.active { display: block; animation: setfade .2s ease-out; }
@keyframes setfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Warmup: per-inbox control in the senders list + the app-password modal. */
.snd-tail { display: inline-flex; align-items: center; gap: 8px; }
.snd-warm { appearance: none; border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); border-radius: 8px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.snd-warm:hover { color: var(--ink); border-color: var(--ink); }
.snd-warm.on { background: oklch(0.66 0.14 45 / 0.14); border-color: oklch(0.66 0.14 45 / 0.4); color: oklch(0.52 0.15 40); font-weight: 600; }
.wu-modal { max-width: 460px; text-align: left; }
.wu-head { display: flex; align-items: flex-start; gap: 12px; }
.wu-ic { font-size: 22px; line-height: 1; }
.wu-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 6px; }
.wu-label a { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.wu-input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; color: var(--ink); font-size: 15px; font-family: var(--mono); letter-spacing: .08em; }
