/* ==========================================================================
   RIX TAXI RADARS — dark, mobile-first UI
   Palette: bg #0f172a · card #1e293b · text #f8fafc · accent #0284c7
            green #22c55e · yellow #eab308 · red #ef4444
   ========================================================================== */

:root {
    --bg: #0f172a;
    --bg-deep: #0b1220;
    --card: #1e293b;
    --card-2: #243349;
    --card-3: #2b3a52;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #0284c7;
    --accent-soft: rgba(2, 132, 199, .16);
    --accent-line: rgba(2, 132, 199, .42);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --line: rgba(148, 163, 184, .16);
    --line-soft: rgba(148, 163, 184, .09);
    --radius: 16px;
    --radius-sm: 11px;
    --shadow: 0 10px 30px rgba(2, 6, 23, .45);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
            "Liberation Mono", monospace;
    --tab-h: 62px;
    --head-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: none;
}

body {
    background:
        radial-gradient(1100px 520px at 50% -12%, rgba(2, 132, 199, .16), transparent 62%),
        radial-gradient(700px 380px at 108% 4%, rgba(34, 197, 94, .07), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 14px);
}

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.app-head {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(11, 18, 32, .88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 10px 14px calc(10px + 0px);
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

.app-head__row { display: flex; align-items: center; gap: 10px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }

.brand__mark {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 11px;
    background: linear-gradient(150deg, var(--accent), #0369a1 55%, #075985);
    display: grid; place-items: center;
    box-shadow: 0 6px 18px rgba(2, 132, 199, .35);
}
.brand__mark svg { width: 21px; height: 21px; }

.brand__text { min-width: 0; }
.brand__title {
    font-size: 15.5px; font-weight: 800; letter-spacing: -.015em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__sub {
    font-size: 11px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.clock {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 5px 9px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}

.btn-refresh {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 13px;
    border-radius: 11px;
    border: 1px solid var(--accent-line);
    background: linear-gradient(180deg, rgba(2,132,199,.28), rgba(2,132,199,.14));
    color: var(--text);
    font-size: 12.5px; font-weight: 700;
    cursor: pointer;
    transition: transform .12s ease, filter .12s ease, opacity .12s ease;
    white-space: nowrap;
}
.btn-refresh:active { transform: scale(.96); }
.btn-refresh svg { width: 15px; height: 15px; }
.btn-refresh[data-busy="1"] { opacity: .72; pointer-events: none; }
.btn-refresh[data-busy="1"] svg { animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Status / source strip
   -------------------------------------------------------------------------- */

.status-strip {
    display: flex; align-items: center; gap: 8px;
    margin-top: 9px;
    font-size: 11.5px;
    color: var(--muted);
    flex-wrap: wrap;
}
.status-strip .dot-live {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green); flex: 0 0 7px;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
    animation: pulse-dot 2.4s ease-out infinite;
}
.status-strip[data-state="stale"] .dot-live { background: var(--yellow); animation: none; }
.status-strip[data-state="error"] .dot-live { background: var(--red); animation: none; }
@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.status-strip b { color: var(--text); font-weight: 650; }
.countdown { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 18, 32, .94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
}

.tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px;
    padding: 7px 4px 6px;
    border-radius: 13px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
    position: relative;
    -webkit-user-select: none; user-select: none;
}
.tab svg { width: 21px; height: 21px; }
.tab__label { font-size: 10.5px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.tab__badge {
    position: absolute; top: 3px; right: 12%;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 9px;
    background: var(--red); color: #fff;
    font-size: 9.5px; font-weight: 800; line-height: 16px; text-align: center;
    border: 2px solid var(--bg-deep);
    font-variant-numeric: tabular-nums;
}
.tab__badge[data-tone="yellow"] { background: var(--yellow); color: #1c1917; }
.tab__badge[data-tone="green"] { background: var(--green); color: #052e16; }
.tab__badge[hidden] { display: none; }

.tab[aria-selected="true"] {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--text);
}
.tab[aria-selected="true"] svg { color: var(--accent); }
.tab:active { transform: scale(.97); }

.panel { display: none; padding: 14px 12px 6px; }
.panel[data-active="true"] { display: block; animation: fade-in .22s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
    background: linear-gradient(180deg, var(--card) 0%, #1b2739 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}
.card--tight { padding: 12px; }
.card--flat { box-shadow: none; }

.card__head {
    display: flex; align-items: baseline; gap: 8px;
    margin-bottom: 11px;
}
.card__title {
    font-size: 12px; font-weight: 800;
    letter-spacing: .09em; text-transform: uppercase;
    color: var(--muted);
}
.card__aside { margin-left: auto; font-size: 11px; color: var(--muted-2); font-family: var(--mono); }

/* --- hero summary card --------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 16px 15px 15px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, #1e293b 0%, #16223a 60%, #131d31 100%);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}
.hero::before {
    content: "";
    position: absolute; inset: -40% -20% auto auto;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, var(--hero-glow, rgba(2,132,199,.30)), transparent 68%);
    pointer-events: none;
}
.hero[data-level="low"]    { --hero-glow: rgba(34, 197, 94, .26); }
.hero[data-level="medium"] { --hero-glow: rgba(234, 179, 8, .26); }
.hero[data-level="high"]   { --hero-glow: rgba(239, 68, 68, .30); }

.hero__label {
    font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
    color: var(--muted); position: relative;
}
.hero__row {
    display: flex; align-items: flex-start; gap: 12px; margin-top: 6px; position: relative;
}
.hero__figure { min-width: 0; flex: 1; }
.hero__value {
    font-size: clamp(38px, 13vw, 54px);
    font-weight: 850; line-height: .95; letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
}
.hero__unit { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-weight: 600; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge .sq { width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex: 0 0 7px; }
.badge--green  { color: var(--green);  background: rgba(34,197,94,.14);  border-color: rgba(34,197,94,.4); }
.badge--yellow { color: var(--yellow); background: rgba(234,179,8,.14);  border-color: rgba(234,179,8,.4); }
.badge--red    { color: var(--red);    background: rgba(239,68,68,.14);  border-color: rgba(239,68,68,.42); }
.badge--blue   { color: #38bdf8;       background: var(--accent-soft);   border-color: var(--accent-line); }
.badge--slate  { color: var(--muted);  background: rgba(148,163,184,.10); border-color: var(--line); }

.hero__meta {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px; margin-top: 14px; position: relative;
}
.meta {
    background: rgba(15, 23, 42, .55);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 9px 10px;
    min-width: 0;
}
.meta__k { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.meta__v {
    font-size: 16px; font-weight: 750; margin-top: 2px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meta__v small { font-size: 11px; color: var(--muted); font-weight: 600; }

.hero__hint {
    margin-top: 11px; position: relative;
    font-size: 12px; color: var(--muted); line-height: 1.5;
    border-left: 2px solid var(--accent-line); padding-left: 10px;
}

/* --- stat grid ----------------------------------------------------------- */

.stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; margin-bottom: 12px;
}
.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
    min-width: 0;
}
.stat__v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__k { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); margin-top: 3px; font-weight: 700; line-height: 1.3; }

/* --- chart --------------------------------------------------------------- */

.chart-wrap { position: relative; height: 232px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

.legend-row {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 10px; font-size: 11px; color: var(--muted);
}
.legend-row span { display: inline-flex; align-items: center; gap: 5px; }
.legend-row i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.legend-row i.now { width: 3px; height: 12px; background: var(--red); border-radius: 2px; }

/* --- flight cards -------------------------------------------------------- */

.flight {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted-2);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    margin-bottom: 8px;
    transition: border-color .2s ease, background .2s ease;
}
.flight[data-state="active"] { border-left-color: var(--red); background: linear-gradient(180deg, #232f45, #1e293b); }
.flight[data-state="next"]   { border-left-color: var(--yellow); }
.flight[data-state="later"]  { border-left-color: var(--accent); }
.flight[data-state="done"]   { border-left-color: var(--muted-2); opacity: .62; }

.flight__top { display: flex; align-items: center; gap: 8px; }
.flight__no {
    font-family: var(--mono); font-size: 13.5px; font-weight: 700;
    background: var(--card-3); border-radius: 7px; padding: 3px 7px;
    letter-spacing: .02em;
}
.flight__route { font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flight__route small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.flight__status { margin-left: auto; flex: 0 0 auto; }

.status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 8px; border-radius: 999px;
    background: rgba(148, 163, 184, .12); color: var(--muted);
    border: 1px solid var(--line);
    white-space: nowrap;
}
.status-pill[data-kind="done"]  { color: var(--green);  background: rgba(34,197,94,.13);  border-color: rgba(34,197,94,.34); }
.status-pill[data-kind="soon"]  { color: #38bdf8;       background: var(--accent-soft);   border-color: var(--accent-line); }
.status-pill[data-kind="warn"]  { color: var(--red);    background: rgba(239,68,68,.14);  border-color: rgba(239,68,68,.4); }
.status-pill[data-kind="off"]   { color: var(--muted-2); background: rgba(148,163,184,.07); }

.flight__grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px; margin-top: 10px;
    font-size: 11.5px;
}
.flight__grid div { min-width: 0; }
.flight__grid dt { color: var(--muted-2); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.flight__grid dd { margin: 1px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }

.exit-window {
    margin-top: 10px;
    display: flex; align-items: center; gap: 9px;
    background: rgba(2, 132, 199, .10);
    border: 1px solid var(--accent-line);
    border-radius: 10px;
    padding: 8px 10px;
}
.exit-window svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 16px; }
.exit-window__txt { min-width: 0; }
.exit-window__k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.exit-window__v { font-family: var(--mono); font-size: 14px; font-weight: 750; letter-spacing: .01em; }
.exit-window__v b { color: var(--yellow); }
.exit-window__pax {
    margin-left: auto; text-align: right; flex: 0 0 auto;
    font-size: 10.5px; color: var(--muted); line-height: 1.25;
}
.exit-window__pax b { display: block; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.chip {
    font-size: 10px; font-weight: 700; letter-spacing: .03em;
    padding: 3px 7px; border-radius: 6px;
    background: rgba(148, 163, 184, .10);
    border: 1px solid var(--line);
    color: var(--muted);
    white-space: nowrap;
}
.chip--schengen { color: #38bdf8; background: var(--accent-soft); border-color: var(--accent-line); }
.chip--non { color: var(--yellow); background: rgba(234,179,8,.12); border-color: rgba(234,179,8,.34); }
.chip--charter { color: #f0abfc; background: rgba(217,70,239,.12); border-color: rgba(217,70,239,.32); }
.chip--delay { color: var(--red); background: rgba(239,68,68,.13); border-color: rgba(239,68,68,.36); }

/* --- segmented filter ---------------------------------------------------- */

.segmented {
    display: flex; gap: 4px; padding: 3px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 11px;
    overflow-x: auto;
    scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
    flex: 1 0 auto;
    padding: 7px 11px;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px; font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.segmented button[aria-pressed="true"] {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 3px 12px rgba(2, 132, 199, .35);
}
.segmented button:active { transform: scale(.97); }

/* --------------------------------------------------------------------------
   RADARS (events)
   -------------------------------------------------------------------------- */

.alert-card {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px;
    margin-bottom: 10px;
}
.alert-card[data-alert="hot"] {
    border-color: rgba(239, 68, 68, .5);
    background: linear-gradient(180deg, rgba(239,68,68,.13), var(--card) 55%);
}
.alert-card[data-alert="ending"] {
    border-color: rgba(239, 68, 68, .38);
    background: linear-gradient(180deg, rgba(239,68,68,.09), var(--card) 55%);
}
.alert-card[data-alert="active"] { border-color: rgba(234, 179, 8, .34); }
.alert-card[data-alert="soon"] { border-color: var(--accent-line); }
.alert-card[data-alert="done"], .alert-card[data-alert="later"] { opacity: .68; }

.alert-card__top { display: flex; align-items: center; gap: 8px; }
.alert-card__venue { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.alert-card__title { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.alert-card__body {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px; margin-top: 11px;
}
.kv { background: rgba(15, 23, 42, .5); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 9px; min-width: 0; }
.kv__k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); font-weight: 700; }
.kv__v { font-size: 14.5px; font-weight: 750; margin-top: 1px; font-variant-numeric: tabular-nums; }
.kv__v small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.kv--wide { grid-column: 1 / -1; }

.countdown-strip {
    margin-top: 10px;
    display: flex; align-items: center; gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.countdown-strip b { color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }

.pulse-ring {
    position: absolute; top: 11px; right: 11px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--red);
}
.pulse-ring::after {
    content: ""; position: absolute; inset: -5px; border-radius: 50%;
    border: 2px solid var(--red); opacity: .7;
    animation: ring 1.7s ease-out infinite;
}
@keyframes ring {
    0% { transform: scale(.6); opacity: .8; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* --------------------------------------------------------------------------
   MOBILITĀTE (map)
   -------------------------------------------------------------------------- */

.map-shell {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #0b1220;
}
#map { height: 58vh; min-height: 340px; width: 100%; background: #0b1220; }

.map-overlay-top {
    position: absolute; z-index: 500; top: 10px; left: 10px; right: 10px;
    display: flex; gap: 8px; align-items: center; pointer-events: none;
}
.map-clock {
    pointer-events: auto;
    background: rgba(11, 18, 32, .9);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 10px;
    font-family: var(--mono); font-size: 13px; font-weight: 750;
    font-variant-numeric: tabular-nums;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.map-clock small { display: block; font-family: var(--font); font-size: 9px; color: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

.map-legend {
    pointer-events: auto;
    margin-left: auto;
    display: flex; gap: 9px;
    background: rgba(11, 18, 32, .9);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 9px;
    font-size: 10px; font-weight: 700; color: var(--muted);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }

.tiles-note {
    position: absolute; z-index: 500; left: 10px; right: 10px; bottom: 10px;
    font-size: 10.5px; color: var(--muted);
    background: rgba(11, 18, 32, .85);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 5px 9px;
    display: none;
}
.tiles-note[data-on="1"] { display: block; }

/* Basemap host. The dark slate sits under the tiles so that a blocked or
   offline provider still yields a legible map: the heat layer, zone markers
   and popups are drawn by Leaflet and need no network at all. */
#map { background: #0b1220; }
#map[data-no-tiles="1"] {
    background:
        linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 100% 32px,
        linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 32px 100%,
        #0b1220;
}
.leaflet-container { background: #0b1220; font: inherit; }
.leaflet-control-attribution {
    background: rgba(11, 18, 32, .78) !important;
    color: #64748b !important;
    font-size: 9px !important;
    border-radius: 6px 0 0 0;
}
.leaflet-control-attribution a { color: #7dd3fc !important; }

/* time slider */
.time-control {
    margin-top: 11px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}
.time-control__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.time-control__title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.time-control__value { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 30px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px; border-radius: 4px;
    background: linear-gradient(90deg, rgba(34,197,94,.5), rgba(234,179,8,.5), rgba(239,68,68,.55));
    border: 1px solid var(--line);
}
input[type="range"]::-moz-range-track {
    height: 6px; border-radius: 4px;
    background: linear-gradient(90deg, rgba(34,197,94,.5), rgba(234,179,8,.5), rgba(239,68,68,.55));
    border: 1px solid var(--line);
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 24px; height: 24px; margin-top: -10px;
    border-radius: 50%;
    background: #fff; border: 4px solid var(--accent);
    box-shadow: 0 3px 12px rgba(2, 6, 23, .6);
}
input[type="range"]::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 4px solid var(--accent);
    box-shadow: 0 3px 12px rgba(2, 6, 23, .6);
}

.quick-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.quick-times button {
    padding: 9px 4px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-deep);
    color: var(--muted);
    font-size: 12px; font-weight: 750;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.quick-times button[aria-pressed="true"] {
    background: var(--accent); border-color: var(--accent); color: #fff;
    box-shadow: 0 3px 12px rgba(2, 132, 199, .35);
}
.quick-times button:active { transform: scale(.96); }

/* hotspot list */
.hotspot {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 11px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted-2);
    margin-bottom: 7px;
    cursor: pointer;
}
.hotspot[data-level="high"] { border-left-color: var(--red); }
.hotspot[data-level="medium"] { border-left-color: var(--yellow); }
.hotspot[data-level="low"] { border-left-color: var(--green); }
.hotspot__idx {
    font-family: var(--mono); font-size: 11px; font-weight: 800;
    width: 22px; height: 22px; border-radius: 7px; flex: 0 0 22px;
    display: grid; place-items: center;
    background: var(--card-3); color: var(--muted);
}
.hotspot__name { font-size: 13.5px; font-weight: 750; min-width: 0; }
.hotspot__hint { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hotspot__meter { margin-left: auto; flex: 0 0 auto; text-align: right; }
.hotspot__bar {
    width: 62px; height: 5px; border-radius: 3px;
    background: rgba(148, 163, 184, .16); overflow: hidden; margin-top: 4px;
}
.hotspot__bar i { display: block; height: 100%; border-radius: 3px; }
.hotspot__pct { font-family: var(--mono); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Leaflet popup, dark themed */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #1e293b !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 12px 34px rgba(2, 6, 23, .6) !important;
}
.leaflet-popup-content { margin: 11px 13px !important; font-family: var(--font) !important; font-size: 12.5px !important; line-height: 1.5 !important; }
.leaflet-popup-content b { font-size: 13.5px; }
.leaflet-popup-close-button { color: var(--muted) !important; }
.leaflet-container { background: #0b1220 !important; font: inherit; }
.leaflet-control-attribution {
    background: rgba(11, 18, 32, .8) !important;
    color: var(--muted-2) !important; font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a { background: #1e293b !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-bar a:hover { background: var(--card-3) !important; }

.zone-marker { display: grid; place-items: center; }
.zone-marker__dot {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .82);
    box-shadow: 0 2px 12px rgba(2, 6, 23, .7);
}
.zone-marker__dot[data-level="high"] { animation: marker-pulse 1.5s ease-out infinite; }
@keyframes marker-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .65), 0 2px 12px rgba(2,6,23,.7); }
    70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0), 0 2px 12px rgba(2,6,23,.7); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 2px 12px rgba(2,6,23,.7); }
}
.zone-marker__label {
    position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    font-size: 9.5px; font-weight: 800; letter-spacing: .03em;
    background: rgba(11, 18, 32, .92); color: var(--text);
    border: 1px solid var(--line); border-radius: 6px;
    padding: 1px 5px; white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

.note {
    font-size: 11.5px; color: var(--muted-2); line-height: 1.55;
    padding: 10px 11px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, .5);
    border: 1px solid var(--line-soft);
    margin-bottom: 12px;
}
.note b { color: var(--muted); }

.banner {
    display: none;
    align-items: flex-start; gap: 9px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 12px; line-height: 1.5;
    border: 1px solid rgba(234, 179, 8, .38);
    background: rgba(234, 179, 8, .10);
    color: #fde68a;
}
.banner[data-on="1"] { display: flex; }
.banner[data-tone="error"] { border-color: rgba(239,68,68,.42); background: rgba(239,68,68,.11); color: #fecaca; }
.banner[data-tone="ok"] { border-color: rgba(34,197,94,.36); background: rgba(34,197,94,.10); color: #bbf7d0; }
.banner svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }

.empty {
    text-align: center; padding: 26px 16px; color: var(--muted-2); font-size: 12.5px;
    border: 1px dashed var(--line); border-radius: var(--radius-sm);
}

.section-title {
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted-2); margin: 4px 2px 9px;
    display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.skeleton {
    background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.foot {
    text-align: center; font-size: 10.5px; color: var(--muted-2);
    padding: 14px 16px 6px; line-height: 1.6;
}
.foot a { color: var(--muted); }

/* toast */
.toast {
    position: fixed; z-index: 80;
    left: 50%; transform: translate(-50%, 20px);
    bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom, 0px));
    background: #0b1220;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 14px;
    font-size: 12.5px; font-weight: 650;
    box-shadow: 0 14px 40px rgba(2, 6, 23, .7);
    opacity: 0; pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    max-width: calc(100vw - 32px);
    text-align: center;
}
.toast[data-on="1"] { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tone="ok"] { border-color: rgba(34,197,94,.45); color: #bbf7d0; }
.toast[data-tone="warn"] { border-color: rgba(234,179,8,.45); color: #fde68a; }
.toast[data-tone="error"] { border-color: rgba(239,68,68,.5); color: #fecaca; }

/* --------------------------------------------------------------------------
   Responsive — tablets and desktop get a wider, two-column layout
   -------------------------------------------------------------------------- */

@media (min-width: 720px) {
    body { padding-bottom: calc(var(--tab-h) + 20px); }
    .panel { padding: 18px max(18px, calc((100vw - 1080px) / 2)) 10px; }
    .app-head { padding-left: max(18px, calc((100vw - 1080px) / 2)); padding-right: max(18px, calc((100vw - 1080px) / 2)); }
    .tabs { max-width: 560px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 18px 18px 0 0; border: 1px solid var(--line); border-bottom: 0; }
    .hero__meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .flight__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .alert-card__body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .chart-wrap { height: 280px; }
    #map { height: 64vh; min-height: 460px; }
    .two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; align-items: start; }
}

@media (min-width: 1100px) {
    .panel { padding-left: max(18px, calc((100vw - 1180px) / 2)); padding-right: max(18px, calc((100vw - 1180px) / 2)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Local vector basemap controls and labels */
.map-mode {
    position: absolute; z-index: 650; right: 10px; bottom: 36px;
    pointer-events: auto; border: 1px solid var(--line); border-radius: 9px;
    padding: 7px 10px; color: #dbeafe; background: rgba(11,18,32,.94);
    font: 700 11px var(--font); cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.map-mode:hover { border-color: #38bdf8; }
.basemap-loading {
    display: none; position: absolute; z-index: 600; left: 50%; top: 50%;
    transform: translate(-50%,-50%); background: rgba(11,18,32,.92);
    color: #cbd5e1; border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 13px; font-size: 12px; pointer-events: none;
}
.map-place-label { color: #dbeafe; background: rgba(11,18,32,.76); border: 0; box-shadow: none; font-size: 9px; font-weight: 700; }
.map-place-label:before { display: none; }
