/* ==========================================================================
   sms: design system
   Brand: ink (near-black navy) + signal green (the colour of a text bubble).
   Tokens first; components use tokens only, so dark mode is a token swap.
   Legacy class names (.card, .alert, .tag, .muted, .num, .row, .big ...) are kept.
   ========================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
             src: url("/static/fonts/InterVariable.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
             src: url("/static/fonts/InterVariable-Italic.woff2") format("woff2"); }

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f2f4f7;
  --border: #e7e9ee;
  --border-strong: #d6dae2;
  --text: #0a0f1e;
  --text-2: #353d4f;
  --muted: #687184;
  --faint: #9aa1b1;

  --ink: #0a0f1e;
  --ink-2: #1b2233;
  --on-ink: #ffffff;
  --brand: #17c77e;
  --brand-strong: #0d9f62;
  --brand-ink: #067a4a;
  --brand-soft: #e8f9f1;
  --accent: var(--brand-ink);

  --success: #0d9f62;  --success-soft: #e8f9f1;  --success-ink: #067a4a;
  --warning: #c27700;  --warning-soft: #fff6e5;  --warning-ink: #8a5200;
  --danger:  #d92d20;  --danger-soft:  #fef0ef;  --danger-ink:  #a3221a;
  --info:    #2e6be6;  --info-soft:    #eef3fe;  --info-ink:    #1d4dad;

  --sidebar: #0a0f1e;
  --sidebar-2: #151b2c;
  --sidebar-line: rgba(255, 255, 255, .06);
  --sidebar-text: #9ba3b6;

  --radius: 10px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 1px rgba(10, 15, 30, .04);
  --shadow: 0 1px 2px rgba(10, 15, 30, .05), 0 0 0 1px rgba(10, 15, 30, .02);
  --shadow-pop: 0 12px 32px -8px rgba(10, 15, 30, .18), 0 2px 6px rgba(10, 15, 30, .06);
  --ring: 0 0 0 3px rgba(23, 199, 126, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090c15; --surface: #0f1320; --surface-2: #121726; --surface-3: #181e2f;
    --border: #1f2638; --border-strong: #2a3248;
    --text: #edf0f7; --text-2: #c3c9d7; --muted: #8b93a7; --faint: #5f677c;
    --ink: #edf0f7; --ink-2: #ffffff; --on-ink: #0a0f1e;
    --brand-ink: #3fe0a0; --brand-soft: #0f2a1f; --accent: #3fe0a0;
    --success: #2fd391; --success-soft: #0f2a1f; --success-ink: #6ee8b6;
    --warning: #f0a93a; --warning-soft: #2a2012; --warning-ink: #f5c77d;
    --danger: #f2675c;  --danger-soft: #2c1414;  --danger-ink: #f6a39c;
    --info: #6b9bff;    --info-soft: #131e38;    --info-ink: #a9c5ff;
    --sidebar: #070912; --sidebar-2: #121726;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "cv05";
}
::selection { background: rgba(23, 199, 126, .25); }
a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { color: var(--text); letter-spacing: -.022em; line-height: 1.2; font-weight: 600; }
h1 { font-size: 1.65rem; margin: 0 0 1rem; letter-spacing: -.025em; }
h2 { font-size: .98rem; margin: 0 0 .9rem; letter-spacing: -.012em; }
h3 { font-size: .88rem; margin: 1.1rem 0 .5rem; letter-spacing: -.005em; }
p { margin: 0 0 .75rem; }
strong { font-weight: 600; }
code, pre { font-family: var(--mono); font-size: .84em; }
code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75;
        stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 14px; height: 14px; vertical-align: -2px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 28px; height: 28px; display: block; border-radius: 8px; }
.wordmark { font-weight: 720; font-size: 1.3rem; letter-spacing: -.035em; line-height: 1; }
.wordmark i { font-style: normal; color: var(--brand); }

/* ---------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh;
         background: linear-gradient(to right, var(--sidebar) 240px, transparent 240px); }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column;
           position: sticky; top: 0; height: 100vh; padding: 16px 12px; overflow-y: auto; }
.sidebar > .brand { padding: 6px 10px 22px; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #5d6579; padding: 18px 10px 6px; font-weight: 600; }
.nav { display: grid; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--sidebar-text);
         font-weight: 500; font-size: .87rem; text-decoration: none; transition: background .15s var(--ease), color .15s var(--ease); }
.nav a .icon { opacity: .8; }
.nav a:hover { background: var(--sidebar-2); color: #fff; }
.nav a.active { background: var(--sidebar-2); color: #fff; }
.nav a.active .icon { color: var(--brand); opacity: 1; }
.nav .count { margin-left: auto; background: var(--brand); color: #04110b; font-size: .68rem; font-weight: 700; padding: 0 7px;
              border-radius: 999px; line-height: 1.6; }
.sidebar-foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--sidebar-line); }
.account-chip { display: flex; align-items: center; gap: 10px; color: #fff; }
.avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 650; font-size: .74rem;
          background: #1f2740; color: #dfe4f0; flex: none; letter-spacing: .02em; }
.account-chip .who { min-width: 0; line-height: 1.3; }
.account-chip .who strong { display: block; font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chip .who span { font-size: .74rem; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sidebar form { margin: 0; }
.sidebar .logout { background: none; border: 0; color: var(--sidebar-text); padding: 0; height: auto; font-size: .78rem; font-weight: 500; cursor: pointer;
                   display: inline-flex; align-items: center; gap: 6px; box-shadow: none; margin: 12px 0 0; }
.sidebar .logout:hover { color: #fff; background: none; transform: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 0 36px; height: 58px;
          background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.6) blur(12px);
          border-bottom: 1px solid var(--border); }
.topbar .crumb { font-weight: 500; color: var(--muted); font-size: .86rem; display: flex; align-items: center; gap: 8px; }
.topbar .crumb a { color: var(--muted); }
.topbar .crumb a:hover { color: var(--text); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); padding: 6px; height: auto; margin: 0; box-shadow: none; }
.menu-btn:hover { background: var(--surface-3); }
.content { padding: 32px 36px 72px; width: 100%; max-width: 1280px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 9px 36px; background: var(--warning-soft); color: var(--warning-ink);
          border-bottom: 1px solid color-mix(in srgb, var(--warning) 20%, transparent); font-size: .85rem; font-weight: 500; }
.banner a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.foot { padding: 22px 36px 28px; color: var(--faint); font-size: .78rem; display: flex; gap: 16px; flex-wrap: wrap; margin-top: auto; }
.foot a { color: var(--muted); }

/* pills (top bar) */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: .8rem;
        font-weight: 550; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); white-space: nowrap;
        box-shadow: var(--shadow-xs); font-variant-numeric: tabular-nums; }
.pill:hover { border-color: var(--border-strong); color: var(--text); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--success-ink); }
.pill.live .dot { background: var(--brand); animation: pulse 2.2s infinite; }
.pill.practice { color: var(--warning-ink); }
.pill.practice .dot { background: var(--warning); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(23, 199, 126, .55); } 70% { box-shadow: 0 0 0 6px rgba(23, 199, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(23, 199, 126, 0); } }
label.pill { cursor: pointer; margin: 0 .35rem .5rem 0; height: 36px; padding: 0 16px; font-size: .86rem; }
label.pill:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--text); }
label.pill input { display: none; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; max-width: 720px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; font-weight: 500; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 8px; }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px;
        margin-bottom: 20px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child, .card > .card-head:first-child { margin-top: 0; }
.card .card { box-shadow: none; background: var(--surface-2); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head .muted, .card-head > span { font-size: .82rem; }
.card-head button, .card-head .button, .row form button { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 18px 22px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.cards > .card, .cards > section { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.narrow { max-width: 440px; margin: 2rem auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.big { font-size: 1.85rem; font-weight: 600; letter-spacing: -.035em; margin: 0; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 20px;
         background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 18px 22px 20px; border-right: 1px solid var(--border); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.7rem; font-weight: 600; letter-spacing: -.035em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .sub { color: var(--muted); font-size: .78rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat .sub a { color: var(--text); font-weight: 550; }
.stat .progress { margin-top: 12px; }
.delta { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--success-ink); background: var(--success-soft); }
.delta.down { color: var(--danger-ink); background: var(--danger-soft); }
.delta.flat { color: var(--muted); background: var(--surface-3); }

/* chart */
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chart-head .value { font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
svg.chart { width: 100%; height: 170px; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
svg.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
svg.chart .f0 { stop-color: var(--brand); stop-opacity: .22; }
svg.chart .f1 { stop-color: var(--brand); stop-opacity: 0; }
svg.chart .end { fill: var(--surface); stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
svg.chart .tick { fill: var(--faint); font-size: 11px; font-family: var(--font); }
svg.chart .hit { fill: transparent; cursor: crosshair; }
.chart-x { display: flex; justify-content: space-between; color: var(--faint); font-size: .72rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
svg.chart .hit:hover { fill: rgba(23, 199, 126, .18); }

/* ---------------------------------------------------------------- buttons */
button, .button, a.button {
  font: inherit; font-weight: 550; font-size: .86rem; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); border-radius: 8px; height: 36px; padding: 0 14px;
  cursor: pointer; margin-top: .4rem; text-decoration: none; line-height: 1; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(10, 15, 30, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .08s var(--ease);
}
button:hover, a.button:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--on-ink); }
button:active, a.button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--ring); }
button.secondary, a.button.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
button.secondary:hover, a.button.secondary:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
button.brand-btn, a.button.brand-btn { background: var(--brand); border-color: var(--brand); color: #04110b; }
button.brand-btn:hover, a.button.brand-btn:hover { background: #22d68b; border-color: #22d68b; color: #04110b; }
button.danger, a.button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger:hover { background: color-mix(in srgb, var(--danger) 88%, black); color: #fff; }
button.lg, a.button.lg { height: 42px; padding: 0 18px; font-size: .92rem; border-radius: 9px; }
button.block { width: 100%; }
button.link { background: none; color: var(--accent); height: auto; padding: 0; margin: 0; box-shadow: none; border: 0; font-weight: 550; }
button.link:hover { background: none; text-decoration: underline; color: var(--brand-strong); }
button.link.danger { color: var(--danger); background: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* ---------------------------------------------------------------- forms */
label { display: block; margin: 0 0 16px; font-weight: 500; font-size: .84rem; color: var(--text-2); }
label small, .hint { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; margin-top: 5px; line-height: 1.45; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 450; color: var(--text-2); cursor: pointer; }
label.check input { margin-top: 2px; }
input, select, textarea {
  font: inherit; font-size: .9rem; font-weight: 400; color: var(--text); background: var(--surface); width: 100%; margin-top: 7px;
  height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-xs);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
select { appearance: none; padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23687184' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 96px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-strong); box-shadow: var(--ring); outline: none; }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-strong); flex: none; box-shadow: none; }
input[type=datetime-local] { padding-right: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > input, .row > select { width: auto; flex: 1; margin-top: 0; min-width: 160px; }
.row > button { margin-top: 0; }
.row label { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.copy { font-family: var(--mono); font-size: .8rem; margin-top: 8px; }

/* ---------------------------------------------------------------- alerts */
.alert { display: block; position: relative; padding: 11px 14px 11px 40px; border-radius: var(--radius); margin: 0 0 16px;
         background: var(--info-soft); color: var(--info-ink); font-size: .86rem; line-height: 1.5;
         border: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.alert::before { content: ""; position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat; }
.alert.ok { background: var(--success-soft); color: var(--success-ink); }
.alert.ok::before { -webkit-mask-image: var(--i-check); mask-image: var(--i-check); }
.alert.error { background: var(--danger-soft); color: var(--danger-ink); }
.alert.error::before { -webkit-mask-image: var(--i-warn); mask-image: var(--i-warn); }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.alert p { margin: 0; }
.alert .copy { display: block; }
:root {
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --i-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.7 18-8-14a2 2 0 0 0-3.4 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- tags / status */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 550; padding: 0 8px; height: 22px;
       border-radius: 6px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; vertical-align: 1px;
       border: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.active, .tag.done, .tag.sent, .tag.approved, .tag.delivered { background: var(--success-soft); color: var(--success-ink); }
.tag.pending, .tag.practice, .tag.review, .tag.scheduled, .tag.requested, .tag.submitted, .tag.queued { background: var(--warning-soft); color: var(--warning-ink); }
.tag.suspended, .tag.cancelled, .tag.failed, .tag.rejected, .tag.paused, .tag.uncertain { background: var(--danger-soft); color: var(--danger-ink); }
.tag.sending, .tag.info { background: var(--info-soft); color: var(--info-ink); }
.tag.skipped, .tag.holdout { background: var(--surface-3); color: var(--muted); }
.danger:not(button):not(.button) { color: var(--danger); }

/* ---------------------------------------------------------------- tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: .76rem; padding: 10px 12px; border-bottom: 1px solid var(--border);
     background: var(--surface-2); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s var(--ease); }
tbody tr:hover td { background: var(--surface-2); }
td a { font-weight: 550; color: var(--text); }
td a:hover { color: var(--brand-ink); }
td strong { color: var(--text); }
.card table th:first-child, .card table td:first-child { padding-left: 14px; }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 22px; }
.card.flush table th:last-child, .card.flush table td:last-child { padding-right: 22px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.sub-line { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); font-size: .88rem; }
.empty .icon { width: 22px; height: 22px; color: var(--text-2); margin: 0 auto 12px; display: block; padding: 10px; box-sizing: content-box;
               background: var(--surface-3); border-radius: 10px; }
.empty strong { display: block; color: var(--text); font-size: .95rem; margin-bottom: 4px; }
td.empty-cell { text-align: center; padding: 30px; color: var(--muted); }

/* key/value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 0; margin: 0; font-size: .86rem; }
.kv dt { color: var(--muted); padding-right: 18px; }
.kv dd { margin: 0; color: var(--text); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kv .total { border-top: 1px solid var(--border); padding-top: 11px; font-weight: 600; font-size: 1rem; color: var(--text); }

/* progress + checklist */
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s var(--ease); }
.checklist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 2px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; font-weight: 500; font-size: .88rem; }
.checklist li a { color: var(--text); }
.checklist .bullet { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid;
                     place-items: center; flex: none; color: var(--muted); font-size: .7rem; font-weight: 600; }
.checklist li.done { color: var(--muted); }
.checklist li.done .bullet { background: var(--brand); border-color: var(--brand); color: #04110b; }
.checklist li.next { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.checklist li.next .bullet { border-color: var(--ink); color: var(--text); }
.checklist li .go { margin-left: auto; font-size: .8rem; font-weight: 550; display: inline-flex; align-items: center; gap: 4px; color: var(--text); }

/* ---------------------------------------------------------------- SMS preview + phone */
pre.sms { white-space: pre-wrap; background: var(--surface-3); border-radius: 16px 16px 16px 4px; padding: 11px 14px;
          font: .9rem/1.45 var(--font); margin: .5rem 0; color: var(--text); }
.phone { width: 100%; max-width: 290px; margin: 0 auto 20px; background: #0c0e14; border-radius: 44px; padding: 11px;
         box-shadow: 0 30px 60px -20px rgba(10, 15, 30, .35), 0 0 0 1px #2b2f3a inset, 0 0 0 3px #1a1d25; }
.phone-screen { background: #fff; border-radius: 34px; min-height: 430px; overflow: hidden; display: flex; flex-direction: column; }
.phone-top { background: #f6f6f8; padding: 14px 12px 10px; text-align: center; border-bottom: 1px solid #ececf0; }
.phone-notch { width: 86px; height: 24px; background: #0c0e14; border-radius: 999px; margin: -4px auto 12px; }
.phone-avatar { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 5px; display: grid; place-items: center; color: #fff;
                font-weight: 600; font-size: .82rem; background: linear-gradient(180deg, #a5a8b3, #7f8390); }
.phone-name { font-size: .74rem; color: #1c1c1e; font-weight: 600; }
.phone-body { padding: 14px 12px; flex: 1; }
.phone-time { text-align: center; font-size: .66rem; color: #8e8e93; margin-bottom: 8px; font-weight: 500; }
.bubble { background: #e9e9eb; color: #1c1c1e; border-radius: 18px 18px 18px 5px; padding: 9px 13px; font-size: .84rem;
          line-height: 1.38; white-space: pre-wrap; word-wrap: break-word; max-width: 86%; letter-spacing: -.005em; }
.bubble:empty::after { content: "Your message appears here as you type…"; color: #8e8e93; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.auth-hero { background: #0a0f1e; color: #fff; padding: 44px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; isolation: isolate; }
.auth-hero::before { content: ""; position: absolute; top: -260px; right: -220px; width: 760px; height: 760px; z-index: -1;
  background: radial-gradient(closest-side, rgba(23, 199, 126, .26), transparent 70%); }
.auth-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 70% 15%, black, transparent 70%); mask-image: radial-gradient(ellipse at 70% 15%, black, transparent 70%); }
.auth-hero h2 { color: #fff; font-size: 2.5rem; line-height: 1.08; letter-spacing: -.032em; margin: auto 0 18px; max-width: 560px; font-weight: 650; }
.auth-hero h2 em { font-style: normal; color: var(--brand); }
.auth-hero p { color: rgba(255, 255, 255, .64); font-size: 1.02rem; max-width: 470px; line-height: 1.6; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; max-width: 470px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, .78); font-size: .9rem; }
.auth-points .icon { color: var(--brand); margin-top: 2px; }
.auth-points strong { color: #fff; }
.hero-card { margin-top: auto; width: 100%; max-width: 470px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .04);
             border: 1px solid rgba(255, 255, 255, .08); display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-card div { font-size: .74rem; color: rgba(255, 255, 255, .55); line-height: 1.35; }
.hero-card strong { display: block; color: #fff; font-size: 1.1rem; letter-spacing: -.02em; margin-bottom: 3px; font-weight: 600; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form .inner { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-form .lead { color: var(--muted); margin-bottom: 28px; }
.auth-form .switch { margin-top: 22px; color: var(--muted); font-size: .86rem; text-align: center; }
.auth-form .switch a { color: var(--text); font-weight: 550; }
.auth-form .legal-links { margin-top: 40px; text-align: center; font-size: .76rem; color: var(--faint); }
.auth-form .legal-links a { color: var(--muted); }
.auth-form .mobile-brand { display: none; margin-bottom: 30px; color: var(--text); }

/* standalone pages */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.solo .card { max-width: 420px; width: 100%; text-align: center; padding: 36px 30px; }
.solo-wrap .topbar { padding: 0 32px; }
.solo-wrap .brand { color: var(--text); }
.legal { max-width: 780px; margin-left: auto; margin-right: auto; padding: 32px 40px; }
.legal h2 { margin-top: 1.8rem; }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 50; transform: translateX(-100%); transition: transform .22s var(--ease); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(5, 8, 18, .5); z-index: 40; }
  .menu-btn { display: inline-flex; }
  .topbar, .content, .banner, .foot { padding-left: 16px; padding-right: 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form .mobile-brand { display: inline-flex; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar .hide-sm { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat { border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  table { font-size: .82rem; }
  th, td { padding: 10px 8px; }
  .stat .value { font-size: 1.4rem; }
  h1 { font-size: 1.4rem; }
  .legal { padding: 22px 18px; }
}
