/* ============================================================================
   SUNNY — the rep page (public/index.html). Mobile first; desktop adapts last.
   public/style.css is the admin dashboard's and is left alone.

   Tokens: neutral surfaces, strong text, amber only for primary actions,
   selection and the brand mark. Status colors always travel with an icon
   and words, never alone.
   ============================================================================ */

:root {
    color-scheme: light;
    --bg: #F6F5F2;
    --surface: #FFFFFF;
    --surface-2: #EFEDE8;
    --surface-press: #E7E4DD;
    --border: rgba(28, 25, 23, 0.10);
    --border-strong: rgba(28, 25, 23, 0.20);
    --text: #1C1917;
    --text-2: #57534E;
    --text-3: #6F6862;
    --accent: #A3480A;            /* amber for text and icons on light (5:1 on every light surface) */
    --accent-fill: #F59E0B;       /* primary buttons, selection */
    --accent-fill-press: #D97706;
    --on-accent: #1C1917;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --focus: #2563EB;
    --chrome: rgba(246, 245, 242, 0.82);
    --scrim: rgba(28, 25, 23, 0.36);
    --shadow: 0 1px 2px rgba(28, 25, 23, 0.06), 0 4px 16px rgba(28, 25, 23, 0.06);
    --shadow-sheet: 0 -8px 40px rgba(28, 25, 23, 0.18);

    --ok: #15803D;      --ok-soft: #DCFCE7;
    --warn: #C2410C;    --warn-soft: #FFEDD5;
    --info: #1D4ED8;    --info-soft: #DBEAFE;
    --neutral: #57534E; --neutral-soft: #ECEAE6;
    --danger: #B91C1C;  --danger-soft: #FEE2E2;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --r-sm: 10px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;
    --gutter: 16px;
    --appbar-h: 52px;
    --tabbar-h: 58px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* Dark is designed, not inverted: warm near-black, lifted surfaces, lighter amber */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0E0D0C;
        --surface: #1A1917;
        --surface-2: #26241F;
        --surface-press: #302D28;
        --border: rgba(255, 248, 235, 0.09);
        --border-strong: rgba(255, 248, 235, 0.18);
        --text: #F5F3EF;
        --text-2: #BDB6AA;
        --text-3: #9C9488;
        --accent: #FBBF24;
        --accent-soft: rgba(251, 191, 36, 0.15);
        --focus: #60A5FA;
        --chrome: rgba(14, 13, 12, 0.80);
        --scrim: rgba(0, 0, 0, 0.55);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-sheet: 0 -8px 40px rgba(0, 0, 0, 0.6);
        --ok: #4ADE80;      --ok-soft: rgba(74, 222, 128, 0.13);
        --warn: #FDBA74;    --warn-soft: rgba(253, 186, 116, 0.14);
        --info: #93C5FD;    --info-soft: rgba(147, 197, 253, 0.14);
        --neutral: #D6D3D1; --neutral-soft: rgba(214, 211, 209, 0.10);
        --danger: #FCA5A5;  --danger-soft: rgba(252, 165, 165, 0.14);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0E0D0C;
    --surface: #1A1917;
    --surface-2: #26241F;
    --surface-press: #302D28;
    --border: rgba(255, 248, 235, 0.09);
    --border-strong: rgba(255, 248, 235, 0.18);
    --text: #F5F3EF;
    --text-2: #BDB6AA;
    --text-3: #9C9488;
    --accent: #FBBF24;
    --accent-soft: rgba(251, 191, 36, 0.15);
    --focus: #60A5FA;
    --chrome: rgba(14, 13, 12, 0.80);
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sheet: 0 -8px 40px rgba(0, 0, 0, 0.6);
    --ok: #4ADE80;      --ok-soft: rgba(74, 222, 128, 0.13);
    --warn: #FDBA74;    --warn-soft: rgba(253, 186, 116, 0.14);
    --info: #93C5FD;    --info-soft: rgba(147, 197, 253, 0.14);
    --neutral: #D6D3D1; --neutral-soft: rgba(214, 211, 209, 0.10);
    --danger: #FCA5A5;  --danger-soft: rgba(252, 165, 165, 0.14);
}

/* ---- base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;          /* 17px: iOS body size */
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;     /* long words wrap rather than push the page wider */
}
h1, h2, h3, p, ul, ol { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: var(--r-md);
}
.skip-link:focus { top: calc(var(--safe-top) + 8px); }
.muted { color: var(--text-3); }

/* ---- app bar ---------------------------------------------------------------- */
.appbar {
    position: sticky; top: 0; z-index: 50;
    padding: var(--safe-top) calc(var(--gutter) + var(--safe-right)) 0 calc(var(--gutter) + var(--safe-left));
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .appbar { background: var(--chrome); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
}
.appbar.scrolled { border-bottom-color: var(--border); }
.appbar-inner { min-height: var(--appbar-h); display: flex; align-items: center; gap: 8px; max-width: 720px; margin: 0 auto; container-type: inline-size; }
.brand-word, .text-btn, .tab-label { white-space: nowrap; }
/* Larger text: the wordmark steps aside so New chat and the profile stay on one line */
@container (max-width: 18.5em) { .brand-word { display: none; } }
.brand { display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
.brand-mark { width: 26px; height: 26px; color: var(--accent-fill); flex: none; }
.brand-word { font-size: 1.125rem; font-weight: 700; letter-spacing: 0.02em; }
.appbar-actions { display: flex; align-items: center; gap: 6px; }
.avatar-btn {
    flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0;
    display: grid; place-items: center; background: transparent;
}
.avatar-btn span {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
    border: 1px solid var(--border);
}
.text-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px;
    border: 0; background: none; color: var(--accent); font-weight: 600; border-radius: var(--r-md);
}
.text-btn .icon { width: 18px; height: 18px; }
.badge-dot {
    position: absolute; top: 4px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--accent-fill); box-shadow: 0 0 0 2px var(--bg);
}

.offline-banner {
    display: flex; gap: 10px; align-items: center;
    margin: 8px calc(var(--gutter) + var(--safe-right)) 0 calc(var(--gutter) + var(--safe-left));
    padding: 10px 12px; border-radius: var(--r-md);
    background: var(--warn-soft); color: var(--warn); font-size: 0.9375rem; font-weight: 500;
}

/* ---- layout ------------------------------------------------------------------ */
main {
    padding: 8px calc(var(--gutter) + var(--safe-right)) calc(var(--tabbar-h) + var(--safe-bottom) + 28px) calc(var(--gutter) + var(--safe-left));
    max-width: 720px; margin: 0 auto;
}
main:focus { outline: none; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.view-title {
    font-size: 1.625rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
    margin: 8px 0 14px;
}
.view-title:focus { outline: none; }
.results { margin-top: 16px; }

/* ---- tab bar ------------------------------------------------------------------ */
.tabbar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);   /* Ask SUNNY, ROR, Shifts, Stats, Contacts */
    padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
    background: var(--bg); border-top: 1px solid var(--border);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .tabbar { background: var(--chrome); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
}
.tab {
    position: relative; height: var(--tabbar-h); border: 0; background: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-3); font-size: 11.5px; font-weight: 600;   /* fixed, like a native tab bar: five labels fit at 320 px */
}
.tab-icon { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab .badge-dot { top: 8px; right: calc(50% - 20px); }
.tab:active .tab-icon { transform: scale(0.92); }
/* The keyboard owns the bottom of the screen while a field is in use (set in app.js) */
.kb-open .tabbar { display: none; }
.kb-open main { padding-bottom: 24px; }
/* Ask SUNNY (home): the composer rests just above the tab bar */
.mode-ask main { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
.kb-open.mode-ask main { padding-bottom: 0; }

/* ---- form controls --------------------------------------------------------- */
.field-label { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.field-help { font-size: 0.9375rem; color: var(--text-3); margin-top: 8px; }
.search-field {
    display: flex; align-items: center; gap: 6px;
    min-height: 54px; padding: 5px 5px 5px 14px;
    background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.search-field:focus-within { border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input {
    flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none;
    font-size: 1.0625rem; -webkit-appearance: none; appearance: none;
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-input::placeholder, .text-input::placeholder, .composer-input::placeholder { color: var(--text-3); opacity: 1; }
.search-submit {
    flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-sm);
    background: var(--accent-fill); color: var(--on-accent); font-weight: 700; font-size: 1rem;
}
.search-submit:active { background: var(--accent-fill-press); }
.text-input, .select {
    width: 100%; min-height: 50px; padding: 0 14px;
    background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
    font-size: 1.0625rem; -webkit-appearance: none; appearance: none;
}
.select {
    background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
    background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.text-input:focus, .select:focus { border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

.more-fields { margin-top: 10px; }
/* While a customer is on screen the form steps back: refining happens on the card */
.lookup-active #rorHelp, .lookup-active #rorMore { display: none; }
.more-fields summary {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
    color: var(--accent); font-weight: 600; cursor: pointer; list-style: none; border-radius: var(--r-md);
}
.more-fields summary::-webkit-details-marker { display: none; }
.more-fields summary .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.more-fields[open] summary .icon { transform: rotate(45deg); }
.more-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 4px 0 2px; }

/* ---- buttons ----------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent;
    font-size: 1.0625rem; font-weight: 600; text-decoration: none; line-height: 1.2; text-align: center;
    transition: background-color 0.12s var(--ease), transform 0.12s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:active { background: var(--accent-fill-press); }
.btn-primary:disabled { opacity: 0.45; transform: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:active { background: var(--surface-press); }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.link-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
    border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.actions-3 { grid-template-columns: 1fr 1fr 1fr; }
.actions .btn { min-height: 48px; padding: 0 10px; font-size: 1rem; }

/* ---- chips & segmented --------------------------------------------------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; margin: 12px calc(-1 * var(--gutter)) 0; padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.chip {
    flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface);
    font-size: 0.9375rem; font-weight: 500; color: var(--text); text-align: left;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip:active { background: var(--surface-press); }
.segmented {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px;
    background: var(--surface-2); border-radius: var(--r-md);
}
.segmented button {
    min-height: 44px; border: 0; border-radius: 9px; background: transparent;
    font-size: 0.9375rem; font-weight: 600; color: var(--text-2); padding: 0 6px;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
#shiftsMode { margin-bottom: 12px; }

/* ---- cards -------------------------------------------------------------------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 12px; }
.card-pad { padding: 16px; }
.status {
    display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px;
    font-weight: 600; font-size: 1rem; line-height: 1.3;
}
.status .icon { width: 22px; height: 22px; margin-top: -1px; }
.status-text { display: flex; flex-direction: column; gap: 3px; }
.status-sub { font-weight: 400; font-size: 0.9375rem; color: var(--text-2); }
.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-neutral { background: var(--neutral-soft); color: var(--neutral); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-ok .status-sub, .tone-warn .status-sub, .tone-info .status-sub, .tone-neutral .status-sub, .tone-danger .status-sub { color: var(--text-2); }

.cand { padding: 16px; }
.cand + .cand { border-top: 1px solid var(--border); }
.cand-name { font-size: 1.375rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.cand-addr { margin-top: 4px; color: var(--text-2); overflow-wrap: anywhere; }
.notes { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.notes li { display: flex; gap: 8px; font-size: 0.9375rem; color: var(--text-2); line-height: 1.35; }
.notes li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.5em; border-radius: 50%; background: var(--text-3); }
.notes li.note-warn { color: var(--warn); font-weight: 500; }
.notes li.note-warn::before { background: var(--warn); }
.rep {
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.rep-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.rep-name { margin-top: 2px; font-size: 1.1875rem; font-weight: 700; }
.rep-num { font-weight: 500; color: var(--text-3); font-size: 0.9375rem; font-variant-numeric: tabular-nums; margin-left: 6px; }
.rep-missing { margin-top: 6px; font-size: 0.9375rem; color: var(--text-2); }
.cand.is-other { opacity: 0.55; }
.cand-pick { margin-top: 12px; }
.picked-tag {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px;
    font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
}
.section-label {
    padding: 14px 16px 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3);
}
.section-help { padding: 4px 16px 0; color: var(--text-2); font-size: 0.9375rem; }
.card-body { padding: 14px 16px; color: var(--text-2); }
.card-body p + p { margin-top: 8px; }
.card-actions { padding: 0 16px 16px; display: grid; gap: 10px; }
.status + .card-actions, .cand + .card-actions { padding-top: 16px; }
.suggest { padding: 4px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
    padding: 6px 16px 8px; border-top: 1px solid var(--border);
    font-size: 0.875rem; color: var(--text-3);
}

/* SUNNY's own words under a card */
.sunny-note { border-top: 1px solid var(--border); }
.sunny-note > summary {
    display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
    font-weight: 600; font-size: 0.9375rem; color: var(--text-2); cursor: pointer; list-style: none;
}
.sunny-note > summary::-webkit-details-marker { display: none; }
.sunny-note > summary .icon { width: 18px; height: 18px; color: var(--accent-fill); }
.sunny-note > summary::after {
    content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
    transform: rotate(45deg); transition: transform 0.2s var(--ease);
}
.sunny-note[open] > summary::after { transform: rotate(-135deg); }
.sunny-note .md { padding: 0 16px 16px; }

/* Rendered SUNNY replies (formatBotMessage) */
.md { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.md p + p, .md p + ul, .md p + ol, .md ul + p, .md ol + p { margin-top: 0.6em; }
.md ul, .md ol { padding-left: 1.3em; margin: 0.4em 0; }
.md li + li { margin-top: 0.25em; }
.md a { color: var(--accent); text-underline-offset: 2px; }
.md .phone-link { font-weight: 600; white-space: nowrap; }
.md hr.msg-divider { border: 0; border-top: 1px solid var(--border); margin: 0.8em 0; }
.md .msg-note { padding: 8px 12px; border-left: 3px solid var(--accent-fill); background: var(--surface-2); border-radius: 0 8px 8px 0; margin: 0.5em 0; }
.md .table-cards { display: grid; gap: 8px; margin: 0.5em 0; }
.md .table-card { padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.md .tc-title { font-weight: 700; }
.md .tc-label { color: var(--text-3); }

/* Loading screen: "Welcome to the Rep" (Alan, 2026-11-21). Covers the page until app.js calls dismissSplash. */
.splash {
    position: fixed; inset: 0; z-index: 400;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
    background: var(--bg); color: var(--text); text-align: center;
    transition: opacity 0.25s var(--ease);
}
.splash.is-leaving { opacity: 0; pointer-events: none; }
.splash-mark { width: 64px; height: 64px; color: var(--accent-fill); }
.splash-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.splash-slow { max-width: 28ch; color: var(--text-2); font-size: 0.9375rem; }

/* Loading */
.pending { display: flex; align-items: center; gap: 10px; padding: 16px; color: var(--text-2); font-weight: 500; }
.pending-actions { padding: 0 16px 16px; }
.spinner {
    width: 20px; height: 20px; flex: none; border-radius: 50%;
    border: 2.5px solid var(--border-strong); border-top-color: var(--accent-fill);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { padding: 0 16px 18px; display: grid; gap: 10px; }
.skeleton span { display: block; height: 14px; border-radius: 7px; background: var(--surface-2); }
.skeleton span:nth-child(1) { width: 62%; height: 22px; }
.skeleton span:nth-child(2) { width: 84%; }
.skeleton span:nth-child(3) { width: 48%; }
.is-stale { opacity: 0.5; pointer-events: none; }

.lookup-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 16px; padding: 8px 8px 8px 14px; border-radius: var(--r-md);
    background: var(--surface-2);
}
.lookup-bar-text { font-size: 0.9375rem; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.lookup-bar .btn { flex: none; white-space: nowrap; }
.lookup-bar-text strong { color: var(--text); }

.refine { padding: 0 16px 16px; }
.refine .search-field { min-height: 50px; }

.inline-status { margin-top: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--ok); }
.inline-error { color: var(--danger); }
.fineprint { margin-top: 16px; font-size: 0.875rem; color: var(--text-3); line-height: 1.4; }
.empty-hint { margin-top: 18px; color: var(--text-2); font-size: 0.9375rem; }
.empty-hint ul { padding-left: 1.2em; margin-top: 6px; display: grid; gap: 4px; }
.tip-card { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.tip-card p { color: var(--text-2); font-size: 0.9375rem; }
.tip-card .row-between { margin-top: 6px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---- shifts --------------------------------------------------------------------- */
.group-label {
    margin: 22px 0 8px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3);
}
.group-label:first-child { margin-top: 4px; }
.shift { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 16px; }
.datetile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 56px; height: 62px; border-radius: var(--r-md); background: var(--surface-2); line-height: 1.05;
}
.datetile .dow { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.04em; }
.datetile .dom { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.datetile .mon { font-size: 0.75rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; }
.datetile.is-today { background: var(--accent-fill); }
.datetile.is-today .dow, .datetile.is-today .dom, .datetile.is-today .mon { color: var(--on-accent); }
.shift-title { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.shift-meta { margin-top: 3px; color: var(--text-2); font-size: 0.9375rem; }
.shift-with { margin-top: 8px; font-size: 0.9375rem; }
.shift-with .label { color: var(--text-3); }
.name-chip {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; margin: 4px 6px 0 0;
    border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border);
    font-size: 0.9375rem; font-weight: 500;
}
button.name-chip { color: var(--text); }
.flag {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; margin-right: 6px; padding: 4px 10px;
    border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600;
}
.flag .icon { width: 15px; height: 15px; }
.flag-sub { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--text-3); }
.shift .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.shift .actions .btn { min-height: 44px; }
.next-up { margin-bottom: 4px; }
.next-up .shift { padding: 18px 16px; }
.next-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.day-row { padding: 12px 16px; border-top: 1px solid var(--border); }
.day-row:first-of-type { border-top: 0; }
.day-row-date { font-weight: 700; }
.source-line { margin-top: 18px; font-size: 0.875rem; color: var(--text-3); line-height: 1.45; }
.source-line strong { font-weight: 600; color: var(--text-2); }

/* ---- contacts ------------------------------------------------------------------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-row {
    width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px;
    border: 0; background: none; text-align: left;
}
.contact-row:active { background: var(--surface-press); }
.contact-list li + li .contact-row, .contact-list li + li .contact-card { border-top: 1px solid var(--border); }
.initials {
    width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); font-size: 0.875rem; font-weight: 700; color: var(--text-2);
}
.contact-row .name { flex: 1; font-weight: 600; }
.contact-row .icon { color: var(--text-3); width: 18px; height: 18px; }
.contact-card { padding: 16px; }
.contact-head { display: flex; align-items: center; gap: 12px; }
.contact-name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.contact-sub { color: var(--text-2); font-size: 0.9375rem; }
.contact-phone { margin-top: 10px; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.level-chip { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.copy-done { font-size: 0.875rem; font-weight: 600; color: var(--ok); }

/* ---- Ask SUNNY -------------------------------------------------------------------- */
.view-ask {
    display: flex; flex-direction: column;
    min-height: calc(100vh - var(--appbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom) - 8px);
    min-height: calc(100dvh - var(--appbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom) - 8px);
}
.ask-intro { padding: 20px 0 8px; }
.ask-mark { width: 40px; height: 40px; color: var(--accent-fill); }
.ask-hello { margin-top: 12px; font-size: 1.625rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.chat-card { margin: 2px 0 12px; }

/* The sales card (an Ask SUNNY answer about sales): one row per rep, figure on the right */
.sale-rows { list-style: none; margin: 0; padding: 0; }
.sale-row { padding: 12px 16px; }
.sale-row + .sale-row { border-top: 1px solid var(--border); }
.sale-row.is-self { background: var(--accent-soft); }
.sale-line { display: flex; align-items: baseline; gap: 10px; }
.sale-rank { flex: none; min-width: 2.2rem; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sale-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.sale-you {
    margin-left: 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
}
.sale-value { flex: none; font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-board .sale-value { font-size: 1rem; }
.sale-sub { margin-top: 3px; font-size: 0.9375rem; color: var(--text-2); line-height: 1.35; }
.is-board .sale-sub { padding-left: calc(2.2rem + 10px); font-size: 0.875rem; }
.sales-card .card-actions { padding-top: 14px; border-top: 1px solid var(--border); }
.stat-rows { list-style: none; margin: 0; padding: 0; }
.stat-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.stat-row + .stat-row { border-top: 1px solid var(--border); }
.stat-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.stat-event { font-weight: 600; overflow-wrap: anywhere; }
.stat-sub { font-size: 0.9375rem; color: var(--text-2); }
.stat-flag { font-size: 0.875rem; color: var(--warn); }
.stat-row.is-soft .stat-flag { color: var(--text-3); }
.stat-fill { flex: none; }
.stat-more { padding-bottom: 4px; }
.stats-card .card-actions { padding-top: 14px; border-top: 1px solid var(--border); }
.ask-lede { margin-top: 10px; font-size: 1.125rem; color: var(--text-2); line-height: 1.4; }
.messages { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 8px 0 16px; }
.msg-user {
    align-self: flex-end; max-width: 86%; padding: 10px 14px; border-radius: 18px 18px 6px 18px;
    background: var(--accent-soft); color: var(--text); white-space: pre-wrap;
}
.msg-bot { align-self: stretch; padding: 2px 2px 0; }
.msg-bot .md { font-size: 1.0625rem; }
.msg-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 0.8125rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.02em; }
.msg-meta .icon { width: 16px; height: 16px; color: var(--accent-fill); }
.msg-typing { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 500; }
.msg-notice { padding: 14px 16px; border-radius: var(--r-lg); background: var(--danger-soft); }
.msg-notice p { color: var(--text); }
.msg-notice .btn { margin-top: 10px; }
.composer {
    position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); z-index: 20;
    display: flex; align-items: flex-end; gap: 8px;
    margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 10px;
    background: var(--bg); border-top: 1px solid var(--border);
}
/* Typing: the tab bar steps aside and the box sits on the keyboard */
.kb-open .composer { bottom: 0; padding-bottom: calc(10px + var(--safe-bottom)); }
.kb-open .view-ask { min-height: calc(100vh - var(--appbar-h) - var(--safe-top) - 8px); min-height: calc(100dvh - var(--appbar-h) - var(--safe-top) - 8px); }
.composer-input {
    flex: 1; min-height: 48px; max-height: 9.5em; resize: none; padding: 12px 14px;
    background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 22px;
    font-size: 1.0625rem; line-height: 1.35;
}
.composer-input:focus { border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.composer-send {
    flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0;
    display: grid; place-items: center; background: var(--accent-fill); color: var(--on-accent);
}
.composer-send .icon { width: 22px; height: 22px; }
.composer-send:disabled { opacity: 0.4; }
.jump-pill {
    position: sticky; bottom: calc(84px + var(--tabbar-h) + var(--safe-bottom)); align-self: center; z-index: 25;
    min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
    background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 0.9375rem;
}

/* ---- name gate --------------------------------------------------------------------- */
.name-gate {
    position: fixed; inset: 0; z-index: 200; overflow-y: auto;
    display: flex; align-items: center; justify-content: center;
    padding: calc(24px + var(--safe-top)) var(--gutter) calc(24px + var(--safe-bottom));
    background: var(--bg);
}
.name-gate-card { width: 100%; max-width: 400px; }
.gate-mark { width: 52px; height: 52px; color: var(--accent-fill); }
.gate-brand { margin-top: 10px; font-size: 1.75rem; font-weight: 800; letter-spacing: 0.02em; }
.gate-sub { color: var(--text-2); }
.gate-title { margin: 28px 0 16px; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; }
.name-gate .field-label { margin-top: 14px; }
.name-gate .btn { margin-top: 20px; }
.gate-note { margin-top: 14px; font-size: 0.9375rem; color: var(--text-3); }

/* ---- sheets (profile, report) --------------------------------------------------- */
.sheet {
    border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
    max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px - var(--safe-top));
    background: var(--surface); color: var(--text);
    border-radius: 20px 20px 0 0; box-shadow: var(--shadow-sheet);
}
.sheet::backdrop { background: var(--scrim); }
.sheet[open] { animation: sheet-in 0.32s var(--ease); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-inner { padding: 6px var(--gutter) calc(20px + var(--safe-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.sheet-title { font-size: 1.1875rem; font-weight: 700; }
.sheet-section { padding: 16px 0; border-top: 1px solid var(--border); }
.sheet-section:first-of-type { border-top: 0; }
.sheet-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.sheet-name { font-size: 1.1875rem; }
.sheet-text { color: var(--text-2); font-size: 0.9375rem; }
.sheet-text + .sheet-text { margin-top: 8px; }
.reason-list { display: grid; gap: 10px; padding: 8px 0 4px; }
.reason-list .btn { justify-content: flex-start; text-align: left; }

/* ---- Request coverage (My shifts card + its sheet) ---------------------------------- */
.cover-status {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 8px 12px;
    border-radius: var(--r-md); background: var(--info-soft); color: var(--text);
    font-size: 0.9375rem; font-weight: 500; line-height: 1.35;
}
.cover-status .icon { width: 18px; height: 18px; color: var(--info); margin-top: 1px; }
.cover-ended { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 0.875rem; color: var(--text-2); line-height: 1.4; }
.cover-ended .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--text-3); }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; }
#coverSheet .sheet-inner { padding-bottom: 0; }
.cover-for { margin-top: 2px; }
.cover-for strong { color: var(--text); font-weight: 600; }
.cover-group { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.cover-legend { padding: 0; margin-bottom: 10px; font-size: 1.0625rem; font-weight: 700; color: var(--text); }
.cover-help { margin-top: 0; }
.cover-list { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.cover-list:empty { display: none; }
.cover-opt {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; cursor: pointer;
    border-top: 1px solid var(--border); -webkit-tap-highlight-color: transparent;
}
.cover-list > :first-child { border-top: 0; }
/* The whole row is the control: the real input covers it (a 44px+ target, read by
   screen readers with the row's words); the mark beside the name shows its state */
.cover-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.cover-mark {
    flex: none; display: grid; place-items: center; width: 22px; height: 22px;
    border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface);
}
.cover-mark.is-box { border-radius: 6px; }
.cover-opt input:checked + .cover-mark { border-color: var(--accent-fill); background: var(--accent-fill); }
.cover-opt input[type="radio"]:checked + .cover-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent); }
.cover-opt input[type="checkbox"]:checked + .cover-mark::after {
    content: ""; width: 6px; height: 11px; margin-top: -2px;
    border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.cover-opt input:disabled + .cover-mark { opacity: 0.4; }
.cover-opt:has(input:focus-visible) { box-shadow: inset 0 0 0 3px var(--focus); }
.cover-opt input:focus-visible + .cover-mark { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (forced-colors: active) {
    .cover-mark { border-color: CanvasText; }
    .cover-opt input:checked + .cover-mark { background: Highlight; border-color: Highlight; }
}
.cover-opt-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cover-name { font-weight: 600; }
.cover-opt-sub { margin-top: 2px; font-size: 0.875rem; color: var(--text-2); }
.cover-opt:has(input:checked) { background: var(--accent-soft); }
.cover-opt:not(.is-busy):active { background: var(--surface-press); }
.cover-opt.is-busy { cursor: default; }
.cover-opt.is-busy .cover-name { color: var(--text-3); }
.cover-sub-label {
    padding: 12px 14px 6px; border-top: 1px solid var(--border); background: var(--surface-2);
    font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3);
}
.cover-sub-label + .cover-opt { border-top: 0; }
.cover-empty { padding: 14px; color: var(--text-2); font-size: 0.9375rem; }
.cover-list > .cover-ended { margin: 0; padding: 10px 14px; background: var(--warn-soft); color: var(--text); }
.cover-list .pending { padding: 14px; }
.cover-list .inline-error { margin: 12px 14px 0; }
.cover-retry { margin: 10px 14px 14px; width: calc(100% - 28px); }
.cover-line { margin-top: 18px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.4; }
.cover-error { margin: 0 0 10px; }
.cover-error:empty { display: none; }
/* The send button stays in reach while the team list scrolls */
.cover-foot {
    position: sticky; bottom: 0; z-index: 1;
    margin: 12px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter) calc(14px + var(--safe-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
}

/* ---- motion & preferences ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    /* Off, not "very short": a short duration on every element makes every property transition */
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .btn:active, .tab:active .tab-icon { transform: none; }
    .spinner { animation: none; border-top-color: var(--border-strong); border-left-color: var(--accent-fill); }
}
@media (prefers-reduced-transparency: reduce) {
    .appbar, .tabbar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
    :root { --border: rgba(28, 25, 23, 0.35); --border-strong: rgba(28, 25, 23, 0.6); --text-3: var(--text-2); }
}
@media (forced-colors: active) {
    .tab[aria-current="page"] { text-decoration: underline; }
    .status { border: 1px solid CanvasText; }
}

/* ---- landscape phones and wider screens ---------------------------------------------- */
@media (min-width: 560px) {
    .more-grid { grid-template-columns: 1fr 1.4fr; }
}
@media (orientation: landscape) and (max-height: 500px) {
    :root { --tabbar-h: 50px; --appbar-h: 46px; }
    .tab { flex-direction: row; gap: 8px; }
    .tab-icon { width: 22px; height: 22px; }
    .view-title { font-size: 1.375rem; margin: 4px 0 10px; }
}
@media (min-width: 900px) {
    /* Desktop: the three sections move up into the bar; nothing pinned at the bottom */
    :root { --gutter: 24px; }
    .appbar-inner { max-width: calc(760px - 2 * var(--gutter)); }
    main { max-width: 760px; padding-bottom: 48px; }
    .tabbar {
        position: sticky; top: calc(var(--appbar-h) + var(--safe-top)); bottom: auto; z-index: 45;
        display: flex; justify-content: center; gap: 6px; padding: 6px 0 8px; border-top: 0; border-bottom: 1px solid var(--border);
    }
    .tab { height: 44px; flex-direction: row; gap: 8px; padding: 0 18px; border-radius: var(--r-pill); font-size: 15px; }
    .tab[aria-current="page"] { background: var(--accent-soft); }
    .tab-icon { width: 20px; height: 20px; }
    .tab .badge-dot { top: 6px; right: 6px; }
    .kb-open .tabbar { display: flex; }
    .composer { margin: 0; bottom: 0; padding-bottom: 10px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
    .mode-ask main { padding-bottom: 0; }
    .view-ask { min-height: calc(100dvh - var(--appbar-h) - 60px - 8px); }
    .jump-pill { bottom: 84px; }
    .sheet { margin: auto; border-radius: 20px; }
    .actions { max-width: 420px; }
}

/* Your pages on the profile sheet, and the stats nudge on Ask SUNNY (since 2026-11-15) */
.my-pages { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.my-pages li + li { border-top: 1px solid var(--border); }
.my-page {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px;
    background: none; border: 0; font: inherit; color: var(--text); text-align: left; text-decoration: none; cursor: pointer;
}
.my-page-text { flex: 1; min-width: 0; display: grid; gap: 1px; font-weight: 600; }
.my-page-sub { font-weight: 400; font-size: 0.875rem; color: var(--text-2); }
.my-page .my-page-go { width: 16px; height: 16px; color: var(--text-3); }
.nudge {
    display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 8px 10px 14px;
    border-radius: 14px; background: var(--warn-soft); color: var(--warn);
}
.nudge[hidden] { display: none; }
.nudge-text { flex: 1; min-width: 0; font-size: 0.9375rem; font-weight: 500; color: var(--text); }
.nudge-close { flex: none; width: 44px; height: 44px; border: 0; background: none; color: var(--text-2); font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: 10px; }

/* ---- Stats (2026-11-18): ALMA Stats in a frame, on the rep's own link ---------------- */
.mode-stats main { padding: 0 0 calc(var(--tabbar-h) + var(--safe-bottom)); max-width: none; }
.view-stats { display: flex; flex-direction: column; }
.view-stats[hidden] { display: none; }
#statsBody { display: flex; flex-direction: column; flex: 1;
    min-height: calc(100vh - var(--appbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom));
    min-height: calc(100dvh - var(--appbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom)); }
.stats-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px;
    padding: 0 calc(var(--gutter) + var(--safe-right)) 0 calc(var(--gutter) + var(--safe-left));
    border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 0.875rem; }
.stats-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-frame { display: block; flex: 1; width: 100%; border: 0; background: var(--bg); }
/* On a phone the Stats frame is pinned between the app bar and the tab bar, so SUNNY's own page has
   nothing to scroll: the iPhone keyboard opening inside the frame had scrolled SUNNY's page and left
   it there after Send, the chat gone up and a blank screen (Alan, 2026-11-18). While the page says its
   keyboard is up, the tab bar steps aside and the frame runs to the bottom (app.js, message 'kb'). */
@media (max-width: 899.98px) {
    html.mode-stats, html.mode-stats body { overflow: hidden; overscroll-behavior: none; }
    .mode-stats #statsBody { position: fixed; left: 0; right: 0; top: var(--stats-top, calc(var(--appbar-h) + var(--safe-top)));
        bottom: calc(var(--tabbar-h) + var(--safe-bottom)); min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
    .mode-stats.kb-open #statsBody { bottom: 0; }
}
.stats-note { margin: 12px var(--gutter); padding: 12px 14px; border-radius: var(--r-lg); background: var(--ok-soft); color: var(--text); }
.stats-note p { font-size: 0.9375rem; }
.stats-note .stats-note-title { font-weight: 700; color: var(--ok); }
.stats-note .stats-note-sub { margin-top: 8px; color: var(--text-2); }
.stats-note .row-between { margin-top: 6px; }
.stats-note .icon-btn { width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; background: none; color: var(--text-2); font-size: 1.5rem; line-height: 1; border-radius: 10px; cursor: pointer; }
.stats-note .inline-status { margin-top: 0; }
.stats-empty { width: 100%; max-width: 440px; margin: 0 auto; padding: 28px calc(var(--gutter) + var(--safe-right)) 24px calc(var(--gutter) + var(--safe-left)); text-align: center; }
.stats-empty-mark { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); }
.stats-empty-mark .icon { width: 26px; height: 26px; }
.stats-empty-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.stats-empty-text { margin-top: 6px; color: var(--text-2); font-size: 0.9375rem; }
.stats-paste, .stats-ask { margin-top: 22px; text-align: left; display: grid; gap: 8px; }
.stats-paste .field-label, .stats-ask .field-label { margin: 0; }
.stats-empty .field-error { color: var(--danger); font-size: 0.875rem; min-height: 0; }
.stats-empty .field-error:empty { display: none; }
.stats-ask .inline-status { margin-top: 2px; text-align: center; font-weight: 500; color: var(--text-2); }
.stats-ask .inline-status.is-ok { color: var(--ok); }
.stats-ask .inline-status.is-warn { color: var(--warn); }
.stats-ask .inline-status:empty { display: none; }
