/* Dashboard-specific layout. Tokens and components come from /ui.css. */

.boot { min-height: 100vh; display: grid; place-items: center; opacity: .7; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 22px; }
.auth-card h1 { font-size: 26px; }
.auth-card form { display: grid; gap: 14px; }
.auth-side { position: relative; overflow: hidden; background: var(--bg-2); border-left: 1px solid var(--border); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side::before { content: ''; position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.auth-side > * { position: relative; }
.auth-side h2 { font-size: 30px; max-width: 460px; }
.auth-points { display: grid; gap: 14px; margin-top: 28px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); max-width: 440px; }
.auth-point svg { color: var(--accent); flex: none; margin-top: 3px; }
.auth-point b { color: var(--text); font-weight: 600; }
.auth-foot { font-size: 13px; color: var(--text-3); }
.form-error { padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 13.5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-right: 1px solid var(--border); background: var(--bg-2); overflow-y: auto; }
.sidebar .logo { padding: 6px 8px 10px; }
.org-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); }
.org-switch:hover { border-color: var(--border-strong); }
.org-avatar { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: white; flex: none;
  background: var(--accent); }
.org-switch .meta { min-width: 0; flex: 1; line-height: 1.25; }
.org-switch .meta b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-switch .meta span { font-size: 11.5px; color: var(--text-3); text-transform: capitalize; }
.nav { display: grid; gap: 2px; margin-top: 10px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.nav a.active svg { color: var(--accent); }
.nav a .count { margin-left: auto; font-size: 11px; color: var(--text-3); }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; }
.balance-mini { padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: grid; gap: 6px; }
.balance-mini .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text-3); }
.balance-mini b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; }
.user-btn:hover { background: var(--surface-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--accent-soft); color: var(--accent); flex: none; }
.user-btn .meta { min-width: 0; line-height: 1.25; }
.user-btn .meta b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-btn .meta span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 28px; border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 85%, transparent); backdrop-filter: blur(12px); }
.topbar .crumb { font-weight: 600; font-size: 14.5px; }
.topbar .spacer { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-3); cursor: pointer; font-size: 13px; min-width: 220px; }
.search-btn:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-btn kbd { margin-left: auto; }
.icon-btn { position: relative; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn .pip { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }
.menu-btn { display: none; }
.content { padding: 28px; max-width: 1240px; width: 100%; margin: 0 auto; display: grid; gap: 22px; align-content: start; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--text-2); margin-top: 4px; max-width: 640px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .shell.drawer-open .sidebar { transform: none; }
  .shell.drawer-open::after { content: ''; position: fixed; inset: 0; z-index: 50; background: rgba(6, 8, 14, .45); }
  .menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .search-btn { min-width: 0; width: 34px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .content { padding: 20px 16px; }
}

/* ---------- popovers ---------- */
.popover { position: fixed; z-index: 80; min-width: 240px; max-width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s var(--ease); }
.popover .item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 13.5px; text-align: left; color: var(--text); }
.popover .item:hover, .popover .item:focus-visible { background: var(--surface-2); }
.popover .item svg { color: var(--text-3); }
.popover .sep { height: 1px; background: var(--border); margin: 6px 0; }
.popover .head { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.popover .check { margin-left: auto; color: var(--accent); }
.notif { padding: 10px; border-radius: 8px; display: grid; gap: 2px; font-size: 13px; }
.notif.unread { background: var(--accent-soft); }
.notif span { font-size: 11.5px; color: var(--text-3); }

/* ---------- command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 95; background: rgba(6, 8, 14, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s; }
.palette-box { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .15s var(--ease); }
.palette-box input { width: 100%; height: 52px; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 0 18px; font-size: 15px; outline: none; }
.palette-list { max-height: 360px; overflow: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.palette-item.sel { background: var(--surface-2); color: var(--text); }
.palette-item .hint-right { margin-left: auto; font-size: 12px; color: var(--text-3); }

/* ---------- stats ---------- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.stat { padding: 18px 20px; display: grid; gap: 6px; }
.stat .k { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.stat .k svg { color: var(--text-3); }
.stat .v { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .s { font-size: 12.5px; color: var(--text-3); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .5s var(--ease); }
.progress.warn i { background: var(--warn); }
.progress.bad i { background: var(--bad); }

/* ---------- charts ---------- */
.chart-card { padding: 18px 20px 14px; display: grid; gap: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.chart-head h3 { font-size: 15px; }
.chart-head .big { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 550; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--accent); transition: opacity .12s; }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .bar-hit:hover + .bar, .chart .bar.hover { opacity: .75; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 9px; background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.4; white-space: nowrap; transform: translate(-50%, -100%); box-shadow: var(--shadow); }
.chart-tip b { font-size: 13px; display: block; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; align-items: center; }
.hbar .name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.hbar .name.host { text-transform: none; }
.hbar .val { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.hbar .track { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

/* ---------- checklist ---------- */
.checklist { display: grid; gap: 4px; }
.check-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-size: 14px; }
.check-item:hover { background: var(--surface-2); }
.check-item .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; color: transparent; }
.check-item.done { color: var(--text-3); }
.check-item.done .tick { background: var(--ok); border-color: var(--ok); color: white; }
.check-item.done .label { text-decoration: line-through; text-decoration-color: var(--border-strong); }
.check-item .go { margin-left: auto; color: var(--text-3); }

/* ---------- misc ---------- */
.empty { padding: 48px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; color: var(--text-2); }
.empty .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty h3 { font-size: 16px; color: var(--text); }
.empty p { max-width: 380px; font-size: 14px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { height: 34px; font-size: 13px; width: auto; }
.toolbar .grow { flex: 1; }
.cell-url { max-width: 380px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-sub { font-size: 12px; color: var(--text-3); }
.tier { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.tier::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--text-3); }
.tier.playbook::before, .tier.social::before { background: var(--accent); }
.tier.cache::before { background: var(--ok); }
.tier.browser::before, .tier.fortress::before { background: var(--warn); }
.tier.failed::before { background: var(--bad); }
.clickable { cursor: pointer; }
.key-reveal { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--mono); font-size: 13px; word-break: break-all; }
.key-reveal span { flex: 1; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.notice svg { flex: none; margin-top: 2px; color: var(--info); }
.notice.warn svg { color: var(--warn); }
.notice b { color: var(--text); }
.settings-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: 0; }
.settings-row h4 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.settings-row p { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.settings-row .ctl { display: grid; gap: 10px; align-content: start; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline .input { flex: 1; min-width: 140px; }
@media (max-width: 760px) { .settings-row { grid-template-columns: 1fr; gap: 12px; } }
.prefix-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); padding-left: 12px; }
.prefix-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.prefix-input span { color: var(--text-3); font-size: 14px; }
.prefix-input input { border: 0; height: 38px; flex: 1; min-width: 0; padding: 0 12px 0 4px; background: transparent; outline: none; font-size: 14px; }
.amounts { display: flex; gap: 8px; flex-wrap: wrap; }
.amounts button { height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.amounts button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.balance-hero { padding: 26px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.balance-hero::before { content: ''; position: absolute; inset: 0; background: var(--glow); opacity: .8; pointer-events: none; }
.balance-hero > * { position: relative; }
.balance-hero .amt { font-size: 40px; font-weight: 650; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 6px; }
.role-desc { display: grid; gap: 8px; }
.role-desc div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.role-desc b { color: var(--text); text-transform: capitalize; font-weight: 600; }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 85; background: rgba(6, 8, 14, .4); animation: fade .15s; }
.drawer { position: fixed; z-index: 86; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slide .22s var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 20px; overflow: auto; display: grid; gap: 16px; align-content: start; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; }

/* ---------- playground ---------- */
.pg { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pg { grid-template-columns: 1fr; } }
.pg-form { padding: 20px; display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip svg { color: var(--text-3); }
.adv summary { cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 550; list-style: none; display: flex; align-items: center; gap: 6px; }
.adv summary::-webkit-details-marker { display: none; }
.adv[open] summary svg { transform: rotate(180deg); }
.adv .body { display: grid; gap: 12px; margin-top: 12px; }
.pg-out { display: grid; gap: 16px; }
.ladder { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rung { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--text-3); background: var(--surface); transition: all .2s; }
.rung.trying { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 50%, transparent); background: var(--warn-soft); }
.rung.trying .dot { animation: pulse 1s infinite; }
.rung.blocked { color: var(--bad); background: var(--bad-soft); border-color: transparent; text-decoration: line-through; }
.rung.win { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in oklab, var(--ok) 40%, transparent); font-weight: 600; }
.rung.skip { opacity: .45; }
.rung-sep { color: var(--text-3); font-size: 11px; }
.receipt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.receipt div { padding: 14px 20px; display: grid; gap: 2px; border-right: 1px solid var(--border); }
.receipt div:last-child { border-right: 0; }
.receipt small { font-size: 12px; color: var(--text-3); }
.receipt b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .receipt { grid-template-columns: 1fr 1fr; } .receipt div:nth-child(2) { border-right: 0; } .receipt div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }
.timeline { list-style: none; margin: 0; padding: 14px 20px; display: grid; gap: 2px; font-size: 13px; max-height: 300px; overflow: auto; }
.timeline li { display: grid; grid-template-columns: 54px 18px minmax(0, 1fr); gap: 8px; align-items: start; padding: 4px 0; animation: fade .2s; }
.timeline .t { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); padding-top: 1px; }
.timeline .ic { display: grid; place-items: center; padding-top: 2px; }
.timeline .ok { color: var(--ok); } .timeline .bad { color: var(--bad); } .timeline .warn { color: var(--warn); } .timeline .info { color: var(--text-2); }
.result-code { max-height: 460px; }
.code-tabs { display: flex; gap: 2px; padding: 6px 6px 0; background: var(--code-bg); border-radius: var(--radius) var(--radius) 0 0; }
.code-tabs button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px 7px 0 0; background: transparent; color: var(--text-3); font-size: 12.5px; cursor: pointer; }
.code-tabs button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.code.tabbed { border-top-left-radius: 0; border-top-right-radius: 0; }
.tooltip-wrap { position: relative; display: inline-flex; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30;
  padding: 6px 9px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; }
[data-tip] { position: relative; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }

/* overflow guards: grid tracks must not grow to fit long code/emails */
.content, .pg-out, .sidebar-foot, .chart-card, .pg-form { grid-template-columns: minmax(0, 1fr); }
.sidebar > * { min-width: 0; }
.org-switch .meta span { text-transform: none; }
#content:focus { outline: none; }
.toolbar .grow { min-width: 0; flex: 1 1 200px; }
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 22px; }
  .page-head h1 { font-size: 21px; }
  .toolbar .select { max-width: 100% !important; flex: 1 1 100%; }
  .chart-card { padding: 16px 14px 10px; }
}
/* rounded corners for tables that sit flush inside cards */
.card > .table-wrap:first-child .table thead th:first-child, .card > .table:first-child thead th:first-child { border-top-left-radius: var(--radius-lg); }
.card > .table-wrap:first-child .table thead th:last-child, .card > .table:first-child thead th:last-child { border-top-right-radius: var(--radius-lg); }
.tier.plain { font-family: var(--font); font-size: 13.5px; color: var(--text); }
#quote { flex: 1 1 140px; min-width: 0; }
.pg-form > .inline:last-child { flex-wrap: nowrap; }
@media (max-width: 480px) { .pg-form > .inline:last-child { flex-wrap: wrap; } .pg-form #run { width: 100%; } }

/* ---------- light design pass (matches the canvas dashboard) ---------- */
.code-tabs { border: 1px solid var(--code-border); border-bottom: 0; }
.sidebar { background: var(--bg-2); }
.sidebar .logo { font-size: 16px; }
.nav a { height: 40px; border-radius: 10px; border: 1px solid transparent; }
.nav a.active { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: none; border-color: transparent; }
.nav a.active svg { color: var(--accent); }
.org-switch { border-radius: 12px; min-height: 48px; }
.org-avatar { border-radius: 8px; }
.balance-mini { border-radius: 14px; }
.topbar { background: color-mix(in oklab, var(--bg) 90%, transparent); }
.search-btn, .icon-btn { border-radius: 99px; }
.search-btn { padding: 0 14px; }
.card { border-radius: 16px; }
.page-head h1 { font-size: 26px; letter-spacing: -0.03em; font-weight: 650; }
.stat .v { font-size: 28px; }
.prefill-note { margin-top: 12px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; }
.prefill-note svg { color: var(--accent); flex: none; }
.auth-side { background: var(--bg-2); }
.auth-side::before { background: radial-gradient(60% 50% at 30% 0%, var(--accent-soft), transparent 70%); }
.palette, .drawer-backdrop { background: rgba(11, 13, 18, .35); }
.shell.drawer-open::after { background: rgba(11, 13, 18, .35); }
/* primary actions are dark pills, like the marketing site */
.shell .btn-accent, .auth .btn-accent { background: var(--ink); color: var(--ink-text); box-shadow: none; }
.shell .btn-accent:hover, .auth .btn-accent:hover { background: var(--ink); filter: none; opacity: .86; }
@media (max-width: 960px) { .search-btn { padding: 0; width: 36px; min-width: 0; } }

/* site access / policy */
.tier.policy::before { background: var(--warn); }
.policy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.policy-list li { display: flex; gap: 10px; align-items: flex-start; }
.policy-list svg { flex: none; margin-top: 2px; color: var(--text-3); }
.seg button:disabled { cursor: not-allowed; opacity: .6; }
.policy-note { margin-bottom: 4px; }
#pol-add .input { min-width: 160px; }

/* ---------- account: verification banner, auth outcomes ---------- */
.verify-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--border);
  background: var(--warn-soft); color: var(--text); font-size: 14px; }
.verify-banner svg { color: var(--warn); flex: none; }
.verify-banner span { flex: 1 1 260px; }
.verify-banner .btn { margin-left: auto; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.small-link { font-size: 13px; font-weight: 500; }
.turnstile-slot { min-height: 65px; }
.auth-done { display: grid; gap: 14px; justify-items: start; }
.auth-done h1 { margin: 4px 0 0; }
.done-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.done-ic.ok { background: var(--ok-soft); color: var(--ok); }
.done-ic.bad { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 640px) { .verify-banner { padding: 10px 16px; } .verify-banner .btn { margin-left: 0; } }
