/* Anvil (TBX helpdesk): dark theme from the approved mock-up, and a light one (plans/light-theme.md).
   Fonts are self-hosted (CSP allows no CDNs) and include Greek. No inline styles anywhere: CSP blocks them. */

@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("fonts/inter-greek-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-greek-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-greek-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

:root {
  color-scheme: dark;
  --ground: #141517;
  --panel: #1E2022;
  --panel-2: #26292A;
  --side: #2F3130;          /* the logo's own background */
  --side-active: #43464A;
  --line: #2E3133;
  --line-2: #3A3E40;
  --text: #ECEBE7;
  --muted: #A3A6A4;
  --faint: #8E928F;
  --accent: #FFB547;
  --accent-ink: #1A1408;
  --red: #FF7D6E;   --red-bg: #3A1F1B;
  --amber: #FFB547; --amber-bg: #3A2C14;
  --blue: #84ABFF;  --blue-bg: #1D2740;
  --violet: #C8B2FF; --violet-bg: #2A2340;
  --green: #5FD3A0; --green-bg: #16302A;
  --grey: #C9CBC9;  --grey-bg: #2A2D2F;
  --note-bg: #241F14; --note-line: #8A6A2E;
  --accent-text: #FFB547;  /* amber as text: links, labels (darker on white) */
  --accent-hover: #FFD08A;
  --amber-strong: #FFD08A; /* text on --amber-bg: chosen filters and pills */
  --row-line: #25282A; --row-hover: #25282A;
  --red-text: #FFD3CC; --red-line: #5A2E28; --red-strong: #FF9F94;
  --green-text: #BFE9D6; --green-line: #2C5E4F;
  --blue-text: #BFD2FF;
  --on-text: #1A1408;      /* text on a button filled with the text colour */
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --radius: 14px;
}

/* Light theme: the same names, light values. Chosen per person with the sun/moon button (plans/light-theme.md).
   Text colours meet 4.5:1 on their backgrounds; amber as text is a darker amber on white. */
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #F5F4F0;
  --panel: #FFFFFF;
  --panel-2: #F0EEE9;
  --line: #E4E2DC;
  --line-2: #D3D0C9;
  --text: #1A1B1D;
  --muted: #55595A;
  --faint: #666A68;
  --accent-text: #8F5200; --accent-hover: #6E3F00;
  --red: #B42318;    --red-bg: #FDE7E4;
  --amber: #8F5200;  --amber-bg: #FFF0D4;
  --blue: #1F4FD1;   --blue-bg: #E3EBFF;
  --violet: #6B2BD4; --violet-bg: #EEE6FF;
  --green: #0E7246;  --green-bg: #DCF4E8;
  --grey: #474B49;   --grey-bg: #ECECE9;
  --note-bg: #FFF7E6; --note-line: #D9A441;
  --amber-strong: #6E3F00;
  --row-line: #ECEAE5; --row-hover: #F7F5F1;
  --red-text: #8A1C12; --red-line: #F2B8B0; --red-strong: #B42318;
  --green-text: #0B5C38; --green-line: #9FD8BC;
  --blue-text: #1A3FA8;
  --on-text: #FFFFFF;
}
/* Option A: the sidebar keeps the dark look in both themes, so both logos stay as they are. */
:root[data-theme="light"] .side {
  color-scheme: dark;
  color: #ECEBE7;
  --text: #ECEBE7; --muted: #A3A6A4; --faint: #8E928F; --grey: #C9CBC9;
  --panel-2: #26292A; --line: #2E3133; --line-2: #3A3E40;
  --accent-text: #FFB547; --accent-hover: #FFD08A; --blue: #84ABFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--text); }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* Blazor focuses the page heading after navigation (for screen readers); no frame for that. */
h1:focus, h1:focus-visible { outline: none; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.92em; color: var(--accent-text); }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13.5px; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }

/* Shell: side menu + content. Wraps to one column on phones. */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 240px; max-width: 100%; background: var(--side); display: flex; flex-direction: column; gap: 28px; padding: 24px 16px; }
/* ANVIL is the product (top of the sidebar); Toolbox runs it (bottom, on its own grey). Both always show. */
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; text-decoration: none; }
.brand img { display: block; width: 56px; height: auto; }
.brand-word { display: flex; flex-direction: column; gap: 5px; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: 4px; color: #F4F1EA; }
.brand-word::after { content: ""; width: 26px; height: 4px; border-radius: 2px; background: var(--accent); }
.side-by { display: flex; flex-direction: column; gap: 6px; padding: 14px 8px 0; border-top: 1px solid var(--line-2); }
.side-by span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.side-by img { display: block; width: 150px; height: auto; }
.side-links { display: flex; flex-direction: column; gap: 4px; }
.side-links a { padding: 10px 12px; border-radius: 8px; color: var(--grey); text-decoration: none; }
.side-links a:hover { background: #3A3D3C; color: var(--text); }
.side-links a.active { background: var(--side-active); color: var(--text); font-weight: 600; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--panel-2); }
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.me-name { font-weight: 600; }
.me-role { font-size: 12.5px; color: var(--muted); }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); }
.avatar-client { background: var(--blue); color: #0E1630; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.content { flex: 999 1 560px; min-width: 0; padding: 40px 48px 56px; display: flex; flex-direction: column; gap: 26px; }
.bare { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #FFC56E; color: var(--accent-ink); }
.btn-light { background: var(--text); color: var(--on-text); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

/* Page header */
.page-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; }
.page-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { background: transparent; border: 0; color: var(--text); font: inherit; width: 260px; max-width: 52vw; outline: none; }
.search input::placeholder { color: var(--faint); }

/* Summary tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-note { font-size: 12.5px; color: var(--faint); }

/* Tabs */
.ticket-list { display: flex; flex-direction: column; gap: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.count { font-family: var(--font-mono); font-size: 12px; opacity: 0.8; font-weight: 500; }
.search-note a { margin-left: 6px; }

/* Filters panel on the ticket list (a <details>: opens without script) */
.filters > summary { list-style: none; width: fit-content; }
.filters > summary::-webkit-details-marker { display: none; }
.filters[open] > summary { border-color: var(--accent); }
.filters-count { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; text-align: center; }
.filters-panel { margin-top: 12px; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 18px; }
.filters-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters-panel legend, .filter-field > span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.filters-panel legend { margin-bottom: 8px; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 24px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--grey); font-size: 13px; cursor: pointer; }
.pill input { margin: 0; accent-color: var(--accent); }
.pill:has(input:checked) { border-color: var(--note-line); background: var(--amber-bg); color: var(--amber-strong); }
.pill:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter-field select, .filter-field input { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; color-scheme: dark; max-width: 100%; }
.filters-panel .filter-dates { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 16px; }
.filter-dates legend { float: left; width: 100%; margin: 0; }
.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.seg input:checked + span { background: var(--side-active); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.filters-actions { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.filters-actions a { color: var(--muted); }
.filters-note { margin: 0; font-size: 12.5px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 12px; border-radius: 999px; border: 1px solid var(--note-line); background: var(--amber-bg); color: var(--amber-strong); font-size: 13px; font-weight: 500; text-decoration: none; }
.filter-chip:hover { border-color: var(--accent); color: var(--text); }
.filter-clear { font-size: 13px; margin-left: 4px; }

/* Queue page and pager */
.queue, .list-scroll { display: flex; flex-direction: column; }
.queue { gap: 26px; }
.list-scroll { gap: 14px; }
.panel.for-form { flex-direction: row; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; } /* .panel is a column by default */
.for-form .field { flex: 1 1 320px; min-width: 0; }
.for-form .faint { flex-basis: 100%; margin: 0; }

.list-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.list-tools .pager { margin-left: auto; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.pager-info { font-family: var(--font-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-btn { min-height: 38px; padding: 0 14px; }
.pager-btn.disabled { opacity: 0.4; cursor: default; }

/* Ticket table */
.table-wrap { overflow-x: auto; }
.tickets { min-width: 860px; display: flex; flex-direction: column; }
.thead, .row { display: grid; grid-template-columns: minmax(0, 3fr) 120px 180px 150px 120px; gap: 16px; align-items: center; padding: 14px 16px; }
.thead { padding-block: 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.tickets.with-sla { min-width: 1040px; }
.prefix-input { text-transform: uppercase; max-width: 140px; font-family: var(--font-mono); }
.tickets.with-sla .thead, .tickets.with-sla .row { grid-template-columns: minmax(0, 3fr) 120px 150px 170px 150px 110px; }
.sla-box dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sort-link { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.sort-link:hover, .sort-link.active { color: var(--text); }
.sort-arrow { font-size: 9px; color: var(--accent-text); }
.row { border-top: 1px solid var(--row-line); border-radius: 10px; color: var(--text); text-decoration: none; }
.row:hover { background: var(--row-hover); color: var(--text); }
.t-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t-line { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-width: 0; }
.t-num { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); flex: none; }
.t-num.big { font-size: 14px; color: var(--muted); }
.t-title { flex: 1 1 18ch; min-width: 0; font-weight: 600; overflow-wrap: break-word; } /* beside the number, or under it when there's no room; wraps, never cut off */
.t-sub { font-size: 13px; color: var(--muted); }
.empty { padding: 32px 16px; color: var(--muted); }

/* Chips */
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip-red { color: var(--red); background: var(--red-bg); }
.chip-amber { color: var(--amber); background: var(--amber-bg); }
.chip-blue { color: var(--blue); background: var(--blue-bg); }
.chip-violet { color: var(--violet); background: var(--violet-bg); }
.chip-green { color: var(--green); background: var(--green-bg); }
.chip-grey { color: var(--grey); background: var(--grey-bg); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row .chip { white-space: normal; } /* a long (Greek) SLA text wraps in its column instead of running into the next */

/* Ticket page */
.back { font-size: 14px; text-decoration: none; align-self: flex-start; }
.ticket-head { display: flex; flex-direction: column; gap: 12px; }
.ticket-title { font-size: clamp(28px, 3.4vw, 40px); max-width: 26ch; overflow-wrap: anywhere; }
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.conversation, .new-ticket { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.details { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.panel.narrow { max-width: 520px; width: 100%; }
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.note { background: var(--note-bg); border: 1px dashed var(--note-line); }
.note-label { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
.resolution { background: var(--green-bg); border-color: var(--green-line); }
.event { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--faint); padding: 0 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.file { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 13.5px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--grey); }
.file-internal { border-style: dashed; border-color: var(--note-line); color: var(--accent-text); }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
a.file { text-decoration: none; }
a.file:hover { border-color: var(--muted); color: var(--text); }
.file-input { max-width: 100%; font-size: 13.5px; color: var(--muted); }
.file-input::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.file-input::file-selector-button:hover { border-color: var(--muted); }

/* Composer */
.composer { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.composer.is-note { background: var(--note-bg); border: 1px dashed var(--note-line); }
.composer-hint { font-size: 13px; color: var(--muted); }
.is-note .composer-hint { color: var(--accent-text); }
.mode-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.mode { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--grey); font-weight: 600; text-decoration: none; }
.mode:hover { color: var(--text); }
.mode.active { background: var(--text); border-color: var(--text); color: var(--on-text); }
.mode-note.active { background: var(--accent); border-color: var(--accent); }
.composer-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.form-actions { justify-content: flex-end; }

/* Forms */
.form-panel { gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, legend { font-weight: 600; font-size: 14px; }
.details .field label { font-weight: 500; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="date"], input:not([type]), select, textarea {
  min-height: 44px; background: var(--ground); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; width: 100%;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.validation-message { color: var(--red); font-size: 13.5px; }
.invalid { border-color: var(--red) !important; }
.alert { padding: 12px 14px; border-radius: 10px; background: var(--red-bg); color: var(--red-text); border: 1px solid var(--red-line); }

/* ----- Admin area (mock-up boards 8-11) ----- */
.admin { display: flex; flex-direction: column; gap: 24px; }
.admin h2 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.admin-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.admin-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.admin-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-tools select, .admin-tools input { width: auto; }
.admin-table { display: flex; flex-direction: column; min-width: 760px; }
.admin-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2.4fr) 90px 80px 100px; gap: 16px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--row-line); border-radius: 10px; color: var(--text); text-decoration: none; }
a.admin-row:hover { background: var(--row-hover); color: var(--text); }
.admin-row.head { padding: 8px 16px; border-top: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.admin-row .chip { justify-self: start; }
.admin-row.users { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) 170px 90px; }
.admin-table.users { min-width: 640px; }
.role-pick { display: flex; flex-direction: column; gap: 10px; border: 0; margin: 0; padding: 0; }
.role-pick legend { padding: 0; margin-bottom: 6px; }
.role-pick label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.role-pick input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.role-pick strong { display: block; }
.locked { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--blue-bg); color: var(--blue-text); font-size: 14px; }
.locked svg { flex: none; margin-top: 2px; }
.admin .form-panel > .btn, .settings-form > .btn { align-self: flex-start; }
.admin-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-name strong { overflow-wrap: anywhere; }
.domain-list { display: flex; flex-direction: column; gap: 8px; }
.domain-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 10px; background: var(--panel-2); }
.domain-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.domain-chip { font-family: var(--font-mono); font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); color: var(--grey); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.inline-form > input, .inline-form > select { flex: 1 1 200px; width: auto; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn-danger { background: transparent; border-color: var(--red-line); color: var(--red-strong); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.project-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.project-card.inactive { border-style: dashed; }
.card-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.card-head > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-head > div { display: flex; gap: 8px; align-items: center; }
.tag-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.tag-line > .label { color: var(--muted); }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--row-line); }
.cat-row:first-of-type { border-top: 0; } /* the form's hidden inputs come first, so not :first-child */
.cat-row > span { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.cat-row > div { display: flex; align-items: center; gap: 8px; }
.cat-row.inactive strong { color: var(--muted); }
.cat-row strong a { color: var(--text); text-decoration: none; }
.cat-row strong a:hover { color: var(--accent-text); }
.company-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.company-group legend { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.admin-row.cat-tickets { grid-template-columns: 120px minmax(0, 2fr) minmax(0, 1.4fr) 130px 140px; }
.admin-row.cat-tickets > span:last-child { white-space: nowrap; }
.admin-table.cat-tickets { min-width: 760px; }

/* Maintenance schedules (plans/tbx-operations.md phase 1) */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.admin-row.maint { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) 110px minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.5fr); }
.admin-table.maint { min-width: 980px; }
.admin-row.maint .mono { display: block; margin-bottom: 4px; }
.maint-skip { display: block; margin: 4px 0 0; font-size: 12.5px; color: var(--amber); }
.maint-project { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.maint-history { display: flex; flex-direction: column; }
.maint-history-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.maint-history-row:hover { color: var(--accent-text); }
.maint-history-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }

/* Assets (plans/tbx-operations.md phase 2) */
.asset-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 6px; }
.asset-filters select, .asset-filters input { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; max-width: 100%; }
.asset-search { flex: 1 1 260px; display: flex; }
.asset-search input { flex: 1; }
.admin-row.assets { grid-template-columns: minmax(0, 2fr) 110px minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1.3fr) 64px; }
.admin-table.assets { min-width: 1040px; }
.mono-plain { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.asset-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; margin: 0; }
.asset-details dt { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.asset-details dd { margin: 0; overflow-wrap: anywhere; }
.asset-notes-title { margin: 18px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.asset-notes { margin: 0; white-space: pre-line; color: var(--grey); }
.asset-active { align-self: flex-start; }
.import-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-row.import { grid-template-columns: 56px minmax(0, 2.2fr) minmax(0, 1.4fr) 110px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.4fr); }
.admin-table.import { min-width: 1040px; }
.import-error { display: block; margin-top: 4px; font-size: 12.5px; color: var(--red); }
.tile-value.amber { color: var(--amber); }
.tile-value.red { color: var(--red); }
.import-change { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.import-change .import-error { margin-top: 0; }
.import-change .old { color: var(--faint); text-decoration: line-through; }
.import-change .new { font-weight: 600; }
.import-change .old { margin-left: 4px; }
.import-change .arrow { margin: 0 6px; color: var(--faint); }
.import-question { border-color: var(--accent); }
.import-question h2, .import-question p { margin: 0; }
.import-rows { display: flex; flex-direction: column; gap: 12px; }
.import-rows > summary { list-style: none; width: fit-content; cursor: pointer; }
.import-rows > summary::-webkit-details-marker { display: none; }
.admin-row.user-import { grid-template-columns: 56px 110px minmax(0, 1.6fr) minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.6fr); }
.admin-table.user-import { min-width: 900px; }
@media (max-width: 760px) { .import-change { grid-template-columns: 1fr; } }
.ticket-assets h2 { font-size: 16px; margin: 0; }
.ticket-asset { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ticket-asset-add { display: flex; gap: 8px; }
.ticket-asset-add select { flex: 1; min-width: 0; min-height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; }
@media (max-width: 760px) { .import-stats { grid-template-columns: 1fr; } }
.admin-row.inbox { grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr) minmax(0, 1.6fr) 110px; align-items: start; }
.admin-table.inbox { min-width: 720px; }
.admin-row.people { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.4fr) 120px 90px; }
.admin-table.people { min-width: 680px; }
.admin-row.project-people { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.8fr) 70px; padding: 10px 4px; }
.admin-table.project-people { min-width: 480px; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.side-links a .count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); opacity: 1; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check-line input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check-grid { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 14px; }
.check-pill:has(input:checked) { border-color: var(--accent); background: var(--amber-bg); color: var(--accent-text); font-weight: 600; }
.check-pill input { accent-color: var(--accent); width: 16px; height: 16px; }
.alert-ok { background: var(--green-bg); color: var(--green-text); border-color: var(--green-line); }

/* New ticket: request types as cards (real radio buttons, styled by :has). */
.types { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.types legend { margin-bottom: 10px; padding: 0; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
/* Request-type questions on the new-ticket form (plans/brd-release-1.md step 5b); app.js hides those not asked. */
.rt-fields { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.rt-fields[hidden], .rt-fields .field[hidden] { display: none; }
.when-shown { font-size: 12.5px; }
.form-answers { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 14px; margin: 12px 0 0; }
.form-answers dt { color: var(--muted); }
.form-answers dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.type-card { display: flex; flex-direction: column; gap: 4px; min-height: 76px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ground); cursor: pointer; }
.type-card:hover { border-color: var(--muted); }
.type-card:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.type-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.type-title { font-weight: 600; font-size: 15.5px; }
.type-hint { font-size: 13px; color: var(--muted); }
.type-card:has(input:checked) .type-hint { color: #3A2C14; }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--grey); }

/* Details list */
.meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 10px 14px; margin: 0; font-size: 14px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

/* Dev sign-in */
.dev-login { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 18px; }
.dev-login h2 { font-size: 15px; color: var(--muted); margin-top: 10px; }
.dev-warning { padding: 10px 14px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); font-size: 14px; }
.dev-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.dev-user { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; min-height: 60px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dev-user:hover { border-color: var(--accent); }
.dev-user-name { font-weight: 600; }
.dev-user-role { font-size: 13px; color: var(--muted); }

/* The phone menu's tick box: hidden but focusable; its label is the button. */
.menu-check { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .content { padding: 24px 16px 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Phones (plans/browser-walkthrough-fixes.md phase 4): a bar with the logo and "Menu"; the links open below it.
     The sidebar's box goes (display: contents) so the Toolbox logo can sit under the page, as the footer. */
  .shell { display: grid; grid-template-columns: minmax(0, 1fr) min-content; align-content: start; } /* min-content: the rows spanning both columns must not widen the second */
  .side { display: contents; }
  .brand { background: var(--side); padding: 12px 16px; }
  .brand img { width: 40px; }
  .brand-word { font-size: 22px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; align-self: stretch; padding: 0 16px; background: var(--side); color: #F4F1EA; font-weight: 600; cursor: pointer; }
  .menu-check:focus-visible + .menu-btn { outline: 2px solid var(--accent); outline-offset: -4px; }
  .side-links, .me { grid-column: 1 / -1; display: none; background: var(--side); }
  .side-links { padding: 0 12px 8px; }
  .me { margin: 0; border-radius: 0; }
  .menu-check:checked ~ .side-links, .menu-check:checked ~ .me { display: flex; }
  .content { grid-column: 1 / -1; }
  .side-by { grid-column: 1 / -1; order: 1; background: var(--side); padding: 14px 16px; }
}

/* Desktop: the window never scrolls. The sidebar is fixed (logo top, user bottom, links scroll between);
   the content area scrolls on its own, the ticket list with it (one scrollbar). */
@media (min-width: 761px) {
  .shell { flex-wrap: nowrap; height: 100vh; height: 100dvh; overflow: hidden; }
  .side { flex: none; width: 240px; }
  .side-links { flex: 1; min-height: 0; overflow-y: auto; }
  .brand, .me { flex: none; }
  .me { margin-top: 0; }
  .content { flex: 1; overflow-y: auto; }
  .queue { flex: 1; min-height: 0; }
  .ticket-list { flex: 1; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Admin Logs page (plans/go-live-readiness.md phase 1) */
input[type="date"] { color-scheme: dark; }
.logs { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.logs-menu { flex: 1 1 240px; max-width: 290px; display: flex; flex-direction: column; gap: 16px; }
.logs-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.logs-nav { padding: 10px; gap: 2px; }
.logs-head { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding: 6px 10px; }
.logs-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14.5px; }
.logs-link:hover { background: var(--panel-2); color: var(--text); }
.logs-link.active { background: var(--panel-2); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.logs-act { min-height: 40px; font-size: 14px; }
.logs-act.active { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.logs-act.active:hover { color: var(--accent-ink); }
.logs-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.logs-act.active .logs-count { color: var(--accent-ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; background: var(--text); }
.dot-tickets { background: var(--blue); } .dot-email { background: var(--violet); } .dot-admin { background: var(--amber); }
.dot-security { background: var(--red); } .dot-system { background: var(--green); }
.logs-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.logs-filter label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.logs-filter .wide { grid-column: span 2; }
.logs-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.logs-buttons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.logs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.logs-list { padding: 0; gap: 0; overflow-x: auto; }
.log-grid { display: grid; grid-template-columns: 150px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 24px; gap: 14px; min-width: 760px; padding: 14px 18px; align-items: start; }
.log-head { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
.log-row { border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row > summary { list-style: none; cursor: pointer; }
.log-row > summary::-webkit-details-marker { display: none; }
.log-row > summary:hover { background: var(--panel-2); }
.log-chev::before { content: "\25B8"; color: var(--faint); }
.log-row[open] .log-chev::before { content: "\25BE"; }
.log-stack { display: flex; flex-direction: column; gap: 3px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.log-what { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.log-what .chip { padding: 2px 9px; font-size: 12px; }
.log-summary { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-object { color: var(--accent-text); font-size: 12px; }
.log-details { margin: 0 18px 16px 182px; background: var(--ground); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.log-details dt { color: var(--faint); }
.log-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .logs-menu { max-width: none; }
  .logs-filter { grid-template-columns: 1fr; }
  .logs-filter .wide { grid-column: auto; }
  .log-details { margin-left: 18px; grid-template-columns: 1fr; }
}

/* Admin Reports pages (plans/go-live-readiness.md phase 5) */
.report-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.report-tabs .btn { color: var(--muted); border-color: var(--line); font-weight: 500; }
.report-tabs .btn.active { color: var(--text); background: var(--panel-2); border-color: var(--line-2); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.report-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-size: 14px; cursor: pointer; }
.pill:hover { border-color: var(--muted); color: var(--text); }
.pill.active, .pill-input:checked + .pill { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pill-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-input:focus-visible + .pill { outline: 2px solid var(--accent); outline-offset: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.report-year { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.report-year select { width: auto; }
.rtable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rtable th, .rtable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rtable thead th { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.rtable tbody th { font-weight: 600; }
.rtable tbody tr:last-child th, .rtable tbody tr:last-child td { border-bottom: 0; }
.rtable-list { min-width: 860px; }
.rtable-tickets { min-width: 980px; font-size: 14px; }
.rtable-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.sla-good { color: var(--green); font-weight: 600; }
.sla-warn { color: var(--amber); font-weight: 600; }
.sla-bad { color: var(--red); font-weight: 600; }
.report { display: flex; flex-direction: column; gap: 14px; }
.report-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.report-tile { gap: 4px; padding: 16px 18px; }
.report-big { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1.1; }
.report-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-avg { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 16px 18px; }
.report-avg strong { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.report-section { padding: 16px 18px 8px; }
.report-section h3 { font-family: var(--font-display); font-size: 18px; margin: 0; }
.report-title { font-family: var(--font-display); font-size: 30px; font-weight: 800; margin: 0; }
.tech-form { gap: 16px; }
.tech-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tech-form legend { font-size: 13px; color: var(--muted); padding: 0 0 8px; }
.tech-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tech-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.tech-dates { display: flex; flex-wrap: wrap; gap: 12px; }
.tech-dates input { width: auto; }
.tech-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tech-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer; }
.tech-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.tech-check .faint { margin-left: auto; font-size: 12px; }
/* By project hides the period; the dates show only for "Choose dates". No script: the form's own state decides. */
.tech-form:has(#by-projects:checked) .tech-period { display: none; }
.tech-form:not(:has(#period-0:checked)) .tech-dates { display: none; }
.tech-form:has(#by-projects:checked) .tech-when-period, .tech-form:not(:has(#by-projects:checked)) .tech-when-projects { display: none; }
@media (max-width: 900px) {
  .report-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-pair, .tech-row { grid-template-columns: 1fr; }
  .tech-checks { grid-template-columns: 1fr; }
}

/* Privacy notice (plans/go-live-readiness.md phase 6) and the links to it */
.privacy { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; line-height: 1.6; }
.privacy section { display: flex; flex-direction: column; gap: 10px; }
.privacy h2 { font-size: 21px; }
.privacy ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.bare-stack { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.bare-privacy { font-size: 13.5px; color: var(--muted); }
.side-privacy { font-size: 13px; color: var(--muted); }
.side-privacy:hover, .bare-privacy:hover { color: var(--text); }

/* Light/dark button (plans/light-theme.md): top right of every page, and floating on pages without the sidebar. */
.topbar { display: flex; justify-content: flex-end; margin-bottom: -14px; }
.theme-toggle { margin: 0; }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.theme-btn:hover { border-color: var(--muted); }
.theme-float { position: fixed; top: 16px; right: 16px; z-index: 5; }
/* The Toolbox logo is white line art: always on its own grey (#2f3130), in both themes. */
.toolbox-plate { display: inline-flex; background: #2F3130; border-radius: 12px; padding: 10px 14px; }
.toolbox-plate img { display: block; }

/* Knowledge base (plans/tbx-operations.md phase 4) */
.kb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.kb-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.kb-card:hover { border-color: var(--line-2); color: var(--text); }
.kb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--faint); }
.kb-title { font-size: 16px; overflow-wrap: anywhere; }
.kb-snippet { font-size: 13.5px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.kb-body { white-space: pre-line; line-height: 1.7; max-width: 80ch; overflow-wrap: anywhere; }
.turn-into-article { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; }

/* The notification bell (plans/registration-and-notifications.md): a <details>, no script */
.topbar { gap: 10px; align-items: center; }
.bell { position: relative; }
.bell > summary { list-style: none; }
.bell > summary::-webkit-details-marker { display: none; }
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); cursor: pointer; box-sizing: border-box; }
.bell-btn:hover, .bell[open] > .bell-btn { border-color: var(--accent); }
.bell-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.bell-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: 440px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.bell-head h2 { margin: 0; font-size: 16px; }
.bell-head h2 .faint { font-family: var(--font-body); font-size: 13px; font-weight: 500; }
.bell-head form { margin: 0; }
.link-btn { background: none; border: 0; padding: 8px 4px; min-height: 36px; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.bell-all { display: block; padding: 12px 18px; text-align: center; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.bell-all:hover { text-decoration: underline; }
.bell-empty { margin: 0; padding: 18px; color: var(--faint); }
.notif { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.notif:hover { background: var(--row-hover); }
.notif.unread { background: var(--panel-2); }
.notif-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.notif.unread .notif-dot { background: var(--accent); }
.notif.unread .notif-what { font-weight: 600; }
.notif-what { line-height: 1.4; overflow-wrap: anywhere; }
.notif-ref { color: var(--accent-text); }
.notif-when { font-size: 12px; color: var(--faint); white-space: nowrap; }
.notif-sub { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.notes-page { display: flex; flex-direction: column; gap: 18px; }
.notes-list { padding: 0; gap: 0; overflow: hidden; }
.notes-group { margin: 0; padding: 10px 18px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .bell-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; max-width: none; } }

/* Self-registration (plans/registration-and-notifications.md part B) */
.reg-card { gap: 16px; }
.reg-card h1 { margin: 0; font-size: 26px; }
.reg-card p { margin: 0; }
.reg-brand { display: flex; align-items: center; gap: 12px; }
.reg-brand .brand-word { font-size: 24px; }
.reg-form { display: flex; flex-direction: column; gap: 14px; }
.reg-form .btn { width: 100%; }
.reg-info { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); }
.reg-code { font-family: var(--font-mono); font-size: 22px; letter-spacing: 0.4em; text-align: center; }
.reg-links { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.reg-links form { margin: 0; }
.reg-back { font-weight: 600; }
.reg-by { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.reg-list { display: flex; flex-direction: column; }
.reg-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr) auto; gap: 10px 18px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.reg-actions, .reg-outcome { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reg-decline > summary { list-style: none; width: fit-content; cursor: pointer; }
.reg-decline > summary::-webkit-details-marker { display: none; }
.reg-decline[open] { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--panel-2); }
.reg-decline .reg-form .btn { width: auto; align-self: flex-start; }
@media (max-width: 760px) { .reg-row { grid-template-columns: 1fr; } }
.reg-brand .brand-word { color: var(--text); }
.reg-brand .on-light { display: none; }
:root[data-theme="light"] .reg-brand .on-light { display: block; }
:root[data-theme="light"] .reg-brand .on-dark { display: none; }

/* ----- Closing tickets (plans/ticket-workflow-improvements.md phase 1): the client's progress bar and boxes ----- */
.steps { list-style: none; margin: 0; padding: 18px 12px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 0 4px; }
.step::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; background: var(--line-2); }
.step:first-child::before { display: none; }
.step-done::before, .step-now::before { background: var(--accent); }
.step-ring { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 2px solid var(--line-2); color: var(--faint); background: var(--ground); }
.step-done .step-ring { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step-now .step-ring { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px var(--amber-bg); }
.step-skip .step-ring { border-style: dashed; }
.step-name { font-weight: 600; font-size: 14px; }
.step-todo .step-name, .step-skip .step-name { color: var(--faint); font-weight: 500; }
.step-sub { font-size: 12.5px; color: var(--muted); min-height: 16px; }
.step-now .step-sub { color: var(--accent-text); }
.state-box { border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); background: var(--panel); }
.state-box h2 { margin: 0; font-family: var(--font-display); font-size: 17px; }
.state-box p { margin: 0; }
.state-ask { background: var(--note-bg); border-color: var(--note-line); }
.state-ok { background: var(--green-bg); border-color: var(--green-line); }
.state-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.state-actions form { display: contents; }
/* Cancel before it is resolved (plans/brd-release-1.md step 4b). */
.cancel-box { margin-top: 10px; }
.cancel-box summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.cancel-box form { margin-top: 8px; display: grid; gap: 8px; }
.auto-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 10px; padding: 14px 18px; }
  .step { flex-direction: row; text-align: left; gap: 12px; }
  .step::before { display: none; }
  .step-sub { min-height: 0; }
}

/* ----- Reply collision (plans/ticket-workflow-improvements.md phase 2) ----- */
.stale-notice { border: 1px solid var(--note-line); background: var(--note-bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.stale-notice p { margin: 0; }
.stale-notice strong { color: var(--amber-strong); }
.stale-was { font-size: 12.5px; color: var(--accent-text); }
.msg-fresh { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.chip-new { display: inline-flex; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); vertical-align: middle; }

/* ----- Reply templates (plans/ticket-workflow-improvements.md phase 3) ----- */
.template-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.template-row .field { flex: 1 1 260px; }
.template-hint { flex-basis: 100%; font-size: 12.5px; }
.set-status { max-width: 320px; }
/* Bring someone in from an internal note (plans/brd-release-1.md step 3c). */
.mention-pick { padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.mention-pick summary { cursor: pointer; font-weight: 600; }
.mention-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin: 10px 0 6px; }
.admin-row.tpl { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1.3fr) 120px; }
.admin-row.rt-row { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) 120px; }
.admin-row.rule-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto; }
.rule-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .admin-row.rule-row { grid-template-columns: 1fr auto; } }
.admin-table.tpl { min-width: 760px; }
.tpl-preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-off { opacity: 0.7; }
.tpl-form { max-width: 760px; }

/* ----- Paste a screenshot (plans/ticket-workflow-improvements.md phase 4): the note app.js writes under the file field ----- */
.paste-note { display: block; flex-basis: 100%; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

/* ----- Bulk actions on the queue (plans/ticket-workflow-improvements.md phase 5) ----- */
.bulk { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); }
.bulk:has(~ .list-scroll input[name="bulk-ticket"]:checked), .bulk:focus-within { border-color: var(--accent); }
.bulk > summary { padding: 12px 16px; font-weight: 600; cursor: pointer; }
.bulk[open] > summary { padding-bottom: 0; }
.bulk-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.bulk-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bulk-count { font-weight: 700; }
.bulk-acts { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.bulk-acts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bulk-acts label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font-weight: 600; color: var(--grey); cursor: pointer; border-right: 1px solid var(--line-2); }
.bulk-acts label:last-of-type { border-right: 0; }
.bulk-acts input:checked + label { background: var(--amber-bg); color: var(--amber-strong); }
.bulk-acts input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
.bulk-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.bulk-fields .field { flex: 0 1 240px; }
.bulk-fields .bulk-wide { flex: 1 1 320px; }
/* Only the chosen action's fields show; no script needed. */
.bulk-form:not(:has(#bulk-assign:checked)) .bulk-for-assign,
.bulk-form:not(:has(#bulk-status:checked)) .bulk-for-status,
.bulk-form:not(:has(#bulk-resolve:checked)) .bulk-for-resolve { display: none; }
.bulk-result { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--green-bg); border: 1px solid var(--green-line); color: var(--green-text); }
.bulk-result.bulk-mixed { background: var(--note-bg); border-color: var(--note-line); color: var(--text); }
.bulk-result p { margin: 0; }
.bulk-result ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.tickets.with-pick { min-width: 1092px; }
.tickets.with-pick .thead, .tickets.with-pick .row { grid-template-columns: 36px minmax(0, 3fr) 120px 150px 170px 150px 110px; }
.row-pick { position: relative; }
.row-pick:hover { background: var(--row-hover); }
.row-pick:has(.pick input:checked) { background: var(--note-bg); }
.row-link { color: inherit; text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; } /* the whole row opens the ticket */
.row-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick { position: relative; z-index: 1; display: flex; align-items: center; }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* ----- People on a ticket (plans/ticket-workflow-improvements.md phase 6) ----- */
.people-panel { gap: 10px; }
.people-form { display: flex; flex-direction: column; gap: 10px; }
.person-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--row-line); }
.person-row:first-of-type { border-top: 0; }
.links-panel { gap: 8px; }
.link-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--row-line); overflow-wrap: anywhere; }
.link-add { margin-top: 10px; display: grid; gap: 6px; }
.link-add input { min-width: 0; flex: 1 1 140px; }
.link-row:first-of-type { border-top: 0; }
.link-row .mono { margin-right: 6px; }
.person-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.people-add { display: flex; gap: 8px; align-items: flex-end; }
.people-add .field { flex: 1 1 auto; }
.follow-note { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--blue-bg); border: 1px solid var(--line-2); }
.follow-note p { margin: 0; flex: 1 1 320px; }

/* ----- Merge tickets (plans/ticket-workflow-improvements.md phase 7) ----- */
.merged-note { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); }
.merged-note p { margin: 0; flex: 1 1 320px; }
.merged-from { font-family: var(--font-mono); font-size: 11.5px; margin-right: 6px; }
.merge-row { display: flex; gap: 8px; align-items: flex-end; }
.merge-row .field { flex: 1 1 auto; }
.merge-confirm { border: 1px solid var(--note-line); background: var(--note-bg); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.merge-confirm ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.merge-target { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; background: var(--panel); }

/* ----- Out of office (plans/ticket-workflow-improvements.md phase 8) ----- */
.away-page .panel h2 { margin: 0; font-family: var(--font-display); font-size: 17px; }
.away-form { display: flex; flex-direction: column; gap: 16px; }
.away-main { max-width: 360px; }
.away-row { display: grid; grid-template-columns: 36px minmax(0, 2.4fr) minmax(0, 1.8fr) 160px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--row-line); }
.away-ticket { grid-template-columns: minmax(0, 2.4fr) 170px minmax(180px, 1fr); }
.away-did { font-size: 13px; color: var(--grey); }
.away-covers { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.away-review input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.away-label { display: inline-flex; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--amber-bg); color: var(--amber-strong); }
.away-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 12px; background: var(--blue-bg); border: 1px solid var(--line-2); }
.away-banner p { margin: 0; }
@media (max-width: 760px) { .away-row, .away-ticket { grid-template-columns: 1fr; } }

/* SLA times per project (plans/project-sla-and-thread.md): the four rows on "Add project" and the project page. */
.sla-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sla-times { border-collapse: collapse; width: 100%; min-width: 600px; font-variant-numeric: tabular-nums; }
.sla-times th { text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 10px; }
.sla-times tbody th { text-transform: none; letter-spacing: 0; }
.sla-times td, .sla-times tbody th { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.sla-pair { display: flex; gap: 8px; }
.sla-pair input { width: 80px; flex: none; }
.sla-pair select { flex: 1 1 150px; }
.sla-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.sla-history li { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sla-times-line { color: var(--muted); }

/* Long conversations (plans/project-sla-and-thread.md phase 2): the older part folds under a "Show N earlier messages" line. */
.thread-fold { display: flex; flex-direction: column; gap: 16px; }
.thread-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.thread-fold > summary::-webkit-details-marker { display: none; }
.thread-fold > summary::before, .thread-fold > summary::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }
.thread-fold > summary span { padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
.thread-fold > summary:hover span { color: var(--text); border-color: var(--muted); }
.thread-fold > summary:focus-visible { outline: none; }
.thread-fold > summary:focus-visible span { outline: 2px solid var(--accent); outline-offset: 2px; }
.thread-fold[open] > summary .when-closed, .thread-fold:not([open]) > summary .when-open { display: none; }
.fold-body { display: flex; flex-direction: column; gap: 16px; }
/* Messages from outside TBX (requester, colleagues, the description): name and text in the theme's softer grey. */
.msg-client .msg-head strong, .msg-client .msg-body { color: var(--muted); }

/* Saved views above the queue's tabs (plans/brd-release-1.md step 5e). */
.saved-views { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.saved-view-list { display: flex; flex-wrap: wrap; gap: 6px; }
.saved-view { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; }
.saved-view a { font-size: 14px; }
.save-view > summary { list-style: none; cursor: pointer; }
.save-view > summary::-webkit-details-marker { display: none; }
.save-view form { margin-top: 6px; }
.approval-levels { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.approval-reason { display: block; color: var(--muted); font-style: italic; }
.flow-hints ul { margin: 4px 0 8px; padding-left: 18px; }
.kb-suggest { margin-top: 6px; padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.kb-suggest ul { margin: 4px 0 0; padding-left: 18px; }
.signin-choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.ai-answer { white-space: pre-wrap; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; margin: 6px 0 10px; }
/* Dashboard (plans/brd-release-1.md step 13b) */
.dash-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dash-figure { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); border-top: 3px solid var(--line-2); }
.dash-figure.dash-blue { border-top-color: var(--blue); }
.dash-figure.dash-violet { border-top-color: var(--violet); }
.dash-figure.dash-amber { border-top-color: var(--amber); }
.dash-figure.dash-green { border-top-color: var(--green); }
.dash-figure.dash-red { border-top-color: var(--red); }
.dash-label { color: var(--muted); font-size: .85rem; }
.dash-value { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; } /* each card keeps its own height */
.dash-chart { width: 100%; height: auto; display: block; }
.dash-chart .bar-opened { fill: var(--blue); }
.dash-chart .bar-resolved { fill: var(--green); }
.chart-axis { fill: var(--faint); font-size: 8px; }
.dash-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.dash-legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.dash-legend .key-opened { background: var(--blue); }
.dash-legend .key-resolved { background: var(--green); margin-left: 10px; }
.dash-sla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.dash-sla > div { display: flex; flex-direction: column; gap: 2px; }
.dash-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-queue li { display: flex; flex-direction: column; gap: 2px; }
.dash-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 10px; padding: 4px 0; }
.dash-hbar { width: 100%; height: 8px; }
.dash-hbar rect { fill: var(--blue); }
.dash-hbar .bar-red { fill: var(--red); }
.dash-hbar .bar-amber { fill: var(--amber); }
.dash-hbar .bar-grey { fill: var(--grey); }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--row-line); }
.table-scroll { overflow-x: auto; }
/* The new frame (plans/brd-release-1.md step 14b): sidebar sections with icons, collapsible; the top bar. */
.side-links { gap: 2px; }
.sec { display: flex; flex-direction: column; gap: 2px; }
.sec-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #A3A6A4; padding: 14px 12px 6px; }
.side-links a.nl { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; }
.nl-icon { flex: none; }
.nl-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { justify-content: flex-start; }
.topbar-gap { flex: 1; }
.side-toggle { display: none; }
.lang-float { right: 112px; }
@media (min-width: 900px) {
  .side-toggle { display: block; }
  .shell.collapsed .side { width: 76px; padding-left: 10px; padding-right: 10px; }
  .shell.collapsed .brand-word, .shell.collapsed .sec-label, .shell.collapsed .nl-text, .shell.collapsed .nl-count,
  .shell.collapsed .me-text, .shell.collapsed .side-by span, .shell.collapsed .side-by img, .shell.collapsed .side-privacy { display: none; }
  .shell.collapsed .brand { justify-content: center; }
  .shell.collapsed .side-links a.nl { justify-content: center; padding: 0; }
  .shell.collapsed .sec + .sec { border-top: 1px solid #43464A; margin-top: 8px; padding-top: 6px; }
  .shell.collapsed .me { flex-direction: column; }
}
/* The list beside an open ticket (plans/brd-release-1.md step 14c); the script sizes the list from the handle. */
.split { display: block; }
.split-list, .split-handle { display: none; }
@media (min-width: 1100px) {
  .split { display: grid; grid-template-columns: var(--list-width, 340px) 8px minmax(0, 1fr); gap: 0 12px; align-items: start; }
  .split-list { display: block; position: sticky; top: 0; max-height: calc(100dvh - 120px); overflow-y: auto; }
  .split-handle { display: block; align-self: stretch; cursor: col-resize; border-radius: 4px; background: var(--line); }
  .split-handle:hover, .split-handle:focus-visible { background: var(--accent); outline: none; }
}
.pane-rows { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pane-rows a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.pane-rows a:hover { background: var(--row-hover); }
.pane-rows li.on a { border-color: var(--line-2); background: var(--panel); }
.pane-top { display: flex; gap: 6px; align-items: center; }
.pane-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Short desktop screens: a tighter sidebar, so an admin's menu fits at 900 px without its own scrollbar. */
@media (min-width: 761px) and (max-height: 960px) {
  .side { gap: 10px; padding-block: 14px; }
  .brand img { width: 44px; }
  .brand-word { font-size: 24px; }
  .sec-label { padding: 6px 12px 2px; }
  .side-links a.nl { min-height: 32px; }
  .me { padding: 8px 10px; }
  .side-by { padding-top: 10px; gap: 4px; }
  .side-by img { width: 120px; }
}
@media (max-width: 760px) {
  /* Phones: ticket rows become cards, nothing pushed off the right edge (after the table's own widths, so it wins). */
  .tickets, .tickets.with-sla, .tickets.with-pick { min-width: 0; }
  .tickets .thead { display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .tickets .thead .pick { display: none; }
  .tickets .row { display: flex; flex-wrap: wrap; gap: 8px 10px; border: 1px solid var(--line); margin-bottom: 8px; }
  .tickets .row .t-main { flex: 1 1 calc(100% - 50px); }
}
