:root {
    --panel-w: min(60vw, 1180px); /* width of the ticket opened beside the list; the divider changes it */
    /* colours and fonts: see THEMES at the end of this file */
}
html { font-size: 15px; }
body { background: var(--page); color: var(--ink); }
a { color: var(--accent); }
.icon { vertical-align: -3px; flex: none; }
.text-secondary { color: var(--muted) !important; }
.btn-primary { background: var(--accent); border-color: var(--accent); }

/* ---- frame: sidebar, top bar, content ---- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 216px; background: var(--side); color: #fff; display: flex; flex-direction: column; z-index: 1040; }
.brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: .5rem .6rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: rgba(255, 255, 255, .78); text-decoration: none; }
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.side-heading { margin: 1rem .7rem .3rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.app .main { margin-left: 216px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .6rem 1.5rem; background: #fff; border-bottom: 1px solid var(--line); }
/* the search box grows with a wide window (34rem on a laptop, up to 52rem on a very wide screen) */
.top-search { position: relative; flex: 1; max-width: clamp(34rem, 36vw, 52rem); margin-right: auto; }
.top-search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top-search .form-control { padding-left: 2.2rem; background: var(--page); border-color: transparent; }
.top-search .form-control:focus { background: #fff; border-color: var(--accent); }
/* the date and time at the top, in the app's time zone: time over date so it stays narrow on a phone */
.top-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; white-space: nowrap; flex: none; cursor: default; }
.top-clock-time { font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.top-clock-date { font-size: .75rem; color: var(--muted); }
@media (max-width: 575.98px) {
    .top-clock-time { font-size: .85rem; }
    .top-clock-date { font-size: .68rem; }
}
.content { padding: 1.5rem; }
/* pages use the full width of the window, however wide (Tommy, 24 Nov 2026); forms keep their own narrower widths */
.content-inner { max-width: none; }
.sidebar-backdrop { display: none; }
/* Desktop: the menu button folds the side menu down to its icons (and back), remembered in this browser */
@media (min-width: 992px) {
    .sidebar, .app .main { transition: width .18s, margin-left .18s; }
    .nav-collapsed .sidebar { width: 64px; overflow-x: hidden; }
    .nav-collapsed .app .main { margin-left: 64px; }
    .nav-collapsed .brand { padding-left: 15px; padding-right: 0; }
    .nav-collapsed .brand > span:not(.brand-mark), .nav-collapsed .side-nav a > span { display: none; }
    .nav-collapsed .side-nav { padding-left: 10px; padding-right: 10px; }
    .nav-collapsed .side-nav a { justify-content: center; padding-left: 0; padding-right: 0; }
    .nav-collapsed .side-heading { font-size: 0; height: 1px; margin: .8rem .4rem; background: rgba(255, 255, 255, .18); }
}
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    .sidebar-open .sidebar { transform: none; }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1030; }
    .app .main { margin-left: 0; }
    .topbar, .content { padding-left: 1rem; padding-right: 1rem; }
}

/* Every screen size, phones included: the page never grows into one long scroll. The side menu, top bar, announcement
   banner (and on phones the tab bar) stay in place and only the content area scrolls; a list page ("fill") keeps its
   title and filters fixed and scrolls the list itself. */
@media all {
    .app .main { height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
    .app .topbar, .app .announce-bar { flex: none; }
    .app .content { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
    .app .content.fill { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 1rem; }
    .app .content.fill .content-inner { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
    .app .content.fill .content-inner > * { flex: none; }
    .app .content.fill .content-inner > .fill-frame { flex: 1 1 auto; min-height: 12rem; display: flex; flex-direction: column; overflow: hidden; }
    .fill-frame > form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .fill-frame .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
    .app .content.fill .pager { margin-top: .75rem !important; }
    /* Admin > Settings: the open section scrolls inside the card, its Save button stays visible */
    .settings-body { flex: 1; min-height: 0; }
    .settings-body > * { max-height: 100%; }
    .settings-panes { display: flex; flex-direction: column; min-height: 0; }
    .settings-panes > .tab-pane.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .settings-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .settings-form > .settings-scroll { flex: 1; min-height: 0; overflow-y: auto; }
}
.settings-nav .nav-link { white-space: nowrap; }

/* list on the left, the one being edited on the right (Users, Clients) */
.split-frame { display: flex; flex-direction: column; gap: 1rem; }
.split-list thead.sticky-top th { background: var(--bs-body-bg); }
@media (min-width: 992px) {
    .app .content.fill .content-inner > .split-frame { flex: 1 1 auto; min-height: 12rem; flex-direction: row; align-items: stretch; }
    .split-frame > .split-list { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
    .split-frame > .split-list > .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
    .split-frame > .split-panel { flex: 0 0 26rem; display: flex; flex-direction: column; overflow: hidden; }
    .split-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .split-form > .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
}

/* Lists inside cards scroll within the card instead of stretching the page. */
.mini-list { max-height: 22rem; overflow-y: auto; }
.card > .table-responsive { max-height: 60vh; overflow-y: auto; }
.card > .table-responsive thead th { position: sticky; top: 0; z-index: 1; background: #fff; box-shadow: inset 0 -1px 0 var(--line); }
.scroll-frame { max-height: 26rem; overflow-y: auto; }
.card .timeline { max-height: 24rem; overflow-y: auto; padding-left: 2px; }

/* ---- shared pieces ---- */
.card { border-color: var(--line); border-radius: 10px; }
.page-title { font-size: 1.45rem; font-weight: 600; margin: 0; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 600; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
.ticket-number { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { font-weight: 600; }
.badge.status-New { background: #1d6fd6; }
.badge.status-Open { background: #b25e09; }
.badge.status-Pending { background: #6b4fbb; }
.badge.status-Resolved { background: #1f7a4d; }
.badge.status-Closed { background: #5b6672; }
.badge.status-Merged { background: #7a5c99; }
.badge.status-Archived { background: #4a5560; }
.badge.priority-Low { background: #e9ecef; color: #495057; }
.badge.priority-Normal { background: #e7f0fb; color: #1d4f91; }
.badge.priority-High { background: #fde8cf; color: #8a4500; }
.badge.priority-Urgent { background: #f9d6d5; color: #931c18; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; }
.dot.status-New { background: #1d6fd6; } .dot.status-Open { background: #d97a12; } .dot.status-Pending { background: #6b4fbb; }
.dot.status-Resolved { background: #1f7a4d; } .dot.status-Closed { background: #8a94a0; } .dot.status-Merged { background: #a08bb8; } .dot.status-Archived { background: #6b7580; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.empty .icon { color: #b6c0cc; margin-bottom: .5rem; }
.toast-holder { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; }
.toast-note { background: #1c2733; color: #fff; padding: .6rem .9rem; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); font-size: .9rem; }
.toast-note.bad { background: #a12622; }

/* ---- dashboard ---- */
.stat { display: block; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); height: 100%; transition: box-shadow .15s, border-color .15s; }
.stat:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(29, 111, 214, .12); color: var(--ink); }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 2rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat.attention .value { color: #b3261e; }
.mini-list a { display: flex; gap: .7rem; align-items: center; padding: .6rem 1rem; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.mini-list a:first-child { border-top: 0; }
.mini-list a:hover { background: #f7f9fc; }
.mini-list .subject { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list .grow { min-width: 0; flex: 1; }
.status-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #e9edf2; }
.status-bar span { display: block; }
.status-bar .status-New { background: #1d6fd6; } .status-bar .status-Open { background: #d97a12; } .status-bar .status-Pending { background: #6b4fbb; }

/* ---- ticket list ---- */
.view-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.view-tabs a { padding: .35rem .8rem; border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.view-tabs a:hover { border-color: var(--accent); }
.view-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.view-tabs .count { margin-left: .35rem; font-size: .8rem; opacity: .75; font-variant-numeric: tabular-nums; }
.filters .form-select { width: auto; min-width: 8.5rem; }
.ticket-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-top: 1px solid var(--line); cursor: pointer; }
.ticket-row:first-child { border-top: 0; }
.ticket-row:hover { background: #f7f9fc; }
.ticket-row.selected { background: #eef5ff; }
.ticket-row .grow { min-width: 0; flex: 1; }
.ticket-row .subject { font-weight: 500; color: var(--ink); text-decoration: none; }
.ticket-row.is-new .subject { font-weight: 700; }
.ticket-row .subject:hover { text-decoration: underline; }
.ticket-row .preview, .ticket-row .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row .preview { color: var(--muted); }
.ticket-row .meta { color: var(--muted); font-size: .85rem; }
.ticket-row .quick { display: flex; flex-direction: column; gap: .3rem; width: 11rem; flex: none; }
.ticket-row .quick-line { display: flex; gap: .3rem; }
.quick-select { border: 1px solid transparent; background-color: transparent; border-radius: 6px; padding: .12rem 1.4rem .12rem .45rem; font-size: .85rem; width: 100%; color: var(--ink); cursor: pointer;
    appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2366758a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .35rem center; background-size: 11px; }
.ticket-row:hover .quick-select, .quick-select:focus { border-color: #cfd6de; background-color: #fff; }
.quick-select.status-New { color: #1d5fb8; font-weight: 600; } .quick-select.status-Open { color: #9a5208; font-weight: 600; }
.quick-select.status-Pending { color: #5a3fa8; font-weight: 600; } .quick-select.status-Resolved { color: #1a6a43; font-weight: 600; } .quick-select.status-Closed { color: #5b6672; font-weight: 600; } .quick-select.status-Archived { color: #4a5560; font-weight: 600; }
.quick-select.priority-High { color: #8a4500; font-weight: 600; } .quick-select.priority-Urgent { color: #b3261e; font-weight: 700; }
.bulk-bar { display: none; align-items: center; flex-wrap: wrap; gap: .6rem; padding: .6rem 1rem; background: #eef5ff; border-bottom: 1px solid #cfe0f7; border-radius: 10px 10px 0 0; }
.bulk-bar.show { display: flex; }
.bulk-bar .form-select { width: auto; }
@media (max-width: 767.98px) { .ticket-row .quick { display: none; } }
/* the list shows as much as its own width allows: a wider list (menu folded, divider moved) brings back the preview and quick changes */
#ticket-list { container-type: inline-size; }
@container (max-width: 34rem) { .ticket-row .preview { display: none; } }
@container (max-width: 44rem) { .ticket-row .quick { display: none; } }

/* ---- ticket panel beside the list ---- */
.panel-resizer { display: none; }
.ticket-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(60vw, 1180px); display: none; flex-direction: column; background: var(--page);
    border-left: 1px solid var(--line); box-shadow: -10px 0 28px rgba(21, 42, 69, .10); z-index: 1035; }
body.panel-open .ticket-panel { display: flex; }
.panel-bar { display: flex; align-items: center; gap: .5rem; padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.panel-body { flex: 1; overflow-y: auto; padding: 1.25rem; }
.panel-body.loading { opacity: .5; pointer-events: none; }
.ticket-row.active { background: #e4efff; box-shadow: inset 3px 0 0 var(--accent); }
@media (min-width: 1200px) {
    /* the list stays usable next to the panel: it keeps its space and drops what does not fit */
    body.panel-open .main { margin-right: var(--panel-w); }
    body.panel-open .filters, body.panel-open .top-search + .btn span { display: none !important; }
    .ticket-panel { width: var(--panel-w); }
    /* the divider between the list and the ticket can be dragged; the ticket keeps at least half the screen */
    .panel-resizer { display: block; position: absolute; top: 0; bottom: 0; left: -5px; width: 10px; cursor: col-resize; z-index: 2; touch-action: none; }
    .panel-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: transparent; transition: background .15s; }
    .panel-resizer:hover::after, .panel-resizer:focus-visible::after, body.panel-resizing .panel-resizer::after { background: var(--accent); }
    .panel-resizer:focus { outline: none; }
    body.panel-resizing { cursor: col-resize; user-select: none; }
    body.panel-resizing .main, body.panel-resizing .sidebar { transition: none; }
    body.panel-open .content { padding-right: 1rem; }
}
@media (max-width: 1199.98px) {
    /* phone and tablet: the ticket takes the whole screen; "Tickets" or the Back button returns to the list */
    .ticket-panel { width: 100vw; z-index: 1050; box-shadow: none; }
    .panel-body { padding: 1rem; }
    body.panel-open { overflow: hidden; }
}

/* ---- ticket page ---- */
.message { display: flex; gap: .9rem; margin-bottom: 1rem; }
.message .card { flex: 1; min-width: 0; }
.message .card-header { background: #fff; border-bottom-color: var(--line); }
.message-frame { width: 100%; border: 0; display: block; min-height: 3rem; }
.attachment-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.attachment-chips a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fafbfc; max-width: 100%; }
.attachment-chips a:hover { border-color: var(--accent); background: #fff; }
.attachment-chips .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chips .preview-tag { font-size: .7rem; font-weight: 600; color: var(--accent); background: #e8f1fc; border-radius: 4px; padding: 0 .35rem; white-space: nowrap; }

/* pop-up preview of image and PDF attachments (js/attachment-preview.js) */
html.preview-open, html.preview-open body { overflow: hidden; }
.preview-dialog { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 34, .72); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.preview-dialog[hidden] { display: none; }
.preview-box { background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.35); width: min(1400px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.preview-head { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem .4rem 1rem; border-bottom: 1px solid var(--line); min-height: 2.9rem; }
.preview-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.preview-count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.preview-actions { margin-left: auto; display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.preview-btn { border: 1px solid transparent; background: none; color: var(--ink); border-radius: 6px; min-width: 2.25rem; height: 2.25rem; padding: 0 .55rem; font-size: 1.15rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.preview-btn.preview-text { font-size: .875rem; }
.preview-btn:hover:not(:disabled) { background: var(--page); border-color: var(--line); color: var(--ink); }
.preview-btn:disabled { opacity: .35; cursor: default; }
.preview-btn[hidden] { display: none; }
/* the file scrolls inside this frame, in both directions when zoomed in */
.preview-frame { flex: 1; min-height: 0; background: #525c69; overflow: auto; position: relative; padding: 1rem; touch-action: pan-x pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.preview-frame.zoomed { cursor: grab; }
.preview-frame.dragging { cursor: grabbing; user-select: none; }
.preview-frame.loading::before { content: "Loading..."; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #e3e8ee; font-size: .9rem; }
.preview-stage { display: flex; align-items: center; justify-content: center; min-width: 100%; min-height: 100%; width: max-content; margin: 0 auto; }
.preview-frame.pdf .preview-stage { align-items: flex-start; }
.preview-img { display: block; max-width: none; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.preview-pages { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding-bottom: 3.5rem; }
.preview-page-box { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3); position: relative; }
.preview-page-box canvas { display: block; width: 100%; height: 100%; }
.preview-pdf { width: 100%; height: 100%; min-height: 70vh; border: 0; background: #fff; }
.preview-fail { color: #e7ecf2; margin: 0; padding: 1rem; text-align: center; }
/* zoom controls float at the bottom of the file */
.preview-zoom { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; align-items: center; gap: .15rem; background: rgba(28, 39, 51, .88); color: #fff; border-radius: 999px; padding: .25rem .4rem; box-shadow: 0 4px 16px rgba(0,0,0,.3); z-index: 2; }
.preview-zoom .preview-btn { color: #fff; border-radius: 999px; }
.preview-zoom .preview-btn:hover:not(:disabled) { background: rgba(255,255,255,.15); border-color: transparent; color: #fff; }
.preview-zoom-label { min-width: 4rem; font-variant-numeric: tabular-nums; }
.preview-page { font-size: .82rem; color: #c9d2dc; padding: 0 .5rem; white-space: nowrap; }
.preview-page:empty { display: none; }
@media (max-width: 767.98px) {
    /* on a phone (and the home screen app) the file takes the whole screen, clear of the notch and home bar */
    .preview-dialog { padding: 0; background: #525c69; }
    .preview-box { width: 100%; height: 100%; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
    .preview-head { padding-left: max(.75rem, env(safe-area-inset-left)); padding-right: max(.4rem, env(safe-area-inset-right)); }
    .preview-frame { padding: .5rem; }
    .preview-pages { gap: .5rem; padding-bottom: 5rem; }
    .preview-zoom { bottom: calc(.75rem + env(safe-area-inset-bottom)); }
    .preview-count, .preview-open-link { display: none; }
    .preview-btn { min-width: 2.6rem; height: 2.6rem; }
}
.side-card h2 { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.meta-list dt { font-weight: 500; color: var(--muted); font-size: .82rem; }
.meta-list dd { margin-bottom: .7rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.3rem; border-left: 2px solid var(--line); margin-left: .35rem; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #9fb0c3; }
.timeline .when { color: var(--muted); font-size: .82rem; }

.sign-in { max-width: 24rem; margin: 9vh auto 0; }
.sign-in .brand { color: var(--ink); justify-content: center; padding-top: 0; }
.sign-in-or { display: flex; align-items: center; gap: .75rem; }
.sign-in-or::before, .sign-in-or::after { content: ""; flex: 1; border-top: 1px solid var(--bs-border-color, #dee2e6); }

/* ---- AI agents, groups, follow-ups ---- */
.pre-line { white-space: pre-line; }
.badge.review-badge { background: #fff1c2; color: #7a5200; border: 1px solid #f1d37a; }
.ai-card { border-color: #d9d2f5; }
.ai-card h2 { color: #5a3fa8; }
.ai-section { padding-top: .75rem; margin-top: .75rem; border-top: 1px solid var(--line); }
.ai-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ai-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.ai-facts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin-bottom: .5rem; font-size: .92rem; }
.ai-facts dt { font-weight: 500; color: var(--muted); }
.ai-facts dd { margin: 0; }
.ai-note { padding: .5rem .7rem; border-radius: 8px; background: #f2f5f9; font-size: .9rem; }
.ai-note.warn { background: #fff8e1; color: #6b4a00; }
.ai-note.bad { background: #fdecea; color: #8c1d18; }
.resolve-menu { width: 22rem; max-width: 90vw; }
.stat.warn .value { color: #9a6700; }
.stat.ok .value { color: #1f7a4d; }
.queue-table td, .queue-table th { white-space: nowrap; }

/* ---- announcements ---- */
.announce-bar { display: flex; flex-direction: column; gap: 1px; }
.announce { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.5rem; background: #fdecea; color: #7a1c17; text-decoration: none; font-size: .92rem; }
.announce:hover { color: #7a1c17; background: #fbdedb; }
.announce.status-Monitoring { background: #fff6dc; color: #6b4a00; }
.announce.status-Restored { background: #e3f4ea; color: #155b37; }
.announce .what { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.announce > svg, .announce .badge { flex: none; }
.announce-bar { max-width: 100%; overflow: hidden; }
.announce .latest { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.badge.ann-Investigating { background: #b3261e; } .badge.ann-Identified { background: #c2410c; }
.badge.ann-Monitoring { background: #9a6700; } .badge.ann-Restored { background: #1f7a4d; }
@media (max-width: 991.98px) { .announce { padding: .5rem 1rem; } }
/* phones: a long title wraps onto a second line (then ends in "...") instead of running off the screen; the status stays visible */
@media (max-width: 767.98px) {
    .announce { align-items: flex-start; gap: .5rem; }
    .announce > svg { margin-top: .2rem; }
    .announce .what { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex: 1 1 auto; }
    .announce .badge { margin-top: .1rem; }
    /* several at once: the banner never takes more than a third of the screen; it scrolls inside itself */
    .announce-bar { max-height: 33vh; overflow-y: auto; overscroll-behavior: contain; }
    .sign-in-news .what { display: block; }
}
.sign-in-news { display: flex; flex-direction: column; gap: .5rem; max-height: 40vh; overflow-y: auto; }
.sign-in-news .announce { align-items: flex-start; border-radius: .5rem; padding: .65rem .85rem; }
.sign-in-news .announce > svg { flex: none; margin-top: .2rem; }
.sign-in-news .what { white-space: normal; }
.min-w-0 { min-width: 0; }

/* helpers from newer Bootstrap versions that the bundled 5.1 does not have */
.text-bg-success { background: #1f7a4d !important; color: #fff !important; }
.text-bg-secondary { background: #5b6672 !important; color: #fff !important; }
.text-bg-danger { background: #b3261e !important; color: #fff !important; }
.text-bg-light { background: #f4f6f9 !important; color: #1c2733 !important; }
.rounded-end-0 { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.border-warning-subtle { border-color: #f1d37a !important; }
.text-warning-emphasis { color: #9a6700 !important; }
.card-note { flex: none; }
@media (min-width: 1200px) {
    /* with a ticket open beside the list, the views stay on one line and slide sideways */
    body.panel-open #view-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: thin; }
}

/* ---- AI usage chart ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #8a5cc8; --series-5: #c2477d; --series-6: #b7791f; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .9rem; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--ink); }
.chart-frame { position: relative; }
.usage-chart { display: block; width: 100%; height: auto; overflow: visible; }
.usage-chart .grid { stroke: #edf0f4; stroke-width: 1; }
.usage-chart .axis { stroke: #c5ced8; stroke-width: 1; }
.usage-chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.usage-chart .hit { fill: transparent; }
.usage-chart .bucket { outline: none; cursor: default; }
.usage-chart .bucket.on .hit, .usage-chart .bucket:focus .hit { fill: rgba(29, 111, 214, .06); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(21, 42, 69, .14);
    padding: .45rem .65rem; font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.agent-setup { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem .2rem; margin-bottom: .8rem; }
.agent-setup legend { float: none; width: 100%; font-size: .95rem; font-weight: 600; margin-bottom: .4rem; padding: 0; }
.role-text { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.list-group-item.active-role { background: #eef5ff; }

/* ---- private notes and the Ticket Analyzer ---- */
.note-list { display: flex; flex-direction: column; gap: .6rem; }
.note { border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .5rem; padding: .6rem .75rem; background: #fffdf5; }
.note-ai { background: #f5f8ff; }
.note-superseded { opacity: .65; }
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.note-correct > summary { list-style: none; }
.note-correct > summary::-webkit-details-marker { display: none; }
.note-correct[open] { flex-basis: 100%; }
.skill-diff { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.skill-diff .changed { background: #fff6d6; }
@media (max-width: 767.98px) { .skill-diff { grid-template-columns: 1fr; } }
@media (min-width: 992px) {
    .split-frame.wide-panel > .split-list { flex: 0 0 22rem; }
    .split-frame.wide-panel > .split-panel { flex: 1 1 auto; min-width: 0; }
}

/* ---- replies emailed to the requester */
.message-outgoing .card { border-color: #b9dcc6; }
.message-outgoing .card-header { background: #eef8f1; }
/* one box with two tabs: Reply and Private note. Closed, it is the tab strip and a one-line prompt */
.compose-head { background: #f4f8fd; padding: .35rem .5rem 0; border-bottom: 1px solid var(--line); }
.compose-tab { border: 0; background: none; padding: .45rem .8rem .5rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.compose-tab:hover { color: var(--bs-body-color, #1c2733); }
.compose-tab[aria-selected="true"] { color: #1d6fd6; border-bottom-color: #1d6fd6; }
.compose-card[data-tab="note"] .compose-tab[aria-selected="true"] { color: #8a5a00; border-bottom-color: #d39b22; }
.compose-card[data-tab="note"] .compose-head { background: #fff8e6; }
.compose-card[data-tab="note"] .note-box { background: #fffcf3; }
.compose-hint { padding-bottom: .3rem; }
.compose-close { padding-bottom: .4rem; }
.compose-card:not(.is-open) .compose-close { display: none; }
.compose-card[data-tab="reply"] [data-compose-hint="note"], .compose-card[data-tab="note"] [data-compose-hint="reply"] { display: none !important; }
.compose-pane { display: none; }
.compose-card.is-open[data-tab="reply"] [data-compose-pane="reply"], .compose-card.is-open[data-tab="note"] [data-compose-pane="note"] { display: block; }
.compose-placeholder { display: block; width: 100%; text-align: left; border: 0; background: #fff; color: var(--muted); padding: .7rem 1rem; border-radius: 0 0 .5rem .5rem; }
.compose-placeholder:hover { background: #f8fafc; }
.compose-card.is-open .compose-placeholder { display: none; }
.notify-menu { min-width: 15rem; max-height: 18rem; overflow-y: auto; }
.notify-menu .dropdown-item { white-space: nowrap; cursor: pointer; border-radius: .3rem; }
.notify-picked { max-width: 22rem; }
.note-reminder { max-width: 100%; }
.reminder-strip { display: grid; gap: .35rem; }
.reminder-row .reminder-text { min-width: 0; flex: 1 1 10rem; }
/* the ticket's history is closed until clicked */
.history-card > summary { cursor: pointer; list-style: none; }
.history-card > summary::-webkit-details-marker { display: none; }
.history-card .history-chevron svg { transition: transform .15s; }
.history-card[open] .history-chevron svg { transform: rotate(180deg); }
/* AI suggestions and the analyzer's notes also start closed so the ticket isn't busy */
.badge.ai-hint { background: #f1eefb; color: #5a3fa8; border: 1px solid #d9d2f5; }
.badge.ai-hint.go { background: #5a3fa8; color: #fff; border-color: #5a3fa8; }
.badge.ai-hint.bad { background: #fdecea; color: #8c1d18; border-color: #f5c2bd; }
.ai-note-fold > summary { cursor: pointer; list-style: none; }
.ai-note-fold > summary::-webkit-details-marker { display: none; }
.ai-note-fold .history-chevron svg { transition: transform .15s; }
.ai-note-fold[open] .history-chevron svg { transform: rotate(180deg); }
.ai-note-fold[open] .ai-note-preview { display: none; }
.ai-note-fold .ai-note-preview { max-width: 100%; }
.reply-fields { display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; align-items: center; }
.reply-fields label, .reply-fields > span { margin: 0; }
.reply-fields input[readonly] { background: var(--bs-light, #f8f9fa); }
.reply-file-list li .text-truncate { max-width: 60%; }
/* To/Cc: known addresses are suggested under the box as the agent types; anything typed by hand is still taken */
.address-field { position: relative; min-width: 0; }
.address-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 1060; list-style: none; margin: 0; padding: .25rem 0;
    background: #fff; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; }
.address-suggestions li { display: flex; align-items: baseline; gap: .5rem; padding: .4rem .75rem; cursor: pointer; min-width: 0; }
.address-suggestions li[aria-selected="true"], .address-suggestions li:hover { background: #eaf2fd; }
.address-suggestions .who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.address-suggestions .addr { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.address-suggestions .hint { color: var(--muted); font-size: .75rem; white-space: nowrap; margin-left: auto; flex: none; }
.requester-change > summary { cursor: pointer; color: var(--bs-link-color); width: max-content; }
.requester-change .address-suggestions .meta { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.requester-change .address-suggestions li { flex-wrap: wrap; row-gap: 0; }
.requester-change .address-suggestions li .addr { flex-basis: 100%; }
.address-suggestions .typed { color: var(--muted); font-size: .8rem; cursor: default; }
@media (max-width: 767.98px) {
    /* on a phone each choice is a full-width row big enough for a thumb, the name above the address */
    .address-suggestions { max-height: 45vh; }
    .address-suggestions li { flex-wrap: wrap; row-gap: 0; padding: .55rem .85rem; min-height: 44px; align-items: center; }
    .address-suggestions .who { flex: 1 1 0; }
    .address-suggestions .addr { flex: 1 0 100%; order: 3; font-size: .85rem; }
}
.message-highlight .card { box-shadow: 0 0 0 3px rgba(29, 111, 214, .35); }
/* the emails on a ticket scroll inside their own frame, so a long history never makes the page long */
.conversation { max-height: min(62vh, 44rem); overflow-y: auto; overscroll-behavior: contain; padding: .25rem .5rem .25rem 0; border-radius: .5rem; }
.conversation .message:last-child { margin-bottom: 0; }

/* ---- phones and the home screen app ---- */
.tab-bar, .filters-toggle, .install-hint { display: none; }
.scroll-target { scroll-margin-top: 1rem; }
@media (max-width: 767.98px) {
    /* the main places sit at the bottom, within reach of a thumb; the top bar keeps search and the account menu */
    .app .tab-bar { display: flex; flex: none; background: #fff; border-top: 1px solid var(--line); padding: 0 0 env(safe-area-inset-bottom); z-index: 1020; }
    .tab-bar a, .tab-bar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem 0 .35rem; border: 0; background: none;
        color: var(--muted); font-size: .7rem; text-decoration: none; -webkit-tap-highlight-color: transparent; }
    .tab-bar a.active { color: var(--accent); font-weight: 600; }
    .tab-bar .tab-new .icon { background: var(--accent); color: #fff; border-radius: 50%; width: 30px; height: 30px; padding: 4px; margin-top: -4px; }
    .app .topbar .menu-toggle, .app .topbar > .btn-primary { display: none; }
    .topbar { padding-top: calc(.6rem + env(safe-area-inset-top)); gap: .5rem; }
    .content { padding-top: 1rem; padding-bottom: 1rem; }
    .app .content.fill { padding-bottom: .5rem; }
    .page-title { font-size: 1.3rem; }
    .sidebar { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); overflow-y: auto; }
    .toast-holder { left: 1rem; right: 1rem; bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
    /* iPhone zooms in on any field with text smaller than 16px; keep every field at 16px so the page stays put */
    input.form-control, select.form-select, textarea.form-control, .form-control-sm, .form-select-sm, .top-search .form-control { font-size: 16px; }

    /* ticket list: the views slide sideways on one line, the filters fold away, the list gets the screen */
    .view-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin: 0 -1rem; padding: 0 1rem 2px; width: calc(100% + 2rem); scrollbar-width: none; }
    .view-tabs::-webkit-scrollbar { display: none; }
    .filters-toggle { display: inline-flex; align-items: center; gap: .35rem; }
    .filters-toggle.has-filters { border-color: var(--accent); color: var(--accent); }
    #ticket-filters:not(.show) { display: none !important; }
    #ticket-filters .form-select { flex: 1 1 45%; min-width: 0; }
    #ticket-filters .ms-auto { margin-left: 0 !important; flex: 1 1 100%; }
    .ticket-row { gap: .7rem; padding: .75rem .9rem; align-items: flex-start; }
    .ticket-row .ticket-check, #ticket-list .bulk-bar, #ticket-list #check-all, #ticket-list label[for="check-all"] { display: none !important; }
    .ticket-row .avatar { margin-top: 2px; }
    .ticket-row .grow > .d-flex:first-child { flex-wrap: wrap; row-gap: .2rem; }
    .ticket-row .grow .subject { flex: 1 1 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
    .ticket-row .meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

    /* ticket page: the actions wrap and stay large enough to tap */
    .ticket-actions { width: 100%; }
    .ticket-actions > .btn, .ticket-actions > form, .ticket-actions > .btn-group { flex: 1 1 auto; }
    .ticket-actions > form > .btn { width: 100%; }
    .ticket-actions > .btn-group > form { flex: 1; }
    .ticket-actions > .btn-group > form > .btn { width: 100%; }
    .ticket-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap; }
    .ticket-actions .dropdown-toggle-split { flex: none; }
    .conversation { max-height: none; overflow: visible; padding-right: 0; }
    .message { gap: .6rem; }
    .message > .avatar { display: none; }

    /* wide tables slide sideways inside their card instead of pushing the page wider than the screen */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-wrap > .table { min-width: 34rem; }

    /* long forms (Settings, Notifications, Merge): on a phone the whole content area scrolls between the top bar and the
       tab bar, rather than squeezing a second scrolling box into what is left of the screen */
    .app .content.fill.phone-scroll { display: block; overflow-y: auto; }
    .app .content.fill.phone-scroll .content-inner { display: block; }
    .phone-scroll .list-scroll, .phone-scroll .settings-scroll, .phone-scroll .fill-frame { overflow: visible !important; max-height: none !important; }

    /* install hint for iPhone and iPad Safari */
    .install-hint:not([hidden]) { display: flex; align-items: center; gap: .75rem; position: fixed; left: .75rem; right: .75rem; bottom: calc(4.6rem + env(safe-area-inset-bottom)); z-index: 1036;
        background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; box-shadow: 0 10px 30px rgba(21, 42, 69, .18); }
    .install-hint img { border-radius: 9px; }
    .share-glyph { color: var(--accent); }
}
/* opened from the home screen: no browser bar, so the app draws under the status bar on its own */
@media (display-mode: standalone) {
    .plain .content { padding-top: calc(1.5rem + env(safe-area-inset-top)); }
}
/* ---- the bell in the top bar */
.bell-button { position: relative; padding-left: .7rem; padding-right: .7rem; }
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: .6rem;
    background: #d63939; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.bell-menu { width: min(24rem, calc(100vw - 2rem)); }
/* the list scrolls inside the menu, never the page */
.bell-list { max-height: min(60vh, 28rem); overflow-y: auto; overscroll-behavior: contain; }
.bell-item { display: block; padding: .6rem 1rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.bell-item:hover { background: #f4f8fd; color: inherit; }
.bell-item.unread { background: #eef5fe; box-shadow: inset 3px 0 0 #1d6fd6; }
.bell-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.bell-list-page { max-height: min(70vh, 48rem); }

/* ---- client portal: its own simple frame, no staff menu ---- */
.portal { min-height: 100vh; }
.portal-top { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .55rem 1.25rem; padding-top: calc(.55rem + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--line); }
.portal-brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 600; text-decoration: none; }
.portal-brand .brand-mark { width: 30px; height: 30px; }
.portal-nav { display: flex; gap: .25rem; margin-left: 1rem; }
.portal-nav a { padding: .35rem .7rem; border-radius: 8px; color: var(--muted); text-decoration: none; }
.portal-nav a.active, .portal-nav a:hover { background: var(--page); color: var(--ink); }
.portal-main { padding: 1.25rem; max-width: 1100px; margin: 0 auto; }
.portal-narrow { max-width: 860px; margin: 0 auto; }
.portal-search { width: min(20rem, 100%); }
.portal-tabs .nav-link { padding: .3rem .8rem; }
.portal-row { padding: .7rem 1rem; }
.portal-status { background: #e8eef6; color: var(--ink); font-weight: 600; }
.portal-status.status-New, .portal-status.status-Open { background: #dbe9fb; color: #124a91; }
.portal-status.status-Pending { background: #fff1cc; color: #7a5300; }
.portal-status.status-Resolved, .portal-status.status-Closed, .portal-status.status-Archived { background: #dcf3e3; color: #1d6b38; }
.portal-message.from-it { border-left: 3px solid var(--accent); }
.portal-message .message-frame { width: 100%; border: 0; min-height: 4rem; display: block; }
/* the request list scrolls inside its own frame; the heading and tabs stay put */
@media (min-width: 768px) {
    .portal-main.portal-fill { height: calc(100vh - 54px); display: flex; flex-direction: column; }
    .portal-fill > .portal-frame { flex: 1 1 auto; min-height: 10rem; overflow: hidden; display: flex; flex-direction: column; }
    .portal-fill > .portal-frame > .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
}
@media (max-width: 575.98px) {
    .portal-top { padding-left: 1rem; padding-right: 1rem; }
    .portal-nav { display: none; }
    .portal-main { padding: 1rem; }
}

/* ---- dashboard ticket chart (HTML bars, so the text stays readable on a phone) ---- */
.trend { display: flex; gap: .4rem; padding: 0 .9rem 1.4rem 0; }
.trend-axis { position: relative; width: 1.8rem; height: 200px; flex: none; }
.trend-axis span { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.trend-plot { position: relative; flex: 1; height: 200px; display: flex; min-width: 0; }
.trend-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #edf0f4; }
.trend-grid.axis { border-top-color: #c5ced8; }
.trend-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; border-radius: 4px; }
.trend-col.on, .trend-col:focus-visible { background: rgba(29, 111, 214, .06); }
.trend-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; width: 72%; max-width: 54px; position: relative; z-index: 1; }
.trend-bars span { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; }
.trend-label { position: absolute; top: 100%; margin-top: .3rem; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) {
    .trend-axis, .trend-plot { height: 160px; }
    .trend-bars { width: 86%; gap: 1px; }
    .trend + details, #trend .chart-legend { font-size: .8rem; gap: .3rem .9rem; }
    .trend-label.skip2 { display: none; }
}
@media (max-width: 420px) {
    .trend-label.skip2 { display: inline; }
    .trend-label.skip3 { display: none; }
}

/* SLA: due times on tickets (Services/Sla.cs) */
.badge.sla-badge { font-weight: 600; white-space: nowrap; }
.badge.sla-ok { background: #eef2f6; color: #3e4c59; border: 1px solid #d5dae0; }
.badge.sla-soon { background: #fff1c2; color: #7a5200; border: 1px solid #f1d37a; }
.badge.sla-overdue { background: #fde2e1; color: #a61b1b; border: 1px solid #f5b5b2; }
.badge.sla-paused { background: #f3f4f6; color: #6b7280; border: 1px dashed #c9ced6; }
dd.sla-overdue { color: #a61b1b; font-weight: 600; }
dd.sla-soon { color: #7a5200; font-weight: 600; }
dd.sla-met { color: #1f7a3a; }
dd.sla-paused { color: #6b7280; }

/* My to-do: a week of columns; each column scrolls on its own, phones slide from day to day */
.todo-board { flex-direction: row !important; gap: .75rem; overflow-x: auto !important; overflow-y: hidden; scroll-snap-type: x mandatory; padding-bottom: 2px; }
.todo-col { flex: 1 1 0; min-width: 12.5rem; display: flex; flex-direction: column; background: #f5f7fa; border: 1px solid var(--line); border-radius: 10px; scroll-snap-align: start; min-height: 0; }
.todo-col > header { flex: none; padding: .55rem .75rem; border-bottom: 1px solid var(--line); font-size: .9rem; display: flex; align-items: center; gap: .35rem; }
.todo-col > header .count { margin-left: auto; font-size: .75rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 0 .45rem; }
.todo-col-today { border-color: var(--accent) !important; background: var(--sel) !important; }
.todo-col-today > header { color: var(--accent); }
.todo-col-late { border-color: #f5b5b2; background: #fff5f5; }
.todo-col-late > header { color: var(--danger); }
.todo-col-past { opacity: .7; }
.todo-list { flex: 1; min-height: 0; overflow-y: auto; padding: .5rem; display: flex; flex-direction: column; gap: .5rem; }
.todo-empty { color: var(--muted); font-size: .8rem; text-align: center; padding: 1rem 0; }
.todo-item { display: flex; flex-direction: column; gap: .15rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid #9aa5b1; border-radius: 8px;
    padding: .5rem .6rem; text-decoration: none; color: inherit; font-size: .82rem; }
.todo-item:hover { border-color: var(--accent); }
.todo-item.late { background: #fffafa; }
.todo-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.todo-time { font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.todo-item.late .todo-time { color: var(--danger); }
.todo-subject { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.todo-meta { display: flex; justify-content: space-between; align-items: center; gap: .4rem; color: var(--muted); font-size: .75rem; }
.todo-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-detail { color: var(--muted); font-size: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.todo-reply { border-left-color: #2f6fed; } .todo-resolve { border-left-color: #7c3aed; } .todo-reminder { border-left-color: #d97706; }
.todo-follow { border-left-color: #0f9d76; } .todo-none { border-left-color: #c9ced6; }
.todo-key { white-space: nowrap; margin-left: .5rem; }
.todo-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 .25rem 0 .6rem; vertical-align: -1px; background: #c9ced6; }
.todo-key i.todo-reply { background: #2f6fed; } .todo-key i.todo-resolve { background: #7c3aed; } .todo-key i.todo-reminder { background: #d97706; } .todo-key i.todo-follow { background: #0f9d76; }
.todo-impact { font-size: .68rem; font-weight: 600; padding: 0 .35rem; border-radius: 999px; white-space: nowrap; background: var(--p-low-bg); color: var(--p-low); }
.todo-impact.impact-high { background: var(--p-high-bg); color: var(--p-high); } .todo-impact.impact-critical { background: var(--p-urgent-bg); color: var(--p-urgent); }
.todo-auto-status { margin-left: .5rem; white-space: nowrap; }
@media (max-width: 767.98px) {
    .todo-col { flex: 0 0 86%; min-width: 0; }
    .todo-intro { display: none; }
    .todo-key { display: block; margin: 0; white-space: normal; }
    .todo-key i:first-child { margin-left: 0; }
}
.list-group-item.active-row { background: var(--bs-primary-bg-subtle, #eef4ff); }
.badge.leave-upcoming { background: #e7f0fb; color: #1d4f91; }
.badge.leave-on { background: #fff1d6; color: #8a4b00; }
.badge.leave-ended, .badge.leave-cancelled { background: #e9ecef; color: #495057; }

/* ---- incidents in the client portal ---- */
.portal-incidents { display: flex; flex-direction: column; gap: .4rem; flex: none; max-height: 30vh; overflow-y: auto; overscroll-behavior: contain; }
.portal-incident { display: flex; align-items: center; gap: .75rem; padding: .55rem .85rem; border-radius: .5rem; background: #fdecea; color: #7a1c17; }
.portal-incident.status-Monitoring { background: #fff6dc; color: #6b4a00; }
.portal-incident.status-Restored { background: #e3f4ea; color: #155b37; }
.portal-incident-text { display: flex; align-items: baseline; gap: .5rem; min-width: 0; flex: 1 1 auto; color: inherit; text-decoration: none; }
.portal-incident-text .latest { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; opacity: .85; }
.portal-incident-action { flex: none; }
.portal-incident-action a { color: inherit; }
@media (max-width: 575.98px) {
    .portal-incident { flex-wrap: wrap; }
    .portal-incident-text { flex-wrap: wrap; }
    .portal-incident-text .latest { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex-basis: 100%; }
}
/* ---- incidents on the staff Announcements page ---- */
.incident-affected { max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; }
.incident-counts .badge { font-weight: 500; }

/* =====================================================================================================================
   THEMES (Tommy, 24 Nov 2026): "Harbour" by day and "Midnight" by night. js/theme.js sets <html data-theme="light|dark">
   from Melbourne sunrise and sunset, or from the person's own choice (Auto / Light / Dark in their name menu).
   Only colours, fonts, corners and shadows live here; the layout above is shared by both.
   ===================================================================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter-latin.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/manrope-latin.woff2) format('woff2'); }

/* Harbour: light, white side menu, indigo */
:root {
    color-scheme: light;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --head-weight: 700; --head-tracking: -.02em; --tracking: -.005em;
    --ink: #101828; --muted: #667085; --line: #eaecf0; --line-strong: #d0d5dd; --page: #f9fafb;
    --surface: #fff; --surface-2: #f2f4f7; --input-bg: #fff; --hover: #f5f7ff; --sel: #eef2ff;
    --accent: #4f46e5; --on-accent: #fff; --focus: rgba(79, 70, 229, .18); --success: #079455; --danger: #d92d20;
    --side: #fff; --side-border: #eaecf0; --side-ink: #475467; --side-ink-strong: #101828; --side-muted: #98a2b3;
    --side-hover: #f2f4f7; --side-active: #eef2ff; --side-active-ink: #4338ca; --side-active-shadow: inset 3px 0 0 #4f46e5;
    --brand-mark: linear-gradient(135deg, #6366f1, #4338ca);
    --topbar: #fff; --search-bg: #f2f4f7; --search-border: transparent;
    --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16, 24, 40, .05); --shadow-hover: 0 8px 20px rgba(79, 70, 229, .12);
    --st-new: #4f46e5; --st-open: #dc6803; --st-pending: #7a5af8; --st-resolved: #079455;
    --p-low-bg: #f2f4f7; --p-low: #475467; --p-normal-bg: #eef2ff; --p-normal: #3730a3;
    --p-high-bg: #fef0c7; --p-high: #93370d; --p-urgent-bg: #fee4e2; --p-urgent: #b42318;
    --series-1: #4f46e5; --series-2: #f79009; --series-3: #12b76a;
    --new-reply-bg: #0e9384; --new-reply-ink: #fff;
    --tb-secondary: #475467; --tb-success: #067647; --tb-danger: #d92d20; --tb-warning: #fdb022; --tb-warning-ink: #101828; --tb-info: #026aa2; --tb-ink: #fff;
    --bs-body-font-family: var(--font); --bs-body-bg: var(--page); --bs-body-color: var(--ink);
}
/* Midnight: dark, violet */
html[data-theme="dark"] {
    color-scheme: dark;
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --head-weight: 800; --tracking: 0;
    --ink: #e6e9f2; --muted: #8b93a7; --line: #262c3b; --line-strong: #343b4e; --page: #0f131c;
    --surface: #171c28; --surface-2: #1e2433; --input-bg: #131824; --hover: #1f2638; --sel: #232b44;
    --accent: #7c8cff; --on-accent: #0f131c; --focus: rgba(124, 140, 255, .25); --success: #34c38f; --danger: #ff6b6b;
    --side: #0b0e15; --side-border: #1c2130; --side-ink: #9aa3b8; --side-ink-strong: #fff; --side-muted: #5d6579;
    --side-hover: #161b27; --side-active: #1d2438; --side-active-ink: #fff; --side-active-shadow: inset 3px 0 0 #7c8cff;
    --brand-mark: linear-gradient(135deg, #7c8cff, #36d1dc);
    --topbar: #121722; --search-bg: #1a2030; --search-border: #262c3b;
    --shadow: none; --shadow-hover: 0 0 0 1px #7c8cff;
    --st-new: #5b6cff; --st-open: #f59f45; --st-pending: #b084f5; --st-resolved: #2fb383;
    --p-low-bg: #252b3a; --p-low: #aab2c5; --p-normal-bg: #232c4d; --p-normal: #a9b5ff;
    --p-high-bg: #3d2c17; --p-high: #ffc37a; --p-urgent-bg: #46202a; --p-urgent: #ff8f9c;
    --series-1: #7c8cff; --series-2: #f59f45; --series-3: #2fb383;
    --new-reply-bg: #2dd4bf; --new-reply-ink: #0f131c;
    --tb-secondary: #3a4256; --tb-success: #2fb383; --tb-danger: #ff6b6b; --tb-warning: #ffc37a; --tb-warning-ink: #1c1400; --tb-info: #5cc8f5; --tb-ink: #0f131c;
}

body { font-family: var(--font); background: var(--page); color: var(--ink); letter-spacing: var(--tracking); }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, .page-title { font-weight: var(--head-weight); letter-spacing: var(--head-tracking); color: var(--ink); }
h5, h6, .h5, .h6 { font-weight: 600; letter-spacing: 0; }
a { color: var(--accent); }
.sidebar { background: var(--side); color: var(--side-ink); border-right: 1px solid var(--side-border); }
.brand, .brand:hover { color: var(--side-ink-strong); }
.brand-mark { background: var(--brand-mark); color: #fff; }
.side-nav a { color: var(--side-ink); }
.side-nav a:hover { background: var(--side-hover); color: var(--side-ink-strong); }
.side-nav a.active { background: var(--side-active); color: var(--side-active-ink); box-shadow: var(--side-active-shadow); }
.side-heading { color: var(--side-muted); font-weight: 600; }
.nav-collapsed .side-heading { background: var(--side-border); }
.topbar, .panel-bar, .portal-top { background: var(--topbar); border-bottom-color: var(--line); color: var(--ink); }
.top-search .form-control { background: var(--search-bg); border-color: var(--search-border); color: var(--ink); }
.top-search .form-control:focus { background: var(--surface); border-color: var(--accent); }
.card, .stat, .chart-tip, .todo-item, .preview-box { background: var(--surface); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { --bs-card-bg: var(--surface); color: var(--ink); }
.card-header, .card-footer, .message .card-header { background: var(--surface); border-color: var(--line); color: var(--ink); }
.card > .table-responsive thead th, .split-list thead.sticky-top th { background: var(--surface-2); }
.stat { padding: 1.1rem 1.25rem; }
.stat .label { color: var(--muted); font-weight: 500; }
.stat .value { font-weight: 700; color: var(--ink); }
.stat:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.stat.attention .value { color: var(--danger); }
.btn { border-radius: var(--radius-sm); font-weight: 500; }
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-success, .btn-success:hover { background: var(--success); border-color: var(--success); }
.btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-light, .btn-outline-secondary { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.btn-light:hover, .btn-outline-secondary:hover, .btn-check:checked + .btn-outline-secondary { background: var(--hover); color: var(--ink); border-color: var(--line-strong); }
.form-control, .form-select { border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.view-tabs a { background: var(--surface); border-color: var(--line); color: var(--ink); border-radius: var(--radius-sm); }
.view-tabs a.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ticket-row { border-top-color: var(--line); }
.ticket-row:hover, .mini-list a:hover, .bell-item:hover, .compose-placeholder:hover { background: var(--hover); }
.ticket-row.selected { background: var(--sel); }
.ticket-row.active { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.ticket-row .subject, .mini-list a { color: var(--ink); }
.mini-list a { border-top-color: var(--line); }
.text-secondary, .text-muted { color: var(--muted) !important; }
.badge { border-radius: 6px; letter-spacing: .01em; }
.badge.status-New, .dot.status-New, .status-bar .status-New { background: var(--st-new); }
.badge.status-Open, .dot.status-Open, .status-bar .status-Open { background: var(--st-open); }
.badge.status-Pending, .dot.status-Pending, .status-bar .status-Pending { background: var(--st-pending); }
.badge.status-Resolved, .dot.status-Resolved { background: var(--st-resolved); }
.status-bar { background: var(--surface-2); }
.badge.priority-Low { background: var(--p-low-bg); color: var(--p-low); }
.badge.priority-Normal { background: var(--p-normal-bg); color: var(--p-normal); }
.badge.priority-High { background: var(--p-high-bg); color: var(--p-high); }
.badge.priority-Urgent { background: var(--p-urgent-bg); color: var(--p-urgent); }
.compose-head { background: var(--surface-2); border-bottom-color: var(--line); }
.compose-placeholder { background: var(--surface); color: var(--muted); }
.attachment-chips a { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.attachment-chips a:hover { background: var(--surface); }
.ai-note { background: var(--surface-2); color: var(--ink); }
.app .tab-bar { background: var(--topbar); border-top-color: var(--line); }
.text-bg-light { background: var(--surface-2) !important; color: var(--ink) !important; }
.trend-grid { border-top-color: var(--line); }
.trend-grid.axis { border-top-color: var(--line-strong); }
.todo-col { background: var(--surface-2); border-color: var(--line); }
.todo-col > header .count { background: var(--surface); border-color: var(--line); }

.btn-light.active, .btn-outline-secondary.active { background: var(--sel); border-color: var(--accent); color: var(--ink); }
/* Bootstrap 5.1 has no text-bg-* helpers (they came in 5.2), so badges using them had white text and no background.
   They get the theme's colours here, readable in both Harbour and Midnight (Tommy, 25 Nov 2026). */
.text-bg-primary { background: var(--accent) !important; color: var(--on-accent) !important; }
.text-bg-secondary { background: var(--tb-secondary) !important; color: #fff !important; }
.text-bg-success { background: var(--tb-success) !important; color: var(--tb-ink) !important; }
.text-bg-danger { background: var(--tb-danger) !important; color: var(--tb-ink) !important; }
.text-bg-warning { background: var(--tb-warning) !important; color: var(--tb-warning-ink) !important; }
.text-bg-info { background: var(--tb-info) !important; color: var(--tb-ink) !important; }
/* "New reply" (agent list and ticket) and "Reply from IT" (client portal): teal, so it stands apart from the indigo/violet "New" status */
.badge.new-reply { background: var(--new-reply-bg) !important; color: var(--new-reply-ink) !important; }

/* ---- Midnight only: Bootstrap 5.1 has no dark mode of its own, so its parts are recoloured here ---- */
html[data-theme="dark"] body { background: var(--page); color: var(--ink); }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select, html[data-theme="dark"] .input-group-text {
    background-color: var(--input-bg); border-color: var(--line-strong); color: var(--ink); }
html[data-theme="dark"] .form-control::placeholder { color: #697186; }
html[data-theme="dark"] .form-control:disabled, html[data-theme="dark"] .form-select:disabled, html[data-theme="dark"] .form-control[readonly] { background-color: var(--surface-2); color: var(--muted); }
html[data-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238b93a7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
html[data-theme="dark"] .form-check-input { background-color: var(--input-bg); border-color: var(--line-strong); }
html[data-theme="dark"] .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
html[data-theme="dark"] .form-switch .form-check-input:not(:checked) { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23697186'/%3e%3c/svg%3e"); }
html[data-theme="dark"] .form-text, html[data-theme="dark"] .form-label { color: inherit; }
html[data-theme="dark"] .form-text { color: var(--muted); }
html[data-theme="dark"] .dropdown-menu { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
html[data-theme="dark"] .dropdown-item { color: var(--ink); }
html[data-theme="dark"] .dropdown-item:hover, html[data-theme="dark"] .dropdown-item:focus { background: var(--hover); color: #fff; }
html[data-theme="dark"] .dropdown-item.active, html[data-theme="dark"] .dropdown-item:active { background: var(--accent); color: var(--on-accent); }
html[data-theme="dark"] .dropdown-divider, html[data-theme="dark"] hr { border-color: var(--line-strong); opacity: 1; }
html[data-theme="dark"] .table { color: var(--ink); border-color: var(--line); --bs-table-striped-color: var(--ink); --bs-table-striped-bg: rgba(255,255,255,.025); --bs-table-hover-color: var(--ink); --bs-table-hover-bg: var(--hover); --bs-table-active-bg: var(--sel); --bs-table-active-color: var(--ink); }
html[data-theme="dark"] .table > :not(caption) > * > * { border-bottom-color: var(--line); }
html[data-theme="dark"] .table-light, html[data-theme="dark"] .table-light > * > * { --bs-table-bg: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .list-group-item { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .list-group-item-action:hover { background: var(--hover); color: var(--ink); }
html[data-theme="dark"] .list-group-item.active { background: var(--sel); border-color: var(--line); color: #fff; }
html[data-theme="dark"] .modal-content { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .modal-header, html[data-theme="dark"] .modal-footer { border-color: var(--line); }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme="dark"] .nav-tabs { border-color: var(--line); }
html[data-theme="dark"] .nav-tabs .nav-link { color: var(--muted); }
html[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .nav-tabs .nav-link.active { background: var(--surface); border-color: var(--line) var(--line) var(--surface); color: var(--ink); }
html[data-theme="dark"] .nav-pills .nav-link { color: var(--ink); }
html[data-theme="dark"] .nav-pills .nav-link.active { background: var(--sel); color: #fff; }
html[data-theme="dark"] .page-link { background: var(--surface); border-color: var(--line); color: var(--accent); }
html[data-theme="dark"] .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html[data-theme="dark"] .page-item.disabled .page-link { background: var(--surface); border-color: var(--line); color: #535b6e; }
html[data-theme="dark"] .accordion-item { background: var(--surface); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .accordion-button { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .accordion-button:not(.collapsed) { background: var(--sel); color: #fff; }
html[data-theme="dark"] .accordion-button::after { filter: invert(1); }
html[data-theme="dark"] .alert-success { background: #0f2e24; border-color: #1d5240; color: #8be0bd; }
html[data-theme="dark"] .alert-danger { background: #3a1820; border-color: #5c2633; color: #ffadb7; }
html[data-theme="dark"] .alert-warning { background: #33290f; border-color: #57461a; color: #ffd77a; }
html[data-theme="dark"] .alert-info, html[data-theme="dark"] .alert-primary { background: #1b2340; border-color: #2c3866; color: #b8c2ff; }
html[data-theme="dark"] .alert-secondary, html[data-theme="dark"] .alert-light { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.bg-body, html[data-theme="dark"] .bg-white { background: var(--surface) !important; }
html[data-theme="dark"] .bg-light { background: var(--surface-2) !important; }
html[data-theme="dark"] .text-dark, html[data-theme="dark"] .text-body, html[data-theme="dark"] .link-dark { color: var(--ink) !important; }
html[data-theme="dark"] .text-black-50 { color: var(--muted) !important; }
html[data-theme="dark"] .border, html[data-theme="dark"] .border-top, html[data-theme="dark"] .border-bottom, html[data-theme="dark"] .border-start, html[data-theme="dark"] .border-end { border-color: var(--line) !important; }
html[data-theme="dark"] .bg-primary { background: var(--accent) !important; color: var(--on-accent) !important; }
html[data-theme="dark"] .text-primary { color: var(--accent) !important; }
html[data-theme="dark"] .text-danger { color: #ff8f9c !important; }
html[data-theme="dark"] .text-success { color: #5fd4a5 !important; }
html[data-theme="dark"] .text-warning { color: #ffc37a !important; }
html[data-theme="dark"] .btn:disabled, html[data-theme="dark"] .btn.disabled { background-color: var(--surface-2); border-color: var(--line); color: #5d6579; opacity: 1; }
html[data-theme="dark"] .bg-secondary { background: #3a4256 !important; }
html[data-theme="dark"] .bg-warning { color: #1c1400; }
html[data-theme="dark"] .progress { background: var(--surface-2); }
html[data-theme="dark"] code { color: #ff9bd2; }
html[data-theme="dark"] pre { color: var(--ink); }
html[data-theme="dark"] .empty .icon { color: #3c4459; }
html[data-theme="dark"] .toast-note { background: #2a3248; }
/* emails are written for a white page, so they stay on a light card inside the dark ticket */
html[data-theme="dark"] .message-frame { background: #f3f4f8; border-radius: 8px; }
html[data-theme="dark"] .timeline li::before { background: var(--surface); }
html[data-theme="dark"] .attachment-chips .preview-tag { background: var(--sel); }
html[data-theme="dark"] .ai-card { border-color: #3a3170; }
html[data-theme="dark"] .ai-card h2 { color: #b9a8ff; }
html[data-theme="dark"] .ai-note.warn, html[data-theme="dark"] .badge.review-badge, html[data-theme="dark"] .badge.sla-soon { background: #33290f; color: #ffd77a; border-color: #57461a; }
html[data-theme="dark"] .ai-note.bad, html[data-theme="dark"] .badge.sla-overdue { background: #3a1820; color: #ffadb7; border-color: #5c2633; }
html[data-theme="dark"] .badge.sla-paused { background: var(--surface-2); color: var(--muted); border-color: var(--line-strong); }
html[data-theme="dark"] .badge.ai-hint { background: #241f45; color: #c8bcff; border-color: #3a3170; }
html[data-theme="dark"] .badge.ai-hint.bad { background: #3a1820; color: #ffadb7; border-color: #5c2633; }
html[data-theme="dark"] .badge.leave-on { background: #3d2c17; color: #ffc37a; }
html[data-theme="dark"] .note { background: #221f16; border-color: #3a3422; }
html[data-theme="dark"] .note-ai { background: #1b2033; border-color: #2c3866; }
html[data-theme="dark"] .compose-card[data-tab="note"] .compose-head { background: #2a2414; }
html[data-theme="dark"] .compose-card[data-tab="note"] .note-box { background: #221f16; }
html[data-theme="dark"] .skill-diff .changed { background: #33290f; }
html[data-theme="dark"] .announce { background: #3a1820; color: #ffc2c9; }
html[data-theme="dark"] .announce:hover { background: #45202a; color: #ffc2c9; }
html[data-theme="dark"] .announce.status-Monitoring, html[data-theme="dark"] .portal-incident.status-Monitoring { background: #33290f; color: #ffd77a; }
html[data-theme="dark"] .portal-incident { background: #3a1820; color: #ffc2c9; }
html[data-theme="dark"] .portal-status.status-Pending { background: #33290f; color: #ffd77a; }
html[data-theme="dark"] .todo-col-late { background: #2a1820; border-color: #5c2633; }
html[data-theme="dark"] .todo-item.late { background: #221a22; }
html[data-theme="dark"] .address-suggestions, html[data-theme="dark"] .bell-menu { background: var(--surface); border-color: var(--line-strong); }
html[data-theme="dark"] .quick-select { color: var(--ink); }
html[data-theme="dark"] .ticket-row:hover .quick-select, html[data-theme="dark"] .quick-select:focus { background-color: var(--input-bg); border-color: var(--line-strong); }
html[data-theme="dark"] .sidebar-open .sidebar-backdrop { background: rgba(0, 0, 0, .6); }

/* the Auto / Light / Dark choice in the name menu */
.theme-choice { display: flex; gap: .25rem; padding: .25rem 1rem .5rem; }
.theme-choice button { flex: 1; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 6px; font-size: .8rem; padding: .25rem .4rem; white-space: nowrap; }
.theme-choice button:hover { background: var(--hover); }
.theme-choice button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.theme-when { padding: 0 1rem .4rem; font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* Monitoring > Potential training required: one row per person, the row opens the latest ticket, a second link lists their tickets */
.mini-list .mini-row { display: flex; gap: .7rem; align-items: center; padding: .6rem 1rem; border-top: 1px solid var(--line); }
.mini-list .mini-row:first-child { border-top: 0; }
.mini-list .mini-row a { display: block; padding: 0; border-top: 0; }
.mini-list .mini-row a:hover { background: none; }
.mini-list .mini-row .grow:hover .subject { text-decoration: underline; }
.mini-list .mini-row .their-tickets { color: var(--accent); }
@media (max-width: 575.98px) { .mini-list .mini-row { align-items: flex-start; } }

/* "Teach the AI" on unclear tickets (AI suggestions card) */
.teach-ai > summary { cursor: pointer; list-style: none; }
.teach-ai > summary::-webkit-details-marker { display: none; }
.teach-ai textarea { resize: vertical; }

/* My to-do: day and month views (Tommy, 25 Nov 2026) */
.todo-board-day .todo-col { flex: 1 1 0; }
.todo-board-day .todo-col-wide { flex: 2.2 1 0; min-width: 18rem; }
.todo-board-day .todo-col-wide .todo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); align-content: start; }
.todo-month-frame { gap: .5rem; }
.todo-month-late { flex: none; display: block; padding: .45rem .75rem; border-radius: var(--radius-sm, 8px); border: 1px solid var(--danger);
    color: var(--danger); text-decoration: none; font-size: .85rem; background: var(--surface); }
.todo-month { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(var(--rows), minmax(5.5rem, 1fr));
    gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius, 10px); overflow: auto; }
.todo-dow { background: var(--surface-2); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding: .35rem .5rem; position: sticky; top: 0; z-index: 1; }
.todo-cell { background: var(--surface); padding: .3rem .35rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; min-height: 0; overflow: hidden; }
.todo-cell.other { background: var(--surface-2); }
.todo-cell.other .todo-cell-date { color: var(--muted); }
.todo-cell.past:not(.today) { opacity: .75; }
.todo-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.todo-cell-date { display: flex; align-items: center; justify-content: space-between; gap: .25rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .85rem; padding: 0 .15rem; }
.todo-cell.today .todo-cell-date > span:first-child { background: var(--accent); color: var(--on-accent); border-radius: 99px; min-width: 1.6rem; text-align: center; }
.todo-cell-count { font-size: .7rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 .4rem; }
.todo-cell-count.urgent { color: var(--p-urgent); background: var(--p-urgent-bg); border-color: transparent; }
.todo-cell-items { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: hidden; }
.todo-line { display: block; font-size: .72rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-decoration: none;
    border-left: 3px solid #c9ced6; padding: 0 .3rem; border-radius: 3px; background: var(--surface-2); }
.todo-line:hover { background: var(--hover); }
.todo-line-time { color: var(--muted); font-weight: 600; }
.todo-more { font-size: .7rem; color: var(--accent); text-decoration: none; padding-left: .3rem; }
html[data-theme="dark"] .todo-reply, html[data-theme="dark"] .todo-key i.todo-reply { border-left-color: #6b9bff; }
html[data-theme="dark"] .todo-resolve, html[data-theme="dark"] .todo-key i.todo-resolve { border-left-color: #a78bfa; }
html[data-theme="dark"] .todo-reminder { border-left-color: #f5a524; }
html[data-theme="dark"] .todo-follow { border-left-color: #34c38f; }
html[data-theme="dark"] .todo-key i.todo-reply { background: #6b9bff; } html[data-theme="dark"] .todo-key i.todo-resolve { background: #a78bfa; }
html[data-theme="dark"] .todo-key i.todo-reminder { background: #f5a524; } html[data-theme="dark"] .todo-key i.todo-follow { background: #34c38f; }
@media (max-width: 767.98px) {
    .todo-head .page-title { flex: 1 1 100%; }
    .todo-views { flex: 1 1 auto; }
    .todo-views .btn { flex: 1; }
    .todo-board-day .todo-col, .todo-board-day .todo-col-wide { flex: 0 0 86%; min-width: 0; }
    .todo-board-day .todo-col-wide .todo-list { display: flex; }
    /* the month on a phone: numbers and counts only; tap a day to open it */
    .todo-month { grid-template-rows: auto repeat(var(--rows), minmax(3.2rem, 1fr)); }
    .todo-cell { padding: .25rem; align-items: stretch; }
    .todo-cell-date { flex-direction: column; align-items: center; gap: .2rem; height: 100%; justify-content: flex-start; font-size: .8rem; }
    .todo-cell-items { display: none; }
    .todo-dow { padding: .3rem 0; text-align: center; font-size: .65rem; }
}

/* My to-do: dragging onto a day and time, and the Move button (Tommy, 25 Nov 2026) */
.todo-col { position: relative; }
.todo-item { position: relative; }
.todo-item .todo-open { display: flex; flex-direction: column; gap: .15rem; color: inherit; text-decoration: none; min-width: 0; }
.todo-item.movable { cursor: grab; }
.todo-item.movable .todo-top, .todo-item.movable .todo-subject { padding-right: 2rem; }
.todo-item.dragging { opacity: .45; }
.todo-move-btn { position: absolute; top: .3rem; right: .3rem; width: 1.85rem; height: 1.85rem; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); padding: 0; }
.todo-move-btn:hover, .todo-move-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
/* the day and week views: an hour down the side, items in their hour, a line at the current time (Tommy, 25 Nov 2026) */
.todo-board .todo-col-late, .todo-board .todo-col-none { flex: 0 0 13rem; min-width: 0; }
.todo-cal { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); scroll-snap-align: start; }
.todo-grid { display: grid; grid-template-columns: 3.6rem repeat(var(--days), minmax(8rem, 1fr)); grid-template-rows: auto repeat(var(--hours), minmax(3.4rem, 1fr)); min-height: 100%; /* the hours stretch to fill the frame (Tommy, 26 Nov 2026) */
    position: relative; min-width: calc(3.6rem + var(--days) * 8rem); /* the grid box spans every column, so the hour labels stay put when it scrolls sideways */ }
.todo-cal-day .todo-grid { grid-template-columns: 3.6rem minmax(16rem, 1fr); }
.todo-corner, .todo-dayhead { position: sticky; top: 0; z-index: 3; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.todo-corner { left: 0; z-index: 4; }
.todo-dayhead { padding: .5rem .6rem; font-size: .88rem; display: flex; align-items: center; gap: .35rem; border-left: 1px solid var(--line); white-space: nowrap; }
.todo-dayhead > span:not(.count) { color: var(--muted); }
.todo-dayhead .count { margin-left: auto; font-size: .72rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 .45rem; }
.todo-dayhead.today { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.todo-dayhead.today > span:not(.count) { color: var(--accent); }
.todo-dayhead.past { opacity: .7; }
.todo-hour { position: sticky; left: 0; z-index: 2; background: var(--surface); border-top: 1px solid var(--line); padding: .2rem .45rem 0 0; text-align: right;
    font-size: .7rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.todo-hour.off { color: color-mix(in srgb, var(--muted) 65%, transparent); background: var(--surface-2); }
.todo-slot { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: .25rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.todo-slot.off { background: var(--surface-2); }
.todo-slot.today { background: color-mix(in srgb, var(--sel) 55%, var(--surface)); }
.todo-slot.today.off { background: color-mix(in srgb, var(--sel) 35%, var(--surface-2)); }
.todo-slot.past > .todo-item { opacity: .75; }
.todo-board.is-dragging .todo-slot { outline: 1px dashed var(--line-strong); outline-offset: -3px; }
.todo-slot.drop-on { background: var(--sel) !important; outline: 2px solid var(--accent) !important; outline-offset: -2px; }
.todo-slot.split { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-content: start; }
.todo-slot.split > .todo-item { padding: .25rem .35rem; }
.todo-slot.split .todo-top { gap: 0 .3rem; }
.todo-slot.split .todo-kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* side by side in a narrow week column: the colour bar says the kind, the subject gets the room, the rest is on hover */
.todo-cal:not(.todo-cal-day) .todo-slot.split .todo-kind { display: none; }
.todo-cal:not(.todo-cal-day) .todo-slot.split .todo-subject { -webkit-line-clamp: 3; font-size: .78rem; }
.todo-cal:not(.todo-cal-day) .todo-slot.split .todo-meta { font-size: .66rem; }
.todo-cal:not(.todo-cal-day) .todo-slot.split .todo-item.movable .todo-top { padding-right: 1.5rem; }
.todo-cal:not(.todo-cal-day) .todo-slot.split .todo-item.movable .todo-subject { padding-right: 0; }
.todo-cal .todo-item { padding: .3rem .45rem; gap: .1rem; font-size: .82rem; box-shadow: none; }
.todo-cal .todo-top { font-size: .66rem; }
.todo-cal .todo-meta { font-size: .7rem; }
.todo-cal .todo-detail { display: none; }
.todo-cal-day .todo-detail { display: -webkit-box; }
.todo-cal .todo-move-btn { width: 1.6rem; height: 1.6rem; top: .2rem; right: .2rem; }
.todo-cal .todo-item.movable .todo-top, .todo-cal .todo-item.movable .todo-subject { padding-right: 1.7rem; }
.todo-now { position: relative; pointer-events: none; z-index: 1; }
.todo-now::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--pos) * 100%); border-top: 1px solid var(--danger); opacity: .45; }
.todo-now-today { position: absolute; top: calc(var(--pos) * 100%); left: calc(var(--col) * 100% / var(--days)); width: calc(100% / var(--days)); height: 0; border-top: 2px solid var(--danger); }
.todo-now-today::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.todo-now-label { position: absolute; right: 2px; top: -1.05rem; font-size: .62rem; font-weight: 700; color: #fff; background: var(--danger); border-radius: 4px; padding: 0 .3rem; line-height: 1.4; }
@media (max-width: 767.98px) {
    .todo-board .todo-col-late, .todo-board .todo-col-none { flex: 0 0 86%; }
    .todo-cal { flex: 0 0 100%; scroll-snap-type: x mandatory; }
    .todo-grid { grid-template-columns: 2.9rem repeat(var(--days), calc(100vw - 2rem - 2.9rem - 2px)); width: max-content; min-width: 0; }
    .todo-cal-day .todo-grid { grid-template-columns: 2.9rem minmax(0, 1fr); width: auto; min-width: 0; }
    .todo-dayhead, .todo-slot { scroll-snap-align: end; }
    .todo-hour { padding-right: .3rem; font-size: .65rem; }
}
.todo-col-none.drop-on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.todo-dialog { border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--surface); color: var(--ink); padding: 0; width: min(24rem, calc(100vw - 2rem)); }
.todo-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.todo-item.todo-planned, .todo-key i.todo-planned { border-left-color: #0ea5e9; }
.todo-key i.todo-planned { background: #0ea5e9; }
@media (max-width: 767.98px) {
    /* a finger-sized button on phones (Tommy, 26 Nov 2026: "make the calendar icon slightly bigger"), with the title kept clear of it */
    .todo-move-btn, .todo-cal .todo-move-btn { width: 2.6rem; height: 2.6rem; top: .35rem; right: .35rem; border-radius: 8px; }
    .todo-move-btn svg { width: 1.25rem; height: 1.25rem; }
    .todo-item.movable .todo-top, .todo-item.movable .todo-subject,
    .todo-cal .todo-item.movable .todo-top, .todo-cal .todo-item.movable .todo-subject { padding-right: 2.9rem; }
}

/* ---- password manager: a hidden password with Show and Copy (docs/requirements/password-manager.md) */
.secret { display: inline-flex; align-items: center; gap: .25rem; max-width: 100%; }
.secret-value { font-size: .85rem; color: var(--bs-secondary-color); letter-spacing: .05em; padding: .1rem .35rem; border-radius: .3rem; background: var(--bs-tertiary-bg); min-width: 5.5rem; }
.secret.shown .secret-value { color: var(--bs-body-color); letter-spacing: normal; user-select: all; word-break: break-all; white-space: normal; }
.secret-btn { padding: .2rem .4rem; line-height: 1; }
.password-table td:first-child { max-width: 18rem; }
@media (min-width: 768px) { .pw-cell { white-space: nowrap; } }
.found-passwords { border: 1px dashed var(--bs-border-color); border-radius: .5rem; padding: .5rem .6rem; }
.credential-list li:last-child { border-bottom: 0 !important; }
@media (max-width: 767.98px) {
    /* phones: the bigger buttons a thumb needs */
    .secret-btn { padding: .4rem .55rem; }
    .password-table td:first-child { max-width: none; width: 55%; word-break: break-word; }
    .password-table, .table-wrap > .password-table { table-layout: fixed; width: 100%; min-width: 0; }
    .pw-cell { width: 45%; }
    .pw-cell .secret { flex-wrap: wrap; }
    .pw-cell .secret-value { min-width: 0; flex-basis: 100%; max-width: 100%; overflow-wrap: anywhere; white-space: normal !important; }
}

/* =====================================================================================================================
   Hardware handover and return with a QR code (docs/requirements/hardware-handover.md)
   ===================================================================================================================== */
.fill-frame thead.sticky-top th { background: var(--surface-2); }
.hw-items .hw-item { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.hw-items .hw-item:last-child { border-bottom: 0; }
.badge.hw-reason { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.badge.hw-state-Pending { background: var(--p-normal-bg); color: var(--p-normal); }
.badge.hw-state-WithUser { background: var(--p-normal-bg); color: var(--p-normal); }
.badge.hw-state-Returned { background: var(--success); color: #fff; }
.badge.hw-state-Missing { background: var(--p-urgent-bg); color: var(--p-urgent); }
.badge.hw-state-Cancelled { background: var(--surface-2); color: var(--muted); }
.hw-photo { display: block; max-width: 220px; max-height: 160px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: .4rem 0; object-fit: cover; }
.hw-signature { display: block; max-width: 100%; width: 360px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.hw-qr { display: inline-block; width: min(260px, 100%); background: #fff; padding: 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.hw-qr svg { display: block; width: 100%; height: auto; }
.hw-qr.dim { opacity: .25; }
.hw-chip { display: inline-flex; gap: .35rem; align-items: center; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--ink); font-size: .85rem; }
.hw-chip:hover { border-color: var(--accent); }
.pickup-terms { background: var(--surface-2); border-radius: var(--radius-sm); padding: .75rem .9rem; }

/* the handover page and the ticket's Hardware card on a phone: thumb-sized buttons, and fields at 16px so iOS does not zoom in */
.hw-choice .btn { padding: .6rem .5rem; font-weight: 600; }
.hw-photo-button { padding: .65rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: .5rem; }
.hw-photo-preview { max-width: 100%; }
@media (max-width: 767.98px) {
    .handover-page .form-control-sm, .handover-page .form-select-sm, .hardware-start .form-control-sm {
        font-size: 16px; min-height: 2.75rem; padding: .5rem .75rem; border-radius: var(--radius-sm);
    }
    .handover-page .btn-sm, .hardware-start .btn-sm { padding: .55rem .9rem; font-size: .95rem; }
    .handover-page .hw-save, .hardware-start .btn { width: 100%; padding: .7rem; font-weight: 600; }
    .handover-page details > summary, .hardware-start > summary { padding: .5rem 0; font-size: .95rem; }
    .handover-page .hw-qr { width: min(300px, 82vw); }
    .handover-page .hw-photo { max-width: 100%; max-height: 220px; width: 100%; }
    .hw-items .hw-item { padding: .9rem 0; }
}

/* the page the QR code opens, on the person's phone: one column, big targets, nothing below 16px that can be typed in (iOS would zoom) */
body.pickup-page { background: var(--page); color: var(--ink); min-height: 100vh; -webkit-text-size-adjust: 100%; }
.pickup-wrap { max-width: 34rem; margin: 0 auto; padding: calc(1rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.pickup-page .brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); }
.pickup-page .brand-mark { background: var(--brand-mark); }
.pickup-page .card { background: var(--surface); }
.pickup-page .card-body { padding: 1.1rem 1.1rem 1.2rem; }
.pickup-page .form-control { font-size: 1.0625rem; min-height: 3rem; }
.pickup-title { font-size: 1.6rem; font-weight: var(--head-weight); letter-spacing: var(--head-tracking); margin: .25rem 0 .25rem; }
.pickup-step { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.pickup-step-no { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: .9rem; }
.pickup-items li { padding: .75rem 0; border-top: 1px solid var(--line); }
.pickup-items li:first-child { border-top: 0; padding-top: 0; }
.pickup-photo { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radius-sm); margin-top: .5rem; }
.pickup-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; margin-top: .5rem; padding-top: .75rem; border-top: 2px solid var(--line-strong); }
.pickup-page .pickup-terms { font-size: .95rem; line-height: 1.55; max-height: 45vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pickup-agree { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.pickup-agree .form-check-input { flex: none; width: 1.6rem; height: 1.6rem; margin: 0; }
.pickup-agree:has(:checked) { border-color: var(--accent); background: var(--sel); }
.pickup-clear { min-height: 2.5rem; min-width: 4.5rem; }
.signature-pad { position: relative; height: clamp(190px, 32vh, 260px); border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.signature-pad.signed { border-style: solid; border-color: var(--accent); }
.signature-pad.needs { border-color: var(--danger); }
.signature-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.signature-line { position: absolute; left: 1rem; right: 1rem; bottom: 2.4rem; border-bottom: 1px solid #d0d5dd; pointer-events: none; }
.signature-x { position: absolute; left: 1rem; bottom: 2.6rem; color: #98a2b3; font-size: 1.4rem; line-height: 1; pointer-events: none; }
.signature-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #98a2b3; font-size: 1.1rem; pointer-events: none; }
@media (orientation: landscape) and (max-height: 500px) { .signature-pad { height: 70vh; } }
/* the button stays at the bottom of the screen on a phone, above the home bar */
.pickup-submit { position: sticky; bottom: 0; z-index: 5; margin: 0 -1rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--page) 30%); }
.pickup-submit .btn { min-height: 3.25rem; font-weight: 700; }
.pickup-done-mark { width: 56px; height: 56px; margin: 0 auto .75rem; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: #fff; }
