/* Agency Dashboard — calm, precise, quiet. One accent (the agency's brand color), everything else neutral. */
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --brand: #70273e;
  --brand-ink: color-mix(in oklab, var(--brand) 82%, black);
  --brand-soft: color-mix(in oklab, var(--brand) 7%, white);
  --brand-line: color-mix(in oklab, var(--brand) 22%, white);
  --ink: #1b1819;
  --text: #34302f;
  --muted: #6f6866;
  --faint: #9a9391;
  --bg: #f6f5f3;
  --surface: #ffffff;
  --tint: #f9f8f7;
  --line: #ebe7e5;
  --line-strong: #dcd6d3;
  --ok: #1d7a4c;   --ok-bg: #e9f5ee;
  --warn: #9a6400; --warn-bg: #fcf3e1;
  --bad: #b3261e;  --bad-bg: #fcebe9;
  --info: #2b5ea7; --info-bg: #eaf1fb;
  --series-new: var(--brand);
  --series-renewal: #c79aa7;
  --series-other: #d9d3d0;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-xs: 8px; --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow: 0 1px 2px rgb(27 24 25 / .04), 0 4px 16px rgb(27 24 25 / .04);
  --shadow-lg: 0 2px 6px rgb(27 24 25 / .06), 0 24px 56px rgb(27 24 25 / .14);
  --side-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: #fff; padding: 8px 14px; border-radius: 8px; }
.num, td.num, .kpi-value { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.i { flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px 14px; }
.side-brand { display: block; padding: 4px 10px 22px; }
.brand-logo { height: 30px; width: auto; max-width: 196px; object-fit: contain; object-position: left; }
.brand-logo.wordmark { display: block; height: auto; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; color: var(--brand); line-height: 1.2; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); font-weight: 500; transition: background .15s, color .15s; }
.side-nav a:hover { background: var(--tint); color: var(--ink); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand); }
.side-nav a .i { opacity: .8; }
.side-nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.side-search { position: relative; margin: 0 4px 14px; }
.side-search input[type=search] { height: 36px; padding-left: 32px; background: var(--tint); border-color: transparent; font-size: 13.5px; }
.side-search input[type=search]:focus { background: var(--surface); }
.side-search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.side-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.side-agency { grid-column: 1 / -1; padding: 8px 10px; background: var(--tint); border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--ink); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); color: var(--text); min-width: 0; }
.side-user:hover { background: var(--tint); }
.side-user strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; font-size: 12px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; flex: none; }
.side-logout { border: 0; background: none; color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer; }
.side-logout:hover { background: var(--tint); color: var(--ink); }
.scrim { display: none; }

.main { padding: 28px 36px 40px; min-width: 0; max-width: 1480px; width: 100%; }
.top { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.top-title { flex: 1; min-width: 220px; }
.top h1 { font-size: 28px; letter-spacing: -0.03em; }
.top .sub { margin: 4px 0 0; color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.menu-btn { display: none; border: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--ink); cursor: pointer; }
.foot { margin-top: 48px; font-size: 12px; color: var(--faint); }

/* ---------- cards & grid ---------- */
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mt { margin-top: 16px; } .mt-lg { margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-flush .card-head { padding: 18px 22px 0; }
.card-head h2 { font-size: 15px; letter-spacing: -0.01em; }
.card-head .hint { font-size: 13px; color: var(--muted); }
.card-head a { font-size: 13px; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }

.kpi { position: relative; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -0.035em; color: var(--ink); line-height: 1.1; }
.kpi-meta { font-size: 13px; color: var(--muted); }
.kpi-meta b { color: var(--ink); font-weight: 600; }
.kpi.accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.kpi.accent .kpi-label, .kpi.accent .kpi-meta { color: rgb(255 255 255 / .78); }
.kpi.accent .kpi-value, .kpi.accent .kpi-meta b { color: #fff; }
a.kpi { color: inherit; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.bar { height: 6px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.kpi.accent .bar { background: rgb(255 255 255 / .2); }
.kpi.accent .bar > span { background: #fff; }

.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.donut-wrap .chart-box { height: 150px; }
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stat-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.stat-list li .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stat-list li .v { margin-left: auto; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-list a { color: inherit; display: contents; }

.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rank li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; }
.rank li .bar { grid-column: 1 / -1; }
.rank li b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t, .list .s { display: block; }
.list .t { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .s { font-size: 12.5px; color: var(--muted); }
.list .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list a.row-link { display: flex; gap: 12px; align-items: center; color: inherit; flex: 1; min-width: 0; }
.date-chip { width: 44px; flex: none; text-align: center; border-radius: 10px; background: var(--tint); padding: 5px 0; line-height: 1.1; }
.date-chip b { display: block; font-size: 16px; color: var(--ink); }
.date-chip small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.date-chip.soon { background: var(--brand-soft); }
.date-chip.soon b, .date-chip.soon small { color: var(--brand); }
.empty { padding: 28px 22px; text-align: center; color: var(--muted); font-size: 14px; }
.empty .i { margin: 0 auto 8px; color: var(--faint); }

/* ---------- pills, buttons, forms ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; line-height: 1.6; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-muted { background: var(--tint); color: var(--muted); border: 1px solid var(--line); }
.pill-brand { background: var(--brand-soft); color: var(--brand); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--tint); color: var(--muted); border: 1px solid var(--line); }
.tag-neg { color: var(--bad, #b3261e); border-color: color-mix(in oklab, var(--bad, #b3261e) 30%, white); background: color-mix(in oklab, var(--bad, #b3261e) 7%, white); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--brand); background: var(--brand); color: #fff; font: 500 14px/1 var(--font); cursor: pointer; transition: transform .12s var(--ease), background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--brand-ink); color: #fff; }
.btn:active { transform: scale(.97); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #efc9c5; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }

label.f { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
label.f small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 14px var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=color] { width: 54px; height: 38px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
select { appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236f6866' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); }
.check input { margin-top: 3px; }
.check small { display: block; color: var(--muted); }
.form-actions { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.filters input[type=search], .filters select { height: 34px; font-size: 13.5px; width: auto; }
.filters .search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.filters .search input { width: 100%; padding-left: 34px; }
.filters .search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.inline-form { display: contents; }
.select-pill { position: relative; display: inline-flex; align-items: center; }
.select-pill .i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.select-pill select { padding-left: 36px; height: 38px; font-weight: 500; border-radius: var(--r-sm); width: auto; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--brand); }
.tabs .count { font-size: 11.5px; background: var(--tint); border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 0 7px; }
.seg { display: inline-flex; background: var(--tint); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--tint); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .num, table.t th.num { text-align: right; white-space: nowrap; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr:hover { background: #fcfbfb; }
table.t tr[data-href] { cursor: pointer; }
table.t td.strong { color: var(--ink); font-weight: 500; }
table.t td .s { display: block; font-size: 12px; color: var(--muted); }
table.t tfoot td { font-weight: 600; color: var(--ink); background: var(--tint); border-top: 1px solid var(--line); }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.pager .muted { margin-right: auto; }
table.t select.mini { height: 30px; font-size: 12.5px; padding-left: 10px; width: auto; min-width: 150px; }

/* ---------- detail ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px 20px; margin: 0; }
.dl dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.dl dd { margin: 0; color: var(--ink); font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.timeline li:first-child { border-top: 0; }
.timeline li.cur { font-weight: 600; }

/* ---------- flash / toast / callouts ---------- */
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: 14px; border: 1px solid; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: #cfe8da; }
.flash-err { background: var(--bad-bg); color: var(--bad); border-color: #f2cfcb; }
.flash-info { background: var(--info-bg); color: var(--info); border-color: #d3e1f5; }
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--ink); }
.callout .i { color: var(--brand); margin-top: 2px; }
.callout p { margin: 2px 0 0; color: var(--text); font-size: 14px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); z-index: 400; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(560px, calc(100% - 32px)); color: var(--text); }
dialog.modal::backdrop { background: rgb(27 24 25 / .35); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 18px 22px; }
.modal-close { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 8px; }
.result-list { list-style: none; padding: 0; margin: 12px 0 0; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.result-list li button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 10px 14px; cursor: pointer; border-top: 1px solid var(--line); font-size: 13.5px; }
.result-list li:first-child button { border-top: 0; }
.result-list li button:hover, .result-list li button:focus { background: var(--brand-soft); }

/* ---------- import ---------- */
.drop { display: grid; place-items: center; text-align: center; gap: 8px; padding: 44px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: var(--tint); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .i { color: var(--brand); }
.drop strong { color: var(--ink); font-size: 16px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-3 { grid-template-columns: repeat(3, 1fr); }
.choice label { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; transition: border-color .15s, background .15s; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.choice input { margin-top: 3px; accent-color: var(--brand); }
.choice strong { display: block; color: var(--ink); }
.choice small { color: var(--muted); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px 16px; }
.map-grid label.f.req span::after { content: " *"; color: var(--bad); }
.map-grid label.f.auto select { border-color: var(--brand-line); background-color: var(--brand-soft); }
.steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.steps span { font-size: 13px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.steps span.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps span.done { color: var(--ok); }
.hidden { display: none !important; }
.preview-table { font-size: 12.5px; }

/* ---------- auth / install ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, var(--brand-soft), var(--bg)); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 36px 34px; }
.auth-card.wide { width: min(640px, 100%); }
.auth-card .brand-logo { height: 36px; margin-bottom: 26px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; letter-spacing: -0.03em; }
.auth-card > p { color: var(--muted); }
.auth-card form { display: grid; gap: 14px; margin-top: 22px; }
.auth-card .btn { width: 100%; height: 42px; }
.auth-card fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; display: grid; gap: 12px; margin: 0; }
.auth-card legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-21, .g-12 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 300; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .3); z-index: 250; }
  .menu-btn { display: inline-flex; }
  .main { padding: 18px 16px 32px; }
  .top { align-items: center; }
  .top h1 { font-size: 22px; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .choice, .choice-3 { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 120px 1fr; }
  .donut-wrap .chart-box { height: 120px; }
  .kpi-value { font-size: 26px; }
}
@media (max-width: 520px) { .g-4 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .side, .top-actions, .menu-btn, .filters, .pager { display: none !important; } .shell { display: block; } .card { box-shadow: none; } }

/* ---------- CRM ---------- */
.xsell { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.xsell:first-of-type { border-top: 0; padding-top: 0; }
.xsell > div { flex: 1; min-width: 0; }
.xsell strong { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: 14px; }
.xsell strong .i { color: var(--brand); }
.xsell small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.log-form { display: grid; gap: 10px; padding: 14px 22px 18px; border-bottom: 1px solid var(--line); margin-top: 12px; }
.seg label { display: inline-flex; cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg label input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.seg label input:focus-visible + span { outline: 2px solid var(--brand); }

.feed { list-style: none; margin: 0; padding: 6px 22px 18px; }
.feed li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; position: relative; }
.feed li + li { border-top: 1px solid var(--line); }
.feed .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--muted); border: 1px solid var(--line); }
.feed .k-money .dot { background: var(--ok-bg); color: var(--ok); border-color: #cfe8da; }
.feed .k-email .dot, .feed .k-call .dot { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.feed strong { color: var(--ink); font-weight: 550; font-size: 14px; }
.feed p { margin: 4px 0 0; font-size: 13.5px; color: var(--text); }
.feed small { display: block; margin-top: 4px; font-size: 12px; color: var(--faint); }

.task-check { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; cursor: pointer; }
.task-check input { width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; flex: none; }
.task-row.hi .t::after { content: "High"; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--bad); background: var(--bad-bg); padding: 1px 7px; border-radius: 99px; vertical-align: 2px; }
.list li.done .t { text-decoration: line-through; color: var(--faint); }
.list .s a { color: var(--brand); }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.lane { background: var(--tint); border: 1px solid var(--line); border-radius: var(--r); min-height: 240px; transition: background .15s, border-color .15s; }
.lane.over { background: var(--brand-soft); border-color: var(--brand-line); }
.lane header { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 14px 10px; }
.lane header h2 { font-size: 14px; }
.lane header span { font-size: 12px; }
.lane-body { display: grid; gap: 10px; padding: 0 10px 12px; max-height: calc(100vh - 250px); overflow-y: auto; align-content: start; }
.lane-empty { color: var(--faint); font-size: 13px; text-align: center; padding: 18px 0; margin: 0; }
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; box-shadow: var(--shadow); cursor: grab; display: grid; gap: 4px; transition: transform .18s var(--ease), box-shadow .18s var(--ease), opacity .15s; }
.deal:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.deal.dragging { opacity: .45; }
.deal strong { color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.deal a { font-size: 13px; }
.deal .deal-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.deal .deal-meta b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 13px; }
.deal small { color: var(--faint); font-size: 12px; }
.lane[data-stage="won"] .deal { border-left: 3px solid var(--ok); }
.lane[data-stage="lost"] .deal { opacity: .7; }

dialog.modal.modal-wide { width: min(720px, calc(100% - 32px)); }
.badge-likely { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 1px 7px; border-radius: 99px; }
.today-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .today-strip { grid-template-columns: 1fr; } .kanban { grid-template-columns: repeat(5, 78vw); } }

a.card.today { display: flex; gap: 14px; align-items: center; color: inherit; padding: 16px 18px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
a.card.today:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.today .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.today b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.today small { color: var(--muted); font-size: 13px; }

.pmode label:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* ===================== v1.5 ===================== */
.small { font-size: 13px; } .mt-s { margin-top: 8px; } .stack { display: grid; gap: 16px; align-content: start; }
.danger-text { color: var(--bad) !important; }
.kpi.warn { border-color: color-mix(in oklab, var(--warn) 30%, white); background: linear-gradient(180deg, var(--warn-bg), var(--surface) 70%); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }

/* sidebar agency switcher (platform owner) */
.side-agency { display: grid; gap: 4px; }
.side-agency select { height: 34px; font-size: 13px; font-weight: 500; background: var(--surface); }

/* unlock bar, share link */
.reauth-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r-sm); background: var(--tint); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.reauth-bar span { display: inline-flex; gap: 8px; align-items: center; margin-right: auto; }
.reauth-bar input { width: 220px; height: 32px; font-size: 13px; }
.reauth-bar.ok { background: var(--ok-bg); border-color: color-mix(in oklab, var(--ok) 20%, white); color: var(--ok); }
.share-card { display: grid; gap: 10px; margin-bottom: 16px; border-color: var(--brand-line); background: var(--brand-soft); }
.share-card span.muted { display: block; font-size: 13px; }
.share-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.share-row input { flex: 1; min-width: 0; height: 34px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); }
.share-row.compact input { height: 30px; font-size: 12px; }

/* team table + row menu */
table.team tr.inactive td { opacity: .55; }
table.team .pill { margin-right: 4px; }
.row-actions { text-align: right; white-space: nowrap; }
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 6px; text-align: left; animation: pop .2s var(--ease); }
.menu-pop form { display: grid; }
.menu-pop button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.menu-pop button:hover:not(:disabled) { background: var(--tint); }
.menu-pop button:disabled { color: var(--faint); cursor: not-allowed; }
.menu-field { display: flex !important; gap: 6px; padding: 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.menu-field input { height: 32px; font-size: 13px; }
.menu-field button { background: var(--tint); }

/* choice cards (radio) */
fieldset.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.choice legend { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 6px; padding: 0; }
.choice-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.choice-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-opt input { margin-top: 3px; accent-color: var(--brand); }
.choice-opt strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.choice-opt small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* platform: agency cards */
.agency-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.agency-card { display: grid; gap: 14px; position: relative; overflow: hidden; }
.agency-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--ac, var(--brand)); }
.agency-card.current { box-shadow: 0 0 0 2px var(--ac), var(--shadow); }
.agency-card.paused { opacity: .7; }
.agency-card header { display: flex; align-items: center; gap: 12px; }
.agency-card header > div { flex: 1; min-width: 0; }
.agency-card h3 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agency-card header .muted { font-size: 12.5px; }
.agency-logo { height: 34px; width: 64px; object-fit: contain; object-position: left; }
.agency-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ac); color: #fff; font-weight: 650; font-size: 16px; flex: none; }
.agency-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.agency-stats div { display: grid; gap: 2px; }
.agency-stats dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.agency-stats dd { margin: 0; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 14px; }
.setup-meter { height: 4px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.setup-meter span { display: block; height: 100%; background: var(--ac, var(--brand)); border-radius: 99px; transition: width .6s var(--ease); }
.setup-label { font-size: 12px; margin-top: -8px; }
.agency-card footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.agency-card footer form:last-child { margin-left: auto; }
.agency-card.add { place-content: center; justify-items: center; min-height: 260px; border-style: dashed; color: var(--muted); font-weight: 500; box-shadow: none; background: transparent; }
.agency-card.add::before { display: none; }
.agency-card.add span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.agency-card.add:hover { color: var(--ink); border-color: var(--line-strong); }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--bad); }

/* onboarding wizard */
.onboard { display: grid; gap: 16px; max-width: 820px; }
.onboard-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding: 26px 28px; }
.onboard-step h2 { font-size: 18px; margin-bottom: 4px; }
.onboard-step .form-grid { margin-top: 16px; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.slug-field { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 0 0 12px; background: var(--surface); overflow: hidden; }
.slug-field .muted { font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.slug-field input { border: 0; box-shadow: none; flex: 1; min-width: 80px; }


.onboard-done { max-width: 620px; margin: 10px auto; text-align: center; padding: 40px 36px; display: grid; gap: 10px; justify-items: center; }
.onboard-done h2 { font-size: 24px; letter-spacing: -0.03em; }
.done-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; animation: pop .5s var(--ease); }
.onboard-share { width: 100%; text-align: left; display: grid; gap: 8px; margin-top: 10px; }
.form-actions.center { justify-content: center; }
.form-actions.left { justify-content: flex-start; }
.owner-only { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-sm); background: var(--tint); border: 1px dashed var(--line-strong); }
.owner-only .eyebrow { display: inline-flex; gap: 6px; align-items: center; }

/* dashboard setup checklist */
.setup-card { margin-bottom: 16px; padding: 24px 26px; position: relative; }
.setup-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.setup-head h2 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 4px; }
.setup-head p { margin: 0; }
.setup-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--tint) 0); }
.setup-ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 13px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.setup-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.setup-steps a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); transition: border-color .15s, background .15s, transform .2s var(--ease); }
.setup-steps a:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.setup-steps a > span:nth-child(2) { flex: 1; min-width: 0; }
.setup-steps strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.setup-steps small { display: block; font-size: 12.5px; color: var(--muted); }
.setup-steps .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.setup-steps li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-steps li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.setup-hide { position: absolute; right: 26px; bottom: 12px; font-size: 12.5px; }
.setup-hide .link-btn { color: var(--faint); }

/* account: two-step sign-in */
.account-grid { align-items: start; }
.totp-setup { display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 8px; }
.qr { width: 164px; height: 164px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.qr svg { width: 100%; height: 100%; }
code.key { display: block; margin-top: 6px; font: 600 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--ink); word-break: break-all; user-select: all; }
.code-input { font: 600 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; text-align: center; height: 50px; }
.codes-card { margin-bottom: 16px; border-color: color-mix(in oklab, var(--warn) 35%, white); }
ol.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
ol.codes li { font: 600 15px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 10px; background: var(--tint); border-radius: 8px; text-align: center; letter-spacing: .06em; }
.stack-form { display: grid; gap: 12px; }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-alt { margin-top: 10px !important; display: block !important; text-align: center; font-size: 13.5px; }
.auth-card .brand-logo.wordmark { margin-bottom: 26px; font-size: 20px; }

/* import: needs attention */
.attention { display: grid; gap: 8px; }
.attention h3 { font-size: 14px; margin-bottom: 2px; }
.attention.ok { padding: 14px 16px; border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.att-item { display: grid; gap: 2px; padding: 12px 14px 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); border-left: 3px solid var(--warn); color: var(--text); }
.att-item.bad { border-left-color: var(--bad); }
.att-item b { color: var(--ink); }
.att-item span { font-size: 13px; color: var(--muted); }
.att-item:hover { background: var(--tint); }

/* commissions: disputes */
.send-card { display: grid; gap: 8px; align-content: start; }
.send-card form { display: flex; gap: 8px; flex-wrap: wrap; }
.send-card .inline-form { display: flex; }
.send-card input[type=email] { height: 32px; font-size: 13px; flex: 1; min-width: 160px; }
.dispute-form { display: flex; gap: 6px; }
.dispute-form .mini { height: 30px; font-size: 12.5px; }
.dispute-form input.mini { width: 140px; }

/* client documents */
.docs-card .list li.doc-row { display: flex; align-items: center; gap: 8px; padding-right: 16px; }
.doc-row > a { display: grid; padding: 10px 22px; color: var(--text); min-width: 0; }
.doc-row > a:hover { background: var(--tint); }
.doc-row .t { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--ink); }
.doc-row .s { font-size: 12.5px; color: var(--muted); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 2px 10px; font: 500 12px var(--font); color: var(--muted); cursor: pointer; }
.chip.on { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 8px; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--bad-bg); color: var(--bad); }
.doc-add { padding: 12px 22px 18px; }
.doc-add > summary { list-style: none; display: inline-flex; }
.doc-add > summary::-webkit-details-marker { display: none; }
.doc-add form { margin-top: 14px; }
.counter { color: var(--muted); font-weight: 400; min-height: 1em; }

/* requests */
.request-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.request-card { display: grid; gap: 8px; align-content: start; }
.request-card header { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.request-card h3 { font-size: 17px; }
.request-card h3 a { color: var(--ink); }
.request-card p { margin: 4px 0 0; font-size: 14px; white-space: pre-line; }
.request-card footer { display: flex; gap: 8px; align-items: center; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.request-card footer form { margin-left: auto; }
.empty-state { text-align: center; padding: 56px 24px; display: grid; justify-items: center; gap: 8px; }
.empty-state .i { color: var(--faint); }
.empty-state h2 { font-size: 18px; }

/* licenses */
.ce-bar { width: 120px; height: 5px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.ce-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- client portal ---------- */
body.portal { background: var(--bg); }
.portal-top { display: flex; justify-content: space-between; align-items: center; padding: 18px max(16px, calc(50% - 400px)); background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: saturate(1.8) blur(16px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.portal-top .brand-logo { height: 32px; }
.portal-main { max-width: 800px; margin: 0 auto; padding: 44px 16px 64px; }
.portal-main h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.035em; }
.portal-main .lead { font-size: 17px; color: var(--muted); margin-top: 8px; }
.portal-section { margin-top: 40px; }
.portal-section h2 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 14px; }
.policy-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.policy-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.policy-tile strong { font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.policy-tile .muted { font-size: 13.5px; }
.policy-tile .term { margin-top: 8px; font-size: 13px; color: var(--brand); font-weight: 500; }
.doc-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.doc-list li + li { border-top: 1px solid var(--line); }
.doc-list a { display: flex; gap: 14px; align-items: center; padding: 14px 18px; color: var(--text); }
.doc-list a:hover { background: var(--tint); }
.doc-list .i { color: var(--brand); }
.doc-list strong { display: block; color: var(--ink); font-weight: 600; }
.doc-list small { color: var(--muted); }
.request-form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.request-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.request-kinds label { cursor: pointer; }
.request-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.request-kinds span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color .15s, background .15s, box-shadow .15s; }
.request-kinds strong { font-size: 14px; color: var(--ink); }
.request-kinds small { font-size: 12.5px; color: var(--muted); }
.request-kinds input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.request-kinds input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.request-form .btn { justify-self: start; height: 42px; padding: 0 22px; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.req-list li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.req-list li span:first-child { flex: 1; font-weight: 500; color: var(--ink); }
.portal-foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.portal-foot strong { color: var(--ink); width: 100%; }

@media (max-width: 760px) {
  .totp-setup { grid-template-columns: 1fr; }
  .onboard-step { grid-template-columns: 1fr; padding: 22px 18px; }
  .agency-stats { grid-template-columns: repeat(2, 1fr); }
  .reauth-bar input { width: 100%; }
  .setup-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .done-mark, .menu-pop { animation: none; } .setup-meter span { transition: none; } }
.card-warn { display: flex; gap: 8px; align-items: center; margin: -4px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 12.5px; font-weight: 500; }
.onboard label[data-show-when] { display: none; }
.onboard:has(input[name=setup][value=password]:checked) label[data-show-when=password] { display: grid; }
.card-head select.mini, .card-head .inline-form select { width: auto; min-width: 180px; height: 32px; font-size: 13px; }
table.team td.strong .pill { margin-left: 4px; vertical-align: 1px; }
.totp-setup form { display: grid; gap: 12px; justify-items: start; } .totp-setup form label.f { width: 100%; }
.setup-steps li { display: grid; } .setup-steps a { height: 100%; }
fieldset.choice { grid-template-columns: 1fr !important; }
.card-foot .share-row { flex: 1; max-width: 460px; }
.grid.top { align-items: start; }
.card-head .link-btn { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 500; }
