@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

/* ================= Design tokens ================= */
:root {
    --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --radius: 18px;
    --radius-sm: 12px;

    --bg: #eef3f9;
    --bg-glow: radial-gradient(1200px 500px at 85% -10%, #d6e6f8 0, transparent 60%), radial-gradient(900px 400px at 10% 110%, #e0f2f4 0, transparent 60%);
    --surface: #ffffff;
    --surface-2: #f6f9fc;
    --surface-3: #edf3f9;
    --border: #e1e9f2;
    --border-strong: #cfdbe7;
    --ink: #0f2742;
    --ink-2: #3a5068;
    --muted: #6a7f95;
    --faint: #98a9ba;

    --brand: #1677d2;
    --teal: #0e9fb8;
    --green: #16a36f;
    --amber: #c97c10;
    --red: #d2404c;
    --violet: #7357d1;
    --series-1: #1677d2;
    --series-2: #16a36f;

    --grid: #e7eef5;
    --axis: #8a9db0;
    --shadow-sm: 0 1px 2px rgba(15, 39, 66, .05), 0 6px 18px rgba(15, 39, 66, .05);
    --shadow-md: 0 14px 34px rgba(15, 39, 66, .09);
    --shadow-lg: 0 30px 70px rgba(6, 26, 50, .22);
    --glass: rgba(255, 255, 255, .78);

    --navy: #0b2340;
    --navy-2: #12345a;
    --sidebar: linear-gradient(172deg, #061829 0%, #0a2541 55%, #061727 100%);
    --hero: radial-gradient(circle at 82% 12%, rgba(30, 200, 230, .28), transparent 40%), linear-gradient(115deg, #061a31 0%, #0f3a5d 62%, #0a6a80 100%);

    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #060f1c;
    --bg-glow: radial-gradient(1200px 520px at 85% -10%, rgba(40, 110, 200, .18) 0, transparent 60%), radial-gradient(900px 420px at 5% 110%, rgba(20, 160, 170, .12) 0, transparent 60%);
    --surface: #0c1a2c;
    --surface-2: #10213a;
    --surface-3: #142843;
    --border: #1b3150;
    --border-strong: #26446a;
    --ink: #e7f0fa;
    --ink-2: #b6c7da;
    --muted: #8399b2;
    --faint: #5f7894;

    --brand: #4a9ff0;
    --teal: #2cc0d4;
    --green: #2fc38a;
    --amber: #f0a73c;
    --red: #f06873;
    --violet: #a48bf5;
    --series-1: #3d95e6;
    --series-2: #1fa572;

    --grid: #182b45;
    --axis: #6b84a2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .22);
    --shadow-md: 0 16px 38px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
    --glass: rgba(12, 26, 44, .82);
    --navy: #0a1c33;
    --sidebar: linear-gradient(172deg, #040c17 0%, #071628 55%, #040c17 100%);
    color-scheme: dark;
}

/* ================= Base ================= */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg-glow), var(--bg); background-attachment: fixed; min-height: 100vh; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .38; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
a { color: inherit; }
.ic { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
i[data-icon] { display: inline-flex; font-style: normal; }
.mono { font-family: var(--mono); font-size: .92em; }
strong, .kpi strong, td, .due, .clock { font-variant-numeric: tabular-nums; }

.tone-brand { --tone: var(--brand); }
.tone-teal { --tone: var(--teal); }
.tone-green { --tone: var(--green); }
.tone-amber { --tone: var(--amber); }
.tone-red { --tone: var(--red); }
.tone-violet { --tone: var(--violet); }
.tone-muted { --tone: var(--muted); }

/* ================= Sidebar ================= */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 276px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; padding: 24px 16px; color: #dceafa; background: var(--sidebar);
    border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 220px; pointer-events: none; background: radial-gradient(260px 160px at 20% 0%, rgba(48, 200, 230, .16), transparent 70%); }
.logo { display: flex; align-items: center; gap: 13px; padding: 4px 10px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; }
.logo-full { display: block; width: 100%; max-width: 210px; height: auto; }
.logo-mark { display: none; width: 40px; height: auto; }
.product {
    position: relative; z-index: 1; border: 1px solid rgba(255, 255, 255, .09); border-radius: 16px; padding: 18px 16px; margin: 20px 2px 24px;
    background: linear-gradient(140deg, rgba(40, 110, 170, .45), rgba(10, 40, 70, .4)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.product-title { font-size: 18px; font-weight: 800; line-height: 1.3; color: #fff; margin: 10px 0 6px; letter-spacing: -.4px; }
.product p { font-size: 12px; color: #8fa8c2; line-height: 1.6; margin: 0; }
.eyebrow, .nav-title { font-size: 10px; letter-spacing: 1.7px; font-weight: 800; color: var(--teal); text-transform: uppercase; }
.sidebar .eyebrow { color: #5fd7ea; }
.nav-title { color: #6d86a2; padding: 0 12px 10px; }
nav { display: grid; gap: 4px; }
nav button {
    border: 0; color: #a9bfd6; background: transparent; text-align: left; padding: 11px 13px; border-radius: 12px;
    display: flex; gap: 13px; align-items: center; transition: background .2s, color .2s, transform .2s; position: relative;
}
nav button i .ic { width: 19px; height: 19px; }
nav button span { font-size: 13px; font-weight: 600; }
nav button:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
nav button.active { color: #fff; background: linear-gradient(90deg, rgba(48, 170, 230, .28), rgba(48, 170, 230, .06)); box-shadow: inset 3px 0 #34d6ea; }
nav button.active i { color: #5fe0f0; }
nav button b { margin-left: auto; min-width: 22px; text-align: center; font-size: 11px; background: #2a4a6d; color: #e2eefb; border-radius: 7px; padding: 3px 7px; }
nav button b.hot { background: #f0a73c; color: #1d2a38; box-shadow: 0 0 0 4px rgba(240, 167, 60, .18); }
.sidebar-bottom { margin-top: auto; padding: 18px 10px 2px; font-size: 11px; color: #8fa7bd; border-top: 1px solid rgba(255, 255, 255, .08); }
.offline { font-size: 10px; font-weight: 800; letter-spacing: .6px; color: #c2d4e6; display: flex; align-items: center; gap: 8px; }
.offline-dot { width: 8px; height: 8px; border-radius: 50%; background: #f0a73c; box-shadow: 0 0 0 4px rgba(240, 167, 60, .16); }
.sidebar-bottom p { line-height: 1.55; margin: 10px 0 14px; }
.powered { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 14px; font-size: 10px; font-weight: 700; letter-spacing: .6px; }
.powered b { display: block; margin-top: 6px; color: #fff; font-size: 12px; letter-spacing: 0; }

/* ================= Top bar ================= */
.main { min-width: 0; flex: 1; }
.topbar {
    position: sticky; top: 0; z-index: 30; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--border); padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar h1 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.4px; font-weight: 800; }
.toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; }
select, button:not(nav button):not(.net-node):not(.bus):not(.chip):not(.choice):not(.close) {
    border: 1px solid var(--border-strong); background: var(--surface); border-radius: 11px; padding: 9px 13px; color: var(--ink-2);
    font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}
select { max-width: 240px; padding-right: 10px; }
button:not(nav button):not(:disabled):hover { border-color: var(--brand); }
button:not(nav button):not(:disabled):active { transform: translateY(1px); }
button .ic, button i .ic { width: 16px; height: 16px; }
.clock {
    font-family: var(--mono); font-size: 13px; font-weight: 700; background: var(--surface-3); border: 1px solid var(--border);
    padding: 9px 13px; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px; letter-spacing: .5px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c98f; box-shadow: 0 0 0 0 rgba(34, 201, 143, .6); animation: ping 1.8s infinite; display: inline-block; flex-shrink: 0; }
.live-dot.paused { background: var(--amber); animation: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(34, 201, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 201, 143, 0); } }
.theme-btn span { font-size: 12px; }
.btn-primary {
    background: linear-gradient(120deg, #0b6fd0, #12a6d8) !important; color: #fff !important; border-color: transparent !important;
    box-shadow: 0 8px 18px rgba(18, 120, 210, .28);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(18, 120, 210, .38); }
.textbtn { border: 0 !important; color: var(--brand) !important; background: transparent !important; padding: 6px !important; font-size: 12.5px; font-weight: 800; text-decoration: none; box-shadow: none !important; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= Content ================= */
.content { padding: 24px 34px 8px; max-width: 1720px; margin: auto; }
.banner { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 12.5px; line-height: 1.6; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.banner .ic { margin-top: 2px; }
.banner-scale { background: color-mix(in srgb, var(--amber) 13%, var(--surface)); color: color-mix(in srgb, var(--amber) 70%, var(--ink)); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.banner-role { background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: color-mix(in srgb, var(--brand) 60%, var(--ink)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.simbar {
    margin: 0 0 22px; display: flex; gap: 15px; align-items: center; justify-content: space-between;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 12px 14px 12px 18px; box-shadow: var(--shadow-sm);
}
.sim-info { display: flex; align-items: center; gap: 12px; }
.sim-info b { font-size: 13px; }
.sim-info small { color: var(--muted); font-size: 11.5px; display: block; margin-top: 3px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #22c98f; flex-shrink: 0; animation: ping 1.8s infinite; }
.pulse.paused { background: var(--amber); animation: none; }
.pill-illus { color: var(--amber); font-weight: 800; letter-spacing: .8px; font-size: 10px; }
.pill-illus.dark { background: rgba(255, 255, 255, .1); color: #d6e6f5; padding: 7px 11px; border-radius: 8px; }
.simcontrols { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.simcontrols label { font-size: 11px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }

.page { display: none; }
.page.active { display: block; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 18px; gap: 16px; }
.section-head h2 { font-size: 27px; letter-spacing: -.9px; margin: 6px 0 0; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 13px; max-width: 780px; line-height: 1.7; margin: 8px 0 0; }

/* ================= Hero ================= */
.hero {
    border-radius: 24px; min-height: 270px; color: #fff; padding: 32px 38px; display: flex; justify-content: space-between; gap: 20px;
    overflow: hidden; position: relative; background: var(--hero); box-shadow: 0 24px 60px rgba(8, 50, 90, .28); margin-bottom: 18px;
    border: 1px solid rgba(80, 200, 230, .18);
}
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent 10%, #000 70%);
}
.hero-copy { max-width: 640px; z-index: 2; }
.hero-eyebrow { font-size: 10.5px; font-weight: 800; color: #74e6ef; letter-spacing: 2.4px; }
.hero h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.12; letter-spacing: -1.4px; margin: 14px 0 14px; font-weight: 800; }
.hero em { font-style: normal; background: linear-gradient(90deg, #5fe3ef, #8ad8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #b9d3e8; font-size: 13.5px; line-height: 1.7; max-width: 600px; margin: 0; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.hero-tags span { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px); border-radius: 10px; padding: 7px 11px; font-size: 11.5px; font-weight: 700; }
.hero-tags .ic { width: 15px; height: 15px; color: #7fe6f0; }
.hero-art { width: 40%; min-width: 300px; position: relative; display: flex; align-items: center; justify-content: center; z-index: 1; }
.hero-bus { width: 92%; position: absolute; top: -18px; right: -4%; opacity: .5; filter: drop-shadow(0 20px 18px rgba(0, 20, 40, .55)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.hero-spark { animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.orbit { position: absolute; border: 1px solid rgba(90, 200, 220, .22); border-radius: 50%; width: 360px; height: 360px; top: -70px; right: -30px; }
.orbit2 { width: 250px; height: 250px; top: -15px; right: 25px; }
.hero-live {
    position: relative; align-self: center; width: 100%; max-width: 380px; z-index: 2; border-radius: 16px; padding: 16px 18px;
    background: rgba(6, 24, 44, .5); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(14px); box-shadow: 0 16px 36px rgba(0, 0, 0, .25);
}
.hl-head { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: #a7d8ea; }
.hl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 12px; }
.hl-grid small { display: block; font-size: 10.5px; color: #93b4cc; }
.hl-grid b { font-size: 22px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hl-grid b i { font-style: normal; font-size: 13px; color: #8fb1c9; font-weight: 600; }
.hl-grid b.warn { color: #ffc46b; }
.hero-note { position: absolute; left: 38px; bottom: 12px; font-size: 10px; color: rgba(205, 225, 240, .6); z-index: 2; }

/* ================= Depot bar & action banner ================= */
.depotbar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #fff; border-radius: 14px; padding: 13px 18px; margin-bottom: 16px;
    background: linear-gradient(100deg, #0b2340, #123a63); box-shadow: var(--shadow-sm);
}
.depotline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: #c3d6ea; }
.depotline b { color: #fff; font-size: 15px; }
.depotline .ic { width: 16px; height: 16px; color: #5fd7ea; }
.depotline .sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .2); margin: 0 6px; }
.depotline small { background: rgba(95, 215, 234, .16); color: #8fe6f2; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.action-banner {
    display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 12px 14px 12px 18px; margin-bottom: 18px; font-size: 14px;
    background: color-mix(in srgb, var(--amber) 14%, var(--surface)); color: color-mix(in srgb, var(--amber) 75%, var(--ink));
    border: 1px solid color-mix(in srgb, var(--amber) 32%, transparent);
}
.action-banner .ic { width: 20px; height: 20px; }
.action-banner b { letter-spacing: .5px; }
.action-banner span { font-weight: 700; }
.action-banner .banner-btn { margin-left: auto; background: var(--amber) !important; color: #fff !important; border-color: transparent !important; }
.action-banner.clear { background: color-mix(in srgb, var(--green) 13%, var(--surface)); color: color-mix(in srgb, var(--green) 70%, var(--ink)); border-color: color-mix(in srgb, var(--green) 30%, transparent); }

/* ================= KPI tiles ================= */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi {
    --tone: var(--brand);
    background: var(--surface); padding: 16px 18px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.kpi::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--tone), transparent 75%); }
.kpi::after { content: ''; position: absolute; width: 140px; height: 140px; right: -60px; top: -60px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tone) 14%, transparent), transparent 70%); pointer-events: none; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.kpi label { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.kpi-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }
.kpi strong { white-space: nowrap; font-size: 32px; letter-spacing: -1.2px; line-height: 1; color: var(--ink); font-weight: 800; }
.kpi strong i { font-style: normal; font-size: 16px; color: var(--faint); font-weight: 700; letter-spacing: 0; }
.kpi.tone-amber strong { color: var(--amber); }
.kpi.tone-muted strong { color: var(--muted); }
.spark { flex: 0 1 90px; min-width: 0; height: 30px; }
.spark path { fill: none; stroke: var(--tone); stroke-width: 2; stroke-linecap: round; }
.kpi .sub { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.track { height: 6px; background: var(--surface-3); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.track i { height: 100%; display: block; background: linear-gradient(90deg, color-mix(in srgb, var(--tone, var(--brand)) 70%, #fff), var(--tone, var(--brand))); border-radius: 6px; transition: width .5s ease; }
.track.thin { height: 4px; margin: 8px 0 6px; }

/* ================= Panels & layout ================= */
.layout-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.layout-feed { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; }
.layout-phone { display: grid; grid-template-columns: 1fr 290px; gap: 18px; align-items: start; }
.layout-phone .chart { --chart-h: 300px; min-height: 330px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 18px; overflow: hidden; }
.panelhead { padding: 18px 22px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panelhead small { font-size: 10px; font-weight: 800; color: var(--teal); letter-spacing: 1.4px; }
.panelhead h3 { margin: 6px 0 0; font-size: 17px; letter-spacing: -.35px; font-weight: 800; }
.tag { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 6px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; }
.note { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 12px 0 0; display: flex; gap: 6px; align-items: flex-start; }
.note .ic { width: 14px; height: 14px; margin-top: 2px; }
.note.center { justify-content: center; margin: -6px 0 20px; }
.note.pad { padding: 0 22px 20px; }
.empty { padding: 18px 22px 24px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.empty .ic { color: var(--green); }
.info { background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), color-mix(in srgb, var(--teal) 8%, var(--surface))); padding: 20px 22px; border-color: color-mix(in srgb, var(--brand) 20%, transparent); }
.info b { color: var(--brand); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.info p { line-height: 1.7; color: var(--ink-2); font-size: 12.5px; margin: 8px 0 0; }

/* ================= Charts ================= */
.chart { padding: 0 18px 14px; min-height: 250px; position: relative; }
.chart svg { width: 100%; height: var(--chart-h, 220px); display: block; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--axis); font-size: var(--axis-fs, 10px); font-family: var(--font); }
.chart .ref-label { font-weight: 700; fill: var(--muted); }
.chart .refline { stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.chart .series { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot-halo { opacity: .18; animation: halo 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { opacity: .05; transform: scale(1.5); } }
.chart .xhair { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-empty { height: 220px; display: grid; place-items: center; font-size: 12.5px; color: var(--faint); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 11px; color: var(--muted); padding: 6px 4px 0 46px; font-weight: 600; }
.chart-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.chart-legend i.dash { height: 0; border-top: 2px dashed; background: none !important; }
.chart-tip {
    position: absolute; top: 4px; transform: translateX(-50%); pointer-events: none; z-index: 5; min-width: 150px;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-md); padding: 9px 12px; font-size: 11.5px;
}
.chart-tip b { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.chart-tip span { display: flex; align-items: center; gap: 7px; color: var(--ink-2); padding: 2px 0; }
.chart-tip span i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip em { font-style: normal; font-weight: 800; color: var(--ink); margin-left: auto; padding-left: 12px; }
.donutarea { min-height: 250px; padding: 6px 24px 22px; display: flex; align-items: center; gap: 26px; }
.donut-svg { width: 170px; height: 170px; flex-shrink: 0; }
.donut-svg circle { transition: stroke-dasharray .5s ease; }
.donut-track { stroke: var(--surface-3); }
.donut-num { font-size: 30px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.donut-lbl { font-size: 10px; fill: var(--muted); font-family: var(--font); letter-spacing: .5px; }
.legend { display: grid; gap: 12px; flex: 1; }
.legend div { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.legend div:last-child { border-bottom: 0; }
.legend b { font-size: 16px; }
.legend em { font-style: normal; color: var(--faint); font-size: 11px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 9px; }
.legend i.ring-key { border: 2px dashed var(--violet); background: none; }

/* ================= Feed ================= */
.feed { list-style: none; margin: 0; padding: 0 20px 16px; display: grid; gap: 2px; max-height: 360px; overflow: auto; }
.feed li { display: flex; gap: 11px; padding: 9px 4px; border-bottom: 1px solid var(--border); animation: fadeUp .3s ease both; }
.feed li:last-child { border-bottom: 0; }
.feed p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.feed small { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.feed-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.feed-ic .ic { width: 15px; height: 15px; }

/* ================= Phone mock ================= */
.phone-wrap { text-align: center; }
.phone-wrap > small { display: block; font-size: 11px; color: var(--muted); margin-top: 10px; }
.phone {
    background: linear-gradient(160deg, #13304f, #081a2e); border-radius: 34px; padding: 12px; position: relative;
    box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone-screen { background: var(--surface); border-radius: 24px; padding: 14px 16px 16px; text-align: left; min-height: 420px; }
.phone-status { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; color: var(--muted); font-family: var(--mono); margin-bottom: 12px; }
.phone-title { font-size: 21px; display: block; letter-spacing: -.4px; }
.phone-sub { font-size: 11px; color: var(--muted); }
.phone-pill { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 12px 0; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 8px; border-radius: 10px; }
.phone-pill .ic { width: 14px; height: 14px; }
.phone-pill.clear { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.phone-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.phone-stats div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.phone-stats small { font-size: 9.5px; color: var(--muted); display: block; }
.phone-stats strong { font-size: 16px; }
.phone-inc { margin-top: 8px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.phone-inc.late { border-left-color: var(--amber); }
.phone-inc b { font-size: 12px; display: block; }
.phone-inc span { font-size: 10.5px; color: var(--muted); }
.phone-btn { width: 100%; justify-content: center; margin-top: 12px; background: var(--brand) !important; color: #fff !important; border: 0 !important; letter-spacing: .8px; padding: 11px !important; }

/* ================= Network map ================= */
.netmap {
    position: relative; margin: 0 22px; aspect-ratio: 600 / 250; border-radius: 14px; overflow: hidden;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%), var(--surface-2);
    background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 18px 18px; border: 1px solid var(--border);
}
.netmap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.net-link { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.net-link.on { stroke: var(--teal); animation: dash 1.4s linear infinite; }
.net-hub {
    position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
    background: linear-gradient(120deg, #0b2340, #134a75); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.25; box-shadow: var(--shadow-md);
}
.net-hub .ic { color: #5fe0f0; width: 22px; height: 22px; }
.net-node { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.net-node.flip { flex-direction: row-reverse; text-align: right; }
.net-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--st); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--st); position: relative; z-index: 1; }
.net-pulse { position: absolute; left: 8px; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--st); opacity: .35; animation: netpulse 2.2s ease-out infinite; }
.net-node.flip .net-pulse { left: auto; right: 8px; margin: -8px -8px 0 0; }
@keyframes netpulse { to { transform: scale(3.2); opacity: 0; } }
.net-node.s-green { --st: var(--green); }
.net-node.s-amber { --st: var(--amber); }
.net-node.s-red { --st: var(--red); }
.net-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; box-shadow: var(--shadow-sm); min-width: 170px; transition: border-color .2s, transform .2s; }
.net-node:hover .net-card, .net-node.active .net-card { border-color: var(--st); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.net-card b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.net-node.flip .net-card b { justify-content: flex-end; }
.net-card em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .8px; background: var(--brand); color: #fff; padding: 2px 6px; border-radius: 5px; }
.net-card small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.net-card small.st { color: var(--st); font-weight: 800; }
.map-note { padding: 0 22px 18px; }

/* ================= Tables & badges ================= */
.tablewrap { overflow: auto; padding: 0 20px 16px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; min-width: 660px; }
th { font-size: 10px; letter-spacing: 1.1px; color: var(--muted); padding: 11px 12px; background: var(--surface-2); white-space: nowrap; font-weight: 800; border-bottom: 1px solid var(--border); }
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
td { border-bottom: 1px solid var(--border); padding: 12px; font-size: 12.5px; color: var(--ink-2); vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
td:first-child { font-weight: 800; color: var(--ink); white-space: nowrap; }
td b { color: var(--ink); }
td small { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--faint); font-weight: 600; margin-top: 3px; }
td small .ic { width: 12px; height: 12px; }
td.actions { min-width: 250px; }
.inc-table td:nth-child(2) { min-width: 220px; }
.inc-table tr td:first-child { box-shadow: inset 3px 0 0 var(--pr, transparent); }
.inc-table tr.p-Critical { --pr: var(--red); }
.inc-table tr.p-High { --pr: var(--amber); }
.row-closed td { opacity: .6; }
.row-closed { --pr: var(--green) !important; }
.owner { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; flex-shrink: 0; }
.av-brand { background: linear-gradient(135deg, #2b8be0, #1561b5); }
.av-teal { background: linear-gradient(135deg, #1fb5c9, #0c8597); }
.av-violet { background: linear-gradient(135deg, #8d71e8, #5f43c0); }
.due { display: inline-flex; flex-direction: column; white-space: nowrap; font-family: var(--mono); font-weight: 700; color: var(--ink); font-size: 12.5px; }
.due small { font-family: var(--font); font-size: 10.5px; color: var(--muted); font-weight: 600; margin: 1px 0 0; }
.due.late { color: var(--amber); }
.due.late small { color: var(--amber); font-weight: 800; }
.due.ok { color: var(--green); }
.statecell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.stepper { display: inline-flex; gap: 3px; }
.stepper i { width: 14px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.stepper i.on { background: var(--green); }
.badge {
    --b: var(--muted);
    display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; padding: 4px 9px; border-radius: 7px; font-weight: 800; white-space: nowrap; letter-spacing: .2px;
    background: color-mix(in srgb, var(--b) 13%, transparent); color: color-mix(in srgb, var(--b) 82%, var(--ink));
    border: 1px solid color-mix(in srgb, var(--b) 22%, transparent);
}
.badge .ic { width: 12px; height: 12px; }
.b-Ready, .b-Available, .b-Closed, .b-Pass, .b-Fresh, .b-Covered { --b: var(--green); }
.b-Charging, .b-Assigned, .b-In-service, .b-High { --b: var(--brand); }
.b-Acknowledged, .b-Action-taken, .b-Escalated { --b: var(--violet); }
.b-At-risk, .b-Blocked, .b-Waiting, .b-Fault, .b-Overdue { --b: var(--amber); }
.b-Fail, .b-Critical { --b: var(--red); }
.b-Stale { --b: var(--violet); }
.b-Pending { --b: var(--muted); }
.action-btn { font-size: 11px !important; padding: 6px 10px !important; margin: 2px 4px 2px 0; border-radius: 9px !important; }
.action-btn.primary:not(:disabled) { background: var(--brand) !important; color: #fff !important; border-color: transparent !important; }
.action-btn.good:not(:disabled) { background: var(--green) !important; color: #fff !important; border-color: transparent !important; }
.action-btn.warn { background: var(--amber) !important; color: #fff !important; border-color: transparent !important; }
.action-btn.ghost { background: transparent !important; }

/* ================= Fleet ================= */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
    padding: 7px 8px 7px 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); transition: all .2s; box-shadow: var(--shadow-sm);
}
.chip b { background: var(--surface-3); border-radius: 999px; padding: 2px 8px; font-size: 11px; }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.on b { background: rgba(255, 255, 255, .16); }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sc, var(--muted)); flex-shrink: 0; }
.st-Ready { --sc: var(--green); }
.st-Charging { --sc: var(--brand); }
.st-Waiting, .st-Blocked, .st-At-risk { --sc: var(--amber); }
.st-In-service { --sc: var(--teal); }
.socbar { position: relative; height: 8px; border-radius: 6px; background: var(--surface-3); width: 180px; overflow: visible; }
.socbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.socbar i.proj { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--brand) 40%, transparent) 0 4px, color-mix(in srgb, var(--brand) 18%, transparent) 4px 8px); }
.socbar i.now { background: var(--brand); z-index: 1; }
.socbar .target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; z-index: 2; }
.busgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; padding: 2px 20px 22px; }
.bus {
    min-width: 0; border: 1px solid var(--border); background: var(--surface-2); padding: 11px 12px; border-radius: 14px; text-align: left;
    transition: transform .18s, box-shadow .18s, border-color .18s; display: grid; gap: 8px; position: relative; overflow: hidden;
}
.bus::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc, var(--muted)); }
.bus:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sc); }
.bus-top { display: flex; justify-content: space-between; align-items: center; }
.bus-top b { font-size: 12px; color: var(--ink); }
.batt { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; position: relative; display: block; }
.batt i { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 60%, #fff), var(--sc)); border-radius: 4px; transition: width .5s; }
.bus-bot { display: flex; justify-content: space-between; align-items: baseline; }
.bus-bot strong { font-size: 18px; color: var(--ink); letter-spacing: -.4px; }
.bus-bot em { font-style: normal; font-size: 10px; color: var(--muted); font-weight: 700; }
.bus.st-In-service { opacity: .72; }
.bus.st-At-risk, .bus.st-Blocked { background: color-mix(in srgb, var(--amber) 8%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }

/* ================= Charging ================= */
.chargecentres { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-bottom: 18px; }
.ccard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.ccard .cc-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ccard h3 { font-size: 17px; margin: 8px 0 12px; }
.cc-main { display: flex; align-items: center; gap: 16px; }
.cc-main .ring { width: 86px; height: 86px; }
.cc-stats { display: grid; grid-template-columns: repeat(2, minmax(70px, auto)); justify-content: start; gap: 8px 28px; flex: 1; }
.chargecentres:has(.ccard:only-child) .cc-stats { grid-template-columns: repeat(4, minmax(80px, auto)); gap: 8px 44px; }
.cc-stats small { display: block; font-size: 10.5px; color: var(--muted); }
.cc-stats b { font-size: 17px; }
.cc-stats b.warn, .warn { color: var(--amber); }
.ring { width: 64px; height: 64px; }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.ring-val { fill: none; stroke: var(--teal); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.ring.charging .ring-val { stroke: var(--brand); }
.ring.good .ring-val { stroke: var(--green); }
.ring.bad .ring-val { stroke: var(--amber); }
.ring-txt { font-size: 13px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.ring-icon { color: var(--muted); }
.charge-group { padding: 2px 22px 22px; }
.charge-group + .charge-group { border-top: 1px solid var(--border); }
.charge-group h4 { font-size: 13px; margin: 14px 0; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.charge-group h4 .ic { width: 15px; height: 15px; color: var(--teal); }
.chargers { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.charger { border: 1px solid var(--border); background: var(--surface-2); border-radius: 15px; padding: 13px; position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.charger:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.charger.s-Charging { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), var(--surface-2)); }
.charger.s-Charging::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 200% 100%; animation: flow 1.6s linear infinite; }
@keyframes flow { from { background-position: 200% 0; } to { background-position: 0 0; } }
.charger.s-Fault { background: color-mix(in srgb, var(--amber) 9%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 38%, transparent); }
.charger.stale { border-style: dashed; border-color: var(--violet); }
.ch-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ch-top strong { font-size: 13px; }
.ch-visual { display: grid; place-items: center; padding: 10px 0 6px; }
.ch-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.ch-ic .ic { width: 26px; height: 26px; }
.ch-ic.idle { background: var(--surface-3); color: var(--faint); }
.ch-ic.fault { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .55; } }
.stale-tag { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; color: var(--violet); margin-bottom: 4px; }
.stale-tag .ic { width: 13px; height: 13px; }
.charger small { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }
.charger small.kwh { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 2px; }

/* ================= Energy ================= */
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 4px 20px 22px; }
.gauge { text-align: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 10px 12px; }
.gauge svg { width: 100%; max-width: 220px; }
.gauge-track { fill: none; stroke: var(--surface-3); stroke-width: 14; stroke-linecap: round; }
.gauge-val { fill: none; stroke: var(--teal); stroke-width: 14; stroke-linecap: round; transition: d .5s; }
.gauge.over .gauge-val { stroke: var(--amber); }
.gauge-warn { stroke: var(--amber); stroke-width: 3; stroke-linecap: round; }
.gauge-num { font-size: 26px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.gauge-unit { font-size: 9.5px; fill: var(--muted); font-family: var(--font); }
.gauge b { display: block; font-size: 14px; margin-top: 2px; }
.gauge small { display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.gauge small .ic { width: 12px; height: 12px; color: var(--amber); }
.subgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 0 22px; }
.subgrid > div { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface-2); --tone: var(--teal); }
.sub-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--teal); background: color-mix(in srgb, var(--teal) 13%, transparent); margin-bottom: 10px; }
.sub-ic .ic { width: 16px; height: 16px; }
.subgrid small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.subgrid strong { display: block; font-size: 21px; margin: 6px 0 2px; letter-spacing: -.5px; }
.subgrid span { font-size: 10.5px; color: var(--faint); }
.sub-note { padding: 0 22px 20px; }

/* ================= Incidents ================= */
.flow { display: flex; align-items: stretch; gap: 8px; margin-bottom: 18px; }
.flowstep { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.flowstep::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tone); }
.fs-0 { --tone: var(--amber); }
.fs-1 { --tone: var(--brand); }
.fs-2 { --tone: var(--violet); }
.fs-3 { --tone: var(--green); }
.fs-head { display: flex; align-items: center; gap: 10px; }
.fs-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.fs-n { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 700; }
.fs-head b { font-size: 16px; }
.fs-head strong { margin-left: auto; font-size: 24px; }
.flowstep p { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.flowarrow { align-self: center; font-style: normal; color: var(--faint); font-size: 18px; }

/* ================= Analytics ================= */
.gates { display: grid; gap: 10px; padding: 0 22px; }
.gate { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; background: var(--surface-2); }
.gate .ring { width: 52px; height: 52px; }
.gate b { display: block; font-size: 13px; }
.gate small { font-size: 11px; color: var(--muted); }
.gate strong { font-size: 21px; }
#gates > .note { padding: 0 22px 20px; }
.testlist { list-style: none; margin: 12px 22px 0; padding: 0; display: grid; gap: 6px; }
.testlist li { display: flex; gap: 10px; font-size: 12px; border-radius: 10px; padding: 9px 12px; background: color-mix(in srgb, var(--green) 9%, transparent); animation: fadeUp .3s ease both; }
.testlist li .ic { color: var(--green); margin-top: 1px; }
.testlist li.fail { background: color-mix(in srgb, var(--red) 9%, transparent); }
.testlist li.fail .ic { color: var(--red); }
.testlist small { display: block; color: var(--muted); margin-top: 3px; font-family: var(--mono); font-size: 10.5px; }
.bars { padding: 2px 22px 20px; }
.barrow { margin: 14px 0; }
.barrow label { font-size: 12px; display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.barrow label b { display: inline-flex; align-items: center; gap: 7px; }
.barrow label b .ic { width: 15px; height: 15px; color: var(--teal); }
.barrow label small { color: var(--faint); font-weight: 600; font-family: var(--mono); font-size: 10px; }
.barrow > div { height: 9px; background: var(--surface-3); border-radius: 8px; overflow: visible; position: relative; }
.barrow i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--teal)); transition: width .5s; }
.barrow.off label strong { color: var(--faint); }
.warnmark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); border-radius: 2px; }
.metriclist { padding: 2px 22px 18px; }
.metriclist > div { display: flex; justify-content: space-between; gap: 30px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.metriclist > div:last-child { border-bottom: 0; }
.metriclist b { flex: 0 0 28%; color: var(--ink); }
.metriclist span { color: var(--ink-2); line-height: 1.55; flex: 1; }

/* ================= Scope ================= */
.scope-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.scope-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.scope-stats strong { display: block; font-size: 32px; color: var(--brand); letter-spacing: -1px; }
.scope-stats span { font-size: 12.5px; color: var(--muted); }
.timeline { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; margin-bottom: 14px; }
.timeline div { border-radius: var(--radius); padding: 16px 20px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.timeline div.hl { background: linear-gradient(120deg, #0b2340, #134a75); color: #fff; border-color: transparent; }
.timeline small { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--brand); }
.timeline .hl small { color: #7fd6f0; }
.timeline b { display: block; font-size: 24px; margin: 6px 0 4px; }
.timeline span { font-size: 12px; color: var(--muted); }
.timeline .hl span { color: #b8cfe4; }
.stages { display: grid; gap: 10px; padding: 0 22px 12px; }
.stage { border-radius: 14px; padding: 14px 16px; border-left: 4px solid var(--tone); background: color-mix(in srgb, var(--tone) 9%, var(--surface)); }
.stage small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .9px; color: var(--tone); }
.stage b { display: block; font-size: 15px; margin: 6px 0 2px; }
.stage span { font-size: 12px; color: var(--ink-2); }
.stage.s1 { --tone: var(--brand); }
.stage.s2 { --tone: var(--teal); }
.stage.s3 { --tone: var(--amber); }
.request {
    display: flex; gap: 24px; align-items: center; justify-content: space-between; color: #fff; border-radius: 22px; padding: 30px 34px; margin-bottom: 18px;
    background: var(--hero); box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.request .eyebrow { color: #7fd6f0; }
.request h3 { font-size: 26px; margin: 8px 0 16px; letter-spacing: -.6px; }
.request ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14.5px; }
.request ol li { display: flex; align-items: center; gap: 12px; }
.request ol span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-weight: 800; color: #8fe6f2; }
.request p { font-weight: 700; color: #cfe4f5; margin: 18px 0 0; font-size: 13px; background: rgba(255, 255, 255, .08); padding: 10px 14px; border-radius: 10px; display: inline-block; }
.request-card { background: #fff; color: #0f2742; border-radius: 18px; padding: 24px 28px; text-align: center; text-decoration: none; flex-shrink: 0; box-shadow: 0 20px 40px rgba(0, 0, 0, .25); transition: transform .2s; }
.request-card:hover { transform: translateY(-3px); }
.request-card i .ic { width: 34px; height: 34px; color: #16a36f; }
.request-card b { display: block; font-size: 21px; margin-top: 6px; }
.request-card small { display: block; color: #6a7f95; font-size: 12px; margin: 4px 0 12px; }
.request-card span { color: #1677d2; font-weight: 800; font-size: 13px; text-decoration: underline; }

/* ================= Modal & toast ================= */
.modal { display: flex; position: fixed; inset: 0; background: rgba(4, 16, 30, .62); backdrop-filter: blur(6px); z-index: 50; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modalbox { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; padding: 26px 28px; position: relative; box-shadow: var(--shadow-lg); animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.modal-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.modal-ic .ic { width: 22px; height: 22px; }
.modalbox h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.4px; }
.modalbox p { font-size: 13px; color: var(--ink-2); line-height: 1.7; margin: 10px 0; }
.modal-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; font-size: 12px; color: var(--muted); }
.modal-meta b { color: var(--ink); font-family: var(--mono); }
.close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: 20px; line-height: 1; color: var(--muted); }
.close:hover { color: var(--ink); }
.audit { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; position: relative; }
.audit::before { content: ''; position: absolute; left: 13px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.audit li { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding: 5px 0; position: relative; }
.audit .feed-ic { background: var(--surface); box-shadow: 0 0 0 1px var(--border), inset 0 0 0 40px color-mix(in srgb, var(--tone) 13%, transparent); }
.audit time { font-family: var(--mono); font-weight: 700; margin-right: 8px; color: var(--ink); }
.choices { display: grid; gap: 10px; margin-top: 16px; }
.choice {
    display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--ink); transition: all .2s;
}
.choice i { margin-left: auto; font-style: normal; color: var(--brand); transition: transform .2s; }
.choice:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.choice:hover i { transform: translateX(4px); }
.choice-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, transparent); flex-shrink: 0; }
.bus-detail { display: flex; gap: 20px; align-items: flex-start; margin-top: 10px; }
.bus-detail .ring { width: 96px; height: 96px; flex-shrink: 0; }
.bus-detail dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 12.5px; }
.bus-detail dt { color: var(--muted); font-weight: 700; }
.bus-detail dd { margin: 0; color: var(--ink); }
#toast {
    position: fixed; bottom: 24px; right: 24px; max-width: 440px; display: flex; align-items: flex-start; gap: 10px; background: var(--surface); color: var(--ink);
    border: 1px solid var(--border); border-left: 4px solid var(--brand); padding: 13px 18px; box-shadow: var(--shadow-lg); border-radius: 12px;
    font-size: 12.5px; line-height: 1.5; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s; z-index: 100;
}
#toast .ic { color: var(--brand); margin-top: 1px; }
#toast.tone-good { border-left-color: var(--green); }
#toast.tone-good .ic { color: var(--green); }
#toast.tone-bad { border-left-color: var(--amber); }
#toast.tone-bad .ic { color: var(--amber); }
#toast.show { opacity: 1; transform: none; }
footer { display: flex; justify-content: space-between; gap: 10px; padding: 30px 2px; font-size: 10px; font-weight: 800; color: var(--faint); letter-spacing: 1px; }
footer span { font-weight: 600; }

/* ================= Responsive ================= */
@media (max-width: 1400px) {
    .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .layout-feed { grid-template-columns: 1fr; }
    .flow { flex-wrap: wrap; }
    .flowstep { flex: 1 1 40%; }
    .flowarrow { display: none; }
}
@media (max-width: 1080px) {
    .hero { flex-direction: column; }
    .hero-art { width: 100%; min-width: 0; }
    .hero-bus, .orbit { display: none; }
    .hero-live { max-width: none; margin-top: 4px; }
    .hl-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-note { display: none; }
}
@media (max-width: 980px) {
    .layout-2, .layout-phone { grid-template-columns: 1fr; }
    .phone-wrap { max-width: 300px; margin: 0 auto 18px; }
    .request { flex-direction: column; align-items: stretch; }
    .scope-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .timeline { grid-template-columns: 1fr; }
    .netmap { aspect-ratio: auto; height: 420px; max-height: none; }
}
@media (max-width: 850px) {
    .sidebar { width: 68px; padding: 14px 8px; }
    .logo { padding: 0 0 14px; justify-content: center; }
    .logo-full, .product, .nav-title, nav span, .sidebar-bottom { display: none; }
    .logo-mark { display: block; }
    nav button { justify-content: center; padding: 12px 0; }
    nav button b { position: absolute; top: 3px; right: 3px; padding: 1px 5px; font-size: 9px; min-width: 0; }
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; flex-wrap: wrap; position: static; }
    .toolbar { justify-content: flex-start; }
    .simbar, .section-head { flex-direction: column; align-items: flex-start; }
    .net-card { min-width: 0; }
    .net-card small:not(.st) { display: none; }
}
@media (max-width: 560px) {
    .kpis, .kpis-6, .subgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi strong { font-size: 26px; }
    .scope-stats strong { font-size: 22px; }
    .chargecentres .cc-stats, .chargecentres:has(.ccard:only-child) .cc-stats { grid-template-columns: repeat(2, minmax(60px, auto)); gap: 8px 20px; }
    .scope-stats div { padding: 14px; min-width: 0; }
    .action-banner { flex-wrap: wrap; }
    .action-banner .banner-btn { margin-left: 0; }
    .spark { display: none; }
    .hero { padding: 24px 20px; }
    .hl-grid { grid-template-columns: 1fr 1fr; }
    .donutarea { flex-direction: column; }
    .flowstep { flex-basis: 100%; }
    .metriclist > div { display: block; }
    .metriclist span { display: block; margin-top: 6px; }
    .gate { grid-template-columns: auto 1fr; }
    .depotbar { flex-direction: column; align-items: flex-start; }
    .theme-btn span { display: none; }
    footer { display: block; }
    footer span { display: block; margin-top: 10px; }
}

/* ================= Live tracking ================= */
.nav-live { background: #e5484d !important; color: #fff !important; font-size: 9px !important; letter-spacing: .8px; animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 4px rgba(229, 72, 77, .25); } }
.live-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #e5484d; }
.live-eyebrow .live-dot { background: #e5484d; animation: pingred 1.6s infinite; }
@keyframes pingred { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .6); } 70% { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); } }
.feeds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.feed-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--ink-2);
}
.feed-chip > i { width: 8px; height: 8px; border-radius: 50%; background: var(--fc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc) 22%, transparent); }
.feed-chip b { font-weight: 600; color: var(--muted); font-size: 11px; }
.f-ok { --fc: var(--green); }
.f-warn { --fc: var(--amber); }
.f-off { --fc: var(--faint); }
.f-live { margin-left: auto; font-family: var(--mono); background: var(--navy); color: #fff; border-color: transparent; }

.live-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); gap: 18px; }
.live-side { display: flex; flex-direction: column; }
.live-side .panel:last-child { flex: 1; }
.twin-panel { display: flex; flex-direction: column; }
.twin-panel .twin { flex: 1; min-height: 580px; height: auto; }
.twin-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); font-weight: 700; }
.twin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.twin {
    position: relative; height: 560px; margin: 0 14px 14px; border-radius: 14px; overflow: hidden; background: #061224; cursor: grab;
    box-shadow: inset 0 0 0 1px rgba(95, 227, 239, .12); touch-action: none;
}
.twin:active { cursor: grabbing; }
.twin:fullscreen { height: 100vh; margin: 0; border-radius: 0; }
.twin canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.twin-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tl {
    position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 8px; border-radius: 8px;
    font-size: 10.5px; font-weight: 700; color: #d7e7f6; background: rgba(6, 20, 38, .78); border: 1px solid rgba(95, 227, 239, .25);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35); will-change: transform;
}
.tl b { color: #fff; font-family: var(--mono); font-size: 10.5px; }
.tl .ic { width: 12px; height: 12px; }
.tl-Charging { border-color: rgba(61, 149, 230, .55); }
.tl-Fault { border-color: rgba(240, 167, 60, .7); color: #ffd28a; }
.tl-alert { background: rgba(240, 167, 60, .92); color: #2a1a03; border-color: transparent; }
.tl-alert b { color: #2a1a03; }
.tl-alert.late { background: rgba(240, 100, 112, .95); color: #fff; }
.tl-alert.late b { color: #fff; }
.tl-sel { background: rgba(95, 227, 239, .92); color: #04222b; border-color: transparent; }
.tl-sel b { color: #04222b; }
.twin-toolbar { position: absolute; top: 12px; right: 12px; left: 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.tb-group { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(6, 20, 38, .72); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(10px); pointer-events: auto; }
.tb-group button { background: transparent !important; border: 0 !important; color: #a9c2da !important; padding: 7px 10px !important; font-size: 11.5px !important; border-radius: 8px !important; box-shadow: none !important; }
.tb-group button:hover { color: #fff !important; background: rgba(255, 255, 255, .08) !important; }
.tb-group button.on { color: #04222b !important; background: #5fe3ef !important; }
.tb-group .ic { width: 14px; height: 14px; }
.twin-hint { position: absolute; left: 14px; bottom: 12px; font-size: 11px; color: rgba(200, 222, 240, .7); background: rgba(6, 20, 38, .6); padding: 6px 10px; border-radius: 8px; pointer-events: none; }
.twin-badge { position: absolute; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #bfe9f2; background: rgba(6, 20, 38, .6); padding: 6px 10px; border-radius: 8px; pointer-events: none; }
.twin-fallback { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; color: #cfe2f2; padding: 30px; }
.twin-fallback span { color: #8fa9c2; font-size: 13px; }

.asset-card { padding: 0 20px 18px; }
.ac-head { display: flex; align-items: center; gap: 12px; }
.ac-head b { font-size: 17px; display: block; }
.ac-head small { font-size: 11.5px; color: var(--muted); }
.ac-head .badge { margin-left: auto; }
.ac-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); flex-shrink: 0; }
.ac-ic .ic { width: 22px; height: 22px; }
.ac-body { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; }
.ac-ring { width: 84px; height: 84px; flex-shrink: 0; }
.ac-ring .ring-track, .ac-ring .ring-val { stroke-width: 7; }
.ac-ring.good .ring-val { stroke: var(--green); }
.ac-ring.bad .ring-val { stroke: var(--amber); }
.ac-ring .ring-txt { font-size: 15px; }
.ac-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 12px; min-width: 0; }
.ac-body dt { color: var(--muted); font-weight: 700; }
.ac-body dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.ac-inc { display: flex; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5; background: color-mix(in srgb, var(--amber) 12%, transparent); color: color-mix(in srgb, var(--amber) 70%, var(--ink)); }
.ac-inc .ic { width: 16px; height: 16px; margin-top: 1px; }

.health { list-style: none; margin: 0; padding: 0 20px; display: grid; gap: 8px; }
.health li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.health b { display: block; font-size: 12.5px; }
.health small { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.health strong { font-size: 12.5px; }
.h-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--teal); background: color-mix(in srgb, var(--teal) 13%, transparent); }
.h-ic .ic { width: 15px; height: 15px; }
.h-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.h-warn .h-dot { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.h-off { opacity: .7; }
.h-off .h-dot { background: var(--faint); box-shadow: none; }
.h-off strong { color: var(--faint); font-weight: 600; }
#sysHealth .note { padding: 0 20px 18px; }

.routemap { position: relative; margin: 0 14px 14px; border-radius: 14px; overflow: hidden; background: #071526; }
.routemap svg { display: block; width: 100%; height: auto; }
.rm-blocks rect { fill: #0c1f35; }
.rm-river { fill: none; stroke: #0f3b63; stroke-width: 16; stroke-linecap: round; opacity: .8; }
.rm-ring { fill: none; stroke: #173352; stroke-width: 6; stroke-dasharray: 2 10; stroke-linecap: round; }
.rm-route { fill: none; stroke: #2a5378; stroke-width: 3.5; stroke-linecap: round; }
.rm-route-flow { fill: none; stroke: #5fe3ef; stroke-width: 1.4; stroke-dasharray: 2 14; opacity: .55; animation: dash 1.8s linear infinite; }
.rm-place circle { fill: #3d6a90; }
.rm-place text { fill: #8fb0cc; font-size: 11px; font-family: var(--font); font-weight: 700; }
.rm-depot rect { fill: #5fe3ef; }
.rm-depot-halo { fill: rgba(95, 227, 239, .18); animation: halo 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rm-depot text { fill: #d7f6fb; font-size: 12px; font-weight: 800; font-family: var(--font); }
.rm-bus { cursor: pointer; }
.rm-halo { fill: rgba(44, 192, 212, .2); }
.rm-core { fill: #2cc0d4; stroke: #04222b; stroke-width: 1.5; }
.rm-head { fill: #2cc0d4; }
.rm-tag { fill: #d7e7f6; font-size: 10px; font-family: var(--mono); font-weight: 700; opacity: 0; transition: opacity .2s; }
.rm-bus:hover .rm-tag, .rm-bus.sel .rm-tag { opacity: 1; }
.rm-bus.low .rm-core, .rm-bus.low .rm-head { fill: #f0a73c; }
.rm-bus.low .rm-halo { fill: rgba(240, 167, 60, .22); }
.rm-bus.sel .rm-halo { fill: rgba(95, 227, 239, .45); stroke: #5fe3ef; stroke-width: 1.5; }
.rm-legend { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 10.5px; color: #a9c2da; font-weight: 700; pointer-events: none; }
.rm-legend .rm-note { margin-left: auto; color: #6f8caa; font-weight: 600; }
.lg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-dot.ok { background: #2cc0d4; }
.lg-dot.low { background: #f0a73c; }
.lg-route { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: #2a5378; margin-right: 6px; vertical-align: 2px; }
.rm-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: #cfe2f2; background: rgba(4, 14, 28, .45); padding: 20px; }
.rm-empty .ic { width: 30px; height: 30px; color: #5fe3ef; }
.rm-empty span { color: #8fa9c2; font-size: 12.5px; max-width: 360px; }
.rm-empty em { font-style: normal; color: #5fe3ef; font-weight: 700; }

.stream { list-style: none; margin: 0; padding: 0 16px 16px; display: grid; gap: 4px; max-height: 430px; overflow: auto; font-size: 11.5px; }
.stream li { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 8px; padding: 7px 8px; border-radius: 8px; border-bottom: 1px solid var(--border); }
.stream li.fresh { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.stream li.muted { color: var(--muted); display: block; }
.stream time { font-family: var(--mono); color: var(--faint); font-size: 10.5px; }
.stream p { margin: 0; color: var(--ink-2); font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.st-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .6px; padding: 2px 6px; border-radius: 5px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }

tr.clickable { cursor: pointer; }
tr.row-sel td { background: color-mix(in srgb, var(--teal) 10%, transparent); }
.trip { width: 160px; height: 7px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.trip i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--teal), var(--brand)); transition: width .5s; }
td.warn { color: var(--amber); font-weight: 800; }

@media (max-width: 1240px) {
    .live-grid { grid-template-columns: 1fr; }
    .twin, .twin-panel .twin { min-height: 480px; }
}
@media (max-width: 560px) {
    .twin, .twin-panel .twin { min-height: 380px; margin: 0 8px 8px; }
    .twin-hint { display: none; }
    .tb-group { flex-wrap: wrap; }
    .tb-group button { padding: 6px 7px !important; font-size: 10.5px !important; }
    .f-live { margin-left: 0; }
    .rm-legend .rm-note { display: none; }
}

/* ================= Depot switcher ================= */
.depot-switch { display: flex; align-items: stretch; gap: 14px; margin-bottom: 16px; }
.ds-label { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 170px; max-width: 200px; }
.ds-label b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.ds-label b .ic { width: 16px; height: 16px; color: var(--teal); }
.ds-label small { font-size: 11px; color: var(--muted); line-height: 1.45; }
.ds-cards { flex: 1; display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 10px; min-width: 0; }
.ds-card {
    display: grid !important; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; row-gap: 6px; align-items: center; text-align: left;
    padding: 11px 13px !important; border-radius: 14px !important; border: 1px solid var(--border) !important; background: var(--surface) !important;
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden; min-width: 0; color: var(--ink) !important;
}
.ds-card::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: transparent; }
.ds-card:hover { border-color: var(--brand) !important; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ds-card.active { border-color: transparent !important; background: linear-gradient(120deg, #0b2340, #12456e) !important; color: #fff !important; box-shadow: 0 12px 28px rgba(11, 60, 110, .35); }
.ds-card.active::after { background: linear-gradient(90deg, #5fe3ef, #3d95e6); }
.ds-ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.ds-card.active .ds-ic { color: #5fe3ef; background: rgba(95, 227, 239, .14); }
.ds-ic .ic { width: 19px; height: 19px; }
.ds-body { min-width: 0; }
.ds-body b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.ds-body small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-card.active .ds-body small { color: #a9c8e2; }
.ds-pilot, .ds-ill { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .8px; padding: 2px 6px; border-radius: 5px; }
.ds-pilot { background: var(--brand); color: #fff; }
.ds-ill { background: var(--surface-3); color: var(--muted); }
.ds-card.active .ds-ill { background: rgba(255, 255, 255, .12); color: #cfe2f2; }
.ds-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; justify-self: start; padding: 3px 8px 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--sc) 13%, transparent); color: color-mix(in srgb, var(--sc) 80%, var(--ink)); }
.ds-stat i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 25%, transparent); }
.ds-stat.s-green { --sc: var(--green); }
.ds-stat.s-amber { --sc: var(--amber); }
.ds-stat.s-red { --sc: var(--red); }
.ds-stat.s-red i { animation: pingred 1.6s infinite; }
.ds-card.active .ds-stat { color: #fff; background: rgba(255, 255, 255, .12); }
.ds-card .ds-stat { grid-column: 2; }

/* ================= 3D command hero ================= */
.hero3d { min-height: 540px; padding: 34px 38px 30px; display: block; background: radial-gradient(900px 420px at 72% 40%, rgba(40, 140, 200, .35), transparent 60%), linear-gradient(120deg, #041325 0%, #082440 55%, #0a3654 100%); }
.hero3d::before { mask-image: linear-gradient(90deg, #000, transparent 70%); opacity: .6; }
.net3d { position: absolute; inset: 0; z-index: 1; cursor: grab; }
.net3d:active { cursor: grabbing; }
.net3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.net3d.no3d { display: none; }
.net3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero3d .hero-copy { position: relative; z-index: 2; max-width: 440px; pointer-events: none; }
.hero3d .hero-copy .hero-tags { pointer-events: auto; }
.hero3d .hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.hero3d h2 { font-size: clamp(28px, 2.7vw, 42px); text-shadow: 0 6px 30px rgba(0, 0, 0, .45); }
.hero3d p { text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.hero3d .hero-live { position: absolute; left: 38px; bottom: 54px; z-index: 2; max-width: 440px; width: calc(100% - 76px); margin: 0; }
.hero3d .hl-grid { grid-template-columns: repeat(4, 1fr); }
.hero-key { position: absolute; right: 22px; bottom: 50px; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(4, 18, 36, .55); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(10px); font-size: 10.5px; color: #b6cee3; font-weight: 700; pointer-events: none; }
.hero-key i { display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px; }
.k-ring { border-radius: 50%; border: 3px solid #22c98f; }
.k-col { width: 6px !important; border-radius: 3px; background: #2cc0d4; margin-left: 3px; margin-right: 10px !important; }
.k-warn { height: 3px !important; border-radius: 2px; background: #f0a73c; vertical-align: 2px !important; }
.k-bus { width: 8px !important; height: 5px !important; border-radius: 2px; background: #5fe3ef; box-shadow: 0 0 6px #5fe3ef; margin-left: 2px; margin-right: 9px !important; vertical-align: 1px !important; }
.k-beacon { width: 0 !important; height: 0 !important; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 12px solid rgba(240, 167, 60, .8); }
.hero3d .hero-note { left: 38px; bottom: 16px; color: rgba(205, 225, 240, .55); }
.n3-label {
    position: absolute; left: 0; top: 0; pointer-events: auto; text-align: left; padding: 8px 11px !important; border-radius: 12px !important;
    background: rgba(5, 20, 40, .78) !important; border: 1px solid rgba(95, 227, 239, .28) !important; color: #e3f1fb !important;
    backdrop-filter: blur(8px); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); display: grid !important; gap: 6px; transition: opacity .25s, border-color .2s; will-change: transform;
}
.n3-label:hover, .n3-label.active { border-color: #5fe3ef !important; box-shadow: 0 0 0 3px rgba(95, 227, 239, .2), 0 10px 26px rgba(0, 0, 0, .35); }
.n3-label.dim { opacity: .55; }
.n3-top { display: flex; align-items: center; gap: 7px; }
.n3-top b { font-size: 13.5px; }
.n3-top em { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .8px; background: #1677d2; color: #fff; padding: 2px 6px; border-radius: 5px; }
.n3-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: #22c98f; box-shadow: 0 0 0 3px rgba(34, 201, 143, .25); }
.n3-label[data-status="amber"] .n3-dot { background: #f0a73c; box-shadow: 0 0 0 3px rgba(240, 167, 60, .25); }
.n3-label[data-status="red"] .n3-dot { background: #f06470; animation: pingred 1.6s infinite; }
.n3-grid { display: grid; grid-template-columns: repeat(3, auto); gap: 12px; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.n3-grid small { display: block; font-size: 9px; font-weight: 700; color: #8fb1cc; letter-spacing: .4px; text-transform: uppercase; }
.n3-hub { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; line-height: 1.2; color: #bff4fa; padding: 6px 10px; border-radius: 10px; background: rgba(5, 20, 40, .6); border: 1px solid rgba(95, 227, 239, .2); }
.n3-hub .ic { width: 16px; height: 16px; color: #5fe3ef; }

/* ================= Depot comparison ================= */
.dcmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 20px 20px; }
.dc-card { border: 1px solid var(--border); border-radius: 16px; padding: 16px 16px 14px; background: linear-gradient(160deg, var(--surface), var(--surface-2)); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.dc-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--sc); }
.dc-card.s-green { --sc: var(--green); }
.dc-card.s-amber { --sc: var(--amber); }
.dc-card.s-red { --sc: var(--red); }
.dc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dc-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent), var(--shadow-md); }
.dc-head { display: flex; align-items: center; gap: 10px; }
.dc-head b { display: block; font-size: 15px; }
.dc-head small { font-size: 11px; color: var(--muted); }
.dc-head .ds-stat { margin-left: auto; }
.dc-pin { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.dc-spark { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 6px 10px; border-radius: 10px; background: var(--surface-3); --tone: var(--brand); }
.dc-spark .spark { flex: 1 1 auto; height: 30px; }
.dc-spark span { font-size: 10px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.dc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-top: 10px; font-size: 12px; }
.dc-row span { color: var(--muted); font-weight: 700; }
.dc-row b { font-variant-numeric: tabular-nums; }
.dc-bar { grid-column: 1 / -1; height: 7px; border-radius: 5px; background: var(--surface-3); position: relative; }
.dc-bar i { display: block; height: 100%; border-radius: 5px; background: var(--tone); transition: width .5s; }
.dc-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); border-radius: 2px; }
.dc-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--ink-2); font-weight: 700; }
.dc-foot span { display: inline-flex; align-items: center; gap: 5px; }
.dc-foot .ic { width: 13px; height: 13px; color: var(--muted); }
.dc-open { width: 100%; justify-content: center; margin-top: 12px; }
.dc-card.active .dc-open { background: var(--brand) !important; color: #fff !important; border-color: transparent !important; }

@media (max-width: 1240px) {
    .depot-switch { flex-direction: column; gap: 8px; }
    .ds-label { max-width: none; flex-direction: row; align-items: baseline; gap: 10px; }
    .dcmp { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
    .hero3d { padding-bottom: 0; }
    .hero3d .net3d { position: relative; inset: auto; height: 380px; margin: 16px -38px 0; }
    .hero3d .hero-live { position: relative; left: auto; bottom: auto; width: 100%; max-width: none; margin-top: 14px; }
    .hero-key { display: none; }
    .hero3d .hero-note { position: static; display: block; padding: 10px 0 16px; }
}
@media (max-width: 850px) {
    .ds-cards { display: flex; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
    .ds-card { flex: 0 0 210px; scroll-snap-align: start; }
}
@media (max-width: 560px) {
    .hero3d { padding: 22px 20px 0; }
    .hero3d .net3d { margin: 14px -20px 0; height: 320px; }
    .hero3d .hl-grid { grid-template-columns: 1fr 1fr; }
    .ds-label small { display: none; }
}

/* ================= Charging hall ================= */
.hall { background: #050e1b; }
#page-charging .live-grid { align-items: start; }
#page-charging .twin-panel .hall { flex: none; height: 640px; min-height: 0; }
@media (max-width: 560px) { #page-charging .twin-panel .hall { height: 400px; } }
.tl-group { background: rgba(22, 119, 210, .9); border-color: transparent; color: #e8f4ff; font-size: 11.5px; padding: 6px 10px; }
.tl-group b { font-family: var(--font); font-size: 12px; }
.tl-stale { border: 1px dashed #a48bf5; color: #d9cbff; }
.muted-s { color: var(--muted); font-size: 11px; }
.ac-ring.big { width: 96px; height: 96px; }
.ac-ring .ring-sub { font-size: 8.5px; fill: var(--muted); font-family: var(--font); font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.ac-ring:not(.good):not(.bad) .ring-val { stroke: var(--brand); }
.kw-trend { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); --tone: var(--brand); }
.kw-trend > div { flex-shrink: 0; }
.kw-trend small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .8px; color: var(--muted); }
.kw-trend b { font-size: 13px; }
.kw-trend .spark { flex: 1 1 auto; height: 34px; }
.ac-inc .mini-btn { margin-left: auto; padding: 5px 9px !important; font-size: 11px !important; flex-shrink: 0; align-self: center; }

.power-share { padding: 0 20px 18px; }
.pw-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pw-head div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.pw-head small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.pw-head b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pw-stack { position: relative; display: flex; height: 16px; margin-top: 14px; border-radius: 8px; background: var(--surface-3); overflow: visible; }
.pw-stack i { display: block; height: 100%; background: var(--brand); border-right: 2px solid var(--surface); }
.pw-stack i:first-child { border-radius: 8px 0 0 8px; }
.pw-stack i.base { background: var(--faint); opacity: .55; }
.pw-stack em { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--amber); }
.pw-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin-top: 5px; font-weight: 600; }
.pw-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.pw-list li { display: grid; grid-template-columns: 52px 62px 1fr 56px; align-items: center; gap: 8px; font-size: 11.5px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.pw-list li:hover { background: var(--surface-2); }
.pw-list li span { font-weight: 800; font-family: var(--mono); font-size: 11px; }
.pw-list li small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.pw-list li div { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pw-list li div i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--brand)); border-radius: 4px; transition: width .5s; }
.pw-list li b { text-align: right; font-variant-numeric: tabular-nums; }
.pw-list li.none { display: block; color: var(--muted); cursor: default; }

.gantt { padding: 0 20px 18px; overflow-x: auto; }
.g-head, .g-lane { display: grid; grid-template-columns: 74px minmax(560px, 1fr); align-items: center; gap: 10px; }
.g-axis { position: relative; height: 26px; border-bottom: 1px solid var(--border); }
.g-axis span { position: absolute; bottom: 6px; transform: translateX(-50%); font-size: 10.5px; font-family: var(--mono); color: var(--muted); font-weight: 700; }
.g-axis span:first-child { transform: none; }
.g-axis span:last-of-type { transform: translateX(-100%); }
.g-now { position: absolute; left: 0; top: -2px; font-size: 9px; letter-spacing: .8px; color: #fff; background: #e5484d; padding: 1px 6px; border-radius: 4px; }
.g-group { display: flex; align-items: center; gap: 6px; margin: 14px 0 4px; font-size: 12px; font-weight: 800; color: var(--ink-2); }
.g-group .ic { width: 14px; height: 14px; color: var(--teal); }
.g-group span { margin-left: 8px; font-weight: 600; color: var(--amber); font-size: 11px; }
.g-lane { padding: 4px 0; cursor: pointer; border-radius: 8px; }
.g-lane:hover { background: var(--surface-2); }
.g-lane.sel { background: color-mix(in srgb, var(--teal) 10%, transparent); }
.g-id { font-family: var(--mono); font-size: 11.5px; font-weight: 800; padding-left: 6px; }
.g-track {
    position: relative; height: 26px; border-radius: 7px; background-color: var(--surface-2);
    background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 6 - 1px), var(--border) calc(100% / 6 - 1px), var(--border) calc(100% / 6));
}
.g-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; display: flex; align-items: center; overflow: hidden; min-width: 4px; }
.g-bar span { font-size: 10.5px; font-weight: 700; white-space: nowrap; padding: 0 8px; }
.g-bar.main { background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 75%, var(--teal))); color: #fff; }
.g-bar.top { background: color-mix(in srgb, var(--green) 30%, transparent); color: color-mix(in srgb, var(--green) 70%, var(--ink)); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); }
.g-bar.fault { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--amber) 30%, transparent) 0 6px, color-mix(in srgb, var(--amber) 14%, transparent) 6px 12px); color: color-mix(in srgb, var(--amber) 75%, var(--ink)); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); }
.g-bar.free { border: 1px dashed var(--border-strong); color: var(--muted); background: transparent; }
.g-label { position: absolute; top: 50%; transform: translateY(-50%); font-size: 10.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-family: var(--mono); }
.g-dep { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--green); box-shadow: 0 0 0 2px var(--surface); }
.g-dep.late { background: var(--red); }
.g-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 11px; color: var(--muted); font-weight: 700; }
.g-legend i { display: inline-block; width: 14px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.g-legend i.main { background: var(--brand); }
.g-legend i.top { background: color-mix(in srgb, var(--green) 40%, transparent); }
.g-legend i.fault { background: color-mix(in srgb, var(--amber) 40%, transparent); }
.g-legend i.dep { width: 3px; background: var(--green); }

.chargers { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bay {
    display: grid !important; gap: 8px; text-align: left; padding: 13px 14px !important; border-radius: 15px !important; border: 1px solid var(--border) !important;
    background: linear-gradient(160deg, var(--surface), var(--surface-2)) !important; position: relative; overflow: hidden; color: var(--ink) !important;
}
.bay::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--bc, var(--muted)); }
.bay.s-Charging { --bc: var(--brand); }
.bay.s-Available { --bc: var(--green); }
.bay.s-Fault { --bc: var(--amber); background: color-mix(in srgb, var(--amber) 8%, var(--surface)) !important; }
.bay.stale { border-style: dashed !important; border-color: var(--violet) !important; }
.bay.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 30%, transparent), var(--shadow-md); border-color: var(--teal) !important; }
.bay:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.bay.s-Charging::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 200% 100%; animation: flow 1.6s linear infinite; }
.bay-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.bay-top b { font-family: var(--mono); font-size: 13px; }
.bay-mid { display: flex; align-items: center; gap: 12px; }
.bay-mid .ring { width: 60px; height: 60px; flex-shrink: 0; }
.bay-kw { flex: 1; min-width: 0; }
.bay-kw strong { font-size: 22px; letter-spacing: -.5px; display: block; line-height: 1; }
.bay-kw small { font-size: 10.5px; color: var(--muted); }
.bay-bar { display: block; height: 6px; margin-top: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bay-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--brand)); transition: width .5s; }
.bay-detail { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.bay-kwh { font-size: 10px; color: var(--faint); font-family: var(--mono); }

/* Charging hall navigation */
.hall:focus-visible { outline: 2px solid #5fe3ef; outline-offset: -2px; }
.hall.pan-mode, .hall.panning { cursor: move; }
.twin-hint b { color: #5fe3ef; }
.nav-pad {
    position: absolute; right: 14px; bottom: 50px; z-index: 3; display: grid; grid-template-columns: repeat(3, 34px); grid-auto-rows: 34px; gap: 4px;
    padding: 6px; border-radius: 14px; background: rgba(6, 20, 38, .72); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px);
}
.nav-pad button {
    padding: 0 !important; width: 34px; height: 34px; justify-content: center; border-radius: 9px !important; border: 1px solid rgba(255, 255, 255, .08) !important;
    background: rgba(255, 255, 255, .06) !important; color: #cfe6f7 !important; box-shadow: none !important;
}
.nav-pad button:hover { background: rgba(95, 227, 239, .2) !important; color: #fff !important; border-color: rgba(95, 227, 239, .5) !important; }
.nav-pad button:active { transform: scale(.94); }
.nav-pad .ic { width: 16px; height: 16px; }
.np-down .ic { transform: rotate(180deg); }
.np-left .ic { transform: rotate(-90deg); }
.np-right .ic { transform: rotate(90deg); }
.np-rotl .ic { transform: scaleX(-1); }
.np-home { background: rgba(95, 227, 239, .16) !important; color: #5fe3ef !important; }
@media (max-width: 560px) {
    .nav-pad { grid-template-columns: repeat(3, 30px); grid-auto-rows: 30px; bottom: 44px; right: 8px; }
    .nav-pad button { width: 30px; height: 30px; }
}

/* ================= Energy & power ================= */
.grid3d { background: #061224; }
#page-energy .live-grid { align-items: start; }
#page-energy .twin-panel .grid3d { flex: none; height: 660px; min-height: 0; }
.tl-grid { border-color: rgba(95, 227, 239, .5); }
.tl-flow { background: rgba(6, 20, 38, .82); gap: 7px; }
.tl-flow b { color: #fff; }
.fl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.fl-grid { background: #5fe3ef; }
.fl-solar { background: #34d399; }
.fl-charge { background: #4aa3f0; }
.fl-base { background: #b79cff; }

.peak-mgmt { padding: 0 20px 18px; }
.pk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--green) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }
.pk-head.over { background: color-mix(in srgb, var(--red) 10%, var(--surface)); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.pk-head small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.pk-head b { font-size: 26px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.pk-bar { position: relative; height: 12px; margin-top: 14px; border-radius: 7px; background: var(--surface-3); }
.pk-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--teal), var(--brand)); transition: width .5s; }
.pk-head.over + .pk-bar i { background: linear-gradient(90deg, var(--amber), var(--red)); }
.pk-bar em { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--amber); }
.pk-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin-top: 5px; font-weight: 600; }
.pk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pk-grid div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 9px 11px; }
.pk-grid small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.pk-grid b { display: block; font-size: 17px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pk-grid span { font-size: 10.5px; color: var(--faint); }
.pk-btn { width: 100%; justify-content: center; margin-top: 12px; }

.sankey { padding: 0 16px 16px; }
.sankey svg { width: 100%; height: auto; display: block; }
.sk-ribbon { opacity: .32; transition: opacity .2s; }
.sk-ribbon:hover { opacity: .6; }
.sk-name { font-size: 11.5px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.sk-val { font-size: 10.5px; fill: var(--muted); font-family: var(--font); font-weight: 600; }
.sankey .note { padding: 0 4px; }

.hourly { min-height: 0; }
.hourly svg { height: 220px !important; }
.hb-bg { fill: var(--surface-2); }
.hb.future .hb-bg { fill: transparent; stroke: var(--border); stroke-dasharray: 3 3; }
.hb.now .hb-bg { stroke: var(--teal); stroke-width: 1.5; }
.hb:hover .hb-bg { fill: var(--surface-3); }
@media (max-width: 560px) { #page-energy .twin-panel .grid3d { height: 420px; } }

/* ================= Simulation popover ================= */
.sim-wrap { position: relative; }
button.clock { cursor: pointer; color: var(--ink) !important; }
button.clock .clock-chev { width: 13px; height: 13px; transform: rotate(180deg); transition: transform .2s; opacity: .6; }
button.clock.open .clock-chev { transform: rotate(0deg); }
button.clock.open { border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.sim-pop {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 340px; display: grid; gap: 12px; padding: 16px;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.sim-pop::before { content: ''; position: absolute; top: -7px; right: 34px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.sim-pop .sim-info { align-items: flex-start; }
.sim-pop .sim-info .pulse { margin-top: 4px; }
.sim-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.sim-row button { justify-content: center; padding: 9px 8px !important; font-size: 12px !important; }
.sim-speed { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sim-speed select { flex: 1; max-width: none; }
.sim-pop .pill-illus { font-size: 9.5px; text-align: center; padding-top: 2px; border-top: 1px dashed var(--border); padding-top: 10px; }
@media (max-width: 560px) { .sim-pop { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; } .sim-pop::before { display: none; } }

/* ================= Fleet & dispatch ================= */
.tl-road { background: rgba(44, 192, 212, .85); color: #032026; border-color: transparent; }
.tl-road b { color: #032026; }
.tl-target { background: rgba(240, 167, 60, .14); border-color: rgba(240, 167, 60, .6); color: #ffd28a; }
.tl-target b { color: #ffd28a; }
.bus.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 35%, transparent), var(--shadow-md); border-color: var(--teal) !important; }
.mini-chart { padding: 0 16px 16px; }
.mini-chart svg { width: 100%; display: block; }
.mini-chart .chart-legend { padding-left: 4px; }
.mini-chart .axis { fill: var(--axis); font-size: 10px; font-family: var(--font); }
.mini-chart .axis.val { fill: var(--ink-2); font-weight: 800; }
.mini-chart .gridline { stroke: var(--grid); }
.wv-hit:hover { fill: color-mix(in srgb, var(--brand) 6%, transparent); }
.sd-target { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 4 3; }
.sd-tlabel { fill: var(--amber) !important; font-weight: 800; }

/* ================= Fleet: isometric charts ================= */
.fleet-hero { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0 !important; background: transparent !important; padding: 6px 10px !important; font-size: 11.5px !important; border-radius: 8px !important; box-shadow: none !important; color: var(--muted) !important; }
.seg button.on { background: var(--surface) !important; color: var(--ink) !important; box-shadow: var(--shadow-sm) !important; }
.iso-chart { padding: 0 16px 16px; }
.iso-chart svg { width: 100%; display: block; overflow: visible; }
.iso-chart .axis { fill: var(--axis); font-size: 10px; font-family: var(--font); }
.iso-chart .axis.val { fill: var(--ink-2); font-weight: 800; }
.iso-chart .chart-legend { padding-left: 4px; }
.iso-floor { fill: color-mix(in srgb, var(--brand) 6%, var(--surface-2)); stroke: var(--border); }
.iso-grid { stroke: var(--grid); stroke-width: 1; }
.iso-grid.zero { stroke: var(--border-strong); }
.iso-target { fill: color-mix(in srgb, var(--amber) 14%, transparent); stroke: none; }
.iso-target-edge { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 6 4; }
.iso-target-label { fill: var(--ink); font-size: 11px; font-weight: 800; font-family: var(--font); }
.iso-target-sub { fill: var(--amber); font-size: 9.5px; font-weight: 800; font-family: var(--font); letter-spacing: .4px; }
.iso-hit { fill: transparent; }
.iso-bus, .iso-col { cursor: pointer; transition: opacity .2s; }
.iso-bus:hover .iso-hit, .iso-col:hover .iso-hit { fill: color-mix(in srgb, var(--brand) 7%, transparent); }
.iso-bus:hover g, .iso-col:hover g { filter: brightness(1.12); }
.iso-bus.away { opacity: .75; }
.iso-bus.sel .iso-hit { fill: color-mix(in srgb, var(--teal) 14%, transparent); }
.iso-proj { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 3 2; opacity: .8; }
.iso-pin { fill: var(--teal); }
.iso-group { fill: var(--ink-2); font-size: 11.5px; font-weight: 800; font-family: var(--font); }
.iso-group-line { stroke: var(--teal); stroke-width: 2; stroke-linecap: round; }
.dn-slice { transition: transform .2s; }
.dn-slice:hover { filter: brightness(1.12); }
.dn-hole { fill: var(--surface-3); }
.dn-inner { fill: color-mix(in srgb, var(--ink) 18%, var(--surface-3)); }
.dn-shadow { fill: color-mix(in srgb, var(--ink) 10%, transparent); filter: blur(6px); }
.dn-lbl { font-size: 11.5px; font-weight: 700; fill: var(--ink-2); font-family: var(--font); }
.dn-val { font-size: 12px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.dn-center { font-size: 13px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
@media (max-width: 1240px) { .fleet-hero, .grid-3 { grid-template-columns: 1fr; } }

/* ================= Fleet matrix: premium bus cards ================= */
.bc-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-search { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; height: 36px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); }
.bc-search .ic { width: 15px; height: 15px; }
.bc-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink); width: 150px; }
.bc-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.bcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 2px 20px 22px; }
.bc-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 2px 2px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--muted); }
.bc-group:first-child { margin-top: 0; border-top: 0; }
.bc-group .ic { width: 15px; height: 15px; color: var(--teal); }
.bc-group b { color: var(--ink); font-size: 13.5px; }
.bc-group em { font-style: normal; color: var(--amber); font-weight: 800; }
.bcard {
    --sc: var(--muted);
    display: grid !important; gap: 10px; text-align: left; padding: 13px 14px 12px !important; border-radius: 16px !important;
    border: 1px solid var(--border) !important; color: var(--ink) !important; position: relative; overflow: hidden;
    background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 7%, var(--surface)), var(--surface) 60%) !important;
    box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.bcard.st-Ready { --sc: var(--green); }
.bcard.st-Charging { --sc: var(--series-1); }
.bcard.st-Waiting, .bcard.st-At-risk, .bcard.st-Blocked { --sc: var(--amber); }
.bcard.st-In-service { --sc: var(--teal); }
.bcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--sc), transparent 85%); }
.bcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--sc) 50%, var(--border)) !important; }
.bcard.sel { border-color: var(--teal) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 28%, transparent), var(--shadow-md); }
.bcard.risk { border-color: color-mix(in srgb, var(--amber) 55%, transparent) !important; animation: riskglow 2.4s ease-in-out infinite; }
@keyframes riskglow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 18%, transparent), var(--shadow-sm); } }
.bc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); }
.bc-ic .ic { width: 15px; height: 15px; }
.bc-head b { font-family: var(--mono); font-size: 13px; }
.bc-stale { color: var(--violet); display: inline-flex; }
.bc-stale .ic { width: 14px; height: 14px; }
.bc-pill { margin-left: auto; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; white-space: nowrap; color: color-mix(in srgb, var(--sc) 80%, var(--ink)); background: color-mix(in srgb, var(--sc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 25%, transparent); }
.bc-batt { position: relative; display: block; height: 20px; padding: 3px; margin-right: 6px; border-radius: 6px; border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); background: var(--surface-2); }
.bc-batt::after { content: ''; position: absolute; right: -6px; top: 5px; width: 4px; height: 8px; border-radius: 0 2px 2px 0; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.bc-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 100%; }
.bc-cells i { display: block; border-radius: 2px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.bc-cells i.on { background: var(--sc); }
.bc-cells i.part { background: linear-gradient(90deg, var(--sc) var(--p), color-mix(in srgb, var(--ink) 7%, transparent) var(--p)); }
.bc-projbar { position: absolute; top: 3px; bottom: 3px; margin-left: 3px; border-radius: 2px; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--sc) 45%, transparent) 0 3px, transparent 3px 6px); border: 1px dashed color-mix(in srgb, var(--sc) 70%, transparent); max-width: calc(100% - 6px); }
.bc-target { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--amber); }
.bc-bolt { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: none; color: #fff; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .5)); }
.bc-bolt .ic { width: 13px; height: 13px; }
.bcard.charging .bc-bolt { display: inline-flex; animation: blink 1.4s ease-in-out infinite; }
.bc-soc { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bc-soc strong { font-size: 26px; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.bc-soc strong small { font-size: 14px; color: var(--faint); margin-left: 1px; }
.bc-proj { font-size: 10.5px; font-weight: 700; text-align: right; }
.bc-proj.ok { color: var(--green); }
.bc-proj.low { color: var(--amber); }
.bc-proj.muted { color: var(--muted); font-weight: 600; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 9px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--ink-2); min-width: 0; }
.bc-when { display: inline-flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-when .ic { width: 13px; height: 13px; color: var(--muted); flex-shrink: 0; }
.bc-chip { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: color-mix(in srgb, var(--brand) 80%, var(--ink)); }
.bc-chip .ic { width: 11px; height: 11px; }
.bc-chip.warn { background: color-mix(in srgb, var(--amber) 15%, transparent); color: color-mix(in srgb, var(--amber) 80%, var(--ink)); }
.bc-chip.ok { background: color-mix(in srgb, var(--teal) 15%, transparent); color: color-mix(in srgb, var(--teal) 80%, var(--ink)); }
@media (max-width: 560px) { .bc-search input { width: 110px; } .bcgrid { grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 12px 16px; } }

/* ================= SOC skyline (premium) ================= */
.sky-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 20px 12px; }
.ss { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border); background: linear-gradient(150deg, color-mix(in srgb, var(--tone) 8%, var(--surface)), var(--surface) 70%); min-width: 0; }
.ss-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.ss-ic .ic { width: 15px; height: 15px; }
.ss div { min-width: 0; }
.ss small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss b { display: block; font-size: 18px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ss em { display: block; font-style: normal; font-size: 9.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sky-wrap { position: relative; }
.skyline .iso-bus { transition: opacity .2s; }
.skyline.hovering .iso-bus:not(.hover):not(.sel) { opacity: .45; }
.skyline .iso-bus.dim { opacity: .16; }
.skyline .iso-bus.hover { opacity: 1; }
.skyline .iso-bus.hover .iso-hit { fill: color-mix(in srgb, var(--brand) 9%, transparent); }
.sk-shadow { fill: color-mix(in srgb, var(--ink) 22%, transparent); }
.sk-val { font-size: 9.5px; font-weight: 800; fill: var(--ink-2); font-family: var(--font); }
.sk-val.low { fill: var(--amber); }
.sk-time { font-size: 9px; fill: var(--axis); font-family: var(--mono); }
.sk-time.away { fill: var(--teal); }
.sk-zone { font-size: 9px; font-weight: 800; letter-spacing: 1px; font-family: var(--font); }
.sk-zone.ok { fill: color-mix(in srgb, var(--green) 70%, var(--ink)); opacity: .7; }
.sk-zone.low { fill: color-mix(in srgb, var(--amber) 70%, var(--ink)); opacity: .7; }
.sk-band { fill: color-mix(in srgb, var(--brand) 3%, transparent); stroke: var(--border); stroke-dasharray: 3 4; }
.sk-band.alt { fill: color-mix(in srgb, var(--teal) 4%, transparent); }
.sk-avg { stroke: var(--teal); stroke-width: 1.5; stroke-dasharray: 2 4; }
.sk-avg-label { font-size: 9.5px; font-weight: 800; fill: color-mix(in srgb, var(--teal) 75%, var(--ink)); font-family: var(--font); }
.sk-pill rect { fill: var(--surface); stroke: var(--border-strong); }
.sk-pill text { font-size: 11px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.sk-pill circle.s-green { fill: var(--green); }
.sk-pill circle.s-amber { fill: var(--amber); }
.sk-pill circle.s-red { fill: var(--red); }
.sk-target-pill rect { fill: var(--amber); }
.sk-target-pill text { font-size: 10px; font-weight: 800; fill: #2a1a03; font-family: var(--font); }
.sk-axis-title { font-size: 10px; fill: var(--muted); font-weight: 600; font-family: var(--font); }
.iso-target { fill: color-mix(in srgb, var(--amber) 18%, transparent); }
.sky-tip {
    position: absolute; z-index: 5; width: 220px; padding: 11px 13px; border-radius: 13px; pointer-events: none;
    background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 11.5px;
}
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-head b { font-family: var(--mono); font-size: 13px; }
.st-soc { display: flex; align-items: center; gap: 10px; margin: 9px 0 8px; }
.st-bar { position: relative; flex: 1; height: 8px; border-radius: 5px; background: var(--surface-3); overflow: visible; }
.st-bar i { display: block; height: 100%; border-radius: 5px; }
.st-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); }
.st-soc strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.sky-tip dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.sky-tip dt { color: var(--muted); font-weight: 700; }
.sky-tip dd { margin: 0; color: var(--ink); text-align: right; }
.sky-tip dd.ok { color: var(--green); font-weight: 800; }
.sky-tip dd.low { color: var(--amber); font-weight: 800; }
.sky-tip small { display: block; margin-top: 7px; color: var(--faint); font-size: 10px; }
@media (max-width: 1240px) { .sky-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sky-stats { grid-template-columns: 1fr 1fr; } }

/* SOC skyline v2: one lane per depot */
.sk-lane { fill: color-mix(in srgb, var(--surface-2) 70%, transparent); stroke: var(--border); }
.sk-dot.s-green { fill: var(--green); }
.sk-dot.s-amber { fill: var(--amber); }
.sk-dot.s-red { fill: var(--red); }
.sk-head { font-size: 13px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.sk-sub { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.sk-sub .b { font-weight: 800; fill: var(--ink); }
.sk-sub .warn { font-weight: 800; fill: var(--amber); }
.sk-floor { stroke: var(--border-strong); stroke-width: 1.5; }
.sk-target { stroke: var(--amber); stroke-width: 1.8; stroke-dasharray: 6 4; }
.sk-80 { font-size: 10.5px; font-weight: 800; fill: var(--amber); font-family: var(--font); }
.skyline .iso-proj { fill: color-mix(in srgb, var(--series-1) 10%, transparent); stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 2; }
.sk-val { font-size: 10px; }

/* ================= Fleet: side column fills the chart height ================= */
.fleet-hero { align-items: stretch; }
.fleet-side { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.fleet-side > .panel { margin-bottom: 0; }
.fleet-hero > .panel { margin-bottom: 0; }
.fleet-hero { margin-bottom: 18px; }
.attn-panel { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.attn-panel .panelhead { padding-bottom: 8px; }
.tag.warn { color: color-mix(in srgb, var(--amber) 80%, var(--ink)); background: color-mix(in srgb, var(--amber) 12%, transparent); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.attn-depots { display: grid; gap: 5px; padding: 0 18px 10px; }
.ad-row { display: grid !important; grid-template-columns: 74px 1fr 46px; align-items: center; gap: 10px; padding: 5px 8px !important; border-radius: 9px !important; border: 1px solid transparent !important; background: var(--surface-2) !important; font-size: 11.5px !important; color: var(--ink) !important; }
.ad-row:hover { border-color: var(--brand) !important; }
.ad-row.single { cursor: default; }
.ad-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.ad-name i { width: 7px; height: 7px; border-radius: 50%; }
.ad-name i.s-green { background: var(--green); }
.ad-name i.s-amber { background: var(--amber); }
.ad-name i.s-red { background: var(--red); }
.ad-bar { position: relative; height: 7px; border-radius: 5px; background: var(--surface-3); }
.ad-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--teal), var(--green)); transition: width .4s; }
.ad-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); }
.ad-row b { text-align: right; font-variant-numeric: tabular-nums; }
/* height:0 + flex-grow: the list takes the space left by the chart without making the column taller. */
.attn-list { flex: 1 1 auto; height: 0; min-height: 180px; overflow-y: auto; padding: 0 12px 14px 18px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.attn-item {
    display: grid !important; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; text-align: left; flex-shrink: 0;
    padding: 9px 10px !important; border-radius: 11px !important; border: 1px solid var(--border) !important; background: var(--surface) !important; color: var(--ink) !important; position: relative;
}
.attn-item::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--lc, var(--muted)); }
.attn-item.crit { --lc: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)) !important; }
.attn-item.warn { --lc: var(--amber); }
.attn-item.ok { --lc: var(--green); }
.attn-item:hover { border-color: var(--lc) !important; transform: translateX(2px); }
.attn-item.sel { border-color: var(--teal) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 25%, transparent); }
.ai-id { font-family: var(--mono); font-weight: 800; font-size: 12px; display: flex; flex-direction: column; }
.ai-id small { font-family: var(--font); font-size: 10px; color: var(--muted); font-weight: 600; }
.ai-mid { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ai-mid small { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-bar { position: relative; height: 6px; border-radius: 4px; background: var(--surface-3); }
.ai-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--lc); }
.ai-bar u { position: absolute; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--lc) 45%, transparent) 0 3px, transparent 3px 6px); }
.ai-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); }
.ai-when { font-family: var(--mono); font-weight: 800; font-size: 12px; text-align: right; display: flex; flex-direction: column; }
.ai-when small { font-family: var(--font); font-size: 10px; color: var(--muted); font-weight: 600; }
.attn-clear { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--green) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); flex-shrink: 0; }
.attn-clear .ic { width: 22px; height: 22px; color: var(--green); }
.attn-clear b { display: block; font-size: 12.5px; }
.attn-clear span { font-size: 11px; color: var(--muted); }
.attn-sub { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--muted); margin: 6px 0 0; text-transform: uppercase; }
@media (max-width: 1240px) { .attn-list { height: auto; max-height: 420px; } }

.attn-sub.first { margin-top: 0; }
.attn-item.mini { padding: 6px 10px !important; }
.attn-item.mini .ai-bar { height: 4px; }
