/* =============================================================================
   steamify.css — the Steamify design system (2026-10 overhaul)

   Loaded LAST in <head> on every page (php/ds_head.php, or a <link> on static
   pages). Three jobs, in this order:
     1. --sz-* tokens: one palette, type, radius, elevation and motion system,
        light ("home kit": cobalt rail on chalk) and dark ("away kit": low-glare
        night ink for night shifts).
     2. Aliases: every older token family (--muted-green, --primary, --pf-*, --cl-*,
        --dropdown-*, …) points at the --sz-* tokens, so page sheets follow along.
     3. Components: shell, header, tabs, buttons, fields, dropdowns, panels, tables,
        overlays, feedback and the KPI figure, written against the class
        names the markup and JS already use (nothing is renamed).

   Theme classes: `light-mode` / `dark-mode` on <html> and <body> (theme-loader).
   Selectors start with `:root body` where an older `body.dark-mode .x` rule would
   otherwise win on specificity; that prefix is the only specificity trick here.
   ========================================================================== */

/* 0. Faces ------------------------------------------------------------------ */
/* Mona Sans (OFL, GitHub) — one variable family with a width axis: semi-condensed
   for headings and figures, normal for reading. Cairo (OFL) carries Arabic only. */
@font-face {
    font-family: "Mona Sans";
    src: url("../fonts/MonaSans-latin.woff2") format("woff2");
    font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Mona Sans";
    src: url("../fonts/MonaSans-latin-ext.woff2") format("woff2");
    font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Cairo";
    src: url("../fonts/Cairo-arabic.woff2") format("woff2");
    font-weight: 200 1000; font-style: normal; font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* 1. Tokens ------------------------------------------------------------------ */
:root, body {
    /* Type */
    --sz-font: "Mona Sans", "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
    --sz-font-mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
    --sz-stretch-head: 88%;     /* headings */
    --sz-stretch-fig: 80%;      /* KPI figures */
    --sz-fs-xs: .75rem; --sz-fs-sm: .8125rem; --sz-fs-md: .9375rem; --sz-fs-base: 1rem;
    --sz-fs-lg: 1.125rem; --sz-fs-xl: 1.375rem; --sz-fs-2xl: 1.75rem; --sz-fs-fig: 2.25rem;

    /* Shape: controls 8, panels 12, chips pill. Hairline is the only border weight. */
    --sz-r-sm: 6px; --sz-r-ctl: 8px; --sz-r-panel: 12px; --sz-r-pop: 12px; --sz-r-pill: 999px;
    --sz-ctl-h: 40px; --sz-ctl-h-sm: 34px;

    /* Motion: crisp product motion, nothing loops */
    --sz-ease: cubic-bezier(.23, 1, .32, 1);
    --sz-ease-io: cubic-bezier(.77, 0, .175, 1);
    --sz-ease-drawer: cubic-bezier(.32, .72, 0, 1);
    --sz-t-1: 120ms; --sz-t-2: 180ms; --sz-t-3: 240ms;

    /* Home kit (light) */
    --sz-rail: #1650c4;
    --sz-rail-2: #1446ad;
    --sz-field-cobalt: #1650c4;   /* brand field (auth band, landing hero, featured plan); stays cobalt at night */
    --sz-rail-ink: #ffffff;
    --sz-rail-text: #dbe4f6;
    --sz-rail-hover: rgba(255, 255, 255, .11);
    --sz-rail-active-bg: #fcfdfe;
    --sz-rail-active-ink: #1650c4;
    --sz-rail-line: rgba(255, 255, 255, .16);

    --sz-bg: #f1f4f9;
    --sz-surface: #fcfdfe;
    --sz-surface-2: #f6f8fb;
    --sz-surface-3: #eaeef5;
    --sz-accent-tint: #edf3fe;
    --sz-border: #dde3ec;
    --sz-border-strong: #c5cedb;
    --sz-field: #fcfdfe;            /* text-field fill */

    --sz-text-strong: #0b1020;
    --sz-text: #141b2b;
    --sz-text-muted: #576174;
    --sz-text-faint: #646d80;

    --sz-accent: #1d68e5;
    --sz-accent-hover: #1a5bd0;
    --sz-accent-press: #164fb6;
    --sz-accent-text: #1a5fd6;
    --sz-accent-soft: rgba(29, 104, 229, .10);
    --sz-accent-ring: rgba(29, 104, 229, .28);
    --sz-on-accent: #ffffff;

    --sz-ink: #141b2b;
    --sz-ink-hover: #232c40;
    --sz-on-ink: #f1f4f9;

    --sz-win: #0b6b39;  --sz-win-soft: rgba(15, 127, 67, .11);  --sz-win-solid: #0f7a42;
    --sz-draw: #9a5c06; --sz-draw-soft: rgba(214, 140, 20, .15); --sz-draw-solid: #d98c14;
    --sz-loss: #b42d36; --sz-loss-soft: rgba(201, 54, 62, .10); --sz-loss-solid: #c23441;

    --sz-scrim: rgba(11, 16, 32, .46);
    --sz-shadow-1: 0 1px 2px rgba(20, 27, 43, .06);
    --sz-shadow-pop: 0 14px 34px -10px rgba(20, 27, 43, .26), 0 2px 6px rgba(20, 27, 43, .07);
    --sz-shadow-modal: 0 28px 70px -16px rgba(11, 16, 32, .38), 0 2px 8px rgba(11, 16, 32, .08);
    --sz-skel: #e5eaf2; --sz-skel-shine: #f3f6fa;
    --sz-scroll-thumb: #c3cbd8; --sz-scroll-thumb-hover: #a6b1c2;
    color-scheme: light;
}

html.dark-mode, body.dark-mode {
    /* Away kit (dark), "midnight slate" trial 2026-11-18: surfaces from the palette
       11151C 151B25 19212E 212D40 273246 2C374B 313C51 343F54 364156 485265;
       it has no light shades, so text is slate tints and the accent stays cobalt. */
    --sz-rail: #151b25;
    --sz-rail-2: #11151c;
    --sz-field-cobalt: #12306f;
    --sz-rail-ink: #edf1f7;
    --sz-rail-text: #a9b4c7;
    --sz-rail-hover: rgba(255, 255, 255, .06);
    --sz-rail-active-bg: #2b66d6;
    --sz-rail-active-ink: #edf1f7;
    --sz-rail-line: rgba(255, 255, 255, .07);

    --sz-bg: #11151c;
    --sz-surface: #19212e;
    --sz-surface-2: #151b25;
    --sz-surface-3: #212d40;
    --sz-accent-tint: #273246;
    --sz-border: #2c374b;
    --sz-border-strong: #364156;
    --sz-field: #151b25;

    --sz-text-strong: #edf1f7;
    --sz-text: #d9dfea;
    --sz-text-muted: #a3adbf;
    --sz-text-faint: #8a95a8;        /* ≥4.5:1 up to surface-3 */

    --sz-accent: #2b66d6;
    --sz-accent-hover: #275fcb;      /* darker on hover: keeps the label above 4.5:1 */
    --sz-accent-press: #1f52b3;
    --sz-accent-text: #79a8ff;
    --sz-accent-soft: rgba(76, 141, 255, .16);
    --sz-accent-ring: rgba(121, 168, 255, .34);
    --sz-on-accent: #edf1f7;

    --sz-ink: #e3e8f1;
    --sz-ink-hover: #f1f4f9;
    --sz-on-ink: #11151c;

    --sz-win: #4cc38a;  --sz-win-soft: rgba(76, 195, 138, .14);  --sz-win-solid: #187a49;
    --sz-draw: #f0b54a; --sz-draw-soft: rgba(240, 181, 74, .15); --sz-draw-solid: #c98612;
    --sz-loss: #ff7a7a; --sz-loss-soft: rgba(255, 122, 122, .13); --sz-loss-solid: #c43a43;

    --sz-scrim: rgba(5, 7, 11, .68);
    --sz-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sz-shadow-pop: 0 16px 40px -10px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
    --sz-shadow-modal: 0 30px 80px -16px rgba(0, 0, 0, .78), 0 0 0 1px rgba(255, 255, 255, .07);
    --sz-skel: #212d40; --sz-skel-shine: #2c374b;
    --sz-scroll-thumb: #343f54; --sz-scroll-thumb-hover: #485265;
    color-scheme: dark;
}

/* 2. Aliases: older token families follow the system -------------------------- */
:root, body {
    --font-family: var(--sz-font);
    /* legacy palette (names say green; values were navy/blue). Polarity is kept:
       in light, dark-* = ink and off-white = chalk; in dark the old sheet flips them. */
    --dark-bg: var(--sz-text);
    --off-white: var(--sz-bg);
    --light-green: var(--sz-accent-tint);
    --muted-green: var(--sz-accent);
    --dark-green: var(--sz-text-strong);
    --muted-blue: var(--sz-text-muted);
    --danger-red: var(--sz-loss);
    --border-grey: var(--sz-border);
    --text-color: var(--sz-text);
    --text-color-muted: var(--sz-text-muted);
    --placeholder-color: var(--sz-text-faint);
    /* 2026 token pass */
    --primary: var(--sz-accent); --primary-hover: var(--sz-accent-hover); --primary-active: var(--sz-accent-press);
    --primary-soft: var(--sz-accent-soft); --primary-contrast: var(--sz-on-accent);
    --accent: var(--sz-accent); --info: var(--sz-accent);
    --success: var(--sz-win); --success-soft: var(--sz-win-soft);
    --warning: var(--sz-draw); --warning-soft: var(--sz-draw-soft);
    --danger: var(--sz-loss); --danger-soft: var(--sz-loss-soft);
    --surface: var(--sz-surface); --surface-2: var(--sz-surface-2); --surface-3: var(--sz-surface-3);
    --border-color: var(--sz-border); --border-subtle: var(--sz-border);
    --radius-sm: var(--sz-r-sm); --radius-md: var(--sz-r-ctl); --radius-lg: var(--sz-r-panel); --radius-xl: 14px;
    --shadow-1: var(--sz-shadow-1); --shadow-2: var(--sz-shadow-1); --shadow-3: var(--sz-shadow-pop);
    --t-fast: var(--sz-t-1); --t-base: var(--sz-t-2); --t-slow: var(--sz-t-3); --ease: var(--sz-ease);
    --control-h: var(--sz-ctl-h); --control-h-sm: var(--sz-ctl-h-sm);
    /* components.css */
    --ease-out: var(--sz-ease); --ease-in-out: var(--sz-ease-io); --ease-drawer: var(--sz-ease-drawer);
    --focus-color: var(--sz-accent); --focus-ring: 0 0 0 3px var(--sz-accent-ring);
    --row-hover: var(--sz-accent-tint);
    --skel-base: var(--sz-skel); --skel-shine: var(--sz-skel-shine);
    --hover-bg: var(--sz-surface-3); --muted-text: var(--sz-text-muted);
    /* referenced without a definition in older sheets */
    --card-bg: var(--sz-surface); --input-bg: var(--sz-surface); --light-grey: var(--sz-surface-3);
    --dark-blue: var(--sz-text-strong);
    /* dropdowns become fields: surface, hairline, quiet hover, cobalt selection */
    --dropdown-bg: var(--sz-surface);
    --dropdown-text: var(--sz-text);
    --dropdown-border: var(--sz-border-strong);
    --dropdown-hover-bg: var(--sz-surface-3);
    --dropdown-hover-text: var(--sz-text);
    --dropdown-focus-color: var(--sz-accent-ring);
    --dropdown-scrollbar-thumb: var(--sz-scroll-thumb);
    --dropdown-scrollbar-thumb-hover: var(--sz-scroll-thumb-hover);
    --dropdown-caret-color: var(--sz-text-muted);
    /* auth sheets (login.css, verify.css, company_form.css, signup.css) */
    --primary-600: var(--sz-accent-hover);
    --primary-color: var(--sz-accent);
    --bg-component-color: var(--sz-rail);
    --danger-color: var(--sz-loss);
}
html.dark-mode, body.dark-mode {
    --dark-bg: var(--sz-bg);
    --off-white: var(--sz-surface);
    --light-green: var(--sz-surface-3);
    --dark-green: var(--sz-accent-text);
    --muted-blue: var(--sz-text-muted);
    --border-grey: var(--sz-border);
    --text-color: var(--sz-text);
    --text-color-muted: var(--sz-text-muted);
    --dropdown-bg: var(--sz-surface);
    --dropdown-text: var(--sz-text);
    --dropdown-border: var(--sz-border-strong);
    --dropdown-hover-bg: var(--sz-surface-3);
    --dropdown-hover-text: var(--sz-text);
    --dropdown-caret-color: var(--sz-text-muted);
    --dropdown-scrollbar-thumb: var(--sz-scroll-thumb);
    --dropdown-scrollbar-thumb-hover: var(--sz-scroll-thumb-hover);
    --focus-color: var(--sz-accent-text);
    --focus-ring: 0 0 0 3px var(--sz-accent-ring);
    --row-hover: var(--sz-accent-tint);
    --skel-base: var(--sz-skel); --skel-shine: var(--sz-skel-shine);
    --hover-bg: var(--sz-surface-3); --muted-text: var(--sz-text-muted);
}
/* page-scoped families */
body.profile-page, html.dark-mode body.profile-page, body.dark-mode.profile-page {
    --pf-card: var(--sz-surface); --pf-text: var(--sz-text); --pf-muted: var(--sz-text-muted);
    --pf-accent: var(--sz-accent); --pf-border: var(--sz-border); --pf-soft: var(--sz-surface-2);
    --pf-shadow: none; --pf-bg: var(--sz-bg);
}
body.sec-page, body.sec-page.dark-mode {
    --sec-card: var(--sz-surface); --sec-text: var(--sz-text); --sec-muted: var(--sz-text-muted);
    --sec-border: var(--sz-border); --sec-accent: var(--sz-accent-text); --sec-input-bg: var(--sz-field);
    --sec-input-border: var(--sz-border-strong); --sec-shadow: none; --sec-row-hover: var(--sz-accent-tint);
    --sec-ok: var(--sz-win); --sec-ok-soft: var(--sz-win-soft); --sec-fail: var(--sz-loss); --sec-fail-soft: var(--sz-loss-soft);
    --sec-warn: var(--sz-draw); --sec-warn-soft: var(--sz-draw-soft); --sec-neutral-soft: var(--sz-surface-3);
}
body.call-logs-page, body.dark-mode.call-logs-page {
    --cl-card: var(--sz-surface); --cl-text: var(--sz-text); --cl-muted: var(--sz-text-muted);
    --cl-accent: var(--sz-accent); --cl-border: var(--sz-border); --cl-head: var(--sz-surface-2);
    --cl-row-alt: var(--sz-surface-2); --cl-shadow: none; --cl-bg: var(--sz-bg);
}

/* 3. Base --------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* The app frame is one screen tall and never scrolls the page itself (style.css: 100vh). iPhone browsers count
   100vh as if their bars were hidden, but a page that never scrolls never hides them: the bottom of every page sat
   under the browser's toolbar, and the whole page could be dragged up and down, worse after turning the phone.
   dvh is the height actually on screen (on a computer it equals vh); browsers without it keep style.css's 100vh.
   Same specificity as style.css / dashboard.css, so any page rule that was already more specific still wins. */
body:where(:has(.app-container)), .app-container, .main-content { height: 100dvh; }
html.light-mode, html.dark-mode { background-color: var(--sz-bg); color: var(--sz-text); }
:root body {
    font-family: var(--sz-font);
    font-size: 1rem;
    line-height: 1.5;
    background-color: var(--sz-bg);
    color: var(--sz-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01" 0;
    -webkit-tap-highlight-color: transparent;
}
:root body :is(button, input, select, textarea, optgroup) { font-family: inherit; }
:root body :is(h1, h2, h3, h4) {
    font-family: var(--sz-font);
    font-stretch: var(--sz-stretch-head);
    color: var(--sz-text-strong);
    letter-spacing: -0.012em;
    line-height: 1.2;
    text-wrap: balance;
}
:root body h1 { font-weight: 780; }
:root body h2 { font-weight: 740; }
:root body h3 { font-weight: 700; }
:root body h4 { font-weight: 660; }
::selection { background: var(--sz-accent-soft); color: inherit; }
html.dark-mode ::selection { background: rgba(121, 168, 255, .3); }
/* Number columns align digits (tnum); free-text cells and display figures stay proportional
   lining, since Mona Sans tnum swaps in a slashed code zero (see DESIGN.md). Page sheets mark
   their own number cells (.tp-num, .hrm-num, td.num …); Pay Slips' columns 6+ are all money. */
:root body :is(td, th) { font-variant-numeric: lining-nums; }
:root body :is(td.num, .tp-num, .tp-time, .tp-score, .hrm-num, .pss-table td:nth-child(n+6)) { font-variant-numeric: tabular-nums lining-nums; }
:root body ::placeholder { color: var(--sz-text-faint); opacity: 1; }
:root body a { text-underline-offset: .18em; }
:root body :is(code, kbd, samp, pre) { font-family: var(--sz-font-mono); font-size: .92em; }
:root body hr { border: 0; border-top: 1px solid var(--sz-border); }
input, textarea { caret-color: var(--sz-accent); }
/* no double-tap zoom delay on controls; scroll stays inside menus and drawers */
:root body :is(a, button, [role="button"], [role="tab"], input, select, textarea, label, summary) { touch-action: manipulation; }
:root body :is(.dropdown-options, .notification-panel .notification-list, .tl-dd-menu, .user-profile-flyout) { overscroll-behavior: contain; }

/* Scrollbars: thin, theme-aware (the browser defaults belong to no system). The colour is
   !important so page and component sheets can't give one scroller its own bar; once it is set,
   Chromium ignores every ::-webkit-scrollbar rule, so those only reach browsers without it */
* { scrollbar-width: thin; scrollbar-color: var(--sz-scroll-thumb) transparent !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--sz-scroll-thumb); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--sz-scroll-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }
html.dark-mode::-webkit-scrollbar-thumb, html.light-mode::-webkit-scrollbar-thumb { background-color: var(--sz-scroll-thumb); }

/* Keyboard focus (components.css draws the ring; this tunes its colour per theme) */
:root body :is(a[href], button, [role="button"], [role="tab"], summary, .dropdown-button):focus-visible {
    outline-color: var(--sz-accent) !important;
}
html.dark-mode body :is(a[href], button, [role="button"], [role="tab"], summary, .dropdown-button):focus-visible {
    outline-color: var(--sz-accent-text) !important;
}

/* 4. Shell: the cobalt rail --------------------------------------------------- */
:root body .content-area {
    background: var(--sz-bg);
    background-image: none;
    color: var(--sz-text);
}
:root body .sidebar {
    width: 248px;
    background: var(--sz-rail);
    color: var(--sz-rail-text);
    border-right: 1px solid var(--sz-rail-line);
    font-family: var(--sz-font);
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
    transition: width var(--sz-t-3) var(--sz-ease);
}
:root body .sidebar::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .2); }
:root body .sidebar.collapsed { width: 76px; }
html.dark-mode body .sidebar { border-right-color: var(--sz-border); }

/* brand lockup — the Streamlinerz mark is blue, so on the rail it is drawn white */
:root body .sidebar .sidebar-header {
    padding: 18px 16px 14px 18px;
    min-height: 68px;
    color: var(--sz-rail-ink);
    font-family: var(--sz-font);
}
:root body .sidebar .sidebar-header:hover { background: transparent; }
:root body .sidebar .sz-brand { gap: 10px; }
:root body .sidebar .sz-brand__icon,
:root body .sidebar .logo-mark { filter: brightness(0) invert(1); height: 30px; width: auto; }
/* the mark PNG's glyph fills only ~41% of its square: enlarge the glyph inside its own box
   (layout untouched; 41% x 1.6 still fits the box) so every lockup shows a ~20px mark */
:root body .sz-brand__icon { scale: 1.6; }
/* the rail scrolls on most screens (its ~10px scrollbar comes out of the header), so the
   lockup keeps real headroom: give back the PNG's transparent sides and set the name at 17px */
:root body .sidebar .sz-brand__icon { margin-inline: -5px; }
:root body .sidebar .sz-brand__sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .36); }
:root body .sidebar .sz-brand__name,
:root body .sz-brand__name {
    font-family: var(--sz-font);
    font-stretch: 112%;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}
:root body .sidebar .sz-brand__name { font-size: 17px; color: var(--sz-rail-ink); }
:root body .sidebar #toggle-arrow {
    width: 30px; height: 30px; display: grid; place-items: center;
    border-radius: var(--sz-r-ctl); font-size: 13px; color: var(--sz-rail-text);
    transition: background-color var(--sz-t-1) ease, color var(--sz-t-1) ease;
}
@media (hover: hover) and (pointer: fine) {
    :root body .sidebar .sidebar-header:hover #toggle-arrow { background: var(--sz-rail-hover); color: var(--sz-rail-ink); }
}

/* company scope chip */
:root body .sidebar .sidebar-company-scope { padding: 0 12px 12px; }
:root body .sidebar .company-scope-item {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--sz-r-ctl);
    padding: 9px 10px;
    gap: 10px;
    color: var(--sz-rail-ink);
    box-shadow: none;
}
html.dark-mode body .sidebar .company-scope-item { background: rgba(255, 255, 255, .04); border-color: var(--sz-border); }
:root body .sidebar .company-scope-item > i.fa-building {
    width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .14); color: var(--sz-rail-ink); font-size: 13px; margin: 0;
}
html.dark-mode body .sidebar .company-scope-item > i.fa-building { background: var(--sz-accent-soft); color: var(--sz-accent-text); }
:root body .sidebar .scope-label {
    font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
    color: var(--sz-rail-text); opacity: .9;
}
:root body .sidebar .scope-value { font-size: 14px; font-weight: 650; color: var(--sz-rail-ink); }
:root body .sidebar .scope-arrow { color: var(--sz-rail-text); font-size: 11px; }
@media (hover: hover) and (pointer: fine) {
    :root body .sidebar .company-scope-item.clickable:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .24); }
    html.dark-mode body .sidebar .company-scope-item.clickable:hover { background: rgba(255, 255, 255, .07); }
}
:root body .sidebar .company-scope-item.acting-mode { background: var(--sz-draw-soft); border-color: rgba(240, 181, 74, .55); }
:root body .sidebar .company-scope-item.acting-mode::before { display: none; }
:root body .sidebar .company-scope-item.acting-mode > i.fa-building { background: var(--sz-draw-solid); color: #1b1203; }

/* nav */
:root body .sidebar .sidebar-nav { padding: 4px 12px 12px; gap: 2px; display: flex; flex-direction: column; }
:root body .sidebar .sidebar-nav li { margin: 0; }
:root body .sidebar .sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    min-height: 40px; padding: 0 12px; margin: 0;
    border-radius: var(--sz-r-ctl);
    font-size: 14.5px; font-weight: 560; letter-spacing: 0;
    color: var(--sz-rail-text);
    background: transparent;
    border: 0;
    transition: background-color var(--sz-t-1) ease, color var(--sz-t-1) ease;
}
:root body .sidebar .sidebar-nav a i {
    width: 20px; min-width: 20px; margin: 0; font-size: 15px; text-align: center;
    color: inherit; opacity: .92;
}
@media (hover: hover) and (pointer: fine) {
    :root body .sidebar .sidebar-nav a:hover { background: var(--sz-rail-hover); color: var(--sz-rail-ink); }
}
:root body .sidebar .sidebar-nav a.active,
:root body .sidebar .sidebar-nav a[aria-current="page"] {
    background: var(--sz-rail-active-bg);
    color: var(--sz-rail-active-ink);
    font-weight: 680;
    box-shadow: 0 1px 2px rgba(5, 18, 54, .18);
}
:root body .sidebar .sidebar-nav a.active i { opacity: 1; }
/* section labels (same type as the company chip's label); a hairline when the rail is collapsed */
:root body .sidebar .sidebar-nav .sidebar-section {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 12px 6px;
    font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
    color: var(--sz-rail-ink);
}
/* rule running from the label to the rail's edge */
:root body .sidebar .sidebar-nav .sidebar-section::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .2; }
/* collapsed: the label hides and only the rule is left, as a divider between the groups */
:root body .sidebar.collapsed .sidebar-nav .sidebar-section { padding: 0; margin: 10px 6px; }
:root body .sidebar.collapsed .sidebar-nav .sidebar-section::after { height: 2px; border-radius: 1px; opacity: .3; }
:root body .sidebar.collapsed .sidebar-nav { padding-inline: 14px; }
:root body .sidebar.collapsed .sidebar-nav a { justify-content: center; padding: 0; }
/* waiting count on a nav link (Approvals); a dot on the icon when the rail is collapsed */
:root body .sidebar .sidebar-nav a .sidebar-count {
    margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    display: inline-grid; place-items: center; background: var(--sz-accent); color: #fff;
    font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
}
:root body .sidebar .sidebar-nav a .sidebar-count[hidden] { display: none; }
:root body .sidebar .sidebar-nav a.active .sidebar-count { background: rgba(255, 255, 255, .22); }
:root body .sidebar.collapsed .sidebar-nav a { position: relative; }
:root body .sidebar.collapsed .sidebar-nav a .sidebar-count:not([hidden]) {
    position: absolute; top: 5px; inset-inline-end: 5px; min-width: 0; width: 10px; height: 10px; padding: 0; font-size: 0;
    background: var(--sz-loss); box-shadow: 0 0 0 2px #fff;   /* visible on the rail and on the active tile */
}
:root body .sidebar.collapsed .sidebar-header { padding-inline: 0; justify-content: center; }
:root body .sidebar.collapsed .sidebar-company-scope { padding-inline: 14px; }

/* mini calendar + footer */
:root body .sidebar .mini-calendar {
    margin: auto 12px 10px; padding: 12px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--sz-r-panel); color: var(--sz-rail-ink);
}
html.dark-mode body .sidebar .mini-calendar { background: rgba(255, 255, 255, .03); border-color: var(--sz-border); }
:root body .sidebar .mini-calendar-header { font-weight: 680; font-size: 13px; font-stretch: var(--sz-stretch-head); }
:root body .sidebar .mini-calendar-header button { color: var(--sz-rail-text); border-radius: 6px; }
:root body .sidebar .mini-calendar :is(.day-name, .date-cell) { color: var(--sz-rail-text); }
:root body .sidebar .mini-calendar .date-cell.today { background: var(--sz-rail-active-bg); color: var(--sz-rail-active-ink); font-weight: 750; }
:root body .sidebar .sidebar-footer { padding: 8px 12px 14px; border-top: 1px solid var(--sz-rail-line); }
:root body .sidebar .sidebar-logout {
    display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px;
    border-radius: var(--sz-r-ctl); color: var(--sz-rail-text); background: transparent;
    font-size: 14px; font-weight: 560;
}
:root body .sidebar.collapsed .sidebar-logout { justify-content: center; padding: 0; }
@media (hover: hover) and (pointer: fine) {
    :root body .sidebar .sidebar-logout:hover { background: rgba(255, 255, 255, .1); color: var(--sz-rail-ink); }
    html.dark-mode body .sidebar .sidebar-logout:hover { background: var(--sz-loss-soft); color: var(--sz-loss); }
}

/* 5. Page header + header actions --------------------------------------------- */
:root body .page-header { gap: 16px; min-height: 52px; margin-bottom: 12px; }
:root body .page-header h1,
:root body .view-header h1,
:root body .content-area > h1 {
    font-size: var(--sz-fs-2xl);
    font-weight: 790;
    font-stretch: 86%;
    letter-spacing: -0.018em;
    color: var(--sz-text-strong);
    margin: 0;
}
:root body .view-container > .page-header,
:root body .view-container > .tab-nav { background: var(--sz-bg); }
:root body .header-actions { gap: 10px; align-items: center; }
/* The "?" / bell / avatar row: one 40px target each, evenly spaced. */
:root body .header-actions:has(> .notification-bell, > .user-profile) { gap: 14px; }
:root body .header-actions > .user-profile { display: grid; place-items: center; flex: none; }
:root body .notification-bell {
    width: 40px; height: 40px; border-radius: var(--sz-r-ctl);
    display: grid; place-items: center; position: relative;
    color: var(--sz-text-muted); background: transparent;
    transition: background-color var(--sz-t-1) ease, color var(--sz-t-1) ease;
}
:root body .notification-bell i { font-size: 17px; color: inherit; }
@media (hover: hover) and (pointer: fine) {
    :root body .notification-bell:hover { background: var(--sz-surface-3); color: var(--sz-text-strong); }
}
:root body .notification-count-badge:not(:empty):not(.hidden) {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--sz-r-pill);
    background: var(--sz-loss-solid); color: var(--sz-on-accent); font-size: 11px; font-weight: 700;
    line-height: 18px; text-align: center; font-variant-numeric: lining-nums;
    box-shadow: 0 0 0 2px var(--sz-bg);
}
/* on the bell's own corner (legacy right:-10px pushed it out against the avatar) */
:root body .notification-bell .notification-count-badge { top: 2px; right: 2px; }
/* 34px + 3px ring = the 40px box, so the avatar doesn't spill into the gap */
:root body .user-profile .header-profile-picture { top: 3px; left: 3px; }
:root body .user-profile .header-profile-picture,
:root body .user-profile .profile-initials-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    border: 0; background-color: transparent; object-fit: cover;
    box-shadow: 0 0 0 2px var(--sz-surface), 0 0 0 3px var(--sz-border-strong);
}
:root body .profile-initials-avatar { font-weight: 700; font-stretch: var(--sz-stretch-head); letter-spacing: .02em; }
:root body .user-profile-flyout {
    background: var(--sz-surface); color: var(--sz-text);
    border: 1px solid var(--sz-border); border-radius: var(--sz-r-pop);
    box-shadow: var(--sz-shadow-pop);
}
:root body .flyout-name { color: var(--sz-text-strong); font-weight: 680; }
:root body .flyout-id, :root body .flyout-role { color: var(--sz-text-muted); font-variant-numeric: lining-nums; }

/* tutorial "?" button in the header */
:root body :is(.sz-help-btn, .tutorial-help-btn, #sz-help-btn),
html.dark-mode body .sz-help-btn {
    width: 40px; height: 40px; margin: 0; border: 0; border-radius: var(--sz-r-ctl);
    background: transparent; color: var(--sz-accent-text); box-shadow: none; font-size: 17px;
}
@media (hover: hover) and (pointer: fine) {
    :root body .sz-help-btn:hover, html.dark-mode body .sz-help-btn:hover { background: var(--sz-surface-3); color: var(--sz-accent-text); transform: none; border: 0; }
}
:root body .sz-help-btn--floating { background: var(--sz-surface); box-shadow: var(--sz-shadow-1), 0 0 0 1px var(--sz-border); }

/* 6. Tabs ---------------------------------------------------------------------- */
:root body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav) {
    gap: 4px;
    border-bottom: 1px solid var(--sz-border);
    padding: 0;
    margin-bottom: 16px;
    background: transparent;
}
/* One selector shape for every underline tab strip: (0,3,1) base, +.active, +:hover. */
:root body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav) > :is(button, a, .admin-tab-link, .tab-link) {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 0;
    margin: 0 0 -1px;
    padding: 10px 14px 12px;
    min-height: 42px;
    font-family: var(--sz-font);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--sz-text-muted);
    box-shadow: none;
    border-bottom: 2px solid transparent;
    transition: color var(--sz-t-1) ease, border-color var(--sz-t-2) var(--sz-ease);
    white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
    :root body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav) > :is(button, a, .admin-tab-link, .tab-link):hover:not(.active) {
        color: var(--sz-text-strong);
        border-bottom-color: var(--sz-border-strong);
        background: transparent;
    }
}
:root body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav) > :is(button, a, .admin-tab-link, .tab-link):is(.active, [aria-selected="true"]) {
    color: var(--sz-text-strong);
    font-weight: 700;
    border-bottom-color: var(--sz-accent);
    background: transparent;
}
html.dark-mode body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav) > :is(button, a, .admin-tab-link, .tab-link):is(.active, [aria-selected="true"]) {
    border-bottom-color: var(--sz-accent-text);
}
:root body .tab-nav > :is(button, a) i { margin-inline-end: 6px; opacity: .8; }
/* One indicator per strip that slides to the active tab (ui-kit.js places it). */
:root body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav).sz-tabs-slide > :is(button, a, .admin-tab-link, .tab-link):is(.active, [aria-selected="true"]) {
    border-bottom-color: transparent;
}
:root body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav).sz-tabs-slide::after {
    content: ""; position: absolute; left: 0; bottom: 0; z-index: 1;
    /* 100px base, scaled by width/100: a 1px base gets snapped back to a whole pixel under the
       desktop .88 content zoom, which made the line ~14% longer than its tab */
    width: 100px; height: 2px; border-radius: 2px 2px 0 0;
    background: var(--sz-accent); pointer-events: none;
    transform-origin: 0 0;
    transform: translateX(var(--sz-tab-x, 0)) scaleX(var(--sz-tab-w, 0));
}
html.dark-mode body :is(.tab-nav, .admin-tab-nav, .details-tab-nav, .profile-tab-nav).sz-tabs-slide::after { background: var(--sz-accent-text); }
@media (prefers-reduced-motion: no-preference) {
    :root body .sz-tabs-slide.sz-tabs-ready::after { transition: transform var(--sz-t-3) var(--sz-ease); }
}
/* Segmented bar (Dashboard areas). Segments are equal width, so the pill only
   translates by its own width: no measuring, no stretched corners. */
:root body .sz-seg {
    position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    max-width: 100%; margin: 4px 0 10px; padding: 3px;
    background: var(--sz-surface-3); border: 1px solid var(--sz-border); border-radius: var(--sz-r-ctl);
}
:root body .sz-seg::before {
    content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px;
    width: calc((100% - 6px) / var(--seg-n, 1));
    border-radius: calc(var(--sz-r-ctl) - 3px);
    background: var(--sz-surface); box-shadow: var(--sz-shadow-1);
    transform: translateX(calc(100% * var(--seg-i, 0)));
}
html[dir="rtl"] body .sz-seg::before { left: auto; right: 3px; transform: translateX(calc(-100% * var(--seg-i, 0))); }
html.dark-mode body .sz-seg { background: var(--sz-surface-2); }
html.dark-mode body .sz-seg::before { background: var(--sz-surface-3); }
:root body .sz-seg__btn {
    position: relative; z-index: 1; min-width: 0; margin: 0;
    border: 0; border-radius: calc(var(--sz-r-ctl) - 3px); background: transparent; box-shadow: none;
    font-family: var(--sz-font); font-weight: 600; letter-spacing: 0;
    color: var(--sz-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
    transition: color var(--sz-t-1) ease;
}
@media (hover: hover) and (pointer: fine) {
    :root body .sz-seg__btn:hover { color: var(--sz-text-strong); background: transparent; }
}
:root body .sz-seg__btn[aria-selected="true"] { color: var(--sz-text-strong); }
/* unread count on a tab in a closed area */
:root body .sz-seg__btn.has-dot::after {
    content: ""; display: inline-block; vertical-align: 2px; margin-inline-start: 6px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--sz-loss-solid);
}
@media (prefers-reduced-motion: no-preference) {
    :root body .sz-seg.is-ready::before { transition: transform var(--sz-t-3) var(--sz-ease); }
}
/* tabs of the closed areas */
:root body .admin-tab-nav > .admin-tab-link[hidden] { display: none; }
/* inline after the label: dashboard.css pins it absolute at top:-4px, which the scrolling strip clips */
:root body .tab-nav .notification-count-badge:not(.hidden):not(:empty) { position: static; margin-inline-start: 6px; box-shadow: none; }

/* segmented tab strips (Performance hrs-tabs, HR hrm-tabs, Call Logs cl-tabs, raw-data rd-tabs, People pp-tabs) */
:root body :is(.hrs-tabs, .hrm-tabs, .cl-tabs, .rd-tabs, .pp-tabs, .seg, .segmented) {
    background: var(--sz-surface-3);
    border: 0;
    border-radius: calc(var(--sz-r-ctl) + 3px);   /* concentric: segment radius + trough padding */
    padding: 3px;
    gap: 2px;
}
:root body :is(.hrs-tabs, .hrm-tabs, .cl-tabs, .rd-tabs, .pp-tabs) > :is(button, a) {
    border: 0; border-radius: 8px; background: transparent; color: var(--sz-text-muted);
    font-weight: 600; box-shadow: none;
    opacity: 1;   /* hr_management.css / performance.css fade inactive tabs to .62 on top of the muted colour */
    transition: background-color var(--sz-t-1) ease, color var(--sz-t-1) ease;
}
:root body :is(.hrs-tabs, .hrm-tabs, .cl-tabs, .rd-tabs, .pp-tabs) > :is(button, a):hover { opacity: 1; color: var(--sz-text-strong); }
/* ONE size for every segmented tab bar: Dashboard areas (.sz-seg) and the page strips above. Resize them all here. */
:root body :is(.sz-seg__btn, :is(.hrs-tabs, .hrm-tabs, .cl-tabs, .rd-tabs, .pp-tabs) > :is(button, a)) {
    min-height: var(--sz-ctl-h); padding: 10px 20px; font-size: 15px; line-height: 20px;
    white-space: nowrap; flex: 0 0 auto;
}
/* narrow screens: one line that scrolls sideways (as .cl-tabs already did), never wrapped labels.
   flex-shrink: 0 because the overflow lets a tab row in a column flex scroller (Headcount) be squeezed to a sliver. */
@media (max-width: 900px) {
    :root body :is(.hrs-tabs, .hrm-tabs, .cl-tabs, .rd-tabs, .pp-tabs) { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; flex-shrink: 0; }
}
:root body :is(.hrs-tabs, .hrm-tabs, .cl-tabs, .rd-tabs, .pp-tabs) > :is(button, a):is(.active, .is-active, [aria-selected="true"]) {
    background: var(--sz-surface); color: var(--sz-text-strong); box-shadow: var(--sz-shadow-1), 0 0 0 1px var(--sz-border);
}

/* 7. Buttons -------------------------------------------------------------------- */
:root body .btn {
    min-height: var(--sz-ctl-h);
    padding: 0 16px;
    gap: 8px;
    border-radius: var(--sz-r-ctl);
    border: 1px solid transparent;
    font-family: var(--sz-font);
    font-size: 14.5px;
    font-weight: 640;
    letter-spacing: 0;
    line-height: 1.2;
    background: var(--sz-surface);
    color: var(--sz-text);
    border-color: var(--sz-border-strong);
    box-shadow: var(--sz-shadow-1);
    white-space: nowrap;
    text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
    :root body .btn:hover:not(:disabled) { filter: none; background: var(--sz-surface-3); border-color: var(--sz-border-strong); }
}
:root body :is(.btn-primary, .btn.btn-primary, .btn-confirm, .btn-success-primary) {
    background: var(--sz-accent); color: var(--sz-on-accent); border-color: var(--sz-accent);
    box-shadow: 0 1px 2px rgba(11, 16, 32, .18), inset 0 1px 0 rgba(255, 255, 255, .14);
}
@media (hover: hover) and (pointer: fine) {
    :root body :is(.btn-primary, .btn.btn-primary, .btn-confirm):hover:not(:disabled) { background: var(--sz-accent-hover); border-color: var(--sz-accent-hover); color: var(--sz-on-accent); }
}
:root body :is(.btn-primary, .btn-confirm):active:not(:disabled) { background: var(--sz-accent-press); }
:root body :is(.btn-secondary, .btn-cancel, .btn-details, .btn.btn-secondary) {
    background: var(--sz-surface); color: var(--sz-text); border-color: var(--sz-border-strong); box-shadow: var(--sz-shadow-1);
}
html.dark-mode body :is(.btn-secondary, .btn-cancel, .btn-details, .btn.btn-secondary) {
    background: var(--sz-surface-3) !important; color: var(--sz-text) !important; box-shadow: none !important; border-color: var(--sz-border-strong) !important;
}
@media (hover: hover) and (pointer: fine) {
    :root body :is(.btn-secondary, .btn-cancel, .btn-details):hover:not(:disabled) { background: var(--sz-surface-3); color: var(--sz-text-strong); }
    html.dark-mode body :is(.btn-secondary, .btn-cancel, .btn-details):hover:not(:disabled) { background: #2c374b !important; }
}
:root body :is(.btn-danger, .btn.btn-danger) {
    background: var(--sz-loss-solid) !important; color: var(--sz-on-accent) !important; border-color: var(--sz-loss-solid) !important; box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
    :root body :is(.btn-danger, .btn.btn-danger):hover:not(:disabled) { filter: brightness(1.08); }
}
:root body .btn-success { background: var(--sz-win-solid); color: var(--sz-on-accent); border-color: var(--sz-win-solid); }
:root body .btn-outline {
    background: transparent; color: var(--sz-accent-text); border-color: color-mix(in srgb, var(--sz-accent) 55%, transparent); box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
    :root body .btn-outline:hover:not(:disabled) { background: var(--sz-accent-soft); color: var(--sz-accent-text); border-color: var(--sz-accent); }
}
:root body .btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--sz-text-muted); }
@media (hover: hover) and (pointer: fine) {
    :root body .btn-ghost:hover:not(:disabled) { background: var(--sz-surface-3); color: var(--sz-text-strong); border-color: transparent; }
}
:root body .btn-sm { min-height: var(--sz-ctl-h-sm); padding: 0 12px; font-size: 13.5px; }
:root body .btn-lg { min-height: 48px; padding: 0 22px; font-size: 15.5px; }
:root body :is(.btn, .btn-primary, .btn-secondary, .btn-danger):disabled,
:root body .btn[aria-disabled="true"] { opacity: .5; box-shadow: none; filter: none; cursor: not-allowed; }
:root body .btn > i { font-size: .95em; }

/* page-family buttons: same vocabulary */
:root body :is(.lc-btn, .cl-btn, .tl-btn, .mt-btn, .cem-btn, .pss-btn, .pss-tb-btn, .ct-btn-sec, .round-btn, .view-toggle-btn, .clf-preset) {
    font-family: var(--sz-font);
    border-radius: var(--sz-r-ctl);
    font-weight: 620;
    letter-spacing: 0;
}
:root body :is(.tl-btn, .ct-btn-pri, #open-create-task, #need-help-btn) {
    font-family: var(--sz-font); border-radius: var(--sz-r-ctl); font-weight: 640;
}

/* 8. Fields -------------------------------------------------------------------- */
:root body .main-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]), select, textarea),
:root body :is(.popup-content, .modal, .modal-content, .pa-modal, .cem-box, .modal-inner) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]), select, textarea) {
    font-family: var(--sz-font);
    background-color: var(--sz-surface);
    color: var(--sz-text);
    border: 1px solid var(--sz-border-strong);
    border-radius: var(--sz-r-ctl);
    min-height: var(--sz-ctl-h-sm);
    box-shadow: none;
}
html.dark-mode body .main-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]), select, textarea),
html.dark-mode body :is(.popup-content, .modal, .modal-content, .pa-modal, .cem-box, .modal-inner) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
    background-color: var(--sz-surface-2) !important;
    color: var(--sz-text) !important;
    border-color: var(--sz-border-strong) !important;
}
:root body .main-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):hover:not(:focus):not(:disabled) { border-color: var(--sz-text-faint); }
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus-visible,
:root body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus {
    outline: none;
    border-color: var(--sz-accent) !important;
    box-shadow: 0 0 0 3px var(--sz-accent-ring) !important;
}
:root body :is(input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
/* number fields without the browser's spinner arrows (typing and the arrow keys still work) */
:root body input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
:root body input[type="number"]::-webkit-inner-spin-button,
:root body input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
:root body .main-content select:not([multiple]) {
    appearance: none; -webkit-appearance: none;
    padding-inline-end: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23646d80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
html[dir="rtl"] body .main-content select:not([multiple]) { background-position: left 12px center; }
:root body label { color: inherit; }
:root body :is(.form-group, .tl-field, .field) > label {
    font-size: 13px; font-weight: 640; color: var(--sz-text-muted); letter-spacing: .01em;
}
:root body input[type="checkbox"], :root body input[type="radio"] { accent-color: var(--sz-accent); }
/* a small box is identified by its edge alone: keep that edge at 3:1 (WCAG 1.4.11) */
:root body input[type="checkbox"]:not(:checked):not(:indeterminate) { border-color: var(--sz-text-faint); }
:root body input[type="checkbox"]:not(:checked):not(:indeterminate):hover { border-color: var(--sz-accent); }
/* The app's own checkbox and radio (copied from style.css, which some pages, like Register Employee
   and the signup form, do not load): a filled accent box with a white tick, never the browser default.
   Never sets display/opacity, so widgets that hide their native input keep working. Zero specificity (:where), so any page's own checkbox rule still wins. */
:where(input[type="checkbox"]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0 7px 0 0;
    border: 1.5px solid var(--border-grey, #7a869a);
    border-radius: 5px;
    background-color: rgba(127, 127, 127, 0.10);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    flex: 0 0 auto;
    transition: background-color .15s ease, border-color .15s ease;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
:where(input[type="checkbox"]:hover) { border-color: var(--primary, var(--sz-accent)); }
:where(input[type="checkbox"]:focus-visible) { outline: 2px solid rgba(29, 104, 229, .45); outline-offset: 1px; }
:where(input[type="checkbox"]:checked) {
    background-color: var(--primary, var(--sz-accent));
    border-color: var(--primary, var(--sz-accent));
}
:where(input[type="checkbox"]:checked)::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 4px;
    height: 9px;
    border: solid var(--sz-on-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    box-sizing: content-box;
}
:where(input[type="checkbox"]:indeterminate) {
    background-color: var(--primary, var(--sz-accent));
    border-color: var(--primary, var(--sz-accent));
}
:where(input[type="checkbox"]:indeterminate)::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    width: 10px;
    height: 2px;
    background: var(--sz-on-accent);
}
:where(input[type="checkbox"]:disabled) { opacity: .5; cursor: not-allowed; }
/* Widgets that render their own control keep hiding the native input. */
:where(.toggle-switch input[type="checkbox"]),
:where(.agent-chip input[type="checkbox"]) { display: none; }

/* Custom radio buttons (circular) — same treatment, site-wide. */
:where(input[type="radio"]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0 7px 0 0;
    border: 1.5px solid var(--border-grey, #7a869a);
    border-radius: 50%;
    background-color: rgba(127, 127, 127, 0.10);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    flex: 0 0 auto;
    transition: border-color .15s ease;
}
:where(input[type="radio"]:hover) { border-color: var(--primary, var(--sz-accent)); }
:where(input[type="radio"]:focus-visible) { outline: 2px solid rgba(29, 104, 229, .45); outline-offset: 1px; }
:where(input[type="radio"]:checked) { border-color: var(--primary, var(--sz-accent)); }
:where(input[type="radio"]:checked)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary, var(--sz-accent));
}
:where(input[type="radio"]:disabled) { opacity: .5; cursor: not-allowed; }

/* toggle switch */
:root body .slider { background-color: var(--sz-border-strong); }
:root body input:checked + .slider { background-color: var(--sz-accent); }
:root body .slider::before { background-color: var(--sz-on-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }

/* 9. Dropdowns (custom-dropdown, sz-dd, tl-dd) ------------------------------- */
:root body .custom-dropdown .dropdown-button,
:root body .sz-dd .dropdown-button,
:root body .dropdown-button {
    height: var(--sz-ctl-h);
    padding: 0 12px;
    font-family: var(--sz-font);
    font-size: 14.5px;
    font-weight: 560;
    background-color: var(--sz-surface);
    color: var(--sz-text);
    border: 1px solid var(--sz-border-strong);
    border-radius: var(--sz-r-ctl);
    box-shadow: var(--sz-shadow-1);
    gap: 8px;
    transition: border-color var(--sz-t-1) ease, box-shadow var(--sz-t-1) ease, background-color var(--sz-t-1) ease;
}
html.dark-mode body :is(.custom-dropdown, .sz-dd) .dropdown-button,
html.dark-mode body .dropdown-button {
    background-color: var(--sz-surface-2);
    color: var(--sz-text);
    border-color: var(--sz-border-strong);
    box-shadow: none;
}
:root body .sz-dd .dropdown-button { font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
    :root body .dropdown-button:hover { border-color: var(--sz-text-faint); }
}
:root body .dropdown-button[aria-expanded="true"],
:root body .dropdown-button:focus-visible {
    border-color: var(--sz-accent);
    box-shadow: 0 0 0 3px var(--sz-accent-ring);
    outline: none !important;
}
:root body .dropdown-button .caret,
:root body .dropdown-button .fa-chevron-down {
    color: var(--sz-text-muted);
    opacity: 1;
    font-size: 11px;
    transition: transform var(--sz-t-2) var(--sz-ease);
}
:root body .dropdown-options,
:root body .custom-dropdown .dropdown-options,
:root body .sz-dd .dropdown-options {
    background-color: var(--sz-surface);
    border: 1px solid var(--sz-border);
    border-radius: var(--sz-r-pop);
    box-shadow: var(--sz-shadow-pop);
    padding: 4px;
    margin-top: 6px;
}
html.dark-mode body .custom-dropdown .dropdown-options,
html.dark-mode body .dropdown-options { background-color: var(--sz-surface); border-color: var(--sz-border-strong); }
:root body .dropdown-options li,
html.dark-mode body .custom-dropdown .dropdown-options li {
    color: var(--sz-text);
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color var(--sz-t-1) ease;
}
:root body .dropdown-options li:hover,
html.dark-mode body .custom-dropdown .dropdown-options li:hover {
    background-color: var(--sz-surface-3);
    color: var(--sz-text-strong);
}
:root body .dropdown-options li[aria-selected="true"] {
    background-color: var(--sz-accent-soft);
    color: var(--sz-accent-text);
    font-weight: 650;
}
:root body .dropdown-options::-webkit-scrollbar-thumb { background: var(--sz-scroll-thumb); }

/* 9a. Shared Select (assets/js/dropdown_enhance.js) -------------------------------------
   The <select> stays in the layout, invisible, underneath its button, so the control is
   exactly as wide and tall as the field the page designed; the button covers it. */
:root body .sz-dd {
    position: relative; box-sizing: border-box;
    display: inline-grid; grid-template-columns: minmax(0, 1fr);
    vertical-align: middle; max-width: 100%; min-width: 0;
}
:root body .sz-dd.sz-dd--block { display: grid; }
:root body .sz-dd[hidden] { display: none !important; }
:root body .sz-dd > * { grid-area: 1 / 1; min-width: 0; }
:root body .sz-dd > select.sz-dd-native {
    opacity: 0 !important; pointer-events: none !important; margin: 0 !important;
    box-shadow: none !important; transition: none !important;
}
:root body .sz-dd > .dropdown-button {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
    width: 100%; height: auto; min-height: 32px; margin: 0; text-align: start; cursor: pointer;
    line-height: 1.25; -webkit-tap-highlight-color: transparent;
}
:root body .sz-dd .dropdown-button .label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .sz-dd .dropdown-button .label.is-placeholder { color: var(--sz-text-faint); font-weight: 500; }
:root body .sz-dd .dropdown-button .caret { flex: 0 0 auto; margin-inline-start: 8px; }
:root body .sz-dd.open .dropdown-button .caret { transform: rotate(180deg); }
:root body .sz-dd .dropdown-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
:root body .sz-dd:has(> select.sz-dd-native:focus) > .dropdown-button { border-color: var(--sz-accent); box-shadow: 0 0 0 3px var(--sz-accent-ring); }
:root body .sz-dd.is-invalid > .dropdown-button,
:root body .sz-dd:has(> select.sz-dd-native[aria-invalid="true"]) > .dropdown-button {
    border-color: var(--sz-loss); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sz-loss) 22%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
    :root body .sz-dd > .dropdown-button { transition: border-color var(--sz-t-1) ease, box-shadow var(--sz-t-1) ease, background-color var(--sz-t-1) ease, transform 120ms var(--sz-ease); }
    :root body .sz-dd > .dropdown-button:active:not(:disabled) { transform: scale(.985); }
}

/* the open menu: a layer on <body>, placed against the button by the script, so a card,
   a scrolling table or a dialog never clips it. Sizes in em follow the trigger's zoom. */
.sz-dd-menu {
    position: fixed; top: 0; left: 0; z-index: 2147483000;
    box-sizing: border-box; display: flex; flex-direction: column;
    min-width: 10em; padding: .3em; overflow: hidden;
    font-family: var(--sz-font); font-size: 14px; line-height: 1.35; text-align: start;
    background: var(--sz-surface); color: var(--sz-text);
    border: 1px solid var(--sz-border); border-radius: var(--sz-r-pop);
    box-shadow: var(--sz-shadow-pop);
    opacity: 0; transform: translateY(-4px) scale(.985); transform-origin: top center;
}
.sz-dd-menu.is-up { transform: translateY(4px) scale(.985); transform-origin: bottom center; }
.sz-dd-menu.is-in { opacity: 1; transform: none; }
.sz-dd-menu[hidden] { display: none; }
html.dark-mode .sz-dd-menu { border-color: var(--sz-border-strong); }
@media (prefers-reduced-motion: no-preference) {
    .sz-dd-menu { transition: opacity 140ms var(--sz-ease), transform 160ms var(--sz-ease); }
}
.sz-dd-menu .sz-dd-searchbox { flex: 0 0 auto; padding: .15em .15em .45em; margin-bottom: .3em; border-bottom: 1px solid var(--sz-border); }
.sz-dd-menu .sz-dd-search {
    box-sizing: border-box; width: 100%; height: 2.45em; margin: 0; padding: 0 .75em 0 2.25em;
    font: inherit; color: var(--sz-text);
    background: var(--sz-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23646d80' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat .8em center / 1em;
    border: 1px solid var(--sz-border-strong); border-radius: var(--sz-r-ctl); box-shadow: none; outline: none;
}
html.dark-mode .sz-dd-menu .sz-dd-search { background-color: var(--sz-surface-2); }
html[dir="rtl"] .sz-dd-menu .sz-dd-search { padding: 0 2.25em 0 .75em; background-position: right .8em center; }
.sz-dd-menu .sz-dd-search:focus { border-color: var(--sz-accent); box-shadow: 0 0 0 3px var(--sz-accent-ring); }
.sz-dd-menu .sz-dd-search::placeholder { color: var(--sz-text-faint); }
.sz-dd-menu .sz-dd-list {
    flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.sz-dd-menu .sz-dd-list::-webkit-scrollbar { width: 8px; }
.sz-dd-menu .sz-dd-list::-webkit-scrollbar-thumb { background: var(--sz-scroll-thumb); border-radius: 8px; }
.sz-dd-menu .sz-dd-opt {
    position: relative; display: flex; align-items: center;
    min-height: 2.3em; margin: 0; padding: .42em .75em .42em 2.05em;
    border-radius: 7px; cursor: pointer; color: var(--sz-text); font-weight: 500;
    overflow-wrap: anywhere; user-select: none;
}
html[dir="rtl"] .sz-dd-menu .sz-dd-opt { padding: .42em 2.05em .42em .75em; }
.sz-dd-menu .sz-dd-opt.is-grouped { padding-inline-start: 2.6em; }
.sz-dd-menu .sz-dd-opt.is-active { background: var(--sz-surface-3); color: var(--sz-text-strong); }
.sz-dd-menu .sz-dd-opt[aria-selected="true"] { background: var(--sz-accent-soft); color: var(--sz-accent-text); font-weight: 650; }
.sz-dd-menu .sz-dd-opt[aria-selected="true"].is-active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sz-accent) 45%, transparent); }
/* the tick marks the current value */
.sz-dd-menu .sz-dd-opt[aria-selected="true"]::before {
    content: ""; position: absolute; inset-inline-start: .8em; top: 50%;
    width: .55em; height: .3em; margin-top: -.25em;
    border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}
html[dir="rtl"] .sz-dd-menu .sz-dd-opt[aria-selected="true"]::before { transform: rotate(45deg) scaleX(-1); }
.sz-dd-menu .sz-dd-opt[aria-disabled="true"] { color: var(--sz-text-faint); cursor: not-allowed; background: none; }
.sz-dd-menu .sz-dd-group {
    margin: .35em 0 .1em; padding: .4em .75em .2em;
    font-size: .76em; font-weight: 720; letter-spacing: .07em; text-transform: uppercase; color: var(--sz-text-muted);
}
.sz-dd-menu .sz-dd-group:first-child { margin-top: 0; }
.sz-dd-menu .sz-dd-empty { padding: .8em .75em; color: var(--sz-text-muted); font-size: .93em; }
.sz-dd-menu [hidden] { display: none !important; }
@media (pointer: coarse) {
    .sz-dd-menu .sz-dd-opt { min-height: 44px; }
    .sz-dd-menu .sz-dd-search { height: 44px; font-size: max(16px, 1em); }
}

/* tooltips (assets/js/ui-kit.js): every [title] shows this instead of the OS box */
.sz-tip {
    position: fixed; top: 0; left: 0; z-index: 2147483001; box-sizing: border-box;
    max-width: min(300px, calc(100vw - 12px)); padding: 6px 9px; border-radius: 7px;
    background: var(--sz-ink); color: var(--sz-on-ink);
    font: 560 12.5px/1.35 var(--sz-font); letter-spacing: .005em; text-align: start;
    white-space: pre-line; overflow-wrap: anywhere; pointer-events: none;
    box-shadow: 0 8px 20px -6px rgba(10, 14, 22, .35);
    opacity: 0; transform: translateY(3px);
}
.sz-tip.is-below { transform: translateY(-3px); }
.sz-tip.is-in { opacity: 1; transform: none; }
.sz-tip[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
    .sz-tip { transition: opacity 120ms ease, transform 160ms var(--sz-ease); }
}

/* <select multiple> in the shared Select: a field-height button, the options as checkboxes */
:root body .sz-dd--multi > select.sz-dd-native { height: var(--sz-ctl-h) !important; min-height: 0 !important; }
html .sz-dd-menu.sz-dd-menu--multi .sz-dd-opt[aria-selected] { background: none; color: var(--sz-text); font-weight: 500; box-shadow: none; }
html .sz-dd-menu.sz-dd-menu--multi .sz-dd-opt.is-active[aria-selected] { background: var(--sz-surface-3); color: var(--sz-text-strong); }
html .sz-dd-menu.sz-dd-menu--multi .sz-dd-opt[aria-selected]::before {
    content: ""; position: absolute; inset-inline-start: .75em; top: 50%;
    width: 1em; height: 1em; margin-top: -.5em; box-sizing: border-box; transform: none;
    border: 1.5px solid var(--sz-text-faint); border-radius: 4px; background: var(--sz-surface);
}
html .sz-dd-menu.sz-dd-menu--multi .sz-dd-opt[aria-selected="true"]::before {
    border-color: var(--sz-accent);
    background: var(--sz-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6 9.6 3.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / .75em no-repeat;
}

/* single-choice list boxes (size > 1) stay native, drawn as a field */
:root body select:is([multiple], [size]:not([size="1"])) {
    appearance: none; -webkit-appearance: none; background-image: none;
    padding: 4px; border: 1px solid var(--sz-border-strong); border-radius: var(--sz-r-ctl);
    background-color: var(--sz-surface); color: var(--sz-text); font-family: var(--sz-font); font-size: 14px;
    scrollbar-width: thin;
}
html.dark-mode body select:is([multiple], [size]:not([size="1"])) { background-color: var(--sz-surface-2); }
:root body select:is([multiple], [size]:not([size="1"])) option { padding: 6px 9px; border-radius: 6px; color: var(--sz-text); }
:root body select:is([multiple], [size]:not([size="1"])) option:checked {
    background: var(--sz-accent-soft) linear-gradient(var(--sz-accent-soft), var(--sz-accent-soft)); color: var(--sz-accent-text); font-weight: 650;
}
:root body select:is([multiple], [size]:not([size="1"])):focus option:checked { background: var(--sz-accent) linear-gradient(var(--sz-accent), var(--sz-accent)); color: var(--sz-on-accent); }
/* any select that is still native (opted out, or before the script runs): the open list
   follows the theme instead of a white OS menu */
html.dark-mode select { color-scheme: dark; }

/* input-styled tl-dd */
:root body .tl-dd-trigger, :root body .tl-dd > button {
    background: var(--sz-surface); border: 1px solid var(--sz-border-strong); border-radius: var(--sz-r-ctl); color: var(--sz-text);
}
:root body .tl-dd-menu {
    background: var(--sz-surface); border: 1px solid var(--sz-border); border-radius: var(--sz-r-pop); box-shadow: var(--sz-shadow-pop);
}

/* 9b. One menu for every dropdown family -------------------------------------------------
   Page-owned dropdowns (.custom-dropdown lists on Tasks / Performance, the team-leader
   picker .tl-dd, the Lead Checker client picker .lc-dd, Register's .custom-select) keep
   their own scripts, but open into the same menu as the shared Select (.sz-dd-menu):
   one panel, one row height, the current value tinted and ticked. */
:root body :is(.dropdown-options, .lc-dd-list, .tl-dd-menu, .cs-panel, .ct-dd-panel) {
    background: var(--sz-surface); border: 1px solid var(--sz-border); border-radius: var(--sz-r-pop);
    box-shadow: var(--sz-shadow-pop); padding: 4px;
}
html.dark-mode body :is(.dropdown-options, .lc-dd-list, .tl-dd-menu, .cs-panel, .ct-dd-panel) { border-color: var(--sz-border-strong); }
:root body .tl-dd-menu { padding: 0; }
:root body .tl-dd-search { border-bottom-color: var(--sz-border); }
:root body :is(.dropdown-options li, .lc-dd-list li, .tl-dd-opt, .cs-option, .ct-dd-opt) {
    position: relative; min-height: 34px; padding: 7px 10px 7px 29px; border-radius: 7px;
    font-family: var(--sz-font); font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--sz-text);
    display: flex; align-items: center; text-align: start;
}
html[dir="rtl"] body :is(.dropdown-options li, .lc-dd-list li, .tl-dd-opt, .cs-option, .ct-dd-opt) { padding: 7px 29px 7px 10px; }
@media (hover: hover) and (pointer: fine) {
    :root body :is(.dropdown-options li, .lc-dd-list li:not(.lc-dd-empty), .tl-dd-opt, .cs-option, .ct-dd-opt:not(.ct-dd-extra)):hover { background: var(--sz-surface-3); color: var(--sz-text-strong); }
}
:root body :is(.dropdown-options li[aria-selected="true"], .lc-dd-list li.sel, .tl-dd-opt.sel, .cs-option.selected, .ct-dd-opt.sel),
:root body :is(.dropdown-options li[aria-selected="true"], .lc-dd-list li.sel, .tl-dd-opt.sel, .cs-option.selected, .ct-dd-opt.sel):hover {
    background: var(--sz-accent-soft); color: var(--sz-accent-text); font-weight: 650;
}
:root body :is(.dropdown-options li[aria-selected="true"], .lc-dd-list li.sel, .tl-dd-opt.sel, .cs-option.selected, .ct-dd-opt.sel)::before {
    content: ""; position: absolute; inset-inline-start: 11px; top: 50%;
    width: 7px; height: 4px; margin-top: -4px;
    border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}
html[dir="rtl"] body :is(.dropdown-options li[aria-selected="true"], .lc-dd-list li.sel, .tl-dd-opt.sel, .cs-option.selected, .ct-dd-opt.sel)::before { transform: rotate(45deg) scaleX(-1); }
:root body .cs-option.selected::after { content: none; }
:root body .ct-dd-opt.ct-dd-extra { margin-top: 4px; border-top: 1px solid var(--sz-border); border-radius: 0 0 7px 7px; color: var(--sz-accent-text); font-weight: 650; }
/* Register keeps its real <select> as a 1px field under the trigger; the global
   ":disabled { opacity: .6 }" rule was un-hiding it as a dot while Role is locked */
:root body .custom-select .cs-native { opacity: 0 !important; }
:root body :is(.lc-dd-list li.lc-dd-empty, .tl-dd-empty, .cs-empty, .ct-dd-empty) { padding: 12px 10px; color: var(--sz-text-muted); font-size: 13.5px; }
@media (pointer: coarse) { :root body :is(.dropdown-options li, .lc-dd-list li, .tl-dd-opt, .cs-option, .ct-dd-opt) { min-height: 44px; } }

/* 10. Panels -------------------------------------------------------------------- */
/* Panels: surface + one hairline, no shadow (elevation is reserved for things that float). */
:root body .card {
    background: var(--sz-surface);
    border: 1px solid var(--sz-border);
    border-radius: var(--sz-r-panel);
    box-shadow: none;
    color: var(--sz-text);
}
html.dark-mode body .card { background: var(--sz-surface); border-color: var(--sz-border); box-shadow: none; }
:root body .card :is(h2, h3) { font-size: var(--sz-fs-lg); font-weight: 720; }

/* 11. Tables ---------------------------------------------------------------------
   One table system. Every data-table family shares the frame, the header band, the hairlines,
   the hover and the figure alignment. Standard tables (first list) also share the row rhythm;
   dense grids (second list: call logs, team roster, HR sheets, Team Performance) keep their
   own row height and column widths. The Lead Checker and Pay Slips are spreadsheets with
   their own rules (steamify-pages.css).
   Helpers any table can use: .num (right-aligned figures), .cell-main / .cell-sub (a strong
   first line and a muted second line), .col-actions (a right-aligned action cell). */
:root body :is(.table-scroll, .tl-table-wrap, .table-wrap, .sz-table-wrap, .cb-scroll) {
    border: 1px solid var(--sz-border);
    border-radius: var(--sz-r-panel);
    background: var(--sz-surface);
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .pss-xh-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table,
               .cl-table, .mt-table, .hrm-table, .hrs-table, .tp-table) {
    border-collapse: separate; border-spacing: 0;
    color: var(--sz-text); font-variant-numeric: lining-nums;
}
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table) {
    width: 100%; background: var(--sz-surface); font-size: 14px; line-height: 1.4;
}
/* the header band */
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .pss-xh-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table,
               .cl-table, .mt-table, .hrm-table, .hrs-table, .tp-table) thead th,
:root body :is(.data-table, .tl-table, .admin-table) > tr:first-child > th {
    background-color: var(--sz-surface-2);
    color: var(--sz-text-muted);
    font-family: var(--sz-font);
    font-size: 11.5px;
    font-weight: 680;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.3;
    border-bottom: 1px solid var(--sz-border);
    white-space: nowrap;
    vertical-align: middle;
}
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table) thead th,
:root body :is(.data-table, .tl-table, .admin-table) > tr:first-child > th { padding: 10px 14px; text-align: start; }
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table) td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--sz-border);
    color: var(--sz-text);
    vertical-align: middle;
}
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table) tbody tr:last-child td { border-bottom: 0; }
/* hover: a tint layered over each cell's own (possibly sticky, opaque) background */
@media (hover: hover) and (pointer: fine) {
    :root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table,
                   .cl-table, .mt-table, .hrm-table, .hrs-table, .tp-table) tbody tr:hover > td {
        background-image: linear-gradient(var(--sz-accent-tint), var(--sz-accent-tint));
    }
}
/* a row that only says "Loading…", "No … yet" or an error is a state, not data */
:root body :is(.data-table, .tl-table, .admin-table, .sec-table, .cp-table, .bl-table, .cb-table, .cb-ptable, .pss-pr-table, .clf-mini-table, .task-stats-table, .pl-table, .sz-table) td[colspan]:only-child {
    padding: 28px 16px; text-align: center; color: var(--sz-text-muted); font-size: 14px;
}
@media (hover: hover) and (pointer: fine) {
    :root body table tbody tr:hover > td[colspan]:only-child { background-image: none; }
}
/* helpers */
:root body :is(th, td).num { text-align: end; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
:root body table thead th:is(.num, .col-actions) { text-align: end; }
:root body :is(th, td).col-actions { text-align: end; white-space: nowrap; width: 1%; }
:root body .cell-main { display: block; color: var(--sz-text-strong); font-weight: 650; }
:root body .cell-sub { display: block; margin-top: 2px; color: var(--sz-text-muted); font-size: 12.5px; font-weight: 500; line-height: 1.35; }
:root body .cell-muted { color: var(--sz-text-faint); }

/* .sz-stack: on phones a record-style table becomes one card per row, each value under the
   column's own name (ui-kit.js copies the header text onto each cell as data-label).
   Sheets (Lead Checker, Pay Slips, HR) are not marked: they stay sideways-scrolling grids. */
@media (max-width: 600px) {
    :root body table.sz-stack { min-width: 0 !important; width: 100% !important; }
    :root body table.sz-stack thead { display: none; }
    :root body table.sz-stack :is(tbody, tbody tr) { display: block; }
    :root body table.sz-stack tbody tr { padding: 12px 14px 10px; border-bottom: 1px solid var(--sz-border); }
    :root body table.sz-stack tbody tr:last-child { border-bottom: 0; }
    /* the column name sits in a left gutter; the value flows normally beside it, whatever it holds */
    :root body table.sz-stack tbody td {
        display: block; position: relative !important; left: auto !important;
        width: auto !important; max-width: none !important; min-width: 0 !important;
        padding: 4px 0 4px calc(min(36%, 150px) + 12px) !important; border: 0 !important; background: none !important; box-shadow: none !important;
        text-align: start !important; white-space: normal !important; overflow-wrap: anywhere; min-height: 28px;
    }
    :root body table.sz-stack tbody td::before {
        content: attr(data-label); position: absolute; left: 0; top: 5px; width: min(36%, 150px);
        color: var(--sz-text-muted); font-size: 12.5px; font-weight: 650; letter-spacing: 0; text-transform: none; line-height: 1.35;
    }
    /* the first column names the record: full width, strong, no label */
    :root body table.sz-stack tbody td:first-child { padding: 0 0 6px !important; color: var(--sz-text-strong); font-weight: 680; }
    :root body table.sz-stack tbody td:first-child::before { content: none; }
    /* cells without a column name (actions) take the full width */
    :root body table.sz-stack tbody td:is(:not([data-label]), [data-label=""]) { padding: 8px 0 2px !important; }
    :root body table.sz-stack tbody td:is(:not([data-label]), [data-label=""])::before { content: none; }
    :root body table.sz-stack tbody td.col-actions .sz-row-actions { justify-content: flex-start; flex-wrap: wrap; }
    /* a state row ("Loading…", "No … yet") stays a centred line */
    :root body table.sz-stack tbody td[colspan]:only-child { display: block; padding: 20px 0 !important; text-align: center !important; color: var(--sz-text-muted); font-weight: 500; }
    :root body table.sz-stack tbody td[colspan]:only-child::before { content: none; }
    :root body table.sz-stack tfoot { display: none; }
}

/* status chips for any table: .sz-chip + a tone */
:root body .sz-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
    border-radius: var(--sz-r-pill); white-space: nowrap;
    font-size: 12px; font-weight: 680; letter-spacing: .01em;
    background: var(--sz-surface-3); color: var(--sz-text);
}
:root body .sz-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
:root body .sz-chip.is-plain::before { content: none; }
:root body .sz-chip--win { background: var(--sz-win-soft); color: var(--sz-win); }
:root body .sz-chip--loss { background: var(--sz-loss-soft); color: var(--sz-loss); }
:root body .sz-chip--draw { background: var(--sz-draw-soft); color: var(--sz-draw); }
:root body .sz-chip--accent { background: var(--sz-accent-soft); color: var(--sz-accent-text); }
:root body .sz-chip--muted { background: var(--sz-surface-3); color: var(--sz-text-muted); }

/* employment status pill (Active / Inactive / Notice) — the Headcount colours; solid so it
   never reads as a soft record chip. Used on Headcount, HR / Management, the profile and
   the header profile flyout. */
:root body .hrr-status { display: inline-block; padding: 2px 10px; border-radius: var(--sz-r-pill); color: #fff; font-weight: 600; font-size: .76rem; line-height: 1.5; background: #3a434d; }
:root body .hrr-status.hrr-st-active   { background: #1f7a3d; }
:root body .hrr-status.hrr-st-inactive { background: #7a2f2f; }
:root body .hrr-status.hrr-st-notice   { background: #b4632a; }
:root body .flyout-role .hrr-status { margin-left: 8px; padding: 0 8px; font-size: 11px; vertical-align: 1px; text-transform: none; letter-spacing: 0; }

/* row actions: a few visible buttons, the rest in a "more" menu (ui-kit.js) */
:root body .sz-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
:root body .sz-row-actions .btn { margin: 0; }
:root body .sz-more-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: 0;
    border: 1px solid var(--sz-border-strong); border-radius: var(--sz-r-ctl);
    background: var(--sz-surface); color: var(--sz-text-muted); cursor: pointer; font-size: 14px;
}
html.dark-mode body .sz-more-btn { background: var(--sz-surface-2); }
@media (hover: hover) and (pointer: fine) { :root body .sz-more-btn:hover { color: var(--sz-text-strong); border-color: var(--sz-text-faint); } }
:root body .sz-more-btn[aria-expanded="true"], :root body .sz-more-btn:focus-visible { border-color: var(--sz-accent); box-shadow: 0 0 0 3px var(--sz-accent-ring); color: var(--sz-text-strong); outline: none; }
:root body .sz-more-list[hidden] { display: none !important; }
/* the open "more" menu shares the dropdown menu's panel */
.sz-menu { min-width: 13em; }
.sz-menu .sz-menu-item {
    display: flex; align-items: center; gap: .65em; width: 100%; min-height: 2.35em; margin: 0; padding: .45em .8em;
    border: 0; border-radius: 7px; background: none; color: var(--sz-text);
    font: inherit; font-weight: 560; text-align: start; cursor: pointer; white-space: nowrap;
}
.sz-menu .sz-menu-item i { width: 1.1em; color: var(--sz-text-muted); text-align: center; flex: 0 0 auto; }
.sz-menu .sz-menu-item:is(:hover, :focus-visible) { background: var(--sz-surface-3); color: var(--sz-text-strong); outline: none; }
.sz-menu .sz-menu-item.is-danger, .sz-menu .sz-menu-item.is-danger i { color: var(--sz-loss); }
.sz-menu .sz-menu-item.is-danger:is(:hover, :focus-visible) { background: var(--sz-loss-soft); }
.sz-menu .sz-menu-item:disabled { opacity: .45; cursor: not-allowed; }
.sz-menu .sz-menu-sep { height: 1px; margin: .3em .2em; border: 0; background: var(--sz-border); }
.sz-menu .sz-menu-note { margin-inline-start: auto; padding-inline-start: 1em; color: var(--sz-text-faint); font-size: .85em; font-weight: 500; }
@media (pointer: coarse) { .sz-menu .sz-menu-item { min-height: 44px; } }

/* confirmation dialog (SZUI.confirm) */
.sz-confirm-overlay {
    position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; padding: 16px;
    background: var(--sz-scrim, rgba(6, 10, 20, .55));
}
.sz-confirm {
    width: min(440px, 100%); padding: 22px 22px 18px; box-sizing: border-box;
    background: var(--sz-surface); color: var(--sz-text); border: 1px solid var(--sz-border);
    border-radius: var(--sz-r-pop); box-shadow: var(--sz-shadow-modal, var(--sz-shadow-pop)); font-family: var(--sz-font);
}
html.dark-mode .sz-confirm { border-color: var(--sz-border-strong); }
.sz-confirm h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--sz-text-strong); font-size: 17px; font-weight: 760; line-height: 1.3; }
.sz-confirm h2 i { color: var(--sz-accent-text); }
.sz-confirm.is-danger h2 i { color: var(--sz-loss); }
.sz-confirm p { margin: 0; color: var(--sz-text-muted); font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.sz-confirm-input { display: block; width: 100%; box-sizing: border-box; margin-top: 14px; height: 40px; padding: 0 12px; font: inherit; font-size: 15px;
    color: var(--sz-text); background: var(--sz-surface); border: 1px solid var(--sz-border-strong); border-radius: 8px; }
.sz-confirm-input:focus-visible { outline: none; border-color: var(--sz-accent); box-shadow: 0 0 0 3px var(--sz-accent-ring, rgba(37, 99, 235, .25)); }
.sz-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.sz-confirm-actions .btn { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
    .sz-confirm-overlay { animation: sz-fade-in 160ms ease-out; }
    .sz-confirm { animation: sz-rise 200ms var(--sz-ease) both; }
}
@media (max-width: 480px) { .sz-confirm-actions .btn { flex: 1 1 0; justify-content: center; } }

/* 12. Chips & status --------------------------------------------------------------- */
:root body :is(.status-tag, .tl-badge, .badge) {
    border-radius: var(--sz-r-pill);
    font-weight: 650;
    font-size: 12px;
    letter-spacing: .01em;
    padding: 2px 9px;
}
:root body .tl-badge { background: var(--sz-accent-soft); color: var(--sz-accent-text); }
:root body .task-tag { border-radius: var(--sz-r-pill); font-weight: 600; font-size: 12px; padding: 2px 10px; }

/* count chip in page headers ("10 agents") */
:root body .sz-count-chip {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 0 12px; min-height: 34px; border-radius: var(--sz-r-pill);
    background: var(--sz-accent-soft); color: var(--sz-accent-text);
    font-weight: 650; font-size: 14px;
}
:root body .sz-count-chip b { font-weight: 800; font-stretch: var(--sz-stretch-fig); font-size: 1.08em; }

/* 13. Overlays ----------------------------------------------------------------------- */
:root body .popup-overlay {
    background: var(--sz-scrim);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
:root body .popup-content {
    background: var(--sz-surface);
    color: var(--sz-text);
    border: 0;
    border-radius: 16px;
    box-shadow: var(--sz-shadow-modal);
}
html.dark-mode body .popup-content { background: var(--sz-surface); border: 0; }
:root body .popup-content h3 { color: var(--sz-text-strong); font-size: 1.2rem; font-weight: 760; }
:root body .popup-content .icon,
:root body .popup-content .popup-icon { background: var(--sz-accent-soft); color: var(--sz-accent-text); }
:root body .popup-close {
    color: var(--sz-text-muted); border-radius: var(--sz-r-ctl); background: transparent;
}
@media (hover: hover) and (pointer: fine) {
    :root body .popup-close:hover { background: var(--sz-surface-3); color: var(--sz-text-strong); }
}
/* dialog families */
:root body :is(.pa-modal, .cem-box, .clf-modal, .pl-modal, .modal-content, .modal-box, .modal-inner, .groups-modal) {
    background: var(--sz-surface);
    color: var(--sz-text);
    border: 0;
    border-radius: 16px;
    box-shadow: var(--sz-shadow-modal);
}
:root body :is(.pa-modal-overlay, .cem-overlay, .clf-modal-overlay, .pl-modal-overlay, .modal-overlay) {
    background: var(--sz-scrim);
}
/* Plain .modal-overlay dialogs (Approvals, Company Admin, Dashboard), shown by removing .hidden.
   groups.css used to be the only sheet that placed them, and Approvals doesn't load it, so its
   dialogs fell into the page as a column with no backdrop. */
:root body .modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
:root body .modal-overlay.hidden { display: none; }
:root body .modal-overlay > .modal-content {
    position: relative; width: 100%; max-width: 480px; max-height: calc(100dvh - 32px);
    overflow: auto; padding: 24px; box-sizing: border-box;
}
:root body .modal-overlay .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
:root body .modal-overlay .modal-header h3 { display: block; margin: 0; font-size: 1.2rem; font-weight: 760; line-height: 1.3; color: var(--sz-text-strong); overflow-wrap: anywhere; }
:root body .modal-overlay .modal-header h3 > i { margin-inline-end: 8px; font-size: .9em; color: var(--sz-accent-text); }
/* their forms (.modern-form): label over field. company_admin.css styled these, and only Company Admin loads it */
:root body .modal-overlay .modern-form > p.muted { margin: 0 0 16px !important; font-size: 14px; line-height: 1.5; color: var(--sz-text-muted); }
:root body .modal-overlay .modern-form .form-group { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
:root body .modal-overlay .modern-form .form-group label { display: block; margin: 0; font-size: 13px; font-weight: 640; color: var(--sz-text-muted); }
:root body .modal-overlay .modern-form .form-group p.muted { margin: 0 !important; font-size: 12.5px !important; line-height: 1.45; color: var(--sz-text-muted); }
:root body .modal-overlay .modern-form .form-input-modern {
    width: 100%; min-height: var(--sz-ctl-h); padding: 0 12px; box-sizing: border-box;
    border: 1px solid var(--sz-border-strong); border-radius: var(--sz-r-ctl); background: var(--sz-field); color: var(--sz-text);
    font-family: var(--sz-font); font-size: 14.5px; box-shadow: none;
}
html.dark-mode body .modal-overlay .modern-form .form-input-modern { background: var(--sz-surface-2); border-color: var(--sz-border-strong); color: var(--sz-text); }
:root body .modal-overlay .modern-form textarea.form-input-modern { min-height: 88px; padding: 8px 12px; line-height: 1.5; resize: vertical; }
:root body .modal-overlay .modern-form .form-input-modern:focus { outline: none; border-color: var(--sz-accent); box-shadow: 0 0 0 3px var(--sz-accent-ring); }
:root body .modal-overlay .modal-close-btn {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -6px -8px 0 0;
    padding: 0; border: 0; border-radius: var(--sz-r-ctl); background: transparent; color: var(--sz-text-muted);
    font-size: 22px; line-height: 1; cursor: pointer; transition: background-color var(--sz-t-1) ease, color var(--sz-t-1) ease;
}
@media (hover: hover) and (pointer: fine) { :root body .modal-overlay .modal-close-btn:hover { background: var(--sz-surface-3); color: var(--sz-text-strong); } }
:root body .modal-overlay .modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
/* company switcher */
:root body #company-switcher-modal { background: var(--sz-scrim); }
:root body #company-switcher-modal .modal-inner { background: var(--sz-surface); color: var(--sz-text); }
:root body #company-switcher-modal h3 { color: var(--sz-text-strong); }
:root body #company-switcher-modal .company-list .company-item { border-radius: var(--sz-r-ctl); }
@media (hover: hover) and (pointer: fine) {
    :root body #company-switcher-modal .company-list .company-item:hover { background: var(--sz-surface-3); }
}
/* notification drawer */
:root body .notification-panel {
    background: var(--sz-surface);
    color: var(--sz-text);
    border-left: 1px solid var(--sz-border);
    box-shadow: none;
}
:root body .notification-panel.open { box-shadow: -24px 0 60px -20px rgba(11, 16, 32, .35); }
:root body .notification-panel-header {
    background: var(--sz-surface);
    border-bottom: 1px solid var(--sz-border);
    padding: 18px 20px;
}
:root body .notification-panel-header h3 { font-size: var(--sz-fs-xl); color: var(--sz-text-strong); }
:root body .notification-panel .notification-actions { border-bottom: 1px solid var(--sz-border); padding: 12px 20px; }
:root body .notification-panel-close-btn { color: var(--sz-text-muted); border-radius: var(--sz-r-ctl); }
@media (hover: hover) and (pointer: fine) {
    :root body .notification-panel-close-btn:hover { background: var(--sz-surface-3); color: var(--sz-text-strong); }
}
:root body .notification-item { border-bottom: 1px solid var(--sz-border); color: var(--sz-text); }
:root body .notification-item.unread { background: var(--sz-accent-tint); }
:root body .no-notifications-placeholder { color: var(--sz-text-muted); }
/* toast */
:root body .toast-notification {
    background: var(--sz-ink);
    color: var(--sz-on-ink);
    border-radius: var(--sz-r-pop);
    box-shadow: var(--sz-shadow-pop);
    font-weight: 560;
    padding: 12px 18px;
}
:root body .toast-notification.success { background: var(--sz-ink); color: var(--sz-on-ink); box-shadow: var(--sz-shadow-pop); }
:root body .toast-notification.error { background: var(--sz-loss-solid); color: var(--sz-on-accent); }

/* 14. Feedback --------------------------------------------------------------------- */
:root body .sz-empty-state,
:root body .sz-empty {
    background: var(--sz-surface);
    border: 1px dashed var(--sz-border-strong);
    border-radius: var(--sz-r-panel);
    color: var(--sz-text-muted);
}
:root body .sz-empty-state i, :root body .sz-empty i { color: var(--sz-text-faint); }
:root body :is(.sz-alert-info, .sz-alert-success, .sz-alert-warning, .sz-alert-danger) { border-radius: var(--sz-r-ctl); }
:root body .sz-alert-info { background: var(--sz-accent-soft); color: var(--sz-accent-text); }
:root body .sz-alert-success { background: var(--sz-win-soft); color: var(--sz-win); }
:root body .sz-alert-warning { background: var(--sz-draw-soft); color: var(--sz-draw); }
:root body .sz-alert-danger { background: var(--sz-loss-soft); color: var(--sz-loss); }
:root body .sz-spinner { border-color: var(--sz-border-strong); border-top-color: var(--sz-accent); }

/* 15. KPI figures (the signature move) ---------------------------------------------
   Every KPI number: condensed heavy tabular figures, small-caps label under it. */
:root body .sz-figure,
:root body :is(.stat-value, .kpi-value, .metric-value, .summary-value, .stat-number, .rev-tile-v, .hrm-stat-v, .cp-kpi-value, .sz-kpi-v) {
    font-family: var(--sz-font);
    font-stretch: var(--sz-stretch-fig);
    font-weight: 820;
    font-variant-numeric: lining-nums;
    letter-spacing: -0.01em;
    line-height: 1.05;
    color: var(--sz-text-strong);
}
:root body .sz-figure-label,
:root body :is(.stat-label, .kpi-label, .metric-label, .summary-label, .rev-tile-k, .hrm-stat-l, .cp-kpi-label, .sz-kpi-k) {
    font-size: 11.5px;
    font-weight: 680;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sz-text-muted);
}

/* 16. Motion --------------------------------------------------------------------------- */
/* Page-to-page: cross-document View Transitions (Chromium and the desktop app; other
   browsers just navigate). The sidebar and the header icon row (named by ds_head.php)
   stay put; the rest cross-fades. Old and new share one duration and curve so their
   opacities always sum to 1 (plus-lighter): no dip to the background mid-fade. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: ease-in-out; }
    nav.sidebar { view-transition-name: sz-sidebar; }
    ::view-transition-group(sz-sidebar),
    ::view-transition-new(sz-sidebar) { animation: none; }
    ::view-transition-old(sz-sidebar) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    :root body :is(.dropdown-options, .tl-dd-menu, .user-profile-flyout) { transform-origin: top center; }
    @keyframes sz-rise { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
    @keyframes sz-fade { from { opacity: 0; } to { opacity: 1; } }
    :root body .popup-overlay { animation: sz-fade var(--sz-t-2) ease-out both; }
    :root body .popup-overlay .popup-content { animation: sz-rise var(--sz-t-3) var(--sz-ease) both; }
    :root body .tab-content.active { animation: sz-fade var(--sz-t-2) ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
    :root body *, :root body *::before, :root body *::after { scroll-behavior: auto !important; }
}

/* 17. RTL ---------------------------------------------------------------------------- */
html[dir="rtl"] body .sidebar { border-right: 0; border-left: 1px solid var(--sz-rail-line); }
html[dir="rtl"] body .notification-panel { border-left: 0; border-right: 1px solid var(--sz-border); }
html[lang="ar"] body, html[dir="rtl"] body { letter-spacing: 0; }
html[lang="ar"] body :is(h1, h2, h3, h4, .sz-figure-label) { letter-spacing: 0; }

/* 18. Phones --------------------------------------------------------------------------- */
@media (max-width: 900px) {
    :root body .sidebar { width: 280px; box-shadow: none; }
    :root body.mobile-nav-open .sidebar { box-shadow: 24px 0 60px -12px rgba(5, 12, 30, .5); }
    :root body .sidebar.collapsed { width: 280px; }
    :root body .mobile-nav-toggle {
        background: var(--sz-rail); color: var(--sz-rail-ink); border-radius: var(--sz-r-ctl);
        box-shadow: none;
        width: 44px; height: 44px;
    }
    :root body .mobile-nav-backdrop { background: var(--sz-scrim); }
    :root body .main-content .sidebar-header.mobile-only {
        background: var(--sz-surface);
        border-bottom: 1px solid var(--sz-border);
        color: var(--sz-text);
    }
    :root body .main-content .sidebar-header.mobile-only .sz-brand__name { color: var(--sz-text-strong); }
    :root body .main-content .sidebar-header.mobile-only .sz-brand__sep { background: var(--sz-border-strong); }
    :root body .page-header h1, :root body .view-header h1 { font-size: 1.5rem; }
}
@media (max-width: 600px) {
    :root body .page-header { flex-wrap: wrap; row-gap: 10px; }
    :root body .page-header .header-actions { flex-wrap: wrap; }
}
/* suggestions under a text field with a <datalist> (dropdown_enhance.js Combo) */
.sz-dd-menu .sz-dd-hint { margin-inline-start: auto; padding-inline-start: 12px; color: var(--sz-text-muted); font-size: .86em; font-weight: 500; }

/* Message dialog (utils.showConfirmationPopup): an icon tile in the message's tone, the title and
   text left-aligned, one OK. Success messages carry a thin bar counting down their auto-close. */
.sz-alert-overlay { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 16px; background: var(--sz-scrim); animation: sz-alert-fade var(--sz-t-2) var(--sz-ease) both; }
.sz-alert {
    position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; width: min(420px, 100%);
    padding: 20px 20px 16px; overflow: hidden; border: 1px solid var(--sz-border); border-radius: var(--sz-r-pop);
    background: var(--sz-surface); box-shadow: var(--sz-shadow-modal); color: var(--sz-text); text-align: start;
    animation: sz-alert-in 220ms var(--sz-ease) both;
}
.sz-alert.is-error   { --sz-tone: var(--sz-loss);        --sz-tone-soft: var(--sz-loss-soft); }
.sz-alert.is-warning { --sz-tone: var(--sz-draw);        --sz-tone-soft: var(--sz-draw-soft); }
.sz-alert.is-success { --sz-tone: var(--sz-win);         --sz-tone-soft: var(--sz-win-soft); }
.sz-alert.is-info    { --sz-tone: var(--sz-accent-text); --sz-tone-soft: var(--sz-accent-soft); }
.sz-alert-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--sz-tone-soft); color: var(--sz-tone); font-size: 18px; }
.sz-alert-text { min-width: 0; padding-right: 24px; }
:root body .sz-alert-text h3 { margin: 2px 0 4px; font-size: 1.05rem; font-weight: 650; line-height: 1.3; color: var(--sz-text-strong); }
:root body .sz-alert-text p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sz-text-muted); overflow-wrap: anywhere; }
.sz-alert-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--sz-text-faint); cursor: pointer; transition: background-color var(--sz-t-1) ease, color var(--sz-t-1) ease; }
@media (hover: hover) and (pointer: fine) { .sz-alert-x:hover { background: var(--sz-surface-3); color: var(--sz-text-strong); } }
.sz-alert-x:focus-visible { outline: 2px solid var(--sz-accent); outline-offset: 1px; }
.sz-alert-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 18px; }
:root body .sz-alert-ok { min-width: 88px; justify-content: center; }
.sz-alert-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--sz-tone); opacity: .6; transform-origin: left; animation: sz-alert-timer linear forwards; }
html[dir="rtl"] .sz-alert-timer { transform-origin: right; }
html[dir="rtl"] .sz-alert-x { right: auto; left: 10px; }
html[dir="rtl"] .sz-alert-text { padding-right: 0; padding-left: 24px; }
@keyframes sz-alert-fade { from { opacity: 0; } }
@keyframes sz-alert-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes sz-alert-timer { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .sz-alert-overlay, .sz-alert { animation: none; } .sz-alert-timer { display: none; } }

/* Backdrop for the app shell (both themes): a faint blueprint grid over soft glows. Very low contrast
   and clear of the top of the screen (the solid page header never shows an edge); it fades in lower
   down, where pages run out of content. The glows drift slowly by transform only (moved by the GPU,
   never repainted, so no cost to the page); still under reduced motion. Cards, panels and the sidebar
   keep their own surfaces. Two fixed layers behind everything; the page colour comes from <html>. */
:root body:has(.content-area) {
    --sz-bd-line: rgba(30, 50, 90, .07); --sz-bd-line-2: rgba(30, 50, 90, .035); --sz-bd-dot: rgba(30, 50, 90, .2);
    --sz-bd-glow-1: rgba(29, 104, 229, .10); --sz-bd-glow-2: rgba(14, 165, 233, .07); --sz-bd-glow-3: rgba(99, 102, 241, .05);
}
html.dark-mode body:has(.content-area) {
    --sz-bd-line: rgba(160, 180, 210, .07); --sz-bd-line-2: rgba(160, 180, 210, .035); --sz-bd-dot: rgba(170, 190, 220, .32);
    --sz-bd-glow-1: rgba(76, 141, 255, .2); --sz-bd-glow-2: rgba(56, 189, 248, .09); --sz-bd-glow-3: rgba(129, 140, 248, .07);
}
:root body:has(.content-area), :root body:has(.content-area) .content-area { background-color: transparent; }
:root body:has(.content-area)::before,
:root body:has(.content-area)::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
:root body:has(.content-area)::before {
    inset: -15%;                                   /* larger than the screen, so the drift never shows an edge */
    background:
        radial-gradient(38% 42% at 84% 86%, var(--sz-bd-glow-1), transparent 70%),
        radial-gradient(34% 40% at 14% 74%, var(--sz-bd-glow-2), transparent 70%),
        radial-gradient(30% 34% at 58% 52%, var(--sz-bd-glow-3), transparent 70%);
    will-change: transform;
    animation: sz-backdrop-drift 48s ease-in-out infinite alternate;
}
:root body:has(.content-area)::after {
    inset: 0;
    background:
        radial-gradient(circle at 0 0, var(--sz-bd-dot) 1.3px, transparent 1.8px) 0 0 / 120px 120px,
        linear-gradient(var(--sz-bd-line) 1px, transparent 1px) 0 0 / 120px 120px,
        linear-gradient(90deg, var(--sz-bd-line) 1px, transparent 1px) 0 0 / 120px 120px,
        linear-gradient(var(--sz-bd-line-2) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, var(--sz-bd-line-2) 1px, transparent 1px) 0 0 / 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 160px, #000 72%);
            mask-image: linear-gradient(to bottom, transparent 0, transparent 160px, #000 72%);
}
@keyframes sz-backdrop-drift {
    from { transform: translate3d(-3%, 2%, 0) scale(1); }
    to   { transform: translate3d(3%, -3%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { :root body:has(.content-area)::before { animation: none; } }
/* Weaker PCs (html.sz-lite, set in php/theme_pref_inline.php): the glow stays put instead of drifting, and
   without will-change it needs no layer of its own. Same backdrop, just still. */
html.sz-lite body:has(.content-area)::before { animation: none; will-change: auto; }

/* One scroller per page (2026-11-18). Dashboard, Tasks and Performance pinned their header and scrolled
   only a box under it: on Dashboard that box got as little as a third of the screen, and once it ran out
   the page around it scrolled as well. On wide screens the whole page scrolls now and the header goes up
   with it (dashboard.js remembers the users list's position on whichever element scrolls). Tasks and
   Performance keep their own phone layout (mobile-index.css / performance.css). */
/* Dashboard, at every width: on phones its header (title, sync bar, three cards, tab picker) is ~620px tall, so
   the tab under it got a sliver of screen, and on an iPhone nothing at all (2026-11-21: Manage Users looked empty). */
:root body .main-content > .content-area:has(> .dashboard-views-container) { overflow-y: auto; }
:root body .content-area > .dashboard-views-container { height: auto; overflow: visible; margin-right: 0; padding-right: 0; }
:root body .main-content > .content-area:has(> .dashboard-views-container) > * { flex-shrink: 0; }
@media (min-width: 901px) {
    /* Tasks */
    :root body .main-content > .content-area:has(> .index-scroll-container) { overflow-y: auto; }
    :root body .content-area > .index-scroll-container { flex-grow: 0; overflow: visible; }
    /* style.css pins the title and tabs, and here they are see-through: they scroll away instead (the tab row
       stays positioned for its sliding underline) */
    :root body .content-area:has(> .index-scroll-container) > .page-header { position: static; }
    :root body .content-area:has(> .index-scroll-container) > .tab-nav { position: relative; top: auto; }
    /* these pages are flex columns: once the page scrolls, a section that scrolls sideways (the tab row) would
       otherwise be squeezed to nothing and spill over the next one */
    :root body .main-content > .content-area:has(> .index-scroll-container) > * { flex-shrink: 0; }
    /* Performance */
    :root body .main-content > .content-area:has(> .view-container > .performance-scroll-container) { overflow-y: auto; }
    :root body .content-area > .view-container:has(> .performance-scroll-container) { height: auto; overflow: visible; }
    :root body .view-container > .performance-scroll-container { flex-grow: 0; overflow: visible; padding-right: 0; }
    :root body .view-container:has(> .performance-scroll-container) > .page-header { position: static; }
}

/* Top navigation (My Account → Appearance → Navigation: "Top bar"). A floating bar at the top centre
   carrying the sidebar's own links (_sidebar.php; its script opens the menus); <html>.sz-topnav is set
   before paint by php/theme_pref_inline.php. White on the light theme, black on the dark one. Wide
   screens only: phones keep the sidebar menu. */
.sz-topbar { display: none; }
@media (min-width: 901px) {
    html.sz-topnav body:has(.sz-topbar) nav.sidebar { display: none; }
    html.sz-topnav body:has(.sz-topbar) .main-content { padding-top: 76px; box-sizing: border-box; }
    /* the page sits in a centred column under the bar (the scroller stays full width, so its scrollbar stays at the
       edge). Pages whose content is narrower get a narrower column, so title, header icons and content line up. */
    html.sz-topnav body:has(.sz-topbar) .main-content > .content-area { --sz-col: 1440px; padding-inline: max(2rem, calc((100% - var(--sz-col)) / 2)); }
    html.sz-topnav body:has(.sz-topbar) .main-content > .content-area:has(> .apv) { --sz-col: 1040px; }   /* Approvals (.apv max-width) */
    html.sz-topnav body:has(.sz-topbar) .main-content > .content-area:has(.rm-list) { --sz-col: 760px; }   /* ReadyMode (.rm-card max-width) */
    html.sz-topnav body:has(.sz-topbar) .pss-table-scroll { max-height: calc(100vh - 346px); }   /* Pay Slips sheet: payslip_sheet.css's 100vh - 270px, less the bar's 76px */
    /* content scrolling up meets a soft edge under the bar instead of a hard cut */
    html.sz-topnav body:has(.sz-topbar) .main-content::before {
        content: ""; position: fixed; left: 0; right: 0; top: 76px; height: 18px; z-index: 2; pointer-events: none;   /* under sticky headers (z 3+) */
        background: linear-gradient(var(--sz-bg), transparent);
    }
    /* colours: the sidebar's own rail tokens (cobalt on the light theme, slate on the dark one), so the two always match */
    .sz-topbar { --tb-shadow: 0 10px 28px -12px rgba(5, 18, 54, .45), 0 2px 6px rgba(5, 18, 54, .12); }
    html.dark-mode .sz-topbar { --tb-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .25); }
    html.sz-topnav body .sz-topbar {
        position: fixed; top: 12px; left: 50%; translate: -50% 0; z-index: 950;
        display: flex; align-items: center; gap: 6px;
        width: max-content; max-width: calc(100vw - 32px); height: 52px; padding: 6px 6px 6px 12px; box-sizing: border-box;
        background: var(--sz-rail); color: var(--sz-rail-ink); border: 1px solid var(--sz-rail-line); border-radius: 16px; box-shadow: var(--tb-shadow);
        font-family: var(--sz-font); font-size: 13.5px; white-space: nowrap;
    }
    /* brand: the sidebar's lockup (white mark | STEAMIFY) */
    .sz-topbar .sz-tb-brand { display: flex; align-items: center; gap: 10px; padding-right: 10px; color: var(--sz-rail-ink); text-decoration: none; }
    .sz-topbar .sz-tb-logo { display: grid; place-items: center; flex: none; }
    .sz-topbar .sz-tb-logo img { height: 28px; width: auto; scale: 1.6; margin-inline: -4px; filter: brightness(0) invert(1); }
    .sz-topbar .sz-tb-name {
        padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .36);
        font-size: 15px; font-weight: 800; font-stretch: 112%; letter-spacing: .07em; text-transform: uppercase; line-height: 22px;
    }
    .sz-topbar ul { list-style: none; margin: 0; padding: 0; }
    .sz-topbar .sz-tb-links { display: flex; align-items: center; gap: 2px; min-width: 0; }
    .sz-topbar .sz-tb-links > li { position: relative; }
    .sz-topbar .sz-tb-links > li > a,
    .sz-topbar .sz-tb-trigger {
        position: relative; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border: 0; border-radius: var(--sz-r-ctl, 10px);
        background: transparent; color: var(--sz-rail-text); font: inherit; font-weight: 560; text-decoration: none; cursor: pointer;
        transition: color var(--sz-t-1, .12s) ease, background-color var(--sz-t-1, .12s) ease;
    }
    .sz-topbar .sz-tb-links > li > a > i { display: none; }       /* labels only, like the reference */
    .sz-topbar .sz-tb-links > li > a:hover,
    .sz-topbar .sz-tb-trigger:hover,
    .sz-topbar .sz-tb-group.open > .sz-tb-trigger { color: var(--sz-rail-ink); background: var(--sz-rail-hover); }
    /* the page you are on: the sidebar's active pill */
    .sz-topbar .sz-tb-links > li > a.active,
    .sz-topbar .sz-tb-group.is-active > .sz-tb-trigger {
        color: var(--sz-rail-active-ink); background: var(--sz-rail-active-bg); font-weight: 680; box-shadow: 0 1px 2px rgba(5, 18, 54, .18);
    }
    .sz-topbar .sz-tb-trigger > i { font-size: 9px; opacity: .75; transition: rotate .15s ease; }
    .sz-topbar .sz-tb-group.open > .sz-tb-trigger > i { rotate: 180deg; }
    .sz-topbar .sz-tb-count,
    .sz-topbar .sz-tb-menu .sidebar-count {
        min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
        display: inline-grid; place-items: center; background: var(--sz-accent); color: #fff;
        font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
    }
    .sz-topbar .sz-tb-menu .sidebar-count { margin-left: auto; }
    .sz-topbar .sz-tb-menu .sidebar-count[hidden] { display: none; }
    /* menus (opened by the script: .open), drawn like the rail */
    .sz-topbar .sz-tb-menu {
        position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% -4px; min-width: 220px; padding: 6px;
        background: var(--sz-rail); border: 1px solid var(--sz-rail-line); border-radius: 14px; box-shadow: var(--tb-shadow);
        opacity: 0; visibility: hidden; transition: opacity .14s ease, translate .14s ease, visibility 0s linear .14s;
    }
    .sz-topbar .sz-tb-menu::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }   /* hover bridge over the gap */
    .sz-topbar .sz-tb-group.open > .sz-tb-menu { opacity: 1; visibility: visible; translate: -50% 0; transition-delay: 0s; }
    .sz-topbar .sz-tb-menu a {
        display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 10px; border-radius: var(--sz-r-ctl, 9px);
        color: var(--sz-rail-text); text-decoration: none; font-weight: 560;
        transition: color var(--sz-t-1, .12s) ease, background-color var(--sz-t-1, .12s) ease;
    }
    .sz-topbar .sz-tb-menu a > i { width: 18px; text-align: center; color: inherit; opacity: .92; font-size: 14px; }
    .sz-topbar .sz-tb-menu a:hover { background: var(--sz-rail-hover); color: var(--sz-rail-ink); }
    .sz-topbar .sz-tb-menu a.active { background: var(--sz-rail-active-bg); color: var(--sz-rail-active-ink); font-weight: 680; box-shadow: 0 1px 2px rgba(5, 18, 54, .18); }
    /* search: the sidebar's search button */
    .sz-topbar .sz-tb-search {
        display: flex; align-items: center; gap: 10px; height: 38px; margin-left: 6px; padding: 0 7px 0 12px; flex: none;
        border: 1px solid var(--sz-rail-line); border-radius: var(--sz-r-ctl, 10px); background: transparent; color: var(--sz-rail-text);
        font: inherit; font-weight: 560; cursor: pointer; transition: color var(--sz-t-1, .12s) ease, background-color var(--sz-t-1, .12s) ease;
    }
    .sz-topbar .sz-tb-search:hover { background: var(--sz-rail-hover); color: var(--sz-rail-ink); }
    .sz-topbar .sz-tb-search > i { font-size: 14px; }
    .sz-topbar .sz-tb-search kbd {
        font: 600 11px/1 var(--sz-font-mono, var(--sz-font)); padding: 4px 6px; border-radius: var(--sz-r-sm, 6px);
        background: transparent; color: var(--sz-rail-text); border: 1px solid var(--sz-rail-line);
    }
    .sz-topbar :focus-visible { outline: 2px solid var(--sz-rail-ink) !important; outline-offset: 2px; }
    /* narrower screens: drop the name, then the button's words, then the logo */
    @media (max-width: 1440px) { .sz-topbar .sz-tb-name { display: none; } .sz-topbar .sz-tb-brand { padding-right: 4px; } }
    @media (max-width: 1240px) {
        .sz-topbar .sz-tb-search > span, .sz-topbar .sz-tb-search kbd { display: none; }
        .sz-topbar .sz-tb-search { padding: 0 13px; }
        .sz-topbar .sz-tb-links > li > a, .sz-topbar .sz-tb-trigger { padding: 0 7px; }
    }
    @media (max-width: 1100px) {
        html.sz-topnav body .sz-topbar { font-size: 12.5px; gap: 2px; }
        .sz-topbar .sz-tb-links > li > a, .sz-topbar .sz-tb-trigger { padding: 0 6px; gap: 4px; }
        .sz-topbar .sz-tb-search { margin-left: 2px; padding: 0 11px; }
    }
    @media (max-width: 1000px) { .sz-topbar .sz-tb-brand { display: none; } }   /* the longest (super admin) bar still fits at 901px */
    @media (max-width: 960px) {
        .sz-topbar .sz-tb-links > li > a, .sz-topbar .sz-tb-trigger { padding: 0 5px; gap: 3px; }
        .sz-topbar .sz-tb-search { padding: 0 10px; }
    }
}
@media (prefers-reduced-motion: reduce) { .sz-topbar .sz-tb-menu { transition: none; } }

/* Phone top bar (_sidebar.php .sz-phonebar). One bar pinned to the top of every staff page on phones: the menu
   button sits on its left, then the logo, then help / bell / avatar on the right (the page header's own bell and
   avatar hide, and Dashboard / Tasks drop their old phone header). Content scrolls under the bar, never under the
   button; the menu slides out below the bar and the button turns into an X. Scoped to body:has(.sz-phonebar)
   so the client portal (same stylesheet, no bar) is untouched. Desktop never shows it. */
.sz-phonebar { display: none; }
@media (max-width: 900px) {
    :root body:has(.sz-phonebar) { --sz-phonebar-h: 64px; }
    :root body .sz-phonebar {
        display: flex; align-items: center; gap: 10px; box-sizing: border-box;
        position: fixed; top: 0; left: 0; right: 0; height: var(--sz-phonebar-h); z-index: 1002;
        padding: 0 12px 0 64px;   /* the menu button: fixed at left 10px, 44px wide */
        background: var(--sz-surface); border-bottom: 1px solid var(--sz-border);
    }
    /* the sidebar's lockup (mark | STEAMIFY), in the page's ink instead of the rail's */
    :root body .sz-phonebar__brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; height: 40px; text-decoration: none; border-radius: var(--sz-r-ctl); }
    :root body .sz-phonebar__brand .sz-brand__icon { height: 30px; width: auto; margin-inline: -5px; display: block; }
    :root body .sz-phonebar__brand .sz-brand__sep { width: 1px; height: 22px; background: var(--sz-border-strong); flex: none; }
    :root body .sz-phonebar__brand .sz-brand__name { font-size: 16px; color: var(--sz-text-strong); white-space: nowrap; }
    :root body .sz-phonebar__brand:focus-visible { outline: 2px solid var(--sz-accent); outline-offset: 2px; }
    /* width: auto beats mobile-dashboard.css's full-width .header-actions, which left the icons by the logo */
    :root body .sz-phonebar__actions { margin-left: auto; width: auto; flex: none; display: flex; align-items: center; gap: 6px; }
    :root body:has(.sz-phonebar) .mobile-nav-toggle { z-index: 1003; top: 10px; left: 10px; }
    :root body.mobile-nav-open .mobile-nav-toggle i::before { content: "\f00d"; }   /* fa-xmark while the menu is open */
    /* the page sits below the bar; the floating button's old clearance goes back to normal padding */
    :root body:has(.sz-phonebar) .main-content { padding-top: var(--sz-phonebar-h); box-sizing: border-box; }
    /* the page fills the space under the bar: mobile-index.css / mobile-dashboard.css made it a whole screen tall,
       so it ran on past the bottom and the end of Headcount (64px) and Dashboard (40px) could never be scrolled to */
    :root body:has(.sz-phonebar) .main-content > .content-area { height: 100%; min-height: 0; }
    /* Calendar: calendar.css lets the month grow taller than the card on phones, but the card clipped it, so the
       last week was cut off. The card scrolls instead (here: calendar.css is linked without a version). */
    :root body #main-calendar-card { overflow-y: auto; }
    /* Collaboration: the desktop's list + chat side by side left the chat a cut-off strip. Phones get one pane at a
       time (collaboration.php sets .is-chat-open when you open a conversation): the list, or the chat with a way
       back. The chat fills what's left of the screen, so its message box stays on it. */
    :root body .main-content > .content-area:has(> .collab-space) { display: flex; flex-direction: column; overflow: hidden; padding-inline: 10px; padding-bottom: 10px; }
    :root body .content-area > .collab-space { flex: 1 1 auto; min-height: 0; height: auto; grid-template-columns: minmax(0, 1fr); }
    :root body .collab-space:not(.is-chat-open) > .collab-right,
    :root body .collab-space.is-chat-open > .collab-left,
    :root body .content-area:has(> .collab-space.is-chat-open) > .page-header { display: none; }
    :root body .collab-space > .collab-left { border-right: 0; }
    :root body .collab-space > .collab-right { flex-direction: column; }
    :root body .collab-space .collab-back {   /* `hidden` in the markup keeps it off wider screens */
        display: flex; align-items: center; gap: 8px; flex: none; width: 100%; min-height: 44px; padding: 0 14px; margin: 0;
        border: 0; border-bottom: 1px solid var(--sz-border); border-radius: 0; background: transparent;
        color: var(--sz-text-strong); font: inherit; font-size: 15px; font-weight: 600; text-align: start; cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    :root body .collab-space .collab-back:active { background: var(--sz-surface-2); }
    :root body .collab-space :is(.chat-input, .chat-messages) { padding: 10px 12px; }   /* the desktop's 24px left the message box ~130px wide */
    /* Company Admin: company_admin.css stacks its header in a column, and a column that wraps sent the Refresh row
       (made a full line by steamify-pages.css) into a second column off the right edge: the page slid sideways under
       your finger. A row like every other page's header: title, then the buttons on the next line. */
    :root body.company-admin-page .page-header { flex-direction: row; }
    :root body.company-admin-page .admin-section { padding: 16px 12px; }   /* boxes in boxes: the lists started 60px in */
    :root body:has(.sz-phonebar):not(:has(.sidebar-header.mobile-only)) .content-area { padding-top: 1rem; }
    :root body:has(.sz-phonebar) .main-content .sidebar-header.mobile-only { display: none; }
    :root body:has(.sz-phonebar) .main-content :is(.notification-bell, .header-actions .user-profile, .sz-help-btn) { display: none; }   /* the bar has them */
    /* the menu and its dimmer open below the bar; the menu's own logo row would repeat the bar's */
    :root body:has(.sz-phonebar) .sidebar { top: var(--sz-phonebar-h); height: calc(100% - var(--sz-phonebar-h)); }
    :root body:has(.sz-phonebar) .mobile-nav-backdrop { top: var(--sz-phonebar-h); }
    :root body:has(.sz-phonebar) .sidebar > .sidebar-header { display: none; }
    :root body:has(.sz-phonebar) .notification-panel { z-index: 1004; }
}
@media (max-width: 374px) { :root body .sz-phonebar__brand :is(.sz-brand__sep, .sz-brand__name) { display: none; } }   /* small phones: the mark only */

/* Dashboard → Add New Task → "Required Roles/Skills" (#add-task-roles-panel, built in dashboard.js).
   Each role is a <label> inside .form-group, so the form's generic label/input rules turned its checkbox
   into a full-width dark bar with the name under it, and the sticky Clear/Done bar sat over the next group.
   Here: search on top, the list scrolls in between, the buttons below; roles are one-line checkable chips.
   (In steamify.css, not dashboard.css: that sheet is served with a fixed ?v= and would stay cached.) */
#add-task-roles-panel.card { display: flex; flex-direction: column; max-height: 340px; padding: 0; overflow: hidden; }
#add-task-roles-panel .roles-panel-search-container { position: static; flex: none; padding: 10px; background: transparent; border-bottom: 1px solid var(--sz-border); }
#add-task-roles-panel .roles-groups-wrapper { flex: 1 1 auto; min-height: 0; max-height: none; overflow-x: hidden; overflow-y: auto; padding: 4px 10px 10px; }
#add-task-roles-panel .role-group { border: 0; border-radius: 0; background: none; }
#add-task-roles-panel .role-group-header { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 2px 6px; border-radius: 0; background: none;
    font-size: 12px; font-weight: 600; color: var(--sz-text-muted); }
#add-task-roles-panel .role-group-count { font-weight: 500; opacity: 1; color: var(--sz-text-faint, var(--sz-text-muted)); }
#add-task-roles-panel .role-items { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
#add-task-roles-panel label.role-item { display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; padding: 6px 12px 6px 10px; border-radius: 999px;
    border: 1px solid var(--sz-border-strong); background: var(--sz-surface); color: var(--sz-text); font-size: 13px; font-weight: 500; line-height: 1.2; cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease; }
#add-task-roles-panel label.role-item:hover { border-color: var(--sz-text-faint, var(--sz-border-strong)); }
#add-task-roles-panel label.role-item:has(input:checked) { border-color: var(--sz-accent); background: var(--sz-accent-soft); color: var(--sz-text-strong); }
#add-task-roles-panel .role-item input[type="checkbox"] { appearance: auto; flex: none; width: 15px; height: 15px; min-width: 0; min-height: 0; margin: 0; padding: 0;
    border: 0; background: none; box-shadow: none; accent-color: var(--sz-accent); cursor: pointer; }
#add-task-roles-panel .role-name { overflow: visible; white-space: nowrap; }
#add-task-roles-panel .role-item-empty { font-size: 13px; color: var(--sz-text-muted); padding: 4px 2px; }
#add-task-roles-panel .roles-panel-footer { position: static; flex: none; padding: 8px 10px; background: transparent; border-top: 1px solid var(--sz-border); }
#add-task-roles-panel .roles-panel-footer button { padding: 6px 14px; border-radius: var(--sz-r-ctl, 8px); font-size: 13px; font-weight: 600; filter: none;
    border: 1px solid var(--sz-border-strong); background: var(--sz-surface); color: var(--sz-text); }
#add-task-roles-panel .roles-panel-footer .roles-close-btn { border-color: var(--sz-accent); background: var(--sz-accent); color: #fff; }

/* Manage Users → Permissions → "Giving tasks" (super admins; dashboard.js renderTaskAssignAccess).
   App controls only: the "Anyone" switch (.perm-switch, steamify-pages.css), role chips you tap (their
   box is hidden; a chosen chip fills and shows a tick), and the app's own checkbox in the people list. */
.ta-grant__body { display: grid; gap: 14px; margin-top: 12px; }
.ta-grant__muted { margin: 0; font-size: 13px; color: var(--sz-text-muted); }
.ta-grant label.ta-grant__all { padding: 12px 14px; border-radius: var(--sz-r-ctl, 8px); background: var(--sz-surface-2); }
.ta-grant__part { display: grid; gap: 10px; }
.ta-grant__part[hidden] { display: none; }
.ta-grant__h { margin: 4px 0 0; font-size: 13px; font-weight: 650; color: var(--sz-text-muted); }
.ta-grant__count { font-weight: 600; color: var(--sz-accent-text, var(--sz-accent)); }
.ta-grant__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ta-grant label.ta-chip {
    position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 14px;
    border: 1px solid var(--sz-border-strong); border-radius: 999px; background: var(--sz-surface);
    font-size: 13.5px; font-weight: 550; color: var(--sz-text); cursor: pointer; user-select: none; text-transform: none; letter-spacing: 0;
    transition: background-color 150ms var(--sz-ease), border-color 150ms var(--sz-ease), color 150ms var(--sz-ease), transform 120ms var(--sz-ease);
}
.ta-grant label.ta-chip input { position: absolute; width: 1px; height: 1px; min-width: 0; margin: 0; opacity: 0; pointer-events: none; }
.ta-grant label.ta-chip i { display: none; font-size: 11px; }
.ta-grant label.ta-chip:has(input:checked) { padding-left: 11px; border-color: var(--sz-accent); background: var(--sz-accent-soft); color: var(--sz-accent-text, var(--sz-accent)); }
.ta-grant label.ta-chip:has(input:checked) i { display: inline-block; }
.ta-grant label.ta-chip:has(input:focus-visible) { outline: 2px solid var(--sz-accent); outline-offset: 2px; }
.ta-grant label.ta-chip:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ta-grant label.ta-chip:hover { border-color: var(--sz-accent); } }
.ta-grant__picked { display: flex; flex-wrap: wrap; gap: 6px; }
.ta-grant__picked:empty { display: none; }
.ta-grant .ta-pick {
    display: inline-flex; align-items: center; gap: 4px; min-height: 30px; margin: 0; padding: 0 4px 0 12px;
    border: 0; border-radius: 999px; background: var(--sz-accent-soft); color: var(--sz-text-strong);
    font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; transition: background-color 150ms var(--sz-ease), transform 120ms var(--sz-ease);
}
.ta-grant .ta-pick i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; color: var(--sz-text-muted); }
.ta-grant .ta-pick:active { transform: scale(.97); }
.ta-grant .ta-pick:focus-visible { outline: 2px solid var(--sz-accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .ta-grant .ta-pick:hover i { background: var(--sz-surface-3); color: var(--sz-text-strong); } }
.ta-grant input.ta-grant__search { width: 100%; max-width: 420px; height: 40px; padding: 0 12px; box-sizing: border-box; border-radius: var(--sz-r-ctl, 8px);
    border: 1px solid var(--sz-border-strong); background: var(--sz-surface); color: var(--sz-text); font-size: 14px; }
.ta-grant__people { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px;
    border: 1px solid var(--sz-border); border-radius: var(--sz-r-ctl, 8px); background: var(--sz-surface-2, var(--sz-surface)); }
.ta-grant label.ta-person { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 0 10px; border-radius: 6px;
    font-size: 14px; color: var(--sz-text); cursor: pointer; text-transform: none; letter-spacing: 0; }
.ta-grant label.ta-person input { margin: 0; }
.ta-grant label.ta-person[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .ta-grant label.ta-person:hover { background: var(--sz-surface-3); } }
.ta-grant .ta-person__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; color: var(--sz-text-strong); }
.ta-grant .ta-person__role { flex: none; font-size: 12.5px; color: var(--sz-text-muted); }
.ta-grant__none { padding: 10px; }
@media (prefers-reduced-motion: reduce) { .ta-grant :is(label.ta-chip, .ta-pick) { transition: none; } .ta-grant :is(label.ta-chip, .ta-pick):active { transform: none; } }
