/* LIOS Care theme — the ONE place for colours, type, radii, borders, shadows and spacing.
   Values are copied exactly from the client prototype "LIOS Care Portal Screens v2.html" (spec §1).
   Dark is the brand default; light keeps every token's job and swaps its value (prototype decision 87).
   The theme is picked before first paint by Views/Shared/_ThemeInit.cshtml (data-theme on <html>). */
:root {
    /* Colours — dark (default) */
    --bg: #1C1B2B;        /* page background; tab switcher and input background */
    --panel: #232235;     /* hover fills, icon tiles, note boxes, selected row */
    --card: #26253A;      /* cards, row containers, popovers, dialogs */
    --row: #2B2A41;       /* row hover */
    --line: #36354D;      /* 1px borders / dividers */
    --edge: #4A4863;      /* 1.5px control borders */
    --rail: #2F2E45;      /* sidebar right border, top bar bottom border */
    --fg: #FFFFFF;        /* main text */
    --soft: #D4D2E2;      /* secondary text, nav items */
    --muted: #B9B7CC;     /* sub-text, labels */
    --hint: #8F8DA6;      /* tertiary text, chevrons, day headers */
    --accent: #96DCC0;    /* mint: primary buttons, active states, OK */
    --on-accent: #1C1B2B; /* text on accent / on warn */
    --warn: #F7B489;      /* peach: badges, "needs you", danger text */
    --hover: #7F78B8;     /* icon-button hover border */
    /* --field is not set in dark: inputs fall back to --bg (var(--field, var(--bg))) */
    --overlay: rgba(10, 10, 20, .6);
    --knob: #fff;
    color-scheme: dark;

    /* Typography */
    --font: 'Catamaran', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --fs-body: 16px;
    --lh-body: 1.5;
    --fs-h1: 28px;          /* page h1, 800, lh 1.1 (24px at <=560px) */
    --fs-h1-sm: 24px;
    --fs-gate-h1: 26px;     /* sign-in pages h1, 800 */
    --fs-dialog-h3: 18px;
    --fs-panel-h3: 16px;
    --fs-hero: 30px;        /* card hero number, 800 (also on phones — the prototype cascade keeps 30px) */
    --fs-hero-sm: 26px;
    --fs-tile: clamp(19px, 1.6vw, 24px); /* tile value, 800 (20px at <=560px) */
    --fs-tile-sm: 20px;
    --fs-row: 15px;         /* row title / buttons / inputs */
    --fs-label: 14px;       /* field label, link button, sub-title, toast */
    --fs-small: 13px;       /* row sub, chip, helper text */
    --fs-tag: 12px;         /* tag, count badge, day header */
    --fs-empty: 17px;       /* empty-state title */

    /* Radii */
    --r-pill: 999px;   /* buttons, chips, tags, tabs, badges */
    --r-area: 18px;    /* Today cards */
    --r-panel: 16px;   /* panels, row containers, tiles */
    --r-input: 14px;   /* inputs, textarea, select, upload row */
    --r-search: 12px;  /* search box, note box, popover rows */
    --r-tile: 10px;    /* icon tiles, code cells */
    --r-gate: 22px;    /* sign-in card */
    --r-dialog: 20px;  /* popups */

    /* Borders */
    --b-box: 1px solid var(--line);       /* containers */
    --b-control: 1.5px solid var(--edge); /* inputs, ghost buttons, icon buttons, tabs */

    /* Shadows */
    --sh-pop: 0 18px 40px rgba(0, 0, 0, .35); /* popovers */
    --sh-knob: 0 1px 3px rgba(0, 0, 0, .3);   /* toggle knob */

    /* Spacing */
    --gap-content: 18px;  /* content rows */
    --gap-cols: 40px;     /* content columns */
    --gap-cards: 14px;    /* card grid */
    --gap-tiles: 12px;    /* tiles */
    --gap-split: 22px;    /* split columns */
    --pad-panel: 16px 18px;
    --gap-panel: 14px;
}

:root[data-theme="light"] {
    --bg: #F4F3F9;
    --panel: #FFFFFF;
    --card: #FFFFFF;
    --row: #EEEDF5;
    --line: #E2E0EC;
    --edge: #C7C4D8;
    --rail: #E6E4EF;
    --field: #FFFFFF;
    --fg: #1C1B2B;
    --soft: #2F2E45;
    --muted: #5F5D75;
    --hint: #8785A0;
    --accent: #1F8A66;    /* deep mint, so contrast holds on white */
    --on-accent: #FFFFFF;
    --warn: #B9601B;
    --hover: #5B53A8;
    color-scheme: light;
}

html, body { background: var(--bg); }
body {
    margin: 0;
    color: var(--fg);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tn { font-variant-numeric: tabular-nums; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
