/* Dispatcher workspace: surfaces, hierarchy and layouts for each workflow. */
@font-face { font-family:Manrope; src:url('/static/fonts/Manrope.ttf') format('truetype'); font-weight:200 800; font-style:normal; font-display:swap; }
/* The workspace shares the landing's stone, graphite, sage and amber palette. */
:root {
  --bg:#eeecea; --surface:#faf9f7; --surface-2:#e4e1dd; --surface-3:#d6d1ca; --hover:#e8ebe4;
  --ink:#333231; --muted:#5d5955; --faint:#706b65; --line:#d8d3cd; --line-strong:#bdb6ad;
  --accent:#4a5743; --accent-ink:#fff; --accent-soft:#d9dfd2; --focus:0 0 0 3px #5c6b5459;
  --danger:#b52e25; --danger-soft:#f8e7e3; --warn:#895500; --warn-soft:#faedcf; --ok:#426445; --ok-soft:#e0ebdc;
  --critical:#c33228; --high:#bd6519; --medium:#a46a08; --low:#527653;
  --st-new:#4a5743; --st-in_dispatch:#735e83; --st-assigned:#895500; --st-accepted:#446e6b;
  --st-in_progress:#476c82; --st-resolved:#426445; --st-rework:#a34e25; --st-closed:#5d5955; --st-rejected:#706b65;
  --shadow:0 2px 4px #33323108; --shadow-lg:0 16px 48px #24232126; --radius:12px;
  --nav:#e4e1dd; --heading-font:Manrope,system-ui,sans-serif;
  --series-1:#5c6b54; --series-2:#b4770c;
}
:root[data-theme="dark"] {
  --bg:#242321; --surface:#302f2c; --surface-2:#393733; --surface-3:#47443f; --hover:#3b4037;
  --ink:#f3f1ee; --muted:#c4beb7; --faint:#b0a9a0; --line:#49453f; --line-strong:#6b655d;
  --accent:#b9c9ad; --accent-ink:#242d21; --accent-soft:#3b4638; --focus:0 0 0 3px #b9c9ad66;
  --danger:#ff9186; --danger-soft:#4a2825; --warn:#f0b64e; --warn-soft:#493820; --ok:#a5c99d; --ok-soft:#344632;
  --critical:#ff8175; --high:#f5a15a; --medium:#f0b64e; --low:#a5c99d;
  --st-new:#b9c9ad; --st-in_dispatch:#ccb3dc; --st-assigned:#f0b64e; --st-accepted:#a0c9c3;
  --st-in_progress:#a2c4da; --st-resolved:#a5c99d; --st-rework:#f5a779; --st-closed:#c4beb7; --st-rejected:#b0a9a0;
  --nav:#292825; --shadow:0 2px 4px #00000026;
  --series-1:#a5b99a; --series-2:#f0a417;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --bg:#242321; --surface:#302f2c; --surface-2:#393733; --surface-3:#47443f; --hover:#3b4037;
    --ink:#f3f1ee; --muted:#c4beb7; --faint:#b0a9a0; --line:#49453f; --line-strong:#6b655d;
    --accent:#b9c9ad; --accent-ink:#242d21; --accent-soft:#3b4638; --focus:0 0 0 3px #b9c9ad66;
    --danger:#ff9186; --danger-soft:#4a2825; --warn:#f0b64e; --warn-soft:#493820; --ok:#a5c99d; --ok-soft:#344632;
    --critical:#ff8175; --high:#f5a15a; --medium:#f0b64e; --low:#a5c99d;
    --st-new:#b9c9ad; --st-in_dispatch:#ccb3dc; --st-assigned:#f0b64e; --st-accepted:#a0c9c3;
    --st-in_progress:#a2c4da; --st-resolved:#a5c99d; --st-rework:#f5a779; --st-closed:#c4beb7; --st-rejected:#b0a9a0;
    --nav:#292825; --shadow:0 2px 4px #00000026;
    --series-1:#a5b99a; --series-2:#f0a417;
  }
}
body { font-family:Manrope,system-ui,sans-serif; font-size:14px; line-height:1.55; letter-spacing:0; }
h1,h2,h3 { font-family:var(--heading-font); }
h1 { font-weight:750; }
a { text-underline-offset:3px; }
input,select,textarea,button,.btn { font-family:inherit; }
input,select,textarea { min-height:40px; border-color:var(--line-strong); border-radius:8px; padding:9px 12px; }
textarea { line-height:1.65; }
input::placeholder,textarea::placeholder { color:var(--faint); }
/* Safari draws native selects and date fields at its own size: the panel draws them itself. */
select:not([multiple]):not([size]) { -webkit-appearance:none; appearance:none; height:40px; padding-right:34px; line-height:1.3; cursor:pointer;
  background-color:var(--surface); background-repeat:no-repeat; background-size:5px 5px;
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 18px) 52%,calc(100% - 13px) 52%; text-overflow:ellipsis; }
input[type=date] { -webkit-appearance:none; appearance:none; height:40px; display:inline-flex; align-items:center; line-height:1.3; background-color:var(--surface); color:var(--ink); }
input[type=date]::-webkit-date-and-time-value { text-align:left; margin:0; }
input[type=date]::-webkit-datetime-edit { padding:0; }
input[type=date]::-webkit-datetime-edit-fields-wrapper, input[type=date]::-webkit-datetime-edit-text, input[type=date]::-webkit-datetime-edit-day-field, input[type=date]::-webkit-datetime-edit-month-field, input[type=date]::-webkit-datetime-edit-year-field { font-size:inherit; font-family:inherit; }
input[type=date]::-webkit-calendar-picker-indicator { cursor:pointer; opacity:.6; margin-left:4px; }
input[type=date][value=""]:not(:focus) { color:var(--muted); }
button,.btn { min-height:40px; font-size:13px; font-weight:650; padding:9px 15px; border-radius:8px; }
button.small,.btn.small { min-height:32px; padding:5px 10px; }
button:hover,.btn:hover { filter:brightness(.98); }
button.small.primary { background:var(--accent-soft); color:var(--accent); }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; box-shadow:none; }
.page { max-width:1800px; padding:32px 36px 64px; }
.page-head { align-items:center; justify-content:space-between; gap:16px; margin:0 0 26px; }
.page-head h1 { font-size:28px; font-weight:750; letter-spacing:-.045em; line-height:1.25; }
.page-description { color:var(--muted); margin:8px 0 0; max-width:72ch; font-size:13px; line-height:1.65; }
.page-head > div { min-width:0; }
.top { height:68px; background:var(--surface); box-shadow:none; gap:16px; }
.brand .logo { width:34px; height:38px; border-radius:9px; box-shadow:none; }
.brand .logo .icon { width:20px; height:20px; }
.brand .name { display:flex; flex-direction:column; gap:2px; min-width:0; line-height:1.4; }
.brand .name b { font-size:15px; font-weight:750; letter-spacing:-.02em; }
.brand .name small { font-size:11px; font-weight:450; color:var(--muted); overflow:hidden; text-overflow:ellipsis; }
.avatar { width:34px; height:34px; border-radius:11px; }
.who { gap:4px; }
.who b { font-weight:650; }
.live { padding:5px 9px; border:1px solid var(--line); border-radius:7px; }
.menu-pop { padding:10px; min-width:280px; }
.panel,.form-card,.table-wrap,.tile,.filters { box-shadow:none; }
.panel { padding:24px; }
.panel-title { text-transform:none; color:var(--ink); font-size:16px; letter-spacing:-.015em; font-weight:700; }
.form-card { padding:26px; gap:10px; }
.form-card label { color:var(--ink); gap:7px; font-weight:550; }
.form-card .hint,.hint { color:var(--muted); line-height:1.6; }
.form-card h2 { font-size:18px; letter-spacing:-.025em; }
.form-card h2 .icon { color:var(--accent); margin-right:5px; }
.form-card .narrow { max-width:100%; }
.section-title { font-size:18px; letter-spacing:-.025em; margin:30px 0 16px; scroll-margin-top:90px; }
.section-heading { display:flex; align-items:center; gap:12px; margin:24px 0 14px; }
.section-heading h2 { font-size:17px; margin:0; }
.section-heading > a { margin-left:auto; }
.section-nav { display:flex; gap:6px; border:0; border-bottom:1px solid var(--line); background:none; padding:0 0 12px; margin:0 0 24px; overflow-x:auto; }
.section-nav a { white-space:nowrap; text-decoration:none; color:var(--muted); border-radius:6px; padding:7px 12px; font-size:13px; }
.section-nav a:hover,.section-nav a:focus-visible { background:var(--accent-soft); color:var(--accent); }
.section-nav a span { padding-left:5px; color:var(--faint); font-variant-numeric:tabular-nums; }
.crumb { margin-bottom:18px; }
.notice { border-radius:10px; padding:12px 16px; }
.filters { border-radius:12px; padding:18px; margin-bottom:20px; }
.filters .line { gap:12px; align-items:end; }
.filters .search { flex:1 1 260px; }
.filters .search input { width:100%; min-width:0; }
.filters .field { font-size:11px; font-weight:600; gap:6px; }
.filters .line > select { max-width:280px; flex:0 1 auto; min-width:150px; }
.filter-details { padding-top:14px; margin-top:14px; border-top:1px solid var(--line); }
.filter-details summary { display:flex; align-items:center; gap:8px; cursor:pointer; color:var(--muted); font-size:12px; font-weight:650; list-style:none; }
.filter-details summary::after { content:'+'; margin-left:auto; font-size:18px; }
.filter-details[open] summary::after { content:'−'; }
.filter-details[open] summary { margin-bottom:16px; }
.chips { gap:7px; margin-top:10px; }
.chip { padding:6px 10px; border-radius:6px; font-size:12px; }
.chips-label { min-width:72px; font-size:11px; }
.table-wrap { border-radius:12px; }
table.grid thead th { background:var(--surface-2); text-transform:none; letter-spacing:0; font-weight:600; font-size:11px; padding:13px 16px; }
table.grid td { padding:16px; font-size:13px; }
table.grid td a { text-decoration:none; }
table.grid td a:hover { text-decoration:underline; }
table.grid td .num,table.grid td.num { font-variant-numeric:tabular-nums; }
.result-line { font-size:12px; margin:0 0 12px 2px; gap:6px; }
.result-line strong { color:var(--ink); }
.badge { font-size:11px; padding:6px 9px; font-weight:600; }
.badge.lg { padding:7px 10px; font-size:12px; }
.person-cell,.address-cell,.direction-cell { display:flex; align-items:center; gap:10px; }
.address-cell > .icon { color:var(--muted); width:18px; height:18px; }
.person-cell { min-width:170px; }
.person-cell .avatar { width:30px; height:30px; border-radius:50%; }
.direction-cell .icon { color:var(--accent); width:14px; height:14px; }
.empty-state { display:flex; align-items:center; flex-direction:column; padding:30px 12px; gap:10px; max-width:440px; margin:auto; white-space:normal; }
.empty-state > .icon { width:28px; height:28px; color:var(--faint); margin-bottom:5px; }
.empty-state strong { color:var(--ink); font-size:15px; }
.empty-state p { margin:0; color:var(--muted); font-size:13px; }
.pager { justify-content:flex-end; margin-top:18px; }
.pager a.on { background:var(--accent-soft); color:var(--accent); }
/* Queue: compact totals leave space for addresses and service state. */
.board-page { max-width:none; }
.board-heading { align-items:center; }
.board-heading > div { display:block; }
.board-bar { padding:10px; box-shadow:none; border-radius:10px; }
.board-bar .search input { background:var(--surface-2); }
.board-summary { gap:0; padding:16px 0; background:var(--surface); border:1px solid var(--line); border-radius:10px; margin-bottom:20px; }
.summary-item { padding:0 24px; border:0; border-right:1px solid var(--line); background:none; border-radius:0; box-shadow:none; gap:12px; }
.summary-item:last-child { border:0; }
.summary-icon { width:24px; height:24px; background:none !important; border-radius:0; color:var(--muted); }
.summary-item strong { font-size:26px; font-weight:750; }
.summary-label { font-size:11px; }
.board { grid-template-columns:repeat(6,minmax(238px,1fr)); gap:14px; padding-bottom:16px; scrollbar-width:thin; }
.column { background:transparent; border:0; border-radius:0; max-height:calc(100dvh - 350px); }
.column h2 { padding:8px 6px 14px; justify-content:initial; font-size:12px; }
.column h2::before { content:''; width:7px; height:7px; border-radius:3px; background:var(--c); flex:none; }
.column h2 .count { margin-left:auto; background:var(--surface-3); border-radius:5px; }
.drop { padding:2px 2px 8px; gap:12px; }
.card-item { border-radius:10px; padding:14px; border-left-width:3px; gap:10px; box-shadow:0 2px 3px #202b3804; }
.card-item:hover { transform:none; border-color:var(--line-strong); box-shadow:0 3px 10px #202b3808; }
.card-item header { font-size:11px; gap:6px; }
.card-item header .age { font-size:10px; }
.card-item header .prio-dot { font-size:10px; }
.card-item .addr { font-weight:700; font-size:13px; line-height:1.6; }
.card-item .desc { font-size:12px; line-height:1.6; }
.card-item footer { border-top:1px solid var(--line); padding-top:9px; }
.card-item .actions { display:flex; gap:5px; }
.card-item .actions button { font-size:11px; }
.card-item .tags:empty { display:none; }
.alarm-bar { animation:none; border-radius:8px; font-size:13px; padding:12px 16px; }
/* Request intake and detail. */
.new-request-page { max-width:1360px; }
.intake-form .form-grid { max-width:none; gap:24px; }
.intake-form .panel { gap:10px; padding:28px; }
.intake-form .panel > label:not(.trap-toggle) { color:var(--ink); font-weight:550; }
.intake-form .panel-title { margin-bottom:16px; }
.step-number { width:26px; height:26px; display:inline-grid; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:12px; margin-right:5px; }
.intake-footer { max-width:none; margin-top:24px; padding:18px 22px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.trap-toggle { margin-bottom:10px; border-style:dashed; }
.card-head { gap:10px; margin-bottom:24px; }
.card-head h1 { font-size:30px; letter-spacing:-.04em; }
.card-head .prio-bar { width:4px; }
.request-page .card-page { grid-template-columns:minmax(0,1fr) 300px; gap:28px; }
.request-page .side { top:90px; }
.request-page .side .panel { padding:22px; }
.request-overview { border-top:3px solid var(--accent); }
dl.facts { gap:14px 22px; grid-template-columns:160px minmax(0,1fr); font-size:13px; }
.request-overview dl.facts dd:first-of-type { font-size:17px; line-height:1.5; }
.timers { gap:12px; }
.timer { padding:18px; border-left-width:3px; }
.timer .t-value { font-size:15px; margin:8px 0 4px; }
.timeline { padding:8px 0; }
.timeline li { padding-bottom:24px; font-size:13px; }
.timeline li .when { display:block; margin-bottom:6px; font-size:11px; }
.inline-form { flex-direction:column; gap:10px; padding-top:20px; border-top:1px solid var(--line); }
.inline-form textarea { width:100%; min-height:94px; }
.inline-form button { align-self:flex-end; }
.files { padding:18px; border:1px dashed var(--line-strong); border-radius:10px; }
/* Conversation review keeps the recording beside the transcript. */
.call-workspace { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(280px,1fr); gap:24px; align-items:start; }
.call-main,.call-context { min-width:0; }
.call-context { position:sticky; top:90px; }
.call-context dl.facts { grid-template-columns:1fr; gap:4px; }
.call-context dl.facts dd { margin-bottom:12px; }
.call-context dl.facts dd:last-child { margin-bottom:0; }
.call-context .panel + .panel { margin-top:18px; }
.call-summary { margin:0; font-size:14px; line-height:1.8; }
.call-main .player { max-width:none; margin:0 0 20px; padding:18px; top:80px; border-radius:12px; }
.player-heading { display:flex; align-items:center; gap:9px; font-weight:650; margin:0 0 10px; font-size:13px; }
.transcript { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:24px; }
.transcript h2 { margin:0 0 24px; font-size:17px; }
.turns { max-width:none; margin:0; gap:18px; }
.turns li { padding:14px 16px; max-width:90%; border-radius:12px; line-height:1.7; font-size:13px; }
.turns .meta { font-size:10px; line-height:1.6; margin-bottom:5px; }
.turns .tool { overflow-wrap:anywhere; }
.technical-details { margin-top:20px; padding:18px 22px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.technical-details summary { cursor:pointer; font-weight:650; font-size:13px; }
.technical-details[open] summary { margin-bottom:20px; }
.technical-details dl.facts { grid-template-columns:150px minmax(0,1fr); }
/* Property directory and guided tools. */
.houses-page .toolbar { padding:14px; border:1px solid var(--line); background:var(--surface); border-radius:10px; gap:10px; }
.houses-page .toolbar .search { flex:1; }
.houses-page .toolbar .search input { width:100%; min-width:220px; }
.house-page { max-width:1600px; }
.house-form { max-width:none; }
.house-head { margin-top:0; }
.house-title h1 { font-size:30px; }
.house-eyebrow { text-transform:none; color:var(--accent); font-weight:650; }
.house-form .panel { border-radius:12px; padding:26px; }
.house-form .panel-title { font-size:17px; }
.house-form .house-description { font-size:12px; }
.house-nav { box-shadow:none; }
.house-foot { box-shadow:0 4px 20px #202b380d; }
.tool-page { max-width:1160px; }
.tool-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:24px; }
.tool-layout > * { min-width:0; }
.tool-layout .form-card { max-width:none; }
.tool-help { padding:22px; color:var(--muted); font-size:13px; line-height:1.8; }
.tool-help h2 { font-size:14px; color:var(--ink); margin:0 0 10px; }
.tool-help a { display:inline-flex; align-items:center; gap:6px; margin:8px 0; }
.import-steps { display:flex; list-style:none; padding:0; gap:24px; margin:0 0 24px; color:var(--muted); font-size:12px; }
.import-steps li { display:flex; align-items:center; gap:8px; }
.import-steps .current { color:var(--accent); font-weight:700; }
.upload-zone { display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; padding:36px 20px; border:1px dashed var(--line-strong); border-radius:12px; background:var(--surface-2); }
.upload-zone > .icon { width:30px; height:30px; color:var(--accent); }
.upload-zone input[type=file] { width:100%; min-width:0; border:0; background:none; padding:0; font-size:12px; }
input[type=file]::file-selector-button { border:1px solid var(--line-strong); background:var(--surface); color:var(--ink); padding:10px 14px; border-radius:6px; margin-right:12px; cursor:pointer; }
.import-result { margin-top:28px; }
.import-counts { display:flex; gap:24px; flex-wrap:wrap; padding:18px 0; font-size:12px; color:var(--muted); }
.import-counts strong { font-size:22px; color:var(--ink); display:block; }
.search-test-form { display:flex; flex-direction:column; gap:16px; }
.search-test-form .search input { width:100%; min-width:0; }
.search-test-form button { align-self:flex-start; }
.search-candidates { list-style:none; padding:0; margin:20px 0 0; }
.search-candidates li { display:flex; align-items:center; gap:12px; padding:16px 0; border-top:1px solid var(--line); }
.search-candidates li a { flex:1; font-weight:650; text-decoration:none; }
.search-candidates .score { padding:5px 8px; background:var(--accent-soft); color:var(--accent); border-radius:6px; font-size:12px; }
/* Reports: hierarchy between service, quality and cost. */
.report-section { margin-top:32px; }
.report-section > h2 { margin:0 0 16px; font-size:20px; letter-spacing:-.03em; }
.reports-page .tiles { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 16px; }
.reports-page .tile { padding:22px; border-radius:10px; }
.reports-page .tile .value { font-size:30px; font-weight:750; margin-bottom:7px; }
.reports-page .tile .label { line-height:1.6; }
.reports-page .tile:first-child { background:var(--accent-soft); border-color:transparent; }
.reports-page .tile:first-child .value { color:var(--accent); }
.report-tabs { margin:-8px 0 20px; gap:22px; }
.quick-periods { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:10px; font-size:12px; }
.quick-periods a { text-decoration:none; }
.report-facts { display:flex; flex-wrap:wrap; gap:8px 28px; margin:0 0 24px; padding:0; font-size:13px; }
.report-facts div { display:flex; gap:8px; align-items:baseline; }
.report-facts dt { color:var(--muted); }
.report-facts dd { margin:0; font-weight:650; font-variant-numeric:tabular-nums; }
/* Requests per day: new breakdowns and repeats stacked, a round axis, dates under it. */
.day-chart { margin:0 0 8px; padding:24px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.day-chart figcaption { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 16px; margin-bottom:20px; }
.day-chart h3 { margin:0; font-size:14px; }
.day-chart .legend { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:12px; color:var(--muted); }
.day-chart .legend b { color:var(--ink); font-weight:650; font-variant-numeric:tabular-nums; margin-left:2px; }
.day-chart .sw { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; vertical-align:-1px; }
.sw.first,.seg.first { background:var(--series-1); }
.sw.repeat,.seg.repeat { background:var(--series-2); }
.chart-body { display:grid; grid-template-columns:32px 1fr; grid-template-rows:180px auto; }
.chart-body .y-axis { position:relative; font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.chart-body .y-axis span { position:absolute; right:8px; transform:translateY(50%); line-height:1; }
.chart-body .plot { position:relative; display:grid; grid-template-columns:repeat(var(--bars),minmax(0,1fr)); gap:3px; align-items:end; border-bottom:1px solid var(--line-strong); }
.chart-body .grid-line { position:absolute; left:0; right:0; border-top:1px dashed var(--line); pointer-events:none; }
.chart-body .col { position:relative; height:100%; display:flex; align-items:flex-end; outline:none; border-radius:4px 4px 0 0; }
.chart-body .col.weekend { background:var(--surface-2); }
.chart-body .col:hover,.chart-body .col:focus-visible { background:var(--hover); }
.chart-body .stack { position:relative; width:100%; display:flex; flex-direction:column; gap:2px; min-height:2px; }
.chart-body .seg { display:block; flex-basis:0; min-height:2px; }
.chart-body .stack > .seg:nth-child(1 of .seg) { border-radius:4px 4px 0 0; }
.chart-body .val { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); padding-bottom:3px; font-size:11px; font-weight:650; color:var(--ink); font-variant-numeric:tabular-nums; }
.chart-body .tip { display:none; position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); z-index:5; min-width:150px; padding:8px 10px; border-radius:8px; background:var(--ink); color:var(--surface); font-size:12px; line-height:1.5; white-space:nowrap; box-shadow:var(--shadow-lg); pointer-events:none; }
.chart-body .tip b { display:block; }
.chart-body .col:hover .tip,.chart-body .col:focus-visible .tip { display:block; }
.chart-body .col:nth-child(-n+3 of .col) .tip { left:0; transform:none; }
.chart-body .col:nth-last-child(-n+3 of .col) .tip { left:auto; right:0; transform:none; }
.chart-body .x-axis { grid-column:2; display:grid; grid-template-columns:repeat(var(--bars),minmax(0,1fr)); gap:3px; margin-top:6px; font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.chart-body .x-axis span { white-space:nowrap; overflow:visible; }
.day-chart .day-table { margin-top:14px; font-size:12px; }
.day-chart .day-table summary { cursor:pointer; color:var(--muted); width:max-content; }
.day-chart .day-table summary:focus:not(:focus-visible) { outline:none; box-shadow:none; }
.day-chart .day-table .table-wrap { max-height:280px; margin-top:8px; }
.section-nav a.on { background:var(--accent-soft); color:var(--accent); font-weight:650; }
.report-table td.name .note { display:block; font-size:12px; color:var(--muted); }
.report-table th a.sort { color:inherit; text-decoration:none; white-space:nowrap; }
.report-table th a.sort:hover,.report-table th a.sort.on { color:var(--accent); }
.report-table td.num,.report-table th.num,.report-requests td.num,.report-requests th.num { text-align:right; }
.repeat-mark { font-weight:650; color:var(--ink); }
.report-requests td:first-child a,.report-requests td:nth-child(2) { white-space:nowrap; }
.chart-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:24px 0; }
.chart-panel { padding:24px; border:1px solid var(--line); border-radius:12px; background:var(--surface); min-width:0; }
.chart-panel h3 { margin:0 0 22px; font-size:14px; }
table.bars { max-width:none; font-size:12px; }
table.bars th { padding:9px 14px 9px 0; }
.bar { height:8px; border-radius:3px; min-width:0; }
.report-costs { max-width:none !important; }
.report-costs .grid { min-width:520px; }
/* Settings are independent workspaces under a stable local navigation. */
.settings-page { max-width:1540px; }
.settings-page > .tabs { margin:-12px 0 30px; gap:18px; }
.tabs a { font-size:12px; padding:12px 0; margin:0; }
.tabs a.on { color:var(--accent); font-weight:750; }
.settings-page .two { gap:24px; align-items:stretch; }
.settings-page .two > .form-card { max-width:none; }
.invite-grid { margin-top:30px; }
.invite-grid .form-card { position:relative; padding-top:28px; }
.settings-users .grid { min-width:980px; }
.settings-users .phone-form { display:flex; gap:6px; align-items:center; }
.settings-users .phone-form input { width:140px; min-height:32px; font-size:12px; font-variant-numeric:tabular-nums; }
.settings-users .phone-form .icon-btn { width:32px; min-height:32px; flex:none; }
.settings-users tr:target td { background:var(--accent-soft); }
.settings-users .grid select { min-width:160px; max-width:190px; font-size:12px; }
.settings-users .cell-actions { min-width:130px; }
.district-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:16px 0; margin:0 0 16px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.district-summary > div { display:flex; flex-direction:column; gap:3px; padding:0 24px; border-right:1px solid var(--line); min-width:0; }
.district-summary > div:last-child { border:0; }
.district-summary strong { font-size:26px; font-weight:750; line-height:1.15; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.district-summary strong small { font-size:15px; font-weight:600; color:var(--muted); letter-spacing:0; }
.district-summary .warn strong { color:var(--warn); }
.coverage { display:block; height:6px; margin-top:6px; max-width:220px; border-radius:3px; background:var(--surface-3); overflow:hidden; }
.coverage span { display:block; height:100%; background:var(--accent); border-radius:3px; }
.district-gap { align-items:center; flex-wrap:wrap; }
.district-gap > a { display:inline-flex; align-items:center; gap:6px; font-weight:650; white-space:nowrap; }
.escalation-gap { align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.escalation-gap .btn { white-space:nowrap; }
/* Escalation tab: schedule with a day/night timeline, then the two chains. */
.settings-escalation .form-card { max-width:none; }
.esc-schedule { gap:16px; }
.esc-schedule-head h2 { margin:0 0 4px; }
.esc-timeline { display:flex; flex-direction:column; gap:6px; }
.esc-timeline-bar { position:relative; height:36px; border-radius:8px; background:var(--surface-3); overflow:hidden; }
.esc-timeline-day { position:absolute; inset:0 auto 0 var(--day-start); width:calc(var(--day-end) - var(--day-start)); display:flex; align-items:center; justify-content:center; gap:6px; padding:0 8px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:700; white-space:nowrap; overflow:hidden; box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); border-radius:8px; }
.esc-timeline-scale { display:flex; justify-content:space-between; color:var(--faint); font-size:11px; font-variant-numeric:tabular-nums; }
.esc-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr)); gap:12px 16px; align-items:end; }
.esc-unit { display:flex; align-items:center; gap:8px; }
.esc-unit input { flex:1; min-width:0; }
.esc-unit > span { color:var(--muted); font-size:13px; }
.esc-schedule-foot { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-top:12px; border-top:1px solid var(--line); }
.esc-schedule-foot .hint { flex:1 1 320px; }
.esc-voicemail { margin:20px 0; }

.esc-chains { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr)); gap:20px; align-items:start; }
.esc-chain { gap:14px; }
.esc-chain-head { display:flex; align-items:center; gap:12px; }
.esc-chain-head h2 { margin:0; }
.esc-chain-head > div { flex:1; min-width:0; }
.esc-period { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; flex:none; }
.esc-period .icon { width:20px; height:20px; }
.esc-day .esc-period { background:var(--warn-soft); color:var(--warn); }
.esc-night .esc-period { background:var(--accent-soft); color:var(--accent); }

.esc-steps { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.esc-step { display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:12px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; }
/* Between two steps: what makes the next one ring. */
.esc-step + .esc-step { position:relative; margin-top:30px; }
.esc-step + .esc-step::before { content:"↓ " attr(data-gap); position:absolute; left:22px; top:-25px; color:var(--faint); font-size:11.5px; white-space:nowrap; }
.esc-step.is-skipped { border-color:color-mix(in srgb, var(--warn) 45%, var(--line)); background:color-mix(in srgb, var(--warn-soft) 55%, var(--surface-2)); }
.esc-no { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--surface); border:1px solid var(--line-strong); color:var(--ink); font-size:12px; font-weight:750; font-variant-numeric:tabular-nums; }
.esc-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:8px; background:var(--surface); color:var(--muted); }
.esc-who { display:flex; flex-direction:column; gap:2px; min-width:0; }
.esc-who strong { overflow-wrap:anywhere; }
.esc-kind { color:var(--faint); font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.04em; }
.esc-attempts { margin:4px 0 0; }
.esc-attempts label { flex-direction:row !important; align-items:center; gap:6px; color:var(--muted) !important; font-size:12px; font-weight:600; }
.esc-attempts select { width:auto; min-height:30px; padding:2px 26px 2px 8px; font-size:12px; }
.esc-add-attempts select { max-width:120px; }
.esc-warn { display:flex; align-items:flex-start; gap:6px; margin-top:4px; color:var(--warn); font-size:12px; font-weight:600; }
.esc-warn .icon { margin-top:1px; }
.esc-warn a { font-weight:650; }
.esc-actions { display:flex; gap:2px; }
.esc-actions form { margin:0; }
.icon-btn { width:36px; min-height:36px; padding:0; }
.esc-loop { display:flex; align-items:flex-start; gap:8px; margin:0; padding:10px 12px; border-radius:8px; background:var(--surface-2); color:var(--muted); font-size:12.5px; }
.esc-loop .icon { margin-top:1px; }

.esc-empty { display:flex; align-items:center; gap:12px; padding:14px; border:1px dashed color-mix(in srgb, var(--danger) 50%, var(--line)); border-radius:10px; background:var(--danger-soft); color:var(--danger); }
.esc-empty p { margin:0; font-size:13px; font-weight:600; }
.esc-empty-icon .icon { width:20px; height:20px; }

.esc-add-toggle { width:100%; min-height:44px; background:transparent; color:var(--accent); border:1px dashed var(--line-strong); }
.esc-add-toggle:hover { background:var(--accent-soft); border-color:var(--accent); filter:none; }
.esc-add { display:flex; flex-direction:column; gap:12px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.esc-seg { display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; border:0; }
.esc-seg legend { padding:0; margin-bottom:6px; font-size:13px; font-weight:650; color:var(--ink); }
.esc-seg label { flex:1 1 auto; flex-direction:row !important; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:8px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink) !important; font-size:13px; font-weight:600; cursor:pointer; }
.esc-seg input { position:absolute; opacity:0; pointer-events:none; }
.esc-seg label:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); color:var(--accent) !important; }
.esc-seg label:has(input:focus-visible) { box-shadow:var(--focus); }
.esc-days label { flex:0 1 64px; text-transform:capitalize; }
.esc-days .hint { flex-basis:100%; margin-top:2px; }
.esc-phone { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:12px; }
.esc-add-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
@media (max-width:520px) {
  .esc-step { grid-template-columns:auto minmax(0,1fr); }
  .esc-icon { display:none; }
  .esc-timeline-day .icon, .esc-tl-word { display:none; }
  .esc-actions { grid-column:1 / -1; justify-content:flex-end; border-top:1px solid var(--line); padding-top:6px; }
  .icon-btn { width:44px; min-height:44px; }
  .esc-schedule-foot button, .esc-add-actions button { flex:1; }
}
.esc-roster { margin-top:20px; display:flex; flex-direction:column; gap:14px; }
.esc-cal-nav { display:flex; align-items:center; justify-content:center; gap:14px; }
.esc-cal-nav strong { min-width:12ch; text-align:center; font-size:15px; text-transform:capitalize; font-variant-numeric:tabular-nums; }
.esc-cal { display:flex; flex-direction:column; gap:4px; }
.esc-cal-row { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.esc-cal-head span { text-align:center; padding:4px 0; color:var(--faint); font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.04em; }
.esc-cal-cell { display:flex; flex-direction:column; gap:2px; min-height:62px; padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); text-align:left; cursor:pointer; overflow:hidden; }
.esc-cal-cell:hover { border-color:var(--accent); background:var(--accent-soft); filter:none; }
.esc-cal-day { font-size:12px; font-weight:650; font-variant-numeric:tabular-nums; color:var(--muted); }
.esc-cal-cell.is-out { opacity:.45; }
.esc-cal-cell.is-past:not(.has-duty) { background:var(--surface-2); }
.esc-cal-cell.is-today { border-color:var(--accent); }
.esc-cal-cell.is-today .esc-cal-day { color:var(--accent); }
.esc-cal-cell.has-duty { background:var(--accent-soft); border-color:color-mix(in srgb, var(--accent) 40%, var(--line)); }
.esc-cal-cell.is-pick { box-shadow:var(--focus); border-color:var(--accent); }
.esc-cal-who { font-size:11.5px; font-weight:600; line-height:1.3; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
@media (max-width:520px) {
  .esc-cal-cell { min-height:52px; padding:4px; }
  .esc-cal-who { -webkit-line-clamp:1; }
}
.district-cards { grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; margin-top:20px; }
.district-card { gap:14px; }
.district-card.editing { border-color:var(--accent); box-shadow:var(--focus); }
.district-head { display:flex; align-items:flex-start; gap:12px; }
.district-head h2 { flex:1; min-width:0; display:flex; align-items:center; gap:4px; margin:0; font-size:17px; line-height:1.35; overflow-wrap:anywhere; }
.district-head h2 .icon { flex:none; }
.house-count { display:inline-flex; align-items:center; gap:6px; flex:none; padding:5px 10px; border-radius:7px; background:var(--surface-2); color:var(--ink); font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; text-decoration:none; }
.house-count:hover { background:var(--accent-soft); color:var(--accent); }
.house-count .icon { width:15px; height:15px; color:var(--muted); }
.district-view, .district-edit { display:flex; flex-direction:column; gap:12px; flex:1; }
.district-master { display:flex; align-items:center; gap:12px; padding:12px; border-radius:10px; background:var(--surface-2); }
.district-master > span:nth-child(2) { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.district-master .avatar { flex:none; width:36px; height:36px; border-radius:50%; }
.district-master.missing { background:var(--warn-soft); }
.district-master.missing strong { color:var(--warn); }
.district-master.missing .avatar { background:transparent; color:var(--warn); }
.district-master.missing .avatar .icon { width:20px; height:20px; }
.district-master + .district-master { margin-top:8px; }
.master-picker { position:relative; display:flex; flex-direction:column; gap:6px; margin:0 0 12px; }
.picker-box { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-height:40px; padding:5px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); cursor:text; }
.picker-box:focus-within { border-color:var(--accent); box-shadow:var(--focus); }
.picker-box input { flex:1 1 140px; min-width:0; min-height:30px; border:0; padding:4px 6px; background:transparent; box-shadow:none; outline:none; }
.picker-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:3px 3px 3px 10px; border-radius:7px; background:var(--accent-soft); color:var(--accent); font-size:13px; font-weight:650; }
.picker-chip > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-chip small { font-weight:600; opacity:.85; }
.picker-chip.warn { background:var(--warn-soft); color:var(--warn); }
.picker-chip button { display:inline-grid; place-items:center; width:26px; height:26px; min-height:0; padding:0; border:0; border-radius:5px; background:transparent; color:inherit; font-size:16px; line-height:1; cursor:pointer; }
.picker-chip button:hover { background:var(--surface); }
.picker-list { position:absolute; z-index:20; top:100%; left:0; right:0; max-height:280px; overflow-y:auto; margin:4px 0 0; padding:4px; list-style:none; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--shadow-lg); }
.picker-list li { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:7px; cursor:pointer; }
.picker-list li.active { background:var(--hover); }
.picker-list li .grow { display:flex; flex-direction:column; gap:1px; flex:1; min-width:0; }
.picker-list li small { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-list .avatar { flex:none; width:30px; height:30px; border-radius:50%; }
.picker-list li.picker-empty { color:var(--muted); cursor:default; }
.district-actions { display:flex; align-items:center; gap:12px; margin-top:auto; padding-top:12px; border-top:1px solid var(--line); }
.district-actions > a { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:650; text-decoration:none; }
.district-actions > a .icon { width:15px; height:15px; }
.district-actions button { margin-left:auto; }
.district-edit form:first-child { display:flex; flex-direction:column; gap:10px; }
.district-edit .row { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; }
.district-edit .row button { margin:0; }
.district-delete { padding-top:12px; border-top:1px solid var(--line); }
.district-delete button { margin:0; }
.create-card { border-style:dashed; background:transparent; }
.create-card h2 { font-size:17px; margin:0; }
.district-hint { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:16px; }
.filter-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 4px 4px 10px; border-radius:7px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:650; white-space:nowrap; }
.filter-chip .icon { width:14px; height:14px; }
.filter-chip a { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:5px; color:inherit; text-decoration:none; font-size:16px; line-height:1; }
.filter-chip a:hover { background:var(--surface); }
.settings-categories .cards { gap:18px; }
.settings-categories .cards .form-card { padding:22px; }
/* Keep the SLA field explanations readable above the editable table. */
.sla-guide { margin:0 0 20px; padding:20px 22px; background:var(--surface); border:1px solid var(--line); border-radius:10px; color:var(--muted); font-size:13px; line-height:1.65; }
.sla-guide p { margin:0; max-width:90ch; }
.sla-guide ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 32px; list-style:none; padding:0; margin:16px 0; }
.sla-guide li { max-width:72ch; }
.sla-guide strong { color:var(--ink); font-weight:700; }
@media(max-width:700px) { .sla-guide { padding:16px; } .sla-guide ul { grid-template-columns:1fr; gap:10px; } }
.sla-table input { max-width:120px; font-variant-numeric:tabular-nums; }
.sla-table table { min-width:760px; }
.settings-audit .grid { table-layout:fixed; min-width:700px; }
.settings-audit th:first-child { width:155px; }
.settings-audit th:nth-child(2) { width:150px; }
.settings-audit th:nth-child(3) { width:210px; }
.audit-change summary { cursor:pointer; color:var(--accent); font-weight:600; }
.audit-change details[open] summary { margin-bottom:10px; }
.audit-change code { display:block; padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.voice-form { max-width:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.voice-form section { max-width:none; min-width:0; scroll-margin-top:90px; }
#voice-phrases { grid-column:2; grid-row:1 / span 3; }
.voice-form .section-head p { font-size:12px; line-height:1.75; }
.voice-form .phrase { padding-top:16px; border-top:1px solid var(--line); gap:8px; }
.voice-form .phrase-head { align-items:start; }
.voice-form .phrase-head label { font-size:12px; }
.voice-form .preview { padding:16px; gap:12px; }
.voice-form .preview-label { flex-basis:100%; }
.voice-form .preview select { min-width:0; width:100%; }
.voice-form .save-bar { grid-column:1 / -1; margin:0; }
/* Service administration. */
.costs-page .tiles { grid-template-columns:1fr 2fr; max-width:780px; gap:20px; margin:24px 0; }
.costs-page .tile { padding:24px; }
.costs-page .tile .value { font-size:34px; font-weight:750; }
.costs-page .table-wrap { max-height:65vh; }
.costs-page table.grid th { font-size:10px; padding:12px; }
.costs-page table.grid td { padding:14px 12px; font-size:12px; }
/* Superadmin console (SQLAdmin views drawn in the panel's markup) */
.admin-links { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; max-width:1040px; }
.admin-link { display:flex; flex-direction:column; gap:10px; padding:24px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); color:var(--ink); text-decoration:none; }
.admin-link:hover { border-color:var(--accent); background:var(--hover); }
.admin-link .icon { width:22px; height:22px; color:var(--accent); }
.admin-link strong { font-size:16px; }
.admin-link span { font-size:12px; color:var(--muted); line-height:1.6; }
.console-page table.grid td { white-space:nowrap; }
.console-page table.grid th a { color:inherit; text-decoration:none; }
.console-page .form-card { max-width:900px; }
.console-form select,.console-form input:not([type=checkbox]),.console-form textarea { width:100%; }
.console-form .invalid { border-color:var(--danger); }
.console-form .hint.error { color:var(--danger); }
.console-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.console-actions button,.console-actions .btn { margin-top:0 !important; }
.console-details dl.facts dd { white-space:pre-wrap; }
@media(max-width:760px) { .admin-links { grid-template-columns:1fr; } .console-actions > * { flex:1 1 auto; } }
.phrases-page { max-width:1320px; }
.phrases-voice { max-width:none; }
.phrases-page .phrase-card { max-width:none; padding:24px; }
.phrase-card-head h3 { font-size:16px; }
.phrase-card .wording { padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.phrase-card .wording textarea { background:var(--surface); }
.phrase-card .wording-actions { flex-basis:100%; justify-content:flex-end; }
.phrase-card .phrase-save { padding-top:16px; border-top:1px solid var(--line); }
.phrase-context { padding:12px 0; }
.phrases-help { padding:14px 0 4px; }
.phrases-help summary { cursor:pointer; font-weight:650; font-size:13px; color:var(--muted); }
.phrases-help[open] summary { margin-bottom:14px; }
@media(min-width:1200px) {
  body { padding-left:208px; }
  .brand { width:208px; height:86px; padding:0 20px; background:var(--nav); border-right:0; }
  .top nav.main { width:208px; top:86px; padding:14px 12px; gap:5px; background:var(--nav); border-right:0; }
  .top nav.main a { height:44px; font-size:12px; padding:0 14px; border-radius:8px; }
  .top nav.main a.on { background:var(--surface); color:var(--accent); box-shadow:0 1px 3px #202b3808; font-weight:750; }
}
@media(min-width:761px) and (max-width:1199px) {
  .page { padding:26px 24px 48px; }
  .brand .name { display:none; }
  .summary-item { padding:0 14px; }
  .summary-icon { display:none; }
  .request-page .card-page { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:18px; }
  .request-page .side { order:0; position:static; }
  .call-workspace { grid-template-columns:minmax(0,1.5fr) minmax(250px,1fr); gap:18px; }
  .voice-form { grid-template-columns:1fr; }
  #voice-phrases { grid-column:auto; grid-row:auto; }
}
@media(max-width:760px) {
  body { padding-left:0; }
  .top { height:60px; padding:0 14px; gap:10px; }
  .top .brand .name { display:none; }
  .top nav.main { background:var(--surface); box-shadow:0 -1px 12px #202b3808; }
  .top nav.main a.on { background:var(--accent-soft); color:var(--accent); }
  .live { padding:5px; border:0; }
  .page { padding:24px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom:22px; align-items:flex-start; gap:14px; }
  .page-head h1 { font-size:25px; }
  .page-description { font-size:12px; margin-top:7px; }
  .page-head > .btn { font-size:12px; }
  input,select,textarea { font-size:16px; }
  .panel,.form-card { padding:20px; }
  .section-nav { gap:0; padding-bottom:10px; }
  .section-nav a { font-size:12px; padding:8px 10px; }
  .filters { padding:14px; }
  .filters .line { gap:10px; }
  .filters .line > select { width:100%; max-width:none; flex:1 1 100%; }
  .filters .line > .field { flex:1 1 100px; }
  .filter-details summary { font-size:11px; }
  .chips-label { flex-basis:100%; }
  .chip { min-height:36px; }
  .board-heading { flex-direction:row; }
  .board-heading > .btn { padding:8px; }
  .board-summary { grid-template-columns:1fr 1fr; padding:0; gap:0; }
  .summary-item { padding:14px 16px; border:0; gap:8px; }
  .summary-item:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .summary-item:nth-child(odd) { border-right:1px solid var(--line); }
  .summary-item strong { font-size:23px; }
  .summary-icon { display:none; }
  .summary-label { font-size:10px; }
  .board { grid-template-columns:repeat(6,minmax(82vw,1fr)); }
  .column { max-height:none; }
  .board-bar .search { flex-basis:100%; }
  .board-bar .toggle { font-size:12px; min-height:36px; }
  .card-item header .age { font-size:11px; }
  .card-item .addr { font-size:14px; }
  .card-item .actions button { min-height:38px; }
  .intake-form .form-grid { grid-template-columns:1fr; gap:18px; }
  .intake-form .panel { padding:20px; }
  .intake-footer { flex-wrap:wrap; padding:16px; }
  .intake-footer > .muted { flex-basis:100%; }
  .request-page .card-page { display:flex; flex-direction:column; gap:20px; }
  .request-page .side { position:static; order:-1; width:100%; }
  .request-page .main { width:100%; min-width:0; }
  .card-head h1 { font-size:26px; }
  dl.facts { grid-template-columns:1fr; gap:4px; }
  dl.facts dd { margin-bottom:12px; }
  .timers { grid-template-columns:1fr; }
  .timer { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:14px 16px; }
  .timer .t-value { margin:0; text-align:right; }
  .timer > .muted { grid-column:1 / -1; }
  .call-workspace { display:flex; flex-direction:column; gap:20px; }
  .call-main,.call-context { width:100%; }
  .call-context { position:static; order:-1; }
  .call-context .call-facts { display:grid; grid-template-columns:1fr 1fr; }
  .call-context .call-facts dt,.call-context .call-facts dd { grid-column:auto; }
  .call-main .player { top:70px; }
  .transcript { padding:18px; }
  .turns li { max-width:95%; }
  .technical-details dl.facts { grid-template-columns:1fr; }
  .houses-page .toolbar { padding:12px; }
  .houses-page .toolbar .search { flex-basis:100%; }
  .houses-page .toolbar .search input { min-width:0; }
  .houses-page .toolbar > .btn { flex:1; font-size:11px; }
  .house-title h1 { font-size:25px; }
  .house-form .panel { padding:20px; }
  .tool-layout { grid-template-columns:1fr; gap:16px; }
  .tool-help { padding:8px; }
  .import-steps { gap:12px; font-size:10px; }
  .import-steps .step-number { width:22px; height:22px; margin:0; }
  .upload-zone { padding:26px 14px; }
  .reports-page .tiles { grid-template-columns:1fr 1fr; gap:10px; }
  .reports-page .tile { padding:16px; }
  .reports-page .tile .value { font-size:24px; }
  .report-facts { gap:6px 18px; }
  .report-filters .line > label.field { flex:1 1 40%; min-width:0; }
  .report-filters .line > label.field input,.report-filters .line > label.field select { width:100%; min-width:0; }
  .day-chart { padding:16px; }
  .chart-body { grid-template-rows:140px auto; grid-template-columns:26px 1fr; }
  .chart-body .plot,.chart-body .x-axis { gap:1px; }
  .chart-body .val { font-size:9px; }
  .chart-body .x-axis span.minor { visibility:hidden; }
  .chart-grid { grid-template-columns:1fr; gap:16px; }
  .chart-panel { padding:20px; }
  .settings-page > .tabs { gap:18px; margin:-8px 0 24px; }
  .settings-page .two { flex-direction:column; gap:18px; }
  .settings-page .two > * { flex:auto; width:100%; min-width:0; }
  .district-cards,.settings-categories .cards { grid-template-columns:1fr; }
  .district-summary { padding:12px 0; }
  .district-summary > div { padding:0 12px; }
  .district-summary strong { font-size:21px; }
  .district-summary strong small { font-size:13px; }
  .district-summary .summary-label { font-size:10px; }
  .district-gap > a { flex-basis:100%; padding-left:24px; }
  .page-head > .btn[href="#new-district"] { padding:8px 12px; }
  .district-edit .row button { flex:1; }
  .voice-form { display:flex; flex-direction:column; gap:18px; }
  .voice-form > * { width:100%; }
  .voice-form .save-bar { bottom:calc(72px + env(safe-area-inset-bottom)); }
  .voice-form .phrase-head { flex-wrap:wrap; gap:8px; }
  .voice-form .preview .play { min-width:100%; }
  .costs-page .tiles { grid-template-columns:1fr 1fr; gap:12px; }
  .costs-page .tile { padding:16px; }
  .costs-page .tile .value { font-size:24px; }
  .phrases-page .phrase-card { padding:18px; }
  .phrase-card .wording { padding:10px; }
  .phrase-card .wording-actions { justify-content:flex-start; }
  .phrase-card textarea { flex-basis:100%; }
}
.dialog { padding:28px; border:1px solid var(--line); border-radius:16px; width:min(460px,100%); gap:12px; }
.dialog h3 { font-size:20px; letter-spacing:-.035em; margin-bottom:8px; }
.dialog .row { margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.dialog .reasons { display:flex; flex-direction:column; gap:8px; }
.dialog .reasons label { display:flex; gap:10px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:8px; cursor:pointer; }
.dialog .reasons label:has(input:checked) { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }
.request-page .card-page:has(> .side:not(:has(*))) { grid-template-columns:minmax(0,1fr); max-width:1200px; }
.reports-page .sla-metrics .tile .value { color:var(--ink); }
.turn-tool { margin-top:8px; }
.turn-tool summary { cursor:pointer; color:var(--muted); font-size:11px; }
.voice-form input,.voice-form textarea,.voice-form select { scroll-margin-block:100px 180px; }
.report-section { scroll-margin-top:90px; }
@media(max-width:760px) {
  .call-context { order:0; }
  .table-wrap:has(> .mobile-records) { border:0; background:transparent; overflow:visible; }
  .mobile-records { display:block; background:transparent !important; }
  .mobile-records thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .mobile-records tbody { display:grid; gap:12px; }
  .mobile-records tbody tr { display:grid; grid-template-columns:1fr 1fr; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); gap:12px 16px; }
  .mobile-records tbody tr.trapped { border-color:var(--danger); }
  table.grid.mobile-records td { display:block; padding:0; border:0 !important; font-size:12px; white-space:normal; text-align:left; overflow-wrap:anywhere; }
  .mobile-records td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:10px; margin-bottom:4px; }
  .mobile-records td:first-child { grid-column:1 / -1; font-size:14px; font-weight:650; padding-bottom:10px; border-bottom:1px solid var(--line) !important; }
  .mobile-records td:first-child::before { display:none; }
  /* With the admin's checkbox first, the address is the second cell: it heads the card. */
  table.grid.houses-table td.pick + td { grid-column:1 / -1; font-size:14px; font-weight:650; padding:0 28px 10px 0; border-bottom:1px solid var(--line) !important; }
  table.grid.houses-table td.pick + td::before { display:none; }
  table.grid.houses-table td.pick { border:0 !important; }
  .mobile-records td.empty-row { grid-column:1 / -1; }
  .mobile-records .empty-state { padding:16px 0; }
}
/* Filters: one period field instead of two floating date labels. */
.filters label.field, .filters .field { align-items:stretch; text-align:left; }
.filters .period { flex:0 1 auto; }
.period-inputs { position:relative; display:flex; align-items:center; gap:6px; color:var(--faint); }
.period-inputs > .icon { position:absolute; left:11px; width:15px; height:15px; color:var(--muted); pointer-events:none; }
.period-inputs input { width:136px; font-size:13px; }
.period-inputs input:first-of-type { padding-left:34px; width:158px; }
.filters .search { flex:1 1 240px; min-width:min(240px,100%); }
.filter-details summary .count { margin-left:4px; background:var(--accent-soft); color:var(--accent); }
/* Registry: the address and what broke are read together; flags only when there are any. */
.registry-table .req-id a { display:block; }
.req-meta { display:flex; align-items:center; gap:4px; margin-top:4px; font-size:11px; }
.req-meta .prio-dot { font-size:11px; }
.req-address { min-width:260px; max-width:520px; }
.req-place { display:block; font-weight:650; color:var(--ink); }
.req-desc { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; margin-top:3px; color:var(--muted); font-size:12px; }
.registry-table tr.trapped td:first-child { box-shadow:inset 3px 0 var(--danger); }
.registry-table td.req-master { white-space:nowrap; }
.registry-table .tag .icon { width:11px; height:11px; }
/* Request card: when and how it came in sits under the number; people on the side. */
.request-page .card-head { margin-bottom:6px; }
.card-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 22px 14px; color:var(--muted); font-size:12px; }
.card-meta .icon { width:14px; height:14px; color:var(--faint); }
.card-meta > span { color:var(--line-strong); }
.side .people { display:flex; flex-direction:column; gap:12px; }
.side .people .panel-title { margin:0; }
.person { display:flex; align-items:center; gap:10px; }
.person > span:last-child { display:flex; flex-direction:column; gap:1px; min-width:0; }
.person .avatar { width:34px; height:34px; border-radius:50%; }
.person.missing .avatar { background:var(--surface-2); color:var(--faint); }
.person.missing strong { color:var(--muted); font-weight:550; }
/* Call journal: the summary line and the request address make a row readable without opening it. */
.call-when a { display:block; }
.call-when .direction-cell { margin-top:4px; gap:5px; font-size:11px; color:var(--muted); }
.call-when .direction-cell.duty .icon { color:var(--warn); }
.call-outcome { min-width:240px; max-width:520px; }
.call-summary-line { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.55; }
.call-request a { display:block; }
.call-request .small { display:block; margin-top:3px; }
.call-lang { display:block; margin-top:3px; }
.calls-table tr.flagged td:first-child { box-shadow:inset 3px 0 var(--warn); }
@media(max-width:760px) {
  .period-inputs input, .period-inputs input:first-of-type { width:auto; flex:1; min-width:0; font-size:16px; }
  .filters .line > .period { flex:1 1 100%; }
  .mobile-records tbody tr.trapped { background:var(--danger-soft) !important; }
  .mobile-records tr.trapped td { background:transparent !important; }
  .registry-table tr.trapped td:first-child, .calls-table tr.flagged td:first-child { box-shadow:none; }
  .registry-table td.req-id { display:flex !important; align-items:center; justify-content:space-between; gap:8px; }
  .registry-table td.req-id a { font-size:15px; }
  .registry-table .req-meta { margin:0; }
  .registry-table td.req-address, .registry-table td.req-flags { grid-column:1 / -1; max-width:none; min-width:0; }
  .registry-table td.req-address::before, .registry-table td.req-flags::before { display:none !important; }
  .req-place { font-size:14px; }
  .req-desc { -webkit-line-clamp:2; }
  .registry-table td.req-status::before { display:none !important; }
  .registry-table td.req-status { grid-column:1 / -1; }
  .mobile-records td.no-flags { display:none !important; }
  .calls-table td.call-when { display:flex !important; align-items:center; justify-content:space-between; }
  .calls-table td.call-when .direction-cell { margin:0; }
  .calls-table td.call-outcome, .calls-table td.call-flags, .calls-table td.call-request { grid-column:1 / -1; max-width:none; min-width:0; }
  .request-page .side:not(:has(.action)) { order:1; }
  .calls-table td.call-outcome::before, .calls-table td.call-flags::before { display:none !important; }
  .calls-table tr.flagged { border-color:color-mix(in srgb, var(--warn) 45%, var(--line)) !important; }
  .card-meta { margin-left:0; }
}
