/* Console agences: one stylesheet, no build.
   Identity: the mark (src/http/views/brand.ts), ink + warm paper + one solar accent taken from the
   mark's rays. Deliberately not the CRM's navy/rose: this is the team's tool, not an agency's CRM.
   Space Grotesk for titles and figures, Inter for everything else. Tokens first, light and dark. */
:root {
  --ink: #0f0f12;
  --ink-2: #1b1b20;
  --ink-3: #2a2a31;
  --paper: #f3f2ee;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --surface-3: #efede7;
  --border: #e4e1d9;
  --border-strong: #d3cfc4;
  --text: #15151a;
  --muted: #6c6a63;
  --faint: #9a978e;

  --solar: #ff5a1f;
  --solar-strong: #e4470e;
  --solar-soft: #fff0e8;
  --solar-ink: #ffffff;

  --primary: var(--ink);
  --primary-ink: #ffffff;
  --link: #c43d0a;

  --ok: #0f8a5f;
  --ok-soft: #e3f4ec;
  --warn: #b26a00;
  --warn-soft: #fff2d9;
  --danger: #d1352a;
  --danger-soft: #fde8e6;
  --info: #3157d1;
  --info-soft: #e9eefc;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 15, 18, 0.05), 0 10px 24px -16px rgba(15, 15, 18, 0.18);
  --shadow-lg: 0 24px 60px -24px rgba(15, 15, 18, 0.35);
  --ring: 0 0 0 3px color-mix(in srgb, var(--solar) 28%, transparent);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0c0e;
    --surface: #151518;
    --surface-2: #1b1b1f;
    --surface-3: #232328;
    --border: #2b2b31;
    --border-strong: #3a3a42;
    --text: #edece8;
    --muted: #a19f97;
    --faint: #75736c;
    --solar: #ff6d33;
    --solar-strong: #ff875a;
    --solar-soft: #2c1a12;
    --primary: #edece8;
    --primary-ink: #0f0f12;
    --link: #ff8a5c;
    --ok: #4cc795;
    --ok-soft: #132a20;
    --warn: #f0b354;
    --warn-soft: #2d2412;
    --danger: #ff7d70;
    --danger-soft: #331a17;
    --info: #8ea8ff;
    --info-soft: #1a2140;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 24px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--text); font: 14px/1.55 var(--font); display: flex; min-height: 100vh; -webkit-font-smoothing: antialiased; }
body.bare { display: block; }
body.bare .main { padding: 0; max-width: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font: 600 26px/1.2 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h2 { font: 600 16px/1.3 var(--display); letter-spacing: -0.01em; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 11.5px; margin: 22px 0 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
p { margin: 0 0 8px; }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
code.wrap { word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--solar) 30%, transparent); }

/* ---------- mark and lockup ---------- */
.mark { display: block; flex-shrink: 0; }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.lockup-text { display: flex; flex-direction: column; line-height: 1.05; }
.lockup-name { font: 700 16px/1.1 var(--display); letter-spacing: -0.02em; }
.lockup-sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; margin-top: 2px; }

/* ---------- navigation (ink sidebar) ---------- */
.nav { width: 248px; flex-shrink: 0; background: var(--ink); color: #f4f2ec; padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.brand { color: #fff; padding: 0 10px; border-radius: 10px; }
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--solar); }
.nav-items { display: flex; flex-direction: column; gap: 3px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: rgba(244, 242, 236, 0.72); font-weight: 500; transition: background 0.15s, color 0.15s; }
.nav-item .icon { opacity: 0.85; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; text-decoration: none; }
.nav-item.is-active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.nav-item.is-active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--solar); }
.nav-item.is-active .icon { color: var(--solar); opacity: 1; }
.nav-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); color: #fff; font: 600 12px var(--display); flex-shrink: 0; }
.nav-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.nav-name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-email { font-size: 11.5px; color: rgba(244, 242, 236, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-logout { background: none; border: 0; color: rgba(244, 242, 236, 0.6); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.nav-logout:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.main { flex: 1; min-width: 0; padding: 34px 40px 72px; max-width: 1320px; }

/* ---------- layout ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .muted { margin: 0; max-width: 72ch; }
.crumbs { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card > h2:first-child { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; }
.narrow { max-width: 600px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-3 > .card { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; align-items: flex-end; margin-top: 16px; flex-wrap: wrap; }
.row > label { min-width: 0; flex: 1 1 140px; }
.row input { width: 100%; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.empty { text-align: center; padding: 72px 24px; background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: var(--radius); }
.empty h2 { justify-content: center; font-size: 20px; }
.empty p { max-width: 52ch; margin: 0 auto 18px; }

/* ---------- summary tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; overflow: hidden; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-value { font: 600 30px/1.1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.stat-accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat-accent .stat-label, .stat-accent .stat-foot { color: rgba(255, 255, 255, 0.62); }
.stat-mark { position: absolute; right: -18px; top: -20px; color: var(--solar); pointer-events: none; }
.stat-mark .mark { width: 84px; height: 84px; }
.stat-accent .stat-label, .stat-accent .stat-foot { padding-right: 56px; }
.stat-accent > :not(.stat-mark) { position: relative; z-index: 1; }
.stat-danger .stat-value { color: var(--danger); }
.stat-warn .stat-value { color: var(--warn); }

@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  body { flex-direction: column; }
  .nav { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; }
  .nav-items { flex-direction: row; flex-wrap: wrap; gap: 2px; order: 3; width: 100%; }
  .nav-item { padding: 7px 10px; gap: 7px; }
  .nav-item.is-active::before { display: none; }
  .nav-user { margin: 0 0 0 auto; padding: 0; border: 0; }
  .nav-who { display: none; }
  .main { padding: 22px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 24px; }
  h1 { font-size: 22px; }
  .card { padding: 18px; }
}

/* ---------- controls ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--text); }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 12px; min-height: 40px; transition: border-color 0.15s, box-shadow 0.15s; }
input::placeholder { color: var(--faint); }
input:hover, select:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--solar); box-shadow: var(--ring); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
input[type='color'] { padding: 3px; width: 52px; height: 40px; }
input[type='file'] { padding: 5px; font-size: 13px; color: var(--muted); }
input[type='file']::file-selector-button { font: inherit; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 5px 12px; margin-right: 10px; cursor: pointer; }
input[type='file']::file-selector-button:hover { background: var(--surface-3); }
input[type='checkbox'], input[type='radio'] { min-height: auto; accent-color: var(--solar); width: 16px; height: 16px; }
.field small { font-weight: 400; color: var(--muted); }
.req { color: var(--solar); }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; font-size: 14px; }
.checks { border: 0; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.checks legend { font-weight: 600; font-size: 12.5px; margin-bottom: 8px; }
.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; min-height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s; }
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 25%, var(--border-strong)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--solar)); border-color: color-mix(in srgb, var(--primary) 86%, var(--solar)); }
.btn-accent { background: var(--solar); border-color: var(--solar); color: var(--solar-ink); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--solar) 70%, transparent); }
.btn-accent:hover { background: var(--solar-strong); border-color: var(--solar-strong); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); border-color: color-mix(in srgb, var(--danger) 88%, #000); }
.btn-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); color: var(--warn); }
.btn-warn:hover { background: var(--warn-soft); }
.btn-small { padding: 4px 11px; min-height: 30px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-align: left; }
.link:hover { color: var(--text); text-decoration: underline; }
details summary { cursor: pointer; color: var(--text); margin-top: 14px; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--solar); border-bottom: 2px solid var(--solar); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 4px; }
details[open] summary::before { transform: rotate(45deg); }
details[open] summary { margin-bottom: 12px; }

/* ---------- data ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
/* Tables inside cards scroll sideways on a narrow screen instead of spilling out of the card. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.card .table th { background: none; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background 0.12s; }
.table-wrap .table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table td.nowrap, .table td.nowrap a { white-space: nowrap; }
.table.compact td, .table.compact th { padding: 9px 12px; }
.card .table th:first-child, .card .table td:first-child { padding-left: 0; }
.card .table th:last-child, .card .table td:last-child { padding-right: 0; }
.table td.actions { white-space: nowrap; text-align: right; }
.table.compact td { white-space: nowrap; }
.table.compact td.wrap-ok { white-space: normal; }
.agency-cell { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.agency-cell:hover { text-decoration: none; }
.agency-cell:hover .strong { color: var(--link); }
.agency-cell > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.agency-slug { font-family: var(--mono); font-size: 11.5px; }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font: 700 13px var(--display); letter-spacing: 0.02em; flex-shrink: 0; }
.avatar-0 { background: #ffe6da; color: #b33a0b; }
.avatar-1 { background: #e4ecff; color: #2d4fb8; }
.avatar-2 { background: #e2f4ea; color: #12704d; }
.avatar-3 { background: #f1e5ff; color: #6b34b8; }
.avatar-4 { background: #fff1cc; color: #8a5a00; }
.avatar-5 { background: #e3e2de; color: #2a2a31; }
@media (prefers-color-scheme: dark) {
  .avatar { filter: saturate(0.9) brightness(0.85); }
}
/* .table.cards-sm: on a phone each row becomes a card of "label  value" lines (labels from data-label). */
@media (max-width: 760px) {
  .table.cards-sm thead { display: none; }
  .table.cards-sm, .table.cards-sm tbody, .table.cards-sm tr, .table.cards-sm td { display: block; width: 100%; }
  .table.cards-sm tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .table.cards-sm tr:last-child { border-bottom: 0; }
  .table.cards-sm td { border: 0; padding: 4px 0; white-space: normal; }
  .table.cards-sm td:first-child { padding-bottom: 10px; }
  .table.cards-sm td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .table.cards-sm td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; flex-shrink: 0; }
  .table.cards-sm td.nowrap { white-space: normal; overflow-wrap: anywhere; }
}
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.plain { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; border: 1px solid transparent; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-muted { background: var(--surface-3); color: var(--muted); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.badge-danger { background: var(--solar); color: #fff; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot-danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); animation: pulse 2s ease-in-out infinite; }
.dot-muted { background: var(--border-strong); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--danger-soft); } }

.notice { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid transparent; border-left-width: 4px; }
.notice ul { margin: 6px 0; padding-left: 20px; }
.notice-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); border-left-color: var(--danger); }
.notice-warn { background: var(--warn-soft); color: var(--warn); border-left-color: var(--warn); }
.notice-ok { background: var(--ok-soft); color: var(--ok); border-left-color: var(--ok); }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.copy-row code { padding: 8px 12px; border-radius: 8px; }

.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.danger-zone > h2:first-child { color: var(--danger); }
.danger-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.danger-row:first-of-type { border-top: 0; }
.danger-row p { margin: 0; }
.danger-row form input { min-width: 220px; }
.grid-2-wide { display: grid; grid-template-columns: 1fr; gap: 0; }

/* ---------- job checklist ---------- */
.checklist { list-style: none; margin: 0; padding: 0; position: relative; }
.step { display: flex; gap: 14px; padding: 12px 0; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 42px; bottom: -10px; width: 2px; background: var(--border); }
.step-done:not(:last-child)::after { background: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.step-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid var(--border-strong); color: var(--muted); background: var(--surface); position: relative; z-index: 1; }
.step-body { min-width: 0; flex: 1; padding-top: 3px; }
.step-label { font-weight: 600; }
.step-note { white-space: pre-wrap; word-break: break-word; font: 12px/1.5 var(--mono); color: var(--muted); margin: 6px 0 0; background: none; padding: 0; }
.step-hint { margin: 8px 0 0; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.step-done .step-icon { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-failed .step-icon { background: var(--danger); border-color: var(--danger); color: #fff; }
.step-failed .step-label { color: var(--danger); }
.step-pending .step-icon { border-color: var(--warn); color: var(--warn); }
.step-skipped { opacity: 0.55; }
.step-running .step-icon { border-color: var(--solar); border-top-color: transparent; color: transparent; animation: spin 0.9s linear infinite; }
.step-running .step-label { color: var(--solar-strong); }
.step-todo .step-label { color: var(--muted); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .step-running .step-icon, .dot-danger { animation: none; } .step-running .step-icon { border-top-color: var(--solar); } }
.log { max-height: 380px; overflow: auto; font: 12px/1.6 var(--mono); background: var(--ink); color: #d9d6cd; padding: 14px 16px; border-radius: 12px; white-space: pre-wrap; margin: 0; }
.invite { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box; }

/* ---------- wizard ---------- */
.wizard-steps { display: flex; list-style: none; padding: 0; margin: 0 0 20px; gap: 0; counter-reset: s; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); }
.wizard-steps li { counter-increment: s; flex: 1; min-width: 120px; padding: 9px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.wizard-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--display); background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.wizard-steps li.is-current { background: var(--ink); color: #fff; }
.wizard-steps li.is-current::before { background: var(--solar); color: #fff; }
.wizard-steps li.is-done { color: var(--ok); }
.wizard-steps li.is-done::before { content: '✓'; background: var(--ok-soft); color: var(--ok); }
.wizard-nav { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.option { flex-direction: row; gap: 12px; align-items: flex-start; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; font-weight: 400; font-size: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.option:hover { border-color: var(--border-strong); }
.option:has(input:checked) { border-color: var(--solar); background: var(--solar-soft); }
.option input { margin-top: 3px; }
.dns-line { margin-top: 10px; font-size: 13px; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pack { cursor: pointer; font-weight: 400; position: relative; }
.pack input { position: absolute; opacity: 0; pointer-events: none; }
.pack-body { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; height: 100%; background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
.pack:hover .pack-body { border-color: var(--border-strong); }
.pack input:checked + .pack-body { border-color: var(--solar); background: var(--solar-soft); box-shadow: 0 0 0 1px var(--solar); }
.pack input:focus-visible + .pack-body { box-shadow: var(--ring); }
.pack-seats { font: 700 24px/1.1 var(--display); margin-top: auto; letter-spacing: -0.02em; }
.pack-seats small { font: 400 12px var(--font); color: var(--muted); }
.color-row { display: flex; gap: 8px; align-items: center; }
.recap { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 18px; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; overflow-wrap: anywhere; }

.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
@media (max-width: 1000px) { .brand-layout { grid-template-columns: 1fr; } }
/* Live preview of the AGENCY's brand (its CRM), so it keeps neutral CRM-like chrome on purpose. */
.preview { --pv-primary: #1f3a5f; --pv-accent: #e4572e; --pv-ink: #fff; display: flex; flex-direction: column; gap: 12px; }
.pv-app { display: flex; height: 190px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; color: #17202b; font-size: 11px; }
.pv-side { width: 104px; background: var(--pv-primary); color: var(--pv-ink); padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.pv-logo, .pv-logo-dark { font-weight: 700; font-size: 12px; margin-bottom: 8px; min-height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pv-logo img, .pv-logo-dark img { max-height: 22px; max-width: 100%; display: block; }
.pv-item { padding: 4px 6px; border-radius: 4px; opacity: 0.8; }
.pv-item.is-on { background: rgba(255, 255, 255, 0.16); opacity: 1; }
.pv-body { flex: 1; padding: 12px; background: #f6f7f9; }
.pv-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.pv-card { background: #fff; border: 1px solid #e3e6eb; border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pv-chip { background: color-mix(in srgb, var(--pv-accent) 16%, #fff); color: var(--pv-accent); border-radius: 999px; padding: 0 6px; font-weight: 600; }
.pv-line { height: 6px; width: 100%; border-radius: 3px; background: #e3e6eb; }
.pv-line.short { width: 60%; }
.pv-btn { background: var(--pv-accent); color: #fff; border-radius: 4px; padding: 3px 8px; font-weight: 600; }
.pv-btn.wide { display: block; text-align: center; }
.pv-login { height: 150px; border-radius: 10px; background: var(--pv-primary); display: grid; place-items: center; border: 1px solid var(--border); }
.pv-login-card { width: 170px; background: #fff; border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 6px; color: #17202b; font-size: 11px; }
.pv-logo-dark { background: var(--pv-primary); color: var(--pv-ink); border-radius: 4px; padding: 4px 6px; }
.pv-input { height: 14px; border: 1px solid #e3e6eb; border-radius: 3px; }

/* ---------- sign-in: ink panel with the mark, form on paper ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-aside { background: var(--ink); color: #f4f2ec; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; position: relative; overflow: hidden; }
.auth-aside-mark { color: var(--solar); margin-top: 8vh; }
.auth-aside-mark .mark { width: min(260px, 40vw); height: auto; }
.auth-aside::after { content: ''; position: absolute; right: -180px; bottom: -180px; width: 460px; height: 460px; border-radius: 50%; border: 70px solid rgba(255, 255, 255, 0.04); }
.auth-aside-text { position: relative; z-index: 1; max-width: 420px; }
.auth-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--solar); font-weight: 600; margin-bottom: 10px; }
.auth-tagline { font: 600 28px/1.25 var(--display); letter-spacing: -0.02em; margin: 0; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { margin-bottom: 36px; }
.auth-brand .mark { color: var(--solar); }
.auth-card h1 { font-size: 28px; margin-bottom: 18px; }
.auth-card .btn { width: 100%; margin-top: 4px; }
.auth-card .btn-small { width: auto; }
.steps-text { padding-left: 18px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.secret { font-size: 14px; letter-spacing: 0.06em; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; }
}
