/* ============================================================================
   FuelStation Manager — Design System  (v2 makeover, 2026-06)
   Extends the login-page brand language (green #0f7b55 / ink / Inter) across
   the whole authenticated app. Pure presentation: overrides Bootstrap 5.3
   CSS variables + adds a light component layer. No layout-breaking changes.
   ============================================================================ */

:root {
    /* Brand palette (shared with login.html) */
    --fs-ink:        #17211d;
    --fs-ink-soft:   #2b3a33;
    --fs-muted:      #5c6862;
    --fs-line:       #e3e9e4;
    --fs-line-soft:  #eef2ee;
    --fs-paper:      #f5f8f4;
    --fs-card:       #ffffff;
    --fs-green:      #0f7b55;
    --fs-green-dark: #07583d;
    --fs-green-soft: #e7f3ec;
    --fs-amber:      #f4a62a;
    --fs-amber-soft: #fdf2dc;
    --fs-blue:       #2467a6;
    --fs-blue-soft:  #e6effa;
    --fs-red:        #d8453b;
    --fs-red-soft:   #fbe9e7;

    --fs-shadow-sm: 0 1px 2px rgba(23,33,29,.06), 0 1px 3px rgba(23,33,29,.05);
    --fs-shadow:    0 2px 6px rgba(23,33,29,.06), 0 8px 24px rgba(23,33,29,.06);
    --fs-shadow-lg: 0 12px 36px rgba(23,33,29,.12);
    --fs-radius:    14px;
    --fs-radius-sm: 10px;

    /* Map Bootstrap theme tokens onto the brand palette */
    --bs-primary:        #0f7b55;
    --bs-primary-rgb:    15,123,85;
    --bs-success:        #0f7b55;
    --bs-success-rgb:    15,123,85;
    --bs-body-color:     #17211d;
    --bs-body-color-rgb: 23,33,29;
    --bs-body-bg:        #f5f8f4;
    --bs-border-color:   #e3e9e4;
    --bs-link-color:     #0f7b55;
    --bs-link-hover-color: #07583d;
    --bs-emphasis-color: #17211d;
}

/* ── Per-corporation brand theming ──────────────────────────────────────────
   The whole identity (navbar, hero, accents, primary buttons, links) is driven
   by a single --fs-brand colour. base.html sets it inline on <body> from the
   active station's corporation hex_color (BPCL red, IOCL blue, HPCL green, …).
   When no station is active it falls back to OilMart green below. Darker/softer
   shades are derived with color-mix so ANY corporation colour themes correctly.
   ──────────────────────────────────────────────────────────────────────────── */
body {
    /* Default brand = OilMart green; overridden by inline --fs-brand on <body> */
    --fs-brand: var(--fs-green);

    /* Static fallbacks (older browsers without color-mix keep a green-ish theme) */
    --fs-brand-dark: var(--fs-green-dark);
    --fs-brand-deep: #0c1f18;
    --fs-brand-mid:  #137e57;
    --fs-brand-soft: var(--fs-green-soft);
    --fs-brand-tint: #eef6f1;

    /* Derived shades — recompute from whatever --fs-brand is set to */
    --fs-brand-dark: color-mix(in srgb, var(--fs-brand) 82%, #001008);
    --fs-brand-deep: color-mix(in srgb, var(--fs-brand) 36%, #07130d);
    --fs-brand-mid:  color-mix(in srgb, var(--fs-brand) 90%, #fff);
    --fs-brand-soft: color-mix(in srgb, var(--fs-brand) 13%, #fff);
    --fs-brand-tint: color-mix(in srgb, var(--fs-brand) 7%, #fff);

    /* Secondary/accent colour (BPCL yellow, IOCL/HPCL navy …); default amber */
    --fs-accent: var(--fs-amber);

    /* Bootstrap primary + links follow the active brand */
    --bs-primary:          var(--fs-brand);
    --bs-link-color:       var(--fs-brand-dark);
    --bs-link-hover-color: var(--fs-brand-deep);

    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.92rem;
    color: var(--fs-ink);
    background:
        radial-gradient(1200px 480px at 100% -8%, color-mix(in srgb, var(--fs-brand) 8%, transparent), transparent 60%),
        radial-gradient(900px 420px at -6% 0%, color-mix(in srgb, var(--fs-brand) 9%, transparent), transparent 55%),
        var(--fs-paper);
    background-attachment: fixed;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
html { max-width: 100%; overflow-x: hidden; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--fs-ink); }
.text-muted { color: var(--fs-muted) !important; }
a { text-decoration: none; }
img, svg, canvas { max-width: 100%; }

/* ── Top navigation — deep brand gradient ───────────────────────────────── */
.navbar.bg-dark {
    background: linear-gradient(112deg, var(--fs-brand-deep) 0%, var(--fs-brand-dark) 55%, var(--fs-brand) 100%) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 6px 20px rgba(7,40,28,.28);
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding-top: .55rem; padding-bottom: .55rem;
}
.navbar-brand { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; min-width: 0; }
.app-brand-mark {
    width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
    box-shadow: 0 6px 16px rgba(0,0,0,.25); background: #fff;
}
.app-brand-by { color: rgba(255,255,255,.66); font-size: .76rem; font-weight: 600; }
.tm{font-size:.45em;line-height:0;vertical-align:super;font-weight:600;letter-spacing:0;margin-left:.04em}
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,.82);
    font-weight: 500; font-size: .9rem;
    border-radius: 8px; padding-left: .7rem; padding-right: .7rem;
    transition: background .15s ease, color .15s ease;
}
.navbar-dark .navbar-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff; background: rgba(255,255,255,.14);
    box-shadow: inset 0 -2px 0 var(--fs-accent);
}
.navbar .dropdown-menu {
    border: 1px solid var(--fs-line);
    border-radius: 12px;
    box-shadow: var(--fs-shadow);
    padding: .4rem;
    margin-top: .4rem !important;
}
.navbar .dropdown-item { border-radius: 8px; padding: .5rem .7rem; font-size: .9rem; font-weight: 500; }
.navbar .dropdown-item:hover { background: var(--fs-brand-soft); color: var(--fs-brand-dark); }
.navbar .dropdown-item.active { background: var(--fs-brand); }
.navbar-text, #clock { color: rgba(255,255,255,.6) !important; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--fs-line);
    border-radius: var(--fs-radius);
    background: var(--fs-card);
    box-shadow: var(--fs-shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card.shadow-sm { box-shadow: var(--fs-shadow-sm) !important; }
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--fs-line-soft);
    font-weight: 600; color: var(--fs-ink);
    padding: .85rem 1.1rem;
}
.card-body { padding: 1.1rem; }
/* Subtle hover lift only on interactive/linked cards */
a > .card:hover, .card.fs-hover:hover {
    box-shadow: var(--fs-shadow); transform: translateY(-2px); border-color: #d4ddd6;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { font-weight: 600; border-radius: 10px; white-space: normal; letter-spacing: -0.005em; }
/* Primary action follows the active corporation brand */
.btn-primary {
    --bs-btn-bg: var(--fs-brand); --bs-btn-border-color: var(--fs-brand);
    --bs-btn-hover-bg: var(--fs-brand-dark); --bs-btn-hover-border-color: var(--fs-brand-dark);
    --bs-btn-active-bg: var(--fs-brand-dark); --bs-btn-active-border-color: var(--fs-brand-dark);
    --bs-btn-disabled-bg: var(--fs-brand); --bs-btn-disabled-border-color: var(--fs-brand);
    --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
}
/* Success keeps its semantic green (save / confirm) */
.btn-success {
    --bs-btn-bg: var(--fs-green); --bs-btn-border-color: var(--fs-green);
    --bs-btn-hover-bg: var(--fs-green-dark); --bs-btn-hover-border-color: var(--fs-green-dark);
    --bs-btn-active-bg: var(--fs-green-dark); --bs-btn-active-border-color: var(--fs-green-dark);
}
.btn-primary, .btn-success { box-shadow: 0 4px 12px rgba(23,33,29,.14); }
.btn-primary:hover, .btn-success:hover { box-shadow: 0 6px 16px rgba(23,33,29,.2); }
.btn-outline-primary {
    --bs-btn-color: var(--fs-brand-dark); --bs-btn-border-color: color-mix(in srgb, var(--fs-brand) 45%, #fff);
    --bs-btn-hover-bg: var(--fs-brand); --bs-btn-hover-border-color: var(--fs-brand); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--fs-brand-dark); --bs-btn-active-border-color: var(--fs-brand-dark);
}
.btn-outline-success {
    --bs-btn-color: var(--fs-green); --bs-btn-border-color: #bcd9c9;
    --bs-btn-hover-bg: var(--fs-green); --bs-btn-hover-border-color: var(--fs-green);
    --bs-btn-active-bg: var(--fs-green-dark); --bs-btn-active-border-color: var(--fs-green-dark);
}
.btn-warning {
    --bs-btn-bg: var(--fs-amber); --bs-btn-border-color: var(--fs-amber);
    --bs-btn-hover-bg: #e6951c; --bs-btn-hover-border-color: #e6951c;
    --bs-btn-color: #3a2a07; --bs-btn-hover-color: #3a2a07;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
input, select, textarea { font-size: 16px; }
.form-control, .form-select {
    border-radius: 10px; border-color: var(--fs-line);
    background: #fff; color: var(--fs-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--fs-brand);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--fs-brand) 18%, transparent);
}
.input-group-text { background: var(--fs-line-soft); border-color: var(--fs-line); border-radius: 10px; color: var(--fs-muted); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--fs-ink-soft); margin-bottom: .35rem; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table { --bs-table-bg: transparent; color: var(--fs-ink); }
.table th {
    font-weight: 600; font-size: .74rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--fs-muted);
    border-bottom: 1px solid var(--fs-line);
}
.table thead.table-light th, .table > :not(caption) > * > * { background-color: transparent; }
.table-light, thead.table-light th { background: var(--fs-line-soft) !important; }
.table td { border-color: var(--fs-line-soft); vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background: var(--fs-brand-tint); }
.table-responsive { border-radius: 12px; -webkit-overflow-scrolling: touch; }

/* ── Badges & pills ─────────────────────────────────────────────────────── */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 7px; padding: .38em .6em; }
.badge.bg-success, .badge.text-bg-success { background: var(--fs-green) !important; }
.badge.bg-danger  { background: var(--fs-red) !important; }
.badge.bg-info, .badge.text-bg-info { background: var(--fs-blue) !important; color: #fff !important; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert { border: 1px solid transparent; border-radius: 12px; font-weight: 500; }
.alert-success { background: var(--fs-green-soft); border-color: #c6e4d2; color: var(--fs-green-dark); }
.alert-danger  { background: var(--fs-red-soft);   border-color: #f3c9c4; color: #9e2b22; }
.alert-warning { background: var(--fs-amber-soft);  border-color: #f3dcab; color: #8a5a08; }
.alert-info    { background: var(--fs-blue-soft);   border-color: #c4dcf2; color: #1c4d7d; }

/* ── Page-level helpers used by makeover templates ──────────────────────── */
.app-shell { min-width: 0; }
.card, .card-body, .modal-content, .input-group { min-width: 0; }

/* Page header band */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem;
}
.page-head h4, .page-head h1 { margin: 0; }
.page-head .eyebrow {
    text-transform: uppercase; letter-spacing: .08em; font-size: .7rem;
    font-weight: 700; color: var(--fs-brand-dark); margin-bottom: .15rem;
}

/* Hero greeting (dashboard) — brand-tinted gradient */
.fs-hero {
    position: relative; overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(118deg, var(--fs-brand-deep) 0%, var(--fs-brand-dark) 58%, var(--fs-brand-mid) 100%);
    color: #fff;
    padding: clamp(18px, 3vw, 30px) clamp(20px, 3.4vw, 34px);
    box-shadow: 0 18px 48px rgba(7,40,28,.24);
}
.fs-hero::after {
    content: ''; position: absolute; right: -40px; top: -60px;
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--fs-accent) 42%, transparent), transparent 68%);
    pointer-events: none;
}
.fs-hero h3 { color: #fff; font-weight: 800; margin: 0 0 .25rem; }
.fs-hero .lead-sub { color: rgba(255,255,255,.78); font-size: .92rem; }
.fs-hero .hero-station {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; font-weight: 600;
}

/* KPI / stat cards */
.stat-card {
    position: relative; border: 1px solid var(--fs-line); border-radius: var(--fs-radius);
    background: var(--fs-card); padding: 1rem 1.1rem; box-shadow: var(--fs-shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease;
    height: 100%;
}
.stat-card:hover { box-shadow: var(--fs-shadow); transform: translateY(-2px); }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.stat-card .stat-label { font-size: .76rem; font-weight: 600; color: var(--fs-muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-card .stat-value { font-size: clamp(1.45rem, 3.4vw, 1.9rem); font-weight: 800; line-height: 1.1; margin-top: .3rem; letter-spacing: -0.02em; }
.stat-card .stat-icon {
    width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.stat-icon.ic-green { background: var(--fs-brand-soft); color: var(--fs-brand-dark); }
.stat-icon.ic-blue  { background: var(--fs-blue-soft);  color: var(--fs-blue); }
.stat-icon.ic-amber { background: var(--fs-amber-soft); color: #a9730a; }
.stat-icon.ic-ink   { background: #eceeec; color: var(--fs-ink); }
.stat-card .stat-foot { font-size: .72rem; color: var(--fs-muted); margin-top: .2rem; }
.stat-card.accent-green { border-top: 3px solid var(--fs-brand); }
.stat-card.accent-blue  { border-top: 3px solid var(--fs-blue); }
.stat-card.accent-amber { border-top: 3px solid var(--fs-amber); }
.stat-card.accent-ink   { border-top: 3px solid var(--fs-ink); }

/* Quick-action tiles */
.qa-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: .65rem; }
.qa-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .45rem; text-align: center; min-height: 88px; padding: .85rem .5rem;
    border: 1px solid var(--fs-line); border-radius: var(--fs-radius-sm);
    background: var(--fs-card); color: var(--fs-ink-soft); font-weight: 600; font-size: .82rem;
    box-shadow: var(--fs-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.qa-tile:hover { transform: translateY(-3px); box-shadow: var(--fs-shadow); border-color: color-mix(in srgb, var(--fs-brand) 28%, #fff); color: var(--fs-brand-dark); }
.qa-tile .qa-ic {
    width: 42px; height: 42px; border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 1.2rem;
    background: var(--fs-brand-soft); color: var(--fs-brand-dark);
}
.qa-tile.qa-amber .qa-ic { background: var(--fs-amber-soft); color: #a9730a; }
.qa-tile.qa-blue  .qa-ic { background: var(--fs-blue-soft);  color: var(--fs-blue); }
.qa-tile.qa-ink   .qa-ic { background: #ecefed; color: var(--fs-ink); }
@media (max-width: 1199.98px) { .qa-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 575.98px)  { .qa-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .qa-tile { min-height: 80px; font-size: .76rem; } }

/* Soft section title */
.section-title { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fs-muted); display: flex; align-items: center; gap: .4rem; }

/* ============================================================================
   Responsive carry-overs (preserved from original custom.css — mobile fixes)
   ============================================================================ */
.btn { white-space: normal; }
.dropdown-menu { max-width: calc(100vw - 1.5rem); }

@media (max-width: 1199.98px) {
    .navbar-user-actions > .dropdown, .navbar-user-actions > a, .navbar-user-actions > span { min-width: 0; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .app-shell { padding-left: 1rem !important; padding-right: 1rem !important; }
    .table { font-size: .86rem; }
}
@media (max-width: 576px) {
    body { font-size: .88rem; }
    h4 { font-size: 1.05rem; line-height: 1.35; }
    .container-fluid { padding: .75rem !important; }
    .navbar .container-fluid { padding-left: .75rem !important; padding-right: .75rem !important; }
    .dropdown-menu { max-height: 70vh; overflow: auto; }
    .card { border-radius: 12px; }
    .card-body { padding: .9rem; }
    .card-header { padding: .75rem .9rem; }
    .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
    .btn-sm { min-height: 36px; }
    .btn-group, .btn-toolbar { flex-wrap: wrap; }
    .btn-group > .btn { border-radius: 10px !important; margin: .12rem; }
    .row.g-4 { --bs-gutter-y: 1rem; }
    .table { font-size: .82rem; min-width: 720px; }
    .table-sm { min-width: 560px; }
    .modal-dialog { margin: .75rem; }
    .input-group-text { padding-left: .65rem; padding-right: .65rem; }
    .form-control, .form-select, .input-group-text { min-height: 42px; }
    .alert { padding: .75rem; }
    .alert .badge { white-space: normal; text-align: left; }
}

/* ============================================================================
   Premium polish (v3) — lift the light app to homepage-grade finish.
   Softer layered shadows, tighter type, refined cards / nav / inputs / tables.
   ============================================================================ */
:root {
    --fs-shadow-sm: 0 1px 2px rgba(16,40,28,.05), 0 2px 6px rgba(16,40,28,.05);
    --fs-shadow:    0 4px 12px rgba(16,40,28,.06), 0 18px 40px -16px rgba(16,40,28,.14);
    --fs-shadow-lg: 0 24px 60px -24px rgba(16,40,28,.22);
    --fs-radius:    16px;
    --fs-radius-sm: 11px;
}
h1, h2, h3, h4, h5 { letter-spacing: -0.02em; }
.card {
    border-radius: var(--fs-radius);
    border-color: color-mix(in srgb, var(--fs-line) 78%, #fff);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card-header { font-weight: 700; letter-spacing: -0.01em; padding: .95rem 1.15rem; }
.card-body { padding: 1.15rem 1.25rem; }

/* Navbar: deeper premium gradient + subtle inner highlight */
.navbar.bg-dark {
    background: linear-gradient(112deg, var(--fs-brand-deep) 0%, var(--fs-brand-dark) 52%, var(--fs-brand) 100%) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 8px 28px -10px rgba(7,40,28,.5);
    padding-top: .6rem; padding-bottom: .6rem;
}
.navbar-brand { font-weight: 800; letter-spacing: -0.02em; }

/* Stat cards: a touch more lift + crisper accent */
.stat-card { border-radius: var(--fs-radius); box-shadow: var(--fs-shadow-sm); }
.stat-card:hover { box-shadow: var(--fs-shadow); transform: translateY(-3px); }
.stat-card .stat-value { letter-spacing: -0.03em; }

/* Buttons: refined weight + smooth press */
.btn { letter-spacing: -0.005em; transition: transform .15s ease, box-shadow .18s ease, background .18s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-success { box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--fs-brand) 60%, transparent); }

/* Inputs: softer fill + brand focus ring */
.form-control, .form-select {
    background: #fcfdfc; border-radius: 11px;
    border-color: color-mix(in srgb, var(--fs-line) 70%, #fff);
}
.form-control:focus, .form-select:focus {
    background: #fff; border-color: var(--fs-brand);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--fs-brand) 16%, transparent);
}

/* Tables: lighter, more breathable */
.table { --bs-table-bg: transparent; }
.table > thead th { border-bottom: 1px solid var(--fs-line); padding: .7rem .85rem; }
.table > tbody > tr > td { padding: .7rem .85rem; }
.table-hover > tbody > tr { transition: background .12s ease; }

/* Dropdowns + modals: premium radius + shadow */
.dropdown-menu { border-radius: 13px; box-shadow: var(--fs-shadow); border-color: var(--fs-line); padding: .35rem; }
.dropdown-item { border-radius: 9px; }
.modal-content { border-radius: 18px; border: 1px solid var(--fs-line); box-shadow: var(--fs-shadow-lg); }

/* Section eyebrows / page heads a touch tighter */
.page-head .eyebrow { letter-spacing: .1em; }
.section-title { letter-spacing: .04em; }

/* ============================================================================
   Left sidebar shell  (2026-10)
   The section nav moved from a top navbar row into a fixed left rail. One
   markup block in base.html serves both: Bootstrap's `offcanvas-lg` renders it
   as a static rail from 992px up, and as a slide-over drawer below that.
   Bootstrap forces `background-color: transparent !important` on .offcanvas-*
   above the breakpoint, so the desktop rail background needs !important back.
   ============================================================================ */
:root {
    --fs-sidebar-w: 252px;
    --fs-topbar-h:  56px;
}

/* ── Slim top bar (brand, environment badge, station switcher, user menu) ── */
.fs-topbar {
    position: sticky; top: 0; z-index: 1035;
    min-height: var(--fs-topbar-h);
    padding-top: .4rem; padding-bottom: .4rem;
}
.fs-topbar .navbar-brand { font-size: 1.06rem; }
.fs-sidebar-toggler {
    border: 1px solid rgba(255,255,255,.22); padding: .25rem .5rem;
    border-radius: 9px;
}
.fs-sidebar-toggler:focus { box-shadow: 0 0 0 .18rem rgba(255,255,255,.18); }

/* ── The rail itself ── */
.fs-sidebar {
    --bs-offcanvas-width: 274px;
    --bs-offcanvas-bg: var(--fs-brand-dark);
    color: rgba(255,255,255,.82);
}
.fs-sidebar .offcanvas-header {
    background: var(--fs-brand-deep);
    border-bottom: 1px solid rgba(255,255,255,.1);
}

@media (min-width: 992px) {
    .fs-sidebar {
        position: fixed; top: var(--fs-topbar-h); left: 0;
        width: var(--fs-sidebar-w); height: calc(100vh - var(--fs-topbar-h));
        z-index: 1030; overflow: hidden;
        background: linear-gradient(180deg, var(--fs-brand-deep) 0%, var(--fs-brand-dark) 62%, var(--fs-brand-dark) 100%) !important;
        border-right: 1px solid rgba(255,255,255,.07);
    }
    .fs-sidebar .fs-sidebar-body {
        display: block !important;
        height: 100%; overflow-y: auto;
        padding: .7rem .55rem 2rem !important;
        background: transparent !important;
    }
    /* Thin scrollbar so the rail stays quiet */
    .fs-sidebar .fs-sidebar-body { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
    .fs-sidebar .fs-sidebar-body::-webkit-scrollbar { width: 7px; }
    .fs-sidebar .fs-sidebar-body::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.2); border-radius: 4px;
    }
    .fs-sidebar .fs-sidebar-body::-webkit-scrollbar-track { background: transparent; }

    /* .container-fluid is width:100% with auto side margins. Setting only
       margin-left would keep it 100% wide and push the right edge off-screen,
       so width must go back to auto and let the margin shrink the content box. */
    .app-shell.has-sidebar {
        margin-left: var(--fs-sidebar-w);
        margin-right: 0;
        width: auto;
    }
}

/* ── Nav items ── */
.fs-sidenav { padding: 0; }
.fs-sidenav > li + li { margin-top: 1px; }

.fs-nav-link, .fs-nav-sublink {
    display: flex; align-items: center; gap: .6rem;
    width: 100%; text-align: left;
    border: 0; background: transparent;
    border-radius: 9px; text-decoration: none;
    color: rgba(255,255,255,.78);
    transition: background .14s ease, color .14s ease;
}
.fs-nav-link {
    padding: .52rem .68rem;
    font-size: .905rem; font-weight: 500;
}
.fs-nav-link > i:first-child {
    font-size: 1rem; width: 1.2rem; flex: none; text-align: center;
    opacity: .9;
}
.fs-nav-link:hover, .fs-nav-sublink:hover { background: rgba(255,255,255,.1); color: #fff; }
.fs-nav-link.active {
    background: rgba(255,255,255,.15); color: #fff; font-weight: 600;
    box-shadow: inset 3px 0 0 var(--fs-accent, var(--fs-amber));
}
.fs-nav-link:focus-visible, .fs-nav-sublink:focus-visible {
    outline: 2px solid rgba(255,255,255,.55); outline-offset: -2px;
}

/* Group toggles */
.fs-nav-caret {
    margin-left: auto; font-size: .68rem; opacity: .6;
    transition: transform .18s ease;
}
.fs-nav-toggle[aria-expanded="true"] .fs-nav-caret { transform: rotate(180deg); opacity: .9; }

/* Sub-items */
.fs-subnav {
    margin: 1px 0 4px;
    padding-left: 1.55rem;
    border-left: 1px solid rgba(255,255,255,.1);
    margin-left: 1.25rem;
}
.fs-nav-sublink {
    padding: .36rem .6rem;
    font-size: .845rem; font-weight: 450;
    color: rgba(255,255,255,.68);
}
.fs-nav-sublink.active {
    background: rgba(255,255,255,.14); color: #fff; font-weight: 600;
}
.fs-nav-sublink.text-danger { color: #ffa79f !important; }
.fs-nav-sublink.text-danger:hover { color: #ffd0cb !important; background: rgba(216,69,59,.26); }

/* Section eyebrow inside the rail */
.fs-nav-head {
    padding: .95rem .7rem .3rem;
    font-size: .66rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255,255,255,.4);
}
.fs-sidenav > li.fs-nav-head:first-child { padding-top: .35rem; }
.fs-nav-sep { height: 1px; background: rgba(255,255,255,.12); margin: .45rem .6rem; }

/* ── Fuel chips ───────────────────────────────────────────────────────────
   A dealer reads a forecourt screen by colour before they read the word, so
   every grade in one flat blue made a nozzle list something to parse rather
   than glance at. Petrol green, diesel blue, branded premium amber — close to
   how the pumps themselves are marked.

   The colour never carries meaning on its own: the grade is always written in
   the chip, so this reads the same to someone who cannot separate red from
   green. Contrast is kept above 4.5:1 against each fill, which is why the
   amber chip takes dark text and the others light. */
.fuel-chip {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.25;
    white-space: nowrap;
    border: 1px solid transparent;
}
.fuel-petrol  { background: #0f7b3f; color: #fff; border-color: #0d6a36; }
.fuel-diesel  { background: #17508f; color: #fff; border-color: #123f71; }
.fuel-premium { background: #f0b429; color: #3d2f00; border-color: #d19b1b; }
.fuel-gas     { background: #0b7285; color: #fff; border-color: #095c6b; }
.fuel-other   { background: #5b6472; color: #fff; border-color: #4a515c; }

/* AdBlue is neither petrol, diesel nor a branded grade — and "blue" is already
   diesel's, so it takes violet rather than a second blue nobody could tell
   apart at a glance on a busy nozzle list. */
.fuel-adblue      { background: #6f42c1; color: #fff; border-color: #5a35a0; }
.tank-fuel-adblue { background: linear-gradient(to top,#5a35a0,#9168d6); }

/* ── Dashboard pulse ──────────────────────────────────────────────────────
   A forecourt dashboard that opens on an empty chart tells the owner nothing.
   These are the four figures they came for, and a line saying whether the
   place is alive — colour and weight carry the hierarchy, but every value is
   also written out, so nothing depends on seeing the difference. */
.fs-kpi { border-radius: 14px; }
.fs-kpi .fs-kpi-label {
    font-size: .68rem; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; color: #6b7280; margin-bottom: .15rem;
}
.fs-kpi .fs-kpi-value {
    font-size: clamp(1.05rem, 4.4vw, 1.6rem); font-weight: 800; line-height: 1.15; color: #111827;
    /* A rupee figure must never be split across two lines. Something upstream
       sets overflow-wrap: break-word, and on a phone that turned the month's
       total into "₹10,169,1 / 35" — which reads as two numbers. */
    overflow-wrap: normal; word-break: keep-all;
}
.fs-kpi .fs-kpi-sub { font-size: .72rem; color: #6b7280; margin-top: .1rem; }

/* The lead card carries the day's headline, so it gets the brand weight. */
.fs-kpi-lead { background: linear-gradient(135deg,#0f766e,#115e9e); }
.fs-kpi-lead .fs-kpi-label { color: rgba(255,255,255,.75); }
.fs-kpi-lead .fs-kpi-value { color: #fff; }
.fs-kpi-lead .fs-kpi-sub   { color: rgba(255,255,255,.8); }
.fs-kpi-up   { color: #6ee7b7; font-weight: 800; }
.fs-kpi-down { color: #fca5a5; font-weight: 800; }

.fs-heartbeat { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.fs-beat {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .74rem; font-weight: 700;
    padding: .25rem .6rem; border-radius: 999px; border: 1px solid transparent;
}
.fs-beat-live { background: #e7f6ef; color: #0b6b43; border-color: #bfe6d3; }
.fs-beat-ok   { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.fs-beat-warn { background: #fff4e5; color: #92400e; border-color: #fde3c0; }
.fs-beat-idle { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }

/* The only thing on the page that actually moves — a slow pulse, so "live"
   reads as live at a glance without becoming something that nags. */
.fs-pulse {
    width: .5rem; height: .5rem; border-radius: 50%;
    background: #10b981; box-shadow: 0 0 0 0 rgba(16,185,129,.7);
    animation: fs-pulse-ring 2.4s ease-out infinite;
}
@keyframes fs-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.65); }
    70%  { box-shadow: 0 0 0 .45rem rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
/* Someone who has asked for less motion should not get a blinking dot. */
@media (prefers-reduced-motion: reduce) {
    .fs-pulse { animation: none; }
}

/* ── Connection heartbeat ────────────────────────────────────────────────
   The dashboard re-fetches its own numbers every half minute, and this is
   where that shows: a monitor trace while the server is answering, an amber
   "reconnecting" while it is not, and red once it clearly is not coming back.
   The trace is decoration — the state is always written out in words too. */
.fs-beat-off { background: #fdecec; color: #991b1b; border-color: #f7c9c9; }
.fs-beat-dim { font-weight: 600; opacity: .72; }

.fs-ecg {
    position: relative; display: inline-block; overflow: hidden;
    width: 1.5rem; height: .72rem; flex: 0 0 auto;
    background: no-repeat center/100% 100%
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M0 5.5h4.5l1.2-3.5 1.6 6.5 1.7-3h3.5l1.2-4 1.6 8 1.7-4H24' fill='none' stroke='%230b6b43' stroke-width='1.1' stroke-linejoin='round' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
}
/* The sweep that makes it read as a live trace rather than a picture of one. */
.fs-ecg i {
    position: absolute; top: 0; bottom: 0; left: -.35rem; width: .35rem;
    background: linear-gradient(90deg, rgba(11,107,67,0), rgba(11,107,67,.75));
    animation: fs-ecg-sweep 1.8s linear infinite;
}
@keyframes fs-ecg-sweep { from { left: -.35rem; } to { left: 100%; } }

/* A figure that changes while you are looking at the screen should say so. */
.fs-kpi .fs-kpi-value { border-radius: .4rem; }
.fs-flash { animation: fs-flash 1.4s ease-out; }
@keyframes fs-flash {
    0%   { background: rgba(16,185,129,.3);  box-shadow: 0 0 0 .3rem rgba(16,185,129,.22); }
    100% { background: rgba(16,185,129,0);   box-shadow: 0 0 0 .3rem rgba(16,185,129,0); }
}

@media (prefers-reduced-motion: reduce) {
    .fs-ecg i { animation: none; opacity: .5; left: 60%; }
    .fs-flash { animation: none; }
}
