/* GardaLokapala: Aero Glass theme (bright, transparent, modern)
   - frosted translucent surfaces (backdrop-filter blur + saturate) over a soft sky backdrop
   - specular top highlight on every glass surface (the "aero" gloss), hairline white borders
   - glossy pill buttons, aqua -> sky -> blue brand gradient
   - status colors reserved for state: red = active/critical, amber = scheduled H-7, blue = normal, green = safe */

@property --iri-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* ===================== THEME TOKENS =====================
   data-theme on <html>: default (unset) | aero | dark. Every surface reads these tokens. */
:root {
  color-scheme: light;
  /* Default: neutral, elegant white glass with blue + gold dynamic accents, a few iridescent (iOS-like) cards */
  --text: #1b2330;
  --text2: #3e4756;
  --muted: #6b7280;
  --dim: #9aa1ad;
  --line: rgba(17, 24, 39, .08);
  --line2: rgba(17, 24, 39, .14);
  --accent: #2563eb;
  --accent2: #1d4ed8;
  --accent-ink: #1d4ed8;
  --gold: #b8892b;
  --route: #0891b2;
  --brand: linear-gradient(135deg, #60a5fa 0%, #2563eb 55%, #1e40af 100%);
  --red: #d03b3b;
  --yellow: #e09a00;
  --green: #0ca30c;
  --blue: #2a78d6;
  --tint: 255, 255, 255;
  --tint-hi: 255, 255, 255;
  --glass: rgba(255, 255, 255, .68);
  --glass-strong: rgba(255, 255, 255, .90);
  --glass-soft: rgba(255, 255, 255, .45);
  --glass-border: rgba(255, 255, 255, .92);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .22) 42%, rgba(255, 255, 255, 0) 65%);
  --topbar-bg: rgba(255, 255, 255, .70);
  --bg-paint: radial-gradient(70% 55% at 6% 0%, rgba(59, 130, 246, .35) 0%, transparent 60%), radial-gradient(60% 55% at 100% 100%, rgba(245, 158, 11, .30) 0%, transparent 62%), radial-gradient(50% 50% at 50% 50%, rgba(14, 165, 233, .22) 0%, transparent 65%), linear-gradient(160deg, #f8fafc 0%, #f0f7ff 50%, #eff6ff 100%);
  --hero-paint: linear-gradient(135deg, rgba(59, 130, 246, .26), rgba(245, 158, 11, .20));
  --hero-ink: #1e3a8a;
  --glow-a: rgba(59, 130, 246, .35);
  --glow-b: rgba(245, 158, 11, .32);
  --glow-c: rgba(14, 165, 233, .30);
  --orb-opacity: .85;
  --iri: conic-gradient(from var(--iri-ang), #a5c8ff, #f6dca0, #f9b4d4, #b5f0de, #c7b8ff, #a5c8ff);
  --iri-sheen: linear-gradient(120deg, rgba(165, 200, 255, .20) 0%, rgba(246, 220, 160, .18) 35%, rgba(249, 180, 212, .14) 65%, rgba(181, 240, 222, .18) 100%);
  --iri-width: 1.5px;
  --iri-opacity: .95;
  --shadow: 0 14px 34px -10px rgba(37, 99, 235, .18), 0 3px 10px rgba(0, 0, 0, .04);
  --shadow-lg: 0 28px 65px -18px rgba(37, 99, 235, .25);
  --blur: blur(20px) saturate(180%);
  --chart-grid: rgba(17, 24, 39, .07);
  --chart-surface: #ffffff;

  --r: 18px;
  --r-sm: 12px;
  --top: 64px;
  --side: 224px;
  --gap: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* AeroGlass: Daytime bright sky blue with dynamic wind and cloud curves */
:root[data-theme="aero"] {
  --text: #032b4d;
  --text2: #074b7c;
  --muted: #256b9c;
  --dim: #5c98c2;
  --line: rgba(3, 43, 77, .10);
  --line2: rgba(3, 43, 77, .18);
  --accent: #0284c7;
  --accent2: #0369a1;
  --accent-ink: #0369a1;
  --brand: linear-gradient(135deg, #38bdf8 0%, #0284c7 60%, #0369a1 100%);
  --tint: 224, 242, 254;
  --tint-hi: 240, 249, 255;
  --glass: rgba(240, 249, 255, .55);
  --glass-strong: rgba(240, 249, 255, .88);
  --glass-soft: rgba(240, 249, 255, .38);
  --glass-border: rgba(255, 255, 255, .90);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, .32) 40%, rgba(255, 255, 255, 0) 100%);
  --topbar-bg: rgba(186, 230, 253, .65);
  --bg-paint: radial-gradient(65% 50% at 15% 10%, rgba(255, 255, 255, .7) 0%, transparent 60%), radial-gradient(70% 60% at 85% 20%, rgba(186, 230, 253, .65) 0%, transparent 65%), linear-gradient(180deg, #38bdf8 0%, #7dd3fc 35%, #bae6fd 70%, #f0f9ff 100%);
  --hero-paint: linear-gradient(135deg, rgba(186, 230, 253, .5), rgba(56, 189, 248, .35));
  --hero-ink: #034875;
  --glow-a: rgba(2, 132, 199, .45);
  --glow-b: rgba(56, 189, 248, .50);
  --glow-c: rgba(186, 230, 253, .60);
  --orb-opacity: .90;
  --iri: conic-gradient(from var(--iri-ang), #bae6fd, #e0f2fe, #7dd3fc, #bae6fd);
  --iri-sheen: linear-gradient(115deg, rgba(186, 230, 253, .30) 0%, rgba(224, 242, 254, .25) 50%, rgba(125, 211, 252, .30) 100%);
  --iri-width: 1.5px;
  --iri-opacity: .9;
  --shadow: 0 12px 30px -12px rgba(2, 75, 120, .35), 0 0 0 1px rgba(255, 255, 255, .45) inset;
  --shadow-lg: 0 26px 60px -18px rgba(2, 75, 120, .45);
  --blur: blur(16px) saturate(180%);
  --chart-grid: rgba(3, 43, 77, .09);
  --chart-surface: #f0f9ff;
}

/* Dark: Translucent night sky with organic glowing Aurora Borealis backdrop */
:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #f0f6fc;
  --text2: #cbd5e1;
  --muted: #94a3b8;
  --dim: #64748b;
  --line: rgba(255, 255, 255, .10);
  --line2: rgba(255, 255, 255, .18);
  --accent: #38bdf8;
  --accent2: #7dd3fc;
  --accent-ink: #7dd3fc;
  --gold: #e3b866;
  --brand: linear-gradient(135deg, #34d399 0%, #38bdf8 50%, #a855f7 100%);
  --red: #f06464;
  --yellow: #f5b83d;
  --green: #34d399;
  --blue: #38bdf8;
  --tint: 15, 23, 42;
  --tint-hi: 30, 41, 59;
  --glass: rgba(8, 14, 26, .64);
  --glass-strong: rgba(13, 21, 38, .88);
  --glass-soft: rgba(8, 14, 26, .48);
  --glass-border: rgba(255, 255, 255, .14);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, 0) 60%);
  --topbar-bg: rgba(7, 11, 20, .75);
  --bg-paint: radial-gradient(60% 45% at 20% 12%, rgba(52, 211, 153, .22) 0%, transparent 70%), radial-gradient(60% 45% at 75% 25%, rgba(56, 189, 248, .25) 0%, transparent 70%), radial-gradient(50% 40% at 50% 60%, rgba(168, 85, 247, .18) 0%, transparent 75%), linear-gradient(160deg, #030712 0%, #070e1b 50%, #050a14 100%);
  --hero-paint: linear-gradient(135deg, rgba(52, 211, 153, .22), rgba(56, 189, 248, .20));
  --hero-ink: #a7f3d0;
  --glow-a: rgba(52, 211, 153, .35);
  --glow-b: rgba(56, 189, 248, .35);
  --glow-c: rgba(168, 85, 247, .28);
  --orb-opacity: .85;
  --iri: conic-gradient(from var(--iri-ang), #34d399, #38bdf8, #a855f7, #34d399);
  --iri-sheen: linear-gradient(120deg, rgba(52, 211, 153, .12) 0%, rgba(56, 189, 248, .12) 40%, rgba(168, 85, 247, .10) 100%);
  --iri-width: 1.5px;
  --iri-opacity: .75;
  --shadow: 0 14px 34px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 28px 65px -18px rgba(0, 0, 0, .75);
  --blur: blur(20px) saturate(170%);
  --chart-grid: rgba(255, 255, 255, .08);
  --chart-surface: #0a1120;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--text); font: 13px/1.5 var(--font); }
body { background: var(--bg-paint) fixed; transition: background .4s; }
#fxBg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent2); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: -.01em; }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: rgba(14, 165, 233, .25); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(15, 42, 68, .18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(14, 165, 233, .45); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font: 12px var(--mono); background: rgba(14, 165, 233, .1); padding: 1px 5px; border-radius: 5px; }

/* ---------- utilities ---------- */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.wrap { flex-wrap: wrap; }
.right { margin-left: auto; }
.center { justify-content: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: var(--gap); }
.nowrap { white-space: nowrap; }
.r { text-align: right !important; }
.span2 { grid-column: span 2; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; margin-right: 6px; vertical-align: -1px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--text2); background: rgba(var(--tint), .7); border: 1px solid var(--line); white-space: nowrap; }
.chip.team i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }
.code { font: 700 .8em var(--mono); color: var(--accent-ink); background: rgba(14, 165, 233, .12); padding: 2px 8px; border-radius: 8px; vertical-align: 2px; }

/* ---------- glass primitive ---------- */
.glass, .panel, .topbar, .sidebar, .modal, .notif-panel, .search-results, .stat, .kpi, .leaflet-popup-content-wrapper, .map-legend, .toast {
  background: var(--gloss), var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(255, 255, 255, .15);
}

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 18px; z-index: 1000; border-width: 0 0 1px 0; border-radius: 0; background: var(--gloss), var(--topbar-bg); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { filter: drop-shadow(0 4px 10px rgba(14, 165, 233, .35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 18px var(--head); letter-spacing: -.02em; }
.brand-name b { font-weight: 800; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-tag { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.brand-sep { width: 1px; height: 28px; background: var(--line2); }
.brand-sub { font: 600 14px var(--head); color: var(--text2); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.asof { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(var(--tint), .6); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.asof input { border: 0; background: transparent; font: 600 12px var(--mono); color: var(--text); outline: none; }
.asof.sim { background: #fff4d6; border-color: #f5c24d; color: #8a5a00; box-shadow: 0 0 0 3px rgba(245, 194, 77, .25); }
.clock { font: 600 14px var(--mono); color: var(--text2); display: flex; align-items: baseline; gap: 4px; }
.clock small { font-size: 10px; color: var(--muted); }
.global-search { position: relative; }
.global-search input { width: 220px; padding: 8px 14px 8px 34px; border-radius: 999px; border: 1px solid var(--line); outline: none; background: rgba(var(--tint), .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b7590' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px 50%; transition: .2s; }
.global-search input:focus { width: 280px; background-color: rgba(var(--tint-hi), .92); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(14, 165, 233, .15); }
.search-results { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; border-radius: var(--r-sm); padding: 6px; display: none; z-index: 1100; background: var(--gloss), var(--glass-strong); }
.search-results.open { display: block; }
.search-results a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.search-results a:hover { background: rgba(14, 165, 233, .1); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(var(--tint), .65); cursor: pointer; color: var(--text2); position: relative; transition: .15s; font-size: 15px; flex: none; }
.icon-btn:hover { background: rgba(var(--tint-hi), .92); color: var(--accent-ink); box-shadow: 0 4px 12px rgba(14, 165, 233, .2); }
.bell b { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font: 700 10px/18px var(--font); border: 2px solid #fff; }
.bell b:empty { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 700 12px var(--head); box-shadow: 0 4px 12px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.notif-panel { position: fixed; top: calc(var(--top) + 8px); right: 16px; width: 380px; max-height: 70vh; overflow: auto; border-radius: var(--r); z-index: 1100; padding: 6px 4px; background: var(--gloss), var(--glass-strong); }
.notif-panel .item { display: flex; gap: 10px; padding: 9px 12px; color: var(--text); border-radius: 10px; margin: 0 4px; }
.notif-panel a.item:hover { background: rgba(14, 165, 233, .08); }

/* ---------- sidebar ---------- */
.sidebar { position: fixed; top: calc(var(--top) + var(--gap)); bottom: var(--gap); left: var(--gap); width: var(--side); padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; z-index: 900; transition: width .2s; overflow: hidden; border-radius: 22px; }
.nav-label { font: 700 10px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 6px 12px 4px; white-space: nowrap; }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--text2); font-weight: 600; white-space: nowrap; transition: .15s; border: 1px solid transparent; }
.sidebar a .ico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(var(--tint), .7); border: 1px solid var(--line); font-size: 13px; color: var(--accent-ink); }
.sidebar a:hover { background: rgba(var(--tint), .55); color: var(--text); }
.sidebar a.active { background: var(--gloss), linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(37, 99, 235, .16)); border-color: rgba(255, 255, 255, .9); color: var(--text); box-shadow: 0 6px 16px -6px rgba(14, 165, 233, .45); }
.sidebar a.active .ico { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(14, 165, 233, .4); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.sidebar-foot { margin-top: auto; padding: 10px 12px; font-size: 11px; color: var(--text2); border-top: 1px solid var(--line); white-space: nowrap; }
body.nav-collapsed { --side: 64px; }
body.nav-collapsed .sidebar a span:not(.ico), body.nav-collapsed .sidebar-foot, body.nav-collapsed .nav-label { display: none; }
body.nav-collapsed .sidebar a { padding: 10px 6px; justify-content: center; }

/* ---------- app area & page ---------- */
#app { position: fixed; top: calc(var(--top) + var(--gap)); left: calc(var(--side) + var(--gap) * 2); right: var(--gap); bottom: var(--gap); overflow: auto; transition: left .2s; z-index: 2; border-radius: 22px; }
.page { padding: 2px 2px 20px; min-height: 100%; }
.page.narrow { max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.page-head .muted { max-width: 760px; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent-ink); }
.sec-h { font-size: 15px; margin: 18px 0 10px; color: var(--text2); display: flex; align-items: center; gap: 10px; }
.sec-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
.sec-t { font: 700 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ---------- panels & stats ---------- */
.panel { border-radius: var(--r); min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; flex-wrap: wrap; }
.panel-h h3 { font-size: 14px; font-weight: 700; }
.panel-b { padding: 4px 16px 16px; }
.stat { border-radius: var(--r); padding: 14px 16px; min-width: 0; position: relative; overflow: hidden; }
.stat .k { font-size: 11.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.stat .v { font: 800 24px/1.2 var(--head); letter-spacing: -.02em; margin-top: 4px; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat.hero .v { color: var(--hero-ink); }
.stat.tile { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: .15s; }
.stat.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat.tile.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, .2), var(--shadow); }
.stat.tile .oi { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; margin-right: 4px; }
.t-good .oi { background: var(--green); } .t-warn .oi { background: #e09a00; } .t-bad .oi { background: var(--red); } .t-none .oi { background: var(--dim); }

/* ---------- buttons & form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; transition: .15s;
  border: 1px solid rgba(15, 42, 68, .12); background: linear-gradient(180deg, rgba(var(--tint-hi), .95) 0%, rgba(var(--tint), .9) 100%); box-shadow: 0 1px 2px rgba(15, 42, 68, .08), inset 0 1px 0 #fff; }
.btn:hover { color: var(--accent-ink); border-color: rgba(14, 165, 233, .45); box-shadow: 0 4px 14px -4px rgba(14, 165, 233, .45), inset 0 1px 0 #fff; }
.btn.primary { color: #fff; border-color: rgba(3, 105, 161, .5); background: linear-gradient(180deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 50%), var(--brand); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .55); text-shadow: 0 1px 1px rgba(3, 60, 110, .3); }
.btn.primary:hover { color: #fff; filter: brightness(1.06); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: #fff1f1; border-color: rgba(208, 59, 59, .4); color: var(--red); box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--text2); }
.btn.ghost:hover { background: rgba(var(--tint), .6); border-color: var(--line); }
.btn.sm { padding: 5px 12px; font-size: 12px; }
.btn.xs { padding: 3px 10px; font-size: 11px; }
.btn.big { padding: 12px 20px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 2px 4px; cursor: pointer; color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.link-btn:hover { color: var(--accent2); text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(15, 42, 68, .06); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text2); display: inline-flex; align-items: center; gap: 5px; }
.seg button:hover { color: var(--text); background: rgba(var(--tint), .6); }
.seg button.on { background: linear-gradient(180deg, rgba(var(--tint-hi), .98), rgba(var(--tint), .95)); color: var(--accent-ink); box-shadow: 0 2px 6px rgba(15, 42, 68, .12), inset 0 1px 0 #fff; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text2); }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline > span { white-space: nowrap; }
.input, .field input, .field select, .field textarea { width: 100%; padding: 8px 12px; border-radius: 11px; border: 1px solid rgba(15, 42, 68, .14); background: rgba(var(--tint), .82); outline: none; transition: .15s; box-shadow: inset 0 1px 2px rgba(15, 42, 68, .05); }
.field textarea { min-height: 78px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: rgba(var(--tint-hi), .92); box-shadow: 0 0 0 4px rgba(14, 165, 233, .15); }
.field.inline input { width: auto; }
select.input { width: auto; padding-right: 28px; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r); margin-bottom: var(--gap); }
.filter-bar .input { width: auto; }
.filter-bar .input.grow { min-width: 220px; }
.hint-box { font-size: 12px; color: var(--text2); background: rgba(14, 165, 233, .08); border: 1px solid rgba(14, 165, 233, .2); border-radius: var(--r-sm); padding: 9px 12px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; position: sticky; top: 0; background: rgba(var(--tint), .96); z-index: 1; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(15, 42, 68, .07); vertical-align: top; }
.tbl tbody tr:hover td { background: rgba(14, 165, 233, .05); }
.tbl.click tbody tr { cursor: pointer; }
.tbl tr.total td { font-weight: 700; background: rgba(14, 165, 233, .06); }
.tbl input, .tbl select { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; background: rgba(var(--tint), .6); outline: none; }
.tbl input:focus, .tbl select:focus { border-color: var(--accent); background: rgba(var(--tint-hi), .92); }
.change-pos { color: #0a7d0a; font-weight: 600; }
.change-neg { color: #c02a2a; font-weight: 600; }

/* ---------- badges & dots ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.badge .oi { font-size: 10px; }
.b-red, .b-critical, .b-Halted { color: #b42323; background: #fde8e8; border-color: #f7c6c6; }
.b-yellow, .b-NeedAttention { color: #8a5a00; background: #fff4d6; border-color: #f6dc95; }
.b-high { color: #a3461c; background: #fdeadf; border-color: #f5c9b0; }
.b-medium { color: #8a5a00; background: #fff4d6; border-color: #f6dc95; }
.b-blue { color: #1d5aa8; background: #e3effd; border-color: #bcd6f7; }
.b-green, .b-low, .b-Successful { color: #0a6f0a; background: #e3f6e3; border-color: #b9e5b9; }
.b-muted { color: var(--muted); background: rgba(15, 42, 68, .06); border-color: var(--line); }
.badge.cat { color: var(--text2); background: rgba(var(--tint), .8); border-color: var(--line2); }
.badge.cat::before { display: inline-block; width: 7px; height: 7px; border-radius: 2px; }
.cat.c1::before { background: #2a78d6; } .cat.c2::before { background: #eb6834; } .cat.c3::before { background: #1baf7a; } .cat.c4::before { background: #eda100; }
.cat.c1, .cat.c2, .cat.c3, .cat.c4 { }
.badge.cat::before { content: ''; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15, 42, 68, .12); }
.dot.red { background: var(--red); } .dot.yellow { background: #f2a900; } .dot.blue { background: var(--blue); } .dot.green { background: var(--green); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a, .tabs button { border: 0; background: transparent; padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 12px; color: var(--text2); }
.tabs a:hover, .tabs button:hover { background: rgba(var(--tint), .6); }
.tabs a.on, .tabs button.on { background: rgba(var(--tint-hi), .92); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(15, 42, 68, .1); }

/* ---------- progress bar ---------- */
.bar { height: 7px; border-radius: 999px; background: rgba(15, 42, 68, .08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(15, 42, 68, .08); }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%), var(--brand); }

/* ---------- modal, toast, empty, loader ---------- */
.modal-back { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: rgba(226, 238, 250, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 22px; background: var(--gloss), var(--glass-strong); box-shadow: var(--shadow-lg), inset 0 1px 0 #fff; animation: pop .18s ease-out; }
.modal.wide { width: min(980px, 100%); }
.modal.xwide { width: min(1240px, 100%); height: calc(100vh - 40px); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 6px 20px 16px; overflow: auto; flex: 1; }
.modal-f { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.modal-f .muted { margin-right: auto; margin-left: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px 11px 14px; border-radius: 14px; max-width: 420px; border-left: 4px solid var(--accent); background: var(--gloss), var(--glass-strong); animation: pop .2s; font-weight: 500; }
.toast.err { border-left-color: var(--red); color: #8f1d1d; }
.empty { padding: 18px; text-align: center; color: var(--muted); font-size: 12.5px; }
.empty.big { padding: 60px 20px; font-size: 15px; color: var(--text2); }
.loader { display: grid; place-items: center; height: 100%; min-height: 300px; font: 600 14px var(--head); color: var(--muted); gap: 12px; }
.loader::before { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(14, 165, 233, .2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- leaflet ---------- */
.leaflet-container { font: 12px var(--font); background: #e6eaef; border-radius: inherit; }
.leaflet-bar { border: 0 !important; border-radius: 14px !important; overflow: hidden; box-shadow: var(--shadow) !important; }
.leaflet-bar a { background: rgba(var(--tint), .85) !important; color: var(--text) !important; border-bottom-color: var(--line) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.leaflet-bar a:hover { background: rgba(var(--tint-hi), .92) !important; color: var(--accent-ink) !important; }
.leaflet-control-layers { border: 1px solid var(--glass-border) !important; border-radius: 14px !important; background: rgba(var(--tint), .85) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow) !important; }
.leaflet-popup-content-wrapper { border-radius: 20px; padding: 0; overflow: hidden; background: var(--gloss), var(--glass-strong); }
.leaflet-popup-tip { background: rgba(var(--tint), .9); box-shadow: none; }
.leaflet-popup-content { margin: 0; line-height: 1.45; width: auto !important; }
.leaflet-container a.leaflet-popup-close-button { top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(var(--tint), .85); color: var(--text); font: 16px/24px var(--font); text-align: center; z-index: 2; }
.leaflet-tooltip.tac { background: rgba(var(--tint), .92); color: var(--text); border: 1px solid var(--glass-border); border-radius: 10px; font: 600 12px var(--font); box-shadow: var(--shadow); padding: 4px 9px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.leaflet-tooltip.tac::before { display: none; }
.leaflet-tooltip-pane .leaflet-tooltip.tac[class*="permanent"] { opacity: .95; }
.leaflet-control-attribution { background: rgba(var(--tint), .6) !important; border-radius: 8px 0 0 0; font-size: 10px; }
.leaflet-control-scale-line { border-color: var(--text2); background: rgba(var(--tint), .7); color: var(--text); }
.pin { position: relative; width: 26px; height: 26px; }
.pin .core { position: absolute; inset: 6px; border-radius: 50%; border: 2.5px solid #fff; background: currentColor; box-shadow: 0 3px 8px rgba(15, 42, 68, .35), inset 0 2px 2px rgba(255, 255, 255, .55); }
.pin .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; opacity: .55; }
.pin.red { color: var(--red); } .pin.yellow { color: #f2a900; } .pin.blue { color: var(--blue); }
.pin.red .ring, .pin.yellow .ring { animation: ping 1.6s ease-out infinite; }
.pin.sel .core { inset: 3px; border-width: 3px; box-shadow: 0 0 0 4px rgba(14, 165, 233, .4), 0 4px 12px rgba(15, 42, 68, .4); }
@keyframes ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.team-icon { width: 28px; height: 28px; display: grid; place-items: center; font: 800 12px var(--head); color: #fff; border-radius: 9px; background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%), var(--tc); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(15, 42, 68, .4); }
.post-icon { width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(135deg, #5aa2f0, var(--blue)); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(15, 42, 68, .4); }
.map-legend { padding: 10px 12px; border-radius: 14px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.map-legend b { font: 700 11px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.map-legend div { display: flex; align-items: center; gap: 7px; }

/* ---------- Modul 1: dashboard ---------- */
.dash { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); }
.dash-main { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; min-width: 0; }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kpi { border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; align-items: center; min-width: 0; transition: .15s; }
.kpi[role=button] { cursor: pointer; }
.kpi[role=button]:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, .2), var(--shadow); }
.kpi .k { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.kpi .v { font: 800 26px/1.15 var(--head); letter-spacing: -.02em; }
.kpi .s { font-size: 11.5px; color: var(--muted); }
.kpi-ico { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 20px; color: #fff; box-shadow: 0 6px 14px -6px rgba(15, 42, 68, .5), inset 0 1px 0 rgba(255, 255, 255, .6); background-image: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%); }
.i-sites { background-color: #0ea5e9; } .i-area { background-color: #14b8a6; } .i-red { background-color: var(--red); } .i-yellow { background-color: #f2a900; }
.kpi-red .v { color: #b42323; } .kpi-yellow .v { color: #8a5a00; }
.dash-map { position: relative; flex: 1; min-height: 320px; border-radius: 22px; overflow: hidden; padding: 0; }
.dash-map #dmap { position: absolute; inset: 0; z-index: 0; }
.map-filter { position: absolute; top: 12px; left: 60px; right: 60px; z-index: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 16px; width: max-content; max-width: calc(100% - 120px); }
.map-filter .input { width: 200px; padding: 6px 12px; }
.map-filter select.input { width: auto; }
.dash-side { border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.dash-side .scroll { overflow: auto; flex: 1; padding: 4px 0 10px; }
.dash-side .panel-h { padding: 14px 16px 6px; }
.dash-side .panel-b { padding: 0 10px 6px; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; transition: .12s; border: 1px solid transparent; }
.list-item:hover, .list-item.sel { background: rgba(var(--tint), .7); border-color: var(--glass-border); box-shadow: 0 3px 10px -4px rgba(15, 42, 68, .2); }
.date-chip { width: 42px; flex: none; text-align: center; border-radius: 11px; padding: 4px 0; background: #fff4d6; border: 1px solid #f6dc95; color: #8a5a00; }
.date-chip b { display: block; font: 800 16px/1.1 var(--head); }
.date-chip span { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 12px; cursor: pointer; }
.feed li:hover { background: rgba(var(--tint), .6); }
.feed li i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.feed li i.schedule { background: #f2a900; box-shadow: 0 0 0 3px rgba(242, 169, 0, .15); }
.feed li i.operation { background: var(--red); box-shadow: 0 0 0 3px rgba(208, 59, 59, .12); }
.feed li i.upload, .feed li i.import { background: #14b8a6; }
.feed time { color: var(--dim); font-size: 11px; }
.qcard { width: 320px; }
.qthumb { height: 140px; background: #cfe0ee center/cover; padding: 10px 40px 10px 10px; position: relative; }
.qthumb::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .5)); }
.qthumb .chip { background: rgba(var(--tint), .85); }
.qbody { padding: 12px 16px 16px; }
.qbody h3 { font-size: 16px; line-height: 1.25; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kv > div { background: rgba(var(--tint), .6); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.kv .k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kv .v { font: 800 15px var(--head); margin-top: 2px; }
.kv .v.sm { font-size: 13px; font-weight: 700; }
.kv .s { font-size: 11px; color: var(--muted); }
.note { padding: 10px 12px; border-radius: 12px; background: rgba(var(--tint), .62); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: 12.5px; }
.note b { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.note.red { border-left-color: var(--red); background: rgba(253, 232, 232, .7); }
.note.yellow { border-left-color: #f2a900; background: rgba(255, 244, 214, .7); }
.note.blue { border-left-color: var(--blue); }

/* ---------- Modul 2: portfolio ---------- */
.cov { position: absolute; inset: 0; display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: var(--gap); }
.cov-list { border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cov-filter { padding: 0 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.cov-filter .input { width: 100%; }
.cov-filter .row select.input { flex: 1; }
.cov-list .scroll { overflow: auto; flex: 1; padding: 0 10px 12px; }
.cov-map { position: relative; border-radius: 22px; overflow: hidden; }
.cov-map #cmap { position: absolute; inset: 0; z-index: 0; }
.map-sel { position: absolute; z-index: 600; right: 60px; top: 12px; width: 320px; padding: 14px 16px; border-radius: 18px; }
.map-sel .icon-btn { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; }
.prov { margin-bottom: 4px; }
.prov-h { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 8px; border: 0; background: transparent; cursor: pointer; font: 700 12px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text2); position: sticky; top: 0; z-index: 1; border-radius: 10px; background: rgba(var(--tint), .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.prov-h .chev { color: var(--accent); width: 12px; }
.prov-h .cnt { margin-left: auto; font-size: 11px; padding: 1px 9px; border-radius: 999px; background: rgba(14, 165, 233, .12); color: var(--accent-ink); }
.site-card-sm { display: flex; gap: 12px; padding: 10px; margin-bottom: 8px; border-radius: 16px; cursor: pointer; background: rgba(var(--tint), .5); border: 1px solid var(--glass-border); transition: .15s; }
.site-card-sm:hover { background: rgba(var(--tint), .8); box-shadow: 0 6px 16px -8px rgba(15, 42, 68, .3); }
.site-card-sm.sel { background: rgba(var(--tint-hi), .92); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, .18), 0 6px 16px -8px rgba(15, 42, 68, .3); }
.sc-thumb { width: 82px; height: 82px; flex: none; border-radius: 12px; background: #cfe0ee center/cover; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.sc-thumb .dot { position: absolute; top: 6px; left: 6px; width: 12px; height: 12px; }
.sc-body { flex: 1; min-width: 0; }
.sc-body .t { font: 700 13px var(--head); line-height: 1.3; }
.sc-body .m { font-size: 11px; color: var(--muted); gap: 4px; }
.sc-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.sc-acts .btn b { font-weight: 800; color: var(--accent-ink); }

/* wizard */
.steps { list-style: none; margin: 0 0 var(--gap); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.steps li { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; cursor: pointer; background: rgba(var(--tint), .4); border: 1px solid var(--glass-border); font-weight: 600; color: var(--text2); transition: .15s; }
.steps li small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.steps li b { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--tint-hi), .92); border: 1px solid var(--line2); font: 800 13px var(--head); color: var(--muted); }
.steps li.on { background: var(--gloss), rgba(255, 255, 255, .85); color: var(--text); box-shadow: var(--shadow); border-color: #fff; }
.steps li.on b { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(14, 165, 233, .45); }
.steps li.done b { background: #e3f6e3; color: var(--green); border-color: #b9e5b9; }
.pick-map { height: 460px; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.area-out { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 14px; background: var(--gloss), var(--hero-paint); border: 1px solid #fff; }
.area-out b { font: 800 20px var(--head); color: var(--hero-ink); }
.area-out span { font-size: 12px; color: var(--muted); }
.summary-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.summary-strip > div { padding: 10px 12px; border-radius: 12px; background: rgba(var(--tint), .6); border: 1px solid var(--line); min-width: 0; }
.summary-strip .k { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.summary-strip b { font-size: 13px; }
.success-card { text-align: center; padding: 30px 20px; }
.success-card h2 { font-size: 24px; margin: 10px 0 4px; }
.success-card p { font-size: 15px; color: var(--text2); margin: 0 0 6px; }
.ok-ico { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 34px; color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%), #12b76a; box-shadow: 0 12px 30px -10px rgba(18, 183, 106, .7), inset 0 2px 0 rgba(255, 255, 255, .5); }
.drop { display: block; padding: 22px; border-radius: 16px; text-align: center; cursor: pointer; color: var(--text2); font-weight: 600; border: 2px dashed rgba(14, 165, 233, .4); background: rgba(var(--tint), .45); transition: .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(14, 165, 233, .08); color: var(--accent-ink); }

/* ---------- gallery & lightbox ---------- */
.gal-wrap { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.gal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gal-item { margin: 0; border-radius: 16px; overflow: hidden; background: rgba(var(--tint), .7); border: 1px solid var(--glass-border); box-shadow: var(--shadow); position: relative; transition: .15s; }
.gal-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.gal-item.is-cover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, .25), var(--shadow); }
.gal-img { aspect-ratio: 4 / 3; background: #cfe0ee center/cover; cursor: zoom-in; }
.cover-tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--brand); box-shadow: 0 4px 10px rgba(14, 165, 233, .5); }
.gal-item figcaption { padding: 10px 12px; }
.gal-item .cap { font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.gal-item .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gal-item .acts { display: flex; gap: 4px; margin-top: 6px; align-items: center; }
.gal-item .acts .danger { margin-left: auto; }
.uploader { padding: 14px; border-radius: 16px; background: rgba(var(--tint), .7); border: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 10px; }
.up-h { display: flex; align-items: center; gap: 10px; }
.up-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.up-row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(var(--tint), .7); border: 1px solid var(--line); }
.up-thumb { width: 64px; height: 48px; border-radius: 8px; background: #ddd center/cover; flex: none; }
.up-row .input { margin-top: 4px; width: 100%; }
.mini-gal { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-gal .mg { width: 64px; height: 64px; border-radius: 12px; border: 2px solid #fff; background: #cfe0ee center/cover; cursor: zoom-in; box-shadow: 0 3px 8px rgba(15, 42, 68, .18); padding: 0; position: relative; overflow: hidden; }
.mini-gal .mg.lg { width: 150px; height: 104px; }
.mini-gal .mg span { position: absolute; inset: auto 0 0 0; padding: 14px 6px 4px; font-size: 10px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(8, 22, 38, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .15s; }
.lb-stage { position: absolute; inset: 0 0 86px 0; display: grid; place-items: center; overflow: hidden; cursor: grab; touch-action: none; }
.lb-stage:active { cursor: grabbing; }
.lb-stage img { max-width: 92%; max-height: 92%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); transition: transform .12s; user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(var(--tint), .2); color: #fff; font-size: 30px; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lb-nav:hover { background: rgba(var(--tint), .35); }
.lb-nav.prev { left: 20px; } .lb-nav.next { right: 20px; }
.lb-bar { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 18px; flex-wrap: wrap; }
.lb-meta { flex: 1; min-width: 220px; }
.lb-meta b { font-size: 14px; }
.lb-tools .icon-btn { width: 34px; height: 34px; }

/* ---------- Modul 3: site studio ---------- */
.site-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; }
.site-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 20px; flex-wrap: wrap; }
.site-head h1 { font-size: 20px; line-height: 1.25; }
.head-thumb { width: 58px; height: 58px; border-radius: 15px; background: #cfe0ee center/cover; flex: none; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(15, 42, 68, .2); }
.head-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11px; }
.studio-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(var(--tint), .35); border: 1px solid var(--glass-border); overflow-x: auto; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.studio-tabs a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 13px; font-weight: 600; color: var(--text2); white-space: nowrap; transition: .15s; }
.studio-tabs a b { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; background: rgba(15, 42, 68, .07); color: var(--muted); }
.studio-tabs a:hover { background: rgba(var(--tint), .6); color: var(--text); }
.studio-tabs a.on { background: var(--gloss), rgba(var(--tint-hi), .9); color: var(--text); box-shadow: 0 4px 14px -4px rgba(15, 42, 68, .25); }
.studio-tabs a.on b { background: var(--brand); color: #fff; }
.site-body { flex: 1; min-height: 0; position: relative; border-radius: 20px; overflow: hidden; }
.site-body > .pane { position: absolute; inset: 0; overflow: auto; }
.lc-row { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.rule-box { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(var(--tint), .55); border: 1px solid var(--line); font-size: 12px; color: var(--text2); }
.rule-box span { display: inline-flex; align-items: center; gap: 6px; }
.rule-box .dot { width: 9px; height: 9px; }
.wtl { position: relative; height: 10px; margin-top: 7px; background: rgba(15, 42, 68, .07); border-radius: 999px; overflow: hidden; }
.wtl-y { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #f6c64a 0 6px, #f9d677 6px 12px); }
.wtl-r { position: absolute; top: 0; bottom: 0; background: var(--red); }
.wtl-now { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.person:last-of-type { border-bottom: 0; }
.person .av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--head); color: #fff; background: linear-gradient(135deg, #38bdf8, #2563eb); }
.person .av.v { background: linear-gradient(135deg, #a78bfa, #6250d6); }
.person .av.s { background: linear-gradient(135deg, #5eead4, #0d9488); }
.person .muted { font-size: 11.5px; }
.print-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.print-out > div { padding: 10px 12px; border-radius: 12px; background: rgba(var(--tint), .6); border: 1px solid var(--line); }
.print-out .k { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.print-out b { font: 800 15px var(--head); }
.print-out .warn { grid-column: 1 / -1; color: #8a5a00; background: #fff4d6; border-color: #f6dc95; font-weight: 600; }

/* 2D GIS studio */
.split { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); }
.split .stage { position: relative; min-width: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.split .side { overflow: auto; border-radius: 20px; background: var(--gloss), var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.split .side .tabs { position: sticky; top: 0; z-index: 2; background: rgba(var(--tint), .94); }
.tool-dock { position: absolute; left: 12px; top: 12px; z-index: 600; display: flex; flex-direction: column; gap: 4px; padding: 7px; width: 96px; border-radius: 18px; background: var(--gloss), var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.tool-dock button { background: transparent; border: 1px solid transparent; color: var(--text2); padding: 6px 2px; border-radius: 12px; cursor: pointer; font: 600 10.5px var(--font); display: flex; flex-direction: column; align-items: center; gap: 1px; transition: .12s; }
.tool-dock button .i { font-size: 17px; line-height: 1.1; }
.tool-dock button:hover { background: rgba(var(--tint), .8); color: var(--text); }
.tool-dock button.on { background: var(--gloss), linear-gradient(135deg, rgba(34, 211, 238, .3), rgba(37, 99, 235, .22)); border-color: #fff; color: var(--text); box-shadow: 0 4px 12px -4px rgba(14, 165, 233, .5); }
.tool-dock .sep { height: 1px; background: var(--line2); margin: 3px 6px; }
.overlay-bar { position: absolute; z-index: 600; display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 14px; font-size: 12px; background: var(--gloss), var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.ob-k { font: 700 10.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.side-sec h4 { font: 700 12px var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }

/* charts */
.chart-box { position: relative; height: 250px; }
.chart-box.sm { height: 190px; }
.chart-box.lg { height: 320px; }

/* 3D label (projected) */
.hud-label { position: absolute; padding: 4px 10px; background: rgba(var(--tint), .9); border: 1px solid rgba(255, 255, 255, .95); border-left: 3px solid var(--lc, var(--accent)); color: var(--text); font: 700 11.5px var(--font); pointer-events: none; white-space: nowrap; transform: translate(-50%, -130%); border-radius: 9px; box-shadow: 0 4px 12px rgba(15, 42, 68, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.viewer-canvas { position: absolute; inset: 0; }
.viewer-canvas canvas { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1400px) {
  .lc-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lc-row .hero { grid-column: span 3; }
  .clock { display: none; }
}
@media (max-width: 1200px) {
  .dash { grid-template-columns: minmax(0, 1fr) 300px; }
  .kpi-row, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cov { grid-template-columns: 340px minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr) 300px; }
  .brand-tag, .brand-sep, .brand-sub { display: none; }
}
@media (max-width: 900px) {
  :root { --side: 64px; --gap: 10px; }
  .sidebar a span:not(.ico), .sidebar-foot, .nav-label { display: none; }
  .sidebar a { justify-content: center; padding: 10px 6px; }
  .global-search input, .global-search input:focus { width: 150px; }
  .asof span { display: none; }
  #app { overflow: auto; }
  .dash, .cov, .split, .site-wrap { position: static; display: flex; flex-direction: column; }
  .dash-map, .cov-map { min-height: 60vh; flex: none; }
  .split .stage { min-height: 70vh; }
  .site-body { min-height: 75vh; flex: none; }
  .g2, .g3, .steps, .summary-strip, .print-out { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .lc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-row .hero { grid-column: span 2; }
  .map-filter { left: 10px; right: 10px; max-width: none; width: auto; }
}
@media (max-width: 600px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .asof, .global-search, .clock { display: none; }
  .brand-name { font-size: 16px; }
  .kpi-row, .g4, .lc-row, .kv { grid-template-columns: minmax(0, 1fr); }
  .lc-row .hero { grid-column: auto; }
  .qcard { width: 260px; }
  .notif-panel { width: calc(100vw - 32px); }
  :root { --side: 230px; }
  .sidebar { transform: translateX(calc(-100% - 24px)); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar a span:not(.ico), .sidebar-foot, .nav-label { display: revert; }
  .sidebar a { justify-content: flex-start; padding: 10px 12px; }
  #app { left: var(--gap); }
  .site-head .grow { flex-basis: calc(100% - 80px); }
  .head-meta { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .site-head h1 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- dynamic glow behind cards ----------
   Orbs live in ::before (isolated stacking context: under the content, above the card glass). Colour comes
   from --orb so each theme / position can retint it. Map surfaces (dashboard map, portfolio map, 2D stage,
   popups, legends, map filter) are deliberately excluded. */
.panel, .stat, .kpi, .dash-side, .cov-list, .site-head, .site-card-sm, .steps li, .gal-item, .modal {
  position: relative; isolation: isolate; overflow: hidden;
}
.sidebar { isolation: isolate; }
.sidebar > *, .dash-side > *, .cov-list > * { position: relative; }
.panel, .stat, .kpi, .site-card-sm, .gal-item, .steps li { --orb: var(--glow-a); }
.panel:nth-child(3n+2), .stat:nth-child(3n+2), .kpi:nth-child(3n+2), .site-card-sm:nth-child(3n+2), .gal-item:nth-child(3n+2), .steps li:nth-child(3n+2) { --orb: var(--glow-b); --orb-t: 19s; --orb-d: -6s; }
.panel:nth-child(3n), .stat:nth-child(3n), .kpi:nth-child(3n), .site-card-sm:nth-child(3n), .gal-item:nth-child(3n), .steps li:nth-child(3n) { --orb: var(--glow-c); --orb-t: 22s; --orb-d: -11s; }
.kpi-red { --orb: rgba(208, 59, 59, .26); }
.kpi-yellow { --orb: rgba(226, 170, 40, .3); }
.panel::before, .stat::before, .kpi::before, .dash-side::before, .cov-list::before, .site-head::before, .sidebar::before, .site-card-sm::before, .steps li::before, .gal-item::before, .modal::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 70%; aspect-ratio: 1; left: -18%; top: -45%; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--orb, var(--glow-a)) 0%, transparent 62%);
  filter: blur(18px); opacity: var(--orb-opacity);
  animation: orbDrift var(--orb-t, 16s) ease-in-out var(--orb-d, 0s) infinite alternate;
}
.dash-side::before, .cov-list::before, .sidebar::before { width: 140%; left: -40%; top: -20%; --orb-t: 24s; background: radial-gradient(circle at 35% 35%, var(--glow-a) 0%, transparent 45%), radial-gradient(circle at 70% 75%, var(--glow-b) 0%, transparent 45%); }
.site-card-sm::before, .gal-item::before { width: 90%; opacity: calc(var(--orb-opacity) * .7); }
@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(55%, 40%) scale(1.15); }
  100% { transform: translate(110%, 10%) scale(.95); }
}
.leaflet-container .panel::before, .dash-map::before, .cov-map::before { display: none; }

/* ---------- iridescent cards (iOS-like liquid glass) ----------
   A slowly rotating conic rim (masked to a hairline) + a pastel sheen layer. Default & Dark: a few hero
   cards only. AeroGlass: every card. */
.kpi, .stat.hero, .site-head, .success-card, .steps li.on, .lb-bar,
:root[data-theme="aero"] :is(.panel, .stat, .site-card-sm, .gal-item, .dash-side, .cov-list, .sidebar, .steps li, .studio-tabs, .filter-bar, .modal) {
  background-image: var(--iri-sheen), var(--gloss);
}
.kpi::after, .stat.hero::after, .site-head::after, .success-card::after, .steps li.on::after,
:root[data-theme="aero"] :is(.panel, .stat, .site-card-sm, .gal-item, .dash-side, .cov-list, .sidebar, .steps li, .modal)::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  padding: var(--iri-width); background: var(--iri); opacity: var(--iri-opacity);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: iriSpin 12s linear infinite;
}
@keyframes iriSpin { to { --iri-ang: 360deg; } }
.stat.hero { background: var(--iri-sheen), var(--gloss), var(--hero-paint), var(--glass); }

/* ---------- AeroGlass extras: several orbs per card, classic glossy reflection ---------- */
:root[data-theme="aero"] :is(.panel, .stat, .kpi, .site-card-sm, .gal-item, .steps li)::before {
  width: 150%; left: -25%; top: -60%;
  background: radial-gradient(circle at 25% 35%, var(--orb) 0%, transparent 28%), radial-gradient(circle at 70% 60%, var(--glow-b) 0%, transparent 26%), radial-gradient(circle at 45% 85%, var(--glow-c) 0%, transparent 24%);
  filter: blur(14px);
  animation-name: orbSwirl;
}
@keyframes orbSwirl {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-12%, 18%) rotate(25deg); }
  100% { transform: translate(10%, 30%) rotate(-15deg); }
}
:root[data-theme="aero"] .btn:not(.primary):not(.ghost) { background: linear-gradient(180deg, rgba(255, 255, 255, .85) 0%, rgba(232, 247, 255, .75) 48%, rgba(190, 230, 250, .7) 52%, rgba(214, 240, 253, .8) 100%); border-color: rgba(70, 140, 190, .45); }
:root[data-theme="aero"] .btn.primary { background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .15) 48%, rgba(255, 255, 255, 0) 52%), var(--brand); }
:root[data-theme="aero"] .topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 24px -12px rgba(6, 50, 90, .5); }

/* ---------- Dark theme overrides for fixed light colours ---------- */
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-red, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-critical, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-Halted { color: #ffb4b4; background: rgba(240, 100, 100, .16); border-color: rgba(240, 100, 100, .35); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-yellow, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-NeedAttention, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-medium { color: #fcd889; background: rgba(245, 184, 61, .14); border-color: rgba(245, 184, 61, .35); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-high { color: #fdc29e; background: rgba(236, 131, 90, .16); border-color: rgba(236, 131, 90, .35); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-blue { color: #a9cdfb; background: rgba(91, 156, 240, .16); border-color: rgba(91, 156, 240, .35); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-green, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-low, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .b-Successful { color: #9ee8b4; background: rgba(60, 207, 106, .14); border-color: rgba(60, 207, 106, .32); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .change-pos { color: #6ee59a; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .change-neg { color: #ff9393; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .kpi-red .v { color: #ff9393; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .kpi-yellow .v, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .date-chip { color: #fcd889; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .date-chip, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .print-out .warn, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .asof.sim { background: rgba(245, 184, 61, .14); border-color: rgba(245, 184, 61, .35); color: #fcd889; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .note.red { background: rgba(240, 100, 100, .1); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .note.yellow { background: rgba(245, 184, 61, .1); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .area-out b { color: var(--hero-ink); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .toast.err { color: #ffb4b4; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .btn.danger:hover { background: rgba(240, 100, 100, .14); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .steps li.done b { background: rgba(60, 207, 106, .16); border-color: rgba(60, 207, 106, .35); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .leaflet-container { background: #0d1626; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .leaflet-bar a, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .leaflet-control-layers { color: var(--text) !important; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .leaflet-control-attribution { background: rgba(10, 18, 31, .7) !important; color: var(--muted); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .leaflet-control-attribution a { color: var(--accent-ink); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .modal-back { background: rgba(3, 7, 14, .6); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .input::placeholder, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) input::placeholder, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) textarea::placeholder { color: var(--dim); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .global-search input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238d9db5' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .brand-name b { background: linear-gradient(135deg, #7dd3fc, #a5b4fc); -webkit-background-clip: text; background-clip: text; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .16); }

/* overlays sitting on satellite imagery need a denser glass for legibility (static, no glow / iridescence) */
.map-filter, .map-legend, .map-sel, .leaflet-popup-content-wrapper { background: var(--gloss), rgba(var(--tint-hi), .9); }
.map-filter .muted, .map-legend b { color: var(--text2); }

/* ---------- theme switcher ---------- */
.theme-menu { position: relative; }
.theme-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(var(--tint), .7); cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text2); }
.theme-btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.theme-btn .sw3 { width: 18px; height: 18px; border-radius: 50%; background: var(--iri); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); animation: iriSpin 8s linear infinite; }
.theme-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; padding: 8px; border-radius: 18px; z-index: 1200; display: none; background: var(--gloss), var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); }
.theme-menu.open .theme-pop { display: block; }
.theme-pop .tp-h { font: 700 10.5px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 6px 10px 4px; }
.theme-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 13px; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; color: var(--text); }
.theme-opt:hover { background: rgba(var(--tint), .6); }
.theme-opt.on { border-color: var(--accent); background: rgba(var(--tint-hi), .7); }
.theme-opt .pv { width: 52px; height: 36px; flex: none; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 3px 8px rgba(0, 0, 0, .15); position: relative; overflow: hidden; }
.theme-opt .pv i { position: absolute; left: 7px; right: 7px; top: 8px; height: 12px; border-radius: 4px; }
.pv-default { background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, .5), transparent 50%), radial-gradient(circle at 85% 85%, rgba(234, 200, 120, .6), transparent 50%), #f6f5f2; }
.pv-default i { background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px #f6dca0; }
.pv-aero { background: radial-gradient(circle at 20% 30%, rgba(110, 255, 214, .8), transparent 55%), linear-gradient(180deg, #3a9ad9, #c3e9fa); }
.pv-aero i { background: linear-gradient(180deg, rgba(255, 255, 255, .8) 0 48%, rgba(220, 242, 255, .5) 52%); box-shadow: 0 0 0 1px #7ee8fa; }
.pv-dark { background: radial-gradient(circle at 25% 20%, rgba(56, 189, 248, .45), transparent 55%), linear-gradient(160deg, #060a12, #0b1424); }
.pv-dark i { background: rgba(30, 41, 59, .85); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.theme-opt b { display: block; font-size: 13px; }
.theme-opt small { color: var(--muted); font-size: 11px; line-height: 1.3; display: block; }
@media (max-width: 600px) { .theme-btn span.lbl { display: none; } .theme-btn { padding: 0 9px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
:root[data-theme="aero"] .brand-name b { background: linear-gradient(135deg, #035e94, #0b3d91); -webkit-background-clip: text; background-clip: text; text-shadow: none; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .area-out, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .head-thumb, :root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .mini-gal .mg { border-color: var(--glass-border); }

/* =====================================================================
   THEME: FIELD OPS
   Neon tactical HUD adapted from hemdall-vanguard: chamfered frames, rotating border light,
   KPI light sweeps, header streaks, sidebar beams, drifting grid, node-network backdrop (fx.js),
   and every Leaflet basemap rendered as if on a CRT monitor (tint, scanlines, RGB mask,
   vignette, rolling refresh bar, flicker, corner brackets).
   ===================================================================== */
:root[data-theme="fieldops"] {
  color-scheme: dark;
  --text: #dff6ff;
  --text2: #b6d9ee;
  --muted: #7fa6c9;
  --dim: #46668a;
  --line: rgba(25, 227, 255, .16);
  --line2: rgba(25, 227, 255, .34);
  --accent: #19e3ff;
  --accent2: #3d7bff;
  --accent-ink: #5ff0ff;
  --gold: #ffc233;
  --route: #19e3ff;
  --brand: linear-gradient(135deg, #8ff3ff 0%, #19e3ff 45%, #3d7bff 100%);
  --red: #ff4d5e;
  --yellow: #ffc233;
  --green: #2bd47d;
  --blue: #3b9cff;
  --tint: 6, 26, 54;
  --tint-hi: 10, 42, 82;
  --glass: rgba(6, 26, 54, .84);
  --glass-strong: rgba(5, 22, 48, .96);
  --glass-soft: rgba(6, 26, 54, .6);
  --glass-border: rgba(25, 227, 255, .34);
  --gloss: linear-gradient(180deg, rgba(25, 227, 255, .07) 0%, transparent 40%);
  --topbar-bg: rgba(4, 16, 38, .96);
  --bg-paint: radial-gradient(120% 90% at 50% 0%, #061a3c 0%, #030b1d 55%, #01050e 100%);
  --hero-paint: radial-gradient(140% 90% at 0% 0%, rgba(25, 227, 255, .14), transparent 55%);
  --hero-ink: #9ff4ff;
  --glow-a: rgba(25, 227, 255, .2);
  --glow-b: rgba(61, 123, 255, .22);
  --glow-c: rgba(138, 91, 255, .18);
  --orb-opacity: 1;
  --iri: conic-gradient(from var(--iri-ang), transparent 0 62%, rgba(25, 227, 255, .25) 72%, #9ff4ff 80%, rgba(61, 123, 255, .55) 86%, transparent 94%);
  --iri-sheen: linear-gradient(transparent, transparent);
  --iri-width: 1.5px;
  --iri-opacity: 1;
  --shadow: inset 0 0 22px rgba(25, 227, 255, .06);
  --shadow-lg: 0 20px 50px -10px rgba(0, 10, 40, .85);
  --blur: blur(6px) saturate(120%);
  --chart-grid: rgba(25, 227, 255, .1);
  --chart-surface: #061a36;
  --head: 'Rajdhani', 'Inter', sans-serif;
  --disp: 'Orbitron', 'Rajdhani', sans-serif;
  --grid: repeating-linear-gradient(0deg, rgba(25, 227, 255, .045) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(25, 227, 255, .045) 0 1px, transparent 1px 24px);
  --chamfer: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  --chamfer-sm: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  --hud-deco:
    linear-gradient(var(--accent), var(--accent)) right 30px top 0 / 70px 3px no-repeat border-box,
    linear-gradient(var(--accent), var(--accent)) left 0 top 30px / 3px 26px no-repeat border-box,
    linear-gradient(var(--accent2), var(--accent2)) left 34px bottom 0 / 44px 2px no-repeat border-box,
    repeating-linear-gradient(115deg, rgba(25, 227, 255, .8) 0 2px, transparent 2px 6px) right 26px bottom 5px / 42px 5px no-repeat border-box,
    repeating-linear-gradient(0deg, rgba(25, 227, 255, .8) 0 2px, transparent 2px 5px) right 4px top 40px / 3px 22px no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line2) calc(50% - 1px) calc(50% + 1.3px), transparent calc(50% + 1.3px)) 0 0 / 14px 14px no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line2) calc(50% - 1px) calc(50% + 1.3px), transparent calc(50% + 1.3px)) 100% 100% / 14px 14px no-repeat border-box;
}
@keyframes foGrid { to { background-position: 0 48px, 48px 0; } }
@keyframes foStreak { from { transform: translateX(-100%); } to { transform: translateX(560%); } }
@keyframes foSweep { 0%, 55% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
@keyframes foBeamY { from { transform: translateY(-140px); } to { transform: translateY(100vh); } }
@keyframes foBlink { 50% { opacity: .35; } }
@keyframes foThumbScan { from { transform: translateY(-40px); } to { transform: translateY(240px); } }
@keyframes crtRoll { from { transform: translateY(-100%); } to { transform: translateY(560%); } }
@keyframes crtFlicker { 0%, 91%, 94%, 96%, 100% { opacity: 1; } 92% { opacity: .86; } 95% { opacity: .93; } }

/* backdrop grid drifting under everything */
:root[data-theme="fieldops"] body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--grid); background-size: 48px 48px; opacity: .85; animation: foGrid 18s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 95%); mask-image: radial-gradient(ellipse at center, #000 40%, transparent 95%); }
:root[data-theme="fieldops"] h1, :root[data-theme="fieldops"] h2 { font-family: var(--disp); letter-spacing: .08em; text-transform: uppercase; color: #eafcff; text-shadow: 0 0 12px rgba(25, 227, 255, .55); }
:root[data-theme="fieldops"] .page-head h1 { font-size: 22px; }
:root[data-theme="fieldops"] h3, :root[data-theme="fieldops"] h4 { letter-spacing: .08em; }
:root[data-theme="fieldops"] .num, :root[data-theme="fieldops"] .clock { font-family: var(--mono); }

/* ---- HUD frames: chamfered corners, neon tabs, hatch marks, faint grid ---- */
:root[data-theme="fieldops"] :is(.panel, .stat, .kpi, .modal, .site-card-sm, .site-head, .dash-side, .cov-list, .gal-item, .steps li, .filter-bar, .studio-tabs, .notif-panel, .search-results, .theme-pop, .map-sel, .uploader, .split .side, .split .stage, .dash-map, .cov-map, .pick-map, .site-body, .map-filter, .map-legend, .tool-dock, .overlay-bar, .note, .kv > div, .summary-strip > div, .print-out > div, .list-item, .toast, .lb-bar, .leaflet-popup-content-wrapper) { border-radius: 0; clip-path: var(--chamfer-sm); }
:root[data-theme="fieldops"] :is(.panel, .modal, .site-head, .dash-side, .cov-list, .dash-map, .cov-map, .split .stage, .site-body, .sidebar) { clip-path: var(--chamfer); }
:root[data-theme="fieldops"] :is(.panel, .modal, .site-head, .dash-side, .cov-list) {
  background: var(--hud-deco), var(--hero-paint), var(--grid), var(--glass);
  border: 1px solid var(--line2); box-shadow: inset 0 0 22px rgba(25, 227, 255, .06);
}
/* rotating light running around featured frames (reuses the iridescent rim slot) */
:root[data-theme="fieldops"] :is(.panel, .modal, .site-head, .kpi, .stat.hero)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; border-radius: 0;
  padding: 1.5px; background: var(--iri); opacity: 1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: iriSpin 6s linear infinite;
}
:root[data-theme="fieldops"] .panel:nth-child(2n)::after { animation-duration: 8s; animation-direction: reverse; }
:root[data-theme="fieldops"] .panel::before { opacity: .7; }

/* ---- KPI / stat tiles: light sweep across each tile, staggered ---- */
:root[data-theme="fieldops"] :is(.stat, .kpi) {
  background: linear-gradient(var(--accent), var(--accent)) left 12px top 0 / 34px 3px no-repeat border-box,
    repeating-linear-gradient(115deg, rgba(25, 227, 255, .7) 0 2px, transparent 2px 6px) right 14px bottom 5px / 30px 4px no-repeat border-box,
    var(--hero-paint), var(--grid), var(--glass);
  border: 1px solid var(--line2); box-shadow: inset 0 0 22px rgba(25, 227, 255, .06);
}
:root[data-theme="fieldops"] :is(.stat, .kpi)::before {
  left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; filter: none; opacity: 1;
  background: linear-gradient(105deg, transparent 30%, rgba(120, 240, 255, .2) 48%, rgba(25, 227, 255, .06) 55%, transparent 70%);
  animation: foSweep 6s ease-in-out var(--orb-d, 0s) infinite;
}
:root[data-theme="fieldops"] :is(.stat, .kpi):nth-child(4n+2)::before { animation-delay: .9s; }
:root[data-theme="fieldops"] :is(.stat, .kpi):nth-child(4n+3)::before { animation-delay: 1.8s; }
:root[data-theme="fieldops"] :is(.stat, .kpi):nth-child(4n)::before { animation-delay: 2.7s; }
:root[data-theme="fieldops"] :is(.stat, .kpi) .k { font: 600 11.5px var(--head); letter-spacing: .14em; text-transform: uppercase; }
:root[data-theme="fieldops"] :is(.stat, .kpi) .v { font: 600 24px var(--mono); color: #eafcff; text-shadow: 0 0 10px rgba(25, 227, 255, .45); letter-spacing: 0; }
:root[data-theme="fieldops"] .kpi-red .v { color: #ff8a96; text-shadow: 0 0 10px rgba(255, 77, 94, .5); }
:root[data-theme="fieldops"] .kpi-yellow .v { color: #ffd76b; text-shadow: 0 0 10px rgba(255, 194, 51, .5); }
:root[data-theme="fieldops"] .kpi-ico { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); box-shadow: 0 0 16px currentColor; }
:root[data-theme="fieldops"] .stat.hero .v { color: #9ff4ff; }

/* ---- panel headers: neon chevron + running streak ---- */
:root[data-theme="fieldops"] .panel-h { position: relative; }
:root[data-theme="fieldops"] .panel-h::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 35%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: foStreak 5s linear infinite; pointer-events: none; }
:root[data-theme="fieldops"] .panel-h h3 { font: 700 14px var(--head); text-transform: uppercase; letter-spacing: .14em; color: #e9fbff; display: flex; align-items: center; gap: 8px; text-shadow: 0 0 8px rgba(25, 227, 255, .45); }
:root[data-theme="fieldops"] .panel-h h3::before { content: ''; width: 8px; height: 12px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; filter: drop-shadow(0 0 4px var(--accent)); }
:root[data-theme="fieldops"] .sec-t, :root[data-theme="fieldops"] .nav-label, :root[data-theme="fieldops"] .tbl th, :root[data-theme="fieldops"] .kv .k, :root[data-theme="fieldops"] .field > span, :root[data-theme="fieldops"] .ob-k, :root[data-theme="fieldops"] .side-sec h4, :root[data-theme="fieldops"] .prov-h { font-family: var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
:root[data-theme="fieldops"] .sec-h { font-family: var(--disp); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
:root[data-theme="fieldops"] .sec-h::after { background: linear-gradient(90deg, var(--accent), transparent); box-shadow: 0 0 6px var(--accent); }

/* ---- top bar ---- */
:root[data-theme="fieldops"] .topbar { background: linear-gradient(180deg, rgba(8, 32, 68, .97), rgba(3, 14, 34, .96)), var(--grid); border-bottom: 1px solid var(--line2); box-shadow: 0 6px 24px rgba(0, 20, 60, .6), inset 0 -1px 0 rgba(25, 227, 255, .25); }
:root[data-theme="fieldops"] .topbar::before { content: ''; position: absolute; left: 50%; bottom: -1px; width: 420px; max-width: 34vw; height: 4px; transform: translateX(-50%); background: var(--accent); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 6px 100%); box-shadow: 0 0 14px var(--accent); }
:root[data-theme="fieldops"] .topbar::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 22%; background: linear-gradient(90deg, transparent, #b8f8ff, transparent); animation: foStreak 4.5s linear infinite; pointer-events: none; }
:root[data-theme="fieldops"] .brand img { filter: drop-shadow(0 0 6px var(--accent)) hue-rotate(-10deg); }
:root[data-theme="fieldops"] .brand-name { font: 800 16px var(--disp); letter-spacing: .12em; text-transform: uppercase; color: #e9fbff; text-shadow: 0 0 10px rgba(25, 227, 255, .7), 0 0 22px rgba(61, 123, 255, .5); }
:root[data-theme="fieldops"] .brand-name b { background: none; color: var(--accent); -webkit-text-fill-color: currentColor; }
:root[data-theme="fieldops"] .brand-tag { font-family: var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
:root[data-theme="fieldops"] .brand-sep { width: 14px; height: 22px; background: repeating-linear-gradient(115deg, var(--accent) 0 2px, transparent 2px 5px); opacity: .8; }
:root[data-theme="fieldops"] .brand-sub { font: 600 14px var(--head); letter-spacing: .16em; color: var(--accent); text-transform: uppercase; padding: 3px 14px; background: rgba(25, 227, 255, .1); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
:root[data-theme="fieldops"] .clock { font-size: 17px; color: #e9fbff; text-shadow: 0 0 10px rgba(25, 227, 255, .45); }
:root[data-theme="fieldops"] .clock small { color: var(--accent); }
:root[data-theme="fieldops"] :is(.asof, .global-search input, .theme-btn, .icon-btn) { border-radius: 0; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); background-color: rgba(2, 12, 30, .9); border-color: var(--line2); }
:root[data-theme="fieldops"] .icon-btn { clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); color: var(--accent); }
:root[data-theme="fieldops"] .icon-btn:hover { background: rgba(25, 227, 255, .14); box-shadow: inset 0 0 10px rgba(25, 227, 255, .3); }
:root[data-theme="fieldops"] .avatar { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: radial-gradient(circle, rgba(25, 227, 255, .25), rgba(4, 18, 42, .9) 70%); color: var(--accent); font-family: var(--disp); box-shadow: inset 0 0 0 1px var(--accent); }
:root[data-theme="fieldops"] .bell b { border-radius: 0; border: 0; animation: foBlink 1.6s ease-in-out infinite; }

/* ---- sidebar: vertical beam + orbiting glow ---- */
:root[data-theme="fieldops"] .sidebar { border-radius: 0; background: linear-gradient(180deg, rgba(5, 22, 50, .95), rgba(2, 9, 24, .96)), var(--grid); border: 1px solid var(--line2); box-shadow: 6px 0 24px rgba(0, 10, 40, .5); }
:root[data-theme="fieldops"] :is(.sidebar, .dash-side, .cov-list)::after {
  content: ''; position: absolute; top: 0; width: 2px; height: 140px; inset: 0 0 auto auto; padding: 0; opacity: 1; border-radius: 0; z-index: 1;
  -webkit-mask: none; mask: none; background: linear-gradient(180deg, transparent, var(--accent), transparent); box-shadow: 0 0 10px var(--accent);
  animation: foBeamY 5s linear infinite; pointer-events: none;
}
:root[data-theme="fieldops"] :is(.dash-side, .cov-list)::after { inset: 0 auto auto 0; animation-duration: 6s; }
:root[data-theme="fieldops"] .sidebar a { border-radius: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); font: 600 14px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--text2); }
:root[data-theme="fieldops"] .sidebar a .ico { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: rgba(25, 227, 255, .08); border: 0; color: var(--accent); }
:root[data-theme="fieldops"] .sidebar a:hover { background: linear-gradient(90deg, rgba(25, 227, 255, .16), transparent); color: #e9fbff; }
:root[data-theme="fieldops"] .sidebar a.active { background: linear-gradient(90deg, rgba(25, 227, 255, .3), rgba(25, 227, 255, .04)); color: #fff; border-color: transparent; box-shadow: inset 3px 0 0 var(--accent); text-shadow: 0 0 8px var(--accent); }
:root[data-theme="fieldops"] .sidebar a.active .ico { background: var(--accent); color: #021428; box-shadow: 0 0 12px var(--accent); }

/* ---- controls ---- */
:root[data-theme="fieldops"] .btn { border-radius: 0; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); background: rgba(25, 227, 255, .07); border: 1px solid var(--line2); color: var(--text); font: 700 12.5px var(--head); letter-spacing: .08em; text-transform: uppercase; box-shadow: none; }
:root[data-theme="fieldops"] .btn:hover { background: rgba(25, 227, 255, .18); border-color: var(--accent); color: #fff; box-shadow: inset 0 0 12px rgba(25, 227, 255, .3); }
:root[data-theme="fieldops"] .btn.primary { color: #021428; background: linear-gradient(180deg, #8ff3ff, var(--accent)); border-color: var(--accent); text-shadow: none; box-shadow: 0 0 14px rgba(25, 227, 255, .45); }
:root[data-theme="fieldops"] .btn.ghost { background: transparent; border-color: transparent; }
:root[data-theme="fieldops"] .seg, :root[data-theme="fieldops"] .seg button { border-radius: 0; }
:root[data-theme="fieldops"] .seg button { font-family: var(--head); letter-spacing: .06em; text-transform: uppercase; }
:root[data-theme="fieldops"] .seg button.on { background: linear-gradient(180deg, #8ff3ff, var(--accent)); color: #021428; box-shadow: 0 0 10px rgba(25, 227, 255, .4); }
:root[data-theme="fieldops"] :is(.input, .field input, .field select, .field textarea, .tbl input, .tbl select) { border-radius: 0; background: rgba(2, 12, 30, .9); border-color: var(--line2); }
:root[data-theme="fieldops"] :is(.input, .field input, .field select, .field textarea):focus { border-color: var(--accent); box-shadow: inset 0 0 12px rgba(25, 227, 255, .2); }
:root[data-theme="fieldops"] .badge, :root[data-theme="fieldops"] .chip { border-radius: 2px; font-family: var(--head); letter-spacing: .06em; text-transform: uppercase; }
:root[data-theme="fieldops"] .bar { border-radius: 0; background: rgba(25, 227, 255, .08); }
:root[data-theme="fieldops"] .bar > i { border-radius: 0; background: linear-gradient(90deg, var(--accent2), var(--accent)); box-shadow: 0 0 8px var(--accent); }
:root[data-theme="fieldops"] .studio-tabs a, :root[data-theme="fieldops"] .tabs a, :root[data-theme="fieldops"] .tabs button { border-radius: 0; font-family: var(--head); letter-spacing: .08em; text-transform: uppercase; }
:root[data-theme="fieldops"] .studio-tabs a.on { background: linear-gradient(180deg, rgba(25, 227, 255, .25), rgba(25, 227, 255, .06)); box-shadow: inset 0 -2px 0 var(--accent); color: #fff; }
:root[data-theme="fieldops"] .studio-tabs a b, :root[data-theme="fieldops"] .steps li b { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
:root[data-theme="fieldops"] .tbl th { background: rgba(4, 18, 42, .96); }
:root[data-theme="fieldops"] .tbl tbody tr:hover td { background: linear-gradient(90deg, rgba(25, 227, 255, .12), transparent); }
:root[data-theme="fieldops"] .list-item:hover, :root[data-theme="fieldops"] .list-item.sel { background: linear-gradient(90deg, rgba(25, 227, 255, .14), transparent); border-color: var(--line2); }
:root[data-theme="fieldops"] .modal-back { background: rgba(1, 5, 14, .72); }

/* loader: spinning HUD ring + scanning bar */
:root[data-theme="fieldops"] .loader { color: var(--accent); font: 600 14px var(--head); letter-spacing: .3em; text-transform: uppercase; text-shadow: 0 0 8px var(--accent); }
:root[data-theme="fieldops"] .loader::before { width: 64px; height: 64px; border: 0; background: conic-gradient(from 0deg, transparent 0 25%, var(--accent) 25% 40%, transparent 40% 65%, var(--accent2) 65% 80%, transparent 80%);
  -webkit-mask: radial-gradient(circle, transparent 0 22px, #000 23px 26px, transparent 27px 28px, #000 29px 31px, transparent 32px); mask: radial-gradient(circle, transparent 0 22px, #000 23px 26px, transparent 27px 28px, #000 29px 31px, transparent 32px);
  filter: drop-shadow(0 0 6px var(--accent)); animation: spin 1.4s linear infinite; }

/* thumbnails: scanlines + running scan bar */
:root[data-theme="fieldops"] :is(.qthumb, .sc-thumb, .head-thumb, .gal-img) { position: relative; overflow: hidden; }
:root[data-theme="fieldops"] :is(.qthumb, .gal-img)::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(25, 227, 255, .08) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(25, 227, 255, .14), transparent 40%); }
:root[data-theme="fieldops"] :is(.qthumb, .gal-img)::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 40px; inset: 0 0 auto 0; background: linear-gradient(180deg, transparent, rgba(160, 245, 255, .45)); border-bottom: 1px solid #b8f8ff; animation: foThumbScan 3.5s linear infinite; pointer-events: none; }

/* map pins, tooltips and markers glow like the legacy HUD */
:root[data-theme="fieldops"] .pin .core { box-shadow: 0 0 12px currentColor, 0 0 24px currentColor; }
:root[data-theme="fieldops"] .pin.sel .core { border-color: var(--accent); }
:root[data-theme="fieldops"] .team-icon { border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); color: #04121a; font-family: var(--head); }
:root[data-theme="fieldops"] .leaflet-tooltip.tac { background: linear-gradient(90deg, rgba(8, 40, 82, .95), rgba(4, 18, 42, .92)); color: #eafcff; border: 0; border-left: 2px solid var(--accent); border-radius: 0; font: 600 12px var(--head); letter-spacing: .06em; box-shadow: 0 0 10px rgba(25, 227, 255, .3); }
:root[data-theme="fieldops"] .leaflet-bar a, :root[data-theme="fieldops"] .leaflet-control-layers { border-radius: 0 !important; background: rgba(4, 18, 42, .92) !important; color: var(--accent) !important; }
:root[data-theme="fieldops"] .leaflet-bar { border-radius: 0 !important; border: 1px solid var(--line2) !important; }

/* =====================  CRT MONITOR BASEMAPS  =====================
   Phosphor tint + flicker on the tile pane; scanlines, RGB aperture mask, curved-glass vignette,
   inner bezel glow and HUD corner brackets on a static layer; a rolling refresh bar on top. */
:root[data-theme="fieldops"] .leaflet-container { background: #020a14; }
:root[data-theme="fieldops"] .leaflet-tile-pane { filter: grayscale(1) sepia(1) hue-rotate(140deg) saturate(2.2) contrast(1.2) brightness(.78); animation: crtFlicker 5s steps(1) infinite; }
:root[data-theme="fieldops"] .leaflet-container::before {
  content: ''; position: absolute; inset: 0; z-index: 450; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) left 14px top 14px / 34px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) left 14px top 14px / 2px 34px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 14px top 14px / 34px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) right 14px top 14px / 2px 34px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 14px bottom 14px / 34px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) left 14px bottom 14px / 2px 34px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 14px bottom 14px / 34px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) right 14px bottom 14px / 2px 34px no-repeat,
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 58%, rgba(0, 10, 20, .45) 86%, rgba(0, 4, 10, .85) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 50, 90, .03) 0 1px, rgba(50, 255, 150, .025) 1px 2px, rgba(50, 130, 255, .03) 2px 3px);
  box-shadow: inset 0 0 70px rgba(25, 227, 255, .16), inset 0 0 0 1px rgba(25, 227, 255, .35);
}
:root[data-theme="fieldops"] .leaflet-container::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18%; z-index: 451; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(160, 245, 255, .05) 70%, rgba(160, 245, 255, .13)); border-bottom: 1px solid rgba(184, 248, 255, .18);
  animation: crtRoll 8s linear infinite;
}
:root[data-theme="fieldops"] .leaflet-popup-pane, :root[data-theme="fieldops"] .leaflet-tooltip-pane { z-index: 700; }

/* theme menu preview */
.pv-fieldops { background: repeating-linear-gradient(0deg, rgba(25, 227, 255, .12) 0 1px, transparent 1px 3px), radial-gradient(circle at 25% 25%, rgba(25, 227, 255, .5), transparent 55%), linear-gradient(160deg, #061a3c, #01050e); }
.pv-fieldops i { background: rgba(6, 26, 54, .9); box-shadow: 0 0 0 1px #19e3ff, 0 0 8px #19e3ff; border-radius: 0 !important; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
:root[data-theme="fieldops"] .theme-opt { border-radius: 0; }
:root[data-theme="fieldops"] .theme-opt.on { box-shadow: inset 3px 0 0 var(--accent); }

@media (prefers-reduced-motion: reduce) { :root[data-theme="fieldops"] *, :root[data-theme="fieldops"] *::before, :root[data-theme="fieldops"] *::after { animation: none !important; } }

/* Leaflet hard-codes popup text to #333: follow the theme ink instead (fixes dark themes) */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { color: var(--text); }
/* Field Ops CRT: light basemaps are shown in negative (glowing linework on a dark screen) before the phosphor tint */
:root[data-theme="fieldops"] .leaflet-container:is([data-base="osm"], [data-base="topo"], [data-base="esriTopo"], [data-base="light"]) .leaflet-tile-pane { filter: invert(.93) grayscale(1) sepia(1) hue-rotate(140deg) saturate(2.4) contrast(1.15) brightness(.95); }

/* compact theme menu (names only) */
.theme-pop { width: 200px; }
.theme-opt b { font-size: 13px; }

/* ---------- login (demo: click a user) ---------- */
body.auth-page .topbar, body.auth-page .sidebar { display: none; }
body.auth-page #app { inset: 0; border-radius: 0; }
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(560px, 100%); border-radius: 26px; padding: 28px; position: relative; isolation: isolate; overflow: hidden; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-brand .brand-name { font-size: 22px; }
.login-card h1 { font-size: 26px; margin-bottom: 4px; }
.login-users { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.login-user { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line2); background: rgba(var(--tint), .55); cursor: pointer; text-align: left; color: var(--text); transition: .15s; }
.login-user:hover, .login-user:focus-visible { border-color: var(--accent); background: rgba(var(--tint-hi), .85); transform: translateY(-1px); box-shadow: var(--shadow); }
.lu-av { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 14px var(--head); background: var(--uc, var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.lu-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lu-txt small { font-size: 12px; color: var(--muted); }
.lu-txt small.dim { color: var(--dim); font-size: 11px; }
.lu-go { color: var(--accent); font-size: 18px; }
.login-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }

/* ---------- user menu ---------- */
.user-menu { position: relative; }
.user-menu .avatar { border: 0; cursor: pointer; }
.user-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; padding: 8px; border-radius: 16px; z-index: 1200; display: none; background: var(--gloss), var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); }
.user-menu.open .user-pop { display: block; }
.up-h { display: flex; gap: 10px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.up-i { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--text); font-size: 13px; }
.up-i:hover { background: rgba(var(--tint), .7); color: var(--accent-ink); }
.up-i.danger { color: var(--red); }

/* ---------- user manual ---------- */
.manual { position: absolute; inset: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); }
.man-toc { border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.man-search { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.man-search .input { width: 100%; }
.man-toc-list { list-style: none; margin: 0; padding: 0 10px 14px; overflow: auto; flex: 1; }
.man-toc-list > li > a { display: flex; gap: 8px; padding: 7px 8px; border-radius: 10px; font-weight: 700; color: var(--text); font-size: 13px; }
.man-toc-list > li > a span { min-width: 20px; color: var(--accent-ink); }
.man-toc-list ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 28px; }
.man-toc-list ul a { display: block; padding: 4px 8px; border-radius: 8px; font-size: 12.5px; color: var(--muted); }
.man-toc-list a:hover, .man-toc-list li.on > a { background: rgba(var(--tint-hi), .8); color: var(--accent-ink); }
.man-doc { overflow: auto; border-radius: 22px; padding: 0 4px 40px; scroll-behavior: smooth; }
.man-cover { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 22px 24px; border-radius: 22px; margin-bottom: 18px; }
.man-cover h1 { font-size: 30px; } .man-cover h1 b { color: var(--accent-ink); }
.man-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.man-dl { display: flex; gap: 8px; flex-wrap: wrap; }
.man-ch { background: var(--gloss), var(--glass); border: 1px solid var(--glass-border); border-radius: 22px; padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--shadow); }
.man-ch-h { border-bottom: 1px solid var(--line2); padding-bottom: 12px; margin-bottom: 8px; }
.man-ch-no { font: 700 12px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.man-ch-h h2 { font-size: 24px; margin: 2px 0 4px; }

/* ---------- license menu & tags ---------- */
.license-menu { position: relative; }
.license-btn { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(var(--tint), .65); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s; }
.license-btn:hover { border-color: var(--accent); background: rgba(var(--tint-hi), .9); }
.license-btn .lic-badge { font-size: 10px; padding: 2px 6px; border-radius: 6px; color: #fff; background: var(--accent); font-weight: 800; letter-spacing: .04em; }
.license-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 8px; border-radius: 16px; z-index: 1200; display: none; background: var(--gloss), var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); }
.license-menu.open .license-pop { display: block; }
.lic-opt { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--text); font-size: 12px; transition: .15s; }
.lic-opt:hover, .lic-opt.on { background: rgba(var(--tint), .8); }
.lic-opt.on { border-left: 3px solid var(--accent); }
.lic-opt-h { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.lic-opt small { font-size: 11px; color: var(--muted); margin-top: 2px; }

.lock-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 5px; margin-left: auto; text-transform: uppercase; letter-spacing: .03em; }
.lock-tag.pro { background: rgba(124, 58, 237, .15); color: #7c3aed; border: 1px solid rgba(124, 58, 237, .3); }
.lock-tag.ultimate { background: rgba(217, 119, 6, .15); color: #d97706; border: 1px solid rgba(217, 119, 6, .3); }

/* Upsell Card in Locked Tab / Component */
.upsell-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 24px; border-radius: 22px; background: var(--gloss), var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow); max-width: 680px; margin: 30px auto; }
.upsell-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; background: rgba(var(--tint-hi), .9); box-shadow: var(--shadow); border: 1px solid var(--line2); }
.upsell-card h2 { font-size: 22px; margin-bottom: 6px; }
.upsell-card p { font-size: 13.5px; color: var(--muted); max-width: 500px; margin-bottom: 20px; line-height: 1.5; }
.upsell-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.man-sec { padding: 14px 0 6px; max-width: 980px; }
.man-sec h3 { font-size: 17px; display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.man-num { font: 700 13px var(--mono); color: var(--accent-ink); }
.man-sec p { font-size: 14px; line-height: 1.65; margin: 6px 0; }
.man-fig { margin: 12px 0; }
.man-img { display: block; width: 100%; padding: 0; border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; cursor: zoom-in; background: none; box-shadow: var(--shadow); }
.man-img img { display: block; width: 100%; height: auto; }
.man-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; font-style: italic; }
.man-steps { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.man-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; }
.man-mk { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 12.5px var(--font); color: #fff; background: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, .18); }
.man-mk.plain { background: var(--accent); box-shadow: none; }
.man-tbl-wrap { overflow: auto; margin: 10px 0; }
.man-tbl td, .man-tbl th { font-size: 13px; }
.man-tip, .man-note { margin: 10px 0; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid var(--line2); background: rgba(var(--tint-hi), .6); }
.man-tip b, .man-note b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; color: var(--accent-ink); }
.man-note b { color: var(--gold, #b8892b); }
mark { background: #fde68a; color: #1b2330; border-radius: 3px; padding: 0 2px; }
@media (max-width: 900px) { .manual { position: static; display: flex; flex-direction: column; } .man-toc { max-height: 40vh; } }
/* print layout for the PDF export */
body.print-manual .topbar, body.print-manual .sidebar, body.print-manual .man-toc, body.print-manual #fxBg, body.print-manual .man-dl { display: none !important; }
body.print-manual #app { position: static; overflow: visible; }
body.print-manual .manual { position: static; display: block; }
body.print-manual .man-doc { overflow: visible; }
@media print { .man-ch { break-before: page; box-shadow: none; } .man-fig, .man-steps li, tr { break-inside: avoid; } }
