/* PetroFuel360 customer app: theme tokens and typeface ("Forecourt").
   Dark is a station forecourt at night: night-blue ground, panels lit like a
   canopy, one octane-sticker yellow. Light is the same forecourt by day:
   concrete ground, white panels, the rail stays night-blue.
   The Owner Console loads it too (platform_admin.css maps its variables onto these tokens).

   Accent roles:
     --primary       solid yellow fills only (selected pill, active nav row,
                     primary button, octane chips); ink on it is --primary-contrast
     --accent-text   links, highlighted figures, active outlines and soft tints
                     (--primary-rgb / --primary-light follow it, not the yellow) */

/* JetBrains Mono for everything: words, titles and numbers. Latin, Latin extended
   and a small symbols set (arrows, math, shapes) so "→" and "≤" match the text. */
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-400.woff2") format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-ext-400.woff2") format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-500.woff2") format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-ext-500.woff2") format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-600.woff2") format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-ext-600.woff2") format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-700.woff2") format('woff2'); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-ext-700.woff2") format('woff2'); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-symbols-400.woff2") format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0192, U+2190-21FF, U+2200-22FF, U+25A0-25FF, U+2713-2714; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-symbols-500.woff2") format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0192, U+2190-21FF, U+2200-22FF, U+25A0-25FF, U+2713-2714; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-symbols-700.woff2") format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0192, U+2190-21FF, U+2200-22FF, U+25A0-25FF, U+2713-2714; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-symbols-700.woff2") format('woff2'); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0192, U+2190-21FF, U+2200-22FF, U+25A0-25FF, U+2713-2714; }
@font-face { font-family: 'JetBrains Mono'; src: url("../fonts/jetbrains-mono-latin-400-italic.woff2") format('woff2'); font-weight: 400 500; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    color-scheme: dark;

    /* Surfaces */
    --bg-primary: #0c1220;        /* ground */
    --bg-secondary: #151d2e;      /* panel */
    --bg-tertiary: #1b2540;       /* table head, wells inside a panel */
    --bg-hover: #202b47;
    --bg-elevated: #19233a;       /* menus, popovers, dialogs */
    --bg-input: #0f1626;
    --bg-card: #151d2e;
    --border-color: #243049;
    --border-light: #33425f;
    --border-subtle: #1b2540;

    /* Text */
    --text-primary: #e9eef7;
    --text-secondary: #b8c4da;
    --text-tertiary: #9aa8c2;
    --text-muted: #8696b4;

    /* Accent */
    --primary: #ffd60a;
    --primary-hover: #ffe14d;
    --primary-contrast: #10131a;
    --accent-text: #8fb6ff;
    --accent-line: #8fb6ff;
    --primary-rgb: 143, 182, 255;
    --primary-light: rgba(143, 182, 255, 0.12);
    --primary-glow: rgba(143, 182, 255, 0.24);
    --primary-glow-subtle: rgba(143, 182, 255, 0.12);

    /* Rail and top bar */
    --sidebar-bg: #090e19;
    --sidebar-bg-elevated: #111a2c;
    --sidebar-border: #1a2439;
    --sidebar-text: #c3cde0;
    --sidebar-text-active: #10131a;
    /* Icon hues for the night-blue rail (the rail is dark in both themes) */
    --rail-green: #5ee09a; --rail-blue: #8fb6ff; --rail-cyan: #5fd4e8; --rail-amber: #ffb84d; --rail-rose: #ff8a9b;
    --sidebar-label: #7c8cab;
    --sidebar-hover: rgba(233, 238, 247, 0.06);
    --sidebar-active-bg: #ffd60a;
    --sidebar-active-accent: #ffd60a;
    --topbar-bg: #0c1220;

    /* State */
    --danger: #ff7b6b;
    --danger-light: rgba(255, 123, 107, 0.13);
    --success: #5fd693;
    --success-light: rgba(95, 214, 147, 0.13);
    --success-rgb: 95, 214, 147;
    --warning: #ffb020;
    --warning-light: rgba(255, 176, 32, 0.14);
    --info: #6cb8ff;
    --info-light: rgba(108, 184, 255, 0.13);

    /* Fuel grades wear their own color (fuel_grade_colors.py); the ring keeps a
       white or yellow grade visible on any surface. */
    --grade-ring: transparent;

    /* Charts: key series yellow, the rest in cool steps */
    --chart-1: #ffd60a;
    --chart-2: #8fb6ff;
    --chart-3: #5f7198;
    --chart-4: #5fd693;
    --chart-5: #ff7b6b;

    /* Layout */
    --topnav-height: 60px;
    --sidebar-width: 272px;
    --sidebar-width-icon: 68px;
    --border-radius: 14px;
    --border-radius-sm: 10px;
    --border-radius-xs: 8px;
    --border-radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(3, 6, 14, 0.40);
    --shadow: 0 2px 6px rgba(3, 6, 14, 0.45);
    --shadow-md: 0 8px 20px -6px rgba(3, 6, 14, 0.60);
    --shadow-lg: 0 20px 44px -12px rgba(3, 6, 14, 0.70);
    --shadow-glow: 0 0 0 3px rgba(143, 182, 255, 0.28);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 140ms var(--ease-out);
    --transition-base: 200ms var(--ease-out);
    --transition-slow: 320ms var(--ease-out);

    /* Names older page styles reference */
    --accent: var(--accent-text);
    --accent-color: var(--accent-text);
    --accent-primary: var(--accent-text);
    --accent-blue: var(--info);
    --accent-yellow: var(--warning);
    --card-bg: var(--bg-secondary);
    --border: var(--border-color);
    --text: var(--text-primary);

    /* Type: JetBrains Mono for everything (words, titles and numbers). */
    --font-num: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --font-family: var(--font-num);
    --font-display: var(--font-num);
    --font-mono: var(--font-num);
}

[data-theme="light"] {
    color-scheme: light;

    --bg-primary: #eceff3;        /* concrete */
    --bg-secondary: #ffffff;
    --bg-tertiary: #f2f4f8;
    --bg-hover: #e8ecf3;
    --bg-elevated: #ffffff;
    --bg-input: #ffffff;
    --bg-card: #ffffff;
    --border-color: #d3d9e4;
    --border-light: #bcc5d4;
    --border-subtle: #e4e8ef;

    --text-primary: #111a2e;
    --text-secondary: #38455e;
    --text-tertiary: #4f5c76;
    --text-muted: #5a6781;

    --primary: #ffd60a;
    --primary-hover: #f5c800;
    --primary-contrast: #10131a;
    --accent-text: #1d4ed8;
    --accent-line: #1d4ed8;
    --primary-rgb: 29, 78, 216;
    --primary-light: rgba(29, 78, 216, 0.08);
    --primary-glow: rgba(29, 78, 216, 0.20);
    --primary-glow-subtle: rgba(29, 78, 216, 0.10);

    /* The rail stays night-blue by day */
    --sidebar-bg: #0f1728;
    --sidebar-bg-elevated: #18223a;
    --sidebar-border: #0f1728;
    --sidebar-text: #c3cde0;
    --sidebar-text-active: #10131a;
    --rail-green: #5ee09a; --rail-blue: #8fb6ff; --rail-cyan: #5fd4e8; --rail-amber: #ffb84d; --rail-rose: #ff8a9b;
    --sidebar-label: #8292b1;
    --sidebar-hover: rgba(233, 238, 247, 0.07);
    --sidebar-active-bg: #ffd60a;
    --sidebar-active-accent: #ffd60a;
    --topbar-bg: #ffffff;

    --danger: #c22a1e;
    --danger-light: rgba(194, 42, 30, 0.09);
    --success: #14753f;
    --success-light: rgba(20, 117, 63, 0.10);
    --success-rgb: 20, 117, 63;
    --warning: #9a5600;
    --warning-light: rgba(214, 137, 0, 0.14);
    --info: #1a5fb4;
    --info-light: rgba(26, 95, 180, 0.09);

    --grade-ring: rgba(16, 19, 26, 0.32);

    --chart-1: #e0a800;
    --chart-2: #1d4ed8;
    --chart-3: #8a96ad;
    --chart-4: #14753f;
    --chart-5: #c22a1e;

    --shadow-sm: 0 1px 2px rgba(17, 26, 46, 0.06);
    --shadow: 0 2px 6px rgba(17, 26, 46, 0.08);
    --shadow-md: 0 8px 20px -8px rgba(17, 26, 46, 0.18);
    --shadow-lg: 0 20px 44px -14px rgba(17, 26, 46, 0.26);
    --shadow-glow: 0 0 0 3px rgba(29, 78, 216, 0.22);
}
