/* ──────────────────────────────────────────────────────────────────────────
   tokens.css — the colours, type and spacing every page shares.

   These used to be declared on each page's own root class: .cl-page,
   .ua-page, .sep, .dsc-page, .loc-page, .vt, .df, .aud, .bp. Nine copies of
   the same eleven values, all agreeing, none of them reaching anything
   rendered outside that element.

   That last part is what caused real bugs. A modal appended near <body> sits
   outside .ua-page, so every var(--card) in it resolved to nothing and the
   dialog came out transparent. The workaround was literal hex, which then
   doesn't follow dark mode. Both of those go away with the values on :root.

   Load this before any other stylesheet.

   If the page ever wants warmth back, it belongs in the orange accent and
   the brand strip, not in the paper.
   ────────────────────────────────────────────────────────────────────────── */

:root {
    /* Type */
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* Surfaces
       Neutral, not warm. These were a cream family -- #F7F2EA behind
       #E7E0D6 rules -- which at this lightness reads as nicotine rather
       than warmth. Your old site.css used a neutral rgb(245,245,245),
       which is the right instinct. */
    /* #F5F5F5, which is what your old site.css used. Three attempts to improve
       on it went wrong in three directions: #F7F2EA read as nicotine, #F4F5F7
       leaned blue, and #FAFAFA is so close to white that nothing separated --
       white cards on a white page, which is the "bland" part.

       Five percent is the least separation that still reads as two surfaces.
       Pure grey, so there is no hue to object to. */
    --bg: #F5F5F5; /* the page behind the cards */
    --card: #FFFFFF; /* anything raised off it */
    /* Depth, so a card looks placed on the page rather than cut out of it.
       One shadow, used everywhere -- a page with four different shadows looks
       accidental. */
    --lift: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);
    --lift-2: 0 2px 6px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .07);
    /* Scrollbars. The default is an OS control, which means a bright grey
       bar sitting on a dark panel -- the brightest thing on the screen, for
       something nobody is looking at. */
    --scroll-thumb: #C9C9C9;
    --scroll-thumb-hover: #AFAFAF;
    --scroll-track: transparent;
    /* Ink, darkest first. --ink-3 is the lightest that still passes
       4.5:1 on --card; anything fainter is decoration, not text. */
    --ink: #1F2430;
    --ink-2: #5A6472;
    --ink-3: #98A0AD;
    --ink-4: #B9C0C9;
    /* Rules and borders
       Cooled to match. Warm lines on a neutral ground look like a mistake
       rather than a choice, so these move together or not at all. */
    --line: #E3E3E3;
    --line-2: #CFCFCF;
    /* The one brand colour that appears in the UI */
    --orange: #EF7720;
    /* Corners */
    --r: 8px;
    --r-xs: 6px;
    /* ── Recovered from dailylog.css ──────────────────────────────────────
       dailylog.css used to declare its own :root with these. Stripping that
       block stopped it overriding the palette on every page -- and took 26
       variables with it that dailylog.css and dist.css both read.

       They belong here: a token used by more than one stylesheet is a token,
       and dist.css reads them without declaring any of its own, which is
       exactly right of it. Values are the originals, except where a name
       already existed here. */

    --green: #93D859;
    --red: #FF2B1C;
    --grad: linear-gradient(90deg, #93D859, #FFD93B 35%, #EF7720 65%, #FF2B1C);
    --r-sm: 6px;
    --mono: 'DM Mono', monospace;
    --sh: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
    --sh-md: 0 4px 14px rgba(0, 0, 0, .09), 0 1px 3px rgba(0, 0, 0, .05);
    /* A band inside a card: table headers, card heads, toolbars.
    
       It is sunk relative to --card, not raised -- the name is from the old
       file and is now backwards. #FAFAFA was almost white, so a card head sat
       1.9% off the white body it belongs to and 2% off the page behind it:
       distinct from neither. #F0F0F0 reads as a band against white while
       still clearly inside the card. */
    --surface-raised: #F0F0F0;
    /* Format pills */
    --pill-excel-bg: #F0FDF4;
    --pill-excel-fg: #166534;
    --pill-table-bg: #EFF6FF;
    --pill-table-fg: #1E40AF;
    --pill-para-bg: #FAF5FF;
    --pill-para-fg: #6B21A8;
    --pill-range-bg: #FFF7ED;
    --pill-range-fg: #9A3412;
    --pill-sms-bg: #F0FDFA;
    --pill-sms-fg: #115E59;
    --danger-bg: #FEF2F2;
    --danger-fg: #DC2626;
    --danger-border: #FECACA;
    --overlay-bg: rgba(17, 17, 19, .5);
    /* A filled bar or chip at full strength */
    --bar-on: #2A2A2C;
    --chip-fg: var(--ink-2);
    --filter-active-bg: rgba(239, 119, 32, .08);
    --filter-active-hover: rgba(239, 119, 32, .18);
}

/* ── Dark ──────────────────────────────────────────────────────────────────
   Same names, different values, so no rule needs to know which mode it's in.
   Ink is #E8EAED rather than pure white: at length, white on near-black is
   harder to read than it looks in a screenshot. The muted greys lift too —
   the light-mode #98A0AD is genuinely unreadable on a dark ground.
   ────────────────────────────────────────────────────────────────────────── */

.dl.dark,
.dl-dark-body {
    /* Shadows barely read on a dark surface, so dark mode leans on the border
       instead -- but the variable still has to exist, or every box-shadow
       using it resolves to nothing. */
    --lift: 0 1px 2px rgba(0, 0, 0, .3);
    --lift-2: 0 4px 14px rgba(0, 0, 0, .4);
    /* If bannerPP.png has a white background baked in, uncomment this as a
       stopgap -- it inverts the whole image, so a dark-on-white logo becomes
       light-on-dark. It also inverts any colour in the artwork, which is why
       it is a stopgap and a transparent file is the real answer.

           --logo-filter: invert(1) hue-rotate(180deg);

       Lighter than the surface but well short of white. A scrollbar should be
       findable when you look for it and invisible when you don't. */
    --scroll-thumb: #3a404a;
    --scroll-thumb-hover: #4b525e;
    --scroll-track: transparent;
    --bg: #15171b;
    --card: #1f2228;
    --ink: #E8EAED;
    --ink-2: #C9CDD4;
    --ink-3: #9AA3AE;
    --ink-4: #6E7681;
    --line: #2f343c;
    --line-2: #3a404a;
    /* The dark values for the same set. dailylog.css had these under its own
       .dl.dark block; without them the pills and danger colours would stay
       light-mode on a dark page. */

    --sh: 0 1px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .2);
    --sh-md: 0 4px 14px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3);
    --surface-raised: #222226;
    --pill-excel-bg: #052e16;
    --pill-excel-fg: #4ade80;
    --pill-table-bg: #1e3a5f;
    --pill-table-fg: #93c5fd;
    --pill-para-bg: #2e1065;
    --pill-para-fg: #c084fc;
    --pill-range-bg: #431407;
    --pill-range-fg: #fb923c;
    --pill-sms-bg: #042f2e;
    --pill-sms-fg: #2dd4bf;
    --danger-bg: #2d0a0a;
    --danger-fg: #f87171;
    --danger-border: #7f1d1d;
    --overlay-bg: rgba(0, 0, 0, .7);
    /* Inverted: a filled bar on a dark ground has to be lighter than it */
    --bar-on: #E0E0E4;
    --filter-active-bg: rgba(239, 119, 32, .12);
    --filter-active-hover: rgba(239, 119, 32, .22);
}

/* Dark mode is set on .dl, but modals and drawers render outside it.
   This carries the values to them. */
body.dl-dark-body {
    background: var(--bg);
    color: var(--ink);
}


/* ══════════════════════════════════════════════════════════════════════════
   THE SHELL -- base typography, toolbar, account menu, drawer, toasts.

   Here because this is the one stylesheet we know reaches the browser. These
   rules lived in the old portal's layout as inline CSS; during the port they
   went to modules.css, then chrome.css, then inline in _Layout -- and none of
   those arrived, because each one was a separate file to copy and the first
   kept being overwritten by older copies of itself.

   tokens.css was already loading on every page. So it holds them.

   The base element rules below genuinely belong here -- "the type every page
   shares" is what this file is for, and their absence is why everything
   rendered in Times New Roman: no stylesheet set a font on body at all.

   The toolbar and drawer do not belong here. Move them to their own file once
   the repo settles; until then, working beats tidy.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Base ──────────────────────────────────────────────────────────────── */

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}


/* ── Base ─────────────────────────────────────────────────────
   The pages used to set this themselves, so moving them onto the
   layout left body with no font-family at all -- which is why
   everything came out in Times New Roman. The shell owns it. */
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}


/* ── The product chooser ──────────────────────────────────────────────────
   Where a sign-in lands. It is the first thing anybody sees, so it gets the
   same chrome as everything else -- the toolbar, the user menu, dark mode --
   rather than being a standalone page that looks like a different product. */

.pg {
    max-width: 860px;
    margin: 0 auto;
    padding: 38px 24px 56px;
}

.pg-head {
    margin-bottom: 26px;
}

.pg-h1 {
    font-size: 23px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.02em;
    line-height: 1.25;
}

.pg-lede {
    font-size: 13px;
    color: var(--ink-3);
    margin-top: 6px;
}

.pg-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
}

/* ── Available ───────────────────────────────────────────────────────────
   The mark carries the colour, not the card. A tinted edge on every tile
   turns a page of products into a page of stripes. */
.pg-card {
    display: flex;
    align-items: center;
    gap: 13px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 16px 17px;
    text-decoration: none;
    box-shadow: var(--lift);
    transition: border-color .14s, box-shadow .14s, transform .14s;
}

    .pg-card:hover {
        border-color: var(--line-2);
        box-shadow: var(--lift-2);
        transform: translateY(-1px);
    }

        .pg-card:hover .pg-arrow {
            transform: translateX(2px);
            color: var(--hue);
        }

.pg-mark {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* A flat block of colour at this size looks like a swatch. The gradient
       is the same hue lifted, which gives it a surface. */
    background: linear-gradient(145deg, color-mix(in srgb, var(--hue) 82%, white), var(--hue));
    box-shadow: 0 1px 3px color-mix(in srgb, var(--hue) 40%, transparent);
}

    .pg-mark svg {
        width: 19px;
        height: 19px;
    }

.pg-mark-off svg {
    width: 19px;
    height: 19px;
}

.pg-text {
    min-width: 0;
    flex: 1;
}

.pg-name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.pg-go {
    display: block;
    font-size: 11px;
    color: var(--ink-3);
    margin-top: 2px;
}

.pg-arrow {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: var(--line-2);
    transition: transform .14s, color .14s;
}

/* ── Also available ──────────────────────────────────────────────────────
   These keep their colour.

   An earlier version greyed them out, which was wrong twice over: a greyed
   product name tells somebody nothing, so it can't interest them, and a grid
   of dimmed tiles reads as a page that failed to load. These are a quieter
   weight than the live ones, not a dimmer one -- outlined mark in the
   product's hue, a tinted wash behind it, and something to read. */
.pg-sec {
    margin-top: 38px;
}

.pg-sec-h {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--ink-3);
    padding-bottom: 9px;
    margin-bottom: 14px;
    /* The gradient, here rather than under the toolbar -- the nav draws its
       own via ::after, so a second one on this page was the same line twice.
       
       This is the one divider on the page that earns colour: it separates
       what the account has from what it doesn't. Faded at both ends so it
       reads as a rule rather than a bar. */
    border-bottom: none;
    background: linear-gradient(90deg, transparent 0%, #93D859 8%, #FFD93B 36%, #EF7720 64%, #FF2B1C 92%, transparent 100%) bottom / 100% 2px no-repeat;
}

.pg-sec-lede {
    font-size: 12.5px;
    color: var(--ink-3);
    margin: -6px 0 14px;
    line-height: 1.55;
}

.pg-card-off {
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 15px 16px;
    /* A wash of the product's colour, barely there. colour-mix keeps it
       honest in dark mode -- a hardcoded tint would glow. */
    background: color-mix(in srgb, var(--hue) 5%, var(--card));
    transition: border-color .14s, background .14s;
}

    .pg-card-off:hover {
        border-color: color-mix(in srgb, var(--hue) 35%, var(--line));
        background: color-mix(in srgb, var(--hue) 9%, var(--card));
    }

/* Outlined rather than filled: present, not shouting. */
.pg-mark-off {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--hue);
    border: 1.5px solid color-mix(in srgb, var(--hue) 40%, transparent);
    background: var(--card);
}

.pg-blurb {
    display: block;
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 3px;
    line-height: 1.5;
}

.pg-card-off .pg-name {
    color: var(--ink);
}

/* Somewhere to go. A tile that interests somebody and offers nothing is
   worse than one that never interested them. */
.pg-ask {
    flex: 0 0 auto;
    align-self: center;
    padding: 5px 12px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--hue) 30%, var(--line));
    background: var(--card);
    font-size: 11px;
    font-weight: 600;
    color: var(--hue);
    text-decoration: none;
    white-space: nowrap;
}

    .pg-ask:hover {
        background: var(--hue);
        color: #fff;
        border-color: var(--hue);
    }

.pg-empty {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 20px 18px;
    box-shadow: var(--lift);
}

@media (max-width: 560px) {
    .pg {
        padding: 26px 16px 40px;
    }

    .pg-h1 {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pg-card, .pg-card:hover, .pg-arrow {
        transition: none;
        transform: none;
    }
}


/* ── Calls needing identification ─────────────────────────────────────────
   An employee rang in, couldn't find their name, and left a voicemail. Until
   somebody attaches it to a person the record is invisible to the board, to
   points and to every report -- so this is blocking work, not a statistic.

   A button rather than a rail widget: a widget can be hidden by a view
   template and sits among twenty others competing for attention. This one
   has to be seen, and it disappears entirely when the count is zero. */

.ui-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #E0B800;
    background: #FFFBEB;
    color: #6B5200;
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .14s, border-color .14s;
}

    .ui-btn:hover {
        background: #FEF3C7;
        border-color: #C9A400;
    }

    .ui-btn strong {
        font-size: 14px;
        font-weight: 700;
    }

/* Three days or older. Red, because by then somebody's absence has gone
   unrecorded long enough to have missed its write-up window -- and because
   amber for everything means amber means nothing. */
.ui-btn-urgent {
    border-color: #D41F13;
    background: #FEF2F2;
    color: #8E1B12;
}

    .ui-btn-urgent:hover {
        background: #FEE2E2;
        border-color: #B4261C;
    }

/* The pulse only runs on the urgent state. A dot that always pulses is
   wallpaper within a day. */
.ui-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.ui-btn-urgent .ui-dot {
    animation: ui-pulse 1.8s ease-in-out infinite;
}

@keyframes ui-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .45;
        transform: scale(.82);
    }
}

.ui-main {
    white-space: nowrap;
}

.ui-age {
    padding-left: 9px;
    border-left: 1px solid currentColor;
    opacity: .72;
    font-size: 11.5px;
    white-space: nowrap;
}

.ui-older {
    display: inline-block;
    margin-left: 10px;
    font-size: 11px;
    color: var(--ink-3);
}

.ui-older-link {
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--orange);
    cursor: pointer;
}

    .ui-older-link:hover {
        text-decoration: underline;
    }

@media (prefers-reduced-motion: reduce) {
    .ui-btn-urgent .ui-dot {
        animation: none;
    }

    .ui-btn {
        transition: none;
    }
}


/* Scrollbars live in scrollbars.css: rules, not tokens. The colours they
   use (--scroll-thumb, --scroll-thumb-hover, --scroll-track) stay above, so
   they still follow dark mode. */
