/* ============================================================
   worldfeed · layout.css
   Layout grid responsive + header + map controls + light mode
   ============================================================ */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #0a0e1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e2e8f0;
}

body.has-sidebar-open {
  overflow: hidden;
}

/* =============================================================
   GRID PRINCIPALE
   ============================================================= */
.app {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  grid-template-rows: 56px 1fr 44px;
  grid-template-areas:
    "header header header"
    "left   main   right"
    "footer footer footer";
  height: 100vh;
  width: 100vw;
}

.app-header {
  grid-area: header;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 70;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.app-left {
  grid-area: left;
  background: rgba(10, 14, 26, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  z-index: 40;
}

.app-right {
  grid-area: right;
  background: rgba(10, 14, 26, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  z-index: 40;
}

.app-main {
  grid-area: main;
  position: relative;
  overflow: hidden;
  background-color: #000308;
  background-image:
    radial-gradient(1px 1px at 20px 30px,  rgba(255,255,255,0.85), transparent 50%),
    radial-gradient(1px 1px at 40px 70px,  rgba(220,230,255,0.75), transparent 50%),
    radial-gradient(1.5px 1.5px at 90px 40px,  rgba(255,255,255,0.95), transparent 50%),
    radial-gradient(1px 1px at 130px 80px, rgba(200,220,255,0.7), transparent 50%),
    radial-gradient(1px 1px at 160px 30px, rgba(255,250,220,0.8), transparent 50%),
    radial-gradient(1px 1px at 200px 110px,rgba(255,255,255,0.6), transparent 50%),
    radial-gradient(2px 2px at 50px 150px, rgba(255,255,255,0.9), transparent 50%),
    radial-gradient(1px 1px at 80px 200px, rgba(220,235,255,0.65), transparent 50%),
    radial-gradient(1px 1px at 220px 180px,rgba(255,255,255,0.7), transparent 50%),
    radial-gradient(1.5px 1.5px at 240px 60px, rgba(240,245,255,0.8), transparent 50%),
    radial-gradient(1px 1px at 280px 130px,rgba(255,255,255,0.55),transparent 50%),
    radial-gradient(1px 1px at 310px 200px,rgba(200,210,255,0.7), transparent 50%),
    radial-gradient(2px 2px at 360px 50px, rgba(255,255,250,0.85),transparent 50%),
    radial-gradient(1px 1px at 380px 170px,rgba(255,255,255,0.6), transparent 50%);
  background-repeat: repeat;
  background-size: 400px 240px;
}

.app-footer {
  grid-area: footer;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.65);
}
.ftr-left, .ftr-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ftr-coords {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.ftr-coords-icon {
  color: #fbbf24;
  font-size: 13px;
  line-height: 1;
}
.ftr-coords-lat,
.ftr-coords-lng {
  min-width: 76px;
  color: rgba(241, 245, 249, 0.85);
}
.ftr-coords-sep { color: rgba(226, 232, 240, 0.3); }
html.theme-light .app-footer { color: rgba(15, 23, 42, 0.7); }
html.theme-light .ftr-coords-lat,
html.theme-light .ftr-coords-lng { color: rgba(15, 23, 42, 0.85); }
html.theme-light .ftr-coords-sep { color: rgba(15, 23, 42, 0.3); }

/* Footer — contatori demografici live (worldometer-style) */
.ftr-stat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ftr-stat-icon { font-size: 12px; line-height: 1; }
.ftr-stat-label {
  color: rgba(226, 232, 240, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}
.ftr-stat-val {
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ftr-stat-birth { color: #34d399; }
.ftr-stat-death { color: #f87171; }
.ftr-stat-sep { color: rgba(226, 232, 240, 0.25); }
html.theme-light .ftr-stat-label { color: rgba(15, 23, 42, 0.5); }
html.theme-light .ftr-stat-val   { color: #b45309; }
html.theme-light .ftr-stat-birth { color: #047857; }
html.theme-light .ftr-stat-death { color: #b91c1c; }
html.theme-light .ftr-stat-sep   { color: rgba(15, 23, 42, 0.25); }
@media (max-width: 991px){ .ftr-stat-label { display: none; } }
@media (max-width: 640px){
  .ftr-stat-sep { display: none; }
  .ftr-right { gap: 8px; overflow: hidden; }
}

#globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.app-main:fullscreen,
.app-main:-webkit-full-screen,
.app-main:-moz-full-screen,
.app-main:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
}

/* =============================================================
   HEADER
   ============================================================= */
.hdr-left,
.hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hdr-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
}

/* HEADER SEARCH (Photon geocoding) */
.hdr-search {
  position: relative;
  width: 100%;
  max-width: 440px;
}
.hdr-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(226, 232, 240, 0.5);
  pointer-events: none;
}
.hdr-search-input {
  width: 100%;
  height: 32px;
  padding: 0 32px 0 32px;
  font-family: inherit;
  font-size: 12px;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.hdr-search-input::placeholder { color: rgba(226, 232, 240, 0.4); }
.hdr-search-input:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.hdr-search-input:focus {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.4);
}
.hdr-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(226, 232, 240, 0.5);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s;
}
.hdr-search-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.hdr-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 50;
  padding: 4px;
}
.hdr-search-results[hidden] { display: none; }
.hdr-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.1s;
}
.hdr-search-result:hover { background: rgba(251, 191, 36, 0.08); }
.hdr-search-result-name {
  font-size: 13px;
  color: #f1f5f9;
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hdr-search-result-type {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-radius: 3px;
  padding: 1px 6px;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
}
.hdr-search-result-sub {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.55);
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hdr-search-empty {
  padding: 10px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
  text-align: center;
}

/* Light mode */
html.theme-light .hdr-search-input {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}
html.theme-light .hdr-search-input::placeholder { color: rgba(15, 23, 42, 0.4); }
html.theme-light .hdr-search-input:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
}
html.theme-light .hdr-search-input:focus {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.55);
}
html.theme-light .hdr-search-icon,
html.theme-light .hdr-search-clear { color: rgba(15, 23, 42, 0.55); }
html.theme-light .hdr-search-clear:hover { background: rgba(0, 0, 0, 0.08); color: #0f172a; }
html.theme-light .hdr-search-results {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
html.theme-light .hdr-search-result:hover { background: rgba(251, 191, 36, 0.12); }
html.theme-light .hdr-search-result-name { color: #0f172a; }
html.theme-light .hdr-search-result-sub  { color: rgba(15, 23, 42, 0.6); }
html.theme-light .hdr-search-empty       { color: rgba(15, 23, 42, 0.6); }

/* Hide search on mobile (sotto 768px) — header già stretto */
@media (max-width: 768px) {
  .hdr-center { display: none; }
}

.hdr-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 15px;
  color: #f1f5f9;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s;
}
.hdr-brand:hover { color: #ffffff; }
.hdr-brand-accent { color: #f59e0b; }
.hdr-logo { height: 34px; width: auto; display: block; }
@media (max-width: 640px){ .hdr-logo { height: 28px; } }

.hdr-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: rgba(226, 232, 240, 0.7);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
  padding: 0;
}
.hdr-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.hdr-btn-sidebar { display: none; }
.hdr-btn-theme { display: flex; }

.hdr-icon { display: block; }
.hdr-btn-theme .hdr-icon-sun  { display: none; }
.hdr-btn-theme .hdr-icon-moon { display: none; }
html.theme-dark  .hdr-btn-theme .hdr-icon-sun  { display: block; }
html.theme-light .hdr-btn-theme .hdr-icon-moon { display: block; }

.hdr-cta {
  background: #fbbf24;
  color: #0a0e1a;
  padding: 7px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.15s, transform 0.08s;
  display: inline-flex;
  align-items: center;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.hdr-cta:hover { background: #f59e0b; color: #0a0e1a; }
.hdr-cta:active { transform: translateY(1px); }

/* variante "ghost" (es. Accedi accanto a Registrati) */
.hdr-cta-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  opacity: 0.85;
}
.hdr-cta-ghost:hover { background: rgba(255, 255, 255, 0.08); color: inherit; opacity: 1; }

/* =============================================================
   HEADER — Centro avvisi real-time (campanella)
   ============================================================= */
.hdr-alert { position: relative; flex-shrink: 0; }
.hdr-alert-btn { position: relative; overflow: visible; }
.hdr-alert-bell { display: block; transition: color 0.15s; }

/* stato allarme: campanella rossa lampeggiante */
.hdr-alert.has-alert .hdr-alert-btn {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
  animation: hdr-alert-pulse 1.2s ease-in-out infinite;
}
.hdr-alert.has-alert .hdr-alert-bell { color: #f87171; }
@keyframes hdr-alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); background: rgba(248, 113, 113, 0.10); }
  50%      { box-shadow: 0 0 0 5px rgba(248, 113, 113, 0); background: rgba(248, 113, 113, 0.02); }
}

.hdr-alert-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border-radius: 9px;
  border: 1.5px solid rgba(15, 23, 42, 0.95);
  pointer-events: none;
}
.hdr-alert-badge[hidden] { display: none; }

/* pannello dropdown */
.hdr-alert-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(10, 14, 26, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  padding: 6px;
  z-index: 80;
}
.hdr-alert-panel[hidden] { display: none; }

.wf-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.wf-alert-title { font-size: 12px; font-weight: 600; color: #f1f5f9; }
.wf-alert-total {
  font-size: 11px; font-weight: 700; color: #0a0e1a;
  background: #fbbf24; border-radius: 9px; padding: 1px 7px;
}
.wf-alert-empty { padding: 16px 10px; font-size: 12px; color: rgba(226, 232, 240, 0.6); text-align: center; line-height: 1.5; }
.wf-alert-empty strong { color: #fbbf24; }

.wf-alert-group {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 4px; margin-top: 2px;
}
.wf-alert-group-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.wf-alert-group-cnt { font-size: 10px; color: rgba(226, 232, 240, 0.5); }
.wf-alert-list { display: flex; flex-direction: column; gap: 1px; }

.wf-alert-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.wf-alert-row:hover { background: rgba(251, 191, 36, 0.08); }
.wf-alert-row.is-nopos { cursor: default; opacity: 0.6; }
.wf-alert-row.is-nopos:hover { background: transparent; }
.wf-alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wf-alert-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wf-alert-row-name {
  font-size: 12px; color: #f1f5f9; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wf-alert-row-sub {
  font-size: 10px; color: rgba(226, 232, 240, 0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: monospace;
}
.wf-alert-kind { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; flex-shrink: 0; }
.wf-alert-foot {
  padding: 8px; margin-top: 4px; font-size: 10px;
  color: rgba(226, 232, 240, 0.4); text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =============================================================
   HEADER — Quotazioni di mercato ($) · apre su hover
   ============================================================= */
.hdr-quotes { position: relative; flex-shrink: 0; }
.hdr-quotes-btn { position: relative; }
.hdr-quotes-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 268px;
  background: rgba(10, 14, 26, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  padding: 6px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
/* hover sul box O focus da tastiera → mostra */
.hdr-quotes:hover .hdr-quotes-panel,
.hdr-quotes:focus-within .hdr-quotes-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.wf-q-ts { font-size: 10px; color: rgba(226, 232, 240, 0.45); font-family: monospace; }
.wf-q-list { display: flex; flex-direction: column; gap: 1px; }
.wf-q-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 5px;
}
.wf-q-row:hover { background: rgba(255, 255, 255, 0.05); }
.wf-q-row.is-sep { margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 9px; }
.wf-q-name { flex: 1; min-width: 0; font-size: 12px; color: #f1f5f9; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-q-unit { font-size: 9px; color: rgba(226,232,240,0.4); margin-left: 4px; }
.wf-q-val { font-size: 12px; color: #f1f5f9; font-weight: 600; font-family: monospace; }
.wf-q-chg { font-size: 10px; font-weight: 700; font-family: monospace; min-width: 52px; text-align: right; }
.wf-q-chg.up   { color: #4ade80; }
.wf-q-chg.down { color: #f87171; }
.wf-q-chg.flat { color: rgba(226,232,240,0.45); }

html.theme-light .hdr-quotes-panel { background: rgba(255,255,255,0.98); border-color: rgba(0,0,0,0.1); }
html.theme-light .wf-q-name, html.theme-light .wf-q-val { color: #0f172a; }

/* =============================================================
   HEADER — Tracker capi di stato
   ============================================================= */
.hdr-tracker { position: relative; flex-shrink: 0; }
.hdr-tracker-btn { position: relative; overflow: visible; }
.hdr-tracker.has-live .hdr-tracker-btn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.5); }
.hdr-tracker-badge { background: #f59e0b; }
.hdr-tracker-panel { width: 360px; }

.wf-trk-hint {
  padding: 10px; margin-bottom: 4px; font-size: 11px; line-height: 1.5;
  color: rgba(226, 232, 240, 0.65); background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.18); border-radius: 6px;
}
.wf-trk-hint strong { color: #fbbf24; }

.wf-trk-country {
  display: flex; align-items: center; gap: 9px;
  padding: 8px; border-radius: 6px; cursor: pointer;
}
.wf-trk-country:hover { background: rgba(255, 255, 255, 0.04); }
.wf-trk-country.is-open { background: rgba(255, 255, 255, 0.05); }
.wf-trk-flag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.wf-trk-cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wf-trk-cname { font-size: 13px; color: #f1f5f9; font-weight: 600; }
.wf-trk-clabel {
  font-size: 10px; color: rgba(226, 232, 240, 0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wf-trk-live {
  font-size: 11px; font-weight: 700; color: #ef4444; flex-shrink: 0;
  animation: hdr-alert-pulse 1.4s ease-in-out infinite; border-radius: 8px; padding: 2px 6px;
}
.wf-trk-ground { font-size: 10px; color: rgba(226, 232, 240, 0.4); flex-shrink: 0; }

.wf-trk-aclist {
  margin: 2px 0 6px 14px; padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 1px;
}
.wf-trk-ac { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.wf-trk-ac:hover { background: rgba(251, 191, 36, 0.07); }
.wf-trk-acdot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; flex-shrink: 0; }
.wf-trk-ac.is-flying .wf-trk-acdot { background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: hdr-alert-pulse 1.3s ease-in-out infinite; }
.wf-trk-acmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wf-trk-acreg { font-size: 12px; color: #e2e8f0; font-family: monospace; }
.wf-trk-actype { font-size: 10px; color: rgba(226, 232, 240, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-trk-acstate { font-size: 9px; font-weight: 700; color: rgba(226, 232, 240, 0.4); flex-shrink: 0; }
.wf-trk-acstate-air { color: #ef4444; }

.wf-trk-acdetail {
  margin: 0 0 4px 22px; padding: 6px 8px; font-size: 11px;
  background: rgba(255, 255, 255, 0.03); border-radius: 5px;
}
.wf-trk-loading, .wf-trk-novol { color: rgba(226, 232, 240, 0.5); font-style: italic; }
.wf-trk-route { display: flex; align-items: center; gap: 6px; color: #f1f5f9; flex-wrap: wrap; }
.wf-trk-arrow { color: #fbbf24; }
.wf-trk-when { font-size: 10px; color: rgba(226, 232, 240, 0.5); margin-top: 2px; }

/* =============================================================
   SIDEBAR SX — Layer groups
   ============================================================= */
.app-left {
  padding: 4px 0 24px;
}

.wf-layer-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 0;
}

.wf-layer-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
}

.wf-layer-group-title {
  flex: 1;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
  min-width: 0;
}

.wf-layer-group-count {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  color: #fbbf24;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  flex-shrink: 0;
}

.wf-layer-group.is-collapsed .wf-layer-list {
  display: none;
}
.wf-layer-group.is-collapsed .wf-layer-group-header {
  padding-bottom: 14px;
}
.wf-layer-group.is-collapsed .wf-layer-group-title {
  color: rgba(255, 255, 255, 0.4);
}
.wf-layer-group.is-collapsed .wf-layer-group-count {
  color: #fbbf24;
}

/* titolo gruppo giallo quando ha almeno un layer attivo (anche se collassato) */
.wf-layer-group.has-active .wf-layer-group-title { color: #fbbf24; }

.wf-layer-list {
  padding: 0 8px 4px;
}

.wf-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 12px;
  user-select: none;
}

.wf-layer:hover { background: rgba(255, 255, 255, 0.03); }

.wf-layer-name {
  flex: 1;
  min-width: 0;
  color: rgba(226, 232, 240, 0.85);
  transition: color 0.12s;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-layer.is-on .wf-layer-name {
  color: #f1f5f9;
  font-weight: 500;
}

.wf-layer-live-badge {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 38px;
  height: 16px;
  box-sizing: border-box;
  padding: 0 0 0 8px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.32);
}
.wf-layer-live-badge::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transition: background 0.2s, box-shadow 0.2s;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}
.wf-layer.is-on .wf-layer-live-badge {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
}
.wf-layer.is-on .wf-layer-live-badge::before {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.85);
  animation: wf-live-pulse 1.5s ease-in-out infinite;
}
@keyframes wf-live-pulse {
  0%, 100% { opacity: 1;   transform: translateY(-50%) scale(1); }
  50%      { opacity: 0.45; transform: translateY(-50%) scale(0.7); }
}

.wf-layer-src {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 42px;
  height: 16px;
  box-sizing: border-box;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wf-layer-count {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 1;
}
.wf-layer.is-on .wf-layer-count { color: #fbbf24; }

/* Switch (riutilizzato per layer e per group-header) */
.wf-switch {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 14px;
  flex-shrink: 0;
}
.wf-switch input {
  opacity: 0; width: 0; height: 0;
  position: absolute; pointer-events: none;
}
.wf-switch-slider {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  transition: background 0.2s;
  cursor: pointer;
}
.wf-switch-slider::before {
  content: "";
  position: absolute;
  height: 10px; width: 10px; left: 2px; top: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.wf-switch input:checked + .wf-switch-slider { background: #fbbf24; }
.wf-switch input:checked + .wf-switch-slider::before {
  transform: translateX(12px);
  background: #0a0e1a;
}
.wf-switch input:focus-visible + .wf-switch-slider {
  outline: 2px solid rgba(251, 191, 36, 0.4);
  outline-offset: 2px;
}

.wf-switch.is-loading { pointer-events: none; }
.wf-switch.is-loading .wf-switch-slider,
.wf-switch.is-loading input:checked + .wf-switch-slider {
  background: rgba(251, 191, 36, 0.15);
}
.wf-switch.is-loading .wf-switch-slider::before,
.wf-switch.is-loading input:checked + .wf-switch-slider::before {
  width: 10px;
  height: 10px;
  left: 8px;
  top: 2px;
  background: transparent;
  border: 1.5px solid rgba(251, 191, 36, 0.25);
  border-top-color: #fbbf24;
  box-sizing: border-box;
  transform: none;
  animation: wf-switch-spinner 0.65s linear infinite;
  transition: none;
}

@keyframes wf-switch-spinner {
  to { transform: rotate(360deg); }
}

html.theme-light .wf-switch.is-loading .wf-switch-slider,
html.theme-light .wf-switch.is-loading input:checked + .wf-switch-slider {
  background: rgba(245, 158, 11, 0.12);
}
html.theme-light .wf-switch.is-loading .wf-switch-slider::before,
html.theme-light .wf-switch.is-loading input:checked + .wf-switch-slider::before {
  border-color: rgba(245, 158, 11, 0.3);
  border-top-color: #f59e0b;
}

/* =============================================================
   OVERLAY mobile
   ============================================================= */
.sidebar-overlay { display: none; }

/* =============================================================
   SOLE MARKER
   ============================================================= */
.sun-marker {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 250, 200, 1) 0%,
    rgba(255, 220, 100, 0.95) 30%,
    rgba(251, 191, 36, 0.7) 55%,
    rgba(251, 191, 36, 0.1) 80%,
    transparent 100%);
  border-radius: 50%;
  pointer-events: auto;
  cursor: help;
  filter: drop-shadow(0 0 12px rgba(255, 220, 100, 0.65));
  animation: sun-glow 3.5s ease-in-out infinite;
}

@keyframes sun-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 220, 100, 0.55));  transform: scale(1); }
  50%      { filter: drop-shadow(0 0 18px rgba(255, 220, 100, 0.85)); transform: scale(1.08); }
}

/* =============================================================
   ISS MARKER
   ============================================================= */
.wf-iss-marker {
  width: 36px;
  height: 36px;
  color: #fbbf24;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
  transition: transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: iss-pulse 2.4s ease-in-out infinite;
}
.wf-iss-marker:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 1));
}
.wf-iss-marker svg { display: block; }

@keyframes iss-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px  rgba(251, 191, 36, 0.65)); }
  50%      { filter: drop-shadow(0 0 16px rgba(251, 191, 36, 1));    }
}

/* =============================================================
   TOAST
   ============================================================= */
.wf-toast {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.96);
  color: #f1f5f9;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-left: 3px solid #fbbf24;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: 320px;
  backdrop-filter: blur(8px);
}
.wf-toast.is-visible { opacity: 1; transform: translateX(0); }
.wf-toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
  animation: toast-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes toast-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.75); }
}

/* =============================================================
   SATELLITES — pannello categorie HUD (alto-sinistra, layer satellites)
   ============================================================= */
/* contenitore pannelli nella sidebar destra */
.app-right-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  height: 100%;
  overflow-y: auto;
}

.wf-sat-panel {
  display: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #22d3ee;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.9);
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.wf-sat-panel.is-visible { display: block; }

/* Override quando wf-sat-panel è dentro wf-sublist (sidebar-left)
   — eredita stile sublist, niente doppio border/background */
.wf-sublist.wf-sat-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid #22d3ee;
  padding: 8px 10px 10px;
}

.wf-sat-panel .wsat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 2px;
}
.wf-sat-panel .wsat-total {
  margin-left: auto;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #22d3ee;
}
.wf-sat-panel .wsat-sub {
  font-size: 9px;
  color: rgba(226, 232, 240, 0.4);
  margin-bottom: 8px;
}
.wf-sat-panel .wsat-cats { display: flex; flex-direction: column; gap: 1px; }
.wf-sat-panel .wsat-cat {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 2px;
  cursor: pointer;
  border-radius: 3px;
}
.wf-sat-panel .wsat-cat:hover { background: rgba(255, 255, 255, 0.04); }
.wf-sat-panel .wsat-cat input { accent-color: #22d3ee; cursor: pointer; }
.wf-sat-panel .wsat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}
.wf-sat-panel .wsat-name { color: rgba(226, 232, 240, 0.8); }

/* categoria in caricamento: dot → spinner ciano */
.wf-sat-panel .wsat-cat.is-loading .wsat-dot {
  background: transparent !important;
  border: 1.5px solid rgba(34, 211, 238, 0.25);
  border-top-color: #22d3ee;
  box-shadow: none;
  animation: wf-switch-spinner 0.65s linear infinite;
}
.wf-sat-panel .wsat-cat.is-loading .wsat-name { color: rgba(226, 232, 240, 0.5); }
/* categoria senza risultati (fetch fallito/vuoto) */
.wf-sat-panel .wsat-cat.is-empty .wsat-name { color: #f87171; text-decoration: line-through; }

html.theme-light .wf-sat-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.1);
  border-left-color: #0891b2;
  color: rgba(15, 23, 42, 0.85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
html.theme-light .wf-sat-panel .wsat-head { color: #0f172a; }
html.theme-light .wf-sat-panel .wsat-total { color: #0891b2; }
html.theme-light .wf-sat-panel .wsat-name { color: rgba(15, 23, 42, 0.8); }

/* =============================================================
   SPACE WEATHER PANEL — docked in sidebar destra (layer aurore)
   ============================================================= */
.wf-space-panel {
  display: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #fbbf24;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.9);
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.wf-space-panel.is-visible { display: block; }

/* Override quando wf-space-panel è dentro wf-sublist (sidebar-left) */
.wf-sublist.wf-space-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid #fbbf24;
  padding: 8px 10px 10px;
}

.wf-space-panel .wsp-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}
.wf-space-panel .wsp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
  animation: toast-pulse 1.5s ease-in-out infinite;
}

.wf-space-panel .wsp-label { color: rgba(226, 232, 240, 0.55); }

.wf-space-panel .wsp-kp { margin-bottom: 8px; }
.wf-space-panel .wsp-kp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.wf-space-panel .wsp-kp-val {
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}
.wf-space-panel .wsp-kp.warn .wsp-kp-val { color: #fbbf24; }
.wf-space-panel .wsp-kp.hot  .wsp-kp-val { color: #f87171; }

.wf-space-panel .wsp-kp-bar {
  display: flex;
  gap: 2px;
  margin: 4px 0 3px;
}
.wf-space-panel .wsp-kp-bar span {
  flex: 1;
  height: 5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.wf-space-panel .wsp-kp-bar span.ok   { background: #34d399; }
.wf-space-panel .wsp-kp-bar span.warn { background: #fbbf24; }
.wf-space-panel .wsp-kp-bar span.hot  { background: #f87171; }
.wf-space-panel .wsp-storm { font-size: 10px; color: rgba(226, 232, 240, 0.7); }

.wf-space-panel .wsp-vis {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
  margin: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.wf-space-panel .wsp-vis strong { color: #fbbf24; font-size: 11px; }

.wf-space-panel .wsp-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
.wf-space-panel .wsp-v {
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  color: #e2e8f0;
}

.wf-space-panel .wsp-scales {
  display: flex;
  gap: 5px;
  margin: 8px 0 4px;
}
.wf-space-panel .wsp-scale {
  flex: 1;
  text-align: center;
  padding: 3px 0;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}
.wf-space-panel .wsp-scale.s1, .wf-space-panel .wsp-scale.s2 {
  background: rgba(251, 191, 36, 0.15); color: #fbbf24;
}
.wf-space-panel .wsp-scale.s3, .wf-space-panel .wsp-scale.s4, .wf-space-panel .wsp-scale.s5 {
  background: rgba(248, 113, 113, 0.18); color: #f87171;
}

.wf-space-panel .wsp-alert {
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 3px;
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  font-size: 10px;
}

.wf-space-panel .wsp-foot {
  margin-top: 8px;
  font-size: 9px;
  color: rgba(226, 232, 240, 0.4);
  text-align: right;
}

/* Light mode */
html.theme-light .wf-space-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.1);
  border-left-color: #f59e0b;
  color: rgba(15, 23, 42, 0.85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
html.theme-light .wf-space-panel .wsp-head { color: rgba(15, 23, 42, 0.5); }
html.theme-light .wf-space-panel .wsp-label { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-space-panel .wsp-kp-val { color: #0f172a; }
html.theme-light .wf-space-panel .wsp-kp.warn .wsp-kp-val { color: #b45309; }
html.theme-light .wf-space-panel .wsp-v { color: #0f172a; }
html.theme-light .wf-space-panel .wsp-vis strong { color: #b45309; }
html.theme-light .wf-space-panel .wsp-storm { color: rgba(15, 23, 42, 0.7); }

html.theme-light .app-right-panels .wf-space-panel,
html.theme-light .app-right-panels .wf-sat-panel { background: rgba(15, 23, 42, 0.03); }

html.theme-light .wf-toast {
  background: rgba(255, 255, 255, 0.98);
  color: #1e293b;
  border-color: rgba(245, 158, 11, 0.5);
  border-left-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

/* =============================================================
   POPUP MAPLIBRE PERSONALIZZATO
   ============================================================= */
.wf-maplibre-popup .maplibregl-popup-content {
  background: rgba(15, 23, 42, 0.97);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.wf-maplibre-popup .maplibregl-popup-tip {
  border-top-color: rgba(15, 23, 42, 0.97) !important;
  border-bottom-color: rgba(15, 23, 42, 0.97) !important;
}

.wf-maplibre-popup .maplibregl-popup-close-button {
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  padding: 2px 8px;
  right: 2px;
  top: 0;
}
.wf-maplibre-popup .maplibregl-popup-close-button:hover {
  color: #fbbf24;
  background: transparent;
}

.wf-popup-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: #fbbf24;
  color: #0a0e1a;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}

.wf-popup-title {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.wf-popup-subtitle {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  margin-bottom: 8px;
}

.wf-popup-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wf-popup-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 5px;
}

.wf-popup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 11px;
}
.wf-popup-row span { color: rgba(255, 255, 255, 0.5); }
.wf-popup-row strong {
  color: #e2e8f0;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-weight: 500;
}

/* =============================================================
   CICLONI — DOM marker emoji 🌀 con rotazione + glow
   ============================================================= */
.wf-cyclone-marker {
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 8px currentColor;
  filter: drop-shadow(0 0 4px currentColor);
  animation: wf-cyclone-spin 6s linear infinite;
  cursor: pointer;
  pointer-events: auto;
}
@keyframes wf-cyclone-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* =============================================================
   RADAR / GDELT — sub-panel slider e select compatti
   ============================================================= */
.wf-radar-row {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wf-radar-row .wf-radar-label {
  font-size: 10.5px;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
}
.wf-radar-row .wf-radar-label span {
  color: #e2e8f0;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
}
.wf-radar-row input[type="range"] {
  width: 100%;
  accent-color: #fbbf24;
}
.wf-radar-row select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  outline: none;
}
.wf-radar-row-checks {
  flex-direction: row;
  justify-content: space-between;
  gap: 8px;
}
.wf-radar-row-checks label {
  flex: 1;
  font-size: 10.5px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* v2.0 — controlli animazione radar (play + timeline) */
.wf-radar-anim {
  display: flex; align-items: center; gap: 8px; padding: 6px 0 2px;
}
.wf-radar-play {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: #38bdf8; color: #04141f; border: 0; cursor: pointer;
  font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.wf-radar-play:hover { background: #7dd3fc; }
.wf-radar-slider { flex: 1; accent-color: #38bdf8; }
.wf-radar-time {
  font-size: 11px; color: #e2e8f0; font-family: 'SF Mono','JetBrains Mono',monospace;
  text-align: center; padding: 2px 0 4px;
}
.wf-radar-time.is-forecast { color: #fbbf24; font-weight: 600; }
html.theme-light .wf-radar-time { color: #0f172a; }

html.theme-light .wf-radar-row .wf-radar-label { color: rgba(0,0,0,0.5); }
html.theme-light .wf-radar-row .wf-radar-label span { color: #0f172a; }
html.theme-light .wf-radar-row select {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: #0f172a;
}
html.theme-light .wf-radar-row-checks label { color: rgba(0,0,0,0.7); }

/* =============================================================
   FLIGHTS — search compagnie + lista scrollabile
   ============================================================= */
.wf-airline-search {
  padding: 4px 0 4px;
}
.wf-airline-search input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
}
.wf-airline-search input:focus { border-color: rgba(34,211,238,0.5); }
.wf-airline-search input::placeholder { color: rgba(255,255,255,0.3); }

.wf-airline-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}
.wf-airline-list::-webkit-scrollbar { width: 6px; }
.wf-airline-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
.wf-airline-empty {
  font-size: 10.5px;
  color: rgba(255,255,255,0.4);
  padding: 8px 4px;
  text-align: center;
  font-style: italic;
}

html.theme-light .wf-airline-search input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: #0f172a;
}
html.theme-light .wf-airline-search input::placeholder { color: rgba(0,0,0,0.35); }
html.theme-light .wf-airline-empty { color: rgba(0,0,0,0.45); }

/* =============================================================
   FLIGHT POPUP HEADER (logo airline + nome + flight code)
   ============================================================= */
.wf-flight-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.wf-flight-logo {
  width: 60px;
  height: 20px;
  object-fit: contain;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  padding: 2px;
  flex-shrink: 0;
}
.wf-flight-head-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.wf-flight-airline {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-flight-flightno {
  font-size: 11px;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  color: #22d3ee;
  letter-spacing: 0.02em;
}

/* =============================================================
   CREW LIST (2 righe per membro: nome+CMDR sopra, meta sotto)
   ============================================================= */
.wf-popup-crew {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wf-popup-crew li {
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  line-height: 1.3;
}
.wf-popup-crew li:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}
.wf-popup-crew li:first-child {
  padding-top: 2px;
}

.wf-popup-crew-row1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-popup-crew-name {
  flex: 1;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
}

.wf-popup-crew-cmdr {
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 4px;
  border-radius: 2px;
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.wf-popup-crew-meta {
  display: block;
  margin-top: 3px;
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.03em;
}

.wf-popup-loading {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  padding: 4px 0;
}

.wf-popup-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
}

.wf-popup-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wf-popup-link:hover { color: #f59e0b; text-decoration: underline; }

/* Allerta tsunami nel popup sisma */
.wf-popup-tsunami {
  margin: 8px 0 2px;
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0a0e1a;
  background: #22d3ee;
}

/* =============================================================
   VULCANO IN ERUZIONE — marker DOM pulsante rosso
   ============================================================= */
.wf-volcano-erupting {
  width: 16px;
  height: 16px;
  cursor: pointer;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 230, 150, 1) 0%,
    rgba(249, 115, 22, 0.95) 35%,
    rgba(239, 68, 68, 0.85) 65%,
    rgba(239, 68, 68, 0.1) 90%,
    transparent 100%);
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8));
}
.wf-volcano-erupting::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.7);
  animation: wf-volcano-pulse 1.6s ease-out infinite;
}
@keyframes wf-volcano-pulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* =============================================================
   TSUNAMI — marker DOM ciano pulsante (anelli concentrici)
   ============================================================= */
.wf-tsunami-marker {
  width: 14px;
  height: 14px;
  cursor: pointer;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(165, 243, 252, 1) 0%,
    rgba(34, 211, 238, 0.9) 45%,
    rgba(34, 211, 238, 0.15) 80%,
    transparent 100%);
  filter: drop-shadow(0 0 7px rgba(34, 211, 238, 0.8));
}
.wf-tsunami-marker::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(34, 211, 238, 0.7);
  animation: wf-tsunami-pulse 1.8s ease-out infinite;
}
@keyframes wf-tsunami-pulse {
  0%   { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(2);   opacity: 0; }
}

html.theme-light .wf-maplibre-popup .maplibregl-popup-content {
  background: rgba(255, 255, 255, 0.98);
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}
html.theme-light .wf-maplibre-popup .maplibregl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.98) !important;
  border-bottom-color: rgba(255, 255, 255, 0.98) !important;
}
html.theme-light .wf-popup-title { color: #0f172a; }
html.theme-light .wf-popup-subtitle { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-popup-section { border-top-color: rgba(15, 23, 42, 0.08); }
html.theme-light .wf-popup-section-title { color: rgba(15, 23, 42, 0.45); }
html.theme-light .wf-popup-row span { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-popup-row strong { color: #1e293b; }
html.theme-light .wf-popup-crew li { border-bottom-color: rgba(15, 23, 42, 0.07); }
html.theme-light .wf-popup-crew-name { color: #1e293b; }
html.theme-light .wf-popup-crew-cmdr { background: rgba(245, 158, 11, 0.18); color: #b45309; }
html.theme-light .wf-popup-crew-meta { color: rgba(15, 23, 42, 0.5); }
html.theme-light .wf-popup-loading { color: rgba(15, 23, 42, 0.45); }
html.theme-light .wf-popup-foot { color: rgba(15, 23, 42, 0.4); border-top-color: rgba(15, 23, 42, 0.08); }
html.theme-light .wf-popup-link { color: #b45309; }
html.theme-light .wf-popup-link:hover { color: #92400e; }

/* =============================================================
   MAP CONTROLS — unico pannello verticale (basso sinistra)
   ============================================================= */
.map-controls {
  position: absolute;
  bottom: 16px;
  left: 10px;
  z-index: 10;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  width: 88px;
  font-size: 10px;
  color: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.mc-toggle {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 2px 0;
}

.mc-toggle button {
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 6px 4px;
  font-size: 10px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}

.mc-toggle button:hover {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.03);
}

.mc-toggle button.active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  font-weight: 600;
}

.map-controls .mc-sep {
  width: calc(100% - 16px);
  height: 1px;
  margin: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
}

.mc-zoom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  gap: 4px;
}

.mc-zoom-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 400;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, background 0.12s;
}
.mc-zoom-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}
.mc-zoom-btn:active {
  background: rgba(255, 255, 255, 0.10);
}

.mc-zoom-display {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  color: rgba(226, 232, 240, 0.85);
  font-size: 10px;
  min-width: 28px;
  text-align: center;
  line-height: 1;
}

/* Locate me & Fullscreen */
.mc-locate-btn,
.mc-fullscreen-btn {
  width: 100%;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
  font-family: inherit;
}
.mc-locate-btn:hover,
.mc-fullscreen-btn:hover {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.03);
}
.mc-locate-btn .mc-icon,
.mc-fullscreen-btn .mc-icon { display: block; }

.mc-fullscreen-btn.active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.mc-fullscreen-btn .mc-icon-compress { display: none; }
.mc-fullscreen-btn.active .mc-icon-expand { display: none; }
.mc-fullscreen-btn.active .mc-icon-compress { display: block; }

.mc-locate-btn.is-loading {
  color: #fbbf24;
  pointer-events: none;
  animation: mc-locate-pulse 0.9s ease-in-out infinite;
}
.mc-locate-btn.is-active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

/* --- Pegman / Street View --- */
.mc-pegman-btn {
  width: 100%;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: grab;
  transition: color 0.12s, background 0.12s;
  font-family: inherit;
  touch-action: none;
}
.mc-pegman-btn:hover { color: #fbbf24; background: rgba(255, 255, 255, 0.03); }
.mc-pegman-btn .mc-icon { display: block; }
html.theme-light .mc-pegman-btn { color: rgba(15, 23, 42, 0.55); }
html.theme-light .mc-pegman-btn:hover { color: #d97706; background: rgba(15, 23, 42, 0.04); }

/* fantasma trascinato + cursore mappa durante il drag */
.wf-pegman-ghost {
  position: fixed; z-index: 9999; width: 26px; height: 26px;
  margin-left: -13px; margin-top: -26px; pointer-events: none;
  background: #fbbf24;
  -webkit-mask: var(--peg) center/contain no-repeat; mask: var(--peg) center/contain no-repeat;
  --peg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='2.6' r='1.9'/><path d='M8 5.2c-1.6 0-2.6 1-2.9 2.4L4.4 11h1.7l.5 4h2.8l.5-4h1.7l-.7-3.4C10.6 6.2 9.6 5.2 8 5.2z'/></svg>");
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
body.wf-pegman-dragging,
body.wf-pegman-dragging #globe,
body.wf-pegman-dragging .maplibregl-canvas { cursor: crosshair !important; }

/* marker posizione pano su MapLibre + cono direzione */
.wf-sv-posmark { position: relative; width: 0; height: 0; }
.wf-sv-posmark .wf-sv-dot {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px;
  background: #fbbf24; border: 2px solid #1a1a1a; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(251,191,36,0.35);
}
.wf-sv-posmark .wf-sv-cone {
  position: absolute; left: -16px; top: -34px; width: 32px; height: 32px;
  background: radial-gradient(closest-side at 50% 100%, rgba(251,191,36,0.55), rgba(251,191,36,0) 70%);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* overlay panorama Street View (card flottante basso-destra) */
.wf-sv-overlay {
  position: fixed; right: 16px; bottom: 16px; z-index: 1200;
  width: 520px; max-width: calc(100vw - 32px);
  height: 360px; max-height: calc(100vh - 120px);
  display: none; flex-direction: column;
  background: #0b0f14; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}
.wf-sv-overlay.is-open { display: flex; }
.wf-sv-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wf-sv-title { font-size: 11px; letter-spacing: 0.08em; font-weight: 700; color: #fbbf24; }
.wf-sv-meta { font-size: 11px; color: rgba(255,255,255,0.55); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-sv-close {
  background: transparent; border: none; color: rgba(255,255,255,0.6);
  font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 4px;
}
.wf-sv-close:hover { color: #fff; }
.wf-sv-pano { flex: 1; min-height: 0; }
.wf-sv-pano .gm-style, .wf-sv-pano > div { width: 100% !important; height: 100% !important; }
@media (max-width: 640px) {
  .wf-sv-overlay { right: 8px; left: 8px; width: auto; height: 300px; }
}

/* --- Watch-zone panel --- */
.wf-wz {
  position: fixed; left: 288px; top: 56px; z-index: 1150;
  width: 340px; max-width: calc(100vw - 32px); max-height: calc(100vh - 140px);
  display: flex; flex-direction: column;
  background: #0b0f14; border: 1px solid rgba(251,191,36,0.35);
  border-radius: 10px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}
.wf-wz.wf-wz-dragging { box-shadow: 0 16px 50px rgba(0,0,0,0.7); opacity: 0.96; }
.wf-wz-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(251,191,36,0.12); border-bottom: 1px solid rgba(251,191,36,0.25);
  cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; }
.wf-wz-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #fbbf24; flex: 1; }
.wf-wz-close { background: transparent; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 14px; }
.wf-wz-close:hover { color: #fff; }
.wf-wz-zones { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; }
.wf-wz-zone-opt { display: flex; align-items: center; gap: 7px; padding: 3px 5px; border-radius: 6px; cursor: pointer; font-size: 12px; color: rgba(255,255,255,0.8); }
.wf-wz-zone-opt:hover { background: rgba(255,255,255,0.05); }
.wf-wz-zone-opt input { accent-color: #fbbf24; margin: 0; flex: none; }
.wf-wz-zone-opt input:checked + span { color: #fbbf24; }
.wf-wz-zone-opt span { line-height: 1.2; }
.wf-wz-stats { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.wf-wz-total { font-size: 12px; color: rgba(255,255,255,0.8); }
.wf-wz-total strong { font-size: 18px; color: #fff; }
.wf-wz-spike { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #0a0e1a;
  background: #fbbf24; padding: 1px 7px; border-radius: 10px; }
.wf-wz-chips { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.wf-wz-chip { font-size: 10px; color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06);
  padding: 1px 7px; border-radius: 8px; cursor: pointer; user-select: none; }
.wf-wz-chip:hover { background: rgba(255,255,255,0.12); }
.wf-wz-chip.is-active { background: #fbbf24; color: #0a0e1a; font-weight: 700; }
.wf-wz-list { overflow-y: auto; flex: 1; }
.wf-wz-item { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.wf-wz-item:hover { background: rgba(255,255,255,0.03); }
.wf-wz-src { font-size: 10px; font-weight: 700; color: #fbbf24; }
.wf-wz-when { font-size: 10px; color: rgba(255,255,255,0.4); float: right; }
.wf-wz-txt { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 2px; line-height: 1.35; }
.wf-wz-empty { padding: 14px; text-align: center; color: rgba(255,255,255,0.4); font-size: 12px; }
@media (max-width: 640px) { .wf-wz { left: 8px; right: 8px; width: auto; } }

/* --- pannello KEV (vuln sfruttate) --- */
.wf-kev {
  position: fixed; right: 16px; top: 56px; z-index: 1150;
  width: 380px; max-width: calc(100vw - 32px); max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  background: #0b0f14; border: 1px solid rgba(251,191,36,0.35);
  border-radius: 10px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}
.wf-kev.wf-kev-dragging { box-shadow: 0 16px 50px rgba(0,0,0,0.7); opacity: 0.96; }
.wf-kev-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(251,191,36,0.12); border-bottom: 1px solid rgba(251,191,36,0.25);
  cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; }
.wf-kev-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #fbbf24; flex: 1; }
.wf-kev-close { background: transparent; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 14px; }
.wf-kev-close:hover { color: #fff; }
.wf-kev-stats { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.wf-kev-total { font-size: 12px; color: rgba(255,255,255,0.8); }
.wf-kev-total strong { font-size: 16px; color: #fbbf24; }
.wf-kev-ctrl { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); align-items: center; }
.wf-kev-search { flex: 1 1 140px; min-width: 120px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.wf-kev-chk { font-size: 11px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.wf-kev-chk input { accent-color: #fbbf24; }
.wf-kev-sort { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #fff; border-radius: 6px; font-size: 11px; padding: 3px 4px; }
.wf-kev-list { overflow-y: auto; flex: 1; }
.wf-kev-item { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.wf-kev-item:hover { background: rgba(255,255,255,0.03); }
.wf-kev-r1 { display: flex; align-items: center; gap: 6px; }
.wf-kev-cve { font-family: monospace; font-size: 11px; font-weight: 700; color: #fbbf24; }
.wf-kev-epss { font-size: 10px; font-weight: 700; }
.wf-kev-cvss { font-size: 10px; font-weight: 700; color: #0a0e1a; padding: 0 5px; border-radius: 8px; }
.wf-kev-rw { font-size: 10px; }
.wf-kev-when { font-size: 10px; color: rgba(255,255,255,0.4); margin-left: auto; }
.wf-kev-vp { font-size: 11px; color: rgba(255,255,255,0.85); margin-top: 2px; }
.wf-kev-name { font-size: 10px; color: rgba(255,255,255,0.55); margin-top: 1px; line-height: 1.3; }
.wf-kev-empty { padding: 14px; text-align: center; color: rgba(255,255,255,0.4); font-size: 12px; }
.wf-kev-more { padding: 8px 10px; text-align: center; color: rgba(255,255,255,0.4); font-size: 11px; }
.wf-mb { left: 288px; right: auto; top: 56px; }     /* offset da KEV (che sta a destra) */
.wf-csirt { left: auto; right: 410px; top: 56px; }  /* offset: appena a sinistra di KEV */
@media (max-width: 640px) { .wf-kev, .wf-mb, .wf-csirt { left: 8px; right: 8px; width: auto; } }

@keyframes mc-locate-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* =============================================================
   MAPLIBRE OVERRIDE
   ============================================================= */
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left { z-index: 5; }

.maplibregl-ctrl-attrib {
  background: rgba(0, 0, 0, 0.5) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 10px;
}
.maplibregl-ctrl-attrib a { color: rgba(255, 255, 255, 0.6) !important; }

/* =============================================================
   UIkit OVERRIDE
   ============================================================= */
:root {
  --uk-color-primary: #fbbf24;
  --uk-color-secondary: #0a0e1a;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* =============================================================
   LIGHT MODE OVERRIDES
   ============================================================= */
html.theme-light, html.theme-light body {
  background: #f1f5f9;
  color: #1e293b;
}

html.theme-light .app-header  { background: rgba(255, 255, 255, 0.98); border-bottom-color: rgba(15, 23, 42, 0.08); }
html.theme-light .app-left    { background: rgba(248, 250, 252, 0.98); border-right-color: rgba(15, 23, 42, 0.08); }
html.theme-light .app-right   { background: rgba(248, 250, 252, 0.98); border-left-color: rgba(15, 23, 42, 0.08); }
html.theme-light .app-footer  { background: rgba(255, 255, 255, 0.98); border-top-color: rgba(15, 23, 42, 0.08); }
html.theme-light .app-main    { background-color: #e2e8f0; background-image: none; }

html.theme-light .hdr-brand   { color: #0f172a; }
html.theme-light .hdr-brand:hover { color: #000000; }

html.theme-light .hdr-btn {
  color: rgba(15, 23, 42, 0.7);
  border-color: rgba(15, 23, 42, 0.1);
}
html.theme-light .hdr-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.2);
}

html.theme-light .wf-layer-group { border-bottom-color: rgba(15, 23, 42, 0.06); }
html.theme-light .wf-layer-group-title { color: rgba(15, 23, 42, 0.85); }
html.theme-light .wf-layer-group-count { color: #d97706; }
html.theme-light .wf-layer-group.is-collapsed .wf-layer-group-title { color: rgba(15, 23, 42, 0.4); }
html.theme-light .wf-layer-group.is-collapsed .wf-layer-group-count { color: #d97706; }
html.theme-light .wf-layer-group.has-active .wf-layer-group-title { color: #d97706; }
html.theme-light .wf-layer-name { color: rgba(15, 23, 42, 0.75); }
html.theme-light .wf-layer.is-on .wf-layer-name { color: #0f172a; }
html.theme-light .wf-layer-src {
  color: rgba(15, 23, 42, 0.55);
  background: rgba(15, 23, 42, 0.05);
}
html.theme-light .wf-layer-count { color: rgba(15, 23, 42, 0.4); }
html.theme-light .wf-layer:hover { background: rgba(15, 23, 42, 0.03); }
html.theme-light .wf-switch-slider { background: rgba(15, 23, 42, 0.15); }
html.theme-light .wf-switch-slider::before { background: rgba(15, 23, 42, 0.5); }

html.theme-light .wf-layer-live-badge {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.4);
}
html.theme-light .wf-layer-live-badge::before {
  background: rgba(15, 23, 42, 0.3);
}
html.theme-light .wf-layer.is-on .wf-layer-live-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}
html.theme-light .wf-layer.is-on .wf-layer-live-badge::before {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}

html.theme-light ::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); }
html.theme-light ::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.3); }

html.theme-light .sidebar-overlay { background: rgba(15, 23, 42, 0.35); }

html.theme-light .map-controls {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.1);
  color: rgba(15, 23, 42, 0.85);
}
html.theme-light .mc-toggle button { color: rgba(15, 23, 42, 0.5); }
html.theme-light .mc-toggle button:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
}
html.theme-light .mc-toggle button.active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}
html.theme-light .map-controls .mc-sep { background: rgba(15, 23, 42, 0.08); }
html.theme-light .mc-zoom-btn { color: rgba(15, 23, 42, 0.55); }
html.theme-light .mc-zoom-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}
html.theme-light .mc-zoom-display { color: #1e293b; }

html.theme-light .mc-locate-btn,
html.theme-light .mc-fullscreen-btn {
  color: rgba(15, 23, 42, 0.5);
}
html.theme-light .mc-locate-btn:hover,
html.theme-light .mc-fullscreen-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
}
html.theme-light .mc-fullscreen-btn.active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}
html.theme-light .mc-locate-btn.is-loading {
  color: #b45309;
}
html.theme-light .mc-locate-btn.is-active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

@media (max-width: 991px) {
  html.theme-light .app-left,
  html.theme-light .app-right {
    box-shadow: 0 0 24px rgba(15, 23, 42, 0.18);
  }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 1199px) {
  .app { grid-template-columns: 240px 1fr 280px; }
}

@media (max-width: 991px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "footer";
  }

  .app-left,
  .app-right {
    grid-area: unset;
    position: fixed;
    top: 56px;
    bottom: 44px;
    width: 280px;
    z-index: 60;
    transition: transform 0.25s ease;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.6);
  }

  .app-left  { left: 0;  transform: translateX(-100%); border-right: 1px solid rgba(255, 255, 255, 0.1); }
  .app-right { right: 0; transform: translateX(100%);  border-left: 1px solid rgba(255, 255, 255, 0.1); }

  .app-left.is-open,
  .app-right.is-open { transform: translateX(0); }

  .hdr-btn-sidebar { display: flex; }

  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 44px;
    background: rgba(0, 0, 0, 0.55);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(2px);
  }

  body.has-sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .app-left,
  .app-right {
    width: 86vw;
    max-width: 320px;
  }

  .app-header { padding: 0 10px; gap: 8px; }
  .hdr-brand  { font-size: 14px; }
  .hdr-cta    { padding: 6px 11px; font-size: 11px; }

  .wf-toast { top: 64px; right: 10px; font-size: 11px; }

  .map-controls { transform: scale(0.92); transform-origin: bottom left; }
}

@media (max-width: 480px) {
  .map-controls {
    transform: scale(0.88);
    transform-origin: bottom left;
  }
  .hdr-right { gap: 6px; }
  .hdr-cta   { padding: 6px 9px; font-size: 10px; }
}

/* =============================================================
   wf-sublist: pannello filtri secondari sotto un layer
   (es. filtri fuel per centrali elettriche)
   ============================================================= */
.wf-sublist {
  margin: 2px 8px 6px 30px;
  padding: 8px 10px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.wf-sublist[hidden] { display: none; }

.wf-sublist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.wf-sublist-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(226, 232, 240, 0.65);
}
.wf-sublist-actions { display: flex; gap: 4px; }
.wf-sublist-btn {
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.55);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.wf-sublist-btn:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
}

.wf-sublist-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wf-fuel-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.75);
  transition: background 0.12s;
  user-select: none;
}
.wf-fuel-row:hover { background: rgba(255, 255, 255, 0.03); }
.wf-fuel-row input[type="checkbox"] {
  margin: 0;
  width: 12px;
  height: 12px;
  accent-color: #fbbf24;
  cursor: pointer;
}
.wf-fuel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) inset;
}
.wf-fuel-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-fuel-count {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.03em;
}

/* light mode adattamento */
html.theme-light .wf-sublist {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.07);
}
html.theme-light .wf-sublist-title {
  color: rgba(15, 23, 42, 0.7);
}
html.theme-light .wf-sublist-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
html.theme-light .wf-sublist-btn {
  color: rgba(15, 23, 42, 0.6);
  border-color: rgba(0, 0, 0, 0.1);
}
html.theme-light .wf-fuel-row { color: rgba(15, 23, 42, 0.8); }
html.theme-light .wf-fuel-row:hover { background: rgba(0, 0, 0, 0.03); }
html.theme-light .wf-fuel-count { color: rgba(15, 23, 42, 0.4); }

/* DOM marker simbolo nucleare ☢ su centrali Nuclear */
.wf-power-nuclear-marker {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 14px;
  color: #fde047;
  text-shadow:
    0 0 2px #0a0e1a,
    0 0 3px #0a0e1a,
    0 0 4px #0a0e1a;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transform: translateZ(0);
}
.wf-power-nuclear-marker:hover {
  color: #ffffff;
  text-shadow:
    0 0 3px #fde047,
    0 0 6px #fde047,
    0 0 9px #fde047;
}

/* DOM marker ✈ aeroporti grandi */
.wf-airport-marker {
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 12px;
  color: #93c5fd;
  text-shadow:
    0 0 2px #0a0e1a,
    0 0 3px #0a0e1a,
    0 0 4px #0a0e1a;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transform: translateZ(0) rotate(-30deg);
}
.wf-airport-marker:hover {
  color: #ffffff;
  text-shadow:
    0 0 3px #3b82f6,
    0 0 6px #3b82f6,
    0 0 9px #3b82f6;
}

/* DOM marker ☢ siti nucleari militari */
.wf-nuke-marker {
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 15px;
  color: #fde047;
  text-shadow:
    0 0 2px #0a0e1a,
    0 0 4px #0a0e1a,
    0 0 6px #b91c1c;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  animation: wf-nuke-pulse 2.4s ease-in-out infinite;
}
.wf-nuke-marker:hover {
  color: #ffffff;
  text-shadow: 0 0 4px #fde047, 0 0 8px #ef4444, 0 0 14px #b91c1c;
  animation: none;
}
@keyframes wf-nuke-pulse {
  0%, 100% { transform: scale(1);   text-shadow: 0 0 2px #0a0e1a, 0 0 4px #0a0e1a, 0 0 6px #b91c1c; }
  50%      { transform: scale(1.15); text-shadow: 0 0 3px #fde047, 0 0 8px #ef4444, 0 0 12px #dc2626; }
}

/* DOM marker 📷 webcam Windy */
.wf-webcam-marker {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(34,211,238,0.7)) drop-shadow(0 0 1px #000);
  transition: transform 0.12s;
}
.wf-webcam-marker:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 4px #22d3ee) drop-shadow(0 0 8px #22d3ee);
}

/* Thumbnail webcam popup */
.wf-webcam-img {
  margin: 6px 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}
.wf-webcam-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}

/* DOM marker 🎥 telecamere autostradali IT (Autostrade per l'Italia) */
.wf-autostrade-marker {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(249,115,22,0.75)) drop-shadow(0 0 1px #000);
  transition: transform 0.12s;
}
.wf-autostrade-marker:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 4px #f97316) drop-shadow(0 0 8px #f97316);
}

/* Video MP4 popup telecamere autostradali */
.wf-popup-video {
  margin: 6px 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}
.wf-autostrade-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  background: #000;
}

/* DOM marker 📷 telecamere ANAS (strade statali + autostrade ANAS) · glow blu ANAS */
.wf-anas-marker {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(0,61,165,0.8)) drop-shadow(0 0 1px #000);
  transition: transform 0.12s;
}
.wf-anas-marker:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 4px #003da5) drop-shadow(0 0 8px #2563eb);
}

/* Snapshot JPEG popup telecamere ANAS (immagine auto-refresh 30s) */
.wf-anas-img {
  margin: 6px 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}
.wf-anas-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}
html.theme-light .wf-anas-img { border-color: rgba(15,23,42,0.1); }

/* ============================================================
   Telecamere reti MULTI-FONTE (reticam) · marker colore per fonte
   Colori: tfl #e2231a (rosso UK), digitraffic #0033a0 (blu FIN),
   caltrans #ff9d00 (arancio CA/US), wsdot #3a7d3a (verde WA/US),
   default/base #14b8a6 (teal).
   Glow del colore fonte.
   ============================================================ */
.wf-reticam-marker {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  /* default (fonti non note): teal */
  filter: drop-shadow(0 0 2px rgba(20,184,166,0.85)) drop-shadow(0 0 1px #000);
  transition: transform 0.12s;
}
.wf-reticam-marker:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 4px #14b8a6) drop-shadow(0 0 8px #2dd4bf);
}
/* TfL Londra · rosso UK */
.wf-reticam-marker--tfl {
  filter: drop-shadow(0 0 2px rgba(226,35,26,0.85)) drop-shadow(0 0 1px #000);
}
.wf-reticam-marker--tfl:hover {
  filter: drop-shadow(0 0 4px #e2231a) drop-shadow(0 0 8px #f87171);
}
/* Digitraffic FI · blu Finlandia */
.wf-reticam-marker--digitraffic {
  filter: drop-shadow(0 0 2px rgba(0,51,160,0.9)) drop-shadow(0 0 1px #000);
}
.wf-reticam-marker--digitraffic:hover {
  filter: drop-shadow(0 0 4px #0033a0) drop-shadow(0 0 8px #2563eb);
}
/* Caltrans CA, USA · arancio */
.wf-reticam-marker--caltrans {
  filter: drop-shadow(0 0 2px rgba(255,157,0,0.9)) drop-shadow(0 0 1px #000);
}
.wf-reticam-marker--caltrans:hover {
  filter: drop-shadow(0 0 4px #ff9d00) drop-shadow(0 0 8px #fbbf24);
}
/* WSDOT WA, USA · verde */
.wf-reticam-marker--wsdot {
  filter: drop-shadow(0 0 2px rgba(58,125,58,0.9)) drop-shadow(0 0 1px #000);
}
.wf-reticam-marker--wsdot:hover {
  filter: drop-shadow(0 0 4px #3a7d3a) drop-shadow(0 0 8px #6abf6a);
}

/* Snapshot JPEG popup telecamere reti (immagine auto-refresh 30s) */
.wf-reticam-img {
  margin: 6px 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}
.wf-reticam-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}
html.theme-light .wf-reticam-img { border-color: rgba(15,23,42,0.1); }

/* Video MP4 popup reticam (render=video, es. ASPI/TfL) · stessa resa di autostrade */
.wf-reticam-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  background: #000;
}
/* Iframe embed popup reticam (render=iframe, es. YouTube) · aspect-ratio 16:9 */
.wf-reticam-embed {
  position: relative;
  width: 320px;
  max-width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin: 6px 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}
.wf-reticam-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
html.theme-light .wf-reticam-embed { border-color: rgba(15,23,42,0.1); }

/* Tag fonte nel popup (colore di brand per fonte) */
.wf-popup-tag.wf-reticam-tag--tfl         { background:#e2231a; color:#fff; }
.wf-popup-tag.wf-reticam-tag--digitraffic { background:#0033a0; color:#fff; }
.wf-popup-tag.wf-reticam-tag--caltrans    { background:#ff9d00; color:#3a2400; }
.wf-popup-tag.wf-reticam-tag--wsdot       { background:#3a7d3a; color:#fff; }
/* default/fonti future */
.wf-popup-tag[class*="wf-reticam-tag--"]:not(.wf-reticam-tag--tfl):not(.wf-reticam-tag--digitraffic):not(.wf-reticam-tag--caltrans):not(.wf-reticam-tag--wsdot) {
  background:#14b8a6; color:#06281f;
}

/* Dot colore fonte nella lista filtri sub-panel (eredita .wf-fuel-dot) */
.wf-fuel-dot.wf-reticam-dot--tfl         { background:#e2231a; }
.wf-fuel-dot.wf-reticam-dot--digitraffic { background:#0033a0; }
.wf-fuel-dot.wf-reticam-dot--caltrans    { background:#ff9d00; }
.wf-fuel-dot.wf-reticam-dot--wsdot       { background:#3a7d3a; }
.wf-fuel-dot[class*="wf-reticam-dot--"]:not(.wf-reticam-dot--tfl):not(.wf-reticam-dot--digitraffic):not(.wf-reticam-dot--caltrans):not(.wf-reticam-dot--wsdot) {
  background:#14b8a6;
}

/* DOM marker ▶️ live cam YouTube geolocalizzate · glow ROSSO YouTube */
.wf-youtube-marker {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(255,0,0,0.85)) drop-shadow(0 0 1px #000);
  transition: transform 0.12s;
}
.wf-youtube-marker:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 4px #ff0000) drop-shadow(0 0 8px #ff0000);
}

/* Player embed iframe popup YouTube · responsive 16:9 (lazy, solo all'apertura) */
.wf-youtube-embed {
  position: relative;
  width: 320px;
  max-width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin: 6px 0;
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
}
.wf-youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
html.theme-light .wf-youtube-embed { border-color: rgba(15,23,42,0.1); }

/* =============================================================
   ASTEROIDI NEO — overlay attorno al globo (no geo coord)
   ============================================================= */
.wf-asteroids-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.wf-asteroid {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #67e8f9 0%, #22d3ee 45%, #0e7490 100%);
  box-shadow:
    0 0 0 1px rgba(253, 224, 71, 0.6),
    0 0 8px rgba(34, 211, 238, 0.55),
    0 0 16px rgba(34, 211, 238, 0.25);
  cursor: pointer;
  pointer-events: auto;
  animation: wf-ast-drift 14s ease-in-out infinite, wf-ast-pulse 2.4s ease-in-out infinite;
  animation-delay: var(--ast-delay, 0s), var(--ast-delay, 0s);
  --ast-drift-x: 0px;
  --ast-drift-y: 0px;
  transition: transform 0.2s;
}
.wf-asteroid.is-haz {
  background: radial-gradient(circle at 30% 30%, #fca5a5 0%, #ef4444 45%, #7f1d1d 100%);
  box-shadow:
    0 0 0 1px rgba(253, 224, 71, 0.7),
    0 0 8px rgba(239, 68, 68, 0.7),
    0 0 20px rgba(239, 68, 68, 0.35);
}
.wf-asteroid:hover {
  transform: translate(-50%, -50%) scale(1.6);
  box-shadow:
    0 0 0 2px #fde047,
    0 0 16px currentColor,
    0 0 32px currentColor;
  animation-play-state: paused;
  z-index: 2;
}

@keyframes wf-ast-drift {
  0%, 100% { translate: 0 0; }
  50%      { translate: var(--ast-drift-x) var(--ast-drift-y); }
}
@keyframes wf-ast-pulse {
  0%, 100% { filter: brightness(1)   saturate(1); }
  50%      { filter: brightness(1.3) saturate(1.15); }
}

/* Popup asteroide flottante */
.wf-asteroid-popup {
  position: fixed;
  z-index: 1000;
  width: 340px;
  max-width: calc(100vw - 24px);
}
.wf-asteroid-popup .wf-popup {
  position: relative;
  background: rgba(10, 14, 26, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  padding: 12px;
}
.wf-asteroid-popup-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
  color: rgba(226, 232, 240, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.wf-asteroid-popup-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

/* DOM marker voli live ADS-B — SVG triangolo aereo */
.wf-plane-marker {
  width: 20px;
  height: 20px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  color: #22d3ee;
}
.wf-plane-marker svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 1.5;
  paint-order: stroke fill;
  overflow: visible;
}
.wf-plane-marker[data-alt="alt-mid"]  { color: #fbbf24; }
.wf-plane-marker[data-alt="alt-high"] { color: #fb923c; }
.wf-plane-marker[data-alt="alt-vhigh"]{ color: #ef4444; }
.wf-plane-marker:hover {
  width: 28px;
  height: 28px;
}

/* DOM marker epidemie: cerchio pulsante con bordo */
.wf-epi-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.45), 0 0 10px rgba(239,68,68,0.7);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 10px;
  line-height: 1;
  animation: wf-epi-pulse 1.8s ease-in-out infinite;
}
.wf-epi-marker[data-status="contained"] {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251,191,36,0.45), 0 0 10px rgba(251,191,36,0.7);
  animation-duration: 3s;
}
.wf-epi-marker[data-status="endemic"] {
  background: #a855f7;
  box-shadow: 0 0 0 2px rgba(168,85,247,0.45), 0 0 10px rgba(168,85,247,0.7);
  animation-duration: 4s;
}
.wf-epi-marker:hover {
  transform: scale(1.4);
  animation: none;
  box-shadow: 0 0 0 3px currentColor, 0 0 20px currentColor;
}
@keyframes wf-epi-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.95; box-shadow: 0 0 0 2px currentColor, 0 0 8px currentColor; }
  50%      { transform: scale(1.2);  opacity: 1;    box-shadow: 0 0 0 4px currentColor, 0 0 16px currentColor; }
}

/* =============================================================
   NEWS FEED (sidebar destra)
   Pannello notizie con filtro per macro-categoria.
   Colori badge per gruppo:
     Guerra #ef4444 · Finanza #22c55e · Politica #3b82f6
     Cronaca #94a3b8 · Disastri #f59e0b
   ============================================================= */
/* =============================================================
   TV LIVE — player news in diretta (#wf-live), sopra il pannello
   Notizie. Lista canali YouTube live + player embed singolo.
   ============================================================= */
.wf-live {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.wf-live-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 8px;
}
.wf-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: wf-live-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes wf-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.wf-live-title {
  flex: 1;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  min-width: 0;
}
.wf-live-count {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* player (16:9) */
.wf-live-player { padding: 0 12px 8px; }
.wf-live-player-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 11px;
  text-align: center;
  padding: 0 16px;
  color: rgba(226, 232, 240, 0.5);
}
.wf-live-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.wf-live-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.wf-live-now {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 12px;
}
.wf-live-now-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}
.wf-live-now-name { flex: 1; font-weight: 600; color: #f1f5f9; min-width: 0; }
.wf-live-now-yt {
  font-size: 10px;
  color: rgba(226, 232, 240, 0.6);
  text-decoration: none;
  flex-shrink: 0;
}
.wf-live-now-yt:hover { color: #fbbf24; }

/* lista canali — griglia 2 per riga */
.wf-live-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px 8px 12px;
  overflow-y: auto;
  max-height: 38vh;
}
.wf-live-state {
  grid-column: 1 / -1;
  padding: 14px 10px;
  font-size: 12px;
  text-align: center;
  color: rgba(226, 232, 240, 0.55);
}
.wf-live-state-error { color: rgba(239, 68, 68, 0.85); }

.wf-live-ch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.wf-live-ch:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); }
.wf-live-ch.is-active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
}
.wf-live-ch.is-offline { opacity: 0.45; cursor: default; }
.wf-live-ch:focus-visible { outline: 2px solid rgba(251, 191, 36, 0.6); outline-offset: 1px; }

.wf-live-ch-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wf-live-ch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-live-ch-thumb-off { font-size: 18px; opacity: 0.5; }
.wf-live-ch-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.12s;
}
.wf-live-ch:hover .wf-live-ch-play { opacity: 1; }

.wf-live-ch-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wf-live-ch-name {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf-live-ch-meta { display: flex; align-items: center; gap: 7px; }
.wf-live-ch-lang {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.65);
}
.wf-live-ch-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f87171;
}
.wf-live-ch-off {
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.4);
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) { .wf-live-dot { animation: none; } }

/* TV LIVE — light mode */
html.theme-light .wf-live { border-bottom-color: rgba(15, 23, 42, 0.08); }
html.theme-light .wf-live-title { color: rgba(15, 23, 42, 0.85); }
html.theme-light .wf-live-count { color: rgba(15, 23, 42, 0.4); }
html.theme-light .wf-live-player-empty { color: rgba(15, 23, 42, 0.5); border-color: rgba(15, 23, 42, 0.15); background: rgba(15, 23, 42, 0.03); }
html.theme-light .wf-live-now-name { color: #0f172a; }
html.theme-light .wf-live-now-yt { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-live-state { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-live-ch { background: rgba(15, 23, 42, 0.03); border-color: rgba(15, 23, 42, 0.08); }
html.theme-light .wf-live-ch:hover { background: rgba(15, 23, 42, 0.06); }
html.theme-light .wf-live-ch-name { color: #0f172a; }
html.theme-light .wf-live-ch-lang { background: rgba(15, 23, 42, 0.07); color: rgba(15, 23, 42, 0.6); }

/* =============================================================
   CYBER PULSE — stato minacce live (#wf-pulse, sidebar destra).
   ============================================================= */
.wf-pulse {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wf-pulse-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 8px;
}
.wf-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: wf-live-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
.wf-pulse-title {
  flex: 1;
  font-weight: 700; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.wf-pulse-infocon {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 3px; color: #0a0e1a; background: #22c55e;
}
.wf-pulse-body { padding: 4px 12px 8px; overflow-y: auto; max-height: 40vh; }
.wf-pulse-state { padding: 12px 4px; font-size: 12px; text-align: center; color: rgba(226, 232, 240, 0.55); }
.wf-pulse-err { color: rgba(239, 68, 68, 0.85); }
.wf-pulse-sub {
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4); margin: 8px 0 4px;
}
.wf-pulse-ports { display: flex; flex-direction: column; gap: 2px; }
.wf-pulse-port {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}
.wf-pulse-port-n {
  font-family: 'SF Mono', 'JetBrains Mono', monospace; font-weight: 700;
  color: #f87171; min-width: 38px;
}
.wf-pulse-port-svc { flex: 1; color: rgba(226, 232, 240, 0.7); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-pulse-port-rec { font-family: 'SF Mono','JetBrains Mono',monospace; font-size: 10px; color: rgba(255, 255, 255, 0.45); }

.wf-pulse-atk { display: flex; flex-direction: column; gap: 2px; }
.wf-pulse-atk-row {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 6px; border-radius: 4px; font-size: 11px;
}
.wf-pulse-atk-row.is-geo { cursor: pointer; }
.wf-pulse-atk-row.is-geo:hover { background: rgba(239, 68, 68, 0.1); }
.wf-pulse-atk-row.is-geo:focus-visible { outline: 2px solid rgba(251,191,36,0.6); outline-offset: 1px; }
.wf-pulse-atk-ip { flex: 1; font-family: 'SF Mono','JetBrains Mono',monospace; color: rgba(226,232,240,0.85); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-pulse-atk-cc {
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px;
  background: rgba(255,255,255,0.08); color: rgba(226,232,240,0.7);
}
.wf-pulse-atk-n { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 10px; color: #f87171; min-width: 34px; text-align: right; }
.wf-pulse-foot { padding: 0 14px 12px; font-size: 9px; color: rgba(255,255,255,0.3); }

html.theme-light .wf-pulse { border-top-color: rgba(15,23,42,0.08); }
html.theme-light .wf-pulse-title { color: rgba(15,23,42,0.85); }
html.theme-light .wf-pulse-sub { color: rgba(15,23,42,0.45); }
html.theme-light .wf-pulse-port { background: rgba(15,23,42,0.03); }
html.theme-light .wf-pulse-port-svc { color: rgba(15,23,42,0.7); }
html.theme-light .wf-pulse-atk-ip { color: rgba(15,23,42,0.8); }
html.theme-light .wf-pulse-atk-cc { background: rgba(15,23,42,0.07); color: rgba(15,23,42,0.6); }
html.theme-light .wf-pulse-foot { color: rgba(15,23,42,0.35); }

/* =============================================================
   APPROFONDIMENTI (deep-dive) — lista nel pannello + overlay centrale
   ============================================================= */
/* lista nel pannello Spazio */
.wf-dd-list { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); }
.wf-dd-list-title { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin: 0 2px 6px; }
.wf-dd-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px; border: 1px solid rgba(255,255,255,0.08); border-radius: 7px;
  background: rgba(255,255,255,0.03); color: inherit; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.wf-dd-item:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.5); }
.wf-dd-item-ico { font-size: 18px; flex-shrink: 0; }
.wf-dd-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wf-dd-item-name { font-size: 12px; font-weight: 600; color: #f1f5f9; }
.wf-dd-item-desc { font-size: 10px; line-height: 1.3; color: rgba(226,232,240,0.55); }
.wf-dd-item-arrow { color: rgba(255,255,255,0.3); flex-shrink: 0; }
.wf-dd-item:hover .wf-dd-item-arrow { color: #818cf8; }

/* overlay che copre il globo */
.wf-deepdive {
  position: absolute; inset: 0; z-index: 30;
  background: radial-gradient(circle at 50% 0%, #131a2e 0%, #0a0e1a 60%);
  display: flex; flex-direction: column; overflow: hidden;
}
.app-main.dd-open .map-controls { display: none; }
.wf-dd-bar {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,14,26,0.6); backdrop-filter: blur(6px);
}
.wf-dd-back {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.05);
  color: #e2e8f0; cursor: pointer; transition: background 0.12s;
}
.wf-dd-back:hover { background: rgba(99,102,241,0.2); border-color: rgba(99,102,241,0.5); }
.wf-dd-bartitle { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.wf-dd-content { flex: 1; overflow-y: auto; padding: 28px 24px 60px; }
.wf-dd-content > * { max-width: 920px; margin-left: auto; margin-right: auto; }
.wf-dd-loading { padding: 30px; text-align: center; color: rgba(226,232,240,0.5); font-size: 13px; }

.wf-dd-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.wf-dd-hero-ico { font-size: 48px; line-height: 1; flex-shrink: 0; }
.wf-dd-h1 { font-size: 26px; font-weight: 800; color: #f8fafc; margin: 0 0 8px; line-height: 1.15; }
.wf-dd-lead { font-size: 14px; line-height: 1.6; color: rgba(226,232,240,0.75); margin: 0; }
.wf-dd-lead strong { color: #fbbf24; }
.wf-dd-h2 { font-size: 16px; font-weight: 700; color: #f1f5f9; margin: 28px 0 12px; }
.wf-dd-live { font-size: 10px; font-weight: 700; color: #f87171; letter-spacing: 0.05em; margin-left: 6px; }

.wf-dd-actions { margin: 4px 0 8px; }
.wf-dd-btn {
  font-size: 12px; font-weight: 600; padding: 9px 16px; border-radius: 8px;
  border: 1px solid rgba(99,102,241,0.5); background: rgba(99,102,241,0.16);
  color: #c7d2fe; cursor: pointer; transition: background 0.12s;
}
.wf-dd-btn:hover { background: rgba(99,102,241,0.3); }

.wf-dd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; }
.wf-dd-c { padding: 14px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.wf-dd-c-ico { font-size: 22px; margin-bottom: 6px; }
.wf-dd-c-t { font-size: 13px; font-weight: 700; color: #f1f5f9; margin-bottom: 4px; }
.wf-dd-c-b { font-size: 12px; line-height: 1.5; color: rgba(226,232,240,0.7); }

.wf-dd-tablewrap { overflow-x: auto; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
.wf-dd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wf-dd-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.wf-dd-table td { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: rgba(226,232,240,0.85); vertical-align: middle; }
.wf-dd-table tr.is-haz td { background: rgba(239,68,68,0.06); }
.wf-dd-name { font-weight: 600; color: #f1f5f9; }
.wf-dd-km { font-size: 10px; color: rgba(255,255,255,0.4); }
.wf-dd-phabadge { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: rgba(239,68,68,0.2); color: #f87171; letter-spacing: 0.05em; }
.wf-dd-spark { height: 8px; border-radius: 4px; background: linear-gradient(90deg,#6366f1,#a855f7); min-width: 4px; }
.wf-dd-src { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 22px; }
.wf-dd-src a { color: #818cf8; }

/* modalità wide (3D immersivo): niente padding/max-width, riempi */
.wf-dd-content.wf-dd-wide { padding: 0; overflow: hidden; display: flex; }
.wf-dd-content.wf-dd-wide > * { max-width: none; margin: 0; }

/* Vulcani — tabella + accordion sismi */
.wf-volc-tbl tbody .wf-volc-row { cursor: pointer; }
.wf-volc-tbl tbody .wf-volc-row:hover td { background: rgba(255,255,255,0.05); }
.wf-volc-tbl tbody .wf-volc-row.is-open td { background: rgba(255,255,255,0.06); }
.wf-volc-tog { width: 22px; text-align: center; color: rgba(255,255,255,0.45); }
.wf-volc-caret { font-size: 10px; }
.wf-volc-exp > td { padding: 0 !important; background: rgba(255,255,255,0.02); }
.wf-volc-exp-in { padding: 12px 14px; }
.wf-volc-exp-sec { margin-bottom: 12px; }
.wf-volc-exp-sec:last-child { margin-bottom: 0; }
.wf-volc-exp-lab { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.wf-volc-exp-links { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-volc-exp-links a { font-size: 11px; padding: 4px 9px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: #cbd5e1; text-decoration: none; }
.wf-volc-exp-links a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.wf-volc-qtbl { margin: 0; }
.wf-volc-qtbl th { font-size: 9px; }
.wf-volc-none { font-size: 12px; color: rgba(226,232,240,0.5); padding: 4px 0; }
html.theme-light .wf-volc-tbl tbody .wf-volc-row:hover td { background: rgba(15,23,42,0.05); }
html.theme-light .wf-volc-exp > td { background: rgba(15,23,42,0.02); }
html.theme-light .wf-volc-exp-links a { color: #334155; }

html.theme-light .wf-deepdive { background: radial-gradient(circle at 50% 0%, #eef2ff 0%, #f8fafc 60%); }
html.theme-light .wf-dd-h1, html.theme-light .wf-dd-h2, html.theme-light .wf-dd-c-t, html.theme-light .wf-dd-name { color: #0f172a; }
html.theme-light .wf-dd-lead, html.theme-light .wf-dd-c-b { color: rgba(15,23,42,0.7); }
html.theme-light .wf-dd-item-name { color: #0f172a; }
html.theme-light .wf-dd-c { background: rgba(15,23,42,0.03); border-color: rgba(15,23,42,0.08); }

/* Space Weather embeddato nel pannello Spazio (sinistra) */
.wf-pulse-embed { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 8px; }
.wf-pulse-embed .wf-pulse-header { padding: 10px 2px 6px; }
.wf-pulse-embed .wf-pulse-body { padding: 0 2px 4px; max-height: none; }
.wf-pulse-embed .wf-pulse-foot { padding: 0 2px 2px; }
html.theme-light .wf-pulse-embed { border-top-color: rgba(15,23,42,0.08); }

/* nota testuale nei popup (descrizione outage, ecc) */
.wf-popup-note { font-size: 11px; line-height: 1.4; color: rgba(226, 232, 240, 0.75); }
html.theme-light .wf-popup-note { color: rgba(15, 23, 42, 0.7); }

/* CTA nel panel Mercati → apre approfondimento transazioni */
.wf-mkt-cta { display:block; width:calc(100% - 24px); margin:4px 12px 10px; padding:8px; border-radius:7px; border:1px solid rgba(99,102,241,0.4); background:rgba(99,102,241,0.14); color:#c7d2fe; font-size:11px; font-weight:600; cursor:pointer; }
.wf-mkt-cta:hover { background:rgba(99,102,241,0.28); }

/* Transazioni crypto (approfondimento wide, full width) */
.wf-ctx { width: 100%; padding: 14px 16px 40px; }
.wf-ctx-bar { font-size: 13px; font-weight: 700; color: #f1f5f9; margin-bottom: 12px; }
.wf-ctx-prices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wf-ctx-price { display: flex; align-items: baseline; gap: 7px; padding: 7px 12px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.wf-ctx-price-n { font-size: 11px; font-weight: 700; color: rgba(226,232,240,0.7); }
.wf-ctx-price-v { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 13px; font-weight: 700; color: #f8fafc; }
.wf-ctx-price-c { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 10px; }
.wf-ctx-price-c.up { color:#22c55e; } .wf-ctx-price-c.down { color:#ef4444; } .wf-ctx-price-c.flat { color:rgba(226,232,240,0.4); }
.wf-ctx-presshead { font-size: 12px; font-weight: 700; color: #f1f5f9; margin: 4px 0 8px; }
.wf-ctx-presssub { font-size: 10px; font-weight: 500; color: rgba(226,232,240,0.45); margin-left: 6px; }
.wf-ctx-pressure { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 14px; }
.wf-ctx-press { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 8px 10px; }
.wf-ctx-press-l { font-size: 11px; font-weight: 700; color: rgba(226,232,240,0.8); }
.wf-ctx-press-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 6px 0 4px; background: rgba(255,255,255,0.06); }
.wf-ctx-press-buy { background: #22c55e; }
.wf-ctx-press-sell { background: #ef4444; }
.wf-ctx-press-pct { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 10px; }
.wf-ctx-press-pct.up { color:#22c55e; } .wf-ctx-press-pct.down { color:#ef4444; }
@media (max-width: 860px){ .wf-ctx-pressure { grid-template-columns: 1fr 1fr; } }

/* segnale bias prossima ora */
.wf-ctx-signals { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 16px; }
.wf-ctx-sig { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 9px 11px; }
.wf-ctx-sig-l { font-size: 11px; font-weight: 700; color: rgba(226,232,240,0.75); }
.wf-ctx-sig-dir { font-size: 14px; font-weight: 800; margin: 3px 0; }
.wf-ctx-sig-dir.up { color: #22c55e; } .wf-ctx-sig-dir.down { color: #ef4444; } .wf-ctx-sig-dir.flat { color: rgba(226,232,240,0.5); }
.wf-ctx-sig-conf { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 11px; color: rgba(226,232,240,0.6); }
.wf-ctx-sig-br { font-size: 9px; color: rgba(226,232,240,0.4); margin-top: 3px; }
@media (max-width: 860px){ .wf-ctx-signals { grid-template-columns: 1fr 1fr; } }

/* Fear & Greed */
.wf-ctx-fng { margin-bottom: 14px; }
.wf-ctx-fng-card { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 8px 12px; }
.wf-ctx-fng-l { font-size: 11px; font-weight: 700; color: rgba(226,232,240,0.7); white-space: nowrap; }
.wf-ctx-fng-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.wf-ctx-fng-fill { display: block; height: 100%; }
.wf-ctx-fng-v { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* Liquidazioni live (strip orizzontale) */
.wf-ctx-liq { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; min-height: 34px; }
.wf-ctx-liqrow { flex-shrink: 0; font-size: 11px; padding: 5px 9px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); white-space: nowrap; text-decoration: none; color: #e2e8f0; }
.wf-ctx-liqrow.long { border-left: 3px solid #ef4444; }
.wf-ctx-liqrow.short { border-left: 3px solid #22c55e; }
.wf-ctx-liqrow.is-big { background: rgba(251,191,36,0.14); }
.wf-ctx-liq-v { font-family:'SF Mono','JetBrains Mono',monospace; font-weight: 700; margin-left: 4px; }

.wf-ctx-stats { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 14px; }
.wf-ctx-stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 10px 12px; }
.wf-ctx-stat-v { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 18px; font-weight: 700; color: #f8fafc; }
.wf-ctx-stat-t { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(226,232,240,0.5); margin-top: 2px; }
.wf-ctx-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.wf-ctx-chart { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 10px 12px; }
.wf-ctx-chart-t { font-size: 11px; color: rgba(226,232,240,0.65); margin-bottom: 6px; }
.wf-ctx-chart canvas { height: 130px !important; }
.wf-ctx-cols { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.wf-ctx-col { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; overflow: hidden; }
.wf-ctx-col-h { font-size: 12px; font-weight: 700; color: #f1f5f9; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; align-items: center; gap: 7px; }
.wf-ctx-whale-th { margin-left: auto; font-size: 9px; font-weight: 500; color: rgba(226,232,240,0.45); }
.wf-ctx-eth-dot, .wf-ctx-btc-dot { width: 8px; height: 8px; border-radius: 50%; }
.wf-ctx-eth-dot { background: #627eea; } .wf-ctx-btc-dot { background: #f7931a; } .wf-ctx-xrp-dot { background: #23b6e6; }
.wf-ctx-feed { max-height: 52vh; overflow-y: auto; padding: 6px; }
.wf-ctx-tx { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 5px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
.wf-ctx-tx:hover { background: rgba(255,255,255,0.05); }
.wf-ctx-amt { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 12px; font-weight: 700; color: #f1f5f9; }
.wf-ctx-usd { font-size: 10px; color: rgba(34,197,94,0.85); }
.wf-ctx-addr { font-family:'SF Mono','JetBrains Mono',monospace; font-size: 10px; color: rgba(226,232,240,0.45); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.wf-ctx-tx.is-whale { background: rgba(251,191,36,0.1); border-left: 2px solid #fbbf24; }
.wf-ctx-chip { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.wf-ctx-chip.eth { background: rgba(98,126,234,0.25); color: #a5b4fc; }
.wf-ctx-chip.btc { background: rgba(247,147,26,0.25); color: #fbbf24; }
.wf-ctx-chip.xrp { background: rgba(35,182,230,0.25); color: #7dd3fc; }
/* etichette entità (decodifica wallet noti) */
.wf-ctx-araw { font-family:'SF Mono','JetBrains Mono',monospace; color: rgba(226,232,240,0.45); }
.wf-ctx-lbl { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.wf-ctx-lbl.t-exchange { background: rgba(59,130,246,0.22); color: #93c5fd; }
.wf-ctx-lbl.t-defi { background: rgba(168,85,247,0.22); color: #d8b4fe; }
.wf-ctx-lbl.t-token { background: rgba(20,184,166,0.22); color: #5eead4; }
.wf-ctx-lbl.t-staking { background: rgba(34,197,94,0.2); color: #86efac; }
.wf-ctx-lbl.t-marketmaker { background: rgba(245,158,11,0.22); color: #fcd34d; }
.wf-ctx-lbl.t-sanctioned { background: rgba(239,68,68,0.25); color: #fca5a5; }
.wf-ctx-flow { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.wf-ctx-flow.dep { background: rgba(239,68,68,0.18); color: #fca5a5; }
.wf-ctx-flow.wd { background: rgba(34,197,94,0.18); color: #86efac; }
.wf-ctx-new { animation: wf-ctx-in 0.4s ease-out; }
@keyframes wf-ctx-in { from { opacity:0; transform: translateY(-6px); background: rgba(99,102,241,0.18); } to { opacity:1; transform: translateY(0); } }
@media (max-width: 860px){ .wf-ctx-stats{ grid-template-columns:1fr 1fr; } .wf-ctx-charts,.wf-ctx-cols{ grid-template-columns:1fr; } }

/* =============================================================
   Dashboard segnali crypto v3 (.sigx) — terminale raffinato
   ============================================================= */
.sigx { width:100%; padding:16px 20px 44px; flex:1; min-height:0; overflow-y:auto; }
.sigx-top { display:flex; align-items:baseline; gap:10px; margin-bottom:14px; }
.sigx-kick { font-size:12px; font-weight:700; color:#f1f5f9; }
.sigx-disc { font-size:11px; color:rgba(226,232,240,.4); }
.sigx-load,.sigx-err { padding:24px; text-align:center; color:rgba(226,232,240,.5); font-size:13px; }
.sigx-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.sigx-tab { display:flex; align-items:center; gap:9px; padding:9px 15px; border-radius:11px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:#e2e8f0; cursor:pointer; transition:transform .1s, border-color .12s, background .12s; }
.sigx-tab:hover { background:rgba(255,255,255,.06); transform:translateY(-1px); }
.sigx-tab.on { border-color:rgba(255,255,255,.22); background:rgba(255,255,255,.08); }
.sigx-tab-dot { width:8px; height:8px; border-radius:50%; }
.sigx-tab.buy .sigx-tab-dot{ background:#22c55e; box-shadow:0 0 8px rgba(34,197,94,.6);} .sigx-tab.wait .sigx-tab-dot{ background:#94a3b8;} .sigx-tab.exit .sigx-tab-dot{ background:#ef4444; box-shadow:0 0 8px rgba(239,68,68,.6);}
.sigx-tab-n { font-weight:800; font-size:14px; }
.sigx-tab-p { font-family:'SF Mono','JetBrains Mono',monospace; font-size:11px; color:rgba(226,232,240,.55); }
.sigx-tab.on.buy{ box-shadow:0 0 0 1px rgba(34,197,94,.4) inset;} .sigx-tab.on.exit{ box-shadow:0 0 0 1px rgba(239,68,68,.4) inset;}
.sigx-hero { display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:26px; padding:18px 22px; border-radius:16px; margin-bottom:14px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); position:relative; overflow:hidden; }
.sigx-hero::before { content:''; position:absolute; inset:0; opacity:.5; pointer-events:none; }
.sigx-hero.state-buy::before  { background:radial-gradient(120% 100% at 0% 0%, rgba(34,197,94,.18), transparent 55%); }
.sigx-hero.state-wait::before { background:radial-gradient(120% 100% at 0% 0%, rgba(148,163,184,.12), transparent 55%); }
.sigx-hero.state-exit::before { background:radial-gradient(120% 100% at 0% 0%, rgba(239,68,68,.18), transparent 55%); }
.sigx-statewrap { position:relative; padding-left:18px; }
.sigx-statewrap::before { content:''; position:absolute; left:0; top:4px; bottom:4px; width:5px; border-radius:3px; }
.sigx-hero.state-buy .sigx-statewrap::before{ background:#22c55e;} .sigx-hero.state-wait .sigx-statewrap::before{ background:#94a3b8;} .sigx-hero.state-exit .sigx-statewrap::before{ background:#ef4444;}
.sigx-state { font-size:30px; font-weight:800; letter-spacing:.06em; line-height:1; }
.sigx-hero.state-buy .sigx-state{ color:#4ade80;} .sigx-hero.state-wait .sigx-state{ color:#cbd5e1;} .sigx-hero.state-exit .sigx-state{ color:#f87171;}
.sigx-state-sub { font-size:11px; color:rgba(226,232,240,.55); margin-top:5px; }
/* chip posizione utente nell'hero */
.sigx-poschip { font-size:10px; font-weight:700; padding:2px 8px; border-radius:20px; margin-left:8px; letter-spacing:.03em; white-space:nowrap; }
.sigx-poschip.up { background:rgba(34,197,94,.16); color:#4ade80; border:1px solid rgba(34,197,94,.4); }
.sigx-poschip.down { background:rgba(239,68,68,.16); color:#f87171; border:1px solid rgba(239,68,68,.4); }
/* marker "in posizione" sui tab */
.sigx-tab.held { border-color:rgba(96,165,250,.5); }
.sigx-tab-held { color:#60a5fa; font-size:8px; vertical-align:middle; }
/* card "La mia posizione" + bottoni ho comprato/venduto */
.sigx-poscard.up { border-color:rgba(34,197,94,.35); }
.sigx-poscard.down { border-color:rgba(239,68,68,.35); }
.sigx-pos-since { font-size:10px; font-weight:600; color:rgba(226,232,240,.45); }
.sigx-pos-row { display:flex; gap:14px; margin:8px 0 10px; }
.sigx-pos-row > div { display:flex; flex-direction:column; gap:2px; }
.sigx-pos-row span { font-size:9px; text-transform:uppercase; letter-spacing:.07em; color:rgba(226,232,240,.45); }
.sigx-pos-row b { font-family:'SF Mono','JetBrains Mono',monospace; font-size:15px; font-weight:700; color:#f1f5f9; }
.sigx-pos-row b.up { color:#4ade80; } .sigx-pos-row b.down { color:#f87171; }
.sigx-pos-empty { font-size:12px; color:rgba(226,232,240,.5); margin:6px 0 10px; }
.sigx-pos-hint { font-size:11px; font-weight:600; margin:0 0 8px; }
.sigx-pos-hint.exit { color:#f87171; }
.sigx-pos-btn { width:100%; padding:9px 12px; border-radius:9px; border:1px solid; background:transparent; font-size:12px; font-weight:700; cursor:pointer; transition:background .12s,border-color .12s; }
.sigx-pos-btn.buy { color:#4ade80; border-color:rgba(34,197,94,.45); }
.sigx-pos-btn.buy:hover { background:rgba(34,197,94,.14); }
.sigx-pos-btn.sell { color:#f87171; border-color:rgba(239,68,68,.45); }
.sigx-pos-btn.sell:hover { background:rgba(239,68,68,.14); }
.sigx-pos-hist { display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; padding-top:9px; border-top:1px solid rgba(255,255,255,.07); }
.sigx-pos-h { font-size:10px; font-weight:700; font-family:'SF Mono','JetBrains Mono',monospace; padding:1px 6px; border-radius:5px; }
.sigx-pos-h.up { background:rgba(34,197,94,.14); color:#4ade80; } .sigx-pos-h.down { background:rgba(239,68,68,.14); color:#f87171; }
.sigx-asset { display:flex; align-items:baseline; gap:8px; }
.sigx-asset-n { font-size:24px; font-weight:800; color:#f8fafc; }
.sigx-asset-s { font-size:11px; color:rgba(226,232,240,.4); font-family:'SF Mono','JetBrains Mono',monospace; }
.sigx-price { font-family:'SF Mono','JetBrains Mono',monospace; font-size:30px; font-weight:700; color:#f1f5f9; line-height:1.1; }
.sigx-ctx { font-size:11px; color:rgba(226,232,240,.45); margin-top:6px; display:flex; align-items:center; gap:6px; }
.sigx-livedot { width:7px; height:7px; border-radius:50%; background:#22c55e; animation:wf-live-pulse 1.8s ease-out infinite; }
.sigx-tiles { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; position:relative; }
.sigx-tile { display:flex; flex-direction:column; gap:3px; padding:9px 12px; border-radius:10px; background:rgba(10,14,26,.45); border:1px solid rgba(255,255,255,.06); }
.sigx-tile-l { font-size:9px; text-transform:uppercase; letter-spacing:.08em; color:rgba(226,232,240,.45); }
.sigx-tile-v { font-family:'SF Mono','JetBrains Mono',monospace; font-size:16px; font-weight:700; color:#f1f5f9; }
.sigx-tile-v.big { font-size:18px; } .sigx-tile-v.up { color:#4ade80; } .sigx-tile-v.down { color:#f87171; }
.sigx-logstrip { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding:8px 14px; border-radius:10px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.06); }
.sigx-logh { font-size:10px; font-weight:700; letter-spacing:.1em; color:rgba(226,232,240,.4); flex-shrink:0; }
.sigx-logbody { display:flex; gap:8px; overflow-x:auto; flex:1; min-width:0; }
.sigx-logchip { flex-shrink:0; display:flex; align-items:center; gap:6px; font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px; background:rgba(255,255,255,.05); white-space:nowrap; color:#e2e8f0; }
.sigx-logchip.buy{ color:#86efac;} .sigx-logchip.exit{ color:#fca5a5;}
.sigx-logt { font-family:'SF Mono','JetBrains Mono',monospace; color:rgba(226,232,240,.45); }
.sigx-lognone { font-size:11px; color:rgba(226,232,240,.38); }
.sigx-grid { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(0,1fr); gap:16px; align-items:stretch; }
.sigx-chartcard { border:1px solid rgba(255,255,255,.07); border-radius:14px; padding:8px; background:rgba(255,255,255,.02); }
.sigx-chartmain { width:100%; }
.sigx-sub { position:relative; margin-top:6px; border-top:1px solid rgba(255,255,255,.05); padding-top:4px; }
.sigx-sublab { position:absolute; top:6px; left:8px; z-index:3; font-size:10px; font-weight:700; color:rgba(226,232,240,.45); pointer-events:none; }
.sigx-sub>div { width:100%; }
.sigx-rail { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-content:space-between; }
.sigx-card { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); border-radius:12px; padding:12px 14px; }
.sigx-span { grid-column:1 / -1; }
.sigx-card-h { display:flex; align-items:center; justify-content:space-between; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:rgba(226,232,240,.6); margin-bottom:9px; }
.sigx-count { font-family:'SF Mono','JetBrains Mono',monospace; font-size:11px; padding:2px 7px; border-radius:5px; background:rgba(148,163,184,.18); color:#cbd5e1; }
.sigx-count.on { background:rgba(34,197,94,.2); color:#86efac; } .sigx-count.off { background:rgba(239,68,68,.18); color:#fca5a5; }
.sigx-rr { font-family:'SF Mono','JetBrains Mono',monospace; font-size:11px; padding:2px 8px; border-radius:5px; }
.sigx-rr.on { background:rgba(34,197,94,.2); color:#86efac;} .sigx-rr.off { background:rgba(148,163,184,.18); color:#cbd5e1;}
.sigx-chks { list-style:none; margin:0; padding:0; }
.sigx-chks.two { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.sigx-chk { display:flex; align-items:center; gap:7px; font-size:11.5px; padding:3px 0; color:rgba(226,232,240,.45); }
.sigx-chk i { width:14px; height:14px; border-radius:4px; flex-shrink:0; display:inline-block; position:relative; }
.sigx-chk.on { color:#d1fae5; } .sigx-chk.on i { background:rgba(34,197,94,.22); }
.sigx-chk.on i::after { content:'✓'; position:absolute; inset:0; font-size:10px; color:#4ade80; text-align:center; line-height:14px; }
.sigx-chk.off i { background:rgba(255,255,255,.06); }
.sigx-chk.off i::after { content:'✕'; position:absolute; inset:0; font-size:9px; color:rgba(226,232,240,.35); text-align:center; line-height:14px; }
.sigx-prog { height:6px; border-radius:3px; background:rgba(255,255,255,.07); overflow:hidden; margin-bottom:9px; }
.sigx-prog span { display:block; height:100%; background:linear-gradient(90deg,#22c55e,#84cc16); }
.sigx-track { position:relative; height:26px; margin:6px 0 10px; }
.sigx-track-bar { position:absolute; left:0; right:0; top:11px; height:4px; border-radius:2px; background:linear-gradient(90deg,#ef4444,#64748b,#22c55e); opacity:.55; }
.sigx-track-m { position:absolute; top:7px; width:3px; height:12px; border-radius:2px; transform:translateX(-50%); }
.sigx-track-m.stop{ background:#ef4444;} .sigx-track-m.target{ background:#22c55e;} .sigx-track-m.entry{ background:#e2e8f0; height:16px; top:5px;}
.sigx-track-m.price{ width:10px; height:10px; border-radius:50%; top:8px; background:#fbbf24; box-shadow:0 0 8px rgba(251,191,36,.7); }
.sigx-plan { display:flex; justify-content:space-between; gap:8px; }
.sigx-plan div { display:flex; flex-direction:column; gap:2px; }
.sigx-plan span { font-size:9px; text-transform:uppercase; letter-spacing:.05em; color:rgba(226,232,240,.45); }
.sigx-plan b { font-family:'SF Mono','JetBrains Mono',monospace; font-size:13px; color:#f1f5f9; } .sigx-plan b.up{color:#4ade80;} .sigx-plan b.down{color:#f87171;}
.sigx-exit { margin-top:8px; font-size:10px; color:#fca5a5; }
.sigx-risk { display:flex; gap:10px; margin-bottom:8px; }
.sigx-risk label { font-size:10px; color:rgba(226,232,240,.6); display:flex; flex-direction:column; gap:3px; }
.sigx-risk input { width:78px; background:rgba(10,14,26,.5); border:1px solid rgba(255,255,255,.14); border-radius:6px; color:#f1f5f9; padding:5px 8px; font-size:12px; font-family:'SF Mono','JetBrains Mono',monospace; }
.sigx-kv { display:flex; justify-content:space-between; gap:10px; font-size:11.5px; padding:2px 0; color:rgba(226,232,240,.65); }
.sigx-kv b { font-family:'SF Mono','JetBrains Mono',monospace; color:#f1f5f9; } .sigx-kv b.up{color:#4ade80;} .sigx-kv b.down{color:#f87171;}
.sigx-ai-card { background:linear-gradient(180deg, rgba(168,85,247,.07), rgba(255,255,255,.03)); }
.sigx-ai-btn { font-size:11px; font-weight:700; padding:4px 13px; border-radius:7px; border:1px solid rgba(168,85,247,.5); background:rgba(168,85,247,.16); color:#d8b4fe; cursor:pointer; transition:background .12s; }
.sigx-ai-btn:hover { background:rgba(168,85,247,.3); }
.sigx-ai-hint { font-size:11px; color:rgba(226,232,240,.45); }
.sigx-ai-txt { font-size:12.5px; line-height:1.55; color:rgba(226,232,240,.86); }
.sigx-ai-load { font-size:12px; color:rgba(226,232,240,.6); display:flex; align-items:center; gap:7px; }
.sigx-foot { font-size:11px; color:rgba(226,232,240,.38); margin-top:18px; }
@media (max-width:1080px){ .sigx-grid { grid-template-columns:1fr; } }
@media (max-width:760px){ .sigx-hero { grid-template-columns:1fr; gap:14px; } .sigx-tiles { grid-template-columns:repeat(3,1fr); } }
html.theme-light .sigx-kick,html.theme-light .sigx-asset-n,html.theme-light .sigx-price { color:#0f172a; }

/* Mercati — panel finanziario (riusa .wf-pulse*) */
.wf-mkt-rows { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.wf-mkt-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 6px; border-radius: 4px; font-size: 12px; }
.wf-mkt-row:hover { background: rgba(255,255,255,0.04); }
.wf-mkt-name { flex: 1; color: rgba(226,232,240,0.8); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-mkt-val { font-family: 'SF Mono','JetBrains Mono','Courier New',monospace; font-size: 11px; color: #f1f5f9; }
.wf-mkt-chg { font-family: 'SF Mono','JetBrains Mono','Courier New',monospace; font-size: 10px; min-width: 52px; text-align: right; }
.wf-mkt-chg.up { color: #22c55e; }
.wf-mkt-chg.down { color: #ef4444; }
.wf-mkt-chg.flat { color: rgba(226,232,240,0.4); }
html.theme-light .wf-mkt-name { color: rgba(15,23,42,0.8); }
html.theme-light .wf-mkt-val { color: #0f172a; }

/* Cyber Attack — sub-panel heat per paese (toggle direzione/livello) */
.wf-cc-row { display: flex; gap: 6px; margin-bottom: 6px; }
.wf-cc-row .wf-sublist-btn { flex: 1; }
.wf-cc-row .wf-sublist-btn.is-active {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  font-weight: 600;
}
.wf-cc-msg { font-size: 11px; color: rgba(239, 68, 68, 0.85); margin-top: 4px; }

.wf-news {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* header */
.wf-news-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 10px;
}
.wf-news-title {
  flex: 1;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  min-width: 0;
}
.wf-news-count {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.wf-news-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.7);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.wf-news-refresh:hover { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.wf-news-refresh:focus-visible { outline: 2px solid rgba(251, 191, 36, 0.6); outline-offset: 1px; }

/* barra filtri (chip) */
.wf-news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}
.wf-news-chip {
  font-size: 11px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(226, 232, 240, 0.55);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wf-news-chip:hover { color: rgba(241, 245, 249, 0.9); border-color: rgba(255, 255, 255, 0.28); }
.wf-news-chip.is-active {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fbbf24;
  font-weight: 600;
}
.wf-news-chip:focus-visible { outline: 2px solid rgba(251, 191, 36, 0.6); outline-offset: 1px; }

/* lista scrollabile */
.wf-news-list {
  padding: 8px 10px 12px;
  overflow-y: auto;
  max-height: 52vh;
}

/* stati (loading / vuoto / errore) */
.wf-news-state {
  padding: 18px 10px;
  font-size: 12px;
  text-align: center;
  color: rgba(226, 232, 240, 0.55);
}
.wf-news-state-error { color: rgba(239, 68, 68, 0.85); }

/* card notizia */
.wf-news-card {
  padding: 10px 11px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid rgba(255, 255, 255, 0.12);
  transition: background 0.12s, border-color 0.12s;
}
.wf-news-card:last-child { margin-bottom: 0; }
.wf-news-card.is-geo { cursor: pointer; }
.wf-news-card.is-geo:hover { background: rgba(255, 255, 255, 0.06); }
.wf-news-card.is-geo:focus-visible { outline: 2px solid rgba(251, 191, 36, 0.6); outline-offset: 1px; }

/* colore bordo sinistro per gruppo */
.wf-news-card[data-group="guerra"]   { border-left-color: #ef4444; }
.wf-news-card[data-group="finanza"]  { border-left-color: #22c55e; }
.wf-news-card[data-group="politica"] { border-left-color: #3b82f6; }
.wf-news-card[data-group="cronaca"]  { border-left-color: #94a3b8; }
.wf-news-card[data-group="disastri"] { border-left-color: #f59e0b; }

.wf-news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

/* badge categoria colorato per gruppo */
.wf-news-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  line-height: 1;
  white-space: nowrap;
}
.wf-news-badge[data-group="guerra"]   { background: rgba(239, 68, 68, 0.18);  color: #f87171; }
.wf-news-badge[data-group="finanza"]  { background: rgba(34, 197, 94, 0.18);  color: #4ade80; }
.wf-news-badge[data-group="politica"] { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.wf-news-badge[data-group="cronaca"]  { background: rgba(148, 163, 184, 0.20); color: #cbd5e1; }
.wf-news-badge[data-group="disastri"] { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

.wf-news-time {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.wf-news-card-title {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: #f1f5f9;
  text-decoration: none;
}
a.wf-news-card-title:hover { color: #fbbf24; text-decoration: underline; }

.wf-news-card-summary {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.7);
}

.wf-news-meta {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.4);
}

/* NEWS FEED — light mode */
html.theme-light .wf-news { border-bottom-color: rgba(15, 23, 42, 0.08); }
html.theme-light .wf-news-title { color: rgba(15, 23, 42, 0.85); }
html.theme-light .wf-news-count { color: rgba(15, 23, 42, 0.4); }
html.theme-light .wf-news-refresh {
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.6);
}
html.theme-light .wf-news-refresh:hover { background: rgba(251, 191, 36, 0.18); color: #b45309; }
html.theme-light .wf-news-chip {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.03);
  color: rgba(15, 23, 42, 0.55);
}
html.theme-light .wf-news-chip:hover { color: rgba(15, 23, 42, 0.9); border-color: rgba(15, 23, 42, 0.28); }
html.theme-light .wf-news-chip.is-active {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.6);
  color: #b45309;
}
html.theme-light .wf-news-state { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-news-card {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
  border-left-color: rgba(15, 23, 42, 0.15);
}
html.theme-light .wf-news-card[data-group="guerra"]   { border-left-color: #ef4444; }
html.theme-light .wf-news-card[data-group="finanza"]  { border-left-color: #22c55e; }
html.theme-light .wf-news-card[data-group="politica"] { border-left-color: #3b82f6; }
html.theme-light .wf-news-card[data-group="cronaca"]  { border-left-color: #94a3b8; }
html.theme-light .wf-news-card[data-group="disastri"] { border-left-color: #f59e0b; }
html.theme-light .wf-news-card.is-geo:hover { background: rgba(15, 23, 42, 0.06); }
html.theme-light .wf-news-card-title { color: #0f172a; }
html.theme-light a.wf-news-card-title:hover { color: #b45309; }
html.theme-light .wf-news-card-summary { color: rgba(15, 23, 42, 0.7); }
html.theme-light .wf-news-time,
html.theme-light .wf-news-meta { color: rgba(15, 23, 42, 0.5); }

/* -------------------------------------------------------------
   Telecamere vicine — bottone + mini-galleria inline su card geo
   ------------------------------------------------------------- */
.wf-news-card-actions {
  margin-top: 8px;
}

.wf-news-cams-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(226, 232, 240, 0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wf-news-cams-btn:hover {
  color: rgba(241, 245, 249, 0.95);
  border-color: rgba(255, 255, 255, 0.28);
}
.wf-news-cams-btn.is-active {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fbbf24;
}
.wf-news-cams-btn:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: 1px;
}
.wf-news-cams-btn-icon { font-size: 12px; line-height: 1; }
.wf-news-cams-btn-label { font-weight: 600; letter-spacing: 0.02em; }

/* contenitore galleria espansa */
.wf-news-cams {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* stati galleria (loading / vuoto / errore) */
.wf-news-cams-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  font-size: 11px;
  text-align: center;
  color: rgba(226, 232, 240, 0.55);
}
.wf-news-cams-state-error { color: rgba(239, 68, 68, 0.85); }

.wf-news-cams-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.25);
  border-top-color: #fbbf24;
  animation: wf-news-cams-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes wf-news-cams-spin { to { transform: rotate(360deg); } }

/* griglia thumbnail — 2 colonne, niente layout shift */
.wf-news-cams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.wf-news-cam-item {
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.wf-news-cam-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.wf-news-cam-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wf-news-cam-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0.5;
}

.wf-news-cam-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 7px 7px;
}
.wf-news-cam-title {
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wf-news-cam-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}
.wf-news-cam-place {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-news-cam-dist {
  font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
}
.wf-news-cam-link {
  margin-top: 2px;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fbbf24;
  text-decoration: none;
}
.wf-news-cam-link:hover { text-decoration: underline; }
.wf-news-cam-link:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: 1px;
  border-radius: 2px;
}

/* Telecamere — light mode */
html.theme-light .wf-news-cams-btn {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.03);
  color: rgba(15, 23, 42, 0.6);
}
html.theme-light .wf-news-cams-btn:hover {
  color: rgba(15, 23, 42, 0.95);
  border-color: rgba(15, 23, 42, 0.28);
}
html.theme-light .wf-news-cams-btn.is-active {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.6);
  color: #b45309;
}
html.theme-light .wf-news-cams { border-top-color: rgba(15, 23, 42, 0.08); }
html.theme-light .wf-news-cams-state { color: rgba(15, 23, 42, 0.55); }
html.theme-light .wf-news-cam-item {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}
html.theme-light .wf-news-cam-thumb { background: rgba(15, 23, 42, 0.05); }
html.theme-light .wf-news-cam-title { color: #0f172a; }
html.theme-light .wf-news-cam-meta { color: rgba(15, 23, 42, 0.5); }
html.theme-light .wf-news-cam-dist { color: rgba(15, 23, 42, 0.6); }
html.theme-light .wf-news-cam-link { color: #b45309; }

@media (prefers-reduced-motion: reduce) {
  .wf-news-cams-spinner { animation: none; }
}

/* su mobile la sidebar destra è fixed (top:56px/bottom:44px):
   alza il tetto della lista così la card panel resta usabile */
@media (max-width: 991px) {
  .wf-news-list { max-height: none; }
  .wf-news { flex-shrink: 1; }
  /* sidebar off-canvas stretta → galleria a colonna singola */
  .wf-news-cams-grid { grid-template-columns: 1fr; }
}
