/* =====================================================================
   GardaLokapala v1.2 (2026-11-18): loaded after app.css
   1. Bright (default) → Liquid AeroGlass
   2. Hover dynamics for every theme (cards, menus, buttons)
   3. Soft-lock / upsell UI, license pill
   4. Login page: theme · tier · user steps
   5. THEME: Futuristic (cyberpunk HUD)
   ===================================================================== */

/* ---------- 1. BRIGHT (default): liquid aero glass ----------
   refs: ".1. Reff Doc and Design/liquid aero glass reff (1-5).png": thick clear glass with a bright specular rim,
   chromatic (rainbow) refraction at the edges, Win7-style diagonal light streak, glossy pill controls. */
:root:not([data-theme]) {
  --glass: rgba(255, 255, 255, .56);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-border: rgba(255, 255, 255, .95);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .80) 0%, rgba(255, 255, 255, .26) 36%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(115deg, transparent 0 56%, rgba(255, 255, 255, .30) 60%, rgba(255, 255, 255, .06) 66%, transparent 72%);
  --shadow: 0 18px 40px -14px rgba(37, 99, 235, .24), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 30px 70px -20px rgba(37, 99, 235, .32), 0 4px 14px rgba(15, 23, 42, .06);
  --rim: inset 0 1.5px 0 rgba(255, 255, 255, .98), inset 0 -1px 0 rgba(255, 255, 255, .55), inset 1px 0 0 rgba(255, 255, 255, .6), inset -1px 0 0 rgba(255, 255, 255, .6), inset 0 0 22px rgba(255, 255, 255, .38);
  --iri: conic-gradient(from var(--iri-ang), #8fb8ff, #ffd79a, #ff9fc9, #9ff0d6, #b9a6ff, #8fb8ff);
  --iri-opacity: .7;
  --iri-width: 1.6px;
  --hover-glow: rgba(59, 130, 246, .26);
  --hover-glow2: rgba(245, 158, 11, .22);
  --r: 20px;
}
:root:not([data-theme]) :is(.glass, .panel, .sidebar, .modal, .notif-panel, .search-results, .stat, .kpi, .toast, .dash-side, .cov-list, .site-card-sm, .gal-item, .steps li, .login-card, .upsell-card:not(.in-modal)) {
  box-shadow: var(--shadow), var(--rim);
}
/* chromatic refraction rim on every card (previously hero cards only) */
:root:not([data-theme]) :is(.panel, .stat, .site-card-sm, .gal-item, .dash-side, .cov-list, .sidebar, .steps li, .modal, .login-card)::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  padding: var(--iri-width); background: var(--iri); opacity: calc(var(--iri-opacity) * .75);
  -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 14s linear infinite; transition: opacity .3s;
}
:root:not([data-theme]) .topbar { box-shadow: 0 10px 30px -18px rgba(37, 99, 235, .45), inset 0 -1px 0 rgba(255, 255, 255, .9), inset 0 1px 0 #fff; }
/* glossy liquid pills (ref 5) */
:root:not([data-theme]) .btn { border: 1px solid rgba(255, 255, 255, .95); background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .62) 52%, rgba(241, 245, 255, .7) 100%);
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .35), inset 0 1px 1px #fff, inset 0 -2px 5px rgba(148, 163, 184, .2); }
:root:not([data-theme]) .btn.primary { color: #fff; border-color: rgba(147, 197, 253, .9); background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, 0) 51%), linear-gradient(135deg, #60a5fa, #2563eb 60%, #1d4ed8);
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .75), -5px 7px 16px -10px rgba(245, 158, 11, .6), 5px 7px 16px -10px rgba(236, 72, 153, .45), inset 0 1px 1px rgba(255, 255, 255, .8), inset 0 -3px 6px rgba(30, 64, 175, .35); }
:root:not([data-theme]) .btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
:root:not([data-theme]) .btn.danger:hover { background: #fff1f1; }
:root:not([data-theme]) :is(.input, .field input, .field select, .field textarea, .global-search input, .asof) { border-color: rgba(255, 255, 255, .95); box-shadow: inset 0 1px 3px rgba(15, 23, 42, .08), 0 1px 0 rgba(255, 255, 255, .9); }
:root:not([data-theme]) .seg { background: rgba(255, 255, 255, .45); border-color: rgba(255, 255, 255, .95); box-shadow: inset 0 1px 3px rgba(15, 23, 42, .07); }
:root:not([data-theme]) .sidebar a.active { background: var(--gloss), linear-gradient(135deg, rgba(96, 165, 250, .28), rgba(245, 158, 11, .14)); box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .45), var(--rim); }

/* ---------- 2. HOVER DYNAMICS (all themes) ----------
   fx.js startHoverFx() sets --mx/--my (pointer position) and --rx/--ry (tilt) on the hovered element. */
:root { --hover-glow: rgba(14, 165, 233, .24); --hover-glow2: rgba(168, 85, 247, .18); }
:root[data-theme="aero"] { --hover-glow: rgba(255, 255, 255, .55); --hover-glow2: rgba(56, 189, 248, .35); }
:root[data-theme="dark"] { --hover-glow: rgba(52, 211, 153, .22); --hover-glow2: rgba(168, 85, 247, .22); }
:root[data-theme="fieldops"] { --hover-glow: rgba(25, 227, 255, .22); --hover-glow2: rgba(61, 123, 255, .2); }

/* compact cards: lift + pointer tilt */
:is(.kpi, .stat, .site-card-sm, .gal-item, .login-user, .login-theme, .login-tier, .steps li) {
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .25s, background-color .25s;
}
:is(.kpi, .stat, .site-card-sm, .gal-item, .login-user, .login-theme, .login-tier, .steps li):hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--hover-glow);
}
/* glow orb follows the pointer inside panels / cards (the orb lives in ::before, see app.css) */
:is(.panel, .stat, .kpi, .site-card-sm, .gal-item, .steps li, .dash-side, .cov-list).fx-hover::before {
  left: calc(var(--mx, 50%) - 35%); top: calc(var(--my, 50%) - 35%); opacity: 1;
  animation: none; transform: none; transition: left .25s ease-out, top .25s ease-out, opacity .3s;
  background: radial-gradient(circle, var(--hover-glow) 0%, var(--hover-glow2) 30%, transparent 62%);
}
:is(.dash-side, .cov-list).fx-hover::before { width: 70%; }
/* Field Ops keeps its own light-sweep in stat/kpi ::before */
:root[data-theme="fieldops"] :is(.stat, .kpi).fx-hover::before { left: 0; top: 0; animation: foSweep 2.5s ease-in-out infinite; background: linear-gradient(105deg, transparent 30%, rgba(120, 240, 255, .3) 48%, rgba(25, 227, 255, .08) 55%, transparent 70%); }
:root:not([data-theme]) :is(.panel, .stat, .site-card-sm, .gal-item, .steps li, .login-card):hover::after { opacity: 1; animation-duration: 4s; }
.panel { transition: box-shadow .3s, border-color .3s; }
.panel:hover { border-color: var(--hover-glow); }
/* liquid highlight under the pointer on buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), transparent 55%); }
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
/* menu items: sliding indicator, pointer glow, springy icon */
.sidebar a { position: relative; overflow: hidden; }
.sidebar a::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--brand); transform: scaleY(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.sidebar a::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), var(--hover-glow), transparent 70%); }
.sidebar a:hover::before, .sidebar a.active::before { transform: scaleY(1); }
.sidebar a:hover::after { opacity: 1; }
.sidebar a:hover { padding-left: 16px; }
body.nav-collapsed .sidebar a:hover { padding-left: 6px; }
.sidebar a .ico { transition: transform .4s cubic-bezier(.3, 1.8, .5, 1), box-shadow .3s; }
.sidebar a:hover .ico { transform: rotate(-10deg) scale(1.15); box-shadow: 0 0 0 4px var(--hover-glow); }
:is(.theme-opt, .lic-opt, .up-i, .search-results a, .notif-panel a.item, .list-item, .studio-tabs a, .tabs a, .tabs button, .tool-dock button) { transition: transform .25s cubic-bezier(.2, .8, .2, 1), background-color .2s, box-shadow .2s, color .2s; }
:is(.theme-opt, .lic-opt, .up-i, .search-results a, .notif-panel a.item):hover { transform: translateX(4px); }
.list-item.fx-hover, .studio-tabs a.fx-hover { background-image: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), var(--hover-glow), transparent 70%); }
.studio-tabs a b, .tool-dock button .i { transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); display: inline-grid; }
.studio-tabs a:hover b, .tool-dock button:hover .i { transform: scale(1.18); }
.icon-btn, .avatar, .theme-btn, .license-btn { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, border-color .2s, background-color .2s; }
.icon-btn:hover, .avatar:hover { transform: translateY(-1px) scale(1.06); }
.theme-btn:hover .sw3 { animation-duration: 1.5s; }
.gal-img, .sc-thumb { transition: filter .3s; }
.gal-item:hover .gal-img, .site-card-sm:hover .sc-thumb { filter: saturate(1.15) brightness(1.04); }
@media (prefers-reduced-motion: reduce) { :is(.kpi, .stat, .site-card-sm, .gal-item, .login-user, .login-theme, .login-tier, .steps li, .btn, .icon-btn):hover { transform: none; } }

/* ---------- 3. soft-lock UI (license) ---------- */
.lock-tag[hidden] { display: none !important; }
button.lock-tag { cursor: pointer; font-family: inherit; line-height: 1.4; transition: transform .2s, box-shadow .2s; }
button.lock-tag:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -4px currentColor; }
.lock-tag.custom { background: rgba(5, 150, 105, .15); color: #059669; border: 1px solid rgba(5, 150, 105, .3); }
.lock-tag.basic { background: rgba(2, 132, 199, .15); color: #0284c7; border: 1px solid rgba(2, 132, 199, .3); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .lock-tag.pro { color: #c4b5fd; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .lock-tag.ultimate { color: #fcd34d; }
.studio-tabs a .lock-tag { font-size: 9px; }
.tool-dock button.locked { opacity: .62; }
.tool-dock button.locked:hover { opacity: 1; }
.upsell-card { position: relative; isolation: isolate; overflow: hidden; }
.upsell-card.in-modal { margin: 0 auto; padding: 14px 6px 4px; background: none; border: 0; box-shadow: none; }
.upsell-icon { position: relative; }
.upsell-icon::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--tc, var(--accent)); opacity: .5; animation: ping 2s ease-out infinite; }
.upsell-card p.upsell-why { font-size: 12.5px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--tint), .55); border: 1px solid var(--line); }
.upsell-why b { color: var(--text); }
.license-btn { gap: 7px; padding: 0 12px; height: 36px; border-radius: 999px; border-color: var(--tc, var(--line2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc, transparent) 14%, transparent); }
.license-btn .lic-ico { color: var(--tc, var(--accent)); font-size: 14px; }
.license-btn .lic-caret { font-size: 10px; color: var(--muted); transition: transform .2s; }
.license-menu.open .lic-caret { transform: rotate(180deg); }
body.read-only .avatar { box-shadow: 0 0 0 2px #f5c24d, 0 4px 12px rgba(37, 99, 235, .35); }

/* ---------- 4. login: theme · tier · user steps ---------- */
.login-card { width: min(680px, 100%); }
.login-ver { font-size: 10.5px; }
.login-step { margin: 16px 0 6px; }
.login-step-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.login-step-h > b { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); }
.login-step-h > b i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; background: var(--brand); box-shadow: 0 3px 8px -2px rgba(37, 99, 235, .5); }
.login-themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.login-theme, .login-tier { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 9px; border-radius: 16px; border: 1px solid var(--line2); background: rgba(var(--tint), .5); cursor: pointer; color: var(--text); text-align: center; }
.login-theme .pv { width: 100%; height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .6); position: relative; overflow: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.login-theme .pv i { position: absolute; left: 18%; right: 18%; top: 10px; height: 14px; border-radius: 4px; }
.login-theme b, .login-tier b { font-size: 12.5px; }
.login-theme small, .login-tier small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.login-theme.on, .login-tier.on { border-color: var(--accent); background: rgba(var(--tint-hi), .85); box-shadow: 0 0 0 3px var(--hover-glow), var(--shadow); }
.login-theme.on .pv { box-shadow: 0 0 0 2px var(--accent), 0 6px 14px -4px rgba(0, 0, 0, .3); }
.login-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.login-tier { border-top: 3px solid var(--tc); }
.login-tier.on { border-color: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 22%, transparent), var(--shadow); }
.login-tier-note { margin-top: 8px; padding: 8px 12px; font-size: 11.5px; }
.login-tier-note b { display: inline; font-size: 11.5px; text-transform: none; letter-spacing: 0; color: var(--text); }
.login-users { margin: 8px 0 16px; }
.login-user.dimmed { opacity: .72; }
.login-user.dimmed:hover { opacity: 1; }
.lu-av { transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.login-user .lu-go { transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.login-user:hover .lu-go { transform: translateX(5px); }
.login-user:hover .lu-av { transform: scale(1.08); }
.theme-opt > span:last-child { display: flex; flex-direction: column; }
.theme-pop { width: 240px; }
@media (max-width: 640px) { .login-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .login-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .login-card { padding: 20px 16px; } }

/* theme previews (menu + login) */
.pv-default { background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, .6), transparent 50%), radial-gradient(circle at 85% 85%, rgba(245, 158, 11, .55), transparent 50%), linear-gradient(115deg, #f8fafc 0 55%, #fff 60%, #f1f5ff 70%); }
.pv-default i { background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .6)); box-shadow: 0 0 0 1px #fff, 0 2px 6px rgba(37, 99, 235, .25), 2px 2px 0 -1px #ffc8a0, -2px 2px 0 -1px #a8c8ff; }
.pv-aero { background: linear-gradient(180deg, #38bdf8, #bae6fd 80%); }
.pv-dark { background: radial-gradient(ellipse at 30% 30%, rgba(52, 211, 153, .5), transparent 55%), radial-gradient(ellipse at 75% 40%, rgba(168, 85, 247, .45), transparent 55%), linear-gradient(160deg, #030712, #0b1424); }
.pv-futuristic { background: radial-gradient(circle at 75% 25%, rgba(139, 92, 246, .7), transparent 55%), radial-gradient(circle at 15% 85%, rgba(255, 46, 136, .55), transparent 50%), linear-gradient(160deg, #050920, #120a33); }
.pv-futuristic i { background: rgba(10, 20, 54, .9); box-shadow: 0 0 0 1px #22d3ee, 0 0 8px #22d3ee; border-radius: 0 !important; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }

/* =====================================================================
   5. THEME: FUTURISTIC (cyberpunk HUD)
   refs: ".1. Reff Doc and Design/cyberpunk (1-6).png": deep navy / indigo field, cyan line-art frames with
   chamfered corners, notched header tabs and hatch marks, magenta/pink secondary accents, violet haze,
   rotating targeting reticles + equalizers (fx.js). Differs from Field Ops: no CRT, dual-tone cyan/magenta,
   translucent glass frames, glitch hover.
   ===================================================================== */
:root[data-theme="futuristic"] {
  color-scheme: dark;
  --text: #e6f6ff;
  --text2: #b4cdf0;
  --muted: #7d96c8;
  --dim: #4f6497;
  --line: rgba(34, 211, 238, .16);
  --line2: rgba(34, 211, 238, .36);
  --accent: #22d3ee;
  --accent2: #ff2e88;
  --accent-ink: #67e8f9;
  --mag: #ff2e88;
  --gold: #fbbf24;
  --route: #22d3ee;
  --brand: linear-gradient(120deg, #22d3ee 0%, #6366f1 55%, #ff2e88 100%);
  --red: #ff4d6d;
  --yellow: #fbbf24;
  --green: #2dd4a7;
  --blue: #3b82f6;
  --tint: 12, 22, 58;
  --tint-hi: 20, 34, 84;
  --glass: rgba(10, 20, 54, .72);
  --glass-strong: rgba(9, 16, 46, .94);
  --glass-soft: rgba(10, 20, 54, .5);
  --glass-border: rgba(34, 211, 238, .38);
  --gloss: linear-gradient(180deg, rgba(34, 211, 238, .08) 0%, transparent 35%);
  --topbar-bg: rgba(7, 12, 36, .92);
  --bg-paint: radial-gradient(60% 50% at 78% 18%, rgba(139, 92, 246, .32) 0%, transparent 70%), radial-gradient(55% 45% at 10% 90%, rgba(255, 46, 136, .16) 0%, transparent 70%), radial-gradient(70% 60% at 30% 10%, rgba(34, 211, 238, .14) 0%, transparent 70%), linear-gradient(160deg, #050920 0%, #0a1438 50%, #120a33 100%);
  --hero-paint: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(255, 46, 136, .10));
  --hero-ink: #a5f3fc;
  --glow-a: rgba(34, 211, 238, .22);
  --glow-b: rgba(255, 46, 136, .18);
  --glow-c: rgba(139, 92, 246, .24);
  --hover-glow: rgba(34, 211, 238, .26);
  --hover-glow2: rgba(255, 46, 136, .2);
  --orb-opacity: .9;
  --iri: conic-gradient(from var(--iri-ang), transparent 0 55%, rgba(34, 211, 238, .3) 64%, #a5f3fc 72%, #ff2e88 80%, transparent 90%);
  --iri-sheen: linear-gradient(transparent, transparent);
  --iri-width: 1.5px;
  --iri-opacity: 1;
  --shadow: 0 18px 40px -16px rgba(0, 0, 0, .8), inset 0 0 28px rgba(34, 211, 238, .05);
  --shadow-lg: 0 0 24px -4px rgba(34, 211, 238, .35), 0 24px 60px -18px rgba(0, 0, 0, .9);
  --blur: blur(12px) saturate(140%);
  --chart-grid: rgba(34, 211, 238, .1);
  --chart-surface: #0a1436;
  --head: 'Rajdhani', 'Inter', sans-serif;
  --disp: 'Orbitron', 'Rajdhani', sans-serif;
  --cut: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  --cut-sm: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --cut-tab: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  --para: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  /* corner brackets + header notch + magenta foot bar + hatch marks (line-art frames from the refs) */
  --frame:
    linear-gradient(#22d3ee, #22d3ee) left 0 top 18px / 2px 22px no-repeat border-box,
    linear-gradient(#22d3ee, #22d3ee) left 18px top 0 / 26px 2px no-repeat border-box,
    linear-gradient(#22d3ee, #22d3ee) right 0 bottom 18px / 2px 22px no-repeat border-box,
    linear-gradient(#22d3ee, #22d3ee) right 18px bottom 0 / 26px 2px no-repeat border-box,
    linear-gradient(90deg, transparent, #22d3ee, transparent) center top / 38% 2px no-repeat border-box,
    linear-gradient(#ff2e88, #ff2e88) left 30px bottom 0 / 44px 3px no-repeat border-box,
    repeating-linear-gradient(120deg, rgba(34, 211, 238, .85) 0 2px, transparent 2px 6px) right 14px top 6px / 36px 4px no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1px), #22d3ee calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 18px 18px no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1px), #22d3ee calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 100% 100% / 18px 18px no-repeat border-box;
  --hexgrid: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .08) 0 1px, transparent 1.5px) 0 0 / 22px 22px;
}
@keyframes fuGlitch { 0%, 100% { text-shadow: 0 0 10px rgba(34, 211, 238, .55); transform: none; } 20% { text-shadow: -2px 0 #ff2e88, 2px 0 #22d3ee; transform: translateX(1px); } 40% { text-shadow: 2px 0 #ff2e88, -2px 0 #22d3ee; transform: translateX(-1px); } 60% { text-shadow: 0 0 10px rgba(34, 211, 238, .55); } }
@keyframes fuScan { from { transform: translateY(-100%); } to { transform: translateY(400%); } }
@keyframes fuStreak { from { transform: translateX(-120%); } to { transform: translateX(420%); } }
@keyframes fuPulse { 50% { opacity: .45; } }
@keyframes fuGrid { to { background-position: 0 44px, 44px 0; } }

:root[data-theme="futuristic"] body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .7;
  background: repeating-linear-gradient(0deg, rgba(99, 102, 241, .07) 0 1px, transparent 1px 44px), repeating-linear-gradient(90deg, rgba(99, 102, 241, .07) 0 1px, transparent 1px 44px);
  animation: fuGrid 22s linear infinite; -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 90%); mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 90%); }
:root[data-theme="futuristic"] :is(h1, h2) { font-family: var(--disp); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ecfeff; text-shadow: 0 0 10px rgba(34, 211, 238, .55), 0 0 26px rgba(139, 92, 246, .35); }
:root[data-theme="futuristic"] .page-head h1 { font-size: 21px; }
:root[data-theme="futuristic"] :is(h3, h4) { font-family: var(--head); letter-spacing: .06em; }
:root[data-theme="futuristic"] :is(.clock, .stat .v, .kpi .v) { font-family: var(--disp); letter-spacing: .02em; }
:root[data-theme="futuristic"] ::-webkit-scrollbar-thumb { background-color: rgba(34, 211, 238, .3); }
:root[data-theme="futuristic"] ::selection { background: rgba(255, 46, 136, .35); }

/* frames */
:root[data-theme="futuristic"] :is(.panel, .modal, .site-head, .dash-side, .cov-list, .login-card, .upsell-card:not(.in-modal), .man-ch, .man-cover) {
  border-radius: 0; clip-path: var(--cut); border: 1px solid var(--line2);
  background: var(--frame), var(--hero-paint), var(--glass);
}
:root[data-theme="futuristic"] :is(.stat, .kpi, .site-card-sm, .gal-item, .steps li, .filter-bar, .studio-tabs, .notif-panel, .search-results, .theme-pop, .license-pop, .user-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, .login-user, .login-theme, .login-tier, .man-toc, .man-doc) {
  border-radius: 0; clip-path: var(--cut-sm);
}
:root[data-theme="futuristic"] :is(.dash-map, .cov-map, .split .stage, .site-body) { clip-path: var(--cut); }
:root[data-theme="futuristic"] :is(.stat, .kpi) {
  background: linear-gradient(#22d3ee, #22d3ee) left 10px top 0 / 30px 2px no-repeat border-box,
    linear-gradient(#ff2e88, #ff2e88) right 10px bottom 0 / 18px 2px no-repeat border-box,
    var(--hexgrid), var(--hero-paint), var(--glass);
  border: 1px solid var(--line2);
}
/* rotating light rim on featured frames (reuses the ::after rim slot) */
:root[data-theme="futuristic"] :is(.panel, .modal, .site-head, .kpi, .stat.hero, .login-card)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; border-radius: 0;
  padding: 1.5px; background: var(--iri); opacity: .9;
  -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 7s linear infinite;
}
:root[data-theme="futuristic"] .panel:nth-child(2n)::after { animation-direction: reverse; animation-duration: 9s; }
:root[data-theme="futuristic"] :is(.panel, .modal, .site-head, .kpi, .stat.hero, .login-card):hover::after { animation-duration: 2.2s; opacity: 1; }
:root[data-theme="futuristic"] :is(.panel, .stat, .kpi, .site-card-sm, .gal-item, .login-user, .login-theme, .login-tier):hover { border-color: var(--accent); box-shadow: 0 0 22px -6px rgba(34, 211, 238, .55), inset 0 0 26px rgba(34, 211, 238, .1); }
:root[data-theme="futuristic"] :is(.panel, .kpi, .stat):hover :is(h3, .v) { animation: fuGlitch .5s steps(2) 1; }

/* panel header: notched tab label with magenta lead bar + running streak */
:root[data-theme="futuristic"] .panel-h { position: relative; }
:root[data-theme="futuristic"] .panel-h::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 30%; pointer-events: none; background: linear-gradient(90deg, transparent, #22d3ee, #ff2e88, transparent); animation: fuStreak 5.5s linear infinite; }
:root[data-theme="futuristic"] .panel-h h3 { font: 700 13.5px var(--head); text-transform: uppercase; letter-spacing: .14em; color: #ecfeff; padding: 3px 16px 3px 12px; background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(34, 211, 238, .02)); clip-path: var(--cut-tab); box-shadow: inset 3px 0 0 var(--mag); text-shadow: 0 0 8px rgba(34, 211, 238, .5); }
:root[data-theme="futuristic"] :is(.sec-t, .nav-label, .tbl th, .kv .k, .field > span, .ob-k, .side-sec h4, .prov-h, .stat .k, .kpi .k) { font-family: var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
:root[data-theme="futuristic"] .sec-h { font-family: var(--disp); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
:root[data-theme="futuristic"] .sec-h::after { background: linear-gradient(90deg, var(--accent), var(--mag) 40%, transparent); height: 2px; }

/* KPI tiles */
:root[data-theme="futuristic"] :is(.stat, .kpi) .v { color: #ecfeff; text-shadow: 0 0 12px rgba(34, 211, 238, .5); font-size: 22px; font-weight: 700; }
:root[data-theme="futuristic"] .kpi-red .v { color: #ff8fa8; text-shadow: 0 0 12px rgba(255, 46, 136, .6); }
:root[data-theme="futuristic"] .kpi-yellow .v { color: #fde68a; text-shadow: 0 0 12px rgba(251, 191, 36, .5); }
:root[data-theme="futuristic"] .kpi-ico { border-radius: 0; clip-path: var(--hex); box-shadow: none; background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 60%); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
:root[data-theme="futuristic"] .kpi:hover .kpi-ico { transform: rotate(60deg) scale(1.08); }
:root[data-theme="futuristic"] .i-sites { background-color: #0891b2; }
:root[data-theme="futuristic"] .i-area { background-color: #6366f1; }
:root[data-theme="futuristic"] .i-red { background-color: #e11d74; }
:root[data-theme="futuristic"] .stat.hero .v { color: #a5f3fc; }

/* top bar: slanted title tab, center notch, magenta streak */
:root[data-theme="futuristic"] .topbar { background: linear-gradient(180deg, rgba(10, 18, 52, .96), rgba(6, 10, 32, .94)); border-bottom: 1px solid var(--line2); box-shadow: 0 8px 30px rgba(3, 6, 25, .7), inset 0 -1px 0 rgba(34, 211, 238, .25); }
:root[data-theme="futuristic"] .topbar::before { content: ''; position: absolute; left: 50%; bottom: -1px; width: 360px; max-width: 30vw; height: 4px; transform: translateX(-50%); background: linear-gradient(90deg, #22d3ee, #ff2e88); clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 8px 100%); box-shadow: 0 0 14px #22d3ee; }
:root[data-theme="futuristic"] .topbar::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 20%; background: linear-gradient(90deg, transparent, #ff8fc2, transparent); animation: fuStreak 4s linear infinite; pointer-events: none; }
:root[data-theme="futuristic"] .brand img { filter: drop-shadow(0 0 6px #22d3ee) hue-rotate(20deg); }
:root[data-theme="futuristic"] .brand-name { font: 800 15px var(--disp); letter-spacing: .14em; text-transform: uppercase; color: #ecfeff; text-shadow: 0 0 10px rgba(34, 211, 238, .7); }
:root[data-theme="futuristic"] .brand-name b { background: linear-gradient(90deg, #22d3ee, #ff2e88); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="futuristic"] .brand-tag { font-family: var(--head); letter-spacing: .16em; text-transform: uppercase; }
:root[data-theme="futuristic"] .brand-sep { width: 14px; height: 22px; background: repeating-linear-gradient(120deg, #ff2e88 0 2px, transparent 2px 5px); }
:root[data-theme="futuristic"] .brand-sub { font: 700 13px var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); padding: 3px 16px; background: rgba(34, 211, 238, .1); clip-path: var(--para); box-shadow: inset 0 -2px 0 var(--mag); }
:root[data-theme="futuristic"] .clock { color: #ecfeff; text-shadow: 0 0 10px rgba(34, 211, 238, .5); }
:root[data-theme="futuristic"] .clock small { color: var(--mag); }
:root[data-theme="futuristic"] :is(.asof, .global-search input, .theme-btn, .license-btn) { border-radius: 0; clip-path: var(--para); background-color: rgba(5, 10, 32, .9); border-color: var(--line2); box-shadow: none; }
:root[data-theme="futuristic"] .icon-btn { border-radius: 0; clip-path: var(--hex); background: rgba(34, 211, 238, .1); color: var(--accent); border: 0; }
:root[data-theme="futuristic"] .icon-btn:hover { background: rgba(255, 46, 136, .2); color: #fff; transform: rotate(30deg); }
:root[data-theme="futuristic"] .avatar { border-radius: 0; clip-path: var(--hex); background: linear-gradient(135deg, #22d3ee, #8b5cf6 60%, #ff2e88) !important; color: #050920; font-family: var(--disp); }
:root[data-theme="futuristic"] .bell b { border-radius: 0; border: 0; background: var(--mag); animation: fuPulse 1.4s ease-in-out infinite; }

/* sidebar */
:root[data-theme="futuristic"] .sidebar { border-radius: 0; clip-path: var(--cut); background: var(--frame), linear-gradient(180deg, rgba(10, 20, 56, .94), rgba(8, 10, 36, .95)); border: 1px solid var(--line2); }
:root[data-theme="futuristic"] .sidebar a { border-radius: 0; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); font: 600 14px var(--head); letter-spacing: .1em; text-transform: uppercase; }
:root[data-theme="futuristic"] .sidebar a::before { background: linear-gradient(180deg, #22d3ee, #ff2e88); border-radius: 0; box-shadow: 0 0 8px #22d3ee; }
:root[data-theme="futuristic"] .sidebar a .ico { border-radius: 0; clip-path: var(--hex); background: rgba(34, 211, 238, .1); border: 0; color: var(--accent); }
:root[data-theme="futuristic"] .sidebar a:hover { background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(255, 46, 136, .06), transparent); color: #fff; }
:root[data-theme="futuristic"] .sidebar a:hover .ico { transform: rotate(60deg) scale(1.12); box-shadow: none; filter: drop-shadow(0 0 6px #22d3ee); }
:root[data-theme="futuristic"] .sidebar a.active { background: linear-gradient(90deg, rgba(34, 211, 238, .28), rgba(139, 92, 246, .12), transparent); color: #fff; border-color: transparent; box-shadow: none; text-shadow: 0 0 8px #22d3ee; }
:root[data-theme="futuristic"] .sidebar a.active .ico { background: linear-gradient(135deg, #22d3ee, #ff2e88); color: #050920; }
:root[data-theme="futuristic"] .nav-sep { background: linear-gradient(90deg, #22d3ee, transparent); opacity: .5; }

/* controls */
:root[data-theme="futuristic"] .btn { border-radius: 0; clip-path: var(--para); padding-left: 20px; padding-right: 20px; background: rgba(34, 211, 238, .08); border: 1px solid var(--line2); color: var(--text); font: 700 12.5px var(--head); letter-spacing: .1em; text-transform: uppercase; box-shadow: none; }
:root[data-theme="futuristic"] .btn:hover { background: rgba(34, 211, 238, .2); border-color: var(--accent); color: #fff; animation: fuGlitch .4s steps(2) 1; }
:root[data-theme="futuristic"] .btn::after { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 46, 136, .45), transparent 60%); }
:root[data-theme="futuristic"] .btn.primary { color: #050920; background: linear-gradient(90deg, #22d3ee, #67e8f9 45%, #ff7ab6); border-color: transparent; text-shadow: none; box-shadow: 0 0 18px -2px rgba(34, 211, 238, .55); }
:root[data-theme="futuristic"] .btn.primary:hover { color: #050920; filter: brightness(1.12); }
:root[data-theme="futuristic"] .btn.ghost { background: transparent; border-color: transparent; }
:root[data-theme="futuristic"] .btn.danger { color: #ff8fa8; }
:root[data-theme="futuristic"] :is(.seg, .seg button) { border-radius: 0; }
:root[data-theme="futuristic"] .seg { background: rgba(5, 10, 32, .7); }
:root[data-theme="futuristic"] .seg button { font-family: var(--head); letter-spacing: .08em; text-transform: uppercase; }
:root[data-theme="futuristic"] .seg button.on { background: linear-gradient(90deg, #22d3ee, #ff7ab6); color: #050920; box-shadow: 0 0 12px rgba(34, 211, 238, .45); }
:root[data-theme="futuristic"] :is(.input, .field input, .field select, .field textarea, .tbl input, .tbl select) { border-radius: 0; background: rgba(5, 10, 32, .85); border-color: var(--line2); }
:root[data-theme="futuristic"] :is(.input, .field input, .field select, .field textarea):focus { border-color: var(--mag); box-shadow: 0 0 0 1px var(--mag), 0 0 14px -2px rgba(255, 46, 136, .5); }
:root[data-theme="futuristic"] :is(.badge, .chip, .lock-tag) { border-radius: 0; clip-path: var(--para); padding-left: 10px; padding-right: 10px; font-family: var(--head); letter-spacing: .08em; text-transform: uppercase; }
:root[data-theme="futuristic"] .bar { border-radius: 0; background: repeating-linear-gradient(90deg, rgba(34, 211, 238, .12) 0 6px, transparent 6px 8px); }
:root[data-theme="futuristic"] .bar > i { border-radius: 0; background: linear-gradient(90deg, #22d3ee, #ff2e88); box-shadow: 0 0 10px #22d3ee; }
:root[data-theme="futuristic"] :is(.studio-tabs a, .tabs a, .tabs button) { border-radius: 0; clip-path: var(--para); font-family: var(--head); letter-spacing: .08em; text-transform: uppercase; }
:root[data-theme="futuristic"] .studio-tabs a.on { background: linear-gradient(180deg, rgba(34, 211, 238, .26), rgba(139, 92, 246, .1)); box-shadow: inset 0 -2px 0 var(--mag); color: #fff; }
:root[data-theme="futuristic"] :is(.studio-tabs a b, .steps li b, .lu-av) { border-radius: 0; clip-path: var(--hex); }
:root[data-theme="futuristic"] .tbl th { background: rgba(8, 14, 44, .96); }
:root[data-theme="futuristic"] .tbl tbody tr:hover td { background: linear-gradient(90deg, rgba(34, 211, 238, .12), rgba(255, 46, 136, .04), transparent); }
:root[data-theme="futuristic"] :is(.list-item:hover, .list-item.sel) { background-color: rgba(34, 211, 238, .1); border-color: var(--line2); }
:root[data-theme="futuristic"] .note { border-left-color: var(--mag); }
:root[data-theme="futuristic"] .modal-back { background: rgba(3, 5, 22, .72); }
:root[data-theme="futuristic"] .toast { border-left-color: var(--mag); }
:root[data-theme="futuristic"] :is(.theme-opt, .lic-opt, .up-i) { border-radius: 0; }
:root[data-theme="futuristic"] :is(.theme-opt.on, .lic-opt.on) { box-shadow: inset 3px 0 0 var(--mag); }
:root[data-theme="futuristic"] .login-step-h > b i { border-radius: 0; clip-path: var(--hex); background: linear-gradient(135deg, #22d3ee, #ff2e88); color: #050920; }
:root[data-theme="futuristic"] .upsell-icon { border-radius: 0; clip-path: var(--hex); }
:root[data-theme="futuristic"] .upsell-icon::after { display: none; }

/* loader: twin counter-rotating reticle */
:root[data-theme="futuristic"] .loader { color: var(--accent); font: 600 13px var(--disp); letter-spacing: .3em; text-transform: uppercase; text-shadow: 0 0 8px var(--accent); }
:root[data-theme="futuristic"] .loader::before { width: 60px; height: 60px; border: 0; background: conic-gradient(from 0deg, transparent 0 20%, #22d3ee 20% 38%, transparent 38% 60%, #ff2e88 60% 76%, transparent 76%);
  -webkit-mask: radial-gradient(circle, transparent 0 20px, #000 21px 24px, transparent 25px 27px, #000 28px 30px, transparent 31px); mask: radial-gradient(circle, transparent 0 20px, #000 21px 24px, transparent 25px 27px, #000 28px 30px, transparent 31px);
  filter: drop-shadow(0 0 6px #22d3ee); animation: spin 1.2s linear infinite; }

/* thumbnails: scan sweep on hover */
:root[data-theme="futuristic"] :is(.qthumb, .gal-img, .sc-thumb) { position: relative; overflow: hidden; }
:root[data-theme="futuristic"] :is(.gal-item, .site-card-sm):hover :is(.gal-img, .sc-thumb)::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .35)); border-bottom: 1px solid #a5f3fc; animation: fuScan 1.4s linear infinite; pointer-events: none; }

/* maps: night duotone + HUD corner brackets (no CRT, unlike Field Ops) */
:root[data-theme="futuristic"] .leaflet-container { background: #060b24; }
:root[data-theme="futuristic"] .leaflet-tile-pane { filter: saturate(1.15) brightness(.82) contrast(1.08) hue-rotate(-8deg); }
:root[data-theme="futuristic"] .leaflet-container:is([data-base="osm"], [data-base="topo"], [data-base="esriTopo"], [data-base="light"]) .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(1.3) brightness(.9); }
:root[data-theme="futuristic"] .leaflet-container::before { content: ''; position: absolute; inset: 0; z-index: 450; pointer-events: none;
  background: linear-gradient(#22d3ee, #22d3ee) left 12px top 12px / 30px 2px no-repeat, linear-gradient(#22d3ee, #22d3ee) left 12px top 12px / 2px 30px no-repeat,
    linear-gradient(#ff2e88, #ff2e88) right 12px bottom 12px / 30px 2px no-repeat, linear-gradient(#ff2e88, #ff2e88) right 12px bottom 12px / 2px 30px no-repeat,
    radial-gradient(ellipse 80% 75% at 50% 50%, transparent 60%, rgba(18, 10, 51, .55) 100%);
  box-shadow: inset 0 0 60px rgba(139, 92, 246, .18), inset 0 0 0 1px rgba(34, 211, 238, .3); }
:root[data-theme="futuristic"] :is(.leaflet-popup-pane, .leaflet-tooltip-pane) { z-index: 700; }
:root[data-theme="futuristic"] .leaflet-tooltip.tac { background: linear-gradient(90deg, rgba(14, 26, 74, .95), rgba(8, 12, 40, .92)); color: #ecfeff; border: 0; border-left: 2px solid var(--mag); border-radius: 0; font: 600 12px var(--head); letter-spacing: .06em; box-shadow: 0 0 12px rgba(34, 211, 238, .3); }
:root[data-theme="futuristic"] :is(.leaflet-bar a, .leaflet-control-layers) { border-radius: 0 !important; background: rgba(8, 14, 44, .92) !important; color: var(--accent) !important; }
:root[data-theme="futuristic"] .leaflet-bar { border-radius: 0 !important; border: 1px solid var(--line2) !important; }
:root[data-theme="futuristic"] .pin .core { box-shadow: 0 0 10px currentColor, 0 0 22px currentColor; }
:root[data-theme="futuristic"] .team-icon { border-radius: 0; clip-path: var(--hex); }

@media (prefers-reduced-motion: reduce) { :root[data-theme="futuristic"] *, :root[data-theme="futuristic"] *::before, :root[data-theme="futuristic"] *::after { animation: none !important; } }

/* sidebar lock tags never get clipped: the label shrinks instead */
.sidebar a > span:not(.ico):not(.lock-tag) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar .lock-tag { flex: none; font-size: 8.5px; padding: 1px 5px; }
:root[data-theme="futuristic"] .sidebar .lock-tag { letter-spacing: .02em; padding: 1px 7px; }

/* ---------- v1.3 RBAC ---------- */
.perm-hidden { display: none !important; }
.license-btn.ro { cursor: default; }
.license-btn.ro .lic-caret { display: none; }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--rc, var(--accent)); white-space: nowrap; }
.login-title { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin: 2px 0 10px; }
.login-title img { filter: drop-shadow(0 8px 18px rgba(14, 165, 233, .4)); margin-bottom: 4px; transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.login-title:hover img { transform: rotate(-12deg) scale(1.06); }
.login-title .brand-name { font-size: 30px; line-height: 1.1; }
.login-title .muted { font-size: 13px; letter-spacing: .02em; }
:root[data-theme="futuristic"] .login-title .brand-name { font-size: 24px; }
:root[data-theme="fieldops"] .login-title .brand-name { font-size: 22px; }
.login-theme { padding: 6px; }
.login-theme .pv { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 12px; }
.login-theme .pv i { top: 22%; height: 22%; }
.theme-pop { width: 210px; }
.rbac-matrix th.c, .rbac-matrix td.c { text-align: center; }
.rbac-matrix tr.grp td { font: 700 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(var(--tint), .5); }
.rbac-matrix .ok { color: var(--green); font-weight: 800; font-size: 14px; }
.tier-compare .stat.active { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.sidebar .lock-tag { font-size: 8.5px; padding: 1px 4px; letter-spacing: 0; }
.sidebar a > span:not(.ico):not(.lock-tag) { flex: 0 1 auto; }

/* ---------- v1.4 Ultimate Ops ---------- */
.lock-tag.ultimateOps { background: rgba(190, 18, 60, .14); color: #be123c; border: 1px solid rgba(190, 18, 60, .3); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .lock-tag.ultimateOps { color: #fda4af; }
.login-tiers { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tier-compare { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (max-width: 640px) { .login-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* weather page */
.wx-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1100px) { .wx-grid { grid-template-columns: minmax(0, 1fr); } }
.wx-tbl tr.forecast td { background: rgba(245, 194, 77, .06); }
.wx-ico { display: inline-block; width: 20px; text-align: center; transition: transform .3s; }
.wx-tbl tr:hover .wx-ico { transform: scale(1.35); }
.wind-arrow { display: inline-block; transform: rotate(calc(var(--d) - 90deg)); color: var(--accent); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.wx-tbl tr:hover .wind-arrow { transform: rotate(calc(var(--d) - 90deg)) scale(1.4); }
#days button { min-width: 0; }

/* disaster analytics */
.hz-chip { border-left: 3px solid var(--hc); cursor: pointer; }
.hz-chip input { margin: 0 2px 0 0; accent-color: var(--hc); }
.b-high { color: #a3461c; background: #fdeadf; border-color: #f5c9b0; }

/* hazard layer panel on the live map */
.hz-panel { border-radius: 14px; padding: 4px; min-width: 0; font-size: 12px; background: var(--gloss), rgba(var(--tint-hi), .92) !important; }
.hz-toggle { border: 0; background: transparent; cursor: pointer; font: 700 12px var(--font); color: var(--text); padding: 6px 10px; display: flex; gap: 6px; align-items: center; width: 100%; }
.hz-toggle .hz-n { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; }
.hz-body { display: none; padding: 2px 6px 6px; width: 250px; }
.hz-panel.open .hz-body { display: block; }
.hz-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 9px; cursor: pointer; transition: background .2s, transform .2s; }
.hz-row:hover { background: rgba(var(--tint), .7); transform: translateX(3px); }
.hz-sw { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--hc); color: #fff; font-size: 12px; box-shadow: 0 2px 6px -1px var(--hc); }
.hz-c { font: 700 11px var(--mono); color: var(--muted); }
.hz-foot { font-size: 10px; color: var(--muted); padding: 6px 6px 0; border-top: 1px solid var(--line); margin-top: 4px; line-height: 1.4; }
.hz-wx { display: flex !important; align-items: center; gap: 3px; padding: 1px 7px 1px 4px; border-radius: 999px; background: rgba(255, 255, 255, .88); border: 1px solid rgba(37, 99, 235, .35); box-shadow: 0 2px 8px rgba(15, 42, 68, .25); font: 700 11px var(--font); color: #1e3a8a; white-space: nowrap; width: auto !important; }
.hz-wx span { font-size: 14px; }
.hz-wind { display: flex !important; flex-direction: column; align-items: center; pointer-events: auto; }
.hz-wind span { display: block; transform: rotate(calc(var(--d) - 90deg)); }
.hz-wind i { display: block; font-style: normal; font-size: var(--sz); color: #0891b2; text-shadow: 0 0 4px #fff, 0 0 8px rgba(8, 145, 178, .6); animation: hzBlow var(--t) ease-in-out infinite; }
.hz-wind b { font: 700 9px var(--mono); color: #0e7490; background: rgba(255, 255, 255, .85); padding: 0 3px; border-radius: 4px; }
@keyframes hzBlow { 0% { transform: translateX(-6px); opacity: .35; } 50% { opacity: 1; } 100% { transform: translateX(8px); opacity: .35; } }
.hz-quake.recent { animation: hzPulse 1.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes hzPulse { 0% { stroke-width: 1; stroke-opacity: 1; } 100% { stroke-width: 14; stroke-opacity: 0; } }
.hz-fire { animation: hzFlicker 1.2s steps(3) infinite; }
@keyframes hzFlicker { 0%, 100% { fill-opacity: .95; } 50% { fill-opacity: .55; } }
.hz-ash { animation: hzDash 2s linear infinite; }
@keyframes hzDash { to { stroke-dashoffset: -24; } }
.hz-volc { display: grid !important; place-items: center; font-size: 18px; color: #f97316; text-shadow: 0 0 2px #fff, 0 0 8px #f97316; }
.hz-volc.red { color: #dc2626; text-shadow: 0 0 2px #fff, 0 0 10px #dc2626; animation: fuPulse 1.2s ease-in-out infinite; }
@keyframes fuPulse { 50% { opacity: .45; } }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .hz-wx { background: rgba(10, 20, 45, .88); color: #e0f2fe; border-color: rgba(56, 189, 248, .4); }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .hz-wind b { background: rgba(10, 20, 45, .85); color: #67e8f9; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .hz-panel { background: var(--gloss), rgba(var(--tint), .94) !important; }
:root[data-theme="futuristic"] .hz-panel, :root[data-theme="fieldops"] .hz-panel { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
:root[data-theme="futuristic"] .sidebar a { letter-spacing: .05em; }
:root[data-theme="fieldops"] .sidebar a { letter-spacing: .05em; }

/* v1.5 map: extreme weather & strong wind warnings */
.hz-storm { animation: hzStorm 2.4s ease-in-out infinite; }
@keyframes hzStorm { 50% { fill-opacity: .32; stroke-width: 4; } }
.hz-gust { animation: hzDash 1.2s linear infinite; }
.hz-alert { display: grid !important; place-items: center; font-size: 16px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 2px #2563eb, 0 0 14px rgba(37, 99, 235, .7); }
.hz-alert span { display: block; animation: hzBob 1.8s ease-in-out infinite; } /* never animate the marker element itself: Leaflet positions it with transform */
@keyframes hzBob { 50% { transform: translateY(-3px) scale(1.08); } }
.hz-wind.strong i { color: #dc2626; text-shadow: 0 0 4px #fff, 0 0 10px rgba(220, 38, 38, .8); }
.hz-wind.strong b { color: #b91c1c; }
.hz-panel .hz-body { max-height: 60vh; overflow: auto; }

/* ---------- v1.6 dashboard: hideable right panel, latest disasters, report buttons ---------- */
.dash { transition: grid-template-columns .3s ease, column-gap .3s ease; }
.dash.side-hidden { grid-template-columns: minmax(0, 1fr) 0px; column-gap: 0; }
.dash-side { transition: opacity .25s, visibility .25s; }
.dash.side-hidden .dash-side { opacity: 0; visibility: hidden; pointer-events: none; }
.side-toggle { position: absolute; right: 0; top: 50%; z-index: 650; transform: translateY(-50%); width: 22px; height: 64px; border: 1px solid var(--glass-border); border-right: 0; border-radius: 12px 0 0 12px; cursor: pointer;
  background: var(--gloss), rgba(var(--tint-hi), .92); color: var(--accent-ink); font: 800 16px var(--font); box-shadow: -4px 0 14px -6px rgba(15, 42, 68, .35); transition: width .2s, background-color .2s; }
.side-toggle:hover { width: 28px; color: var(--accent2); }
:root:is([data-theme="futuristic"], [data-theme="fieldops"]) .side-toggle { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
@media (max-width: 900px) { .dash.side-hidden .dash-side { display: none; } }
.hz-latest { align-items: flex-start; }
.hz-latest .hz-sw { flex: none; margin-top: 2px; }
.hz-latest .badge { font-size: 9.5px; text-transform: uppercase; }
.rep-btns { display: inline-flex; gap: 4px; }
.rep-btns .btn { padding: 4px 10px; font-size: 11.5px; }
.tbl td .rep-btns .btn { padding: 2px 7px; font-size: 10.5px; }

/* ---------- v1.7 dashboard map toolbar: search · province · status · basemap · disaster layers ---------- */
.map-nav { position: absolute; top: 12px; left: 12px; right: 40px; z-index: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 8px; border-radius: 18px;
  background: var(--gloss), rgba(var(--tint-hi), .9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.map-nav .input { padding: 6px 12px; height: 32px; border-radius: 999px; }
.map-nav select.input { width: auto; max-width: 190px; }
.nav-search input { width: 220px; padding-left: 32px !important; background: rgba(var(--tint), .75) 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 11px 50%; transition: width .25s; }
.nav-search input:focus { width: 280px; }
.map-nav .seg { padding: 2px; }
.map-nav .seg button { padding: 4px 10px; }
.nav-count { font-size: 11.5px; white-space: nowrap; }
.nav-sp { flex: 1; }
.nav-tools { display: flex; gap: 6px; align-items: center; }
.nav-drop { position: relative; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(var(--tint), .75); color: var(--text); font: 600 12px var(--font); cursor: pointer; white-space: nowrap;
  transition: border-color .2s, color .2s, background-color .2s, transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.nav-btn:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 4px 12px -4px var(--hover-glow); }
.nav-drop.open > .nav-btn { border-color: var(--accent); background: rgba(var(--tint-hi), .95); color: var(--accent-ink); }
.nav-btn .caret { font-size: 10px; color: var(--muted); transition: transform .2s; }
.nav-drop.open .caret { transform: rotate(180deg); }
.nav-btn .hz-n { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; }
.nav-btn.locked { opacity: .85; }
.nav-pop { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 290px; max-height: 62vh; overflow: auto; padding: 6px; border-radius: 16px; z-index: 5;
  background: var(--gloss), var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); font-size: 12px; }
.nav-drop.open .nav-pop { display: block; animation: pop .16s ease-out; }
.bm-pop { width: 250px; }
.pop-h { font: 700 10px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 3px; }
.hz-drop .nav-pop { width: 300px; }
.hz-all { border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-bottom: 9px !important; }
.hz-all b { font-size: 12.5px; }
.hz-all small { display: block; font-size: 10.5px; color: var(--muted); }
/* switch */
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(100, 116, 139, .35); transition: background-color .25s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:indeterminate + i { background: color-mix(in srgb, var(--accent) 50%, #94a3b8); }
.switch input:indeterminate + i::after { transform: translateX(8px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
/* HUD themes: angular toolbar, but never clip-path the toolbar itself (it would cut the dropdowns) */
:root:is([data-theme="fieldops"], [data-theme="futuristic"]) .map-nav { border-radius: 0; border-color: var(--line2); }
:root:is([data-theme="fieldops"], [data-theme="futuristic"]) :is(.map-nav .input, .nav-btn) { border-radius: 0; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
:root:is([data-theme="fieldops"], [data-theme="futuristic"]) .nav-pop { border-radius: 0; }
:root:is([data-theme="fieldops"], [data-theme="futuristic"]) .switch i, :root:is([data-theme="fieldops"], [data-theme="futuristic"]) .switch i::after { border-radius: 2px; }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .nav-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"); }
@media (max-width: 1200px) { .nav-search input, .nav-search input:focus { width: 170px; } .nav-count { display: none; } }
@media (max-width: 900px) { .map-nav { left: 8px; right: 8px; } .nav-sp { display: none; } }
/* one-row toolbar: shrink gracefully with the map width (container queries on the map card) */
.dash-map { container-type: inline-size; container-name: dmap; }
.map-nav { flex-wrap: nowrap; right: 36px; gap: 6px; }
.nav-search { flex: 1 1 150px; min-width: 110px; }
.nav-search input, .nav-search input:focus { width: 100%; }
.map-nav select.input { flex: 0 1 150px; min-width: 110px; }
.map-nav .seg { flex: none; flex-wrap: nowrap; }
.map-nav .seg button { padding: 4px 9px; }
.nav-sp { flex: 0 0 0; }
.nav-tools { flex: none; margin-left: auto; }
.nav-btn .lbl { margin-left: 2px; }
@container dmap (max-width: 1080px) { .nav-count { display: none; } }
@container dmap (max-width: 960px) { .nav-btn .lbl { display: none; } .nav-btn { padding: 0 10px; } }
@container dmap (max-width: 760px) { .map-nav .seg button:not(.on) { font-size: 0; padding: 4px 7px; gap: 0; } .map-nav .seg button .dot { font-size: 12px; } }
@container dmap (max-width: 600px) { .map-nav { flex-wrap: wrap; } }
:root:is([data-theme="dark"], [data-theme="fieldops"], [data-theme="futuristic"]) .nav-search input { background-repeat: no-repeat; background-position: 11px 50%; }
:root:is([data-theme="fieldops"], [data-theme="futuristic"]) .nav-search input { padding-left: 32px !important; }

/* demo-only quick user switcher (topbar, right of the license pill) */
.user-switch .license-pop { width: 260px; }
.user-switch .lic-opt small { margin-top: 0; }
@media (max-width: 600px) { .user-switch .lic-lbl, .license-menu .lic-lbl { display: none; } }
