:root {
  --accent: #1155CC;
  --accent-dark: #0B3F99;
  --accent-soft: #E8F0FC;
  --ink: #0F1B33;
  --muted: #4A5468;
  --line: #DDE3EC;
  --line-soft: #EEF1F6;
  --input-line: #C9D2DF;
  --bg: #F4F6FA;
  --panel: #FFFFFF;
  --panel-alt: #F8FAFD;
  --ok-fg: #1A7A36; --ok-bg: #E3F4E8;
  --warn-fg: #7A5000; --warn-bg: #FFF3D6;
  --error-fg: #A11A1A; --error-bg: #FDE8E8;
  --info-fg: #0B3F99; --info-bg: #E8F0FC;
  --muted-bg: #EEF1F6;
}

/* Dark theme. Defaults to the OS/browser preference; the toggle sets
   data-theme="dark"/"light" on <html> to override and remember the choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #5B9BF5; --accent-dark: #85B6F8; --accent-soft: #17263E;
    --ink: #E6EAF2; --muted: #9AA7BD; --line: #2A3444; --line-soft: #222B38;
    --input-line: #3A4557; --bg: #0E141F; --panel: #161D29; --panel-alt: #1B2432;
    --ok-fg: #5FD98A; --ok-bg: #163021; --warn-fg: #E6B457; --warn-bg: #352A12;
    --error-fg: #F08A8A; --error-bg: #3A1C1C; --info-fg: #85B6F8; --info-bg: #17263E;
    --muted-bg: #222B38;
  }
}
:root[data-theme="dark"] {
  --accent: #5B9BF5; --accent-dark: #85B6F8; --accent-soft: #17263E;
  --ink: #E6EAF2; --muted: #9AA7BD; --line: #2A3444; --line-soft: #222B38;
  --input-line: #3A4557; --bg: #0E141F; --panel: #161D29; --panel-alt: #1B2432;
  --ok-fg: #5FD98A; --ok-bg: #163021; --warn-fg: #E6B457; --warn-bg: #352A12;
  --error-fg: #F08A8A; --error-bg: #3A1C1C; --info-fg: #85B6F8; --info-bg: #17263E;
  --muted-bg: #222B38;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 Poppins, "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select { font-family: inherit; }
h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.link-muted { font-size: 13px; color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--ink); text-decoration: underline; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1360px; margin: 0 auto; padding: 12px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.brand-name span { color: var(--accent); }
/* Brand logo: blue wordmark on the light panel, white on the dark panel. */
.brand-logo { height: 24px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.brand-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo-dark { display: block; }
}
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
.pill { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.nav a { min-height: 44px; padding: 0 16px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.nav a.on { background: var(--accent-soft); color: var(--accent-dark); }
.count-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--error-fg); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta form { margin: 0; }
.linklike { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; text-align: left; }
.linklike:hover { color: var(--accent); }

main { max-width: 1360px; margin: 0 auto; padding: 20px 28px 30px; display: flex; flex-direction: column; gap: 18px; }

/* Buttons */
.btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-google { gap: 10px; }
.btn-google:hover { background: var(--panel-alt); }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-danger { background: var(--error-fg); border-color: var(--error-fg); color: #fff; }
.btn-danger:hover { background: #851515; border-color: #851515; color: #fff; }
.btn-warn { background: var(--warn-fg); border-color: var(--warn-fg); color: #fff; }
.btn-warn:hover { background: #5E3D00; border-color: #5E3D00; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: not-allowed; }
.btn svg { flex: none; }

/* Page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--muted); }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 11px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.15; }
.kpi-hint { font-size: 11px; color: var(--muted); line-height: 1.3; }
.tone-warn { color: var(--warn-fg); } .tone-error { color: var(--error-fg); } .tone-ok { color: var(--ok-fg); }

/* Filters + search */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.chip .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--muted-bg); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.chip.on .n { background: rgba(255,255,255,.18); }
.search { position: relative; flex: 0 1 340px; min-width: 220px; }
.search svg { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.search input { width: 100%; min-height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--input-line); border-radius: 10px; font-size: 14px; background: var(--panel); color: var(--ink); }

/* Tables */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; min-width: 1000px; }
table.grid.compact { min-width: 0; }
table.grid th { text-align: left; padding: 12px 20px; background: var(--panel-alt); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
table.grid td { padding: 12px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid .agency a { font-weight: 600; text-decoration: none; }
table.grid .sub { display: block; font-size: 12.5px; color: var(--muted); }
table.compact { min-width: 640px; }
table.compact th, table.compact td { padding: 10px 6px; }
table.compact th { background: none; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.error { background: var(--error-bg); color: var(--error-fg); }
.badge.info { background: var(--info-bg); color: var(--info-fg); }
.badge.muted { background: var(--muted-bg); color: var(--muted); }
.status-select { font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 26px 4px 10px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.status-select.is-active { background-color: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.status-select.is-inactive { background-color: var(--muted-bg); color: var(--muted); }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--muted-bg); font-size: 13px; }
.tag.blue { background: var(--accent-soft); color: var(--accent-dark); }

/* Detail layout */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none; }
.back:hover { border-color: var(--accent); color: var(--accent); }
.page-back { margin: 0; cursor: pointer; flex: 0 0 auto; }
.head-left { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
/* Styled hover tooltip for icon buttons (via data-tip). */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: var(--ink); color: var(--panel); font-size: 12px;
  font-weight: 600; white-space: nowrap; padding: 4px 8px; border-radius: 6px; z-index: 50;
  pointer-events: none; box-shadow: 0 6px 18px rgba(16, 24, 40, 0.22);
}
/* Buttons in the page header sit at the top with no room above, so their tooltips
   would clip — flip those to appear below the button instead. */
.page-head [data-tip]:hover::after, .page-head [data-tip]:focus-visible::after,
.detail-head [data-tip]:hover::after, .detail-head [data-tip]:focus-visible::after {
  bottom: auto; top: calc(100% + 6px);
}
/* Small info hint (e.g. next to "Card fee"): a longer sentence that should wrap. */
.fee-info { display: inline-flex; vertical-align: middle; color: var(--muted); cursor: help; outline: none; }
.fee-info:hover, .fee-info:focus-visible { color: var(--accent); }
.fee-info[data-tip]:hover::after, .fee-info[data-tip]:focus-visible::after {
  white-space: normal; width: max-content; max-width: 240px; line-height: 1.4;
  text-align: left; font-weight: 500;
}
.sc-val { display: inline-flex; align-items: center; gap: 8px; }
/* Action-column tooltips sit at the table's right edge; anchor them to the right
   so they extend leftward instead of overflowing and forcing a horizontal scroll. */
.col-actions [data-tip]:hover::after { left: auto; right: 0; transform: none; }
/* The theme toggle is pinned to the viewport's top-right corner: show its tooltip
   below and extending leftward so neither edge clips it. */
.theme-fab[data-tip]:hover::after, .theme-fab[data-tip]:focus-visible::after {
  bottom: auto; top: calc(100% + 6px); left: auto; right: 0; transform: none;
}
/* Page header: title on the left, back link (and any actions) on the right. */
.page-head, .detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.detail-head .meta { display: flex; flex-direction: column; gap: 8px; }
.head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tags, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { gap: 10px; }
.actions form { margin: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.panel h2 + p { margin-top: -10px; color: var(--muted); font-size: 13.5px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* Alerts / messages */
.alert { border-radius: 12px; padding: 14px 18px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { flex: none; margin-top: 2px; }
.alert.ok, .alert.success { background: var(--ok-bg); color: var(--ok-fg); }
.alert.warn, .alert.warning { background: var(--warn-bg); color: var(--warn-fg); }
.alert.error { background: var(--error-bg); color: var(--error-fg); }
.alert.info { background: var(--info-bg); color: var(--info-fg); }
.messages { display: flex; flex-direction: column; gap: 10px; }

/* Charge form */
.charge-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; }
.field label, .label { font-size: 13px; font-weight: 600; }
.money-input { display: flex; align-items: center; border: 1px solid var(--input-line); border-radius: 10px; background: var(--panel); padding: 0 14px; gap: 6px; }
.money-input span { color: var(--muted); font-weight: 600; font-size: 18px; }
.money-input input { border: 0; flex: 1; min-width: 0; font-size: 18px; font-weight: 600; color: var(--ink); background: transparent; min-height: 44px; outline: none; font-variant-numeric: tabular-nums; }
.money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.lines { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.lines .line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.lines .total { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--panel-alt); font-weight: 700; }
.lines .cap { padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; background: var(--panel-alt); border-bottom: 1px solid var(--line-soft); }
.hidden { display: none !important; }

/* Card on file */
/* Always a dark card (a credit-card visual), independent of the page theme. */
.cc { border-radius: 12px; padding: 18px; background: #0F1B33; color: #fff; display: flex; flex-direction: column; gap: 18px; }
.cc-top, .cc-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cc-top small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #AEB8CC; }
.cc-number { font-size: 18px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.cc-bottom { font-size: 12.5px; color: #AEB8CC; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.note { font-size: 12.5px; color: var(--muted); }
.link-box { display: flex; gap: 8px; }
.link-box input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; font-size: 12.5px; color: var(--muted); background: var(--panel-alt); }
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.events li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.events li:last-child { border-bottom: 0; }
.events .ev-err { color: var(--error-fg); }

/* Forms (new client, login) */
.form-card { max-width: 720px; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input[type=text], .form-grid input[type=email], .form-grid input[type=password],
.form-grid input[type=number], .form-grid input[type=date], .form-grid input[type=tel],
.form-grid input[type=url], .form-grid input:not([type]), .form-grid select {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; font-size: 14px; background: var(--panel); color: var(--ink);
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Password show/hide toggle (added by JS around each password input). The eye
   overlays the right edge; no extra input padding, so the field keeps its normal
   size and spacing. */
.pw-wrap { position: relative; display: block; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Standalone text input, matching the form-grid / line inputs. */
.text-input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; font-size: 14px; background: var(--panel); color: var(--ink); }
.text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--error-fg); font-size: 12.5px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .topbar-inner, main { padding-left: 16px; padding-right: 16px; }
  .panel, .form-card { padding: 18px; }
}

/* Toast notifications (Django messages rendered as auto-dismissing toasts). */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.14);
  font-size: 14px;
  line-height: 1.4;
  animation: toast-in 0.2s ease-out;
}
.toast .toast-msg { flex: 1; color: var(--ink); }
.toast.success { border-left-color: #16a34a; }
.toast.error   { border-left-color: #dc2626; }
.toast.warning { border-left-color: #d97706; }
.toast.info    { border-left-color: #2563eb; }
.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #94a3b8;
  padding: 0 2px;
}
.toast-close:hover { color: #475569; }
.toast.is-hiding {
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 520px) {
  .toast-stack { left: 16px; right: 16px; max-width: none; }
}

/* Pause billing popover (details/summary dropdown on the client page). */
.pause-menu { position: relative; }
.pause-menu > summary { list-style: none; cursor: pointer; }
.pause-menu > summary::-webkit-details-marker { display: none; }
.pause-pop {
  position: absolute;
  right: 0;
  left: auto;
  z-index: 20;
  margin-top: 6px;
  width: 280px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pause-field { display: flex; flex-direction: column; gap: 5px; }
.pause-field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pause-pop input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  font-size: 14px;
  background: var(--panel);
  color: var(--ink);
  box-sizing: border-box;
}
.pause-pop input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pause-pop .btn-primary { margin-top: 2px; }

/* Textareas in forms match the other inputs. */
.form-grid textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--panel);
  color: var(--ink);
  resize: vertical;
}
.form-grid textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Itemised "Charge now" line builder. */
.charge-lines { display: flex; flex-direction: column; gap: 10px; }
.charge-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.charge-line .line-product {
  flex: 1 1 190px; min-height: 44px; padding: 0 10px;
  border: 1px solid var(--input-line); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 14px;
}
.charge-line .line-label {
  flex: 1 1 150px; min-width: 0; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--input-line); border-radius: 10px; font-size: 14px; background: var(--panel); color: var(--ink);
}
.charge-line .line-money { flex: 0 0 130px; min-height: 44px; }
.charge-line .line-money input { font-size: 15px; }
.charge-line .line-remove { flex: 0 0 auto; min-height: 44px; }
.charge-line-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.new-product-box {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px; border: 1px dashed var(--input-line); border-radius: 10px; background: var(--panel-alt);
}
.new-product-box > input {
  min-height: 40px; padding: 0 10px; border: 1px solid var(--input-line); border-radius: 8px; font-size: 14px;
  background: var(--panel); color: var(--ink);
}
.new-product-box #np-name { flex: 1 1 200px; }
.np-error { color: #dc2626; font-size: 13px; }
.recurring-form {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.recurring-form .money-input { flex: 0 0 150px; min-height: 44px; }
.recurring-form .money-input input { font-size: 15px; }
.recurring-form label { font-size: 13px; font-weight: 600; }

.new-product-box[hidden] { display: none; }

table.grid .agency-link { font-weight: 500; text-decoration: none; color: var(--ink); }
table.grid .agency-link:hover { text-decoration: underline; }

/* Dashboard shell: fixed left sidebar + main content */
.app { display: flex; min-height: 100vh; }
.sidebar {
  flex: 0 0 232px; width: 232px;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 4px 8px; flex-wrap: wrap; gap: 8px; }
.app-main { flex: 1 1 auto; min-width: 0; }
.app-main main { max-width: none; margin: 0; padding: 24px 28px 40px; }

/* Theme toggle floats at the page's top-right corner, to the right of the page's
   primary action button (the header reserves room for it). */
.icon-btn {
  width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-fab { position: fixed; top: 16px; right: 18px; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,.10); }
.page-head, .detail-head { padding-right: 52px; }
@media (max-width: 860px) { .theme-fab { top: 10px; right: 12px; } .page-head, .detail-head { padding-right: 44px; } }

/* Bigger, clearer org logo now that the sidebar top isn't crowded */
.sidebar .brand-logo { height: 30px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 12px; border-radius: 8px;
  color: var(--muted); font-weight: 600; text-decoration: none;
}
.side-nav a:hover { background: var(--muted-bg); color: var(--ink); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent-dark); }
.side-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding-top: 16px; border-top: 1px solid var(--line);
}

/* Org switcher (sidebar) */
.org-switch { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.org-switch-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.org-switch-form { margin: 0; }
.org-select {
  width: 100%; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--input-line); border-radius: 10px;
  font-size: 14px; font-weight: 600; background: var(--panel); color: var(--ink);
  cursor: pointer; box-sizing: border-box;
}
.org-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.org-name { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Uploaded logo preview on the org form */
.logo-preview { display: block; max-height: 48px; max-width: 220px; margin-bottom: 8px;
  padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-alt); object-fit: contain; }

/* Env-var names shown on the org form (credentials live in the environment) */
.cred-env { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
.cred-env code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
  background: var(--panel-alt); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; color: var(--ink); width: fit-content; max-width: 100%; }

/* Grouped form section heading (org form, etc.) */
.section-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.section-h:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar {
    position: static; height: auto; width: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 auto; }
  .side-user { margin-top: 0; border-top: 0; padding-top: 0; }
  .app-main main { padding: 20px 16px 30px; }
}

/* Stacked form fields (e.g. subscription schedule column) */
.stack .field { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.stack .field label { font-size: 13px; font-weight: 600; }
.stack input[type=text], .stack input[type=date], .stack input[type=number], .stack input:not([type]), .stack select {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--input-line); border-radius: 10px;
  font-size: 14px; background: var(--panel); color: var(--ink); box-sizing: border-box;
}
.stack input:focus, .stack select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn-icon { padding: 0 11px; }

/* New-client "set up billing now" section */
#invoice-box {
  display: flex; flex-direction: column; gap: 14px;
  border: 1px dashed var(--input-line); border-radius: 12px; padding: 16px;
}
#invoice-box[hidden] { display: none; }
#invoice-box .field { flex: 0 0 auto; }

/* Masquerade / "view as" banner */
.impersonate-bar {
  position: fixed; z-index: 1100;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(66px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
  background: #fef3c7; border: 1px solid #f1d58a; color: #7a5b00;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600;
  border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.impersonate-bar form { margin: 0; }
.switch-back { background: none; border: 0; color: #8a5a00; font-weight: 700;
  cursor: pointer; text-decoration: underline; font-size: 12.5px; padding: 0; }

/* Needs-action queue */
.queue-section { margin-top: 22px; }
.queue-head { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.queue-head .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--muted-bg); color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.queue { display: flex; flex-direction: column; gap: 12px; }
.queue-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; }
.queue-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.queue-title { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.queue-title a { font-size: 15px; }
.queue-sub { font-size: 13px; }
.queue-reason { font-size: 13.5px; font-weight: 500; }
.queue-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.queue-actions form { margin: 0; }
@media (max-width: 640px) {
  .queue-item { flex-direction: column; align-items: stretch; }
  .queue-actions { justify-content: flex-start; }
}

/* In-app confirmation modal (replaces window.confirm) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(17, 24, 39, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: modal-fade .12s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  animation: modal-pop .14s ease-out;
}
@keyframes modal-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.modal-body { font-size: 14.5px; color: var(--muted); line-height: 1.5; margin: 0 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions .btn { min-width: 92px; justify-content: center; }

/* Sortable table headers + pagination (dashboard) */
.sorth { color: var(--muted); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.sorth:hover { color: var(--accent); }
.sorth.on { color: var(--fg); }
.sorth .arr { color: var(--accent); font-size: 11px; }
td .sub.fail { color: var(--error-fg); font-weight: 600; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.pg-links { display: flex; align-items: center; gap: 8px; }
.pg-links a, .pg-links .disabled { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--fg); font-weight: 600; }
.pg-links a:hover { border-color: var(--accent); color: var(--accent); }
.pg-links .disabled { color: var(--muted); opacity: .5; }
.pg-cur { font-weight: 600; }

/* --- Collapsible sidebar + footer user menu --- */
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-toggle { flex: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; }
.side-toggle:hover { color: var(--accent); border-color: var(--accent); }
.side-nav a .ico { width: 20px; height: 20px; flex: none; }
.side-nav a .count-badge { margin-left: auto; }
.side-nav a .label { white-space: nowrap; }

/* Footer user button + dropdown */
.side-user { position: relative; display: block; }
.user-btn { width: 100%; display: flex; align-items: center; gap: 10px; background: none;
  border: 1px solid transparent; border-radius: 10px; padding: 7px 8px; cursor: pointer;
  color: var(--ink); text-align: left; }
.user-btn:hover { background: var(--muted-bg); }
.user-btn .user-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.user-btn .user-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .user-role { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.user-btn .chev { flex: none; margin-left: auto; color: var(--muted); }
.user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 50;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; background: none;
  border: 0; border-radius: 7px; padding: 9px 11px; font-size: 13.5px; font-weight: 600;
  color: var(--fg); text-decoration: none; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { background: var(--muted-bg); color: var(--accent); }
.user-menu form { margin: 0; }
.user-menu[hidden] { display: none !important; }

/* Collapsed state */
.sidebar.collapsed { flex-basis: 66px; width: 66px; padding-left: 10px; padding-right: 10px; }
.sidebar.collapsed .brand-name, .sidebar.collapsed .brand .pill,
.sidebar.collapsed .label { display: none; }
.sidebar.collapsed .side-top { justify-content: center; }
.sidebar.collapsed .brand { display: none; }
.sidebar.collapsed .side-nav a { justify-content: center; padding: 0; }
.sidebar.collapsed .org-switch { display: none; }
.sidebar.collapsed .user-btn { justify-content: center; padding: 7px 0; }
.sidebar.collapsed .user-menu { left: 8px; width: 210px; right: auto; }

/* Clickable KPI card (Needs action) */
a.kpi-link { text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
a.kpi-link:hover { border-color: var(--accent); transform: translateY(-1px); }

@media (max-width: 860px) {
  .sidebar.collapsed { flex-basis: auto; width: auto; }
  .sidebar.collapsed .label, .sidebar.collapsed .brand { display: initial; }
  .side-user { width: auto; }
  .user-menu { left: auto; right: 0; width: 220px; }
}

/* Agency filter + search row */
.search { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; position: static; min-width: 0; }
.agency-select { min-height: 44px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 14px; max-width: 190px; }
.search-box { position: relative; flex: 0 1 300px; min-width: 170px; }
.search-box svg { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.search-box input { width: 100%; min-height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--input-line); border-radius: 10px; font-size: 14px; background: var(--panel); color: var(--ink); }

.btn-xs { min-height: 28px; padding: 0 9px; font-size: 12px; }

/* --- Client page: tabbed Subscription / Charge now --- */
.tabs-panel { padding: 0; }  /* no overflow:hidden — it clipped the Pause popover */
.tabbar { display: flex; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 13px 18px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--fg); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.tab-body { padding: 18px 20px 20px; }
.tab-body[hidden] { display: none !important; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub-status { color: var(--ok-fg); font-weight: 700; font-size: 13px; }
.kv-rows { display: flex; flex-direction: column; margin-top: 14px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row span:first-child { color: var(--muted); }
.kv-row.strong { font-weight: 700; }
.kv-row.strong span:first-child { color: var(--fg); }
.kv-note { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.sub-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.empty-plan { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 16px; }
.empty-plan .empty-title { font-weight: 700; font-size: 15px; }
.empty-plan .btn { margin-top: 8px; }

.inline-amount { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }

/* --- Additional subscriptions (client page) --- */
.extra-sub-row { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.extra-sub-row:last-of-type { border-bottom: 0; }
.sub-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.es-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.es-name { font-weight: 600; font-size: 14px; }
.es-meta { font-size: 12.5px; }
.es-items { font-size: 11.5px; color: var(--muted); opacity: .85; }
.es-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-breakdown { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sub-breakdown td { padding: 7px 12px; border-top: 1px solid var(--line-soft); }
.sub-breakdown tr:first-child td { border-top: 0; }
.sub-breakdown .bd-label { color: var(--ink); }
.sub-breakdown .bd-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.sub-breakdown .bd-sub td { color: var(--muted); }
.sub-breakdown .bd-total td { font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--line); }
.add-sub-form { margin-top: 14px; padding: 14px; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 10px; }
.add-sub-form[hidden] { display: none !important; }
.asf-grid { display: grid; grid-template-columns: 1.4fr 0.9fr 1.1fr 0.8fr; gap: 8px; }
.asf-grid > input, .asf-grid select { min-height: 40px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 10px; background: var(--panel); color: var(--ink); font-size: 14px; width: 100%; }
@media (max-width: 560px) { .asf-grid { grid-template-columns: 1fr 1fr; } }

/* Discount inputs */
.discount-input-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.disc-type { min-height: 40px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 8px; background: var(--panel); color: var(--ink); font-size: 13px; }

.sub-head-actions { display: flex; align-items: center; gap: 8px; }

.sub-when { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Charge detail popup */
.charge-detail[hidden] { display: none !important; }
.charge-modal { max-width: 470px; text-align: left; }
.cm-body { max-height: 62vh; overflow-y: auto; }
.cm-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.cm-rows { display: flex; flex-direction: column; }
.cm-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.cm-row:last-child { border-bottom: 0; }
.cm-row.cm-total { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.cm-row.cm-total > span:first-child { color: var(--ink); }
.cm-row > span:first-child { color: var(--muted); flex: none; }
.cm-row > span:last-child { text-align: right; word-break: break-all; }

/* Additional subscriptions: a distinct tinted zone below the main plan */
.extra-subs { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.extra-subs-head { align-items: center; }
.extra-subs-title { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-dark); }
.extra-subs .extra-sub-row { border-bottom-color: var(--line); }

.charge-modal { position: relative; padding-top: 30px; }
.cm-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cm-close:hover { background: var(--muted-bg); color: var(--fg); }

.asf-product { width: 100%; min-height: 40px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 10px; background: var(--panel); color: var(--ink); font-size: 14px; }

/* Add-subscription form laid out like the primary plan editor */
.add-sub-form { display: flex; flex-direction: column; gap: 11px; }
.sub-opts-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-opts-row select, .sub-opts-row input { min-height: 44px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 12px; background: var(--panel); color: var(--ink); font-size: 14px; }
.sub-opts-row select { flex: 1 1 220px; }
.sub-opts-row input { flex: 0 0 130px; }

.ctrl-discount { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.ctrl-discount[hidden] { display: none !important; }

.disc-reason { min-height: 44px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 10px; background: var(--panel); color: var(--ink); font-size: 13px; flex: 1 1 150px; min-width: 120px; }
.ctrl-discount .disc-reason { min-height: 36px; flex: 1 1 120px; }

/* Utilities — extracted from former inline styles (keep at end so they win ties). */
.d-inline { display: inline; }
.d-flex { display: flex; }
.fd-col { flex-direction: column; }
.fw-wrap { flex-wrap: wrap; }
.flex-none { flex: 0 0 auto; }
.ai-center { align-items: center; }
.jc-center { justify-content: center; }
.jc-end { justify-content: flex-end; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-20 { gap: 20px; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
/* Header cells need extra specificity to beat `table.grid th { text-align:left }`
   so an Actions header sits over its right-aligned buttons. */
table.grid th.ta-right { text-align: right; }
table.grid th.ta-center { text-align: center; }
.nowrap { white-space: nowrap; }
.o-55 { opacity: .55; }
.w-full { width: 100%; }
.mw-90 { max-width: 90px; }
.mw-100 { max-width: 100px; }
.mw-420 { max-width: 420px; }
.mw-560 { max-width: 560px; }
.mw-720 { max-width: 720px; }
.p-48 { padding: 48px; }
.pt-56 { padding-top: 56px; }
.m-0 { margin: 0; }
.m-8-0 { margin: 8px 0; }
.m-4-0-0 { margin: 4px 0 0; }
.m-0-0-14 { margin: 0 0 14px; }
.mt-4 { margin-top: 4px; }
.mt-5 { margin-top: 5px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }
.mb-10 { margin-bottom: 10px; }
.mb-14 { margin-bottom: 14px; }
.fs-12 { font-size: 12px; }
.fs-12-5 { font-size: 12.5px; }
.fs-13 { font-size: 13px; }
.fs-13-5 { font-size: 13.5px; }
.fs-16 { font-size: 16px; }
.fs-24 { font-size: 24px; }
.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.c-accent-dark { color: var(--accent-dark); }
.c-warn { color: var(--warn-fg); }
.c-ok { color: var(--ok-fg); }
.c-error { color: var(--error-fg); }
.bg-accent-soft { background: var(--accent-soft); }
.gtc-1 { grid-template-columns: 1fr; }
