@font-face {
  font-family: Manrope;
  src: url("./Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  --background: #f3f6fa;
  --surface: #fff;
  --surface-subtle: #f8fafd;
  --surface-hover: #f0f5fb;
  --line: #e0e7f0;
  --line-strong: #ced9e7;
  --ink: #172639;
  --muted: #56687d;
  --blue: #255eaa;
  --blue-strong: #194989;
  --blue-soft: #e9f1fc;
  --comparison: #60758f;
  --graphite: #172332;
  --rail-line: #304257;
  --rail-text: #d0dbea;
  --rail-muted: #9caec3;
  --rail-current: #263d5b;
  --positive: #176442;
  --positive-soft: #e7f5ed;
  --warning: #84520d;
  --warning-soft: #fbf0d9;
  --negative: #9a3443;
  --negative-soft: #fbecef;
  --violet: #634e8f;
  --violet-soft: #f0ebf9;
  --radius: 14px;
  --sidebar-width: 228px;
  --topbar-height: 64px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-padding-block-start: calc(var(--topbar-height) + 12px); }
body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.5; }
a, button { color: inherit; touch-action: manipulation; }
a { text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
select { cursor: pointer; }
input, textarea { caret-color: var(--blue); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
img { display: block; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2, strong { font-weight: 770; }
::selection { color: var(--blue-strong); background: #d4e4fc; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
main:focus, h1:focus, #detail-title:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 10; inset: -80px auto auto 12px; padding: 10px 14px; border-radius: 8px; background: var(--surface); color: var(--blue); }
.skip-link:focus { top: 12px; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.sidebar, .nav-drawer { background: var(--graphite); color: var(--rail-text); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 15px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; width: fit-content; margin: 1px 8px 31px; color: var(--surface); }
.brand img, .mobile-brand img { border-radius: 9px; object-fit: cover; }
.brand strong { display: block; font-size: 21px; letter-spacing: -.035em; line-height: 1.2; }
.brand small { display: block; color: var(--rail-muted); font-size: 11px; font-weight: 650; margin-top: 3px; }
.navigation { display: grid; gap: 26px; padding-bottom: 16px; }
.nav-group { display: grid; gap: 3px; }
.nav-label { margin: 0 11px 5px; color: var(--rail-muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.nav-link { min-height: 41px; display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; }
.nav-link .icon { color: #a9bad1; }
.nav-link:hover { background: #203145; color: var(--surface); }
.nav-link[aria-current="page"] { border-color: #385477; background: var(--rail-current); color: #eff5ff; font-weight: 760; }
.nav-link[aria-current="page"] .icon { color: #a7c9f9; }
.sidebar :focus-visible, .nav-drawer :focus-visible { outline-color: #a7c9f9; }
.operator { margin-top: auto; padding: 15px 7px 0; border-top: 1px solid var(--rail-line); display: flex; align-items: center; gap: 10px; }
.operator-mark { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; color: #b4cced; background: var(--rail-current); border-radius: 9px; }
.operator strong, .operator small { display: block; }
.operator strong { color: #e8effa; font-size: 12px; }
.operator small { margin-top: 1px; color: var(--rail-muted); font-size: 11px; }

.workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 2; min-height: var(--topbar-height); border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner, .main-content { max-width: 1520px; margin-inline: auto; padding-inline: var(--gutter); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--topbar-height); }
.mobile-header { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 680; min-width: 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs .icon { width: 13px; height: 13px; color: var(--muted); }
.breadcrumbs [aria-current] { font-weight: 780; }
.topbar-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.quick-search {
  display: flex; align-items: center; gap: 9px;
  min-height: 36px; min-width: 220px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle);
  color: var(--muted); text-align: left; font-size: 12px; font-weight: 680;
}
.quick-search:hover { border-color: var(--line-strong); color: var(--blue); background: var(--blue-soft); }
.quick-search .icon { width: 16px; height: 16px; }
kbd { margin-left: auto; padding: 1px 5px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; color: var(--muted); font-family: inherit; font-weight: 760; font-size: 10px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }

.main-content { padding-block: 28px 40px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.page-heading h1 { font-size: 32px; line-height: 1.22; letter-spacing: -.035em; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.heading-separator { margin-inline: 3px; }
.page-heading > .button, .period-control { flex: 0 0 auto; }
.select-control { position: relative; display: inline-flex; align-items: center; min-width: 0; color: var(--muted); }
.select-control select {
  width: 100%; min-height: 40px; appearance: none;
  padding: 0 34px 0 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 730;
}
.select-control select:hover { border-color: var(--blue); }
.select-control .icon { position: absolute; right: 10px; width: 15px; height: 15px; pointer-events: none; }
.period-control select { padding-left: 35px; }
.period-control .icon:first-child { left: 11px; }

.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; min-height: 56px; }
.panel h2 { font-size: 16px; line-height: 1.35; letter-spacing: -.015em; }
.panel-heading p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; }
.metric { padding: 15px 18px 16px; border-inline-end: 1px solid var(--line); }
.metric:last-child { border-inline-end: 0; }
.metric dt { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 32px; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.25; }
.metric-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.metric-icon .icon { width: 17px; height: 17px; }
.metric-value { margin-block: 3px 4px; font-variant-numeric: tabular-nums; font-size: 27px; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.metric-note { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 670; }
.metric-note .icon { width: 13px; height: 13px; }
.metric-positive { color: var(--positive); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(288px, 1fr); gap: 18px; margin-bottom: 18px; }
.chart-panel { display: flex; flex-direction: column; }
.overview-grid:has(.chart-toggle[aria-expanded="true"]) .queue-panel { align-self: start; }
@media (min-width: 1021px) {
  .chart-panel { grid-area: 1 / 1; }
  .queue-panel { grid-area: 1 / 2; }
}
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; column-gap: 13px; row-gap: 5px; color: var(--muted); font-size: 10px; font-weight: 750; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chart-legend i { width: 15px; border-top: 2px solid #3575d0; }
.chart-legend .legend-previous { border-top: 2px dashed var(--comparison); }
.chart-frame { display: grid; grid-template-columns: 42px minmax(0, 1fr); margin: 3px 20px 11px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; height: 168px; padding-right: 9px; }
.chart-scale, .chart-dates { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 670; white-space: nowrap; }
.chart { display: block; width: 100%; height: 168px; overflow: visible; }
.chart-gridline { stroke: #e3ebf5; vector-effect: non-scaling-stroke; }
.chart-fill { fill: #eaf2ff; }
.chart-line { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-current { stroke: #3575d0; stroke-width: 2.4; }
.chart-previous { stroke: var(--comparison); stroke-width: 1.5; stroke-dasharray: 4 5; }
.chart-point { stroke: #3575d0; stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-dates { display: flex; justify-content: space-between; margin-top: 6px; }
.chart-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.chart-footer strong { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.chart-data { width: 100%; border-collapse: collapse; font-size: 12px; }
.chart-data :is(th, td) { width: 50%; padding: 8px 13px; border-top: 1px solid var(--line); text-align: left; }
.chart-data th { color: var(--muted); background: var(--surface-subtle); }
.chart-data td > :is(span, strong) { display: block; }
.chart-data td > span { color: var(--muted); }

.queue-panel .panel-heading { align-items: flex-start; padding-bottom: 9px; }
.review-queue { list-style: none; padding: 0 13px 9px; margin: 0; }
.review-queue li + li { border-top: 1px solid var(--line); }
.review-queue a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 13px; align-items: center; gap: 10px; min-height: 61px; padding: 7px; border-radius: 8px; }
.review-queue a:hover { background: var(--surface-hover); }
.queue-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--tone-bg); color: var(--tone-ink); }
.queue-icon .icon { width: 17px; height: 17px; }
.queue-copy strong, .queue-copy small { display: block; }
.queue-copy strong { font-size: 12px; }
.queue-copy small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.queue-count { min-width: 22px; border-radius: 6px; padding: 2px 5px; color: var(--ink); background: var(--background); text-align: center; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.review-queue a > .icon { width: 13px; height: 13px; color: var(--muted); }

.tone-positive { --tone-bg: var(--positive-soft); --tone-ink: var(--positive); }
.tone-warning { --tone-bg: var(--warning-soft); --tone-ink: var(--warning); }
.tone-negative { --tone-bg: var(--negative-soft); --tone-ink: var(--negative); }
.tone-info { --tone-bg: var(--blue-soft); --tone-ink: var(--blue-strong); }
.tone-neutral { --tone-bg: #edf1f6; --tone-ink: #53647b; }
.tone-violet { --tone-bg: var(--violet-soft); --tone-ink: var(--violet); }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 8px; background: var(--tone-bg); color: var(--tone-ink); border-radius: 6px; font-size: 11px; line-height: 1.35; font-weight: 780; white-space: nowrap; }
.status::before { width: 5px; height: 5px; }

.text-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 780; line-height: 1.4; }
.text-link:hover { color: var(--blue-strong); text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 14px; height: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
.records { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.records thead { background: var(--surface-subtle); }
.records th { padding: 9px 10px; border-top: 1px solid var(--line); color: var(--muted); text-align: left; font-size: 11px; font-weight: 770; }
.records td { padding: 10px; border-top: 1px solid var(--line); }
.records :is(td, th):first-child { padding-left: 20px; }
.records :is(td, th):last-child { padding-right: 20px; }
.records tr[data-record] { cursor: pointer; }
.records tr[data-record]:hover, .records tr[data-record]:focus-within { background: var(--surface-hover); }
.records tbody tr:last-child td:first-child { border-end-start-radius: var(--radius); }
.records tbody tr:last-child td:last-child { border-end-end-radius: var(--radius); }
.record-heading { width: 30%; }
.record-button { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; vertical-align: middle; padding: 0; border: 0; background: transparent; border-radius: 3px; line-height: 1.35; }
.record-button strong { font-size: 12px; }
.record-button small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.record-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; vertical-align: middle; border-radius: 9px; background: var(--tone-bg); color: var(--tone-ink); font-size: 11px; font-weight: 800; }
.row-chevron { width: 20px; color: var(--muted); }
.row-chevron .icon { width: 14px; height: 14px; }
.cell-amount { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 770; }
.cell-mono { font-family: ui-monospace, "Liberation Mono", monospace; font-size: 12px; }
.overview-activity { margin-bottom: 18px; }
.finance-strip { display: flex; align-items: center; gap: 26px; padding: 12px 20px; color: var(--muted); font-size: 12px; }
.finance-strip div { display: flex; flex-wrap: wrap; column-gap: 8px; }
.finance-strip strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.finance-strip a { margin-left: auto; }

.button, .icon-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  font-size: 12px; font-weight: 780;
}
.button:hover:not(:disabled), .icon-button:hover { background: var(--surface-hover); }
.button .icon { width: 16px; height: 16px; }
.button.primary { color: var(--surface); background: var(--blue); border-color: var(--blue); }
.button.primary:hover:not(:disabled) { background: var(--blue-strong); border-color: var(--blue-strong); }
.button.danger { color: var(--negative); }
.button.primary.danger { color: var(--surface); background: var(--negative); border-color: var(--negative); }
.button.primary.danger:hover:not(:disabled) { background: #782536; border-color: #782536; }
.button:disabled { background: var(--background); color: var(--muted); border-color: var(--line); }
.icon-button { width: 38px; flex: 0 0 auto; border-color: transparent; padding: 0; color: var(--muted); background: transparent; }

.subnav { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--line-strong); margin-bottom: 17px; }
.subnav a { padding: 8px 2px 10px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px; font-weight: 750; }
.subnav a:hover { color: var(--blue); }
.subnav a[aria-current="page"] { color: var(--blue); border-color: var(--blue); }
.table-toolbar { display: flex; justify-content: space-between; gap: 10px; padding: 13px 16px; }
.field-search { display: flex; align-items: center; gap: 8px; flex: 0 1 350px; min-height: 40px; min-width: 0; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--muted); }
.field-search:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.field-search .icon { width: 17px; height: 17px; }
.field-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.table-footer { min-height: 43px; padding: 11px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 32px 8px; text-align: center; }
.empty-state > .icon { color: var(--muted); margin-bottom: 3px; }
.empty-state p { margin-bottom: 5px; color: var(--muted); }

dialog { color: var(--ink); }
dialog::backdrop { background: #18253666; }
.nav-drawer, .detail-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; max-height: none; height: 100dvh; border: 0; }
.detail-drawer { width: min(100%, 463px); max-width: 100%; padding: 0; background: var(--surface); box-shadow: -14px 0 36px #0002; }
.detail-drawer[open] { animation: drawer-in 180ms cubic-bezier(.22, 1, .36, 1); }
@keyframes drawer-in { from { transform: translateX(22px); opacity: .58; } to { transform: none; opacity: 1; } }
.detail-content { min-height: 100%; display: flex; flex-direction: column; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 18px 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 22px; letter-spacing: -.025em; line-height: 1.3; }
.drawer-header p { margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.drawer-header .icon-button { margin-top: -4px; }
.drawer-body { padding: 20px 24px 24px; }
.drawer-body > .status { margin-bottom: 10px; }
.drawer-footer { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: auto; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.detail-fields { margin-bottom: 12px; }
.detail-fields > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-fields dt { color: var(--muted); }
.detail-fields dd { min-width: 0; overflow-wrap: anywhere; text-align: right; font-weight: 750; }
.record-note, .demo-notice { display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-size: 12px; font-weight: 675; }
.record-note { margin: 5px 0 8px; }
.record-note .icon, .demo-notice .icon { width: 16px; height: 16px; margin-top: 1px; }
.record-links { display: grid; justify-items: start; gap: 12px; margin-top: 18px; }
.referrals-list { margin-top: 16px; padding-block: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.referrals-list summary { cursor: pointer; font-weight: 770; }
.referrals-list summary > span { margin-left: 3px; color: var(--muted); }
.referrals-list p, .referrals-list ul { margin-top: 10px; color: var(--muted); }
.referrals-list ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.referrals-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
.drawer-back { margin-bottom: 16px; }
.action-context { display: grid; gap: 2px; margin-bottom: 17px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-subtle); }
.action-context span { color: var(--muted); font-size: 12px; }
.action-fields { display: grid; gap: 11px; margin-bottom: 17px; }
.action-fields:empty { margin-bottom: 0; }
.field { display: grid; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 750; }
.field input, .field textarea, .field select {
  padding: 9px 10px; width: 100%; min-width: 0; min-height: 40px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 580;
}
.field textarea { resize: vertical; }
.field :is(input, textarea, select):hover { border-color: var(--blue); }

.search-dialog { width: min(530px, calc(100% - 28px)); max-width: 100%; max-height: min(75dvh, 620px); margin: max(12px, 11dvh) auto auto; padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 18px 54px #0003; background: var(--surface); }
.search-header { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; padding: 8px 11px 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.search-header input { width: 100%; min-width: 0; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-header input:focus-visible { outline: none; }
.search-header:focus-within { border-bottom-color: var(--blue); }
.search-results ul { list-style: none; margin: 0; padding: 5px 8px 8px; }
.search-results a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 7px 9px; border-radius: 8px; }
.search-results a:hover, .search-results a:focus { background: var(--blue-soft); color: var(--blue-strong); }
.search-results a:focus-visible { outline-offset: -2px; }
.search-results a > span { flex: 1; }
.search-results .icon { width: 16px; height: 16px; color: var(--muted); }
.search-results strong, .search-results small { display: block; }
.search-results strong { font-size: 12px; }
.search-results small, .search-empty { color: var(--muted); font-size: 11px; }
.search-empty { padding: 19px; font-size: 13px; }

.broadcast-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.broadcast-editor { padding: 19px 20px; }
.broadcast-editor .button { margin-top: 14px; }
.broadcast-editor .detail-fields { margin: 8px 0 16px; }
.character-count { text-align: right; margin: 6px 0 12px; color: var(--muted); font-size: 11px; }
.broadcast-preview { padding-bottom: 16px; background: var(--surface-subtle); }
.message-preview { padding: 12px 14px; margin: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.message-author { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--blue); font-size: 12px; font-weight: 800; }
.message-author img { border-radius: 50%; }
.message-preview p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }

@media (max-width: 1170px) {
  :root { --gutter: 24px; --sidebar-width: 210px; }
  .metric { padding-inline: 14px; }
  .metric-value { font-size: 24px; }
}

@media (max-width: 1020px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .review-queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  .review-queue li:nth-child(2) { border-top: 0; }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; --topbar-height: 58px; }
  .sidebar, .breadcrumbs { display: none; }
  .workspace { margin-left: 0; }
  .mobile-header, .mobile-brand { display: flex; align-items: center; gap: 7px; }
  .mobile-brand { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
  .mobile-header .icon-button { margin-left: -7px; }
  .nav-drawer { inset: 0 auto 0 0; padding: 15px; width: min(280px, 88%); }
  .mobile-nav-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
  .mobile-nav-header .brand { margin: 5px 0 0 7px; }
  .nav-drawer .icon-button { color: var(--rail-text); }
  .nav-drawer .icon-button:hover { background: var(--rail-current); }
}

@media (max-width: 660px) {
  :root { --gutter: 15px; }
  .main-content { padding-block: 20px 26px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { font-size: 12px; }
  .panel-heading { padding-inline: 14px; }
  .panel h2 { font-size: 15px; }
  .quick-search { min-width: 38px; justify-content: center; padding: 0; }
  .quick-search span, .quick-search kbd { display: none; }
  .topbar-actions { gap: 8px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-inline-end: 0; }
  .metric:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .metric dt { gap: 4px; }
  .metric-icon { flex-basis: 28px; height: 28px; }
  .metric-icon .icon { width: 15px; height: 15px; }
  .metric-value { font-size: 23px; }
  .review-queue { display: block; padding-inline: 8px; }
  .review-queue li:nth-child(2) { border-top: 1px solid var(--line); }
  .review-queue a { min-height: 57px; }
  .chart-panel .panel-heading { flex-wrap: wrap; justify-content: space-between; }
  .chart-frame { margin-inline: 14px; grid-template-columns: 38px minmax(0, 1fr); }
  .chart-dates.long-series span:nth-child(even) { display: none; }
  .chart-footer { padding-inline: 14px; }
  .finance-strip { flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 10px; padding: 12px 14px; }
  .finance-strip a { margin-left: 0; }
  .table-toolbar { padding: 11px; flex-wrap: wrap; }
  .field-search { flex: 1 1 100%; }
  .filter-select { max-width: 100%; }
  .table-footer { padding-inline: 13px; }
  .records thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .records, .records tbody { display: block; }
  .records tr { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 11px; padding: 12px 13px; border-top: 1px solid var(--line); }
  .records td, .records :is(td, th):first-child, .records :is(td, th):last-child { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; font-size: 12px; }
  .records td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 750; }
  .records .record-cell { grid-column: 1 / -1; padding-right: 18px; }
  .records .record-button { max-width: 100%; }
  .records .status { white-space: normal; }
  .records .row-chevron { position: absolute; inset: 12px 10px auto auto; }
  .records .empty-row td { grid-column: 1 / -1; }
  .subnav { gap: 4px 14px; }
  .subnav a { font-size: 12px; }
  .broadcast-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; }
}

.auth-screen { display: grid; min-height: 100dvh; place-items: center; padding: 22px; }
.auth-panel { width: min(100%, 435px); padding: 29px; }
.auth-panel img { border-radius: 11px; margin-bottom: 14px; }
.auth-panel h1 { font-size: 25px; letter-spacing: -.027em; margin-bottom: 8px; }
.auth-panel p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-panel code { color: var(--blue-strong); background: var(--blue-soft); padding: 2px 5px; border-radius: 4px; }
.auth-panel .auth-status:not(:empty) { margin-top: 14px; }
.load-state { padding: 18px; color: var(--muted); font-size: 13px; }
.load-state .button { margin-top: 10px; }
.list-controls, .list-pages, .list-pages > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.list-pages { justify-content: space-between; }
.list-pages button { min-height: 32px; }
.config-list { padding: 0 17px; }
.config-list > div { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) auto; align-items: center; gap: 10px; padding: 11px 2px; }
.config-list > div + div { border-top: 1px solid var(--line); }
.config-list span { color: var(--muted); overflow-wrap: anywhere; }
.records .record-button { max-width: min(270px, 100%); overflow-wrap: anywhere; }
.form-error { padding: 10px 11px; background: var(--negative-soft); color: var(--negative); border-radius: 8px; }
.record-evidence { margin-block: 13px; }
.record-evidence h3 { margin: 0 0 5px; font-size: 13px; }
.record-evidence p, .action-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 11px; border-radius: 8px; background: var(--surface-subtle); }
.action-message { margin-bottom: 12px; }
.checkbox-field { display: flex; align-items: baseline; gap: 7px; font-size: 13px; font-weight: 720; }
.checkbox-field input { accent-color: var(--blue); }
.console-notice { position: fixed; z-index: 5; right: 15px; bottom: 15px; padding: 12px 15px; max-width: calc(100% - 30px); color: var(--surface); background: var(--graphite); border-radius: 8px; box-shadow: 0 6px 22px #0002; }
.referral-rows { list-style: none; margin: 0; padding: 0; }
.referral-rows li { display: flex; justify-content: space-between; gap: 8px; padding-block: 9px; color: var(--muted); }
.referral-rows li + li { border-top: 1px solid var(--line); }
.transaction-rows strong, .transaction-rows small { display: block; overflow-wrap: anywhere; }
.transaction-rows strong { color: var(--ink); }
.transaction-rows li > strong { flex: 0 0 auto; }
@media (max-width: 660px) {
  .config-list > div { grid-template-columns: 1fr auto; }
  .config-list strong { grid-column: 1 / -1; }
  .records .record-button { max-width: 100%; }
}
