/* Page-level styles for the console (Overview, Activity, API keys, Models, Settings, Playground). */

/* ---------- Models catalogue ---------- */
.models-banner, .models-catalogue { overflow-wrap: anywhere; }
.models-catalogue { container: models / inline-size; }
.models-catalogue .check[hidden] { display: none; }
.models-catalogue .models-table { table-layout: fixed; }
.models-catalogue .models-model-col { width: 24%; }
.models-catalogue .models-short-col { width: 8%; }
.models-catalogue .models-action-col { width: 56px; }
.models-catalogue .models-table :is(th, td) { padding: 10px 6px; white-space: normal; }
.models-catalogue .models-table th { overflow-wrap: normal; text-wrap: balance; }
.models-catalogue .models-table td.m { font-size: 12px; }
.models-catalogue .models-table :first-child:is(th, td) { padding-inline-start: 16px; }
.models-catalogue .models-table :last-child:is(th, td) { padding-inline-end: 16px; }
.models-catalogue .models-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.models-catalogue .models-badges:empty { display: none; }
.models-catalogue .models-badges .badge { max-width: 100%; white-space: normal; line-height: 1.2; }
.models-catalogue .models-cards { display: none; }

@container models (max-width: 960px) {
  .models-catalogue .models-table { display: none; }
  .models-catalogue .models-cards { display: block; list-style: none; padding: 0; font-size: 13px; }
  .models-catalogue .models-cards > li { padding: 16px; }
  .models-catalogue .models-cards > li + li { border-top: 1px solid var(--line); }
  .models-catalogue .models-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .models-catalogue .models-card-head .btn { flex: none; min-width: 44px; min-height: 44px; }
  .models-catalogue .models-cards dl { margin-top: 12px; }
  .models-catalogue .models-cards dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding-block: 4px; }
  .models-catalogue .models-cards dt { color: var(--ink-3); }
  .models-catalogue .models-cards dd { margin: 0; text-align: end; }
}

/* ---------- Shared bits ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid-2, .grid-2.even { grid-template-columns: minmax(0, 1fr); } }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 520px) { .two { grid-template-columns: minmax(0, 1fr); } }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.filters .grow-1 { flex: 1 1 220px; min-width: 0; }
.filters .select { width: auto; min-width: 140px; max-width: 220px; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 9px; vertical-align: 0; }
.stack-sm { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.stack-sm b { font-weight: 600; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
tr.total td { border-top: 1px solid var(--line-strong) !important; font-weight: 650; }
.stackbar { display: flex; gap: 2px; border-radius: 999px; overflow: hidden; background: var(--sunken); min-height: 6px; }
.stackbar > span { display: block; min-width: 2px; }
.progress.thin { height: 4px; }
.kv-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.kv-inline .mono { background: var(--sunken); padding: 3px 8px; border-radius: 6px; }
.kv-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; font-size: 13px; }
.kv-row + .kv-row { border-top: 1px solid var(--line); }
.kv-row dt { color: var(--ink-3); }
.kv-row dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.keycell { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.keycell.lg { gap: 12px; }
.keycell.lg .avatar { width: 34px; height: 34px; font-size: 12.5px; border-radius: 10px; }
.spark { display: block; width: 100%; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s var(--ease); }
.kpi:hover { border-color: var(--line-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.kpi-value { font: 650 28px/1.15 var(--sans); letter-spacing: -.03em; margin-top: 2px; }
.kpi-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); min-height: 20px; margin-bottom: 4px; }
.kpi .spark { height: 34px; margin-top: 2px; }
.kpi .stackbar, .kpi .progress { margin-top: 6px; }
.delta { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.good { background: var(--ok-soft); color: var(--ok); }
.delta.warn { background: var(--warn-soft); color: var(--warn); }
.delta.flat { background: var(--sunken); color: var(--ink-3); }

/* ---------- Traffic chart ---------- */
.chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: 190px auto; column-gap: 8px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font: 11px var(--mono); color: var(--ink-3); padding: 0 0 0; transform: translateY(-6px); height: calc(100% + 12px); }
.chart-plot { position: relative; height: 100%; }
.chart-plot .grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.chart-plot .g0 { top: 0; } .chart-plot .g1 { top: 50%; } .chart-plot .g2 { top: 100%; border-top: 1px solid var(--line-strong); }
.chart .bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart .bar { position: relative; flex: 1 1 0; min-width: 2px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.chart .bar::before { content: ""; position: absolute; inset: 0 -1px; border-radius: 4px; transition: background-color .12s var(--ease); }
.chart .bar:hover::before { background: var(--hover); }
.chart .bar span { position: relative; display: block; width: 100%; }
.chart .bar .ok { background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .5s var(--ease); }
#ovChart[data-metric="requests"] .bar .ok { background: var(--ok); }
#ovChart[data-metric="tokens"] .bar .ok { background: var(--c-in); }
.chart .bar .er { background: var(--bad); border-radius: 3px 3px 0 0; }
.chart .bar .zero { height: 2px; background: var(--line-strong); border-radius: 1px; }
.chart .bar:hover .ok { filter: brightness(1.12); }
.chart-x { display: flex; gap: 2px; margin-top: 10px; font: 11px var(--mono); color: var(--ink-3); }
.chart-x span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; white-space: nowrap; }
.chart-tip { position: absolute; top: 4px; z-index: 5; pointer-events: none; min-width: 150px; padding: 9px 11px; border-radius: 10px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-pop); font-size: 12px; line-height: 1.55; }
.chart-tip b { display: block; margin-bottom: 3px; font-weight: 650; }
.chart-tip div { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.chart-tip div span:first-child { opacity: .7; }

/* ---------- Overview cards ---------- */
.mixtable { margin-top: 12px; }
.mixtable th, .mixtable td { padding: 9px 0; }
.mixtable th { position: static; text-transform: none; letter-spacing: 0; font-size: 12px; }
.rank { display: flex; flex-direction: column; gap: 16px; }
.rank li { display: flex; gap: 12px; align-items: flex-start; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.rank-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cell-bar { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.cell-bar .mono { overflow: hidden; text-overflow: ellipsis; }
.feedlist li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; }
.feedlist li + li { border-top: 1px solid var(--line); }
.feedlist.bordered { border: 1px solid var(--line); border-radius: 10px; }
.feedlist.bordered li { padding: 10px 12px; }
.fl-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.4; }
.fl-main b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-main span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-end { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; line-height: 1.4; }
.fl-end .num { font-size: 12.5px; }

/* ---------- Activity ---------- */
.table td.clip.wide { max-width: 400px; }
.table-wrap.tall { max-height: min(640px, 68dvh); }
.t-abs { display: block; font-size: 12.5px; }
.t-rel { display: block; font-size: 11.5px; }
tr.fresh td { animation: fresh 1.8s var(--ease); }
@keyframes fresh { from { background: var(--accent-soft); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.fresh td { animation: none; } }
#acPause .nav-live { margin-right: 2px; }

/* ---------- API keys ---------- */
.keytable th, .keytable td { padding-left: 14px; padding-right: 14px; }
.keytable td { padding-top: 13px; padding-bottom: 13px; }
.keytable .stack-sm .mono { max-width: 176px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.keytable tr.off td { opacity: .62; }
.keytable tr.off td:last-child { opacity: 1; }
.usagecell { display: flex; align-items: center; gap: 12px; }
.usagecell .spark { width: 84px; height: 26px; }
.spendcell { display: flex; flex-direction: column; gap: 6px; min-width: 130px; }
.spendcell .progress { width: 100%; }
.keybox { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--sunken); }
.keybox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; user-select: all; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 5px 8px; cursor: text; height: auto; }
.chips-input:focus-within { border-color: var(--accent); outline: 2px solid var(--ring); outline-offset: 2px; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 9px; border-radius: 6px; background: var(--sunken); border: 1px solid var(--line); font-size: 12px; }
.tag button { display: grid; place-items: center; width: 18px; height: 18px; border: 0; background: transparent; border-radius: 4px; color: var(--ink-3); padding: 0; }
.tag button:hover { background: var(--hover); color: var(--ink); }
.chips-field { flex: 1 1 140px; min-width: 120px; border: 0; background: transparent; outline: none; padding: 4px 2px; font-size: 13px; }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drawer-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.drawer-stats span { font-size: 11.5px; }
.drawer-stats b { font-size: 16px; letter-spacing: -.02em; }
.drawer-spark .spark { height: 44px; }
.spark-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.spendbox { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.spendbox .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.spendbox .btn { align-self: flex-start; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--bad) 28%, var(--line)); border-radius: 10px; }
.danger-zone b { font-size: 13px; }
.danger-zone p { font-size: 12.5px; margin-top: 2px; }

/* ---------- Settings ---------- */
.settings-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } .subnav { position: static !important; flex-direction: row !important; overflow-x: auto; } }
.subnav { position: sticky; top: calc(var(--top-h) + 20px); display: flex; flex-direction: column; gap: 2px; }
.subnav a { padding: 7px 11px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--ink-3); white-space: nowrap; }
.subnav a:hover { background: var(--hover); color: var(--ink); }
.settings-cards { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-cards .card { scroll-margin-top: calc(var(--top-h) + 16px); }
.srows { padding: 4px 20px 6px; }
.srow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 8px 28px; align-items: start; padding: 16px 0; }
.srow + .srow { border-top: 1px solid var(--line); }
@media (max-width: 760px) { .srow { grid-template-columns: minmax(0, 1fr); } }
.stop { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.slabel { font-size: 12.5px; font-weight: 650; overflow-wrap: anywhere; }
.help { margin-top: 4px; font-size: 12.5px; color: var(--ink-3); max-width: 58ch; }
.sctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sline .input { flex: 1 1 160px; min-width: 0; width: auto; }
.sline .select { flex: 0 0 auto; width: auto; min-width: 130px; }
.unit { font-size: 12.5px; }
.fb { font-size: 12.5px; font-weight: 550; color: var(--ink-3); }
.fb:empty { display: none; }
.fb[data-tone="ok"] { color: var(--ok); }
.fb[data-tone="bad"] { color: var(--bad); }
/* model prices (Settings) and custom prices (Models) */
.pm-table th, .pm-table td { padding-left: 8px; padding-right: 8px; }
.pm-table th:first-child, .pm-table td:first-child { padding-left: 20px; }
.pm-table th:last-child, .pm-table td:last-child { padding-right: 20px; }
.pm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-actions:not(:has(button:not([hidden]))) { display: none; }
.pm-table .input-affix { width: 80px; margin-left: auto; }
.pm-table .input { padding: 5px 6px 5px 20px; font-size: 12.5px; text-align: right; }
.pm-table tr.pm-group td { background: var(--sunken); padding-top: 9px; padding-bottom: 9px; font-size: 12.5px; white-space: normal; }
.pm-table tr.pm-group b { margin-right: 10px; color: var(--ink); }
.pm-form { display: flex; flex-direction: column; gap: 14px; }
.pm-form-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pm-form .err:empty { display: none; }
.custom-price { color: var(--warn); font-weight: 650; }
#grp-env .code pre { max-height: 360px; overflow: auto; }

/* ---------- Playground ---------- */
.embed-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }

/* ---------- Usage (ported plugin page) ---------- */
.dsh-usage-container { max-width: none; gap: 20px; }
.dsh-usage-header { align-items: flex-end; }
.dsh-usage-title { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.dsh-usage-subtitle { font-size: 13.5px; margin-top: 4px; }
.dsh-usage-card, .dsh-usage-kpi-card, .dsh-usage-filters, .dsh-usage-empty { border-width: 1px; border-radius: var(--r-card); }
.dsh-usage-dashboard { font-family: var(--sans); font-size: 13px; }

/* ---------- Auth screens ---------- */
.btn.block { width: 100%; min-height: 40px; }
.login-card.wide { width: min(520px, 100%); }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.form-err { color: var(--bad); font-size: 13px; font-weight: 550; background: var(--bad-soft); padding: 9px 12px; border-radius: 8px; }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.done-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.done-icon .ico { width: 24px; height: 24px; }
.login-card .two { gap: 12px; }
.login-foot:empty { display: none; }

/* ---------- Users ---------- */
.seg-n { margin-left: 6px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.seg-n:empty { display: none; }
.pendinglist { margin-top: 14px; border-top: 1px solid var(--line); }
.pendinglist li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.pendinglist li + li { border-top: 1px solid var(--line); }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-note { font-size: 13px; color: var(--ink-2); font-style: italic; margin: 2px 0; }
.pl-act { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) { .pendinglist li { flex-wrap: wrap; } .pl-act { width: 100%; justify-content: flex-end; } }
.divider { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.radiocards { display: grid; gap: 8px; }
.radiocard { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; transition: border-color .14s var(--ease), background-color .14s var(--ease); }
.radiocard:hover { border-color: var(--ink-3); }
.radiocard:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radiocard input { margin-top: 3px; accent-color: var(--accent); }
.radiocard span { display: flex; flex-direction: column; gap: 2px; }
.radiocard small { color: var(--ink-3); font-size: 12.5px; }
.danger-zone.col { flex-direction: column; align-items: stretch; }
.dz-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Account ---------- */
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.stackform { display: flex; flex-direction: column; gap: 14px; }
.account-grid { align-items: start; }
.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.limits > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.limits b { font-size: 15px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.empty-ico.sm { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); color: var(--ink-3); flex-shrink: 0; }

.page-actions .select { width: auto; min-width: 150px; max-width: 220px; }

/* ---------- Subscriptions ---------- */
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: stretch; }
.sub-card { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; }
.sub-card[data-off="true"] { opacity: .72; }
.sub-head { display: flex; align-items: center; gap: 12px; }
.sub-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.35; }
.sub-title .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sub-name b { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-msg { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; background: var(--sunken); color: var(--ink-2); }
.sub-msg[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.sub-msg[data-tone="info"] { background: var(--info-soft); color: var(--info); }
.sub-msg .ico { margin-top: 2px; flex-shrink: 0; }
.sub-msg-note { font-size: 12.5px; margin-top: -6px; }
.sub-wins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.win { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.win-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.win-none { font-weight: 500; font-size: 12px; }
.win-top b { font-size: 12.5px; color: var(--ink); }
.win-sub { font-size: 11.5px; }
.sub-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.sub-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sub-stats dt { font-size: 11px; color: var(--ink-3); font-weight: 600; letter-spacing: .01em; }
.sub-stats dd { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.sub-stats dd { display: flex; flex-direction: column; }
.sub-stats dd small { font-size: 11px; font-weight: 500; font-family: var(--sans); letter-spacing: 0; }
.sub-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.sub-actions { display: flex; gap: 8px; }
.sub-note { font-size: 12.5px; margin-top: 4px; max-width: 80ch; }
@media (max-width: 480px) { .sub-wins { grid-template-columns: 1fr; } .sub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps { display: flex; flex-direction: column; gap: 14px; padding-left: 20px; font-size: 13.5px; line-height: 1.5; }
.steps li::marker { font-weight: 700; color: var(--accent-text); }
.steps .code { margin-top: 8px; }
.keypicks { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow: auto; }
.keypick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; width: 100%; }
.keypick + .keypick { border-top: 1px solid var(--line); }
.keypick:hover { background: var(--hover); }
details.adv > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 550; }
details.adv > summary:hover { color: var(--ink); }
.radiocard b .badge { margin-left: 8px; font-style: normal; vertical-align: 1px; }
.kp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.kp-prefix { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-now { font-size: 12px; text-align: right; max-width: 42%; }
.steps .code pre, .drawer .code pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px 84px 14px 16px; }

/* ---------- Subscriptions: providers + pools ---------- */
.badge.prov { background: var(--sunken); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.badge.prov[data-provider="anthropic"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.badge.prov[data-provider="openai"] { background: var(--info-soft); color: var(--info); box-shadow: none; }
.sub-name .badge { flex-shrink: 0; }
.sub-pool { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: -6px 0 -4px; font-size: 12px; }
.sub-pool .grow { flex: 1; }
.mv { display: inline-flex; gap: 2px; }
.mv .btn { width: 26px; min-height: 26px; }
.ico.up { transform: rotate(180deg); }
.sub-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.sub-toolbar h2 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; margin-top: 16px; }
.pool-grid:empty { display: none; }
.pool-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.pool-card[data-off="true"] .pool-fields, .pool-card[data-off="true"] .pool-members, .pool-card[data-off="true"] > .check { opacity: .6; }
.pool-head { display: flex; align-items: center; gap: 12px; }
.pool-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.pool-head b { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.pool-ico { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.pool-card[data-pool="openai"] .pool-ico { background: var(--info-soft); color: var(--info); }
.pool-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; background: var(--sunken); color: var(--ink-2); }
.pool-status[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.pool-fields { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
.pool-fields .hint { font-size: 11.5px; line-height: 1.4; }
.pool-card > .check { font-size: 12.5px; }
.pool-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; }
.pool-members li { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 6px 4px 12px; font-size: 12.5px; }
.pool-members li + li { border-top: 1px solid var(--line); }
.pm-n { width: 16px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pool-empty { font-size: 12.5px; }
.radiocards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .radiocards.cols-2, .pool-fields { grid-template-columns: minmax(0, 1fr); } }
.login-open, .login-paste { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.login-paste .input { flex: 1 1 260px; }
.login-tip { font-size: 12px; margin-top: 6px; }
.login-wait { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.login-wait .spin { animation: spin .8s linear infinite; }
.relogin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.sub-restore { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 12.5px; color: var(--ink-2); }
.sub-restore > span { flex: 1; min-width: 0; }

.provider-tabs button[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 -2px var(--accent); }
#mHiddenLabel[hidden] { display: none; }
