/* Variable face sourced from Google Fonts; served locally with its OFL license. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('/assets/fonts/BricolageGrotesque.ttf') format('truetype'); font-weight: 200 800; font-style: normal; font-display: swap; }
/* SnapBoost — dark, compact, progress-first. */
:root {
  --bg: #111315;
  --panel: #191c20;
  --panel-2: #22262b;
  --line: #343a40;
  --text: #f1f2ed;
  --muted: #a6adb4;
  --accent: #eee83d;
  --accent-2: #eee83d;
  --ok: #9aceb0;
  --err: #ff9ba9;
  --warn: #edc57e;
  --radius: 12px;
  --workspace-width: 1200px;
  --page-gutter: 24px;
  --shell-inset: 24px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --motion-fast: 120ms;
  --motion-state: 200ms;
  --motion-view: 220ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 'Bricolage Grotesque', sans-serif;
  font-optical-sizing: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-2); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
:where(button[data-go]) { appearance: none; border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
h1 { font-size: clamp(38px, 4.2vw, 48px); line-height: 1.08; font-weight: 800; margin: 0 0 12px; letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 750; margin: 0 0 18px; letter-spacing: -.015em; }
h3 { font-size: 15px; font-weight: 750; margin: 24px 0 10px; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.center { text-align: center; }
.grad { color: var(--accent); }
.neg { color: var(--err); }
.pos { color: var(--ok); }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 32px;
  width: min(var(--workspace-width), calc(100% - var(--page-gutter) * 2)); margin: 24px auto 0;
  padding: 10px var(--shell-inset); min-height: 64px;
  border: 1px solid var(--line); border-radius: 18px;
  background: #0b0c0d;
  position: sticky; top: 16px; z-index: 20;
  box-shadow: 0 8px 28px #0003;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 18px; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.bolt { color: var(--accent); }
.topbar nav { display: flex; align-items: center; gap: 8px; flex: 1; position: relative; isolation: isolate; }
.nav-highlight { position: absolute; left: 0; background: #eee83d10; border-radius: 9px; transform-origin: left center; pointer-events: none; z-index: -1; }
.topbar nav.nav-slider-ready > button[aria-current="page"] { background: transparent; }
.topbar nav button, .nav-more summary { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; border-radius: 9px; cursor: pointer; }
.topbar nav button[aria-current="page"] { color: var(--accent); background: #eee83d10; }
.topbar nav button:hover { color: var(--text); text-decoration: none; }
.topbar nav button.admin-link { color: var(--warn); }
.topbar-right { display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--line); padding-left: 20px; }
.account-balance, .account-name { color: var(--muted); font-size: 12px; white-space: nowrap; }
.account-balance strong { color: var(--text); margin-left: 4px; font-weight: 600; }
.account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.topbar-right .btn { font-size: 12px; padding: 7px 10px; }
.nav-more { position: relative; }
.nav-more summary { list-style: none; gap: 7px; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.nav-more[open] summary, .nav-more summary:hover { color: var(--text); background: var(--panel); }
.nav-menu { position: absolute; top: calc(100% + 12px); left: 0; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #0b0c0d; box-shadow: 0 12px 24px #0006; }
.topbar .nav-menu button { display: flex; width: 100%; }
.topbar .nav-menu button:hover { background: var(--panel); }
.nav-dashboard { color: var(--text); font-size: 13px; font-weight: 650; padding: 8px 10px; border-radius: 9px; }
.nav-dashboard[aria-current="page"] { color: var(--accent); background: #eee83d10; }
.account-menu .nav-account { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 13px; font-weight: 750; }
.account-menu .nav-menu { left: auto; right: 0; width: 240px; max-width: calc(100vw - 48px); }
.account-menu-identity { padding: 10px 12px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.account-menu-identity strong, .account-menu-identity span { display: block; overflow-wrap: anywhere; }
.account-menu-identity span { margin-top: 4px; font-size: 12px; color: var(--muted); }
.account-menu-links { display: grid; gap: 2px; padding-block: 4px 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.account-menu .account-menu-link { color: var(--text); font-weight: 500; }
.nav-logout { display: block; margin: 0; }
.account-menu .nav-action { min-height: 44px; justify-content: flex-start; }
.nav-action { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; font: inherit; color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; }
.nav-action:hover { background: #eee83d10; }
.nav-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0;
  border-radius: 4px; padding: 3px 6px; font-size: 12.5px; color: var(--muted);
}
.chip.ghost { background: transparent; }
.chip strong { color: var(--text); }
.chip.status { font-size: 12px; font-weight: 550; }
.chip.status.queued     { color: var(--muted); }
.chip.status.running    { color: #06121a; background: var(--accent-2); border-color: var(--accent-2); }
.chip.status.completed  { color: var(--ok); background: transparent; }
.chip.status.failed     { color: #2a0710; background: var(--err); border-color: var(--err); }
.chip.status.canceled   { color: var(--muted); background: transparent; }
.chip.status.paused     { color: #2a1a02; background: var(--warn); border-color: var(--warn); }

/* ---- layout ---- */
.wrap { flex: 1; width: min(var(--workspace-width), calc(100% - var(--page-gutter) * 2)); padding-inline: var(--shell-inset); margin: 40px auto 64px; }
.foot {
  border-top: 1px solid var(--line);
  padding: 18px 26px 26px; color: var(--muted); font-size: 12.5px;
}
.foot p { margin: 4px 0; max-width: 900px; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.page-head p, .empty-state p { max-width: 70ch; }
.table-scroll { position: relative; overflow-x: auto; }
.admin-credit { min-width: 130px; }
.admin-credit summary { color: var(--accent); cursor: pointer; padding: 10px 0; }
.admin-credit form { width: 230px; padding: 10px 0; }
.admin-credit label { margin-bottom: 12px; }
.admin-credit input { width: 100%; }
.admin-debit summary { color: var(--text); }
.admin-adjustment-note { max-width: 32ch; overflow-wrap: anywhere; }
.amount-options { border: 0; margin: 0 0 16px; padding: 0; }
.amount-options legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.account-help { margin: 20px 0; }
.account-help summary { color: var(--muted); cursor: pointer; min-height: 36px; display: list-item; }
.account-help[open] summary { margin-bottom: 16px; color: var(--text); }
.account-help p { max-width: 70ch; }
.diagnostic { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
}
.card.accent { border-color: var(--line); }
.card.narrow { max-width: 480px; margin: 60px auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.1fr .95fr; gap: 36px; align-items: start; }
.hero h1 { font-size: clamp(42px, 5vw, 60px); line-height: 1.08; }
.lede { color: var(--muted); font-size: 16.5px; max-width: 54ch; }
.feature-grid { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature-grid li { border-top: 1px solid var(--line); padding: 14px 0; }
.feature-grid strong { display: block; font-size: 13.5px; color: var(--accent-2); }
.feature-grid span { font-size: 12.5px; color: var(--muted); }
.auth-cards { display: grid; gap: 16px; }
.signup-terms { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.6; cursor: pointer; }
.signup-terms input[type=checkbox] { margin: 2px 0 0; border-radius: 5px; }
.signup-terms a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.signup-terms:hover { border-color: var(--muted); }
.signup-terms:has(input:checked) { border-color: var(--accent); }
.signup-terms:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.signup-terms-note { color: var(--muted); margin: 0 0 20px; font-size: 12px; line-height: 1.6; }
.terms-page { max-width: 74ch; margin: 0 auto; padding-bottom: 32px; }
.terms-page h1 { margin-bottom: 12px; }
.terms-page .terms-date { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.terms-page section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.terms-page h2 { font-size: 21px; margin-bottom: 12px; }
.terms-page p, .terms-page li { line-height: 1.75; color: var(--muted); }
.terms-page a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.signup-terms-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.policy-links { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-bottom: 32px; font-size: 12px; color: var(--muted); }
.policy-links a { text-decoration: underline; text-underline-offset: 3px; }
.admin-access { min-width: 160px; max-width: 300px; }
.admin-access summary { cursor: pointer; }
.admin-access p { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }

.auth-verification { margin: 0 0 16px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-verification[hidden] { display: none; }
.auth-verification-status { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-verification-widget { display: flex; justify-content: center; min-width: 0; }
.auth-verification-widget > div { max-width: 100%; }

/* ---- forms ---- */
.account-settings { max-width: 1060px; margin-inline: auto; }
.account-settings .page-head { padding-bottom: 28px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.settings-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 28px 72px; padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.settings-section h2, .backup-reveal h2 { font-size: 23px; margin: 0 0 10px; }
.settings-section > div > p { margin: 0; color: var(--muted); max-width: 48ch; line-height: 1.65; }
.settings-control { min-width: 0; }
.settings-control .settings-value { margin: 0 0 12px; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.settings-disclosure + .settings-disclosure { margin-top: 20px; }
.settings-disclosure > summary { cursor: pointer; color: var(--accent); padding: 10px 0; min-height: 44px; }
.settings-disclosure[open] > summary { margin-bottom: 14px; }
.settings-control p, .backup-reveal p { line-height: 1.6; }
.settings-control p strong { overflow-wrap: anywhere; }
.settings-control .field-hint, .field-hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 8px 0 18px; }
.settings-secondary { margin-top: 20px; }
.security-on { color: var(--accent); }
.settings-delete > div > h2, .settings-delete summary { color: #ff9bad; }
.setup-instructions { padding-left: 20px; color: var(--muted); line-height: 1.65; }
.setup-instructions li + li { margin-top: 8px; }
.mfa-qr { display: block; width: 280px; max-width: 100%; height: auto; margin: 16px 0; background: #fff; image-rendering: pixelated; }
.mfa-qr[hidden] { display: none; }
.backup-reveal { padding: 28px; margin: 28px 0 0; background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; }
.backup-reveal p { max-width: 70ch; }
.backup-code-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; padding: 8px 0 16px; list-style: none; font-size: 16px; font-variant-numeric: tabular-nums; }
.backup-code-list code { overflow-wrap: anywhere; }
.second-factor-page { max-width: 470px; margin: 48px auto; }
.second-factor-page h1 { font-size: clamp(30px, 5vw, 44px); }
.second-factor-page > p { color: var(--muted); line-height: 1.65; margin-bottom: 26px; }
.second-factor-back { display: inline-block; margin-top: 24px; }
.auth-recovery-link { text-align: right; font-size: 13px; margin: -4px 0 20px; }
.recovery-page { max-width: 480px; margin: 40px auto 64px; }
.recovery-page h1 { font-size: 38px; line-height: 1.15; margin-bottom: 18px; }
.recovery-page > p { color: var(--muted); line-height: 1.65; margin-bottom: 24px; }
.recovery-page strong { overflow-wrap: anywhere; }
.recovery-page form { margin-top: 28px; }
.recovery-back { display: block; width: fit-content; margin-top: 24px; font-size: 14px; }
@media (max-width: 640px) {
  .settings-section { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
  .account-settings .page-head { padding-bottom: 22px; }
  .recovery-page { margin-top: 28px; }
  .recovery-page h1 { font-size: 32px; }
  .backup-reveal { padding: 20px; }
  .backup-code-list { grid-template-columns: 1fr; }
  .settings-control .btn { max-width: 100%; white-space: normal; }
}
label { display: block; font-size: 13px; color: var(--text); margin-bottom: 16px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  display: block; width: 100%; margin-top: 6px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font-size: 14.5px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--bg); background: var(--accent); }
input, textarea { caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
* { scrollbar-color: #4a525a var(--bg); scrollbar-width: thin; }
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.check input { margin-top: 3px; }
.input-row { display: flex; align-items: center; gap: 10px; }
.input-row input { flex: 1; }

/* ---- custom select (see assets/custom-select.js) ---- */
.cselect { position: relative; margin-top: 6px; }
.cselect > select { display: none; }
.cselect-field { min-width: 0; }
.cselect-button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 46px; margin: 0;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 12px; font: inherit; font-size: 14.5px; text-align: left; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.cselect-button:hover:not(:disabled) { background: #171a1e; border-color: #4a525c; }
.cselect[data-open="true"] .cselect-button { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(238,232,61,.08); }
.cselect-button:disabled { opacity: .5; cursor: not-allowed; }
.cselect-caption { display: block; }
.cselect-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect.is-empty .cselect-value { color: var(--muted); }
.cselect-chevron {
  flex: 0 0 auto; width: 18px; height: 18px; color: var(--muted);
  transition: transform var(--motion-state) var(--ease-out), color var(--motion-fast) ease;
}
.cselect[data-open="true"] .cselect-chevron { transform: rotate(180deg); color: var(--accent); }

.cselect-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  min-width: 100%; width: max-content; max-width: min(420px, 92vw);
  margin: 0; padding: 6px; list-style: none;
  max-height: min(320px, 45vh); overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(.985); transform-origin: top center;
  transition: opacity .16s ease, transform .22s cubic-bezier(.22,1,.36,1), visibility 0s linear .22s;
}
.cselect[data-open="true"] .cselect-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .18s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility 0s;
}
.cselect-menu:focus { outline: none; }
.cselect-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 7px; font-size: 14px; cursor: pointer;
  opacity: 0; transform: translateY(-5px);
  transition: opacity .22s ease, transform .26s cubic-bezier(.22,1,.36,1), background .14s ease, color .14s ease;
  transition-delay: calc(min(var(--i, 0), 5) * 12ms);
}
.cselect[data-open="true"] .cselect-option { opacity: 1; transform: none; }
.cselect-option.is-placeholder { color: var(--muted); }
.cselect-option.is-active { background: #2e343b; }
.cselect-option.is-selected { color: var(--accent); }
.cselect-option.is-selected::after {
  content: "✓"; margin-left: auto; font-size: 13px;
  opacity: 0; transform: scale(.5) rotate(-12deg);
  transition: opacity .12s ease, transform .2s var(--ease-out);
}
.cselect[data-open="true"] .cselect-option.is-selected::after { opacity: 1; transform: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 16px; font: inherit; font-size: 13px; font-weight: 700; min-height: 40px;
  cursor: pointer; transition: transform var(--motion-fast) var(--ease-out), background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}
.btn:hover { background: #30353b; text-decoration: none; }
.btn.primary:hover { background: #faf55d; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #141400; border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 92, 122, .12); border-color: rgba(255,92,122,.4); color: var(--err); }
.btn.danger:hover:not(:disabled) { background: rgba(255,92,122,.2); }
.proxy-bulk { margin: 24px 0 10px; }
.proxy-bulk-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.proxy-select-all, .proxy-row-select { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.proxy-select-all { min-height: 44px; font-size: 13px; }
.proxy-select-all input, .proxy-row-select input { width: 17px; height: 17px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.proxy-bulk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proxy-bulk-toolbar .proxy-bulk-actions { margin-left: auto; }
.proxy-delete-confirm:not([hidden]) { margin-top: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.proxy-delete-confirm p { margin: 0 0 10px; }
.proxy-delete-confirm [data-proxy-delete-message] { font-weight: 700; }
.proxy-removal-note { margin: 0 0 16px; }
.tbl .proxy-selection-cell { width: 44px; padding: 0 6px; }
.proxy-row-select { justify-content: center; min-width: 32px; min-height: 44px; }
.tbl tbody tr.is-proxy-selected { background: #f2eb3910; }
.proxy-list { border: 1px solid var(--line); border-radius: 12px; }
.proxy-list .tbl { display: table; width: 100%; margin: 0; overflow: visible; }
.proxy-import input[type=file] { display: block; max-width: 100%; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--muted); font: inherit; }
.proxy-import input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
input[type=checkbox] { appearance: none; display: inline-grid; place-content: center; flex: 0 0 auto; width: 17px; height: 17px; min-height: 0; padding: 0; border: 1px solid var(--muted); border-radius: 4px; background: var(--bg); vertical-align: middle; cursor: pointer; }
input[type=checkbox]::before { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: translateY(-1px) rotate(-45deg); visibility: hidden; }
input[type=checkbox]:checked, input[type=checkbox]:indeterminate { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::before { visibility: visible; }
input[type=checkbox]:indeterminate::before { visibility: visible; width: 9px; height: 0; border-left: 0; transform: none; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
@media (forced-colors: active) { input[type=checkbox] { appearance: auto; } input[type=checkbox]::before { display: none; } }
@media (max-width: 720px) {
  .proxy-bulk-toolbar .proxy-bulk-actions { margin-left: 0; width: 100%; }
  .proxy-bulk-actions .btn { flex: 1 1 auto; }
}
.btn.big { width: 100%; padding: 13px; font-size: 15px; margin-top: 6px; }
.btn.tiny { padding: 4px 10px; font-size: 12px; border-radius: 7px; }
form.inline { display: inline; }

.seg, .preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.seg label, .preset { position: relative; }
.seg input, .preset input { position: absolute; opacity: 0; }
.seg span, .preset span {
  display: inline-block; padding: 8px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-2);
  font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.seg input:checked + span, .preset input:checked + span {
  border-color: var(--accent-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-2);
}

/* ---- flash ---- */
.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; border: 1px solid; }
.flash.ok  { background: rgba(46, 230, 168, .09); border-color: rgba(46,230,168,.4); color: var(--ok); }
.flash.err { background: rgba(255, 92, 122, .09); border-color: rgba(255,92,122,.4); color: var(--err); }

/* ---- stats & bars ---- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-num { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: 12px; }
.dashboard-summary { display: flex; flex-wrap: wrap; gap: 32px; padding: 18px 0; margin: 0 0 36px; border-block: 1px solid var(--line); }
.dashboard-summary div { display: flex; align-items: baseline; gap: 12px; }
.dashboard-summary dt { color: var(--muted); font-size: 13px; }
.dashboard-summary dd { margin: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dashboard-section { margin-bottom: 36px; }
.dashboard-intro { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.balance-inline { display: inline-flex; gap: 6px; align-items: baseline; color: var(--accent); font-size: 15px; white-space: nowrap; }
.balance-inline strong { font-weight: 800; font-variant-numeric: tabular-nums; }
.dashboard-intro p { font-size: 15px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading a { font-size: 13px; }
.admin-runs-heading { align-items: center; }
.admin-runs-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-left: auto; }
.connected-account { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-block: 1px solid var(--line); }
.connected-account + .connected-account { border-top: 0; }
.account-avatar { display: grid; place-items: center; background: var(--panel-2); border-radius: 50%; width: 44px; height: 44px; flex-shrink: 0; color: var(--text); font-weight: 600; }
.account-identity { flex: 1; min-width: 0; }
.account-identity strong { display: block; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.account-identity span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-state { color: var(--ok); font-size: 12px; }
.account-name-line { display: flex; align-items: center; gap: 10px; }
.account-identity .connection-dot { display: inline-block; margin: 0; flex: 0 0 8px; width: 8px; height: 8px; background: var(--muted); border-radius: 50%; }
.account-identity .connection-dot.connected { background: var(--ok); }
.account-identity .connection-dot.disconnected { background: var(--err); }
.account-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---- proxy pool (one sticky IP per account) ---- */
.proxy-pool { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.proxy-pool strong { color: var(--text); font-variant-numeric: tabular-nums; }
.proxy-pool .btn { margin: 0; }
.chip.proxy { background: var(--panel-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chip.proxy strong { color: var(--accent-2); }
.proxy-note {
  margin: 0 0 16px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--muted); font-size: 12.5px;
}
.proxy-note code { font-size: 12px; }
.dashboard-friends { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 0 0; }
.dashboard-friends + .connected-account { margin-top: 20px; }
.dashboard-friend { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
.empty-state { padding: 24px 0; }
.empty-state h3 { margin: 0 0 8px; font-size: 15px; }
.empty-state p { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.saved-account { padding: 24px 0; border-top: 1px solid var(--line); }
.saved-account h3 { margin-top: 0; font-size: 18px; }
.saved-account p { margin-block: 8px; }
.saved-account form { margin-top: 16px; }
#saved-login-list { border: 0; background: none; padding: 0; margin-top: 32px; }
.tbl { display: block; overflow-x: auto; }

.bar {
  height: 10px; border-radius: 999px; background: #0e1119;
  border: 1px solid var(--line); overflow: hidden;
}
.bar.tall { height: 22px; }
.bar-fill {
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width .7s cubic-bezier(.22, 1, .36, 1);
}
.mini-job { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.mini-job:last-child { border-bottom: 0; }
.mini-job-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; flex-wrap: wrap; }
.mini-job-head a { font-weight: 700; }
.mini-points { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
.mini-job-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.mini-job .pct { font-weight: 800; color: var(--text); }

/* ---- job page ---- */
.big-bar { display: flex; align-items: center; gap: 16px; }
.big-bar .bar { flex: 1; }
.big-pct { font-size: 30px; font-weight: 800; letter-spacing: -.03em; min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.tile-num { display: block; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-label { font-size: 12px; color: var(--muted); }
.proj { font-size: 13.5px; color: var(--muted); background: rgba(53,208,255,.06); border: 1px dashed rgba(53,208,255,.35); border-radius: 10px; padding: 10px 14px; }
.proj strong { color: var(--text); }
.log { list-style: none; margin: 0; padding: 0; font: 12.5px/1.7 'Bricolage Grotesque', sans-serif; font-variant-numeric: tabular-nums; max-height: 240px; overflow-y: auto; }
.log li { padding: 3px 0; border-bottom: 1px dashed rgba(38,45,63,.7); color: var(--muted); }
.log li:last-child { color: var(--text); }
.log-t { color: var(--accent-2); }

/* ---- tables ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(38,45,63,.55); }
.tbl tr:last-child td { border-bottom: 0; }
.activity-table { display: table; min-width: 700px; font-variant-numeric: tabular-nums; }
.activity-table th, .activity-table td { padding: 14px 16px; }
.activity-table th:first-child, .activity-table td:first-child { padding-left: 0; width: 32%; }
.activity-table th:last-child, .activity-table td:last-child { padding-right: 0; text-align: right; }
.activity-table th { padding-block: 4px; }
.activity-account { display: flex; align-items: center; gap: 10px; }
.activity-account strong { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.account-avatar.small-avatar { width: 28px; height: 28px; font-size: 11px; }
.table-sort { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
.table-sort:hover, th[aria-sort]:not([aria-sort="none"]) .table-sort { color: var(--text); }
.table-sort svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
th[aria-sort="ascending"] .table-sort svg path { d: path('m5 9 3-3 3 3'); stroke: var(--accent); }
th[aria-sort="descending"] .table-sort svg path { d: path('m5 7 3 3 3-3'); stroke: var(--accent); }
.run-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.run-status::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.run-status.ok { color: var(--ok); }
.run-status.stopped { color: var(--err); }
.run-status.warn { color: var(--warn); }
.run-status.active { color: var(--accent); }
.row-actions { display: flex; gap: 6px; }
.err-row td { color: var(--err); font-size: 12px; }

/* ---- order ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.test-heading { margin: 0 0 28px; }
.test-heading h1 { font-size: clamp(38px, 4.2vw, 48px); font-weight: 800; }
.test-heading p { margin: 8px 0 0; }
#test-run { --muted: #a6adb4; }
#test-run ::selection { color: #141400; background: var(--accent); }
#test-run :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#test-run input, #test-run textarea { caret-color: var(--accent); }
#test-run #test-settings.test-workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.friend-panel, .test-config { padding: 24px; min-width: 0; }
.test-config { border-left: 1px solid var(--line); }
.test-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.test-section-head h2 { margin: 0; font-size: 20px; font-weight: 750; }
#test-selected { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.friend-source { display: flex; align-items: end; position: relative; }
.friend-source label, .friend-source .cselect-field { flex: 1; min-width: 0; margin: 0; }
.friend-source .cselect { margin-top: 6px; }
.friend-source .cselect-button { min-height: 46px; padding-right: 88px; }
.friend-source .cselect-chevron { position: absolute; right: 12px; }
.friend-source .icon-button { position: absolute; right: 34px; bottom: 1px; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.friend-source .icon-button:hover:not(:disabled) { color: var(--accent); }
.icon-button[data-ui-busy]::before { display: none; }
.icon-button[data-ui-busy] svg { animation: busy-turn 1s linear infinite; }
.friend-search-label { margin-top: 22px; }
#test-search { display: block; width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-top: 6px; font: inherit; }
#test-search::placeholder { color: var(--muted); }
.text-button { border: 0; padding: 6px 0; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-height: 32px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
#test-run .test-selection { display: flex; gap: 20px; align-items: center; margin: 8px 0 12px; }
#test-visible { margin-left: auto; }
#test-run .test-recipient-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding: 2px; scrollbar-color: #414957 var(--panel); scrollbar-width: thin; }
.friend-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; margin: 0; cursor: pointer; color: var(--text); font-size: 15px; font-weight: 500; min-height: 68px; }
.friend-row:hover { background: var(--panel-2); }
.friend-row:has(input:checked) { background: #2b2d25; }
.friend-row input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.friend-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #303743; color: #d5dce8; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.friend-avatar { position: relative; overflow: hidden; }
.friend-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.friend-name { overflow-wrap: anywhere; min-width: 0; }
.friend-name small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.friend-empty { padding: 40px 16px; text-align: center; border-block: 1px solid var(--line); }
.friend-empty strong { font-size: 16px; font-weight: 550; }
.friend-empty p { color: var(--muted); font-size: 13px; max-width: 34ch; margin: 8px auto 0; }
.test-manual { margin-top: 24px; }
#test-run summary { cursor: pointer; color: var(--muted); font-size: 13px; min-height: 32px; }
#test-run details[open] summary { margin-bottom: 14px; color: var(--text); }
.test-mode { margin: -6px 0 26px; }
.test-config h2 { margin-bottom: 20px; }
.test-config label { margin: 0 0 12px; }
.test-config .account-help { margin: 16px 0; }
.test-config .account-help summary { min-height: 32px; }
.test-config .account-help[open] summary { margin-bottom: 12px; }
.test-config #test-estimate { margin: 16px 0 12px; }
.test-config .btn.big { margin: 0; }
.test-config p { line-height: 1.6; }
.test-advanced { margin: 28px 0 16px; border-top: 1px solid var(--line); padding-top: 18px; }
#test-error { margin-top: 18px; font-size: 13px; overflow-wrap: anywhere; }
.test-progress-panel { border-top: 1px solid var(--line); margin-top: 36px; padding: 28px 0 0; }
.test-progress-summary { display: flex; gap: 20px; align-items: center; margin-top: 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.test-progress-summary button { margin-left: auto; }
.test-results { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.test-results h3 { text-transform: none; letter-spacing: 0; font-size: 13px; }
@media (max-width: 720px) {
  #test-run #test-settings.test-workspace { grid-template-columns: 1fr; }
  .friend-panel, .test-config { padding: 20px; }
  .test-config { border-left: 0; border-top: 1px solid var(--line); }
  .test-results { grid-template-columns: 1fr; gap: 0; }
  .test-progress-summary { flex-wrap: wrap; gap: 10px; }
}
.test-selection { margin: 14px 0; flex-wrap: wrap; }
.test-recipient-list { max-height: 240px; overflow-y: auto; }
#test-settings { border: 0; margin: 0; padding: 0; min-width: 0; }
#test-settings legend { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
#test-progress { width: 100%; height: 18px; accent-color: var(--accent); }
#test-totals { max-height: 200px; overflow-y: auto; }
#test-totals p { margin: 4px 0; font-variant-numeric: tabular-nums; }
:disabled { opacity: .65; cursor: not-allowed; }
.order-form h3:first-child { margin-top: 0; }
.cost-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 16px; }
.cost-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; color: var(--muted); }
.cost-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.cost-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 15px; }
.cost-row.total strong { color: var(--accent); }

/* ---- interactive login: verification-code panel ---- */
.code-panel {
  background: rgba(255, 182, 72, .07);
  border: 1px solid rgba(255, 182, 72, .45);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}
.code-panel-head { display: flex; gap: 12px; align-items: flex-start; }
.code-panel-head strong { font-size: 15px; color: var(--warn); }
.code-panel-head p { margin: 3px 0 0; font-size: 13.5px; }
.code-ico { font-size: 20px; line-height: 1.2; }
.code-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 4px; }
.code-panel form .btn { margin-top: 8px; }
.code-waiting { padding: 8px 0 2px; }
.code-waiting p { margin: 0; font-size: 14px; }

/* ---- recovery email editor (dashboard) ---- */
.email-edit { display: flex; gap: 6px; align-items: center; }
.email-edit input[type="email"] {
  margin-top: 0;
  min-width: 170px;
  padding: 6px 9px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero, .grid-2 { grid-template-columns: 1fr; }
  .grid-4, .stat-row, .code-fields { grid-template-columns: 1fr 1fr; }
  .topbar { flex-wrap: wrap; gap: 8px 16px; padding: 12px var(--shell-inset); }
  .topbar nav { flex-basis: 100%; order: 3; gap: 4px; }
  .topbar nav button { min-height: 38px; }
  .topbar-right { margin-left: auto; }
}
@media (max-width: 540px) {
  .admin-runs-actions { width: 100%; justify-content: space-between; }
  :root { --page-gutter: 12px; --shell-inset: 12px; }
  .wrap { margin-top: 28px; }
  .topbar { margin-top: 12px; top: 8px; gap: 8px; }
  .topbar-right { gap: 2px; }
  .topbar .brand { font-size: 16px; }
  .topbar nav { flex-wrap: wrap; gap: 2px; }
  .topbar nav button { padding-inline: 8px; font-size: 12px; }
  .nav-dashboard { font-size: 12px; padding-inline: 6px; }
  .nav-action { font-size: 12px; padding-inline: 6px; }
  .account-name, .account-balance { display: none; }
  .connected-account { flex-wrap: wrap; }
  .connected-account .account-identity { flex: 1 1 calc(100% - 60px); }
  .account-state { margin-left: 60px; }
  .connected-account .btn { margin-left: auto; }
  .dashboard-summary { gap: 16px 28px; }
  .feature-grid, .stat-row, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .foot { padding-inline: 16px; }
}
/* Customer tabs preserve the live shell. Only the indicator travels; new
   content receives a small opacity settle without translation or snapshots. */
@view-transition { navigation: none; }
.wrap { animation: page-arrival 100ms ease-out; }
.page-head > div > p, .test-heading > p { font-size: 17px; font-weight: 200; max-width: 70ch; }
.brand { font-weight: 800; letter-spacing: -.03em; }
@keyframes page-arrival { from { opacity: .92; } to { opacity: 1; } }

/* Shared feedback covers keyboard, pointer and dynamic account/run states. */
.topbar nav button, .nav-more summary, .nav-dashboard, .nav-action,
.text-button, .dashboard-friend, .tbl tbody tr, .chip, .account-state,
.seg span, .preset span, input, select, textarea {
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}
.nav-more svg { transition: transform var(--motion-state) var(--ease-out); }
.nav-more[open] svg { transform: rotate(180deg); }
.nav-menu { transform-origin: top left; }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); border-color: #545b62; }
.btn:active:not(:disabled) { transition-duration: 80ms; }
.dashboard-friend:hover { color: var(--accent); text-decoration: none; }
.dashboard-friend .friend-avatar { transition: transform var(--motion-state) var(--ease-out); }
.dashboard-friend:hover .friend-avatar { transform: scale(1.07); }
.tbl tbody tr:hover { background: #f1f2ed05; }
.seg input:focus-visible + span, .preset input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.friend-row { position: relative; transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease; }
.friend-row .friend-avatar { transition: transform var(--motion-state) var(--ease-out); }
.friend-row:has(input:checked) .friend-avatar { transform: scale(1.06); }
.friend-row::after { content: ''; margin-left: auto; width: 9px; height: 5px; flex-shrink: 0; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) scale(.6); opacity: 0; transition: transform var(--motion-state) var(--ease-out), opacity var(--motion-fast) ease; }
.friend-row:has(input:checked)::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.friend-row:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.bar-fill { transition: width 300ms var(--ease-out); }
#test-progress { appearance: none; display: block; height: 8px; margin-block: 20px; border: 0; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
#test-progress::-webkit-progress-bar { background: var(--panel-2); border-radius: 4px; }
#test-progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; transition: width 300ms var(--ease-out); }
#test-progress::-moz-progress-bar { background: var(--accent); border-radius: 4px; }
.btn[data-ui-busy] { gap: 8px; }
.btn[data-ui-busy]::before { content: ''; width: 12px; height: 12px; flex: 0 0 auto; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: busy-turn 800ms linear infinite; }
@keyframes busy-turn { to { transform: rotate(360deg); } }
body[data-ui-hidden] .btn[data-ui-busy]::before { animation-play-state: paused; }
body[data-ui-hidden] .icon-button[data-ui-busy] svg { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  :root { --motion-fast: 80ms; --motion-state: 100ms; --motion-view: 100ms; }
  .wrap { animation-duration: 80ms; }
  .btn:active:not(:disabled), .dashboard-friend:hover .friend-avatar,
  .friend-row:has(input:checked) .friend-avatar { transform: none; }
  .cselect-chevron, .nav-more svg { transition-property: color; }
  .cselect-menu, .cselect-option { transform: none; transition-property: opacity, background-color, color, visibility; transition-delay: 0s; }
  .cselect-option.is-selected::after, .friend-row::after { transition-property: opacity; }
  .bar-fill, #test-progress::-webkit-progress-value { transition: none; }
  .btn[data-ui-busy]::before { animation: none; border-top-color: currentColor; border-style: dotted; }
  .icon-button[data-ui-busy] svg { animation: none; }
}

/* Admin tasks have dedicated pages; related measurements share a column. */
.admin-workspace .page-head { margin-bottom: 36px; }
.admin-workspace .dashboard-section + .dashboard-section { padding-top: 28px; border-top: 1px solid var(--line); }
.admin-workspace .table-scroll { scrollbar-color: var(--line) var(--bg); scrollbar-width: thin; }
.admin-workspace .table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.admin-workspace .tbl { display: table; overflow: visible; }
.admin-workspace .admin-table { font-variant-numeric: tabular-nums; }
.admin-workspace .admin-table th { padding: 12px 14px; }
.admin-workspace .admin-table td { padding: 20px 14px; vertical-align: top; border-bottom-color: var(--line); }
.admin-workspace .admin-table th:first-child, .admin-workspace .admin-table td:first-child { padding-left: 0; }
.admin-workspace .admin-table th:last-child, .admin-workspace .admin-table td:last-child { padding-right: 0; }
.admin-runs-table { min-width: 1080px; }
.admin-runs-table td { white-space: nowrap; }
.admin-runs-table .admin-email { min-width: 180px; max-width: 240px; white-space: normal; }
.admin-email { overflow-wrap: anywhere; min-width: 170px; max-width: 260px; }
.admin-cell-detail { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-runs-table .chip { padding-left: 0; }
.admin-runs-table .chip.running, .admin-runs-table .chip.failed { padding-inline: 6px; }
.admin-run-failure { width: 210px; white-space: normal; margin-top: 6px; font-size: 12px; }
.admin-run-failure summary { cursor: pointer; color: var(--warn); min-height: 32px; padding-block: 6px; }
.admin-run-failure p { color: var(--muted); line-height: 1.6; margin: 8px 0; }
.admin-run-failure code { display: block; color: var(--text); overflow-wrap: anywhere; font-size: 11px; }
.admin-table-intro { margin-bottom: 16px; }
.admin-run-capacity { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.admin-run-capacity > div { flex: 1 1 320px; max-width: 65ch; }
.admin-run-capacity h2 { margin-bottom: 8px; }
.admin-capacity-form { flex: 0 1 320px; min-width: 0; width: 100%; }
.admin-capacity-controls { display: flex; align-items: center; gap: 12px; }
.admin-capacity-controls input { min-width: 0; width: 90px; flex: 1 1 90px; }
.admin-capacity-controls button { flex-shrink: 0; }
.admin-table-help { margin-top: 18px; color: var(--muted); font-size: 13px; }
.admin-table-help summary { cursor: pointer; width: fit-content; min-height: 32px; padding-block: 6px; }
.admin-table-help p { max-width: 75ch; line-height: 1.7; }
.admin-section-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 13px; }
.admin-count { color: var(--muted); white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.admin-topups-table { min-width: 920px; }
.admin-customers-table { min-width: 880px; }
.admin-note { min-width: 180px; max-width: 290px; overflow-wrap: anywhere; }
.admin-amount, .admin-reference { white-space: nowrap; font-weight: 650; }
.admin-row-actions { display: flex; gap: 8px; align-items: center; }
.admin-row-actions .btn, .admin-workspace .admin-credit summary, .admin-workspace .admin-access summary { min-height: 44px; }
.admin-workspace .admin-credit summary, .admin-workspace .admin-access summary { padding-block: 10px; }
.admin-empty { border-block: 1px solid var(--line); padding: 48px 0; }
.admin-empty h2 { font-size: 20px; margin: 0 0 8px; }
.admin-empty p { margin: 0; }
.admin-legacy { padding-top: 24px; border-top: 1px solid var(--line); }
.admin-topbar nav > button { min-height: 44px; }
.admin-topbar nav > button[aria-current="page"]:hover { color: var(--accent); }
.admin-scroll-hint { display: none; }
@media (max-width: 540px) {
  .admin-topbar nav { flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .admin-topbar nav > button { min-height: 44px; padding-inline: 6px; font-size: 12px; }
  .admin-workspace .page-head { margin-bottom: 28px; }
  .admin-workspace h1 { font-size: 34px; }
  .admin-workspace .page-head > div > p { font-size: 15px; }
  .admin-workspace .admin-topups-table, .admin-workspace .admin-customers-table { display: block; min-width: 0; }
  .admin-topups-table thead, .admin-customers-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .admin-topups-table tbody, .admin-customers-table tbody { display: block; }
  .admin-topups-table tr, .admin-customers-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; padding-block: 24px; border-top: 1px solid var(--line); }
  .admin-workspace .admin-topups-table td, .admin-workspace .admin-customers-table td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; }
  .admin-topups-table td::before, .admin-customers-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-bottom: 5px; }
  .admin-topups-table td:nth-child(2), .admin-topups-table td:nth-child(4), .admin-topups-table td:last-child,
  .admin-customers-table td:nth-child(2), .admin-customers-table td:nth-child(5), .admin-customers-table td:last-child { grid-column: 1 / -1; }
  .admin-workspace .admin-credit form { width: 100%; }
  .admin-workspace .admin-access { max-width: none; }
  .admin-scroll-hint { display: block; margin-top: 0; color: var(--muted); font-size: 12px; }
  .admin-topups-table td:first-child, .admin-customers-table td:first-child { order: 0; }
  .admin-topups-table td:nth-child(3), .admin-customers-table td:nth-child(3) { order: 0; }
  .admin-topups-table td:nth-child(2), .admin-customers-table td:nth-child(2) { order: 1; }
  .admin-topups-table td:nth-child(n+4), .admin-customers-table td:nth-child(n+4) { order: 2; }
}
