/* Styles Vault console (2026-09-23). Admin only; the public apply pages never load this file.
   Palette: Styles Ops harbor navy + copper, mist/paper surfaces, navy-night dark theme.
   Type: Instrument Sans (self-hosted), condensed widths for headings and figures. */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url("fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url("fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url("fonts/instrument-sans-italic-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* Styles brand system, matched to dispatch.stylesops.com (tokens.css): ink / paper / gold planes; hue is data. */
  --bg: #f4f0e7; --surface: #fbf9f4; --surface-2: #f4f0e7; --surface-3: #eae3d5;
  --line: rgba(23,21,18,.14); --line-strong: rgba(23,21,18,.30);
  --ink: #171512; --text: #171512; --muted: #55504a; --faint: #6a645b;
  --primary: #c9a466; --primary-hover: #e3bf7c; --primary-ink: #0e0d0b;
  --copper: #c9a466; --copper-strong: #88692d; --copper-ink: #0e0d0b; --copper-soft: #f6edda; --peach: #e3bf7c;
  --nav-bg: #0e0d0b; --nav-line: rgba(227,191,124,.42); --nav-ink: #aca596; --nav-ink-strong: #efece4; --nav-dim: #8a8375;
  --nav-hover: rgba(239,236,228,.06); --nav-active: rgba(227,191,124,.12);
  --ok: #3f6f4a; --ok-bg: #e4eee5; --warn: #7a5a05; --warn-bg: #f8efd3; --bad: #a8452f; --bad-bg: #f7e7e2;
  --info: #2f5d7c; --info-bg: #e5edf3; --neutral: #6a645b; --neutral-bg: rgba(23,21,18,.05);
  --focus: #1d4560;
  --shadow-1: 0 1px 0 rgba(23,21,18,.05);
  --shadow-2: 0 10px 28px -14px rgba(14,13,11,.28);
  --shadow-pop: 0 24px 60px rgba(14,13,11,.26);
  --backdrop: rgba(14,13,11,.55);
  --r-lg: 12px; --r-md: 8px; --r-sm: 6px; --r-pill: 999px;
  --sidebar: 236px;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* property identity (console-only; the brand kits are nearly all gold) */
  --p-palm-harbor: #2a9a88; --p-waterford-bay: #2f74c0; --p-bungalows: #c24d80; --p-heatherwood: #7b5cc4;
  --p-indian-river: #2596b4; --p-jaxbay: #3f9651; --p-lakewood: #5566cc; --p-liveoak: #8a9a2b;
  --p-morningside: #c9932a; --p-regal-court: #c2413b; --p-sanctuary: #5f7d8f; --p-stone-cove: #a651a8;
  --p-vintage-grove: #a86a3c; --p-central: #8a6d3b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0d0b; --surface: #141311; --surface-2: #1c1b18; --surface-3: #262420;
    --line: rgba(239,236,228,.14); --line-strong: rgba(239,236,228,.30);
    --ink: #efece4; --text: #efece4; --muted: #aca596; --faint: #8a8375;
    --primary: #e3bf7c; --primary-hover: #f4e6c9; --primary-ink: #0e0d0b;
    --copper: #e3bf7c; --copper-strong: #e3bf7c; --copper-ink: #0e0d0b; --copper-soft: rgba(227,191,124,.12); --peach: #e3bf7c;
    --nav-bg: #0e0d0b; --nav-line: rgba(227,191,124,.42); --nav-hover: rgba(239,236,228,.05); --nav-active: rgba(227,191,124,.12);
    --ok: #86b892; --ok-bg: rgba(134,184,146,.14); --warn: #e8c766; --warn-bg: rgba(232,199,102,.13); --bad: #e8927e; --bad-bg: rgba(232,146,126,.14);
    --info: #9cc2dc; --info-bg: rgba(156,194,220,.14); --neutral: #8a8375; --neutral-bg: rgba(239,236,228,.06);
    --focus: #e3bf7c;
    --shadow-1: none; --shadow-2: 0 12px 30px -14px rgba(0,0,0,.6); --shadow-pop: 0 24px 60px rgba(0,0,0,.6);
    --backdrop: rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0d0b; --surface: #141311; --surface-2: #1c1b18; --surface-3: #262420;
  --line: rgba(239,236,228,.14); --line-strong: rgba(239,236,228,.30);
  --ink: #efece4; --text: #efece4; --muted: #aca596; --faint: #8a8375;
  --primary: #e3bf7c; --primary-hover: #f4e6c9; --primary-ink: #0e0d0b;
  --copper: #e3bf7c; --copper-strong: #e3bf7c; --copper-ink: #0e0d0b; --copper-soft: rgba(227,191,124,.12); --peach: #e3bf7c;
  --nav-bg: #0e0d0b; --nav-line: rgba(227,191,124,.42); --nav-hover: rgba(239,236,228,.05); --nav-active: rgba(227,191,124,.12);
  --ok: #86b892; --ok-bg: rgba(134,184,146,.14); --warn: #e8c766; --warn-bg: rgba(232,199,102,.13); --bad: #e8927e; --bad-bg: rgba(232,146,126,.14);
  --info: #9cc2dc; --info-bg: rgba(156,194,220,.14); --neutral: #8a8375; --neutral-bg: rgba(239,236,228,.06);
  --focus: #e3bf7c;
  --shadow-1: none; --shadow-2: 0 12px 30px -14px rgba(0,0,0,.6); --shadow-pop: 0 24px 60px rgba(0,0,0,.6);
  --backdrop: rgba(0,0,0,.6);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.console {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01" 0;
}
a { color: var(--info); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 650; letter-spacing: -.005em; }
h1 { font-size: 26px; line-height: 1.15; font-stretch: 86%; font-weight: 650; }
h2 { font-size: 16px; line-height: 1.3; }
h3 { font-size: 14px; }
p { margin: 0 0 10px; }
code { font-family: var(--font); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted, .row-secondary { color: var(--muted); }
.faint { color: var(--faint); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.45; }
.error { color: var(--bad); font-size: 12.5px; margin-top: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { display: none; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }

/* ---------- frame ---------- */
.frame { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--nav-bg) var(--sidebar), transparent var(--sidebar)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--nav-bg); color: var(--nav-ink); border-right: 1px solid var(--nav-line); padding: 18px 12px 14px;
}
.wordmark { display: flex; align-items: baseline; gap: 7px; padding: 4px 10px 18px; text-decoration: none; color: var(--nav-ink-strong); }
.wordmark-a { font-size: 21px; font-weight: 700; font-stretch: 80%; letter-spacing: .08em; }
.wordmark-b { font-size: 21px; font-weight: 400; font-stretch: 80%; letter-spacing: .08em; color: var(--peach); }
.wordmark:hover { color: var(--nav-ink-strong); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin-top: 18px; padding: 0 10px 6px; font-size: 12px; color: var(--nav-dim, #8a8375); }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--nav-ink); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--nav-hover); color: var(--nav-ink-strong); }
.nav a.is-active { background: var(--nav-active); color: var(--peach); box-shadow: inset 2px 0 0 var(--peach); }
.nav a .count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--nav-ink); }
.nav a.is-active .count { color: var(--peach); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(239,236,228,.14); padding-top: 12px; display: grid; gap: 8px; }
.whoami { display: flex; align-items: center; gap: 10px; padding: 4px 8px; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: #262420; color: var(--peach); border: 1px solid rgba(227,191,124,.42); font-weight: 650; font-size: 12px; font-stretch: 85%;
}
.whoami-text { min-width: 0; line-height: 1.25; }
.whoami-name { color: var(--nav-ink-strong); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami-role { color: var(--nav-dim, #8a8375); font-size: 12px; }
.sidebar-actions { display: flex; gap: 6px; padding: 0 4px; }
.side-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px;
  border-radius: var(--r-sm); border: 1px solid rgba(239,236,228,.14); background: transparent; color: var(--nav-ink);
  font: inherit; font-size: 12.5px; cursor: pointer;
}
.side-btn:hover { background: var(--nav-hover); color: var(--peach); border-color: rgba(227,191,124,.42) !important; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.search-trigger {
  display: flex; align-items: center; gap: 10px; width: min(460px, 100%); height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--muted);
  font: inherit; cursor: pointer; text-align: left; box-shadow: var(--shadow-1);
}
.search-trigger:hover { border-color: var(--faint); color: var(--text); }
.search-trigger span { flex: 1; }
kbd {
  font-family: var(--font); font-size: 11.5px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; line-height: 18px;
}
.topbar-spacer { flex: 1; }
.clock { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reveal-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.content { padding: 26px 28px 60px; width: 100%; max-width: 1480px; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.page-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons & fields ---------- */
.button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--primary); background: var(--primary); color: var(--primary-ink);
  font: inherit; font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.button:hover, .btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.button.secondary, .btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.button.secondary:hover, .btn.secondary:hover { background: var(--surface-2); border-color: var(--faint); color: var(--ink); }
.button.ghost, .btn.ghost { background: transparent; color: var(--text); border-color: transparent; }
.button.ghost:hover, .btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.button.danger, .btn.danger { background: var(--surface); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.button.danger:hover, .btn.danger:hover { background: var(--bad-bg); }
.button.small, .btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.button.button-block, .btn.block { width: 100%; height: 42px; font-size: 14.5px; }
.button:disabled, .btn:disabled, .button[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.field { display: grid; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > label, .field-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 8px 11px; min-height: 36px; width: 100%;
}
textarea { min-height: 60px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--copper); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:disabled, select:disabled, textarea:disabled { opacity: .55; }

/* ---------- chips / pills ---------- */
.pill, .status, .status-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); text-transform: none; letter-spacing: 0;
}
.pill::before, .status::before, .status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.no-dot::before { display: none; }
.pill.ok, .status.paid, .status-pill.paid { background: var(--ok-bg); color: var(--ok); }
.pill.warn, .status.pending, .status-pill.pending { background: var(--warn-bg); color: var(--warn); }
.pill.bad, .status.failed, .status-pill.failed { background: var(--bad-bg); color: var(--bad); }
.pill.info, .status.manager_review { background: var(--info-bg); color: var(--info); }
.pill.copper { background: var(--copper-soft); color: var(--copper-strong); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 500;
}
.chip-counter { font-variant-numeric: tabular-nums; }
.chip, .pill { white-space: nowrap; }
.apps.audit td { vertical-align: top; }
.apps.audit tbody tr:not([data-href]) { cursor: default; }
.chip-teal { background: var(--info-bg); border-color: transparent; color: var(--info); }
.chip-warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.chip-strong { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip-muted { color: var(--muted); }
.chip-gold { background: var(--copper-soft); border-color: transparent; color: var(--copper-strong); }
.chip-set { display: flex; flex-wrap: wrap; gap: 6px; }
.rep {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--ink); font-weight: 650; font-size: 12px; font-stretch: 85%; letter-spacing: .03em;
}
a.rep { text-decoration: none; }
a.rep:hover { background: var(--line); }
.rep.house { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.pdot { width: 9px; height: 9px; border-radius: 3px; flex: none; background: var(--pc, var(--faint)); display: inline-block; }
.prop { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.prop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- alerts & toasts ---------- */
.alert {
  display: block; padding: 11px 14px; border-radius: var(--r-md); margin: 0 0 14px; border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line));
  background: var(--bad-bg); color: var(--ink); font-size: 13.5px;
}
.alert-success { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-bg); }
.alert-warn { border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: var(--warn-bg); }
.alert-info { border-color: color-mix(in srgb, var(--info) 25%, var(--line)); background: var(--info-bg); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--ink); color: var(--surface);
  box-shadow: var(--shadow-pop); font-size: 13.5px; animation: toast-in .18s ease-out;
}
.toast.bad { background: var(--bad); color: #fff; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; font: inherit; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.card-head h2 { font-size: 15px; }
.card-body { padding: 14px 18px 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.panel-pad { padding: 22px 24px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: 28px; }
.page-header-text p { margin: 6px 0 0; max-width: 72ch; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.section { padding: 18px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-head { margin-bottom: 12px; }
.section-head h2 { margin-bottom: 3px; }
.section-head .muted { margin: 0; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.toggle-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.toggle-card { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; }
.toggle-card:hover { border-color: var(--line-strong); }
.toggle-card:has(input:checked) { border-color: color-mix(in srgb, var(--copper) 55%, var(--line)); background: var(--copper-soft); }
.toggle-card input { margin-top: 3px; }
.toggle-card-body { display: grid; gap: 2px; }
.toggle-card-title { font-weight: 600; color: var(--ink); }
.toggle-card-meta { font-size: 12.5px; color: var(--muted); }
.toggle-card.compact { padding: 10px 12px; }
.toggle-helper { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.toggle-helper-count { color: var(--muted); font-size: 13px; }
.toggle-helper-count [data-property-selected] { color: var(--ink); font-weight: 650; }
.toggle-helper-actions { display: flex; gap: 6px; }
.form-actions-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 0 4px; margin-top: 10px; background: linear-gradient(to top, var(--surface) 75%, transparent); border-top: 1px solid var(--line); }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- filter bar (legacy + new) ---------- */
.filter-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 14px; margin-bottom: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filters .field { margin: 0; }
.compact-field { min-width: 150px; }
.search-field { min-width: min(360px, 100%); flex: 1; }
.filter-bar-summary { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
.data-table, .panel table, .grid-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th, .panel table th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
.data-table td, .panel table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13.5px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.row-primary { color: var(--ink); font-weight: 600; }
.row-secondary { font-size: 12.5px; }
.row-actions { text-align: right; white-space: nowrap; }
.row-empty { text-align: center; color: var(--muted); padding: 34px 14px !important; }

/* pagination (custom + Laravel default) */
.pagination-wrap { margin-top: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager-summary { color: var(--muted); font-size: 13px; }
.pager-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pager-controls { display: flex; gap: 4px; align-items: center; }
.pager-button, .pager-page {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px; font-variant-numeric: tabular-nums;
}
.pager-button:hover, .pager-page:hover { border-color: var(--line-strong); color: var(--ink); }
.pager-page.is-current { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pager-button.is-disabled { opacity: .45; }
.pager-ellipsis { color: var(--faint); padding: 0 4px; }
.pagination-wrap nav svg { width: 16px; height: 16px; }
.pagination-wrap nav > div:first-child { display: none; }
.pagination-wrap nav span[aria-current] > span, .pagination-wrap nav a, .pagination-wrap nav span > span {
  display: inline-flex; align-items: center; min-width: 32px; height: 32px; padding: 0 10px; margin: 0 2px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px;
}
.pagination-wrap nav p { color: var(--muted); font-size: 13px; }

/* ---------- dashboard: intake ledger ---------- */
.ledger-band { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; margin-bottom: 18px; overflow: hidden; }
.ledger { padding: 18px 20px 14px; border-right: 1px solid var(--line); min-width: 0; }
.ledger-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ledger-head h2 { font-size: 15px; }
.ledger-head .muted { font-size: 12.5px; }
.ledger-cols { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 168px; }
.ledger-col {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 3px; height: 100%;
  padding: 0 3px 0; border-radius: 6px; text-decoration: none; color: inherit;
}
.ledger-col:hover { background: var(--surface-2); }
.ledger-col.is-selected { background: var(--copper-soft); }
.ledger-count { text-align: center; font-size: 13px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; font-stretch: 85%; }
.ledger-count.zero { color: var(--faint); font-weight: 500; }
.tick { display: block; height: var(--tick, 7px); border-radius: 2px; background: var(--pc, var(--faint)); }
.tick + .tick { margin-top: 0; }
.ledger-stack { display: flex; flex-direction: column-reverse; gap: 2px; max-height: 128px; overflow: hidden; }
.ledger-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.ledger-day { text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.2; font-variant-numeric: tabular-nums; }
.ledger-day b { display: block; font-weight: 600; color: var(--text); }
.ledger-day.today b { color: var(--copper-strong); }
.ledger-day.today { box-shadow: inset 0 2px 0 var(--copper); padding-top: 3px; }
.ledger-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ledger-legend a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.ledger-legend a:hover, .ledger-legend a.is-active { color: var(--ink); }
.ledger-legend a b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.figures { display: grid; grid-template-rows: repeat(4, auto); align-content: start; }
.figure { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 10px; padding: 13px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.figure:last-child { border-bottom: 0; }
a.figure:hover { background: var(--surface-2); }
.figure-label { color: var(--muted); font-size: 13px; }
.figure-value { font-size: 26px; font-weight: 650; color: var(--ink); font-stretch: 80%; font-variant-numeric: tabular-nums; line-height: 1; }
.figure-note { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
.delta-up { color: var(--ok); } .delta-down { color: var(--bad); }
.figure.attention .figure-value { color: var(--bad); }


.ledger-band.cols-3 { grid-template-columns: minmax(0, 1fr) 250px 250px; }
.figures.split { border-right: 1px solid var(--line); }
.reps-panel { padding: 13px 0 6px; min-width: 0; }
.reps-title { padding: 0 18px 6px; color: var(--muted); font-size: 13px; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }

/* ---------- dashboard: side-by-side blocks ---------- */
.dash-row { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.attention-list li:first-child { border-top: 0; }
.attention-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.attention-list a:hover { text-decoration: underline; }
.attention-why { font-size: 12.5px; color: var(--muted); }
.reps { list-style: none; margin: 0; padding: 0 18px 12px; }
.reps li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.reps .bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.reps .bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.reps .name { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reps .n { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- application list ---------- */
.list-card { overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar form { display: contents; }
.toolbar .search { position: relative; flex: 1 1 280px; min-width: 220px; }
.toolbar .search input { padding-left: 34px; height: 36px; }
.toolbar .search svg { position: absolute; left: 11px; top: 10px; color: var(--faint); }
.toolbar .search kbd { position: absolute; right: 9px; top: 9px; }
.toolbar select { width: auto; min-width: 150px; height: 36px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg a, .seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 5px; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg a.is-on, .seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg .n { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.active-filters a.chip { text-decoration: none; }
.active-filters a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.apps { width: 100%; border-collapse: separate; border-spacing: 0; }
.apps th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 9px 14px; background: var(--surface);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.apps td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.apps tbody tr { cursor: pointer; }
.apps tbody tr:hover td { background: var(--surface-2); }
.apps tbody tr.is-focus td { background: color-mix(in srgb, var(--copper-soft) 70%, var(--surface)); }
.apps tbody tr.is-focus td:first-child { box-shadow: inset 3px 0 0 var(--copper); }
.apps tbody tr:last-child td { border-bottom: 0; }
.apps .who a { color: var(--ink); font-weight: 600; text-decoration: none; }
.apps .who a:hover { text-decoration: underline; }
.apps .who .sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.unit-code { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.unit-sub { color: var(--muted); font-size: 12.5px; }
.crm { display: grid; gap: 2px; }
.crm .card-no { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.when .sub { color: var(--muted); font-size: 12.5px; }
.mi-soon { color: var(--warn); font-weight: 600; }
.changed { color: var(--copper-strong); }
.unit-sub.changed, .sub.changed { color: var(--copper-strong); }
body.density-compact .apps td { padding-top: 7px; padding-bottom: 7px; }
body.density-compact .apps .who .sub { display: none; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty h3 { margin-bottom: 6px; }
.list-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list-foot .muted { font-size: 13px; }

/* ---------- application detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 12px; }
.back:hover { color: var(--ink); }
.plate { position: relative; padding: 22px 24px 18px 28px; margin-bottom: 18px; overflow: hidden; }
.plate::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--pc, var(--copper)); }
.plate-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.plate h1 { font-size: 34px; font-stretch: 82%; letter-spacing: -.01em; }
.plate-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; color: var(--muted); }
.plate-sub > span { display: inline-block; }
.plate-sub > span.with-dot { display: inline-flex; align-items: center; gap: 6px; }
.plate-sub .pdot { vertical-align: 0; }
.plate-sub strong { color: var(--text); font-weight: 600; }
.plate-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.journey { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 20px 0 0; padding: 0; counter-reset: step; }
.step { position: relative; padding: 12px 12px 0 0; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line); }
.step.done::before { background: var(--ok); }
.step.current::before { background: linear-gradient(90deg, var(--copper) 50%, var(--line) 50%); }
.step.blocked::before { background: var(--bad); }
.step-title { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.step-title .dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--muted); counter-increment: step; }
.step-title .dot::after { content: counter(step); }
.step.done .step-title .dot { background: var(--ok); color: #fff; }
.step.done .step-title .dot::after { content: "\2713"; }
.step.current .step-title .dot { background: var(--copper); color: #fff; }
.step.blocked .step-title .dot { background: var(--bad); color: #fff; }
.step.blocked .step-title .dot::after { content: "!"; }
.step-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.rail { position: sticky; top: 76px; display: grid; gap: 14px; }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.dl > div { padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; padding-right: 16px; }
.dl > div:nth-child(-n+2) { border-top: 0; }
.dl.one { grid-template-columns: minmax(0, 1fr); }
.dl.one > div:nth-child(2) { border-top: 1px solid var(--line); }
.dl.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl.three > div:nth-child(3) { border-top: 0; }
.dl dt { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.dl dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.dl dd.empty-val { color: var(--faint); font-weight: 400; }
.dl .wide { grid-column: 1 / -1; }
.copyable { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; border: 0; background: transparent; color: var(--faint); cursor: pointer; flex: none; }
.copy-btn:hover { background: var(--surface-3); color: var(--ink); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card + .card { margin-top: 0; }
.main-col { display: grid; gap: 14px; }
.quote { margin: 0; padding: 10px 12px; background: var(--surface-2); border-left: 3px solid var(--line-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text); }
.adults { display: grid; gap: 12px; }
.adult { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.adult h3 { margin-bottom: 6px; }
.crm-card .big { font-size: 22px; font-weight: 650; font-stretch: 82%; color: var(--ink); font-variant-numeric: tabular-nums; }
.note-line { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.control + .control { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.control-title { font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.control .field { margin-bottom: 8px; }
.lock { border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn-bg) 60%, var(--surface)); }
.lock.open { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok-bg) 55%, var(--surface)); }
.lock-row { display: flex; gap: 8px; align-items: flex-end; }
.lock-row .field { flex: 1; margin: 0; }
.lock-row input { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.secret { font-size: 18px; font-weight: 650; color: var(--ink); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.files form { margin: 0; }
.files .btn { width: 100%; }
.countdown { font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 4px 18px 16px; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -2px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--faint); }
.timeline li.t-sensitive::after { border-color: var(--warn); background: var(--warn-bg); }
.timeline li.t-rep::after { border-color: var(--info); }
.timeline li.t-money::after { border-color: var(--ok); }
.timeline li.t-system::after { border-color: var(--line-strong); }
.timeline .t-what { font-weight: 600; color: var(--ink); font-size: 13px; }
.timeline .t-meta { font-size: 12px; color: var(--muted); }
.timeline .t-detail { font-size: 12.5px; color: var(--text); margin-top: 3px; }
.related { list-style: none; margin: 0; padding: 0 18px 14px; }
.related li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.related li:first-child { border-top: 0; }
.kv-mini { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- auth ---------- */
body.console.is-auth { background: var(--nav-bg); min-height: 100vh; }
.auth-stage { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-aside { position: relative; display: flex; flex-direction: column; padding: 44px 52px; color: var(--nav-ink); background: var(--nav-bg); overflow: hidden; }
.auth-aside { border-right: 1px solid var(--nav-line); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { display: none; }
.auth-brand-name { color: var(--nav-ink-strong); font-size: 22px; font-weight: 700; font-stretch: 80%; letter-spacing: .08em; }
.auth-brand-name em { font-style: normal; font-weight: 400; color: var(--peach); }
.auth-brand-sub { color: var(--nav-dim, #8a8375); font-size: 13px; }
.auth-pitch { margin-top: auto; margin-bottom: auto; max-width: 30ch; }
.auth-h { color: var(--nav-ink-strong); font-size: 40px; line-height: 1.08; font-weight: 650; font-stretch: 82%; margin: 0 0 22px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: var(--nav-ink); }
.auth-point-bullet { width: 7px; height: 7px; border-radius: 2px; background: var(--peach); flex: none; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--nav-dim, #8a8375); }
.auth-status { display: inline-flex; align-items: center; gap: 8px; }
.auth-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #86b892; box-shadow: 0 0 0 3px rgba(134,184,146,.18); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.data-table td[data-label="Last login"], .data-table td[data-label="Time"] { white-space: nowrap; }
.auth-form-inner { width: min(400px, 100%); }
.auth-title { font-size: 30px; margin-bottom: 6px; }
.auth-form-inner > .muted { margin-bottom: 22px; }
.auth-form-fields { display: grid; gap: 4px; margin-top: 18px; }
.auth-form-fields input { height: 42px; }
.auth-remember { margin: 6px 0 14px; }
.auth-foot-note { margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.authenticator-setup { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; margin: 14px 0; }
.authenticator-qr { background: #fff; padding: 10px; border-radius: var(--r-md); border: 1px solid var(--line); }
.authenticator-qr svg, .authenticator-qr img { width: 100%; height: auto; display: block; }
.authenticator-copy { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sensitive { padding: 14px; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn-bg) 60%, var(--surface)); margin: 12px 0; }

/* ---------- dialogs: palette + help ---------- */
dialog.pop {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-pop); width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 620px); margin-top: 12vh;
}
dialog.pop::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.palette-input input { border: 0; box-shadow: none !important; padding: 6px 0; font-size: 16px; background: transparent; }
.palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; max-height: calc(min(70vh, 620px) - 110px); }
.palette-list li { margin: 0; }
.palette-group { padding: 8px 10px 4px; font-size: 12px; color: var(--faint); }
.palette-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--text); text-decoration: none; cursor: pointer;
}
.palette-item .t { display: block; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .s { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item > span:nth-child(2) { min-width: 0; }
.palette-item.is-active, .palette-item:hover { background: var(--surface-3); }
.palette-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.palette-empty { padding: 26px; text-align: center; color: var(--muted); }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; padding: 16px 20px 20px; }
.help-grid div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .detail-grid, .dash-row { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .ledger-band, .ledger-band.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .ledger { border-right: 0; border-bottom: 1px solid var(--line); }
  .figures.split { border-right: 0; border-bottom: 1px solid var(--line); }
  .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; }
  .figure { border-bottom: 0; border-right: 1px solid var(--line); }
  .figure:last-child { border-right: 0; }
}
@media (max-width: 860px) {
  .frame { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 50; background: var(--backdrop); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .search-trigger kbd, .clock { display: none; }
  .content { padding: 18px 16px 48px; }
  .grid, .grid-3, .toggle-grid, .toggle-grid.cols-2, .files, .dl, .dl.three { grid-template-columns: minmax(0, 1fr); }
  .dl > div:nth-child(2), .dl.three > div:nth-child(3) { border-top: 1px solid var(--line); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(2n) { border-right: 0; }
  .figure:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .ledger-cols, .ledger-days { gap: 3px; }
  .ledger-day { font-size: 10.5px; }
  .ledger-day span { display: none; }
  .journey { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .plate h1 { font-size: 28px; }
  .auth-stage { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { padding: 28px 22px; }
  .auth-pitch, .auth-foot { display: none; }
  .authenticator-setup { grid-template-columns: minmax(0, 1fr); }
  /* the application table becomes a list of stacked rows */
  .apps thead { display: none; }
  .apps, .apps tbody, .apps tr, .apps td { display: block; width: 100%; }
  .apps tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .apps td { display: inline-block; width: auto; padding: 3px 12px 3px 0; border: 0; vertical-align: middle; }
  .apps td.who { display: block; width: 100%; padding-right: 0; }
  .apps .who .sub { max-width: none; }
  .apps .crm { display: inline-flex; gap: 6px; align-items: center; }
  .apps .unit-sub { display: none; }
  .apps td.c-when { float: right; text-align: right; padding-right: 0; }
  .apps td.c-when .sub { display: none; }
  .apps td.c-mi .sub { display: none; }
  .apps td.c-mi::before { content: "M/I "; color: var(--faint); font-size: 12px; }
  .apps td.c-mi > div { display: inline; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .data-table td { border: 0; padding: 4px 14px; }
  .data-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--faint); }
  .toolbar select { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .rail form, .toasts { display: none !important; }
  .frame { display: block; }
  body.console { background: #fff; }
}
