/* input(762,11): run-time error CSS1035: Expected colon, found '.' */
/*
 * JEDWare design system.
 *
 * Compiled to jedware.css by the Visual Studio Web Compiler extension (compilerconfig.json).
 * Linked from _Layout.cshtml AFTER style.min.css.
 *
 * AUTHORING RULES  (same convention as report-generated.less)
 * ----------------------------------------------------------
 * 1. This file is plain modern CSS that merely happens to compile through LESS. No LESS mixins,
 *    no LESS @variables, no LESS operations — so it can drop the compiler dependency later by
 *    being renamed to .css, and so the committed .css can be produced by copying this file.
 *
 * 2. Loading after style.min.css is what makes section 2 below work. Both sheets declare custom
 *    properties on :root at identical specificity, so source order decides and this file wins.
 *    The dark block uses :root[data-theme="dark"] (0,2,0) so it also beats style.css's
 *    [data-theme="dark"] (0,1,0) regardless of order.
 *
 * 3. New markup uses jw-* classes. Never a bare element selector — style.less already styles
 *    `nav`, `header`, `section`, `article` and `content` globally (see section 4).
 */

/* ============================================================================
 * 1. TOKENS
 * Tier 1 primitives -> Tier 2 semantic -> Tier 3 domain.
 * Components consume Tier 2 and Tier 3 only, never Tier 1.
 * ========================================================================= */
:root {
    /* --- Tier 1: primitives. Cool graphite; orange is the only warm thing on the page. --- */
    --jw-g-0: #FFFFFF;
    --jw-g-25: #FAFBFC;
    --jw-g-50: #F4F6F8;
    --jw-g-100: #E9EDF1;
    --jw-g-200: #D8DEE6;
    --jw-g-300: #BEC7D2;
    --jw-g-400: #94A0AF;
    --jw-g-500: #6B7789;
    --jw-g-600: #4E5968;
    --jw-g-700: #3A434F;
    --jw-g-800: #262D36;
    --jw-g-900: #171C22;
    --jw-g-950: #0E1216;
    --jw-brand: #F7921E;
    --jw-brand-600: #DE7C0C;
    --jw-brand-300: #FFB454;

    /* --- Tier 2: semantic (light) --- */
    /* base #FBFBFD is the pre-refactor page background, restored; raised is a soft
       off-white one perceptible step above it (nothing in the chrome is pure #FFF).
       The near-flat base/raised hierarchy is deliberate — the old skin was equally
       flat (#FBFBFD page vs #FFF cards); borders and shadows carry the separation. */
    --jw-surface-base: #FBFBFD;
    --jw-surface-raised: #FDFDFE;
    --jw-surface-sunken: var(--jw-g-100);
    --jw-surface-inset: var(--jw-g-50);
    --jw-surface-inverse: var(--jw-g-900);
    --jw-text-primary: var(--jw-g-900);
    --jw-text-secondary: var(--jw-g-600);
    --jw-text-muted: var(--jw-g-500);
    --jw-text-inverse: var(--jw-g-0);
    --jw-border-subtle: var(--jw-g-100);
    --jw-border-default: var(--jw-g-200);
    --jw-border-strong: var(--jw-g-300);

    /* Accent. Referenced by NO surface token — that is what keeps orange an accent. */
    --jw-accent: var(--jw-brand);
    --jw-accent-hover: var(--jw-brand-600);
    --jw-accent-ink: #A65B00; /* 5.10:1 on white — accent used as TEXT */
    --jw-on-accent: #1A1205; /* 8.02:1 on brand — white would be 2.31:1 and fails */
    --jw-accent-wash: rgba(247, 146, 30, .12);
    --jw-focus: #0871C2;

    --jw-shadow-1: 0 1px 2px rgba(16,24,32,.06), 0 1px 3px rgba(16,24,32,.04);
    --jw-shadow-2: 0 2px 4px rgba(16,24,32,.06), 0 6px 16px rgba(16,24,32,.08);
    --jw-shadow-3: 0 12px 32px rgba(16,24,32,.16);
    --jw-radius-sm: 4px;
    --jw-radius-md: 7px;
    --jw-radius-lg: 11px;

    /* --- Tier 3: domain.
       These are the ORIGINAL product colours, restored deliberately. They are what customers
       have been reading for years, and recognition of the call-type palette was judged to
       outweigh the measured issues below. Do not "fix" them again without asking the team.

       The measurements are kept here so the trade-off stays visible rather than being
       rediscovered later as if it were new:
         - --jw-data-waiting #D2DAE2 measures 1.41:1 on white. It is effectively invisible as a
           line or fill in light mode; that is why it is not used for anything load-bearing and
           why wait time now has its own panel rather than a hairline over the columns.
         - --jw-data-answered #2ECC71 and --jw-data-lost #F53B57 measure dE 0.7 apart under
           deuteranopia — the two most important states in the product are close to one colour
           for red-green colourblind users (~8% of men). Anywhere these two appear together,
           colour must not be the ONLY channel: keep the labels, counts or icons.
         - --jw-data-internal #34495E (chroma 0.044) is a near-grey wearing a colour name, so it
           sits close to the waiting grey. Dark mode overrides it to #969da4, as it always did.
       --- */
    --jw-data-inbound: #FD944D;
    --jw-data-outbound: #42CAFA;
    --jw-data-internal: #34495E;
    --jw-data-lost: #F53B57;
    --jw-data-answered: #2ECC71;
    --jw-data-dina: #b719ff;
    --jw-data-average: #7068CC;
    --jw-data-waiting: #D2DAE2;
    /* PROVISIONAL — --Hotline is consumed twice by the wallboard stylesheet but has never had a
       declared value, so it currently renders as nothing. This is a placeholder pending a
       product decision; it is not derived from anything. */
    --jw-data-hotline: #9E3D6B;

    /* Categorical ramp — for series that carry NO domain meaning (IVR extensions, agents), where
       the only requirement is that neighbours stay apart. Drawn from the same original palette
       above so the two never look like different products, reordered so adjacent slots are
       maximally separated. The pale waiting grey is excluded: at 1.41:1 it would read as a
       missing series. Read by JW.charts.ramp(n) in jw-charts.js, which cycles past 8. */
    --jw-cat-1: #42CAFA;
    --jw-cat-2: #FD944D;
    --jw-cat-3: #34495E;
    --jw-cat-4: #b719ff;
    --jw-cat-5: #2ECC71;
    --jw-cat-6: #F53B57;
    --jw-cat-7: #7068CC;
    --jw-cat-8: #009dfc;

    /* Agent presence status palette (Agent Status report). Traffic-light semantics:
       1 = Available (green), 2 = Break/Away (amber), 3 = DND (red); 4/5 are tenant-defined
       custom statuses and deliberately NON-traffic colours (legacy hues from the old
       AgentStatus.js pie, kept for recognition). Colour is never the only channel: every
       use pairs the swatch with the tenant's status label and a duration. */
    --jw-status-1: #2ECC71;
    --jw-status-2: #F7B924;
    --jw-status-3: #F53B57;
    --jw-status-4: #39539E;
    --jw-status-5: #1AB7EA;

    --jw-rail-w: 252px;
    --jw-topbar-h: 54px;

    /* Theme-switch surfaces. A separate pair because the generic surface tokens converge in
       dark mode (raised and sunken are both near-black), which made the knob invisible. */
    --jw-switch-track: var(--jw-surface-sunken);
    --jw-switch-knob: var(--jw-surface-raised);
    --jw-font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Source Sans Pro", Roboto, "Helvetica Neue", Arial, sans-serif;
    --jw-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;
    /* Fallback only, for the instant before data-theme lands on <html>. The two explicit
       bindings below are what actually govern; see the note under them. */
    color-scheme: light dark;
}

/*
 * Native controls must follow the APP's theme, not the operating system's.
 *
 * `color-scheme: light dark` alone hands the choice to the UA, which resolves it from
 * prefers-color-scheme. This app resolves its theme server-side from the jw-theme cookie and
 * pins it as data-theme on <html> — so a user with a dark OS running the app in light mode got
 * dark checkboxes, dark <select> menus, a dark date picker and dark scrollbars on a white page.
 * Verified in headless Chrome: prefers-color-scheme:dark + data-theme="light" rendered every
 * unchecked checkbox as a filled dark square.
 *
 * Binding the scheme to the attribute makes the UA follow the app in both directions.
 */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

:root[data-theme="dark"] {
    /* Graphite surfaces restored from the pre-refactor skin (style.less dark block):
       base = old --bg-color, raised = old --box-color, sunken = old --secondary.
       Sunken sits LIGHTER than base here on purpose — that inversion is what the old
       skin did, and --secondary/--wallboard-rows alias to it. */
    --jw-surface-base: #1D262D;
    --jw-surface-raised: #2A3034;
    --jw-surface-sunken: #43474E;
    --jw-surface-inset: #343B42;
    --jw-surface-inverse: var(--jw-g-0);
    --jw-text-primary: var(--jw-g-50);
    --jw-text-secondary: #A3AEBC;
    --jw-text-muted: #8A95A3;
    --jw-text-inverse: var(--jw-g-900);
    --jw-border-subtle: #353E48;
    --jw-border-default: #3A4358;
    --jw-border-strong: #5B6271;
    --jw-switch-track: var(--jw-surface-base);
    --jw-switch-knob: #4E5968;
    --jw-accent-ink: var(--jw-brand-300);
    --jw-accent-wash: rgba(247, 146, 30, .16);
    --jw-focus: #5AB0F5;
    --jw-shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --jw-shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.36);
    --jw-shadow-3: 0 12px 32px rgba(0,0,0,.5);
    /* Domain colours are shared across themes, exactly as the original palette was: style.css
       declared all eight on :root and overrode only --Internal in its dark block, because
       #34495E is too dark to read on a dark ground. That single override is preserved here. */
    --jw-data-internal: #969da4;
    --jw-data-hotline: #C4568A;
    --jw-cat-3: #969da4;
    /* #39539E is too dark to separate from a dark ground — same reasoning as --jw-data-internal. */
    --jw-status-4: #7C90D9;
}

/* ============================================================================
 * 2. LEGACY ALIASES
 *
 * The highest-leverage block in the project. style.less's 11,937 lines read these 46 names;
 * re-pointing them here re-skins the entire application without editing a single view or
 * touching the monolith. Both blocks are repeated for dark because style.css declares its own
 * [data-theme="dark"] values that would otherwise win over our :root.
 *
 * Also declares the NINE variables that style.less consumes but never defines. --border-color
 * is the notable one: every .show_table cell border reads it, so those tables have been
 * rendering borderless.
 * ========================================================================= */
:root {
    --bg-color: var(--jw-surface-base);
    --box-color: var(--jw-surface-raised);
    --secondary: var(--jw-surface-sunken);
    --border: var(--jw-border-default);
    --table-border: var(--jw-border-default);
    --border-raport: var(--jw-border-strong);
    --hover-color: var(--jw-accent-wash);
    --font: var(--jw-text-primary);
    --font-faded: var(--jw-text-muted);
    --dark: var(--jw-surface-inverse);
    --nav: var(--jw-surface-raised);
    --table-header: var(--jw-surface-inset);
    --primary: var(--jw-accent);
    --danger: var(--jw-data-lost);
    --green: var(--jw-data-answered);
    /* Raw hex on purpose, like the button block below. --blue was #009dfc before the
       refactor and aliasing it to --jw-data-outbound moved it to #42CAFA, which showed up
       on the wallboard active-call and outbound-agent counts. No jw token carries #009dfc
       as its MEANING - --jw-cat-8 holds that value, but only as slot 8 of the categorical
       ramp, so pointing here at it would make --blue drift the day the ramp is reordered. */
    --blue: #009dfc;
    --link: var(--jw-data-outbound);
    --active: var(--jw-accent);
    --totalCalls: var(--jw-text-secondary);
    --disabled: var(--jw-border-default);
    --scrollbar: var(--jw-border-strong);
    --wallboard-rows: var(--jw-surface-sunken);

    /* Buttons.
       These four are load-bearing in ways the names do not suggest, so they keep their
       original SEMANTICS and only get new values:
         .btn_delete  background:var(--btn-danger)  + color:white !important  (style.css:2173)
         .btn_dark    background:var(--btn-second)  + color:#FFF              (style.css:2184)
         .btn-red     color:var(--btn-danger)       as TEXT on a light ground (style.css:314)
         .btn-second  color:var(--btn-second)       as TEXT on a light ground (style.css:307)
       So --btn-danger and --btn-second must each be dark enough to carry white text AND
       readable as text on a light surface. Aliasing them to a surface colour makes
       .btn_delete render white-on-white.

       --btn-hover is deliberately NOT orange: .btn_small pairs it with a single --btn-font,
       and white-on-orange measures 2.31:1. Orange belongs to .jw-btn--primary, which carries
       its own near-black ink. */
    --btn: #2B3440;
    --btn-hover: #3A4553;
    --btn-font: #FFF;
    --btn-border: #3A4553;
    --btn-second: #2B3440;
    --btn-second-hover: #3A4553;
    --btn-second-font: #FFF;
    --btn-danger: #9E122B;
    --btn-danger-hover: #C13B47;
    --btn-danger-font: #FFF;

    /* Domain */
    --inbound: var(--jw-data-inbound);
    --Outbound: var(--jw-data-outbound);
    --Internal: var(--jw-data-internal);
    --Lost: var(--jw-data-lost);
    --Answered: var(--jw-data-answered);
    --Dina: var(--jw-data-dina);
    --Average: var(--jw-data-average);
    --WaitingTime: var(--jw-data-waiting);
    --customOne: var(--jw-data-answered);
    --customTwo: var(--jw-data-lost);

    /* The nine that were consumed but never declared. */
    --secondfont-color: var(--jw-text-secondary);
    --black: var(--jw-text-primary);
    --border-color: var(--jw-border-default);
    --main-color: var(--jw-accent);
    --link-color: var(--jw-data-outbound);
    --font-color: var(--jw-text-primary);
    --grey-color: var(--jw-text-muted);
    --selected-color: var(--jw-accent-wash);
    --Hotline: var(--jw-data-hotline);
}

:root[data-theme="dark"] {
    --bg-color: var(--jw-surface-base);
    --box-color: var(--jw-surface-raised);
    --secondary: var(--jw-surface-sunken);
    --border: var(--jw-border-default);
    --table-border: var(--jw-border-default);
    --hover-color: var(--jw-accent-wash);
    --font: var(--jw-text-primary);
    --dark: var(--jw-surface-inverse);
    --nav: var(--jw-surface-raised);
    --primary: var(--jw-accent);
    --secondfont-color: var(--jw-text-secondary);
    /* Pre-refactor dark buttons restored: graphite body, orange outline, orange hover.
       The #F7921ECC hover under white text measures ~2.3:1 — a known trade-off the old
       skin shipped with, reverted to deliberately for recognition. */
    --btn: #2A3034;
    --btn-hover: #F7921ECC;
    --btn-font: #FFF;
    --btn-border: #F7921E;
    --btn-second: #495057;
    --btn-second-hover: #6F7A85;
    --btn-second-font: #FFF;
    --btn-danger: #A2283C;
    --btn-danger-hover: #C13B47;
    --btn-danger-font: #FFF;
    --disabled: var(--jw-border-default);
    --wallboard-rows: var(--jw-surface-sunken);
    --Internal: var(--jw-data-internal);
    --inbound: var(--jw-data-inbound);
    --Outbound: var(--jw-data-outbound);
    --Lost: var(--jw-data-lost);
    --Answered: var(--jw-data-answered);
    --Dina: var(--jw-data-dina);
    --Average: var(--jw-data-average);
    --WaitingTime: var(--jw-data-waiting);
    --Hotline: var(--jw-data-hotline);
}

/* ============================================================================
 * 3. SHELL
 * ========================================================================= */
body.jw-body {
    margin: 0;
    background: var(--jw-surface-base);
    color: var(--jw-text-primary);
    font-family: var(--jw-font-ui);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.jw-shell {
    display: grid;
    grid-template-columns: var(--jw-rail-w) minmax(0, 1fr);
    min-height: 100vh;
}

.jw-shell :focus-visible {
    outline: 2px solid var(--jw-focus);
    outline-offset: 2px;
    border-radius: 3px;
}

/* --- rail --- */
.jw-rail {
    display: flex;
    flex-direction: column;
    background: var(--jw-surface-raised);
    border-right: 1px solid var(--jw-border-subtle);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 20;
}

.jw-rail__top {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 14px 12px;
    min-height: var(--jw-topbar-h);
    box-sizing: border-box;
}

.jw-rail__mark {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 6px;
    background: var(--jw-accent);
    color: var(--jw-on-accent);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
}

.jw-rail__mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.jw-rail__word {
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: 15px;
    white-space: nowrap;
}

.jw-rail__word span {
    color: var(--jw-text-muted);
    font-weight: 500;
}

/* Tenant logo, rendered server-side by _Layout when the customer has uploaded one; it
   replaces the J-mark + wordmark pair entirely (white-label). Sized for the 252px rail:
   ~224px usable inside .jw-rail__top's padding, capped at 40px within the 54px header. */
.jw-rail__logo {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
    display: block;
    box-sizing: border-box; /* padding must not push past the collapsed rail's 44px cap */
}

/* Customer logos are designed for light grounds; in dark theme the raised rail surface is
   near-black, so the logo sits on a small white chip. --jw-g-0 does not remap per theme.
   The raised max-height hands the chip's padding its own room, so the logo itself renders
   at the same 40px as in light theme. */
[data-theme="dark"] .jw-rail__logo {
    background: var(--jw-g-0);
    padding: 4px 8px;
    border-radius: 6px;
    max-height: 48px;
}

.jw-rail__burger {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--jw-radius-sm);
    background: transparent;
    color: var(--jw-text-muted);
    cursor: pointer;
}

.jw-rail__burger:hover {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

.jw-rail__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 2px 8px 14px;
    display: flex;
    flex-direction: column;
}

/* Pinned tail of the rail (Support). Sits at the bottom of the scroll area when the menu is
   short, scrolls with it when it is not. Doubled class: the .jw-nav reset below sets margin:0
   at (0,1,0), so this must out-specify it, not just precede it. */
.jw-nav.jw-nav--pinned {
    margin-top: auto;
    padding-top: 14px;
}

.jw-rail__foot {
    border-top: 1px solid var(--jw-border-subtle);
    padding: 9px 14px;
    font-size: 11.5px;
    color: var(--jw-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.jw-rail__foot a {
    color: inherit;
    text-decoration: none;
}

.jw-rail__foot a:hover {
    color: var(--jw-text-primary);
    text-decoration: underline;
}

/* --- nav --- */
.jw-nav,
.jw-nav__sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jw-nav__section {
    font-size: 11.5px;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    font-weight: 600;
    padding: 18px 8px 7px;
}

.jw-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: var(--jw-radius-sm);
    background: transparent;
    color: var(--jw-text-secondary);
    text-decoration: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
}

.jw-nav__item:hover {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

.jw-nav__item[aria-current="page"] {
    background: var(--jw-accent-wash);
    color: var(--jw-text-primary);
    font-weight: 600;
}

.jw-nav__item[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--jw-accent);
}

.jw-nav__item.disabled {
    opacity: .45;
    pointer-events: none;
}

.jw-nav__ico {
    width: 18px;
    flex: none;
    display: grid;
    place-items: center;
    color: var(--jw-text-muted);
}

.jw-nav__item[aria-current="page"] .jw-nav__ico {
    color: var(--jw-accent-ink);
}

/* Sprite symbols only inherit stroke through the host <svg>. */
.jw-nav__ico svg,
.jw-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.jw-nav__label {
    min-width: 0;
}

.jw-nav__caret {
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 4px solid currentColor;
    border-top: 3.5px solid transparent;
    border-bottom: 3.5px solid transparent;
    opacity: .5;
    transition: transform .15s ease;
}

.jw-nav__group.is-open > .jw-nav__toggle .jw-nav__caret {
    transform: rotate(90deg);
}

.jw-nav__sub {
    display: none;
    padding-left: 30px;
}

.jw-nav__group.is-open > .jw-nav__sub {
    display: block;
}

.jw-nav__item--sub {
    font-size: 14px;
    padding: 7px 10px;
}

/* --- main column --- */
.jw-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jw-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    min-height: var(--jw-topbar-h);
    background: var(--jw-surface-raised);
    border-bottom: 1px solid var(--jw-border-subtle);
}

.jw-topbar__company {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jw-topbar__spacer {
    margin-left: auto;
}

/* The burger reuses .jw-rail__burger for its box, but that class carries margin-left:auto
   for the rail header — which here would shove the whole bar right. */
.jw-topbar__burger {
    margin-left: 0;
}

.jw-topbar__tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Theme toggle. The .theme-switch/.slider markup is a compatibility contract (see
   _Topbar.cshtml / jw-shell.js), so this restyles style.less's generic grey slider in place —
   scoped to .jw-topbar so the wallboard headers keep their own version. Sun and moon sit at
   the two ends of the track; the knob slides underneath the active one, so the highlighted
   icon on the knob names the current mode. */
.jw-topbar .theme-switch {
    width: 64px;
    height: 32px;
}

/* style.less hides the input entirely; keep it invisible but focusable for keyboard use. */
.jw-topbar .theme-switch input {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.jw-topbar .theme-switch input:focus-visible + .slider {
    outline: 2px solid var(--jw-accent);
    outline-offset: 2px;
}

.jw-topbar .slider {
    inset: 0;
    background: var(--jw-switch-track);
    border: 1px solid var(--jw-border-default);
    border-radius: 99px;
    transition: background .15s ease, border-color .15s ease;
}

.jw-topbar .slider:before {
    width: 26px;
    height: 26px;
    left: 2px;
    top: 2px;
    bottom: auto;
    background: var(--jw-switch-knob);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .18s ease;
}

.jw-topbar .theme-switch input:checked + .slider {
    background: var(--jw-switch-track);
}

.jw-topbar .theme-switch input:checked + .slider:before {
    transform: translateX(32px);
}

/* The icons paint above the ::before knob (generated content renders first). */
.theme-switch__ico {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--jw-text-secondary);
    opacity: .55;
    transition: color .18s ease, opacity .18s ease;
}

.theme-switch__ico--sun {
    left: 7px;
    /* Light mode active: sun rides the knob in brand orange. */
    color: var(--jw-accent);
    opacity: 1;
}

.theme-switch__ico--moon {
    right: 7px;
}

.jw-topbar .theme-switch input:checked ~ .slider .theme-switch__ico--sun {
    color: var(--jw-text-secondary);
    opacity: .55;
}

.jw-topbar .theme-switch input:checked ~ .slider .theme-switch__ico--moon {
    color: var(--jw-accent);
    opacity: 1;
}

.jw-stealth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--jw-accent-ink);
    background: var(--jw-accent-wash);
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
}

/* Language picker. The .dropdown-box shell and OpenDropdown behaviour are shared with the
   user menu (style.less), so only this picker's own rows are restyled — selectors are kept
   at or above style.less's `.dropdown-box ul li button/span` specificity so they win from
   this later-loaded sheet. */
.jw-topbar .jw-lang__btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
}

.jw-lang__current {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
}

.jw-lang .dropdown-box ul li {
    button.jw-lang__item {
        padding: 10px 14px;
        font-size: 13px;
        gap: 10px;
    }

    /* style.less rows every .dropdown-box span as a full menu row; these are inline parts. */
    span.jw-lang__code,
    span.jw-lang__name {
        display: inline-flex;
        width: auto;
        padding: 0;
        white-space: nowrap;
    }

    span.jw-lang__code {
        justify-content: center;
        min-width: 34px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .04em;
        padding: 2px 0;
        border-radius: 99px;
        border: 1px solid var(--jw-border-default);
        background: var(--jw-surface-sunken);
        color: var(--jw-text-secondary);
    }

    button.jw-lang__item svg.jw-lang__check {
        width: 16px;
        height: 16px;
        margin: 0 0 0 auto;
        opacity: 1 !important;
        color: var(--jw-accent);
    }

    button.jw-lang__item--active {
        font-weight: 600;

        span.jw-lang__code {
            border-color: var(--jw-accent);
            color: var(--jw-accent-ink);
        }
    }
}

/* The page body. `content` and `article` are kept in the markup because ~11k lines of
   style.less select against them, but their fixed-header offsets and flex hacks were sized
   for the old 250px/50px chrome, so they are neutralised here and re-spaced. */
.jw-main > content {
    display: block;
    width: auto;
    flex: 1 1 auto;
    padding-top: 0;
    min-width: 0;
}

.jw-main > content > article {
    flex: 1 1 auto;
    padding: 20px 22px 48px;
}

/* ============================================================================
 * 4. COMPONENTS
 * ========================================================================= */
.jw-btn {
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    min-height: 34px;
    border-radius: var(--jw-radius-sm);
    border: 1px solid var(--jw-border-default);
    background: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease;
}

.jw-btn:hover {
    background: var(--jw-surface-sunken);
}

.jw-btn--primary {
    background: var(--jw-accent);
    border-color: var(--jw-accent);
    color: var(--jw-on-accent);
}

.jw-btn--primary:hover {
    background: var(--jw-accent-hover);
    border-color: var(--jw-accent-hover);
}

.jw-btn--danger {
    background: transparent;
    border-color: var(--jw-data-lost);
    color: var(--jw-data-lost);
}

.jw-btn--danger:hover {
    background: var(--jw-data-lost);
    color: #fff;
}

.jw-btn--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--jw-text-secondary);
}

.jw-btn--ghost:hover {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

.jw-btn--sm {
    min-height: 28px;
    font-size: 12.5px;
    padding: 0 10px;
}

/* A <button> inside the user dropdown, so a POST action sits flush with the <a> items
   around it. The dropdown styles target .link, which this also carries. */
.jw-menu-action {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.jw-iconbtn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--jw-radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--jw-text-secondary);
    cursor: pointer;
}

.jw-iconbtn:hover {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

.jw-panel {
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-1);
    overflow: hidden;
}

.jw-panel__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--jw-border-subtle);
}

/* Secondary text in a panel head — a record count, a date range, a caveat. */
.jw-panel__sub {
    font-size: 12px;
    color: var(--jw-text-muted);
}

/* Standalone tabular-figure helper, for numbers outside a .jw-table. */
.jw-num {
    font-variant-numeric: tabular-nums;
}

.jw-panel__title {
    font-size: 14px;
    font-weight: 600;
}

.jw-panel__body {
    padding: 16px;
}

/* ---------------------------------------------------------------------------- tooltip

   The bubble is rendered by jw-tooltip.js into a single element appended to <body>, NOT as a
   pseudo-element on the trigger. That is the whole point: style.less draws it as [tooltip]::after
   (style.less:7195) and a pseudo-element cannot escape an ancestor overflow, so inside
   `.jw-panel { overflow: hidden }` the left half of every bubble was sliced off at the panel
   border - which read as the side rail covering it.

   z-index clears .jw-topbar (15) and .jw-rail (20) with room to spare. */
.jw-tip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 3000;
    box-sizing: border-box;
    max-width: 340px;
    padding: 8px 12px;
    border-radius: var(--jw-radius-sm);
    background: var(--jw-surface-inverse);
    color: var(--jw-text-inverse);
    box-shadow: var(--jw-shadow-2);
    font-family: var(--jw-font-ui);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease-out;
}

.jw-tip[hidden] {
    display: none;
}

/* One row per item. jw-tooltip.js splits a tooltip whose text joins several points with a
   standalone bullet - Views/Wallboard/Settings.cshtml builds the layout-card text that way - and
   renders each as its own <li> instead of one run-on paragraph. */
.jw-tip__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jw-tip__list li {
    position: relative;
    padding-left: 13px;
}

.jw-tip__list li + li {
    margin-top: 5px;
}

.jw-tip__list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    opacity: .55;
}

.jw-tip.is-visible {
    opacity: 1;
}

/* --jw-tip-arrow-x is set by jw-tooltip.js: once the bubble is clamped against a viewport edge it
   is no longer centred on the icon, so the arrow has to be walked back onto it. */
.jw-tip::after {
    content: '';
    position: absolute;
    left: var(--jw-tip-arrow-x, 50%);
    margin-left: -5px;
    border: 5px solid transparent;
}

.jw-tip[data-flow="up"]::after {
    top: 100%;
    border-bottom-width: 0;
    border-top-color: var(--jw-surface-inverse);
}

.jw-tip[data-flow="down"]::after {
    bottom: 100%;
    border-top-width: 0;
    border-bottom-color: var(--jw-surface-inverse);
}

/* jw-tooltip.js owns these triggers, so kill the style.less pseudo-element bubble - otherwise
   both render. Keep this selector in step with SELECTOR in jw-tooltip.js.
   position:relative undoes style.less:7172 `[tooltip] { position: absolute }`, which pulls the
   icon out of the flex row it sits in. */
span.tooltip[tooltip] {
    position: relative;
}

span.tooltip[tooltip]::before,
span.tooltip[tooltip]::after {
    display: none !important;
}

/* A disabled button fires no mouse events and nothing bubbles out of it, so the wrapping span
   never sees the hover. Views/Wallboard/Settings.cshtml wraps the disabled "Add queue" button in
   exactly this shape to explain why it is disabled. */
span.tooltip[tooltip] > button:disabled,
span.tooltip[tooltip] > .jw-btn[disabled] {
    pointer-events: none;
}

.jw-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 99px;
    border: 1px solid var(--jw-border-default);
    color: var(--jw-text-secondary);
    background: var(--jw-surface-sunken);
    font-variant-numeric: tabular-nums;
}

.jw-badge--good {
    color: var(--jw-data-answered);
    border-color: var(--jw-data-answered);
    background: transparent;
}

.jw-badge--bad {
    color: var(--jw-data-lost);
    border-color: var(--jw-data-lost);
    background: transparent;
}

.jw-tnum {
    font-variant-numeric: tabular-nums;
}

.jw-mono {
    font-family: var(--jw-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: .92em;
}

/* --- page scaffold --- */
.jw-page__head {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.jw-page__title {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -.015em;
    margin: 0;
    text-wrap: balance;
}

.jw-page__sub {
    color: var(--jw-text-muted);
    font-size: 13px;
    margin-top: 3px;
}

/* Vertical rhythm between stacked panels on simple pages. */
.jw-stack {
    display: grid;
    gap: 16px;
}

/* --- toolbar + fields --- */
.jw-toolbar {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--jw-shadow-1);
}

.jw-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.jw-field__label {
    font-size: 10.5px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    font-weight: 600;
}

.jw-input,
.jw-select {
    /* Text inputs default to content-box (the reset skips form controls), which
       inflates min-height 34 to a rendered 50px next to a 36px select. */
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--jw-text-primary);
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    padding: 7px 10px;
    height: 34px;
    min-height: 34px;
    min-width: 170px;
}

.jw-input:focus,
.jw-select:focus {
    outline: 2px solid var(--jw-focus);
    border-color: var(--jw-focus);
}

/* --- stat tiles --- */
.jw-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.jw-stats--compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 16px;
}

.jw-stat {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 15px 14px;
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-1);
}

/* The rail is the only place a domain colour touches a surface. */
.jw-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--jw-stat-rail, transparent);
}

.jw-stat__label {
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    font-weight: 600;
}

.jw-stat__value {
    font-size: 29px;
    font-weight: 650;
    letter-spacing: -.028em;
    line-height: 1.12;
    font-variant-numeric: tabular-nums;
    margin-top: 3px;
}

.jw-stat__value small {
    font-size: 15px;
    font-weight: 600;
    color: var(--jw-text-muted);
    letter-spacing: 0;
}

.jw-stat__lost {
    color: var(--jw-data-lost);
}

.jw-stat__foot {
    font-size: 12px;
    color: var(--jw-text-secondary);
    margin-top: 5px;
    display: flex;
    gap: 6px;
    align-items: baseline;
    flex-wrap: wrap;
}

.jw-stat--compact .jw-stat__value {
    font-size: 22px;
}

/*
 * Call-type modifiers. Each sets ONLY the rail colour; the icon chip and any accented figure in
 * the tile derive from that one declaration, so a tile is coloured by adding one class.
 *
 * These came from dashboard.less, where they re-pointed --jw-accent instead — a global token, so
 * every descendant reading --jw-accent inside the tile silently changed meaning. Re-pointing the
 * tile-local --jw-stat-rail keeps the brand accent global and undisturbed, which is the rule that
 * file's own header states.
 */
.jw-stat--total { --jw-stat-rail: var(--jw-text-muted); }
.jw-stat--inbound { --jw-stat-rail: var(--jw-data-inbound); }
.jw-stat--outbound { --jw-stat-rail: var(--jw-data-outbound); }
.jw-stat--internal { --jw-stat-rail: var(--jw-data-internal); }
.jw-stat--lost { --jw-stat-rail: var(--jw-data-lost); }
.jw-stat--answered { --jw-stat-rail: var(--jw-data-answered); }
.jw-stat--average { --jw-stat-rail: var(--jw-data-average); }

/* Icon + label on one line, above the figure. */
.jw-stat__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* A tinted chip carrying the metric's colour. Tinted rather than filled, so a row of tiles reads
   as one surface — unlike .icon-wrapper in style.less, which fills the circle solid. */
.jw-stat__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    color: var(--jw-stat-rail, var(--jw-text-secondary));
    background-color: color-mix(in srgb, var(--jw-stat-rail, var(--jw-text-muted)) 16%, transparent);
}

/* The lead tile in a dashboard grid. It carries no call type, so it takes the brand accent —
   which is what it inherited before, when .jw-dash set --jw-accent for the whole page. Without
   this it would be the only tile in the row with no rail. */
.jw-stat--hero {
    --jw-stat-rail: var(--jw-accent);
}

.jw-stat--hero .jw-stat__value {
    font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.25rem);
}

/* Figures inside .jw-stat__foot. --accent takes the tile's own colour. */
.jw-stat__foot .jw-strong {
    font-weight: 600;
    color: var(--jw-text-primary);
}

.jw-stat__foot .jw-accent {
    font-weight: 600;
    color: var(--jw-stat-rail, var(--jw-accent-ink));
}

.jw-stat__foot .jw-lost {
    font-weight: 600;
    color: var(--jw-data-lost);
}

/* --- meter -----------------------------------------------------------------
 * A single proportion — answered share, SLA attainment. Not a chart: no axis, no scale, no
 * legend. Where a value needs comparing across time it belongs in a chart instead.
 * -------------------------------------------------------------------------- */
.jw-meter {
    height: 6px;
    border-radius: 99px;
    background: var(--jw-surface-sunken);
    overflow: hidden;
}

.jw-meter__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--jw-stat-rail, var(--jw-accent));
    transition: width .4s ease;
}

/* --- skeleton --------------------------------------------------------------
 * Placeholder blocks for content fetched after paint. Shaped like the tile it stands in for, so
 * the layout does not jump when the real numbers arrive.
 * -------------------------------------------------------------------------- */
.jw-skeleton {
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-1);
    padding: 13px 15px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jw-skeleton__icon,
.jw-skeleton__label,
.jw-skeleton__value,
.jw-skeleton__sub {
    border-radius: var(--jw-radius-sm);
    background: linear-gradient(90deg,
        var(--jw-surface-sunken) 25%,
        var(--jw-surface-inset) 37%,
        var(--jw-surface-sunken) 63%);
    background-size: 400% 100%;
    animation: jw-skeleton-shimmer 1.4s ease infinite;
}

.jw-skeleton__icon { width: 36px; height: 36px; border-radius: 10px; }
.jw-skeleton__label { width: 45%; height: 11px; }
.jw-skeleton__value { width: 62%; height: 28px; }
.jw-skeleton__sub { width: 80%; height: 12px; margin-top: auto; }

@keyframes jw-skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* A shimmering placeholder is decorative; for anyone who has asked for less motion it is just
   noise on a page that is already busy loading. */
@media (prefers-reduced-motion: reduce) {
    .jw-skeleton__icon,
    .jw-skeleton__label,
    .jw-skeleton__value,
    .jw-skeleton__sub {
        animation: none;
    }
}

.jw-badge--info {
    color: var(--jw-data-outbound);
    border-color: var(--jw-data-outbound);
    background: transparent;
}

/* --- tables --- */
.jw-tablewrap {
    overflow-x: auto;
    max-width: 100%;
}

table.jw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.jw-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--jw-surface-inset);
    text-align: left;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--jw-text-secondary);
    font-weight: 600;
    padding: 9px 12px;
    white-space: nowrap;
    border-bottom: 1px solid var(--jw-border-default);
}

.jw-table thead th.sortable {
    cursor: pointer;
}

.jw-table thead th.sortable:hover {
    color: var(--jw-text-primary);
}

/* Empty-state cell inside a .jw-table. */
.jw-table td.jw-table__empty {
    text-align: center;
    color: var(--jw-text-muted);
    padding: 28px 12px;
}

.jw-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--jw-border-subtle);
    white-space: nowrap;
}

.jw-table tbody tr:nth-child(even) td {
    background: var(--jw-surface-inset);
}

.jw-table--interactive tbody tr {
    cursor: pointer;
}

.jw-table--interactive tbody tr:hover td {
    background: var(--jw-accent-wash);
}

/* Lost calls were marked with an inline style="color:#f53b57", which ignored the theme. */
.jw-table tbody tr.LostCall td {
    color: var(--jw-data-lost);
}

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

.jw-panel__body--flush {
    padding: 0;
}

/* --- table helpers -----------------------------------------------------------
 * Numeric cells, a totals row, group separators and the expanded-detail row.
 * These are shared by every grid on the four converted screens, which is why they
 * live on .jw-table rather than being repeated per page.
 * -------------------------------------------------------------------------- */

/* .n = a number. Right-aligned and tabular so digits line up column-wise; the
   whole point is that a column of figures can be scanned vertically. */
.jw-table .n,
.jw-table th.n {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* .t = a duration or timestamp. Monospace keeps hh:mm:ss from jittering. */
.jw-table .t {
    font-family: var(--jw-font-mono);
    font-size: 12.2px;
    font-variant-numeric: tabular-nums;
}

.jw-table tfoot td {
    padding: 9px 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-top: 2px solid var(--jw-border-default);
    background: var(--jw-surface-inset);
}

/* A label row separating groups of rows. !important is needed only to beat the
   zebra rule above, which is equally specific and would otherwise win on order. */
.jw-table tbody tr.jw-table__group td {
    background: var(--jw-surface-inset) !important;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--jw-text-secondary);
}

/* --- disclosure rows --------------------------------------------------------
 * A row that expands to reveal detail beneath it. The chevron is a CSS triangle
 * on the row's first cell so it costs no column — the header and body of these
 * grids are separate tables kept in step only by matching column counts.
 * -------------------------------------------------------------------------- */
.jw-chev {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 8px;
    vertical-align: middle;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    color: var(--jw-text-muted);
    transition: transform .15s ease;
}

.jw-table tbody tr[aria-expanded="true"] .jw-chev {
    transform: rotate(90deg);
    color: var(--jw-accent-ink);
}

.jw-table tbody tr.expandable {
    cursor: pointer;
}

.jw-table tbody tr.row--open td {
    background: var(--jw-accent-wash) !important;
}

.jw-table tbody tr.jw-detail td {
    padding: 0 !important;
    background: var(--jw-surface-base) !important;
}

.jw-detail__inner {
    padding: 10px 14px 14px 34px;
}

/* The nested grid must not re-stick its own header inside the parent's scroller. */
.jw-detail__inner .jw-table thead th {
    position: static;
    background: var(--jw-surface-sunken);
}

/* --- direction pills --------------------------------------------------------
 * Inbound / outbound / internal on a call row. The glyph carries the colour so
 * the meaning survives without reading the label.
 * -------------------------------------------------------------------------- */
.jw-dir {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 12.5px;
}

.jw-dir__glyph {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex: none;
}

/* Sprite symbols only inherit stroke through the host <svg>, so this has to sit
   on the host rather than on the <use>. Same rule as .jw-nav__ico above. */
.jw-dir__glyph svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.jw-dir--inbound .jw-dir__glyph { background: var(--jw-data-inbound); }
.jw-dir--outbound .jw-dir__glyph { background: var(--jw-data-outbound); }
.jw-dir--internal .jw-dir__glyph { background: var(--jw-data-internal); }

/* --- tabs --- */
.jw-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--jw-border-default);
    overflow-x: auto;
    margin-bottom: 16px;
}

.jw-tabs button,
.jw-tabs a {
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--jw-text-muted);
    text-decoration: none;
    padding: 9px 13px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.jw-tabs button:hover,
.jw-tabs a:hover {
    color: var(--jw-text-primary);
}

.jw-tabs button[aria-selected="true"],
.jw-tabs a[aria-selected="true"] {
    color: var(--jw-text-primary);
    border-bottom-color: var(--jw-accent);
}

/*
 * The report tab strip (Views/Report/Search/_TabStrip.cshtml) keeps its legacy `.tab` /
 * `.active-tab` classes because report-generated.js binds to them, so they need styling here too.
 *
 * `.active-tab` is declared at style.css:2486 as `border-color` + `color` = var(--primary), both
 * !important. Only !important beats !important, hence the two below — this is the one place in
 * this sheet where it is not simply matching an existing !important on the same property. The
 * accent stays on the underline; the label goes to primary text, as the prototype has it, because
 * orange-on-white as body-sized text measures 2.31:1.
 */
.jw-tabs .tab {
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: none;
    color: var(--jw-text-muted);
    text-decoration: none;
    padding: 9px 13px;
    white-space: nowrap;
    cursor: pointer;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    user-select: none;
}

.jw-tabs .tab:hover {
    color: var(--jw-text-primary);
}

.jw-tabs .tab.active-tab {
    color: var(--jw-text-primary) !important;
    border-bottom-color: var(--jw-accent) !important;
}

.jw-tabs .tab.disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* The consent/unavailable marker on the Agent status tab. */
.jw-tabs .tab .termsIcon {
    margin-left: 6px;
    color: var(--jw-data-lost);
}

/* --- segmented control --- */
.jw-segmented {
    display: inline-flex;
    padding: 2px;
    background: var(--jw-surface-sunken);
    border-radius: var(--jw-radius-md);
}

.jw-segmented button {
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--jw-text-secondary);
    padding: 5px 13px;
    border-radius: 5px;
}

.jw-segmented button[aria-pressed="true"] {
    background: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    box-shadow: var(--jw-shadow-1);
}

/* --- breadcrumbs --- */
.jw-crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--jw-text-muted);
    min-width: 0;
}

.jw-crumbs b {
    color: var(--jw-text-primary);
    font-weight: 600;
}

/* --- advanced-options disclosure --- */
details.jw-adv {
    border-top: 1px solid var(--jw-border-subtle);
    margin-top: 12px;
    padding-top: 10px;
}

details.jw-adv summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--jw-text-secondary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Both are needed: ::marker for standards-mode, ::-webkit-details-marker for older WebKit. */
details.jw-adv summary::marker,
details.jw-adv summary::-webkit-details-marker {
    display: none;
    content: "";
}

details.jw-adv summary::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .15s ease;
}

details.jw-adv[open] summary::before {
    transform: rotate(90deg);
}

.jw-advgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px 22px;
    padding: 14px 2px 4px;
}

.jw-advgrid h4 {
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    margin: 0 0 7px;
    font-weight: 600;
}

.jw-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 2.5px 0;
    cursor: pointer;
}

.jw-check input {
    accent-color: var(--jw-accent);
    width: 15px;
    height: 15px;
}

.jw-pilllist {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

/* --- chart layout --- */
.jw-chartgrid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 1180px) {
    .jw-chartgrid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.jw-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.jw-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--jw-text-secondary);
    font-weight: 500;
}

.jw-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex: none;
}

/* --- gauges -----------------------------------------------------------------
 * A ring drawn with stroke-dasharray on a circle. r=40 gives a circumference of
 * 2*PI*40 = 251.3, so the arc is set with stroke-dashoffset = 251.3 * (1 - pct).
 * Rotated -90deg so the arc starts at twelve o'clock rather than three.
 * -------------------------------------------------------------------------- */
.jw-gauges {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: space-around;
}

/*
 * The ring and its value share one grid cell, so the number is centred by the layout rather than
 * by arithmetic. The previous version pulled the value up with margin-top:-42px, which assumed a
 * line height it did not have and left it sitting ~19px low inside the ring — and would have
 * needed re-deriving for any other ring size.
 */
.jw-gauge {
    display: grid;
    grid-template-areas: "ring" "lbl";
    justify-items: center;
    /* align-content:start is load-bearing. .jw-gauges is a flex row, so every gauge stretches to
       the tallest — the SLA one, whose label wraps to two lines. Without this the auto rows
       absorb that extra height, the ring stays pinned at the top of its row and the value, being
       centred in the now-taller row, drifts below the ring. */
    align-content: start;
    gap: 4px;
    min-width: 96px;
}

.jw-gauge svg {
    grid-area: ring;
    transform: rotate(-90deg);
}

.jw-gauge__track {
    fill: none;
    stroke: var(--jw-surface-sunken);
    stroke-width: 9;
}

.jw-gauge__arc {
    fill: none;
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dashoffset .5s ease;
}

/* Overlaid on the ring. It stays AFTER the <svg> in source order so a screen reader still meets
   the ring, then its value, then its label, in that sequence. */
.jw-gauge__val {
    grid-area: ring;
    align-self: center;
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin: 0;
}

.jw-gauge__lbl {
    grid-area: lbl;
    font-size: 11.5px;
    color: var(--jw-text-muted);
    text-align: center;
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    .jw-gauge__arc,
    .jw-chev,
    details.jw-adv summary::before {
        transition: none;
    }
}

.jw-stat--wide {
    grid-column: span 2;
}

/* ============================================================================
 * 4b. LEGACY ALIASES — components
 *
 * Re-skins the existing button vocabulary in place. `.btn_small` alone has 189 call sites, so
 * this is a CSS-only change to markup we never touch. !important appears here only where the
 * rule being overridden already used it (style.css:2173, 2184, 307, 314) — this sheet loads
 * last, so ordinary rules win everywhere else.
 *
 * BURN-DOWN: delete each alias when `grep -c` for its class across Views/ reaches zero.
 *   .btn_small 189 | .btn_create 61 | .btn_delete 41 | .btn_help 35 | .btn_save 27
 * ========================================================================= */
.btn_small,
.btn-small,
.btn-default {
    border-radius: var(--jw-radius-sm);
    background-color: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-default);
    color: var(--jw-text-primary);
    font-weight: 600;
    transition: background-color .12s ease, border-color .12s ease;
}

.btn_small:hover,
.btn-small:hover,
.btn-default:hover {
    background-color: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

/* Constructive actions carry the accent. This single split is what demotes orange from an
   ambient surface colour to a signal. */
.btn_create,
.btn_save,
.btn_send {
    background-color: var(--jw-accent) !important;
    border-color: var(--jw-accent) !important;
    color: var(--jw-on-accent) !important;
}

.btn_create:hover,
.btn_save:hover,
.btn_send:hover {
    background-color: var(--jw-accent-hover) !important;
    border-color: var(--jw-accent-hover) !important;
    color: var(--jw-on-accent) !important;
}

.btn_delete,
.btn-danger {
    background-color: transparent !important;
    border: 1px solid var(--jw-data-lost) !important;
    color: var(--jw-data-lost) !important;
}

.btn_delete:hover,
.btn-danger:hover {
    background-color: var(--jw-data-lost) !important;
    color: #fff !important;
}

/* .btn_dark and .btn-second were solid dark slabs; they become the neutral secondary. */
.btn_dark,
.btn-dark,
.btnBlue {
    background-color: var(--jw-surface-raised) !important;
    border: 1px solid var(--jw-border-default) !important;
    color: var(--jw-text-primary) !important;
}

.btn_dark:hover,
.btn-dark:hover,
.btnBlue:hover {
    background-color: var(--jw-surface-sunken) !important;
    color: var(--jw-text-primary) !important;
}

/* .btn-second and .btn-red colour TEXT rather than a background (style.css:307,314). */
.btn-second {
    color: var(--jw-text-secondary) !important;
}

.btn-red {
    color: var(--jw-data-lost) !important;
}

/* --- shared form vocabulary -------------------------------------------------
 * These are not Report-specific: .alt-box appears in 47 views, .control-label in 47,
 * .alt-form-control in 39, .checkbox-simple in 25. Restyling them here covers Detailed Reports,
 * the 33 scheduled-task forms, Admin, Caller ID, ChatLogs, CSAT, NPS and Wallboard settings at
 * once. Markup is untouched.
 * --------------------------------------------------------------------------- */

/* Was a four-layer rgba drop shadow with `border: 0px solid` — a card pretending to float. */
.alt-box {
    background-color: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-1);
}

/* Was 30px tall and set in Roboto — a font this app never loads, so it silently fell back. */
.alt-form-control,
select.alt-form-control,
input.alt-form-control {
    font-family: var(--jw-font-ui);
    font-size: 13.5px;
    font-weight: 400;
    height: auto;
    min-height: 34px;
    line-height: 1.4;
    padding: 6px 10px;
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    background-color: var(--jw-surface-raised);
    color: var(--jw-text-primary);
}

.alt-form-control:focus {
    outline: 2px solid var(--jw-focus);
    outline-offset: 0;
    border-color: var(--jw-focus);
}

.control-label {
    font-size: 10.5px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.form-control-inline {
    font-family: var(--jw-font-ui);
    font-size: 13.5px;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    background-color: var(--jw-surface-raised);
    color: var(--jw-text-primary);
}

/* --- advanced search disclosure ---------------------------------------------
 * Views/Report/Generated.cshtml, repeated once per tab (9 panels).
 *
 * Restyled, NOT rebuilt into a <details>. The toggle is
 * `<input type="checkbox" asp-for="…SearchSettings.Show">` — a model-bound field that round-trips
 * the open/closed state through the POST, and tools/report-formdata-baseline.js guards that
 * payload. A <details> element has no such binding, so swapping it would change the form data on
 * all nine tabs.
 *
 * The chevron stays the existing two-span .arrow, which style.css already rotates off
 * `:checked ~ .arrow`. Only its colour and the surrounding chrome change here.
 * --------------------------------------------------------------------------- */
.alt-advanced-settings {
    border-top: 1px solid var(--jw-border-subtle);
    margin-top: 12px;
    padding-top: 4px;
}

.alt-advanced-settings .toggleButton label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--jw-text-secondary);
    letter-spacing: .01em;
}

.alt-advanced-settings .toggleButton:hover label {
    color: var(--jw-text-primary);
}

.alt-advanced-settings .toggleButton .arrow span {
    background: var(--jw-text-muted);
}

/* Open state. The checkbox is visually-hidden, so :checked is the only signal available. */
.alt-advanced-settings .toggleButton > input[type="checkbox"]:checked ~ .arrow span {
    background: var(--jw-accent);
}

/* Keyboard users get no focus ring from a visually-hidden checkbox, so surface it on the label. */
.alt-advanced-settings .toggleButton > input[type="checkbox"]:focus-visible ~ .arrow {
    outline: 2px solid var(--jw-focus);
    outline-offset: 3px;
    border-radius: 2px;
}

.alt-hidden-settings h5 {
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    font-weight: 600;
    margin-bottom: 7px;
}

/* --- custom checkboxes: the hidden-companion bug ------------------------------
 *
 * style.css draws all four checkbox variants by hiding the real input (opacity:0) and styling the
 * <span> next to it:
 *
 *     .checkbox input[type=checkbox] + span { width:20px; height:20px; border:1px solid … }
 *
 * That is an ADJACENT sibling selector, so it only matches when the span comes immediately after
 * the input. Razor's Html.EditorFor / CheckBoxFor on a bool emits TWO elements — the checkbox and
 * a hidden companion carrying the "false" value:
 *
 *     <input type="checkbox" …><input name="…" type="hidden" value="false"><span></span>
 *
 * so the span is no longer adjacent, the rule does not match, and the box is simply not drawn.
 * Measured: with the companion the span computes to display:inline, auto × auto, border 0 —
 * invisible. Without it, 20 × 20 with a 1px border.
 *
 * This affects every EditorFor-rendered checkbox in the app: the Admin settings lists and the
 * Advanced Report advanced-options panel among them. The plain <input type="checkbox"> ones (the
 * "Select all" toggles) have no companion and have always worked, which is why those pages look
 * half-broken rather than obviously broken.
 *
 * Fixed here rather than in style.less because that file needs Visual Studio's Web Compiler to
 * rebuild and style.min.css is what actually ships. Matching the companion explicitly gives
 * (0,3,3) against the original's (0,2,2), so it wins without needing !important, and it cannot
 * over-match a later unrelated <span> the way `~ span` would.
 *
 * The four variants are normalised to one appearance on purpose — they differ today only by a
 * couple of pixels of margin and a hard-coded #cfdadd border that ignores the theme.
 * --------------------------------------------------------------------------- */
.checkbox input[type="checkbox"] + input[type="hidden"] + span,
.checkbox-right input[type="checkbox"] + input[type="hidden"] + span,
.checkbox-simple input[type="checkbox"] + input[type="hidden"] + span,
.checkbox-simple-centered input[type="checkbox"] + input[type="hidden"] + span {
    width: 20px;
    height: 20px;
    display: block;
    position: relative;
    margin: 2.5px 7.5px 0 0;
    box-sizing: border-box;
    text-indent: -999px;
    overflow: hidden;
    border: 1px solid var(--jw-border-strong);
    border-radius: var(--jw-radius-sm);
    background: var(--jw-surface-raised);
    cursor: pointer;
    float: left;
}

/* The inner mark, scaled up when checked — same mechanism as the original. */
.checkbox input[type="checkbox"] + input[type="hidden"] + span::before,
.checkbox-right input[type="checkbox"] + input[type="hidden"] + span::before,
.checkbox-simple input[type="checkbox"] + input[type="hidden"] + span::before,
.checkbox-simple-centered input[type="checkbox"] + input[type="hidden"] + span::before {
    content: "";
    width: 10px;
    height: 10px;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    margin: auto;
    border-radius: 1px;
    background-color: var(--jw-accent);
    transform: scale(0);
    transition: transform .18s cubic-bezier(1, 0, .4, .5);
}

.checkbox input[type="checkbox"]:checked + input[type="hidden"] + span::before,
.checkbox-right input[type="checkbox"]:checked + input[type="hidden"] + span::before,
.checkbox-simple input[type="checkbox"]:checked + input[type="hidden"] + span::before,
.checkbox-simple-centered input[type="checkbox"]:checked + input[type="hidden"] + span::before {
    transform: scale(1);
}

/* The real input is opacity:0 and absolutely positioned, so keyboard focus has nothing visible.
   Put the ring on the box the user can actually see. */
.checkbox input[type="checkbox"]:focus-visible + input[type="hidden"] + span,
.checkbox-right input[type="checkbox"]:focus-visible + input[type="hidden"] + span,
.checkbox-simple input[type="checkbox"]:focus-visible + input[type="hidden"] + span,
.checkbox-simple-centered input[type="checkbox"]:focus-visible + input[type="hidden"] + span {
    outline: 2px solid var(--jw-focus);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .checkbox input[type="checkbox"] + input[type="hidden"] + span::before,
    .checkbox-right input[type="checkbox"] + input[type="hidden"] + span::before,
    .checkbox-simple input[type="checkbox"] + input[type="hidden"] + span::before,
    .checkbox-simple-centered input[type="checkbox"] + input[type="hidden"] + span::before {
        transition: none;
    }
}

/* --- results cards ----------------------------------------------------------
 * Views/Report/Results/_Results.cshtml (1,996 lines) and _DiffSection.cshtml build their KPI
 * tiles from .big-card > .card-body > .card-box and .card-footer > .widget. That markup is
 * deliberately NOT rewritten: it is deeply conditional, and ReportPrintStyle.min.css hooks these
 * exact selectors (.big-card .card-body .card-box .icon-wrapper, .col-4:first-child …), so
 * changing it would silently break printed reports. Restyling gets the same result with none of
 * that risk.
 * --------------------------------------------------------------------------- */
.Individual-cards .big-card {
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-1);
    border: 1px solid var(--jw-border-subtle);
    background-color: var(--jw-surface-raised);
}

.big-card .card-body .card-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--jw-radius-lg);
    border: 1px solid var(--jw-border-subtle);
    background-color: var(--jw-surface-raised);
    box-shadow: var(--jw-shadow-1);
    padding: 13px 15px 14px;
    gap: 12px;
}

/*
 * The accent rail, matching .jw-stat on Daily Overview.
 *
 * The markup here cannot be touched (ReportPrintStyle.min.css hooks it), so the rail takes its
 * colour from the bg-* class already on .icon-wrapper-bg — the element that carries the call
 * type today. :has() reads it without a single markup change; this sheet already depends on
 * :has() for the sign-in screens in section 4c.
 */
.big-card .card-body .card-box::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--jw-card-rail, transparent);
}

.big-card .card-body .card-box:has(.bg-inbound) { --jw-card-rail: var(--jw-data-inbound); }
.big-card .card-body .card-box:has(.bg-outbound) { --jw-card-rail: var(--jw-data-outbound); }
.big-card .card-body .card-box:has(.bg-internal) { --jw-card-rail: var(--jw-data-internal); }
.big-card .card-body .card-box:has(.bg-lost) { --jw-card-rail: var(--jw-data-lost); }
.big-card .card-body .card-box:has(.bg-answered) { --jw-card-rail: var(--jw-data-answered); }
.big-card .card-body .card-box:has(.bg-dina) { --jw-card-rail: var(--jw-data-dina); }
.big-card .card-body .card-box:has(.bg-total) { --jw-card-rail: var(--jw-text-muted); }

/* Was uppercase and painted with --link-color — one of the nine variables that was never
   declared, so this header had no colour at all until the alias layer gave it one. */
.big-card .card-header {
    text-transform: none;
    color: var(--jw-text-primary);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--jw-border-subtle);
    background-color: transparent;
}

.big-card .card-footer {
    background-color: var(--jw-surface-inset);
    border-top: 1px solid var(--jw-border-subtle);
}

.big-card .card-body .card-box .card-content .content-numbers,
.widget-chart .widget-numbers,
.widget .widget-numbers {
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -.028em;
    line-height: 1.12;
    font-variant-numeric: tabular-nums;
    margin: 4px 0 6px;
}

/* The original stacked these with negative margins tuned to a 2.5rem numeral; at the new size
   the value and its description collided. */
.big-card .card-body .card-box .card-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.big-card .card-body .card-box .card-content .content-subheading,
.widget-heading {
    opacity: 1;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--jw-text-muted);
    font-weight: 600;
}

.widget-subheading,
.big-card .card-body .card-box .card-content .content-description {
    font-size: 12px;
    color: var(--jw-text-secondary);
}

/* The disc keeps the call-type colour coding; it was just oversized — five saturated 50px
   circles were the loudest thing on the page. Selector matches style.css:8043.
   The disc stays fully OPAQUE on purpose: the glyph inside carries .color-white with
   !important, so tinting the disc back would leave a white icon on a pale wash. Recolouring
   the glyph instead would mean fighting a second !important for no real gain. */
.icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 99px;
    flex: none;
    justify-content: center;
}

.big-card .card-body .card-box .icon-wrapper {
    min-width: 38px;
    width: 38px;
    height: 38px;
    margin: 0 .75rem 0 0;
    border-radius: 99px;
    justify-content: center;
}

.icon-wrapper .icon-wrapper-bg {
    border-radius: 99px;
}

/*
 * .color-blue is deliberately NOT given a colour. Do not "fix" it again.
 *
 * _Results.cshtml uses a three-band traffic light on its rates — .color-green (12 uses),
 * .color-blue (27) and .color-lost (18). Only .color-lost has ever been declared (style.css);
 * the other two have always rendered in the inherited text colour, which is white in dark theme.
 *
 * An earlier pass read "defined nowhere" as a bug and declared .color-blue as the outbound blue.
 * That was wrong twice over: it changed the look of 27 figures nobody asked to change, and it
 * coloured only the MIDDLE band while leaving .color-green undeclared — so the traffic light read
 * plain / blue / red, which signals the opposite of what a middling value means. Reverted to the
 * original behaviour on the team's instruction.
 *
 * If the bands should ever be colour-coded properly, that is a product decision covering all
 * three at once, not a one-line CSS fix.
 */

.color-yellow {
    color: var(--jw-accent-ink);
}

/* The tab strip. .active-tab already keys off --primary, which is a correct accent use — an
   active state — so only the resting and hover states are restyled here. */
.tab-chart-wrap .tab-chart-nav .tab {
    color: var(--jw-text-muted);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.tab-chart-wrap .tab-chart-nav .tab:hover {
    color: var(--jw-text-primary);
}

.tab-chart-wrap .tab-chart-nav .tab.disabled {
    opacity: .45;
}

/* --- .box, the other card container ----------------------------------------
 * Same four-layer rgba shadow and `border: 0px solid` as .alt-box. Used by Admin, ContactList,
 * CallerId, PromptSettings, BlockNumber, CSAT, Home and Report.
 * --------------------------------------------------------------------------- */
.box,
.boxForDiffs {
    background-color: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-1);
}

/* --- tables ------------------------------------------------------------------
 * One treatment for the whole family. These evolved separately and drifted:
 * .show_table (Admin), .settings_table (8 views), .settingsTable, .table_blue, .popup_table.
 * Header contrast, cell rhythm and row separation are now identical everywhere.
 * table-layout:fixed is deliberately NOT touched — several pages size columns by it.
 * --------------------------------------------------------------------------- */
.show_table thead,
.settings_table thead,
.settingsTable thead,
.table_blue thead,
.popup_table thead {
    background-color: var(--jw-surface-inset);
    color: var(--jw-text-secondary);
}

.show_table thead th,
.settings_table thead th,
.settingsTable thead th,
.table_blue thead th,
.popup_table thead th {
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--jw-text-secondary);
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--jw-border-default);
}

.show_table tbody td,
.settings_table tbody td,
.settingsTable tbody td,
.table_blue tbody td,
.popup_table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--jw-border-subtle);
    color: var(--jw-text-primary);
}

/* Zebra striping was done with --secondary, which is now a surface token. */
.show_table tbody tr:nth-child(2n) td,
.settings_table tbody tr:nth-child(2n) td,
.settingsTable tbody tr:nth-child(2n) td {
    background-color: var(--jw-surface-inset);
}

.show_table tbody tr:hover td,
.settings_table tbody tr:hover td,
.settingsTable tbody tr:hover td,
.table_blue tbody tr:hover td {
    background-color: var(--jw-accent-wash);
}

.table_noHover tbody tr:hover td {
    background-color: revert;
}

/* --- modals ------------------------------------------------------------------
 * Two systems exist: this CSS one (.popup_window / .popup_box, 4 views) and SweetAlert2
 * (310 Swal.fire calls). Both are skinned so a dialog looks the same whichever it came from.
 * --------------------------------------------------------------------------- */
.popup_window {
    background-color: rgba(8, 12, 16, .55);
    backdrop-filter: blur(2px);
}

.popup_box {
    background-color: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-3);
}

.popup_header {
    background-color: var(--jw-surface-inset);
    color: var(--jw-text-primary);
    border-bottom: 1px solid var(--jw-border-subtle);
}

/* SweetAlert2 11.10.0, CDN-pinned in _Layout. Skinning the classes rather than passing
   customClass to 310 call sites. Keep the version pinned — a bump can rename these. */
.swal2-popup {
    background: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-3);
    font-family: var(--jw-font-ui);
}

.swal2-title {
    color: var(--jw-text-primary);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.015em;
}

.swal2-html-container {
    color: var(--jw-text-secondary);
    font-size: 14px;
}

/* The three background-colours below are !important on purpose. SweetAlert2 writes
   confirmButtonColor / denyButtonColor / cancelButtonColor as an INLINE style
   (t.style.backgroundColor = ...), which beats any stylesheet rule without it. Nineteen
   call sites across the app still pass those options - LightSeaGreen in Report/Task,
   #3085d6 and #d33 throughout Calendar.js, #DD6B55 in the CSAT views and layout_script -
   and every one of them would otherwise punch a stray colour through the skin. Only
   background-color is set inline, so nothing else here needs the flag. Drop the flags
   once those nineteen options are gone from the call sites. */
.swal2-popup .swal2-styled.swal2-confirm {
    background-color: var(--jw-accent) !important;
    color: var(--jw-on-accent);
    border-radius: var(--jw-radius-sm);
    font-weight: 600;
}

.swal2-popup .swal2-styled.swal2-confirm:focus {
    box-shadow: 0 0 0 3px var(--jw-accent-wash);
}

.swal2-popup .swal2-styled.swal2-cancel {
    background-color: var(--jw-surface-raised) !important;
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    font-weight: 600;
}

.swal2-popup .swal2-styled.swal2-deny {
    background-color: var(--jw-data-lost) !important;
    border-radius: var(--jw-radius-sm);
    font-weight: 600;
}

.swal2-popup .swal2-input,
.swal2-popup .swal2-select,
.swal2-popup .swal2-textarea {
    background: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    box-shadow: none;
}

/* --- DataTables 2.3.2 (Report/Task) ----------------------------------------- */
.dataTables_wrapper,
div.dt-container {
    color: var(--jw-text-primary);
    font-size: 13px;
}

table.dataTable thead th,
table.dataTable thead td {
    background-color: var(--jw-surface-inset);
    color: var(--jw-text-secondary);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid var(--jw-border-default);
}

table.dataTable tbody td {
    border-top: 1px solid var(--jw-border-subtle);
    color: var(--jw-text-primary);
}

table.dataTable tbody tr {
    background-color: transparent;
}

table.dataTable tbody tr:hover td {
    background-color: var(--jw-accent-wash);
}

div.dt-container .dt-paging .dt-paging-button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--jw-text-secondary) !important;
    border-radius: var(--jw-radius-sm);
    border: 1px solid transparent;
}

div.dt-container .dt-paging .dt-paging-button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--jw-accent-wash) !important;
    border-color: var(--jw-accent) !important;
    color: var(--jw-text-primary) !important;
}

div.dt-container .dt-search input,
div.dt-container .dt-length select,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: var(--jw-surface-raised);
    color: var(--jw-text-primary);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    padding: 5px 9px;
    min-height: 30px;
}

/* style.css:1787 paints every in-page <h2> with --primary, which is the single biggest source
   of ambient orange in the app. Headings are structure, not signal, so they take normal text
   colour; orange stays on actions and state. */
.jw-main > content h2 {
    color: var(--jw-text-primary);
}

/* .companyName is absolutely positioned and full-width, centred for the old 50px header
   (style.css:357). Inside the new topbar it would overlap everything, so it is reset to a
   normal flex child here. */
.jw-topbar .companyName {
    position: static;
    width: auto;
    display: block;
    line-height: normal;
    justify-content: flex-start;
}

/* .header-options pushes itself right with margin-left:auto and a 25px gutter; the topbar
   already has its own spacer. */
.jw-topbar .header-options {
    margin-left: 0;
    margin-right: 0;
    gap: 6px;
}

/* ============================================================================
 * 4c. SIGN-IN SCREENS
 *
 * loginStyle.less carries its own LESS @@variable palette (@@orange, @@databg1, @@background …)
 * that predates the tokens and never shared a value with them. It is authored with real LESS
 * variables, so unlike the other sheets it cannot be regenerated here — these overrides bring
 * it onto the token system from outside instead. _loginLayout pins data-theme="dark", so the
 * tokens below resolve to the dark set.
 * ========================================================================= */
body:has(.loginbox),
body:has(.login-button),
body:has(.auth) {
    background-color: var(--jw-surface-base);
    font-family: var(--jw-font-ui);
    color: var(--jw-text-primary);
}

.txt {
    background: var(--jw-surface-inset);
    color: var(--jw-text-primary);
    font-family: var(--jw-font-ui);
    font-size: 14px;
    height: 46px;
    border: 1px solid var(--jw-border-default);
    border-right: 0;
    border-radius: 0 var(--jw-radius-sm) var(--jw-radius-sm) 0;
}

.txt:focus {
    outline: 2px solid var(--jw-focus);
    outline-offset: -1px;
}

.txt::placeholder {
    color: var(--jw-text-muted);
}

.icon {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-secondary);
    height: 46px;
    line-height: 46px;
    min-width: 46px;
    border: 1px solid var(--jw-border-default);
    border-right: 0;
    border-radius: var(--jw-radius-sm) 0 0 var(--jw-radius-sm);
}

/* The sign-in button was white on #F7921E — 2.31:1, well under the 4.5:1 minimum, on the one
   control every user has to find. Near-black on the same orange measures 8.02:1. The
   two-stop gradient went with it; it existed only to animate a hover wipe.
   .login-button-div is a second, near-identical orange button used on the other auth screens
   (loginStyle.less:299) and carries the same defect. */
.login-button,
.login-button-div {
    background: var(--jw-accent);
    background-image: none;
    color: var(--jw-on-accent);
    text-transform: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--jw-radius-sm);
    box-shadow: none;
    padding: 0 18px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
}

.login-button:hover,
.login-button-div:hover {
    background: var(--jw-accent-hover);
    color: var(--jw-on-accent);
}

.login-button:focus-visible,
.login-button-div:focus-visible {
    outline: 2px solid var(--jw-focus);
    outline-offset: 2px;
}

/* `.symmetry` is a spacer that pairs with the trailing icon so the label sits centred under
   justify-content:space-between. It has no width of its own, so it needs to match the icon. */
.login-button .symmetry {
    min-width: 16px;
}

/* loginStyle.css:10 declares a bare `div { color: white }` — every <div> on an auth page, at
   specificity (0,0,1). The sign-in label lives in a <div class="btnText"> inside the button, so
   it took white DIRECTLY and never inherited the button's colour: recolouring .login-button
   alone left the visible text at 2.31:1. (0,1,1) here is enough to win.
   Same class of trap as the bare `nav`/`header` selectors in style.less — worth knowing before
   adding any new markup to these screens. */
.login-button div,
.login-button span,
.login-button p,
.login-button-div div,
.login-button-div span {
    color: inherit;
}

.error_box,
.error {
    color: var(--jw-data-lost);
}

.success {
    color: var(--jw-data-answered);
}

/* ============================================================================
 * 4f. SAVE BAR   (wwwroot/js/jw-settings.js)
 *
 * One Save for a page of settings. Sticky rather than fixed, so it tracks the content column and
 * needs no knowledge of the rail width or whether the rail is collapsed.
 * ========================================================================= */
.jw-savebar {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 12px 16px;
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-2);
    /* Out of the way, but still in the layout, so appearing does not shift the page under the
       pointer while someone is still editing. */
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.jw-savebar.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.jw-savebar.is-busy {
    /* Feedback that the request is in flight; the button is disabled separately. */
    opacity: .72;
}

.jw-savebar__msg {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--jw-text-secondary);
}

.jw-savebar__msg b {
    color: var(--jw-text-primary);
    font-variant-numeric: tabular-nums;
}

.jw-savebar__actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Per-section outcomes. Three states, because "the write ran and matched no row" is neither a
   success worth a tick nor a failure worth an alarm. */
.jw-savebar__results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    order: 3;
}

.jw-savebar__result {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    border: 1px solid transparent;
}

.jw-savebar__result.is-saved {
    color: var(--jw-data-answered);
    background: color-mix(in srgb, var(--jw-data-answered) 12%, transparent);
    border-color: color-mix(in srgb, var(--jw-data-answered) 30%, transparent);
}

.jw-savebar__result.is-failed {
    color: var(--jw-data-lost);
    background: color-mix(in srgb, var(--jw-data-lost) 12%, transparent);
    border-color: color-mix(in srgb, var(--jw-data-lost) 32%, transparent);
}

.jw-savebar__result.is-unchanged,
.jw-savebar__result.is-pending {
    color: var(--jw-text-secondary);
    background: var(--jw-surface-sunken);
    border-color: var(--jw-border-default);
}

/*
 * NO marker is painted on the section itself, deliberately.
 *
 * This was an `inset 3px 0 0 var(--jw-accent)` rail on the dirty section. It was a bad idea twice
 * over: an unexplained orange bar appearing beside a checkbox the moment you tick it reads as a
 * rendering fault rather than a feature, and it barely worked anyway — these sections contain
 * <ul class="admin"> lists whose <li> backgrounds paint straight over the parent's inset shadow,
 * so it showed only in the gaps.
 *
 * Which groups are unsaved is now said in words, in the save bar, where the count already is.
 * See renderPending() in wwwroot/js/jw-settings.js.
 */

@media (prefers-reduced-motion: reduce) {
    .jw-savebar {
        transition: none;
    }
}

/* ============================================================================
 * 4d. CHARTS
 *
 * Companion to wwwroot/js/jw-charts.js. That file resolves tokens to hex for everything
 * ApexCharts draws INSIDE the SVG (it writes literal hex and ignores var()). What is left here
 * is the chrome Apex renders as real DOM — tooltip, legend, toolbar, no-data — which CSS can
 * still reach, plus the two-panel layout the wait-time split needs.
 * ========================================================================= */

/* Wait time gets its own panel under a shared x-axis rather than a second y-axis on the same
   plot. Two scales in one frame invite a comparison between seconds and call counts that is not
   meaningful. The panel is short on purpose: it is context, not a headline. */
.jw-chart-stack {
    display: block;
    width: 100%;
}

.jw-chart-stack .jw-chart-main {
    width: 100%;
}

.jw-chart-stack .jw-chart-sub {
    width: 100%;
    margin-top: -6px;
    border-top: 1px solid var(--jw-border-subtle);
    padding-top: 6px;
}

.jw-chart-sub-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--jw-text-muted);
    letter-spacing: .02em;
    margin: 8px 0 0 25px;
}

/* Apex renders the tooltip as DOM, so it keeps its own light/dark theme classes. Both are
   re-pointed at the tokens; otherwise `theme: 'dark'` paints a near-black card on a light page. */
.apexcharts-tooltip.apexcharts-theme-light,
.apexcharts-tooltip.apexcharts-theme-dark {
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-md);
    box-shadow: var(--jw-shadow-2);
    color: var(--jw-text-primary);
}

.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
    background: var(--jw-surface-inset);
    border-bottom: 1px solid var(--jw-border-subtle);
    color: var(--jw-text-secondary);
    font-weight: 600;
}

.apexcharts-tooltip-series-group.apexcharts-active {
    color: var(--jw-text-primary);
}

/* chart.group replays the tooltip onto the sibling panel; the group also needs the sibling's
   tooltip ENABLED or Apex throws on mousemove (seriesHover dereferences its tooltip DOM). So the
   replayed tooltip is hidden here instead: visible only in the panel the pointer is actually over.
   opacity, not display — Apex measures the tooltip box on every mousemove. */
.jw-chart-stack .jw-chart-main:not(:hover) .apexcharts-tooltip,
.jw-chart-stack .jw-chart-sub:not(:hover) .apexcharts-tooltip {
    opacity: 0;
}

/* Synced crosshair: one thin theme-coloured line instead of Apex's grey #B1B9C4 band. */
.jw-chart-stack .apexcharts-xcrosshairs {
    fill: var(--jw-border-default);
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
    background: var(--jw-surface-inverse);
    color: var(--jw-text-inverse);
    border: 0;
}

.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
    border-bottom-color: var(--jw-surface-inverse);
}

.apexcharts-legend-text {
    color: var(--jw-text-secondary) !important;
    font-family: var(--jw-font-ui) !important;
}

/* Apex paints its dark-theme canvas #424242 (rule ships in apexcharts.css AND is re-injected
   as an inline <style> at runtime, so source order cannot beat it — hence !important). Our
   charts sit on .jw-panel surfaces that already carry the theme; the canvas stays transparent. */
.apexcharts-canvas.apexcharts-theme-dark {
    background: transparent !important;
}

/* The toolbar icons are inline SVG with a hard-coded fill; Apex only exposes them by class. */
.apexcharts-toolbar svg {
    fill: var(--jw-text-muted);
}

.apexcharts-menu {
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-sm);
    box-shadow: var(--jw-shadow-2);
}

.apexcharts-menu-item:hover {
    background: var(--jw-accent-wash);
}

/* ============================================================================
 * 4e. RESULTS GRID v2   (Features:ReportGridV2, Views/Shared/Report.cshtml)
 *
 * Scoped entirely under .jw-grid-v2 so the flag can be flipped off by removing one class, and
 * so nothing here can reach the printed report — ReportPrintStyle.min.css hooks exact legacy
 * selectors in _Results.cshtml and cannot be regenerated in this repo.
 *
 * THE STRUCTURE THIS HAS TO WORK WITH: the header row and every data row are separate <table>
 * elements, and style.css:8237-8265 flips their cells to display:block so the outer table reads
 * as a stack. They only line up because table-layout:fixed hands both the same column count.
 * That is why nothing below adds, removes or reorders a cell — the chevron is a ::before on the
 * first cell, and alignment changes are applied to header and body together or not at all.
 * ========================================================================= */

/* Sticky header. The header is the first > tr of the outer table, so it can stick on its own
   without the body needing a scroll container. Offset by the topbar, which is fixed. */
.jw-grid-v2 > tbody > tr:first-child {
    position: sticky;
    top: var(--jw-topbar-h);
    z-index: 3;
}

.jw-grid-v2 > tbody > tr:first-child th {
    background: var(--jw-surface-inset);
    color: var(--jw-text-secondary);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--jw-border-default);
    box-shadow: 0 1px 0 var(--jw-border-default);
}

/*
 * Figures line up only if the glyphs are the same width. Every cell in this grid is either a
 * count, a duration or a time span, so this applies to the whole grid rather than being hunted
 * per column — which also means it cannot go stale when a column is added.
 */
.jw-grid-v2 td,
.jw-grid-v2 th {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/*
 * Numerics right-align; the leading time/date column stays left. Applied to header and body
 * with the same rule so the two tables cannot drift apart.
 * :not(:first-child) rather than a column list, for the same reason as above.
 */
.jw-grid-v2 > tbody > tr th:not(:first-child),
.jw-grid-v2 .advSearchTableRow > td:not(:first-child) {
    text-align: right;
    padding-right: 14px;
}

.jw-grid-v2 > tbody > tr th:first-child,
.jw-grid-v2 .advSearchTableRow > td:first-child {
    text-align: left;
    padding-left: 12px;
}

/* Zebra. The data rows are one table each, sitting in sibling <td>s of the second > tr, so the
   stripe has to be counted on those <td>s — not on tr:nth-child, which would always be 1. */
.jw-grid-v2 > tbody > tr > td:nth-child(odd) {
    background-color: var(--jw-surface-raised);
}

.jw-grid-v2 > tbody > tr > td:nth-child(even) {
    background-color: var(--jw-surface-inset);
}

.jw-grid-v2 .advSearchTableRow:hover > td {
    background-color: var(--jw-accent-wash);
}

/*
 * The open row already has a treatment: style.css:8546 paints .activeHead with --btn-hover and
 * white text, which measures ~9:1 and reads clearly as "selected". That is left alone — v2 only
 * adds a leading accent bar, on the FIRST cell only. Putting it on every td draws a stripe at
 * each cell boundary, because these cells are display:table-cell.
 */
.jw-grid-v2 .advSearchTableRow.activeHead > td:first-child {
    box-shadow: inset 3px 0 0 var(--jw-accent);
}

/*
 * Disclosure affordance. These rows have always been clickable with nothing to say so. The
 * chevron is a pseudo-element on the existing first cell, so it costs no column, and it turns
 * when loadDetailed() adds .activeHead.
 */
.jw-grid-v2 .advSearchTableRow > td:first-child::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 8px;
    vertical-align: middle;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid var(--jw-text-muted);
    transition: transform .15s ease;
}

.jw-grid-v2 .advSearchTableRow.activeHead > td:first-child::before {
    transform: rotate(90deg);
    border-left-color: var(--jw-accent);
}

.jw-grid-v2 .advSearchTableRow:focus-visible {
    outline: 2px solid var(--jw-focus);
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .jw-grid-v2 .advSearchTableRow > td:first-child::before {
        transition: none;
    }
}

/* ============================================================================
 * 5. RESPONSIVE
 * The rail collapses to icons, then to a slide-over. The old layout hid submenus entirely
 * below 1000px, which left Report, Wallboard, Caller ID and Contact lists unreachable on a
 * phone — submenus stay reachable here.
 * ========================================================================= */
.jw-shell.is-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
}

.jw-shell.is-collapsed .jw-rail__word,
.jw-shell.is-collapsed .jw-nav__label,
.jw-shell.is-collapsed .jw-nav__caret,
.jw-shell.is-collapsed .jw-nav__section,
.jw-shell.is-collapsed .jw-rail__foot {
    display: none;
}

.jw-shell.is-collapsed .jw-nav__item {
    justify-content: center;
    padding: 8px 0;
}

.jw-shell.is-collapsed .jw-nav__sub {
    display: none !important;
}

/* Collapsed rail keeps the tenant logo the way it keeps the J-mark: a small centered
   square. Same <img>, just constrained — customers upload a single file. */
.jw-shell.is-collapsed .jw-rail__top {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.jw-shell.is-collapsed .jw-rail__logo {
    max-width: 44px;
    max-height: 32px;
}

/* Same principle collapsed: the chip absorbs its own padding (48px is the full width
   between the collapsed rail's 8px gutters), keeping the image at light-theme size. */
[data-theme="dark"] .jw-shell.is-collapsed .jw-rail__logo {
    padding: 3px;
    max-width: 48px;
    max-height: 38px;
}

@media (max-width: 900px) {
    .jw-shell,
    .jw-shell.is-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .jw-rail {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(280px, 84vw);
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: var(--jw-shadow-3);
    }

    .jw-shell.is-open .jw-rail {
        transform: none;
    }

    .jw-shell.is-collapsed .jw-rail__word,
    .jw-shell.is-collapsed .jw-nav__label,
    .jw-shell.is-collapsed .jw-nav__caret,
    .jw-shell.is-collapsed .jw-nav__section,
    .jw-shell.is-collapsed .jw-rail__foot {
        display: revert;
    }

    /* The slide-over is full-width chrome again, so undo the collapsed logo square. */
    .jw-shell.is-collapsed .jw-rail__top {
        justify-content: flex-start;
        padding-left: 14px;
        padding-right: 14px;
    }

    .jw-shell.is-collapsed .jw-rail__logo {
        max-width: 100%;
        max-height: 40px;
        padding: 0;
    }

    /* Explicit restore rather than `revert`: revert would jump past ALL author rules,
       losing the dark-theme chip padding declared in section 1. */
    [data-theme="dark"] .jw-shell.is-collapsed .jw-rail__logo {
        padding: 4px 8px;
        max-width: 100%;
        max-height: 48px;
    }

    .jw-shell.is-collapsed .jw-nav__item {
        justify-content: flex-start;
        padding: 7px 8px;
    }

    .jw-shell.is-collapsed .jw-nav__sub {
        display: none;
    }

    .jw-shell.is-collapsed .jw-nav__group.is-open > .jw-nav__sub {
        display: block !important;
    }

    .jw-scrim {
        position: fixed;
        inset: 0;
        background: rgba(8, 12, 16, .5);
        z-index: 19;
        display: none;
    }

    .jw-shell.is-open .jw-scrim {
        display: block;
    }

    .jw-main > content > article {
        padding: 16px 14px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jw-rail,
    .jw-nav__caret,
    .jw-btn {
        transition: none;
    }
}

/* ============================================================================
 * 6. PRINT
 *
 * PDF export is window.print(), so this is a customer-facing deliverable.
 *
 * Specificity note: ReportPrintStyle.min.css is linked from each page's @@section Head, which
 * renders AFTER this file, so equal-specificity rules there would win. :root (0,1,0) beats its
 * bare `html` (0,0,1) — which is how the stray `html{background-color:#8a2be2}` debug leftover
 * in ReportPrintStyle gets neutralised here rather than by editing a .less we cannot recompile.
 * ========================================================================= */
@media print {
    /* Force the light token set. Without this, printing while in dark theme gives black pages,
       and headless Chrome — which has no cookie and no localStorage — would inherit whatever
       prefers-color-scheme says and render scheduled PDFs dark. */
    :root,
    :root[data-theme="dark"] {
        --jw-surface-base: #FFFFFF;
        --jw-surface-raised: #FFFFFF;
        --jw-surface-sunken: #FFFFFF;
        --jw-surface-inset: #F4F6F8;
        --jw-text-primary: #171C22;
        --jw-text-secondary: #4E5968;
        --jw-text-muted: #4E5968;
        --jw-border-subtle: #D8DEE6;
        --jw-border-default: #BEC7D2;
        --jw-accent-ink: #A65B00;
        --jw-accent-wash: transparent;
        --jw-shadow-1: none;
        --jw-shadow-2: none;
        --jw-shadow-3: none;
        --jw-data-inbound: #B96E01;
        --jw-data-outbound: #0871C2;
        --jw-data-internal: #20A082;
        --jw-data-lost: #9E122B;
        --jw-data-answered: #44A84D;
        --jw-data-dina: #8E4393;
        --jw-data-average: #7E63BF;
        --jw-status-1: #44A84D;
        --jw-status-2: #A67B00;
        --jw-status-3: #9E122B;
        --jw-status-4: #39539E;
        --jw-status-5: #0E7FA6;
        background-color: #FFFFFF;
    }

    body.jw-body {
        background: #FFFFFF;
    }

    /* Shell chrome is not part of the report. */
    .jw-rail,
    .jw-topbar,
    .jw-scrim,
    .hideWhenprint {
        display: none !important;
    }

    .jw-shell {
        display: block;
        min-height: 0;
    }

    .jw-main > content > article {
        padding: 0;
    }

    /* Panels become plain blocks; a printed page has no elevation. */
    .jw-panel,
    .jw-stat,
    .jw-toolbar {
        box-shadow: none;
        border-color: #D8DEE6;
        break-inside: avoid;
    }

    /* Five tiles across on paper rather than reflowing to one per line. */
    .jw-stats {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .jw-stats--compact {
        grid-template-columns: repeat(4, 1fr);
    }

    .jw-stat {
        padding: 8px 10px;
    }

    .jw-stat__value {
        font-size: 19px;
    }

    /* The stat rail and the call-direction colours are load-bearing information, so they are the
       only things allowed to force ink. Applying this globally would flood every surface. */
    .jw-stat::before,
    .jw-badge,
    .jw-table tbody tr.LostCall td {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .jw-tablewrap {
        overflow: visible;
    }

    .jw-table thead th {
        position: static;
    }
}

/* --- support page --- */
.jw-support {
    max-width: 1100px;
    margin: 0 auto;
}

.jw-support__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--jw-text-primary);
    margin: 0 0 16px;
}

.jw-support__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    align-items: start;
}

.jw-support__grid i {
    margin-right: 6px;
}

/* --- patch-notes popup --- */
.jw-patchnotes {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

/* display:grid above out-specifies the UA stylesheet's [hidden]{display:none}, so the
   attribute needs restating at author level or the close button only hides semantically. */
.jw-patchnotes[hidden] {
    display: none;
}

.jw-patchnotes__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 20, .55);
}

.jw-patchnotes__card {
    position: relative;
    width: min(820px, 100%);
    max-height: min(88vh, 980px);
    display: flex;
    flex-direction: column;
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-subtle);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-2, 0 18px 50px rgba(0, 0, 0, .35));
    overflow: hidden;
}

.jw-patchnotes__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--jw-border-subtle);
}

.jw-patchnotes__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--jw-text-primary);
    margin: 0;
}

.jw-patchnotes__meta {
    font-size: 12.5px;
    color: var(--jw-text-muted);
    margin-top: 3px;
}

.jw-patchnotes__close {
    border: 0;
    background: transparent;
    color: var(--jw-text-muted);
    font-size: 22px;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: var(--jw-radius-sm);
    cursor: pointer;
}

.jw-patchnotes__close:hover {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

/* Version stepper: ‹ older / newer ›, one release shown at a time. */
.jw-patchnotes__switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--jw-border-subtle);
    flex-shrink: 0;
}

.jw-patchnotes__arrow {
    border: 1px solid var(--jw-border-default);
    background: transparent;
    color: var(--jw-text-secondary);
    font-size: 18px;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 99px;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding-bottom: 2px;
}

.jw-patchnotes__arrow:hover:not(:disabled) {
    background: var(--jw-surface-sunken);
    color: var(--jw-text-primary);
}

.jw-patchnotes__arrow:disabled {
    opacity: .35;
    cursor: default;
}

.jw-patchnotes__body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    color: var(--jw-text-secondary);
}

.jw-patchnotes__body h1,
.jw-patchnotes__body h2,
.jw-patchnotes__body h3 {
    color: var(--jw-text-primary);
    margin: 14px 0 6px;
}

.jw-patchnotes__body ul {
    padding-left: 20px;
    margin: 6px 0;
}

.jw-patchnotes-open {
    overflow: hidden;
}

/* ============================================================================
 * COOKIE CONSENT (Layout/_CookieConsent.cshtml, jw-consent.js) + cookie policy page
 * A floating card, not a full-width bar: it must not read as part of the shell.
 * Sits under the patch-notes modal (1200) but above everything else.
 * ========================================================================= */
.jw-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1150;
    display: flex;
    justify-content: center;
    padding: 0 16px 16px;
    pointer-events: none; /* the card re-enables; clicks beside it fall through */
}

/* display:flex above out-specifies the UA stylesheet's [hidden]{display:none} —
   same restatement as .jw-patchnotes[hidden]. */
.jw-consent[hidden] {
    display: none;
}

.jw-consent__card {
    pointer-events: auto;
    width: min(680px, 100%);
    background: var(--jw-surface-raised);
    border: 1px solid var(--jw-border-default);
    border-radius: var(--jw-radius-lg);
    box-shadow: var(--jw-shadow-3);
    padding: 16px 20px;
}

.jw-consent__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--jw-text-primary);
    margin: 0 0 6px;
}

.jw-consent__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--jw-text-secondary);
    margin: 0 0 12px;
}

.jw-consent__link {
    color: var(--jw-accent-ink);
    text-decoration: underline;
}

.jw-consent__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .jw-consent__actions .jw-btn {
        flex: 1 1 100%;
    }
}

/* --- cookie policy page (Views/Home/CookiePolicy.cshtml) --- */
.jw-policy {
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.jw-policy__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--jw-text-primary);
    margin: 0;
}

.jw-policy__intro {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--jw-text-secondary);
    margin: 0;
}

/* On the anonymous branch the page renders inside _authLayout's centering .auth-main;
   tall content in a justify-content:center flex column clips at the top, so switch that
   container to top-aligned scrolling when it holds the policy. */
.auth-main:has(.jw-policy) {
    justify-content: flex-start;
}

.jw-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.jw-cookie-table th {
    text-align: left;
    font-weight: 600;
    color: var(--jw-text-muted);
    font-size: 12px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--jw-border-default);
    white-space: nowrap;
}

.jw-cookie-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--jw-border-subtle);
    color: var(--jw-text-secondary);
    vertical-align: top;
}

.jw-cookie-table tr:last-child td {
    border-bottom: 0;
}

.jw-cookie-table td:first-child {
    font-family: var(--jw-font-mono);
    font-size: 12px;
    color: var(--jw-text-primary);
    white-space: nowrap;
}

/* Wide table scrolls inside its panel on narrow screens instead of the page. */
.jw-cookie-scroll {
    overflow-x: auto;
}

/* ------------------------------------------------- call-flow popup (SingeCallDataV6.js) */
/* The legacy style.less colors are hardcoded for a white popup: #31353d box borders and
   arrows, a #666 step label on a 5% black wash. All of it vanishes on the dark swal
   surface. Same-specificity re-points onto the tokens; this sheet loads last, so they win
   in both themes. The colored variant boxes (talkedBox, callflowQueueBox, ...) keep their
   own !important border-colors. */

.callFlow > li {
    border-color: var(--jw-border-strong);
}

.agentCalledHedder > li {
    border-color: var(--jw-border-strong);
}

.callArrow {
    stroke: var(--jw-text-secondary);
    fill: var(--jw-text-secondary);
}

.callflowTopLeftText {
    color: var(--jw-text-secondary);
    background: var(--jw-surface-inset);
}
