/* Inter, self-hosted (SIL OFL 1.1, fonts/Inter-OFL.txt). It was loaded from Google Fonts, so every
   page view of a PHI app made a third-party request (16 Oct 2026 re-run, A41). Latin subset,
   the four weights the app uses.
   Source: npm @fontsource/inter@5.1.0 (files/inter-latin-{400,500,600,700}-normal.woff2, via
   jsdelivr), fetched 16 Oct 2026. Update this line whenever the files are replaced (D30). */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

/* ── Design tokens ──────────────────────────────────────────────────── */
:root {
    /* Our own tokens */
    --brand-purple: #4E288E;
    --brand-purple-hover: #42237A;
    --brand-purple-press: #371D66;
    --brand-purple-tint: #EDE7F4;
    --brand-purple-soft: #BCADD4;
    --bg-0: #ffffff;
    --bg-1: #fafafa;
    --bg-2: #f5f5f7;
    --bg-3: #ebebef;
    --fg-0: #0a0a14;
    --fg-1: #1f1f2e;
    --fg-2: #6b6b7a;
    --fg-3: #a1a1aa;
    --border: #ebebef;
    --border-strong: #d4d4dc;
    /* Canonical employment-type palette (Kenny / Schedule clarifications):
       - Vitas full-time → purple
       - Vitas part-time → light green
       - Vitas per-diem  → dark green
       - Agency          → light orange
       Legacy emp.type values map onto these four buckets:
         Full-Reg / Full-Tmp → full-time (purple)
         Part-Reg            → part-time (light green)
         Part-Tmp            → per-diem  (dark green) — "Tmp" = temporary = per-diem in legacy
         Tmp-Agency          → agency    (light orange)
       Telecare reuses the agency background with a striped pattern + TELECARE
       label so it's clearly distinguishable from a real agency entry. */
    --et-full-reg: #7c3aed; --et-full-reg-bg: #ede9fe;
    --et-full-tmp: #7c3aed; --et-full-tmp-bg: #ede9fe;
    --et-part-reg: #16a34a; --et-part-reg-bg: #dcfce7;
    --et-part-tmp: #14532d; --et-part-tmp-bg: #86efac;
    --et-tmp-agency: #ea580c; --et-tmp-agency-bg: #fed7aa;
    --status-confirmed: #15803d; --status-confirmed-bg: #dcfce7;
    --status-unconfirmed: #b45309; --status-unconfirmed-bg: #fef3c7;
    --status-conflict: #b91c1c; --status-conflict-bg: #fee2e2;
    --shadow-card: 0 1px 2px rgba(20,20,40,.04), 0 0 0 1px rgba(20,20,40,.04);
    --shadow-pop: 0 8px 24px rgba(20,20,40,.10), 0 2px 6px rgba(20,20,40,.06);
    --font-sans: "Inter", system-ui, sans-serif;
    --dur-md: 150ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --r-pill: 9999px;

    /* ── Override Radzen material-base.css CSS variables ────────────────
       This file loads AFTER material-base.css so our :root values replace
       Radzen's. This fixes body color, font, and component sizing globally
       without needing !important on every rule.
       ─────────────────────────────────────────────────────────────────── */

    /* Body text — Radzen sets --rz-body-color which body { color } inherits.
       Overriding this here fixes sidebar/page text made invisible by themes. */
    --rz-body-background-color: #fafafa;
    --rz-body-color:            #1f1f2e;
    --rz-text-color:            #1f1f2e;

    /* Font — replace Radzen's Roboto with our Inter */
    --rz-body-font-family:  "Inter", system-ui, sans-serif;
    --rz-body-font-size:    13px;
    --rz-body-line-height:  1.5;
    --rz-body-font-weight:  400;

    /* Links — match brand purple, not Radzen's blue */
    --rz-link-color:        #4E288E;
    --rz-link-hover-color:  #42237A;

    /* Inputs — consistent height, radius, border to match our .btn / .chip */
    --rz-input-height:       30px;
    --rz-input-font-size:    12.5px;
    --rz-input-font-family:  "Inter", system-ui, sans-serif;
    --rz-border-radius:      6px;
    --rz-input-border-color: #ebebef;
    --rz-input-border-color-focus: #d4d4dc;
    --rz-input-background-color: #ffffff;
    --rz-input-color:        #1f1f2e;
    --rz-input-placeholder-color: #a1a1aa;

    /* Dropdown popup */
    --rz-dropdown-item-font-size:    12.5px;
    --rz-dropdown-item-padding:      6px 12px;
    --rz-dropdown-panel-border-radius: 8px;
    --rz-dropdown-panel-shadow:      0 8px 24px rgba(20,20,40,.10), 0 2px 6px rgba(20,20,40,.06);

    /* Primary color = brand purple (used in Radzen buttons, selections, etc.) */
    --rz-primary:           #4E288E;
    --rz-primary-lighter:   #EDE7F4;
    --rz-primary-darker:    #42237A;
    --rz-on-primary:        #ffffff;
    --rz-primary-contrast-color: #ffffff;
}

/* ── Radzen component overrides (class-level, more specific than :root vars) */

/* Date pickers and text inputs — match toolbar style */
.rz-datepicker .rz-inputtext,
.rz-textbox,
.rz-input-control input,
input.rz-inputtext {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    color: #1f1f2e !important;
    height: 30px !important;
    border-radius: 6px !important;
    border-color: #ebebef !important;
    background: #ffffff !important;
}

/* Dropdown trigger button — matches our .btn size */
.rz-dropdown {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    height: 30px !important;
    border-radius: 6px !important;
    border-color: #ebebef !important;
    color: #1f1f2e !important;
}
.rz-dropdown .rz-dropdown-label {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    color: #1f1f2e !important;
}
.rz-dropdown:hover { border-color: #d4d4dc !important; }

/* Dropdown popup panel */
.rz-dropdown-panel,
.rz-overlay-panel {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    border: 1px solid #ebebef !important;
    box-shadow: 0 8px 24px rgba(20,20,40,.10), 0 2px 6px rgba(20,20,40,.06) !important;
}
.rz-dropdown-panel .rz-dropdown-item,
.rz-dropdown-item {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    color: #1f1f2e !important;
    padding: 7px 12px !important;
}
.rz-dropdown-item:hover,
.rz-dropdown-item.rz-state-highlight {
    background: #EDE7F4 !important;
    color: #4E288E !important;
}

/* Calendar / datepicker popup */
.rz-calendar .rz-calendar-header,
.rz-calendar td,
.rz-calendar th,
.rz-datepicker-panel {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
}

/* ── Radzen DataGrid — column headers, rows, filter, pager ─────────── */
.rz-datalist,
.rz-grid-table,
.rz-data-row td,
.rz-data-row th,
.rz-column-header,
.rz-column-header-title,
.rz-column-header-filter,
.rz-filter-row td,
.rz-pager,
.rz-pager .rz-paginator-pages button,
.rz-pager .rz-paginator-element,
.rz-cell-data {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
}
.rz-column-header-title {
    font-weight: 600 !important;
    color: #6b6b7a !important;
    font-size: 12px !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
}
.rz-data-row td {
    color: #1f1f2e !important;
    font-weight: 400 !important;
}
.rz-data-row:hover td { background: #EDE7F4 !important; }

/* ── Shell ──────────────────────────────────────────────────────────── */
.app-root, .app-root * { box-sizing: border-box; }
.app-root { font-family: var(--font-sans); font-size: 13px; color: var(--fg-1); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
.app-shell { display: flex; height: 100%; background: var(--bg-1); }

/* ── Sidebar — DARK theme ────────────────────────────────────────────
   Dark background (#1c1628) so Radzen's white link-color injection is
   actually correct — light text on dark surface. No CSS war needed.
   ─────────────────────────────────────────────────────────────────── */
.sidebar {
    width: 224px;
    min-width: 224px;
    max-width: 224px;
    background-color: #1c1628;
    border-right: none;
    display: flex; flex-direction: column; flex-shrink: 0;
    transition: width 220ms cubic-bezier(0.4,0,0.2,1),
                min-width 220ms cubic-bezier(0.4,0,0.2,1),
                max-width 220ms cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.sidebar.collapsed {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
}

/* Collapsed nav: icons centered, light colour on dark bg */
.nav-list.nav-collapsed { padding: 0 6px !important; gap: 2px; }
.nav-list.nav-collapsed .nav-item {
    justify-content: center !important;
    padding: 10px 0 !important;
    border-radius: 8px !important;
    color: #a89cc8 !important;
}
.nav-list.nav-collapsed .nav-item.active { color: #ffffff !important; }
.nav-list.nav-collapsed .nav-item svg { width: 18px !important; height: 18px !important; }

/* Nav items inside the dark sidebar need light colours */
.sidebar .nav-item         { color: #c4b8e0 !important; }
.sidebar .nav-item:hover   { color: #e8e0f8 !important; background: #261d3c !important; }
.sidebar .nav-item.active  { color: #ffffff !important; background: #4E288E !important; }

.sidebar-brand {
    height: 52px; display: flex; align-items: center; gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid #2c2040;
}
.brand-mark {
    width: 26px; height: 26px; border-radius: 7px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    display: grid; place-items: center;
    font-weight: 700; font-size: 13px; letter-spacing: -0.02em;
    flex-shrink: 0;
}

.sidebar-program {
    margin: 12px 12px 8px; padding: 10px 12px;
    background: #261d3c; border: 1px solid #3a2a5a;
    border-radius: 8px; cursor: pointer; transition: background 150ms;
}
.sidebar-program:hover { background: #321f50; }

/* Program picker (defect 1, 6 Oct 2026). Our own input and list, replacing a dropdown
   that reparented its filter box onto document.body and so could never be given a key
   handler. Colours are the sidebar's own, not the light-theme tokens - this panel sits
   on the dark rail. */
.prog-pick { position: relative; margin-top: 6px; }
.prog-pick-input {
    width: 100%; box-sizing: border-box;
    padding: 6px 9px; font: inherit; font-size: 12.5px; font-family: inherit;
    background: #1b1430; color: #e8e0f8;
    border: 1px solid #3a2a5a; border-radius: 6px;
}
.prog-pick-input::placeholder { color: #8d7fb4; }
.prog-pick-input:focus { outline: none; border-color: #7c5cc4; background: #221839; }

.prog-pick-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
    max-height: 260px; overflow-y: auto;
    background: #221839; border: 1px solid #3a2a5a; border-radius: 7px;
    box-shadow: 0 10px 26px rgba(0,0,0,.45);
    display: flex; flex-direction: column; padding: 4px;
}
.prog-pick-opt {
    display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
    padding: 6px 8px; border: 0; border-radius: 5px; cursor: pointer;
    background: transparent; color: #c4b8e0; font: inherit; font-size: 12.5px;
}
/* .on follows the keyboard, so Enter always commits what is highlighted. */
.prog-pick-opt.on      { background: #4E288E; color: #ffffff; }
.prog-pick-opt.current { font-weight: 600; }
.prog-pick-opt.current .prog-pick-code::after { content: " ·"; opacity: .6; }
.prog-pick-code { font-weight: 700; letter-spacing: .03em; flex: 0 0 auto; }
.prog-pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.prog-pick-empty { padding: 8px; font-size: 12px; color: #8d7fb4; }

.nav-list { display: flex; flex-direction: column; gap: 1px; padding: 0 8px; }

/* Nav items are <div> elements — dark bg means any text color is visible */
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px;
    font-size: 13px; font-weight: 400;
    border-radius: 6px; cursor: pointer;
    transition: background 150ms;
    user-select: none;
}
.nav-item:hover { background: #261d3c; }
.nav-item.active { background: #4E288E; font-weight: 500; }
.nav-badge {
    margin-left: auto; font-size: 10.5px; font-weight: 600;
    background: #2c2040; padding: 1px 6px; border-radius: 999px;
}
.nav-item.active .nav-badge { background: #3d1f73; }

.sidebar-foot {
    margin-top: auto; padding: 10px 12px;
    border-top: 1px solid #2c2040;
    display: flex; align-items: center; gap: 10px;
}
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    font-weight: 600; font-size: 11px;
    display: grid; place-items: center; flex-shrink: 0;
}

/* Collapsed sidebar: the avatar doubles as the sign-out control, because the rail is
   too narrow for an identity chip and a button beside it. It therefore has to LOOK
   like a control - an action with no affordance is a trap, and this one ends the
   session. The sign-out glyph replaces the initials on hover and on focus, so the
   consequence is visible before the click rather than after it. */
.user-avatar.as-signout { cursor: pointer; position: relative; transition: all 140ms ease; }
.user-avatar.as-signout:hover,
.user-avatar.as-signout:focus-visible {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: transparent;
}
.user-avatar.as-signout:focus-visible { outline: 2px solid #fca5a5; outline-offset: 2px; }
.user-avatar.as-signout::after {
    content: "";
    position: absolute; inset: 0; opacity: 0;
    background-repeat: no-repeat; background-position: center;
    background-size: 14px 14px;
    transition: opacity 140ms ease;
    /* Same door-and-arrow glyph as the expanded sign-out button. */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><polyline points='16 17 21 12 16 7'/><line x1='21' y1='12' x2='9' y2='12'/></svg>");
}
.user-avatar.as-signout:hover::after,
.user-avatar.as-signout:focus-visible::after { opacity: 1; }

/* ── Utilities ───────────────────────────────────────────────────── */
.page-body { flex: 1; overflow: auto; padding: 16px 24px; }

/* Hands the available height to ONE child scroller instead of scrolling itself.
   Pair with a child carrying `.data-card.fill`, or any child that is
   `flex:1; min-height:0; overflow:auto`.

   Why this exists: .page-body already scrolls, so a child that also sets its own
   height produces two vertical scrollbars on the same column. Employee Management,
   Pool and Availability each sized their grid with `max-height: calc(100vh - 220px)`
   (and 240px), a guess at the page chrome that is independent of the actual space
   left. Whenever the real chrome exceeded the guess - which at 100% zoom it does,
   once the header, toolbar and slicers are counted - the inner grid overflowed
   .page-body and both scrolled. The flex chain has the true number; nothing needs to
   guess it. Same shape as .grid-wrap / .grid-scroll on the schedule page. */
.page-body.fill {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* A data-card that fills its parent and scrolls internally. min-height:0 is the load
   bearing part: a flex item defaults to min-height:auto, which refuses to shrink below
   its content and so pushes the overflow back out to the parent. */
.data-card.fill {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.data-card { background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); }

/* ── Radzen overrides — fonts, sizes, radii consistent with design ── */
.rz-card { border: 1px solid var(--border) !important; border-radius: 10px !important; box-shadow: var(--shadow-card) !important; }

/* Buttons in modals and pages — Inter 12.5px / 30px height */
.rz-button {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    height: 30px !important;
    border-radius: 6px !important;
    letter-spacing: 0 !important;
}
.rz-button.rz-button-sm { height: 26px !important; font-size: 12px !important; padding: 0 10px !important; }
.rz-button.rz-button-xs { height: 22px !important; font-size: 11.5px !important; padding: 0 8px !important; }

/* Radzen modal dialogs */
.rz-dialog-wrapper .rz-dialog { border-radius: 10px !important; }
.rz-dialog-titlebar { font-family: "Inter", system-ui, sans-serif !important; font-size: 14px !important; font-weight: 600 !important; }
.rz-dialog-content { font-family: "Inter", system-ui, sans-serif !important; font-size: 12.5px !important; }

/* ── Radzen Tabs (Case Sheet modal + other tabbed views) ─────────────── */
.rz-tabview-nav li a,
.rz-tabview-nav li button,
.rz-tabview-nav .rz-tabview-nav-link {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #6b6b7a !important;
}
.rz-tabview-nav .rz-tabview-selected a,
.rz-tabview-nav .rz-tabview-selected button,
.rz-tabview-nav li.rz-tabview-selected .rz-tabview-nav-link {
    color: #4E288E !important;
    font-weight: 600 !important;
}
.rz-tabview-panels,
.rz-tabview-panel {
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 13px !important;
    color: #1f1f2e !important;
}

/* Radzen alerts */
.rz-alert { border-radius: 8px !important; font-family: "Inter", system-ui, sans-serif !important; font-size: 12.5px !important; }

/* Radzen labels */
.rz-form-field label, .rz-label { font-family: "Inter", system-ui, sans-serif !important; font-size: 12px !important; color: var(--fg-2) !important; }

/* ── Main ───────────────────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-1); }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.topbar { height: 52px; flex-shrink: 0; background: var(--bg-0); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 12px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.crumbs .crumb-sep { color: var(--fg-3); }
.crumbs .crumb-cur { color: var(--fg-0); font-weight: 500; }
.topbar-search { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-2); border: 1px solid transparent; border-radius: 7px; font-size: 12.5px; color: var(--fg-2); transition: border-color 150ms, background 150ms; }
.topbar-search:focus-within { background: var(--bg-0); border-color: var(--border-strong); }
.search-result-row:hover { background: var(--bg-1); }
/* "Showing the first 25 ..." under a capped result group (PR-13). */
.search-more { padding: 7px 14px; font-size: 11.5px; color: var(--fg-2); font-style: italic; border-bottom: 1px solid var(--border); }
/* The active program, shown on every surface. The sidebar copy disappears when the
   sidebar collapses; this one does not, and it is what makes a program-scoped search
   result readable. Shrinks before the search box does on a narrow window. */
.topbar-program {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0;
    padding: 3px 9px; border-radius: 6px;
    background: var(--bg-2); border: 1px solid var(--border);
    font-size: 11.5px; line-height: 1.5; white-space: nowrap; cursor: default;
}
.topbar-program-code {
    font-weight: 700; color: var(--fg-0); letter-spacing: .03em;
}
.topbar-program-name {
    color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.topbar-program.none {
    background: #fef3c7; border-color: #fcd34d; color: #92400e; font-weight: 600;
}

@media (max-width: 900px) {
    /* Keep the code, drop the name - "11" still answers the question. */
    .topbar-program-name { display: none; }
}

/* ── Maintenance ───────────────────────────────────────────────────────────────
   Configuration that used to live in Delphi's separate Maintenance executable.
   Plain tables on purpose: these are small, rarely-edited lists where every row
   needs to be readable at a glance, not sorted or filtered. */
.mnt-note {
    font-size: 12.5px; line-height: 1.6; color: var(--fg-2);
    background: var(--bg-1); border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
    border-radius: 6px; padding: 10px 14px; margin-bottom: 14px;
}
/* The one scroller in the Maintenance fill chain. .page-body.fill and .data-card.fill
   both hand their height down without scrolling, so without this the 138-program table
   had nowhere to overflow to and the page simply could not be scrolled. */
.mnt-scroll { flex: 1; min-height: 0; overflow: auto; }
.mnt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mnt-table th {
    text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--fg-3); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg-0); z-index: 1;
}
.mnt-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); color: var(--fg-1); vertical-align: middle; }
.mnt-table tr:hover td { background: var(--bg-1); }
.mnt-table tr.overridden td { color: var(--fg-3); }
/* The row a write just touched. The table is reloaded in place rather than remounted, so
   the row is still where it was - this says which one answered. */
.mnt-table tr.touched > td { background: #fef9c3 !important; }
.mnt-table tr.touched > td:first-child { box-shadow: inset 3px 0 0 #eab308; }

.mnt-tag {
    display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
    padding: 1px 6px; border-radius: 4px; margin-right: 4px;
    background: var(--bg-2); color: var(--fg-1); border: 1px solid var(--border);
}
.mnt-tag.muted { color: var(--fg-3); font-weight: 600; }
.mnt-tag.warn  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.mnt-tag.bad   { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }

/* Find / Find Next and month navigation on the Availability page (Delphi parity 5.3, 5.4). */
.avail-find { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.avail-find-box {
    font-size: 12px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--bg-0); color: var(--fg-0); width: 160px; font-family: inherit;
}
.avail-find-box:focus { outline: none; border-color: var(--border-strong); }
.avail-find-sel {
    font-size: 11.5px; padding: 3px 4px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--bg-0); color: var(--fg-1); font-family: inherit;
}
.avail-find-msg { font-size: 11.5px; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d;
                  border-radius: 5px; padding: 2px 7px; }

.avail-month-nav { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; }

/* The Find match. Needs to survive the row's own type-derived background, hence the
   !important - the employee cell paints itself from EffectiveType. */
.avail-row-found > td { background: #fef9c3 !important; }
.avail-row-found > td:first-child { box-shadow: inset 3px 0 0 #eab308; }

/* Availability report groups (Delphi parity 7.2/7.3/7.5). Both legacy reports break on
   employee, so the grouping is the report's structure rather than decoration. */
.rpt-group { margin-bottom: 18px; break-inside: avoid; }
.rpt-group-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 7px 10px; background: var(--bg-1);
    border: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0;
}
.rpt-group-name { font-size: 13px; font-weight: 600; color: var(--fg-0); }
.rpt-group-meta { font-size: 11.5px; color: var(--fg-3); }

@media print {
    .rpt-group { break-inside: avoid; }
    .rpt-group-head { background: #f3f3f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--fg-2); cursor: pointer; transition: all var(--dur-md) var(--ease-out); }
.icon-btn:hover { background: var(--bg-2); color: var(--fg-0); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; height: 30px; font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-0); color: var(--fg-1); cursor: pointer; transition: all var(--dur-md) var(--ease-out); white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg-2); border-color: var(--border-strong); }
.btn.primary { background: var(--brand-purple); color: white; border-color: var(--brand-purple); }
.btn.primary:hover { background: var(--brand-purple-hover); border-color: var(--brand-purple-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.sm { height: 26px; padding: 4px 9px; font-size: 12px; }
/* Print button — purple-tinted call-to-action so it reads at a glance in the toolbar. */
.btn.print-btn { background: #ede7f4; color: var(--brand-purple); border-color: #c4b0e8; font-weight: 600; }
.btn.print-btn:hover { background: var(--brand-purple); color: #ffffff; border-color: var(--brand-purple); }
.btn.xs { height: 22px; padding: 2px 8px; font-size: 11.5px; gap: 4px; }
.btn.danger { background: var(--status-conflict-bg); color: var(--status-conflict); border-color: #fca5a5; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Page chrome ────────────────────────────────────────────────────── */
.page-header { padding: 16px 24px 12px; background: var(--bg-0); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.page-title { font-size: 19px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.02em; margin: 0; }
.page-sub { font-size: 12.5px; color: var(--fg-2); margin-top: 3px; }
.page-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 24px; background: var(--bg-0); border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap; }

/* ── Date pager ─────────────────────────────────────────────────────── */
.date-pager { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--bg-0); }
.date-pager button { background: transparent; border: 0; width: 28px; height: 100%; cursor: pointer; color: var(--fg-2); display: grid; place-items: center; }
.date-pager button:hover { background: var(--bg-2); color: var(--fg-0); }
.dp-mid { padding: 0 12px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: var(--fg-1); display: flex; align-items: center; gap: 6px; height: 100%; cursor: default; }

/* ── Segmented control ──────────────────────────────────────────────── */
.seg { display: inline-flex; background: var(--bg-2); border-radius: 7px; padding: 2px; height: 30px; }
.seg button { border: 0; background: transparent; padding: 0 10px; font-size: 12px; font-weight: 500; color: var(--fg-2); border-radius: 5px; cursor: pointer; }
.seg button:hover { color: var(--fg-1); }
.seg button.on { background: var(--bg-0); color: var(--fg-0); box-shadow: 0 1px 2px rgba(20,20,40,.06), 0 0 0 1px rgba(20,20,40,.04); }

/* ── Chips & pills ──────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; font-size: 12px; font-weight: 500; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-0); color: var(--fg-1); cursor: default; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; height: 18px; font-size: 10.5px; font-weight: 600; border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap; }
.pill.active { background: #dcfce7; color: #166534; }
.pill.discharge { background: #fee2e2; color: #991b1b; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.divider { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }

/* ── Schedule grid ──────────────────────────────────────────────────── */
.schedule-shell { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--bg-1); }
.grid-wrap { flex: 1; margin: 14px 20px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow-card); }
.grid-scroll { flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
/* The cell a context-menu action was invoked from. The grid is rebuilt in place, so the
   cell is still where it was - this says which one the edit applied to, after a redraw
   that may have changed its height as chips came or went. */
.cell.nx-cell-touched { box-shadow: inset 0 0 0 2px #eab308; }
.grid-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.grid-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg-0); }
.sched-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; width: max-content; min-width: 100%; }
.sched-grid th, .sched-grid td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); vertical-align: top; text-align: left; }
.sched-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--bg-0); border-bottom: 1px solid var(--border-strong); }
.col-date { width: 110px; position: sticky; left: 0; z-index: 2; background: var(--bg-1); border-right: 1px solid var(--border-strong) !important; padding: 8px 12px; }
/* The top-left corner. It is both a column header and the date column, so it has to
   out-rank both: the patient headers share its z-index and come later in the DOM, so at
   equal z-index they paint straight over it and the corner looks like it scrolled away.

   The selector must beat `.sched-grid thead th` (0,1,2) on specificity, which the
   previous `thead .col-date` (0,1,1) did not - so its z-index:4 was silently discarded
   and the corner sat at 3 with everything else. */
.sched-grid thead th.col-date {
    z-index: 4;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-strong);
}
.col-date-head { font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
.row-date .date-day { font-size: 13px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.01em; }
.row-date .date-dow { font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-top: 1px; }
.row-date.today .date-day { color: var(--brand-purple); }
.row-date.today .col-date::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand-purple); }
.row-shift { font-size: 10.5px; color: var(--fg-2); font-weight: 600; letter-spacing: 0.04em; margin-top: 6px; padding: 1px 6px; display: inline-block; background: var(--bg-2); border-radius: 4px; }
.shift-time { color: var(--fg-3); font-weight: 500; margin-left: 4px; }
.col-pat { width: 168px; padding: 10px 12px; background: var(--bg-0); cursor: pointer; position: relative; }
.col-pat:hover { background: var(--bg-1); }
.col-pat.discharged { background: #fef2f2; }
.col-pat.discharged .pat-name { color: #6b7280; text-decoration: line-through; text-decoration-color: #d1d5db; }
.pat-team { font-size: 9.5px; font-weight: 700; color: var(--brand-purple); background: var(--brand-purple-tint); padding: 1px 5px; border-radius: 3px; letter-spacing: 0.05em; display: inline-block; }
.pat-status { margin-left: 4px; }
.pat-name { font-size: 12.5px; font-weight: 600; color: var(--fg-0); margin-top: 5px; letter-spacing: -0.005em; white-space: normal; line-height: 1.25; }
.pat-meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11px; color: var(--fg-2); }
.pat-prefs { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.pref-tag { display: inline-flex; align-items: center; gap: 2px; height: 16px; padding: 0 5px; font-size: 9.5px; font-weight: 600; border-radius: 3px; letter-spacing: 0.02em; }
.pref-tag.female { background: #fce7f3; color: #9d174d; }
.pref-tag.male { background: #dbeafe; color: #1e40af; }
.pref-tag.lpn { background: #e0e7ff; color: #3730a3; }
.pref-tag.pet { background: #fef3c7; color: #92400e; }
.pref-tag.lang { background: #d1fae5; color: #065f46; }
.pref-tag.stop { background: #fee2e2; color: #991b1b; }
.pref-tag.smoke { background: #f3e8ff; color: #6b21a8; }
/* 'P' indicator — always shown when patient has any preference. Bright red so it reads as a primary "this patient has prefs" flag. */
.pref-tag.has-prefs { background: #ef4444; color: #ffffff; font-weight: 700; padding: 0 6px; }
/* '+N' overflow tail — neutral grey, secondary to .has-prefs */
.pref-tag.overflow { background: #6b7280; color: #ffffff; padding: 0 6px; font-weight: 600; }
.sched-grid tbody td.cell { padding: 4px; background: var(--bg-0); cursor: pointer; position: relative; min-height: 52px; transition: background 120ms; }
.sched-grid tbody td.cell:hover { background: var(--bg-1); }
/* Weekend rows — distinct warm tint so users can see weekends approaching at a glance */
.cell.weekend { background: #fff7ed; }
.cell.weekend:hover { background: #ffedd5; }
/* Partial coverage — assignments exist but shift not fully covered; click to add more */
.cell.partial { box-shadow: inset 0 -3px 0 #f59e0b; cursor: pointer; }
.cell.partial:hover { background: #fef3c7; }
/* Amber pill on assignment chips for partial-shift coverage */
.assign .partial-time { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; padding: 0 5px; border-radius: 9px; letter-spacing: 0.02em; }
.assign .agency-attendant { font-size: 10.5px; color: #1f1f2e; font-weight: 500; margin-top: 1px; padding-left: 22px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assign .agency-attendant:hover { color: var(--et-tmp-agency); text-decoration: underline; }
/* Telecare = shift-status placeholder. Per Kenny's clarification, it shares the
   agency background color (light orange) so users see it's in the "agency-ish"
   visual family — the dashed border + striped pattern + TELECARE tag make it
   immediately distinguishable from a real agency assignment. */
.assign.telecare { background: repeating-linear-gradient(45deg, #fed7aa, #fed7aa 6px, #fdba74 6px, #fdba74 12px); border: 1px dashed #c2410c; padding: 4px 6px; }
.assign.telecare .telecare-row { display: flex; align-items: center; gap: 5px; }
.assign.telecare .telecare-icon { font-size: 13px; color: #c2410c; }
.assign.telecare .telecare-tag { font-size: 9px; font-weight: 700; color: #fff; background: #c2410c; padding: 1px 5px; border-radius: 3px; letter-spacing: 0.06em; flex-shrink: 0; }
.assign.telecare .telecare-label { font-size: 10.5px; font-weight: 700; color: #7c2d12; letter-spacing: 0.04em; }
.assign.telecare .telecare-time { font-size: 10.5px; font-weight: 600; color: #9a3412; margin-left: auto; }
/* Telecare partial-coverage hours sub-line — sits beneath the TELECARE CC pill */
.assign.telecare .telecare-hours { font-size: 10.5px; font-weight: 600; color: #9a3412; margin-top: 3px; padding-left: 20px; }
/* Full-shift Telecare — visually occupy the cell so the user sees the shift is blocked. */
.assign.telecare.full-block { min-height: 36px; padding: 10px 8px; border-width: 2px; box-shadow: inset 0 0 0 1px #fdba74; }
.assign.telecare.full-block .telecare-label { font-size: 12px; }

/* ── Availability notes ───────────────────────────────────────────────
   cc_emp_avail.comment, surfaced on the availability grid. The dot marks a cell
   that has a note; the button on the employee row opens the employee-level
   CC_EMP_COMMENT record. Both were invisible before — the notes existed in the
   data and the page discarded them. */
.avail-note-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d97706;
    box-shadow: 0 0 0 1px #fff;
    pointer-events: none;
}
.avail-note-btn {
    background: transparent;
    border: 0;
    padding: 0 2px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    opacity: 0.35;
    filter: grayscale(100%);
    transition: opacity 120ms, filter 120ms;
}
.avail-note-btn:hover { opacity: 0.9; filter: none; }
/* Filled state — the employee already has comments on file. */
.avail-note-btn.has-note { opacity: 1; filter: none; }

/* Per-row actions on the availability grid: Copy Last Month, Show Schedule. */
.avail-row-btn {
    background: transparent;
    border: 0;
    padding: 0 2px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    opacity: 0.35;
    filter: grayscale(100%);
    transition: opacity 120ms, filter 120ms;
}
.avail-row-btn:hover { opacity: 0.9; filter: none; }

/* ── Availability grouping tabs (feedback #1106) ──────────────────────── */
.avail-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.avail-tab {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-2);
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 120ms;
}
.avail-tab:hover:not(:disabled) { color: var(--fg-0); border-color: var(--border-strong); }
.avail-tab.active {
    color: #4E288E;
    background: #EDE7F4;
    border-color: #c4b0e8;
}
.avail-tab:disabled { opacity: 0.4; cursor: default; }
.avail-tab-count { font-weight: 400; opacity: 0.7; margin-left: 3px; }

/* The same note, surfaced in the Schedule assign picker so the scheduler sees it
   before choosing rather than after. Truncated — the full text is in the title. */
.avail-note-flag {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    margin-left: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 3px;
    padding: 0 4px;
}

/* ── Notified / cancelled assignment ──────────────────────────────────
   cc_schedule.cancel = 'Y'. Kept on the grid rather than hidden, matching the
   Delphi client, which draws these with a red marker so the office can see
   which stopped cases were already communicated — and so Un-mark Notified
   stays reachable. Faded and struck through so it never reads as live
   coverage; the type colour still shows through underneath so you can tell an
   agency cancellation from a VITAS one. Overrides the type classes, so it must
   stay after them. */
.assign.notified {
    opacity: 0.55;
    filter: grayscale(45%);
    border-style: dashed !important;
    position: relative;
}
.assign.notified .emp-name,
.assign.notified .agency-attendant,
.assign.notified .telecare-label { text-decoration: line-through; }
/* Red corner marker — the equivalent of Delphi's Wingdings glyph. */
.assign.notified::after {
    content: "✉";
    position: absolute;
    top: 1px;
    right: 3px;
    font-size: 9px;
    line-height: 1;
    color: #dc2626;
    font-weight: 700;
    pointer-events: none;
}
/* Print: opacity and greyscale don't survive well, so lean on the strike. */
@media print {
    .assign.notified { opacity: 1 !important; filter: none !important; text-decoration: line-through; }
}
.row-date.weekend .col-date { background: #fef3c7; }
.row-date.weekend .date-day,
.row-date.weekend .date-dow { color: #b45309; }
.row-date.weekend .col-date::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #f59e0b; }
/* Don't let weekend styling override today's left bar */
.row-date.today.weekend .col-date::before { background: var(--brand-purple); }
.cell.empty:hover { background: var(--brand-purple-tint); }
.cell.conflict { background: #fef2f2; }

/* ── Compact mode ───────────────────────────────────────────────────── */
.sched-grid.compact { font-size: 10.5px; }
.sched-grid.compact th,
.sched-grid.compact td { padding: 1px 2px !important; }
.sched-grid.compact .col-date { padding: 4px 8px !important; }
.sched-grid.compact .col-pat { padding: 5px 7px !important; min-width: 120px !important; }
.sched-grid.compact .pat-name { font-size: 10.5px; }
.sched-grid.compact .pat-meta { font-size: 9.5px; }
.sched-grid.compact .pat-prefs { margin-top: 3px; }
.sched-grid.compact .pref-tag { font-size: 8px; height: 13px; }
.sched-grid.compact .date-day { font-size: 11px; }
.sched-grid.compact .date-dow { font-size: 9px; }
.sched-grid.compact .row-shift { font-size: 9px; margin-top: 3px; }
.sched-grid.compact tbody td.cell { min-height: 36px; padding: 2px; }
.sched-grid.compact .assign { padding: 2px 4px 2px 6px; font-size: 10px; gap: 1px; margin-bottom: 2px; }
.sched-grid.compact .cu-badge { width: 12px; height: 12px; font-size: 7px; }
.sched-grid.compact .disc-tag { font-size: 8px; }
.sched-grid.compact .assign-row2 { font-size: 9px; }

/* ── Past date — no new assignments allowed ─────────────────────────── */
.cell.past-cell { background: var(--bg-1) !important; cursor: not-allowed !important; }
.cell.past-cell:hover { background: var(--bg-1) !important; }
.cell.past-cell .add-hint { display: none !important; }
.add-hint { opacity: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 22px; height: 22px; border-radius: 5px; background: var(--brand-purple-tint); color: var(--brand-purple); display: grid; place-items: center; font-size: 16px; line-height: 1; transition: opacity 150ms; }
.cell.empty:hover .add-hint { opacity: 1; }

/* ── Assignment chips ───────────────────────────────────────────────── */
.assign { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 5px 7px 5px 9px; border-radius: 5px; background: var(--bg-2); border-left: 3px solid var(--fg-3); cursor: pointer; transition: all 150ms var(--ease-out); font-size: 11.5px; margin-bottom: 3px; }
.assign:last-child { margin-bottom: 0; }
/* Proportional layout — chip occupies a vertical slice of the cell whose
   top/height reflect its time-of-shift. Inline top/height percentages on each
   chip turn the cell into a mini timeline; uncovered time renders as visible
   blank space (top, middle, or bottom depending on the entry's window). */
.cell { min-height: 80px; }
.sched-grid.compact .cell { min-height: 56px; }
.assign.proportional { position: absolute; left: 4px; right: 4px; margin-bottom: 0; overflow: hidden; min-height: 18px; }
.assign:hover { transform: translateY(-0.5px); box-shadow: var(--shadow-card); }
.variant-tinted .assign.full-reg { background: var(--et-full-reg-bg); border-left-color: var(--et-full-reg); }
.variant-tinted .assign.full-tmp { background: var(--et-full-tmp-bg); border-left-color: var(--et-full-tmp); }
.variant-tinted .assign.part-reg { background: var(--et-part-reg-bg); border-left-color: var(--et-part-reg); }
.variant-tinted .assign.part-tmp { background: var(--et-part-tmp-bg); border-left-color: var(--et-part-tmp); }
.variant-tinted .assign.tmp-agency { background: var(--et-tmp-agency-bg); border-left-color: var(--et-tmp-agency); }
.variant-mono .assign { background: var(--bg-0); border: 1px solid var(--border); border-left: 3px solid var(--fg-3); }
.variant-mono .assign.full-reg { border-left-color: var(--et-full-reg); }
.variant-mono .assign.full-tmp { border-left-color: var(--et-full-tmp); }
.variant-mono .assign.part-reg { border-left-color: var(--et-part-reg); }
.variant-mono .assign.part-tmp { border-left-color: var(--et-part-tmp); }
.variant-mono .assign.tmp-agency { border-left-color: var(--et-tmp-agency); }
.assign-row1 { display: flex; align-items: center; gap: 5px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.005em; }
.assign-row1 .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assign-row2 { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--fg-2); }
.disc-tag { font-size: 9.5px; font-weight: 700; color: var(--fg-1); background: rgba(255,255,255,0.7); border: 1px solid var(--border); padding: 0 4px; border-radius: 3px; letter-spacing: 0.05em; }
/* Discipline inline with the heading name — matches the legacy Delphi chip
   layout where 'HHA Smith, Jane' / 'LPN Star Nurses Agency' read as one
   flowing label, with discipline bold-prefixed. */
.disc-inline { font-size: 10.5px; font-weight: 700; color: var(--fg-1); letter-spacing: 0.04em; flex-shrink: 0; }
.sched-grid.compact .disc-inline { font-size: 9px; }
.cu-badge { width: 14px; height: 14px; font-size: 9px; font-weight: 700; border-radius: 3px; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
.cu-badge.c { background: var(--status-confirmed-bg); color: var(--status-confirmed); }
.cu-badge.u { background: var(--status-unconfirmed-bg); color: var(--status-unconfirmed); }
/* Action group sits at top-right. The X is hover-only, but the note pin
   inside it is always visible so the user can open the note any time. */
.assign-actions { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; align-items: center; }

/* Note indicator — small red dot at the top-right of the chip. Always visible
   when an entry has a note attached; click to open the note dialog. Sized to
   sit above the action group (X / Mark-Notified) so the two never overlap and
   neither obscures the employee's name. */
.note-dot {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #dc2626;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px #dc2626, 0 1px 2px rgba(0,0,0,0.15);
    padding: 0;
    cursor: pointer;
    z-index: 2;
}
.note-dot:hover { background: #b91c1c; transform: scale(1.2); transition: transform 100ms; }
/* When a note exists AND edit actions exist, shift the action group left so it
   doesn't sit on top of the dot. The dot wins the corner — the action group
   moves over. */
.assign:has(.note-dot) .assign-actions { right: 18px; }
.assign-del { width: 16px; height: 16px; border: 0; background: rgba(255,255,255,0.85); border-radius: 3px; display: grid; place-items: center; color: var(--fg-2); cursor: pointer; font-size: 12px; line-height: 1; opacity: 0; transition: opacity 150ms; }
.assign:hover .assign-del { opacity: 1; }
.assign-del:hover { color: var(--status-conflict); background: white; }
/* Note indicator — sits LEFT of the X in the action group, always visible. */
.note-pin { color: var(--brand-purple); font-size: 11px; line-height: 1; cursor: pointer; flex-shrink: 0; padding: 1px 4px; border-radius: 4px; background: rgba(167, 139, 250, 0.18); border: 1px solid rgba(167, 139, 250, 0.35); }
.note-pin:hover { background: rgba(167, 139, 250, 0.32); border-color: var(--brand-purple); }
.note-pin.always { width: 18px; height: 16px; padding: 0; display: grid; place-items: center; font-size: 10px; }

/* ── Aside panel ────────────────────────────────────────────────────── */
.sched-aside { width: 260px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--bg-0); display: flex; flex-direction: column; overflow: hidden; transition: width 180ms ease; }
.sched-aside.collapsed { width: 26px; }
.aside-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 10px; gap: 2px; align-items: stretch; }
.aside-tab { padding: 12px 10px 10px; font-size: 12px; font-weight: 500; color: var(--fg-2); border: 0; background: transparent; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.aside-tab.on { color: var(--fg-0); border-bottom-color: var(--brand-purple); }
.aside-collapse-btn { margin-left: auto; align-self: center; width: 22px; height: 22px; border: 1px solid var(--border); background: var(--bg-0); border-radius: 4px; cursor: pointer; color: var(--fg-2); font-size: 11px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; }
.aside-collapse-btn:hover { background: var(--bg-1); color: var(--fg-0); }
.aside-rail { width: 100%; height: 100%; border: 0; background: var(--bg-1); cursor: pointer; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--fg-2); }
.aside-rail:hover { background: var(--bg-2, #f1f1f5); color: var(--fg-0); }
.aside-rail-icon { font-size: 12px; line-height: 1; }
.aside-rail-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; white-space: nowrap; user-select: none; }
.aside-rail-badge { background: #dc2626; color: #fff; font-size: 9px; font-weight: 700; border-radius: 999px; padding: 1px 5px; margin-top: 6px; }
.aside-body { flex: 1; overflow: auto; padding: 14px; }
.aside-h { font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-bottom: 8px; }
.aside-section { margin-bottom: 16px; }
.legend { display: flex; flex-direction: column; gap: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-1); }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ── Hours rows ─────────────────────────────────────────────────────── */
.hours-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }

/* Defect 5 (6 Oct 2026): employment type on the hours list. The colour comes from the
   same --et-* tokens the grid chips and the assign picker use, so one person reads the
   same colour wherever they appear. A stripe rather than a pill: the row is dense and
   already carries a name, a discipline, a bar and a number. */
.hours-type-stripe {
    width: 3px; align-self: stretch; min-height: 14px; border-radius: 2px;
    background: var(--border); flex: 0 0 auto;
}
.hours-row.full-reg   .hours-type-stripe { background: var(--et-full-reg); }
.hours-row.full-tmp   .hours-type-stripe { background: var(--et-full-tmp); }
.hours-row.part-reg   .hours-type-stripe { background: var(--et-part-reg); }
.hours-row.part-tmp   .hours-type-stripe { background: var(--et-part-tmp); }
.hours-row.tmp-agency .hours-type-stripe { background: var(--et-tmp-agency); }
.hours-row:last-child { border-bottom: 0; }
.hours-name { flex: 1; font-size: 12px; color: var(--fg-1); font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hours-disc { font-size: 10px; font-weight: 700; color: var(--fg-2); background: var(--bg-2); padding: 1px 4px; border-radius: 3px; letter-spacing: 0.04em; }
.hours-num { font-size: 12px; font-weight: 600; color: var(--fg-1); min-width: 32px; text-align: right; }
.hours-bar { flex: 0 0 48px; height: 4px; background: var(--bg-2); border-radius: 2px; overflow: hidden; }
.hours-bar-fill { height: 100%; background: var(--brand-purple); border-radius: 2px; }
.hours-bar-fill.warn { background: #e65100; }
.hours-bar-fill.over { background: #dc2626; }

/* ── Find employee panel ─────────────────────────────────────────────── */
.find-panel { position: absolute; width: 460px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); overflow: hidden; z-index: 100; top: 4px; left: 4px; }
.find-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.find-title { font-size: 13px; font-weight: 600; color: var(--fg-0); }
.find-sub { font-size: 11.5px; color: var(--fg-2); margin-top: 3px; }
.find-tabs { display: flex; gap: 1px; padding: 8px 10px; background: var(--bg-1); border-bottom: 1px solid var(--border); align-items: center; }
.find-tab { border: 0; background: transparent; padding: 4px 8px; font-size: 11.5px; font-weight: 500; color: var(--fg-2); border-radius: 5px; cursor: pointer; }
.find-tab.on { background: var(--bg-0); color: var(--fg-0); box-shadow: 0 0 0 1px var(--border); }
.find-tab-ct { color: var(--fg-3); margin-left: 4px; }
.find-list { max-height: 300px; overflow: auto; }
.find-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.find-row:hover { background: var(--bg-1); }
.find-row .name { font-size: 12.5px; font-weight: 500; color: var(--fg-0); }
.find-row .meta { font-size: 11px; color: var(--fg-2); }
.find-foot { padding: 10px 14px; background: var(--bg-1); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--fg-2); }

/* ── Alert cards ────────────────────────────────────────────────────── */
.alert-card { padding: 10px; border-radius: 7px; margin-bottom: 8px; }
.alert-card.warn { background: #fffbeb; border: 1px solid #fde68a; }
.alert-card.bad { background: #fef2f2; border: 1px solid #fecaca; }
.alert-title { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.alert-card.warn .alert-title { color: #92400e; }
.alert-card.bad .alert-title { color: #991b1b; }
.alert-body { font-size: 11.5px; color: var(--fg-1); line-height: 1.4; }

/* ── Dashboard ──────────────────────────────────────────────────────── */
.dash-wrap { padding: 20px 24px; flex: 1; overflow: auto; background: var(--bg-1); }
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.kpi-label { font-size: 11px; color: var(--fg-2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-num { font-size: 26px; font-weight: 600; color: var(--fg-0); margin-top: 6px; letter-spacing: -0.02em; }
.kpi-sub { font-size: 11.5px; color: var(--fg-2); margin-top: 4px; }
.dash-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.dash-card { background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.dash-card-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.dash-card-title { font-size: 13px; font-weight: 600; color: var(--fg-0); }
.dash-card-body { padding: 6px 0; }
.health-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.health-row:last-child { border-bottom: 0; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.health-dot.ok { background: #16a34a; }
.health-dot.warn { background: #ea580c; }
.health-dot.bad { background: #dc2626; }
.health-name { flex: 1; color: var(--fg-1); font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-meta { color: var(--fg-2); font-size: 11.5px; }

/* ── Preserved: Context menu ────────────────────────────────────────── */
.nx-context-menu { background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.18); min-width: 160px; padding: 4px 0; }
.nx-ctx-item { padding: 8px 14px; cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; transition: background 0.1s; }
.nx-ctx-item:hover { background: #e3f2fd; }
.nx-ctx-sep { height: 1px; background: #eee; margin: 4px 0; }

/* ── Preserved: Info table ──────────────────────────────────────────── */
.nx-info-table td { padding: 4px 8px; border-bottom: 1px solid #f0f0f0; }

/* ── Preserved: Status bar ──────────────────────────────────────────── */
.nx-status-bar { position: sticky; bottom: 0; background: #37474f; color: #eceff1; font-size: 0.78rem; padding: 4px 12px; display: flex; align-items: center; gap: 16px; z-index: 10; min-height: 26px; border-top: 1px solid #263238; }
.nx-status-bar span { white-space: nowrap; }
.nx-sb-label { color: #90a4ae; }
.nx-sb-value { color: #fff; font-weight: 500; }

/* ── Preserved: Hours badges ────────────────────────────────────────── */
.nx-hours-badge { font-size: 0.72rem; font-weight: 600; padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.nx-hours-ok { background: #e8f5e9; color: #2e7d32; }
.nx-hours-warn { background: #fff3e0; color: #e65100; }
.nx-hours-over { background: #ffebee; color: #c62828; font-weight: 700; }

/* ── Preserved: Effective date outline ──────────────────────────────── */
.nx-effective-cell { outline: 2px solid #e53935; outline-offset: -2px; }

/* ── Preserved: Availability grid ───────────────────────────────────── */
.avail-grid { border-collapse: collapse; font-size: 0.8rem; }
.avail-grid th, .avail-grid td { border: 1px solid #e0e0e0; padding: 2px 4px; text-align: center; }
.avail-grid thead th { background: #eceff1; font-size: 0.72rem; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.avail-grid td.avail-name { text-align: left; font-weight: 500; background: #fafafa; position: sticky; left: 0; z-index: 1; min-width: 160px; }
.avail-check { cursor: pointer; padding: 4px; }
.avail-check:hover { background: #e8f5e9; }
.avail-on { background: #c8e6c9; }

/* ── Preserved: Print header ────────────────────────────────────────── */
.nx-print-header { display: none; }

@media print {
    /* The .rz-* selectors here are stale (left over from the original Radzen
       layout). The current layout uses .sidebar and .topbar — add them
       explicitly or the printed page is dominated by the vertical menu while
       the schedule grid is pushed off page 1. */
    .sidebar, .topbar,
    .rz-header, .rz-sidebar, .rz-sidebar-toggle, .nx-status-bar, .nx-no-print, .rz-button, .rz-dropdown, .rz-datepicker, input[type="range"], .rz-badge, label, .sched-aside, .page-toolbar, .page-header .stats-strip { display: none !important; }
    .app-shell { display: block !important; }
    /* .app-shell was flex; force the .main child to occupy the page edge-to-edge. */
    .main { display: block !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }
    .schedule-shell { display: block !important; }
    .grid-wrap { max-height: none !important; overflow: visible !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important; }
    /* Date-range pages (PatientSchedule, EmployeeSchedule) put their grid
       inside .page-body > .data-card > RadzenDataGrid. Each layer has its
       own overflow / max-height that clips the grid on print. Force all
       wrappers — and the Radzen grid internals — to be visible and unbounded. */
    .page-body { overflow: visible !important; padding: 0 !important; }
    .data-card { overflow: visible !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; }
    .rz-data-grid, .rz-data-grid-data, .rz-data-grid-table { overflow: visible !important; height: auto !important; max-height: none !important; }
    .sched-grid { font-size: 8pt !important; }
    .sched-grid th, .sched-grid td { border: 1px solid #999 !important; padding: 2px 3px !important; }
    .col-pat { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .nx-print-header { display: block !important; margin-bottom: 8px; font-size: 10pt; color: #555; }
    .assign-actions, .note-dot { display: none !important; }
    .col-date { position: static !important; }

    /* Patient/Employee Schedule print polish — RadzenDataGrid styling that
       reads cleanly on paper. Tight font + padding so all columns fit one
       landscape page; alternating row stripe; pill cells flatten to text. */
    .rz-data-grid thead tr,
    .rz-data-grid .rz-data-grid-header,
    .rz-data-grid-header-row { background: #e8e8e8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .rz-data-grid { table-layout: fixed !important; width: 100% !important; }
    .rz-data-grid th, .rz-data-grid td { padding: 2px 5px !important; font-size: 7.5pt !important; border: 1px solid #c0c0c0 !important; overflow-wrap: break-word; word-break: normal; }
    .rz-data-grid th { font-weight: 700 !important; font-size: 7.5pt !important; }
    .rz-data-grid tr:nth-child(even) td { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .pill { background: transparent !important; border: none !important; padding: 0 !important; color: inherit !important; font-size: 7.5pt !important; }
    .page-header { padding: 4px 0 6px !important; background: transparent !important; border-bottom: 1.5px solid #666 !important; margin-bottom: 6px !important; }
    .page-title { font-size: 13pt !important; font-weight: 700 !important; margin: 0 0 2px !important; }
    .page-sub { font-size: 9pt !important; color: #555 !important; }

    /* Landscape, narrow margins. Empty header/footer strings tell Chrome/Edge
       to suppress their auto-injected URL / page-number / date strip — many
       browsers still draw it, in which case the user must turn off 'Headers
       and footers' in the print dialog's More-Settings section. There's no
       CSS that universally guarantees it off. */
    @page {
        size: letter landscape;
        margin: 0.35in 0.3in;
        @top-left   { content: ""; }
        @top-center { content: ""; }
        @top-right  { content: ""; }
        @bottom-left   { content: ""; }
        @bottom-center { content: ""; }
        @bottom-right  { content: ""; }
    }
}

/* ── Print — every table fits the page width (14 Oct 2026) ───────────────
   Page prints are landscape (the @page rule above). The Staffing Audit grid still
   printed 2,036px wide on a 998px page, and Open & Unstaffed 1,311px: Radzen grids
   carry fixed screen widths on every column and truncate their titles, so the right
   half of each row went off the paper. In print every grid and table gives up its
   screen widths, shares the page width, and wraps instead of truncating.

   Scoped with P = body:not(:has(.pr-doc)) so it never touches a PrintDocument
   printout (which has its own type scale), and :not(.sched-grid) so the schedule
   grid keeps its own print layout. */
@media print {
    body:not(:has(.pr-doc)) :is(.rz-data-grid, .rz-data-grid-data, .rz-grid-table, table:not(.sched-grid)) {
        width: 100% !important; min-width: 0 !important; max-width: 100% !important; table-layout: auto !important;
    }
    body:not(:has(.pr-doc)) table:not(.sched-grid) col { width: auto !important; min-width: 0 !important; }
    body:not(:has(.pr-doc)) table:not(.sched-grid) :is(th, td) {
        width: auto !important; min-width: 0 !important; max-width: none !important;
        padding: 2px 4px !important; font-size: 7.5pt !important; line-height: 1.25 !important;
        white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
        /* break-word, not anywhere: anywhere lets the table shrink each column to one letter,
           so "Shift" printed as "S hi ft". break-word wraps at spaces and only splits a word
           longer than its column. */
        overflow-wrap: break-word; word-break: normal; hyphens: none;
        position: static !important; left: auto !important; right: auto !important;
    }
    body:not(:has(.pr-doc)) .rz-data-grid :is(.rz-cell-data, .rz-text-truncate, .rz-column-title-content, .rz-column-title) {
        white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important;
    }
    body:not(:has(.pr-doc)) .rz-data-grid :is(th, td) * { max-width: 100% !important; }
    /* Wide grids (Staffing Audit has 19 columns) need every pixel: a notch smaller type, no
       space reserved in headers for sort/filter icons that do not print, and pills that
       may wrap and carry less padding. */
    body:not(:has(.pr-doc)) .rz-data-grid :is(th, td) { padding: 2px 2px !important; }
    /* Words never split (that printed "Shift" as "S hi ft" and "8:00" as "8:0 0"), so a
       table is as wide as its longest words. Wide tables get smaller type instead, stepped
       by how many columns they have: Staffing Audit's 19 columns fit at 6.5pt. */
    body:not(:has(.pr-doc)) table:not(.sched-grid):has(tr > :nth-child(12)) :is(th, td) { font-size: 7pt !important; }
    body:not(:has(.pr-doc)) table:not(.sched-grid):has(tr > :nth-child(16)) :is(th, td) { font-size: 6.5pt !important; }
    body:not(:has(.pr-doc)) table:not(.sched-grid):has(tr > :nth-child(20)) :is(th, td) { font-size: 6pt !important; }
    /* Radzen sets its own size on the spans inside a cell, which would ignore the steps above. */
    body:not(:has(.pr-doc)) table:not(.sched-grid) :is(th, td) * { font-size: inherit !important; }
    body:not(:has(.pr-doc)) .rz-data-grid :is(.rz-column-title, .rz-column-title-content, .rz-cell-data, .rz-sortable-column) {
        padding: 0 !important; margin: 0 !important; gap: 0 !important;
    }
    body:not(:has(.pr-doc)) .rz-data-grid td :is(span, div) {
        white-space: normal !important; padding-left: 3px !important; padding-right: 3px !important; letter-spacing: 0 !important;
    }
    body:not(:has(.pr-doc)) :is(.rz-pager, .rz-paginator, .rz-column-filter, .rz-grid-filter, .rz-cell-filter,
        .rz-sortable-column-icon, .rz-sort-icon, .rz-group-header, .rz-column-resizer, .rz-column-drag) { display: none !important; }
    body:not(:has(.pr-doc)) .rz-data-grid thead { display: table-header-group; }
    body:not(:has(.pr-doc)) .rz-data-grid tr { break-inside: avoid; }
    /* The app is a full-height shell (html/body 100%, flex columns, scrolling .page-body).
       On paper that capped the print at one page - 25 audit rows printed 8. Let every
       layout box grow to its content. */
    body:not(:has(.pr-doc)) :is(.page-body, .data-card, .rz-data-grid, .rz-data-grid-data, .schedule-shell, .main, .app-shell) {
        overflow: visible !important; height: auto !important; max-height: none !important; min-height: 0 !important; flex: none !important;
    }
    html:not(:has(.pr-doc)), body:not(:has(.pr-doc)) { height: auto !important; overflow: visible !important; }
    /* Any other box that holds a table, whatever its class, grows with it too. */
    body:not(:has(.pr-doc)) :has(table:not(.sched-grid)) {
        overflow: visible !important; height: auto !important; max-height: none !important; min-height: 0 !important;
    }
}

/* ── Print — Feedback "New" review sheet ──────────────────────────────
   The Feedback page's Print New button sets .fb-print-active on the page
   shell and renders .fb-print-content, which is hidden on screen. Print
   then drops the interactive three-pane layout (whose 380px list column
   truncates every comment) in favour of the flat digest.

   display:none/block rather than the visibility trick the Hours Report
   uses above: the digest runs to several pages, and Chromium prints only
   the first page of an absolutely positioned block. */
.fb-print-content { display: none; }
@media print {
    .fb-print-active > .page-header,
    .fb-print-active > .fb-toolbar,
    .fb-print-active > .page-body { display: none !important; }

    /* Named page overrides the landscape @page default above — running text
       reads better in portrait. Chromium honours the `page` property; a
       browser that ignores it falls back to landscape, which is wasteful
       but still legible. */
    .fb-print-active .fb-print-content { display: block !important; page: fbdigest; }
    @page fbdigest { size: letter portrait; margin: 0.5in; }
}

/* ── Login modal — prevent browser autofill from hiding the eye icon ── */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #1c1628 inset !important;
    -webkit-text-fill-color: #e8e0f8 !important;
    caret-color: #e8e0f8;
}

/* ── Blazor error UI ────────────────────────────────────────────────── */
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred." }

/* ── Help drawer ────────────────────────────────────────────────────────
   Right-slide panel that explains the current page. Trigger is a ? pill in
   the topbar; one drawer instance lives in MainLayout. */
.cc-help-trigger {
    background: #EDE7F4;
    color: #4E288E;
    border: 1px solid #c4b0e8;
    border-radius: 14px;
    width: 26px;
    height: 26px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 120ms, border-color 120ms;
}
.cc-help-trigger:hover { background: #ddd0ee; border-color: #a78bfa; }

/* Guide button — same family as .cc-help-trigger but pill-shaped with a label,
   because "Guide" needs a word to be unambiguous sitting next to a "?". */
.cc-guide-trigger {
    background: #EDE7F4;
    color: #4E288E;
    border: 1px solid #c4b0e8;
    border-radius: 14px;
    height: 26px;
    padding: 0 11px 0 9px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 120ms, border-color 120ms;
}
.cc-guide-trigger:hover { background: #ddd0ee; border-color: #a78bfa; text-decoration: none; }
.cc-guide-trigger:focus-visible,
.cc-help-trigger:focus-visible { outline: 2px solid #4E288E; outline-offset: 2px; }

.cc-help-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 8800;
}
.cc-help-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 480px; max-width: 90vw;
    background: #ffffff;
    box-shadow: -8px 0 24px rgba(20, 20, 40, 0.16);
    z-index: 8801;
    display: flex; flex-direction: column;
    color: #1f1f2e;
    font-family: Inter, system-ui, sans-serif;
}
.cc-help-header {
    padding: 14px 20px;
    border-bottom: 1px solid #ebebef;
    display: flex; align-items: center; justify-content: space-between;
    background: #f8f6fc;
}
.cc-help-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #4E288E;
}
.cc-help-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #6b6b7a;
    padding: 0 4px;
}
.cc-help-close:hover { color: #1f1f2e; }
.cc-help-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    font-size: 13.5px;
}
.cc-help-body h1 { font-size: 18px; margin: 0 0 12px; color: #1f1f2e; }
.cc-help-body h2 { font-size: 15px; margin: 18px 0 8px; color: #4E288E; }
.cc-help-body h3 { font-size: 13.5px; margin: 14px 0 6px; color: #1f1f2e; text-transform: uppercase; letter-spacing: 0.04em; }
.cc-help-body p { margin: 0 0 10px; }
.cc-help-body ul, .cc-help-body ol { padding-left: 22px; margin: 0 0 12px; }
.cc-help-body li { margin-bottom: 4px; }
.cc-help-body code { background: #f4f1fa; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; color: #4E288E; }
.cc-help-body pre { background: #f4f1fa; padding: 10px 12px; border-radius: 5px; overflow-x: auto; font-size: 12.5px; }
.cc-help-body pre code { background: transparent; padding: 0; }
.cc-help-body table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: 12.5px; }
.cc-help-body th, .cc-help-body td { border: 1px solid #ebebef; padding: 6px 9px; text-align: left; }
.cc-help-body th { background: #f8f6fc; font-weight: 600; }
.cc-help-body blockquote { border-left: 3px solid #c4b0e8; padding: 4px 12px; color: #4a4a5a; margin: 0 0 12px; background: #faf7ff; }
.cc-help-body strong { color: #1f1f2e; }
.cc-help-empty { color: #6b6b7a; font-size: 12.5px; }
.cc-help-empty .cc-sub { font-size: 11.5px; color: #9a9aa8; margin-top: 6px; }
.cc-help-footer {
    padding: 8px 20px;
    border-top: 1px solid #ebebef;
    font-size: 11px;
    color: #9a9aa8;
    background: #fafafa;
}
.cc-help-footer code { background: #f4f1fa; padding: 1px 5px; border-radius: 3px; }
.cc-sub { color: #9a9aa8; }

/* ── Patient case sheet (Components/Schedule/PatientCaseSheet.razor) ─────────
   Rebuilt 13 Oct 2026: a Staffing tab and a Case Sheet tab in one modal, and a
   Letter printout (.cs-print). See docs/superpowers/specs/2026-10-13-case-sheet-
   redesign-design.md. */
.cs-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9500; display: flex; align-items: center; justify-content: center; }
.cs-modal { width: 1040px; max-width: 96vw; height: 86vh; background: var(--bg-0); border-radius: 10px; box-shadow: 0 8px 32px rgba(20,20,40,.22); display: flex; flex-direction: column; overflow: hidden; }
.cs-head { padding: 14px 20px 0; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cs-head-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cs-name { font-size: 17px; font-weight: 650; color: var(--fg-0); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cs-sub { font-size: 12px; color: var(--fg-2); margin-top: 3px; }
.cs-sub code { font-size: 11px; background: #f5f5f7; padding: 1px 5px; border-radius: 3px; }
.cs-actions { display: flex; gap: 4px; align-items: center; }
.cs-print-wrap { position: relative; }
.cs-print-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-weight: 600; margin-right: 6px; }
.cs-print-menu { position: absolute; right: 6px; top: 38px; z-index: 2; background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(20,20,40,.14); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; white-space: nowrap; font-size: 12.5px; }
.cs-print-menu label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.cs-tabs { display: flex; gap: 2px; margin-top: 10px; }
.cs-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--fg-2); cursor: pointer; }
.cs-tabs button.on { color: var(--brand-purple); border-bottom-color: var(--brand-purple); }
.cs-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 20px; background: var(--bg-1); }

.cs-badge { display: inline-flex; padding: 2px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 600; }
.cs-badge.ok { background: #e5f5ec; color: #1f7a4d; }
.cs-badge.warn { background: #fff4e0; color: #8a5300; }
.cs-badge.grey { background: #f2f2f5; color: var(--fg-1); }
.cs-badge.stop { background: #fdecea; color: #b42318; }

.cs-card { background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; break-inside: avoid; }
.cs-card h3 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cs-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--brand-purple); font-weight: 600; cursor: pointer; }
.cs-muted { color: var(--fg-3); font-size: 12px; }
.cs-tel { color: var(--brand-purple); font-weight: 600; text-decoration: none; }
.cs-block { background: #f7f7f9; border-radius: 6px; padding: 7px 10px; margin-top: 6px; white-space: pre-wrap; }
.cs-dl { margin: 0; display: grid; grid-template-columns: 118px 1fr; gap: 4px 10px; font-size: 13px; }
.cs-dl.narrow { grid-template-columns: 80px 1fr; margin-top: 8px; }
.cs-dl dt { color: var(--fg-2); }
.cs-dl dt[title]:not([title=""]) { text-decoration: underline dotted; cursor: help; }
.cs-dl dd { margin: 0; color: var(--fg-1); overflow-wrap: anywhere; }
.cs-dl dd.cs-block { margin-top: 0; }
.cs-group { grid-column: 1 / -1; font-weight: 650; color: var(--fg-0); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
.cs-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.cs-flow { columns: 2 340px; column-gap: 12px; }
.cs-flow .cs-card { display: inline-block; width: 100%; }
.cs-alert { background: #fdecea; color: #b42318; border: 1px solid #f5c2bd; border-radius: 8px; padding: 9px 12px; font-weight: 600; margin-bottom: 12px; }
.cs-unavailable { background: #fff4e0; color: #8a5300; border-radius: 8px; padding: 12px 14px; }
.cs-hidden-note { font-size: 12px; color: var(--fg-3); }
.cs-center { display: flex; justify-content: center; padding: 24px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.cs-chip { padding: 2px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 600; background: #e8effd; color: #1d4ed8; }
.cs-chip.stop { background: #fdecea; color: #b42318; }
.cs-chip.gender { background: #EDE7F4; color: var(--brand-purple); }
.cs-chip.language { background: #e5f5ec; color: #1f7a4d; }
.cs-chip.home { background: #fff4e0; color: #8a5300; }

.cs-staff { display: grid; grid-template-columns: 300px 1fr; gap: 12px; align-items: start; }
@media (max-width: 860px) { .cs-staff { grid-template-columns: 1fr; } }
.cs-req { list-style: none; margin: 0; padding: 0; }
.cs-req li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #f2f2f5; }
.cs-req li:last-child { border-bottom: 0; }
.cs-req-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; font-size: 12px; background: #e8effd; color: #1d4ed8; }
.cs-req-ic.stop { background: #fdecea; color: #b42318; }
.cs-req-ic.gender { background: #EDE7F4; color: var(--brand-purple); }
.cs-req-ic.language { background: #e5f5ec; color: #1f7a4d; }
.cs-req-ic.home { background: #fff4e0; color: #8a5300; }
.cs-stats { display: flex; gap: 18px; margin-bottom: 10px; flex-wrap: wrap; }
.cs-stats div { display: flex; flex-direction: column; }
.cs-stats .n { font-size: 18px; font-weight: 650; color: var(--fg-0); }
.cs-stats .n.warn { color: #b45309; }
.cs-stats .n.stop { color: #b42318; }
.cs-stats .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); }
.cs-log { list-style: none; margin: 0; padding: 0; }
.cs-log li { padding: 7px 0; border-bottom: 1px solid #f2f2f5; }
.cs-log li:last-child { border-bottom: 0; }
.cs-log-text { white-space: pre-wrap; }

.cs-cov { display: grid; gap: 3px; font-size: 11px; }
.cs-cov-h { text-align: center; color: var(--fg-2); font-weight: 600; }
.cs-cov-h.today { color: var(--brand-purple); }
.cs-cov-lbl { color: var(--fg-2); font-weight: 600; display: flex; align-items: center; }
.cs-slot { height: 28px; border-radius: 4px; }
.cs-slot.filled { background: var(--et-full-reg); }
.cs-slot.unc { background: repeating-linear-gradient(45deg, #f3c58a, #f3c58a 4px, #fbe3c2 4px, #fbe3c2 8px); }
.cs-slot.open { background: #f7f7f9; border: 1px dashed #d4d4dc; }
.cs-slot.stop { background: repeating-linear-gradient(-45deg, #fdecea, #fdecea 5px, #fff 5px, #fff 10px); border: 1px solid #f5c2bd; }
.cs-slot.past { opacity: .55; }
.cs-cov-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--fg-2); font-size: 11.5px; }
.cs-cov-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.cs-cov-legend i.unc { background: repeating-linear-gradient(45deg, #f3c58a, #f3c58a 3px, #fbe3c2 3px, #fbe3c2 6px); }
.cs-cov-legend i.open { background: #f7f7f9; border: 1px dashed #c4c4cc; }
.cs-cov-legend i.stop { background: repeating-linear-gradient(-45deg, #fdecea, #fdecea 3px, #fff 3px, #fff 6px); border: 1px solid #f5c2bd; }

/* ── Printouts (Components/Shared/PrintDocument.razor) ───────────────────────
   One style for every printout: the case sheet, the CC Patient Schedule and the
   Hours Report (13 Oct 2026). .pr-doc is the document; on screen it is shown as a
   sheet of paper inside .pr-preview, in print it is the only thing on the page.
   Sizes are in pt so screen preview and paper match. Monochrome-safe: status and
   type are always written as text, colour only reinforces. */

/* Toolbar Print menu on the schedule */
/* margin-left:auto keeps Print at the right end of whichever toolbar row it lands on. When
   the toolbar wrapped it fell to the start of the second row, and the menu - which opens
   leftward from the button - slid under the sidebar (reported 14 Oct 2026). */
.print-menu-wrap { position: relative; display: inline-block; margin-left: auto; }
.print-menu-backdrop { position: fixed; inset: 0; z-index: 999; }
.print-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 1000; min-width: 290px; max-width: calc(100vw - 32px); background: var(--bg-0);
    border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(20,20,40,.14); padding: 4px; }
.print-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left;
    background: none; border: 0; border-radius: 6px; padding: 8px 10px; font: inherit; cursor: pointer; color: var(--fg-1); }
.print-menu button:hover { background: #f4f1fa; }
.print-menu button b { font-size: 13px; color: var(--fg-0); }
.print-menu button span { font-size: 11.5px; color: var(--fg-2); }

/* Screen: preview modal with the document as paper */
.pr-preview { position: fixed; inset: 0; z-index: 9400; background: rgba(15,12,28,.55); display: flex; align-items: center; justify-content: center; }
.pr-preview-panel { width: min(1180px, 96vw); height: 92vh; background: #e9e7ef; border-radius: 10px; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: 0 10px 36px rgba(20,20,40,.3); }
.pr-preview-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; background: var(--bg-0); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pr-preview-title { margin-right: auto; }
.pr-preview-title .t { font-size: 15px; font-weight: 650; color: var(--fg-0); }
.pr-preview-title .s { font-size: 12px; color: var(--fg-2); }
.pr-preview-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.pr-print-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; font-weight: 600; }
.pr-opt { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--fg-1); }
.pr-preview-stage { flex: 1; min-height: 0; overflow: auto; padding: 24px 16px 40px; }
.pr-preview-busy { display: flex; justify-content: center; padding: 60px; }
.pr-preview-error { max-width: 520px; margin: 40px auto; background: #fff4e0; color: #8a5300; border-radius: 8px; padding: 14px 16px; }
.pr-preview .pr-doc { width: 8.5in; max-width: 100%; min-height: 11in; margin: 0 auto; background: #fff; padding: .6in .5in;
    box-shadow: 0 2px 14px rgba(20,20,40,.18); }
.pr-preview .pr-doc.landscape { width: 11in; min-height: 8.5in; }
.pr-offscreen { display: none; }
/* A document shown in a page rather than a preview (Staffing Audit's Report view). */
.pr-inline { flex: 1; min-height: 0; padding: 20px 16px 32px; background: #e9e7ef; border-radius: 8px; overflow: auto; }
.pr-inline .pr-doc { width: 11in; max-width: 100%; margin: 0 auto; background: #fff; padding: .55in .5in; box-shadow: 0 2px 14px rgba(20,20,40,.18); }

/* The document */
.pr-doc { color: #16161f; font: 9.5pt/1.4 "Segoe UI", Calibri, Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr-doc .pr-dim { color: #6b6b7a; }
.pr-doc .nw { white-space: nowrap; }
.pr-doc .r { text-align: right; }
.pr-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16pt; border-top: 3pt solid #4E288E; padding-top: 9pt; margin-bottom: 10pt; }
.pr-title h1 { margin: 0; font-size: 19pt; font-weight: 700; color: #0a0a14; line-height: 1.1; letter-spacing: -.01em; }
.pr-meta { color: #44445a; margin-top: 3pt; }
.pr-idbox { border: 1pt solid #cfc3e4; background: #f7f4fc; border-radius: 4pt; padding: 5pt 9pt; text-align: right; font-size: 8.5pt; color: #44445a; white-space: nowrap; }
.pr-idbox span { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .08em; color: #4E288E; }
.pr-idbox b { display: block; font-size: 13pt; color: #0a0a14; }

.pr-tiles { display: flex; gap: 6pt; margin: 2pt 0 12pt; }
.pr-tiles > div { flex: 1; border: 1pt solid #e4e0ee; border-radius: 4pt; padding: 6pt 8pt; background: #fbfafd; }
.pr-tiles b { display: block; font-size: 15pt; font-weight: 700; color: #0a0a14; line-height: 1.1; }
.pr-tiles span { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .07em; color: #6b6b7a; margin-top: 2pt; }
.pr-tiles em { display: block; font-style: normal; font-size: 7.5pt; color: #8a8a99; }
.pr-tiles .warn b { color: #b45309; }
.pr-tiles .bad { border-color: #f5c2bd; background: #fdf3f2; }
.pr-tiles .bad b { color: #b42318; }

.pr-flags { display: flex; flex-wrap: wrap; gap: 4pt; margin: 0 0 10pt; }
.pr-flag { border: 1pt solid #9a9aaa; border-radius: 3pt; padding: 1pt 6pt; font-size: 8.5pt; font-weight: 600; color: #2a2a3a; }
.pr-flag.stop { border-color: #b42318; color: #b42318; background: #fdf3f2; }

.pr-group { margin: 0 0 12pt; }
.pr-keep { break-inside: avoid; }
.pr-group > h2, .pr-kv > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10pt; margin: 0 0 5pt; padding: 3pt 7pt;
    background: #4E288E; color: #fff; border-radius: 3pt; font-size: 9pt; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; break-after: avoid; }
.pr-group > h2 small, .pr-kv > h2 small { font-size: 7.5pt; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .9; }
.pr-kv > h2 { background: none; color: #4E288E; padding: 0 0 2pt; border-radius: 0; border-bottom: 1pt solid #cfc3e4; font-size: 8pt; letter-spacing: .08em; }

.pr-patient { border: 1pt solid #e4e0ee; border-radius: 4pt; margin: 0 0 7pt; padding: 5pt 7pt 6pt; break-inside: avoid; }
.pr-patient.empty { border-color: #efecf5; padding: 2.5pt 7pt; margin-bottom: 3pt; }
.pr-patient.empty .pr-patient-head { margin: 0; }
.pr-patient.empty .pr-patient-head b { font-size: 9.5pt; font-weight: 600; }
.pr-patient-head { display: flex; justify-content: space-between; gap: 10pt; align-items: baseline; margin-bottom: 3pt; }
.pr-patient-head b { font-size: 10.5pt; color: #0a0a14; margin-right: 5pt; }
.pr-patient-head .pr-dim { margin-right: 5pt; font-size: 8.5pt; }
.pr-tag { display: inline-block; border: .75pt solid #9a9aaa; border-radius: 8pt; padding: 0 5pt; font-size: 7.5pt; margin-right: 5pt; color: #44445a; }
.pr-none { color: #8a8a99; font-style: italic; font-size: 8.5pt; padding: 2pt 0; }
.pr-empty { color: #6b6b7a; font-style: italic; }
.pr-note { margin-top: 4pt; font-size: 7.5pt; color: #6b6b7a; font-style: italic; }
.pr-hours { margin-top: 3pt; padding-top: 3pt; border-top: .75pt dashed #d8d3e6; font-size: 8pt; color: #44445a; text-align: right; }

.pr-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.pr-table th { text-align: left; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .05em; color: #6b6b7a; font-weight: 600;
    border-bottom: 1pt solid #cfc3e4; padding: 2pt 5pt; }
.pr-table td { padding: 2.5pt 5pt; border-bottom: .5pt solid #eeebf4; vertical-align: top; }
.pr-table tbody tr:nth-child(even) td { background: #faf8fd; }
.pr-table tr.notified td { color: #9a9aaa; text-decoration: line-through; text-decoration-color: #c4c4cc; }
.pr-table tr.notified td:nth-child(7) { text-decoration: none; }
.pr-table tr.over td { background: #fdf3f2 !important; }
.pr-table .pr-wrap { white-space: normal; max-width: 2.6in; }
.pr-alert td { color: #7f1d1d; }
.pr-totals { max-width: 4.6in; }
.pr-totals tr.sum td { border-top: 1pt solid #cfc3e4; font-weight: 600; }
.pr-totals td:not(:first-child), .pr-totals th:not(:first-child) { text-align: right; }

.pr-status { display: inline-block; border-radius: 8pt; padding: 0 5pt; font-size: 7.5pt; font-weight: 600; border: .75pt solid; }
.pr-status.confirmed { color: #1f7a4d; border-color: #9fd3b6; background: #eef8f2; }
.pr-status.unconfirmed { color: #8a5300; border-color: #e9c37f; border-style: dashed; background: #fff8ea; }
.pr-status.notified { color: #6b6b7a; border-color: #c4c4cc; background: #f4f4f6; }
.pr-ag { display: inline-block; margin-left: 3pt; border-radius: 2pt; padding: 0 3pt; font-size: 6.5pt; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #c2410c; border: .75pt solid #f0b98b; }
.pr-type { display: inline-block; min-width: 18pt; text-align: center; border-radius: 2pt; padding: 0 3pt; font-size: 7pt; font-weight: 700; border: .75pt solid; }
.pr-type.ft { color: #6d28d9; border-color: #c4b5fd; background: #f5f3ff; }
.pr-type.pt { color: #15803d; border-color: #86efac; background: #f0fdf4; }
.pr-type.pd { color: #14532d; border-color: #4ade80; background: #dcfce7; }
.pr-type.ag, .pr-type.tc { color: #c2410c; border-color: #fdba74; background: #fff7ed; }

/* Key-value sections (case sheet) in two columns */
.pr-cols { columns: 2; column-gap: 16pt; }
.pr-doc.landscape .pr-cols { columns: 3; column-gap: 18pt; }
.pr-kv { break-inside: avoid; margin: 0 0 10pt; }
.pr-kv table { width: 100%; border-collapse: collapse; }
.pr-kv th { text-align: left; font-weight: 400; color: #6b6b7a; width: 37%; padding: 1.5pt 6pt 1.5pt 0; vertical-align: top; }
.pr-kv td { padding: 1.5pt 0; vertical-align: top; color: #16161f; }
.pr-kv tr.grp td { padding-top: 4pt; font-weight: 700; color: #0a0a14; }
.pr-kv tr.blk td { white-space: pre-wrap; }

@media print {
    /* Everything that is neither the document nor one of its ancestors goes. display:none
       rather than visibility:hidden, so the schedule grid behind it cannot print as blank
       pages; ancestors are flattened so fixed modals and scroll boxes do not clip it. */
    body:has(.pr-doc) *:not(:has(.pr-doc)):not(.pr-doc):not(.pr-doc *) { display: none !important; }
    body:has(.pr-doc) :has(.pr-doc) {
        display: block !important; position: static !important; overflow: visible !important;
        width: auto !important; height: auto !important; max-height: none !important; margin: 0 !important; padding: 0 !important;
        border: 0 !important; box-shadow: none !important; background: #fff !important; transform: none !important;
    }
    .pr-doc { width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; }
    .pr-patient, .pr-kv, .pr-keep { break-inside: avoid; }
    .pr-table thead { display: table-header-group; }

    .cs-cov.print { gap: 1.5pt; font-size: 7.5pt; }
    .cs-cov.print .cs-cov-h, .cs-cov.print .cs-cov-lbl { color: #555; }
    .cs-cov.print .cs-slot { height: 22pt; border: .75pt solid #999; border-radius: 1.5pt; background: #fff !important; font-size: 6.5pt; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.05; overflow: hidden; opacity: 1; }
    .cs-cov.print .cs-slot.unc { border-style: dashed; }
    .cs-cov.print .cs-slot.stop { color: #b42318; border-color: #b42318; }
    .cs-cov-note { font-size: 7.5pt; color: #666; margin-top: 3pt; }
}

/* Explains why the employee picker is showing a narrowed list. Quiet rather than an
   alert: this is normal, correct behaviour being made visible, not a warning. */
.find-pref-note {
    margin: 0 0 6px;
    padding: 5px 8px;
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--fg-2);
    background: var(--bg-2);
    border-left: 3px solid var(--accent, #6b4fbb);
    border-radius: 3px;
}
/* Staff who miss the patient's preferences: listed last, quieter, with the reason (defect 19). */
.find-row.mismatch { opacity: .72; }
.find-mismatch {
    display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px;
    font-size: 10px; font-weight: 600; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d;
}
.find-pref-note strong { color: var(--fg-1); font-weight: 600; }

/* Radzen appends its date/time picker popup to the document body with its own
   z-index, which sits far below the app's modal overlays (8000, and 8800/8801 for
   the stacked ones). Inside a dialog the picker therefore opened BEHIND it and could
   not be clicked - reported 22 Sep 2026 against Edit Shift Hours, where it made the
   clock icon useless and forced manual typing.

   9500 clears every overlay in this stylesheet. If a new modal is ever given a
   higher z-index than this, the picker goes back behind it - so keep this the
   highest value in the file. */
.rz-popup,
.rz-datepicker-popup,
.rz-datepicker-panel,
.rz-datetime-popup { z-index: 9500 !important; }

/* Range qualifier beside the "Confirmed hours" heading. Quiet: it is a clarification,
   not a value. Added because the heading read "Weekly hours" over a figure covering
   whatever range the grid had loaded, which made it look like the totals disagreed. */
.aside-h-range {
    display: block;
    font-size: 10.5px;
    font-weight: 400;
    color: var(--fg-3);
    letter-spacing: .02em;
    margin-top: 1px;
    text-transform: none;
}

/* The Find Employee popover is 460px and anchors to its cell's left edge, so in the
   right-hand columns it overflowed the scroll container and the user had to scroll
   sideways to reach the list. In the last few columns it opens leftwards instead. */
.find-panel.flip-left { left: auto; right: 4px; }

/* Native time input, replacing the Radzen time picker (23 Sep 2026). Styled to match the
   surrounding Radzen controls so the swap is not visible; the browser supplies the
   stepping and keyboard entry that the Radzen spinners were getting wrong. */
.cc-time {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12.5px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-0);
    color: var(--fg-0);
    min-width: 105px;
}
.cc-time:focus { outline: 2px solid var(--accent, #6b4fbb); outline-offset: -1px; }
.cc-time:disabled { background: var(--bg-2); color: var(--fg-3); }

/* ── Patient scheduling comments ─────────────────────────────────────────────
   A link at the end of each patient row opens a modal holding that patient's
   log. The log reads as a log, not a grid: one line per entry, time in front,
   author behind, grouped under a date. The tabular-nums time column is what
   makes a column of differently-sized entries scannable. */

/* The link on the row */
.cc-comment-link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px 2px 6px; border-radius: 999px;
    border: 1px solid var(--border); background: transparent;
    color: var(--fg-2); font: inherit; font-size: 11px; cursor: pointer;
    transition: all var(--dur-md, .15s) var(--ease-out, ease);
}
.cc-comment-link:hover { background: var(--bg-2); color: var(--fg-0); border-color: var(--fg-2); }
.cc-comment-link.has { color: var(--fg-0); border-color: var(--accent, #6b4fbb); }
.cc-comment-link:focus-visible { outline: 2px solid var(--accent, #6b4fbb); outline-offset: 1px; }
.cc-comment-badge {
    min-width: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--accent, #6b4fbb); color: #fff;
    font-size: 10px; font-weight: 600; line-height: 16px; text-align: center;
}
.cc-comment-addlabel { font-size: 11px; }

/* Compact variant for the patient block on the schedule grid, where the block is
   already dense and the whole of it is a click target for patient info. */
.cc-comment-link.block {
    margin-left: auto; padding: 1px 5px; gap: 3px; border-color: transparent;
}
.cc-comment-link.block:hover { border-color: var(--fg-2); }
.cc-comment-link.block .cc-comment-badge { min-width: 14px; font-size: 9px; line-height: 14px; }

/* The all-programs scope toggle, when it is on. */
.btn.cc-scope-on {
    background: var(--accent, #6b4fbb); color: #fff; border-color: var(--accent, #6b4fbb);
    font-weight: 600;
}

/* Modal shell */
.cc-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.cc-modal {
    background: var(--bg-0); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(20,20,40,.18); overflow: hidden;
    display: flex; flex-direction: column; max-height: 86vh;
}
.cc-comment-modal { width: 680px; max-width: 94vw; }
.cc-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.cc-modal-title { font-size: 15px; font-weight: 600; color: var(--fg-0); }
.cc-modal-sub { font-size: 12px; color: var(--fg-2); margin-top: 2px; }

/* The log */
.cc-comment-log { display: flex; flex-direction: column; min-height: 0; }
.cc-comment-body { padding: 4px 0 8px; overflow-y: auto; min-height: 0; }
.cc-comment-day { padding: 6px 20px 2px; }
.cc-comment-date {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--fg-2);
    padding: 8px 0 6px; position: sticky; top: 0; background: var(--bg-0);
}
.cc-comment-entry {
    display: flex; gap: 8px; align-items: baseline;
    font-size: 13px; line-height: 1.55; padding: 3px 0;
}
.cc-comment-time {
    flex: 0 0 auto; min-width: 66px; text-align: right;
    font-variant-numeric: tabular-nums; font-size: 12px; color: var(--fg-2);
}
.cc-comment-text { flex: 1 1 auto; color: var(--fg-0); white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-comment-author { flex: 0 0 auto; font-size: 11px; color: var(--fg-2); white-space: nowrap; }
.cc-comment-empty { padding: 28px 20px; text-align: center; font-size: 12px; color: var(--fg-2); }

/* The add box */
.cc-comment-add {
    padding: 12px 20px; border-top: 1px solid var(--border);
    background: var(--bg-1); flex: 0 0 auto;
}
.cc-comment-add textarea {
    width: 100%; box-sizing: border-box; resize: vertical;
    font-family: inherit; font-size: 13px; line-height: 1.5;
    border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
    color: var(--fg-0); background: var(--bg-0);
}
.cc-comment-add textarea:focus { outline: 2px solid var(--accent, #6b4fbb); outline-offset: -1px; }
.cc-comment-addfoot { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cc-comment-preview { font-size: 11px; color: var(--fg-2); }
.cc-comment-preview strong { color: var(--fg-1); font-weight: 600; }
.cc-comment-count { font-size: 11px; color: var(--fg-3, #a1a1aa); margin-left: auto; }
.cc-comment-ro {
    padding: 12px 20px; font-size: 12px; color: var(--fg-2);
    background: var(--bg-1); border-top: 1px solid var(--border);
}

/* ── Slicers ─────────────────────────────────────────────────────────────────
   Chip filters that sit in a page toolbar. Multi-select; none selected means no
   narrowing, so the cleared state is also the everything state. */
.cc-slicers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 16px; }
.cc-slicer-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--fg-2); margin-right: 2px;
}
.cc-slicer {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-0);
    color: var(--fg-1); font: inherit; font-size: 11px; cursor: pointer;
    transition: all var(--dur-md, .15s) var(--ease-out, ease);
}
.cc-slicer:hover { border-color: var(--fg-2); color: var(--fg-0); }
.cc-slicer:focus-visible { outline: 2px solid var(--accent, #6b4fbb); outline-offset: 1px; }
.cc-slicer.on {
    background: var(--accent, #6b4fbb); border-color: var(--accent, #6b4fbb);
    color: #fff; font-weight: 600;
}
.cc-slicer-n {
    font-variant-numeric: tabular-nums; font-size: 10px;
    padding: 0 5px; border-radius: 999px;
    background: var(--bg-2, rgba(0,0,0,.06)); color: var(--fg-2);
}
.cc-slicer.on .cc-slicer-n { background: rgba(255,255,255,.22); color: #fff; }
.cc-slicer.clear { border-style: dashed; color: var(--fg-2); }

/* Slicers are a way of driving the screen, not part of the record. */
@media print { .cc-slicers { display: none; } }

/* ── Open & Unstaffed ────────────────────────────────────────────────────────────
   Severity runs red -> amber -> orange. Open (nothing at all) is the loudest;
   Unstaffed reuses the agency orange deliberately, because a Telecare-held shift is
   the one an agency call is about to be made for. Colour is never the only signal:
   every state also carries its word and a tooltip explaining the hours. */
.oc-state {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent;
}
.oc-state.oc-open      { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.oc-state.oc-partial   { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.oc-state.oc-unstaffed { background: var(--et-tmp-agency-bg); color: #9a3412; border-color: var(--et-tmp-agency); }

/* The hours figure is the number a coordinator scans for, so it is tabular and bold
   enough to read down the column without the eye re-anchoring on each row. */
.oc-hours {
    font-variant-numeric: tabular-nums; font-weight: 600; color: var(--fg-0);
}

/* Slicer chips on this page reuse .find-type from the assignment popover; these add
   the state colours to the "on" state so the chip matches the pills below it. */
.find-type.oc-open.on      { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.find-type.oc-partial.on   { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.find-type.oc-unstaffed.on { background: var(--et-tmp-agency-bg); border-color: var(--et-tmp-agency); color: #9a3412; }

/* Free-text filter sitting at the right of the slicer row. */
.cc-slicer-search {
    font-size: 12px; padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-0); color: var(--fg-0);
    min-width: 210px;
}
.cc-slicer-search:focus-visible { outline: 2px solid var(--accent, #6b4fbb); outline-offset: 1px; }

/* Says out loud when a result was capped or a program could not be read. A list that
   silently dropped rows reads as "nothing open there", which is the wrong answer to
   act on. Printed too, for the same reason. */
.cc-banner {
    margin: 0 0 12px; padding: 9px 14px; border-radius: 8px;
    font-size: 12px; line-height: 1.45;
    border: 1px solid var(--border); background: var(--bg-1); color: var(--fg-1);
}
.cc-banner.warn { background: #fef3c7; border-color: #fcd34d; color: #92400e; }

/* ── Staffing Audit ──────────────────────────────────────────────────────────────
   Source and status pills. Agency reuses the same orange as the schedule chips and
   the Open & Unstaffed page, so one colour keeps meaning one thing across the app. */
.sa-source, .sa-status {
    display: inline-block; padding: 1px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent;
}
.sa-source.sa-agency { background: var(--et-tmp-agency-bg); color: #9a3412; border-color: var(--et-tmp-agency); }
.sa-source.sa-vitas  { background: var(--bg-2); color: var(--fg-1); border-color: var(--border); }

.sa-status.sa-confirmed   { background: #dcfce7; color: #166534; border-color: #86efac; }
.sa-status.sa-unconfirmed { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.sa-status.sa-cancelled   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* A cancelled assignment is history, not cover. Muted and struck so it cannot be
   misread as staffing at a glance, but still legible - being able to look back at
   cancelled cases is half of why this report exists. */
.sa-row-cancelled td:nth-child(6),

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .sa-status.sa-confirmed   { background: #14532d; color: #bbf7d0; border-color: #16a34a; }
    :root:not([data-theme="light"]) .sa-status.sa-unconfirmed { background: #78350f; color: #fde68a; border-color: #b45309; }
    :root:not([data-theme="light"]) .sa-status.sa-cancelled   { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
}
:root[data-theme="dark"] .sa-status.sa-confirmed   { background: #14532d; color: #bbf7d0; border-color: #16a34a; }
:root[data-theme="dark"] .sa-status.sa-unconfirmed { background: #78350f; color: #fde68a; border-color: #b45309; }
:root[data-theme="dark"] .sa-status.sa-cancelled   { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }

/* ── Availability: one cell per date, matching the CC Scheduler ──────────────────
   The grid used to carry a column per shift, which left the other shift length, the
   4-hour partials and the absences with nowhere to render - 66,591 rows silently
   dropped. One cell per day holds whatever symbols that person has. */
.avail-date-head {
    min-width: 62px; font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--fg-2); text-align: center; padding: 6px 3px;
}
.avail-date-head.today { color: var(--accent, #6b4fbb); }
.avail-date-dow { font-weight: 500; color: var(--fg-3); }

.avail-day-cell {
    position: relative; text-align: center; padding: 4px 3px; min-width: 62px;
    border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
    line-height: 1.35; vertical-align: middle;
}
.avail-day-cell:hover .avail-day-add { opacity: 1; }
.avail-day-cell:focus-visible {
    outline: 2px solid var(--accent, #6b4fbb); outline-offset: -2px;
    position: relative; z-index: 1;
}
.avail-day-add { color: var(--fg-3); font-weight: 700; font-size: 14px; opacity: 0; transition: opacity 120ms; }

/* A recorded symbol. Absences read differently from shifts on purpose: Time Off and
   Sick Time mean the person is NOT available, the opposite of every other symbol, and
   one treatment for both would invite exactly the wrong read. */
.avail-sym {
    display: inline-block; padding: 0 4px; margin: 1px;
    border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: .02em;
    border: 1px solid transparent;
}
.avail-sym.shift   { background: var(--status-confirmed-bg); color: var(--status-confirmed); border-color: var(--status-confirmed); }
.avail-sym.absence { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* ── The symbol picker ──────────────────────────────────────────────────────────── */
/* Copy Last Month, with a forward span. The CC Scheduler copies one month per click,
   so setting a quarter up meant doing it three times. Same action, with a choice of how
   far forward to fill. */
/* Cut / Copy / Paste a day's symbols, from a right-click on the cell. Mirrors the CC
   Scheduler's popup menu. The clipboard is this grid's own, not the operating system's. */
.avail-ctx-backdrop { position: fixed; inset: 0; z-index: 500; }
.avail-ctx {
    position: fixed; z-index: 501; min-width: 190px;
    display: flex; flex-direction: column;
    background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow-pop, 0 8px 24px rgba(20,20,40,.18)); overflow: hidden;
}
.avail-ctx-head {
    font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--fg-3); padding: 7px 10px 5px; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.avail-ctx-item {
.avail-ctx-sep { height: 1px; background: var(--border); margin: 4px 0; }
    font: inherit; font-size: 12px; text-align: left; background: none; border: none;
    padding: 7px 10px; cursor: pointer; color: var(--fg-1); white-space: nowrap;
    display: flex; align-items: center; gap: 14px;
}
.avail-ctx-item:hover:not(:disabled) { background: var(--bg-2); color: var(--fg-0); }
.avail-ctx-item:disabled { color: var(--fg-3); cursor: default; }
.avail-ctx-key { margin-left: auto; font-size: 10.5px; color: var(--fg-3); }
.avail-ctx-clip {
    font-size: 10.5px; color: var(--fg-3); padding: 6px 10px;
    border-top: 1px solid var(--border); background: var(--bg-1);
    max-width: 230px; white-space: normal;
}

.avail-copy-menu {
    /* Fixed, not absolute: the button lives in the frozen first column, inside
       .data-card's overflow:auto, which clips an absolutely-positioned child no matter
       its z-index. That is what put this menu behind the left pane. */
    position: fixed; z-index: 501;
    display: flex; flex-direction: column; min-width: 210px;
    background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow-pop, 0 8px 24px rgba(20,20,40,.18)); overflow: hidden;
}
.avail-copy-head {
    font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--fg-3); padding: 7px 10px 5px; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.avail-copy-opt {
    font: inherit; font-size: 12px; text-align: left; background: none; border: none;
    padding: 7px 10px; cursor: pointer; color: var(--fg-1); white-space: nowrap;
}
.avail-copy-opt:hover { background: var(--bg-2); color: var(--fg-0); }
.avail-copy-opt:focus-visible { outline: 2px solid var(--accent, #6b4fbb); outline-offset: -2px; }

.avail-picker { width: 420px; max-width: 94vw; }
.avail-picker-title { font-size: 14px; font-weight: 600; color: var(--fg-0); }
.avail-picker-sub   { font-size: 12px; color: var(--fg-2); margin-top: 1px; }
.avail-picker-body  { max-height: 56vh; overflow-y: auto; padding: 6px 16px 10px; }
.avail-picker-empty { padding: 20px; text-align: center; color: var(--fg-2); font-size: 12.5px; }

.avail-picker-group {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--fg-3); margin: 12px 0 4px; padding-bottom: 3px;
    border-bottom: 1px solid var(--border);
}
.avail-picker-group:first-child { margin-top: 2px; }

.avail-picker-row {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 6px; border-radius: 6px; font-size: 12.5px;
}
.avail-picker-note {
    flex: 0 0 auto; background: none; border: none; cursor: pointer;
    font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: 4px; opacity: .35;
}
.avail-picker-note:hover { opacity: 1; background: var(--bg-2); }
.avail-picker-note.has   { opacity: 1; }
.avail-picker-noteedit   { padding: 2px 6px 10px 53px; }
.avail-picker-row:hover { background: var(--bg-2); }
.avail-picker-row.on    { background: var(--status-confirmed-bg); }
.avail-picker-row.on.absence { background: #fee2e2; }

.avail-picker-code {
    flex: 0 0 38px; font-weight: 700; font-size: 11.5px; color: var(--fg-0);
    font-variant-numeric: tabular-nums;
}
.avail-picker-desc   { flex: 1 1 auto; color: var(--fg-1); }
.avail-picker-window { flex: 0 0 auto; font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.avail-picker-pending { font-size: 11.5px; color: var(--fg-2); }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .avail-sym.absence        { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
    :root:not([data-theme="light"]) .avail-picker-row.on.absence { background: #7f1d1d; }
}
:root[data-theme="dark"] .avail-sym.absence           { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
:root[data-theme="dark"] .avail-picker-row.on.absence { background: #7f1d1d; }

@media print { .avail-other-add { display: none; } }

/* Grid / Report switch. Two views of one result set. */
.sa-viewtoggle { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.sa-viewtoggle button {
    font: inherit; font-size: 12px; padding: 4px 12px; cursor: pointer;
    background: var(--bg-0); color: var(--fg-1); border: none;
    border-right: 1px solid var(--border);
}
.sa-viewtoggle button:last-child { border-right: none; }
.sa-viewtoggle button:hover { background: var(--bg-2); color: var(--fg-0); }
.sa-viewtoggle button.on { background: var(--accent, #6b4fbb); color: #fff; font-weight: 600; }
.sa-viewtoggle button:focus-visible { outline: 2px solid var(--accent, #6b4fbb); outline-offset: -2px; }

@media print {
    .sa-viewtoggle { display: none; }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .oc-state.oc-open    { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
    :root:not([data-theme="light"]) .oc-state.oc-partial { background: #78350f; color: #fde68a; border-color: #b45309; }
    :root:not([data-theme="light"]) .cc-banner.warn      { background: #78350f; border-color: #b45309; color: #fde68a; }
}
:root[data-theme="dark"] .oc-state.oc-open    { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
:root[data-theme="dark"] .oc-state.oc-partial { background: #78350f; color: #fde68a; border-color: #b45309; }
:root[data-theme="dark"] .cc-banner.warn      { background: #78350f; border-color: #b45309; color: #fde68a; }

/* Standing profile notes, shown above the employee activity log in the same modal.
   Visually quieter than the log: these are background facts, not events. */
.cc-emp-notes {
    padding: 12px 20px; border-bottom: 1px solid var(--border);
    background: var(--bg-1); flex: 0 0 auto;
}
.cc-emp-notes-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--fg-2); margin-bottom: 6px;
}
.cc-emp-notes-line {
    font-size: 12px; line-height: 1.5; color: var(--fg-1);
    white-space: pre-wrap; overflow-wrap: anywhere; padding: 2px 0;
}
.cc-emp-notes-empty { font-size: 12px; color: var(--fg-3, #a1a1aa); }

/* -- Assign employee popover: employee-type slicer and colour coding -----------
   The same five colours the grid chips and the aside legend use, from the same
   tokens, so a colour means one thing everywhere. Mapping lives in
   EmployeeType.CssClass. */
.find-types {

    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
    padding: 6px 12px; border-bottom: 1px solid var(--border); background: var(--bg-1);
}
.find-type {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: 10.5px; line-height: 1.6;
    background: var(--bg-0); color: var(--fg-1);
    border: 1px solid var(--border); border-left-width: 3px;
    transition: all var(--dur-md, .15s) var(--ease-out, ease);
}
.find-type:hover { filter: brightness(.97); }
.find-type:focus-visible { outline: 2px solid var(--accent, #6b4fbb); outline-offset: 1px; }
.find-type-ct {
    font-variant-numeric: tabular-nums; font-size: 9.5px; font-weight: 600;
    padding: 0 4px; border-radius: 999px;
    background: rgba(0,0,0,.07); color: inherit;
}

/* Unselected: the colour is the left edge only, so twelve chips do not shout.
   Selected: the chip fills, which is what "this is the filter" looks like. */
.find-type.full-reg   { border-left-color: var(--et-full-reg); }
.find-type.full-tmp   { border-left-color: var(--et-full-tmp); }
.find-type.part-reg   { border-left-color: var(--et-part-reg); }
.find-type.part-tmp   { border-left-color: var(--et-part-tmp); }
.find-type.tmp-agency { border-left-color: var(--et-tmp-agency); }

.find-type.full-reg.on   { background: var(--et-full-reg-bg);   border-color: var(--et-full-reg);   color: var(--et-full-reg);   font-weight: 600; }
.find-type.full-tmp.on   { background: var(--et-full-tmp-bg);   border-color: var(--et-full-tmp);   color: var(--et-full-tmp);   font-weight: 600; }
.find-type.part-reg.on   { background: var(--et-part-reg-bg);   border-color: var(--et-part-reg);   color: var(--et-part-reg);   font-weight: 600; }
.find-type.part-tmp.on   { background: var(--et-part-tmp-bg);   border-color: var(--et-part-tmp);   color: var(--et-part-tmp);   font-weight: 600; }
.find-type.tmp-agency.on { background: var(--et-tmp-agency-bg); border-color: var(--et-tmp-agency); color: var(--et-tmp-agency); font-weight: 600; }
.find-type.clear { border-style: dashed; border-left-width: 1px; color: var(--fg-2); }

/* Each row carries its type on the left edge, matching the grid chip for the same
   person. Tint stays very light - the list is read by name, not by colour. */
.find-row { border-left: 3px solid transparent; }
.find-row.full-reg   { border-left-color: var(--et-full-reg); }
.find-row.full-tmp   { border-left-color: var(--et-full-tmp); }
.find-row.part-reg   { border-left-color: var(--et-part-reg); }
.find-row.part-tmp   { border-left-color: var(--et-part-tmp); }
.find-row.tmp-agency { border-left-color: var(--et-tmp-agency); background: color-mix(in srgb, var(--et-tmp-agency-bg) 35%, transparent); }
.find-row.telecare {
    border-left: 3px dashed #c2410c;
    background: repeating-linear-gradient(45deg, rgba(254,215,170,.25), rgba(254,215,170,.25) 4px, rgba(253,186,116,.25) 4px, rgba(253,186,116,.25) 8px);
}

/* The type spelled out on the row, so colour is never the only carrier. */
.find-type-tag {
    font-size: 9.5px; font-weight: 600; white-space: nowrap;
    padding: 1px 6px; border-radius: 4px;
    background: var(--bg-2, rgba(0,0,0,.05)); color: var(--fg-2);
}
.find-type-tag.full-reg   { background: var(--et-full-reg-bg);   color: var(--et-full-reg); }
.find-type-tag.full-tmp   { background: var(--et-full-tmp-bg);   color: var(--et-full-tmp); }
.find-type-tag.part-reg   { background: var(--et-part-reg-bg);   color: var(--et-part-reg); }
.find-type-tag.part-tmp   { background: var(--et-part-tmp-bg);   color: var(--et-part-tmp); }
.find-type-tag.tmp-agency { background: var(--et-tmp-agency-bg); color: var(--et-tmp-agency); }

/* The availability symbol this person declared for the day being filled. The picker
   lists D12, D8, D4, E and E4 declarations side by side for one D12 slot, so without
   this the rows are indistinguishable and the hours they get are a surprise. ".narrow"
   is the case worth noticing: the declaration does not cover the whole slot. */
.find-decl {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9.5px; font-weight: 700; white-space: nowrap;
    padding: 1px 6px; border-radius: 4px;
    background: var(--bg-2, rgba(0,0,0,.05)); color: var(--fg-2);
    letter-spacing: .04em;
}
.find-decl.narrow { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.find-decl-win    { font-weight: 600; letter-spacing: 0; opacity: .9; }

/* -- CC Shift Change Report ----------------------------------------------------
   Laid out to read like the spreadsheet it replaces, so a coordinator who knows
   that sheet can use this without being retrained. Computed figures are visually
   distinct from the fields a person fills in: the first can never be wrong, the
   second is someone's word. */
.cc-empty-note { display: flex; align-items: center; justify-content: center; color: var(--fg-2); }

.cc-report { display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.cc-rep-title {
    font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--fg-0); padding-bottom: 2px;
}
.cc-rep-head {
    display: flex; gap: 22px; flex-wrap: wrap;
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-1);
}
.cc-rep-head .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-2); margin-right: 7px; }
.cc-rep-head .v { font-size: 13px; font-weight: 600; color: var(--fg-0); }

.cc-rep-section {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--fg-1); margin-top: 8px; padding-bottom: 4px;
    border-bottom: 2px solid var(--border-strong);
    display: flex; align-items: center; gap: 8px;
}
.cc-rep-section .ct {
    font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
    background: var(--accent, #6b4fbb); color: #fff; letter-spacing: 0;
}
.cc-rep-empty { font-size: 12px; color: var(--fg-2); padding: 10px 2px; }
.cc-rep-note { font-size: 11px; color: var(--fg-2); font-style: italic; }

/* Computed tiles — no input affordance, because they are not editable. */
.cc-rep-counts { display: flex; gap: 10px; flex-wrap: wrap; }
.cc-rep-count {
    min-width: 150px; padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg-0);
}
.cc-rep-count.computed { border-left: 3px solid var(--accent, #6b4fbb); background: var(--bg-1); }
.cc-rep-count .n { font-size: 20px; font-weight: 700; color: var(--fg-0); font-variant-numeric: tabular-nums; }
.cc-rep-count .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-2); margin-top: 1px; }

.cc-rep-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-rep-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
@media (max-width: 760px) { .cc-rep-grid2 { grid-template-columns: 1fr; } }

.cc-rep-field { display: flex; flex-direction: column; gap: 3px; }
.cc-rep-field > span {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-2); font-weight: 600;
}
.cc-rep-field textarea, .cc-rep-field input {
    font-family: inherit; font-size: 12.5px; line-height: 1.45;
    border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px;
    background: var(--bg-0); color: var(--fg-0); width: 100%; box-sizing: border-box; resize: vertical;
}
.cc-rep-field textarea:focus, .cc-rep-field input:focus,
.cc-rep-in:focus { outline: 2px solid var(--accent, #6b4fbb); outline-offset: -1px; }
.cc-rep-field.small > span { font-size: 10px; }
/* The caption grows, so a caption that wraps to two lines does not push its box below the rest of
   the row (defect 21, 27 Oct 2026). */
.cc-rep-grid3 .cc-rep-field > span:first-child { flex: 1; }
/* What was typed, as plain text. Shown only on paper, where a box clips its text to one line
   (defect 22, 27 Oct 2026). */
.cc-rep-pv { display: none; }

.cc-rep-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.cc-rep-table th {
    text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .03em;
    color: var(--fg-2); font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--border-strong);
    vertical-align: bottom;
}
.cc-rep-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cc-rep-table tbody tr:hover { background: var(--bg-1); }
.cc-rep-in {
    font-family: inherit; font-size: 11.5px; width: 100%; box-sizing: border-box;
    border: 1px solid var(--border); border-radius: 5px; padding: 3px 6px;
    background: var(--bg-0); color: var(--fg-0);
}
.cc-rep-in.yn { min-width: 62px; }
.cc-rep-tag.agency {
    font-size: 9.5px; font-weight: 600; margin-left: 5px; padding: 1px 5px; border-radius: 4px;
    background: var(--et-tmp-agency-bg); color: var(--et-tmp-agency);
}

/* Notes, rendered exactly as the comment log does elsewhere. */
.cc-rep-notes { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--bg-0); }
.cc-rep-notes-head { display: flex; gap: 10px; align-items: baseline; padding-bottom: 4px; }
.cc-rep-notes-head .team {
    font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--fg-2);
    background: var(--bg-2); padding: 1px 6px; border-radius: 4px;
}
.cc-rep-notes-head .pat { font-size: 12.5px; font-weight: 600; color: var(--fg-0); }
.cc-rep-note-line { display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.5; padding: 2px 0; }
.cc-rep-note-line .t { flex: 0 0 auto; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; color: var(--fg-2); font-size: 11px; }
.cc-rep-note-line .x { flex: 1 1 auto; color: var(--fg-0); white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-rep-note-line .a { flex: 0 0 auto; font-size: 10.5px; color: var(--fg-2); white-space: nowrap; }

/* On paper this is the handoff document, so it has to fit and not clip. */
@media print {
    .cc-report { gap: 7px; }
    .cc-rep-table { font-size: 9.5px; page-break-inside: auto; }
    .cc-rep-table tr { page-break-inside: avoid; }
    .cc-rep-notes { page-break-inside: avoid; }
    /* The app's print rules hide every label, and each typed field here sits in one: on paper the
       on-call boxes, the eight counts, the special instructions and the report-detail names all
       disappeared (defects 23 and 25, 27 Oct 2026). */
    .cc-report label.cc-rep-field { display: flex !important; }
    .cc-rep-in, .cc-rep-field input, .cc-rep-field textarea { display: none !important; }
    .cc-rep-pv, .cc-rep-field > span.cc-rep-pv {
        display: block; min-height: 1.3em; border-bottom: 1px solid #999; padding: 1px 2px;
        white-space: pre-wrap; overflow-wrap: anywhere; color: #000;
        /* Not the caption's small grey capitals: it sits in the label beside the caption. */
        text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 11px;
    }
    .cc-rep-section { margin-top: 6px; }
}

/* -- Topbar: the user_c you are working as -----------------------------------
   Sized and shaped like the Guide chip beside it so the topbar reads as one row
   of controls. Deliberately quieter than Guide: this is a status readout first,
   and only a control for the minority who have more than one assignment. */
.cc-user-code {
    display: inline-flex; align-items: center; gap: 5px;
    height: 26px; padding: 0 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--fg-2);
    font-family: inherit; font-size: 11.5px;
}
.cc-user-code .code {
    font-weight: 700; letter-spacing: .04em;
    color: var(--fg-0);
    font-variant-numeric: tabular-nums;
}

/* Defect 7 (6 Oct 2026): the chip showed the user_c alone, so a person signed in as
   KORELLANA read "00OREL". The name truncates under pressure and the code never does -
   the code is the identity written to created_by, so it has to stay whole and readable
   at any width, which is the opposite of the usual "names matter most" instinct. */
.cc-user-code .who {
    max-width: 16ch;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    min-width: 0;
}
/* "kramachandran.00KRAM" - login, a plain dot, then the user code (15 Oct 2026). */
.cc-user-code .who + .code { margin-left: -5px; }   /* cancels the chip gap so the dot sits flush */
.cc-user-code .who + .code::before {
    content: ".";
    color: var(--fg-2); font-weight: 400; letter-spacing: 0;
}
@media (max-width: 1100px) { .cc-user-code .who { max-width: 10ch; } }

/* Switchable: looks like a button, because it is one. */
.cc-user-code.switchable { cursor: pointer; transition: all 140ms ease; }
.cc-user-code.switchable:hover {
    background: #EDE7F4; border-color: #c4b0e8; color: #4E288E;
}
.cc-user-code.switchable:hover .code { color: #4E288E; }
.cc-user-code.switchable:focus-visible {
    outline: 2px solid var(--accent, #6b4fbb); outline-offset: 1px;
}

/* The swap arrows only appear on the switchable variant, so the plain readout
   carries no affordance it cannot honour. */
.cc-user-code svg { opacity: .65; flex-shrink: 0; }
.cc-user-code.switchable:hover svg { opacity: 1; }

@media print { .cc-user-code { display: none; } }
