/* ═══════════════════════════════════════════════════════════
   OSINTHEUSO — Military OSINT Command Center
   Tactical ops-room · dark slate · amber-signal + cyan telemetry
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #05070a;
  --bg-2:      #080b10;
  --panel:     rgba(13, 18, 25, 0.74);
  --panel-2:   rgba(9, 13, 18, 0.92);
  --line:      rgba(150, 175, 200, 0.10);
  --line-2:    rgba(150, 175, 200, 0.18);
  --amber:     #ffc24b;
  --amber-dim: rgba(255, 194, 75, 0.14);
  --amber-soft:#ffdb93;
  --cyan:      #46dceb;
  --cyan-dim:  rgba(70, 220, 235, 0.14);
  --red:       #ff5470;
  --red-soft:  #ff8095;
  --green:     #38e0a0;
  --orange:    #ff8c42;
  --violet:    #a98bff;
  --ink:       #e7edf3;
  --ink-dim:   #93a3b1;
  --ink-faint: #566573;
  --shadow:    0 20px 60px -20px rgba(0, 0, 0, 0.8);
  --r:         14px;
  --cut:       12px;   /* chanfro HUD dos painéis */
  --mono:      "IBM Plex Mono", ui-monospace, monospace;
  --disp:      "Chakra Petch", system-ui, sans-serif;
  --stencil:   "Saira Stencil One", "Chakra Petch", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--disp); background: var(--bg); color: var(--ink);
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
  counter-reset: panel;
}

/* ───────────── AMBIENT BG ───────────── */
.bg-grid, .bg-glow, .bg-scan, .bg-noise, .bg-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-grid {
  background-image:
    linear-gradient(rgba(120,160,200,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,200,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  background:
    radial-gradient(60% 45% at 80% 6%, rgba(255,194,75,0.09), transparent 70%),
    radial-gradient(55% 50% at 10% 94%, rgba(70,220,235,0.08), transparent 70%),
    radial-gradient(80% 60% at 50% 120%, rgba(70,120,200,0.07), transparent 70%);
}
.bg-scan { background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,0,0,0.22) 3px, transparent 4px); opacity: 0.32; mix-blend-mode: overlay; }
.bg-noise { opacity: 0.045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.bg-vignette { background: radial-gradient(ellipse 90% 80% at 50% 45%, transparent 55%, rgba(0,0,0,0.55) 100%); }

/* ───────────── BOOT ───────────── */
.boot { position: fixed; inset: 0; z-index: 9999; background: var(--bg); display: grid; place-items: center; transition: opacity 0.6s ease, visibility 0.6s ease; }
.boot.done { opacity: 0; visibility: hidden; }
.boot__inner { width: min(440px, 84vw); text-align: center; }
.boot__mark { font-family: var(--stencil); font-weight: 400; font-size: clamp(1.6rem, 5vw, 2.4rem); letter-spacing: 0.4em; color: var(--amber); text-shadow: 0 0 24px rgba(255,194,75,0.5); animation: flick 2.4s infinite, glitch 3.7s infinite steps(1); }
@keyframes glitch {
  0%, 92%, 100% { text-shadow: 0 0 24px rgba(255,194,75,0.5); transform: none; }
  93% { text-shadow: -2px 0 var(--cyan), 2px 0 var(--red), 0 0 24px rgba(255,194,75,0.5); transform: translateX(1px); }
  94% { text-shadow: 2px 0 var(--cyan), -2px 0 var(--red), 0 0 24px rgba(255,194,75,0.5); transform: translateX(-1px); }
  95% { text-shadow: 0 0 24px rgba(255,194,75,0.5); transform: none; }
}
.boot__sub { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.34em; color: var(--cyan); margin-top: 10px; }
.boot__log { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-dim); min-height: 2.4em; margin: 1.4rem 0 1rem; text-align: left; white-space: pre-line; }
.boot__bar { height: 2px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.boot__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber), var(--cyan)); box-shadow: 0 0 12px var(--amber); transition: width 0.3s ease; }
@keyframes flick { 0%, 96%, 100% { opacity: 1; } 97% { opacity: 0.55; } 98% { opacity: 0.9; } }

/* ───────────── DECK ───────────── */
.deck { position: relative; z-index: 1; max-width: 1840px; margin: 0 auto; padding: 16px clamp(12px, 2vw, 30px) 10px; display: flex; flex-direction: column; gap: 12px; min-height: 100vh; }

/* ───────────── TOP BAR ───────────── */
.topbar { display: flex; align-items: center; gap: 20px; padding: 11px 18px; background: linear-gradient(180deg, rgba(18,24,32,0.8), rgba(9,13,18,0.7)); border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand__glyph { width: 32px; height: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(45deg); }
.brand__glyph span { background: var(--amber); border-radius: 2px; box-shadow: 0 0 10px rgba(255,194,75,0.5); animation: glyph 3s infinite ease-in-out; }
.brand__glyph span:nth-child(2) { animation-delay: 0.3s; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.brand__glyph span:nth-child(3) { animation-delay: 0.6s; }
.brand__glyph span:nth-child(4) { animation-delay: 0.9s; }
@keyframes glyph { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.brand__text h1 { font-family: var(--stencil); font-size: 1.16rem; font-weight: 400; letter-spacing: 0.18em; line-height: 1; }
.brand__text h1 em { color: var(--amber); font-style: normal; text-shadow: 0 0 14px rgba(255,194,75,0.4); }
.brand__text h1 .brand__t { color: var(--cyan); text-shadow: 0 0 14px rgba(70,220,235,0.4); }
.brand__text p { font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.2em; color: var(--ink-faint); margin-top: 5px; }

.metrics { display: flex; gap: 8px; flex: 1; justify-content: center; flex-wrap: wrap; }
.metric { text-align: center; padding: 6px 15px; border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); background: rgba(0,0,0,0.25); min-width: 74px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: 0.5; animation: metricScan 3s linear infinite; }
@keyframes metricScan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.metric b { display: block; font-family: var(--mono); font-size: 1.16rem; font-weight: 600; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.metric span { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase; }
.metric--alert b { color: var(--red); }
.metric--alert::after { background: linear-gradient(90deg, transparent, var(--red), transparent); }

.sys-tools { display: flex; align-items: stretch; gap: 8px; flex-shrink: 0; }
.sys-tools .tool-btn--tr { height: auto; }
.sys-live { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--ink-dim); padding: 7px 12px; border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); background: rgba(0,0,0,0.25); flex-shrink: 0; white-space: nowrap; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(255,194,75,0.6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,194,75,0.55); } 70% { box-shadow: 0 0 0 7px rgba(255,194,75,0); } 100% { box-shadow: 0 0 0 0 rgba(255,194,75,0); } }

/* ───────────── COMMAND BAR ───────────── */
.cmdbar { display: flex; gap: 12px; align-items: stretch; }
.cmd-form { flex: 1; display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, rgba(9,13,18,0.9), rgba(14,20,28,0.7)); border: 1px solid var(--line-2); border-radius: 0; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); padding: 4px 4px 4px 14px; transition: border-color 0.25s, box-shadow 0.25s; }
.cmd-form:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,194,75,0.1); }
.cmd-ico { color: var(--ink-faint); flex-shrink: 0; }
.cmd-form input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: var(--mono); font-size: 0.82rem; padding: 11px 0; }
.cmd-form input::placeholder { color: var(--ink-faint); }
.cmd-form button { background: var(--amber); color: #0a0d12; border: none; border-radius: 0; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); padding: 0 20px; font-family: var(--disp); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; cursor: pointer; align-self: stretch; transition: box-shadow 0.25s, transform 0.15s; box-shadow: 0 0 16px rgba(255,194,75,0.3); }
.cmd-form button:hover { box-shadow: 0 0 24px rgba(255,194,75,0.5); }
.cmd-form button:active { transform: scale(0.98); }
.cmd-status { display: flex; align-items: center; }
.readiness { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--ink-dim); padding: 0 16px; height: 100%; border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); background: rgba(0,0,0,0.25); white-space: nowrap; }
.readiness b { color: var(--amber); font-weight: 600; }
.readiness__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }

/* tooltip HUD do readiness — fica no .cmd-status (sem clip-path; o chanfro
   do .readiness cortaria o tooltip absoluto) */
.cmd-status { position: relative; }
.readiness { cursor: help; }
.rd-tip {
  position: absolute; top: calc(100% + 10px); right: 0; width: 264px; z-index: 900;
  display: flex; flex-direction: column; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  padding: 11px 13px; box-shadow: var(--shadow);
  font-family: var(--mono); letter-spacing: 0.02em; text-transform: none; white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}
.cmd-status:hover .rd-tip { opacity: 1; visibility: visible; transform: translateY(0); }
.rd-tip__title { font-family: var(--stencil); font-size: 0.56rem; letter-spacing: 0.18em; color: var(--amber); }
.rd-tip__txt { font-size: 0.6rem; line-height: 1.55; color: var(--ink-dim); }
.rd-tip__txt b { color: var(--ink); font-weight: 600; }
.rd-tip__lvl { font-size: 0.58rem; color: var(--ink-dim); display: flex; align-items: center; gap: 7px; }
.rd-tip__lvl i { font-style: normal; font-size: 0.5rem; }
.rd-tip__now { font-size: 0.58rem; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 7px; margin-top: 2px; }
.rd-tip__now b { color: var(--cyan); }

/* ───────────── GRID ───────────── */
.grid { display: grid; grid-template-columns: 320px minmax(0, 1fr) 356px; gap: 12px; flex: 1; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ───────────── PANEL (HUD chanfrado) ───────────── */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: var(--shadow); backdrop-filter: blur(9px); overflow: hidden;
  display: flex; flex-direction: column;
  counter-increment: panel;
  transition: border-color 0.3s;
}
.panel:hover { border-color: var(--line-2); }
.panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); z-index: 5; }
/* traço do chanfro superior-direito */
.panel::after { content: ""; position: absolute; top: -1px; right: -1px; width: calc(var(--cut) * 1.5); height: calc(var(--cut) * 1.5); border-top: 2px solid var(--amber-dim); pointer-events: none; z-index: 6; transform: rotate(0.001deg); background: linear-gradient(135deg, transparent calc(50% - 1px), var(--line-2) 50%, transparent calc(50% + 1px)); }
.panel--alerts::after { background: linear-gradient(135deg, transparent calc(50% - 1px), rgba(255,84,112,0.45) 50%, transparent calc(50% + 1px)); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.012) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
}
.panel__head h2 { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink); display: flex; align-items: baseline; gap: 9px; }
.panel__head h2::before { content: ""; width: 3px; height: 13px; background: var(--amber); box-shadow: 0 0 8px rgba(255,194,75,0.6); align-self: center; }
.panel__head h2::after { content: "/" counter(panel, decimal-leading-zero); font-family: var(--mono); font-size: 0.52rem; font-weight: 400; letter-spacing: 0.08em; color: var(--ink-faint); }
.panel__body { padding: 13px 15px; }
.panel__body--scroll { overflow-y: auto; max-height: 300px; }
.panel__foot { padding: 8px 15px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase; }
.tag { font-family: var(--mono); font-size: 0.53rem; letter-spacing: 0.18em; color: var(--cyan); border: 1px solid var(--cyan-dim); border-radius: 3px; padding: 3px 8px; background: var(--cyan-dim); }
.map-coord { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; color: var(--cyan); }

/* status dots */
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; transition: all 0.4s; }
.dot--pending { background: var(--ink-faint); animation: blink 1.2s infinite; }
.dot--ok { background: var(--green); box-shadow: 0 0 9px var(--green); }
.dot--err { background: var(--red); box-shadow: 0 0 9px var(--red); }
.dot--warn { background: var(--orange); box-shadow: 0 0 9px var(--orange); }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ───────────── OPERATIONAL SUMMARY ───────────── */
.clocks { display: flex; gap: 8px; margin-bottom: 13px; }
.clock { flex: 1; padding: 7px 12px; border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); background: rgba(0,0,0,0.25); text-align: center; }
.clock--local { border-color: var(--amber-dim); }
.clock__label { display: block; font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.18em; color: var(--ink-faint); }
.clock__time { font-family: var(--mono); font-size: 1.02rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock--local .clock__time { color: var(--amber-soft); }
.op-list { list-style: none; }
.op-list li { display: flex; justify-content: space-between; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 0.76rem; color: var(--ink-dim); }
.op-list li:last-child { border-bottom: 0; }
.op-list b { font-family: var(--mono); font-size: 0.86rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.op-spark { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.op-spark__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.op-spark__head span { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.op-spark__head b { font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); }
#sparkCanvas { width: 100%; height: 44px; display: block; }

/* ───────────── SEARCH RESULT ───────────── */
.hint-txt { font-size: 0.75rem; color: var(--ink-faint); line-height: 1.5; }
.sr-card { animation: fade-up 0.4s ease both; }
.sr-card__top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.sr-card__title { font-size: 0.94rem; color: var(--ink); font-weight: 600; }
.sr-card__type { font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.14em; color: var(--cyan); border: 1px solid var(--cyan-dim); border-radius: 5px; padding: 2px 7px; text-transform: uppercase; }
.sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv span { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.16em; color: var(--ink-faint); }
.kv b { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-err { font-family: var(--mono); font-size: 0.76rem; color: var(--red); }

/* ───────────── MAP ───────────── */
.panel--map { flex: 1; }
.geo-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 340px; background: #06090d; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; background: #06090d; z-index: 1; }
.leaflet-container { background: #06090d !important; font-family: var(--mono) !important; }
.leaflet-control-attribution { background: rgba(5,8,12,0.7) !important; color: var(--ink-faint) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--ink-dim) !important; }
.leaflet-control-zoom { border: 1px solid var(--line-2) !important; margin: 12px !important; }
.leaflet-control-zoom a { background: rgba(10,14,20,0.9) !important; color: var(--amber) !important; border-color: var(--line) !important; }
.leaflet-control-zoom a:hover { background: rgba(20,28,38,0.95) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-2) !important; color: var(--ink) !important; border: 1px solid var(--line-2); box-shadow: var(--shadow) !important; border-radius: 9px !important; }
.leaflet-popup-content { font-family: var(--mono); font-size: 0.72rem; margin: 11px 13px !important; line-height: 1.5; }
.leaflet-popup-content b { color: var(--amber); }
.leaflet-popup-content a { color: var(--cyan); }
.leaflet-popup-close-button { color: var(--ink-dim) !important; }

/* radar sweep overlay */
.radar-sweep { position: absolute; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; opacity: 0.5; }
.radar-sweep::before { content: ""; position: absolute; top: 50%; left: 50%; width: 200%; height: 200%; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, transparent 0deg, transparent 320deg, rgba(70,220,235,0.10) 355deg, rgba(70,220,235,0.18) 360deg); animation: radar 8s linear infinite; }
@keyframes radar { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* map decor */
.geo-corner { position: absolute; width: 16px; height: 16px; border: 1px solid var(--amber); opacity: 0.5; pointer-events: none; z-index: 500; }
.geo-corner--tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.geo-corner--tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.geo-corner--bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.geo-corner--br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* layer control */
.layer-ctrl { position: absolute; top: 12px; right: 12px; z-index: 600; background: rgba(7,11,16,0.86); border: 1px solid var(--line-2); border-radius: 0; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); padding: 9px 10px; backdrop-filter: blur(6px); min-width: 138px; }
.layer-ctrl__title { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em; color: var(--ink-faint); margin-bottom: 7px; }
.layer-pill { display: flex; align-items: center; gap: 8px; padding: 4px 3px; cursor: pointer; user-select: none; border-radius: 5px; transition: background 0.15s; }
.layer-pill:hover { background: rgba(255,255,255,0.04); }
.layer-pill__sw { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 7px currentColor; }
.layer-pill__lb { font-family: var(--mono); font-size: 0.62rem; color: var(--ink); flex: 1; }
.layer-pill__ct { font-family: var(--mono); font-size: 0.55rem; color: var(--ink-faint); }
.layer-pill.off { opacity: 0.4; }
.layer-pill.off .layer-pill__sw { box-shadow: none; }

/* legend */
.map-legend { position: absolute; bottom: 12px; left: 12px; z-index: 600; display: flex; flex-direction: column; gap: 3px; background: rgba(7,11,16,0.7); border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); padding: 7px 9px; backdrop-filter: blur(6px); }
.leg-item { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.52rem; color: var(--ink-dim); }
.leg-item::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* map markers (divIcon) */
.mk { border-radius: 50%; box-shadow: 0 0 8px currentColor; border: 1px solid rgba(255,255,255,0.35); }
.mk-pulse { position: relative; }
.mk-pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; animation: mkpulse 2s infinite ease-out; }
@keyframes mkpulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }
.mk-emoji { display: grid; place-items: center; font-size: 13px; filter: drop-shadow(0 0 4px rgba(0,0,0,0.9)); }

/* ───────────── TIMELINE / EVENTS ───────────── */
.row-ph { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); padding: 14px 4px; text-align: center; }
.timeline { list-style: none; }
.tl-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 11px; padding: 9px 4px 9px 2px; border-bottom: 1px solid var(--line); animation: fade-up 0.4s ease both; position: relative; transition: background 0.2s; }
.tl-item:hover { background: rgba(255,255,255,0.02); }
.tl-item:last-child { border-bottom: 0; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; box-shadow: 0 0 8px currentColor; background: currentColor; }
.tl-main { min-width: 0; }
.tl-cat { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase; }
.tl-title { font-size: 0.76rem; color: var(--ink); margin-top: 2px; line-height: 1.35; }
.tl-title a { color: inherit; text-decoration: none; }
.tl-title a:hover { color: var(--amber-soft); }
.tl-meta { font-family: var(--mono); font-size: 0.55rem; color: var(--ink-faint); margin-top: 3px; }
.tl-time { font-family: var(--mono); font-size: 0.58rem; color: var(--ink-dim); white-space: nowrap; text-align: right; }

/* ───────────── FEED ───────────── */
.feed-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 15px 4px; border-bottom: 1px solid var(--line); }
.chip { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.06em; color: var(--ink-dim); border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 10px; cursor: pointer; transition: all 0.18s; background: rgba(0,0,0,0.2); white-space: nowrap; position: relative; }
.chip:hover { color: var(--ink); border-color: var(--ink-faint); transform: translateY(-1px); }
.chip.active { color: #0a0d12; background: var(--amber); border-color: var(--amber); box-shadow: 0 0 14px rgba(255,194,75,0.35); font-weight: 600; }
.news-list { list-style: none; }
.news-item { padding: 9px 4px; border-bottom: 1px solid var(--line); animation: fade-up 0.4s ease both; transition: background 0.2s; }
.news-item:hover { background: linear-gradient(90deg, rgba(255,194,75,0.04), transparent 70%); }
.news-item:last-child { border-bottom: 0; }
.news-item a { color: var(--ink); text-decoration: none; font-size: 0.78rem; line-height: 1.4; display: block; transition: color 0.2s; position: relative; padding-left: 14px; }
.news-item a::before { content: "›"; position: absolute; left: 0; color: var(--amber); transition: transform 0.2s; font-weight: 700; }
.news-item a:hover { color: var(--amber-soft); }
.news-item a:hover::before { transform: translateX(3px); }
.news-meta { font-family: var(--mono); font-size: 0.54rem; color: var(--ink-faint); margin-top: 4px; padding-left: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.news-meta .cty { color: var(--cyan); }
.news-meta .src { color: var(--amber-soft); }

/* ───────────── LAUNCHES ───────────── */
.launch-list, .sat-list, .mini-list, .node-list { list-style: none; }
.launch-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); animation: fade-up 0.4s ease both; }
.launch-item:last-child { border-bottom: 0; }
.launch-name { font-size: 0.76rem; color: var(--ink); line-height: 1.35; }
.launch-meta { font-family: var(--mono); font-size: 0.54rem; color: var(--ink-faint); margin-top: 3px; }
.launch-cd { font-family: var(--mono); font-size: 0.66rem; color: var(--cyan); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.launch-cd small { display: block; color: var(--ink-faint); font-size: 0.5rem; }

/* ───────────── SATELLITES ───────────── */
.iss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.iss-cell { background: rgba(0,0,0,0.28); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.iss-cell span { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.iss-cell b { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; color: var(--cyan); font-variant-numeric: tabular-nums; }
.sat-list { margin-top: 10px; }
.sat-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; padding: 6px 3px; border-bottom: 1px solid var(--line); font-size: 0.72rem; }
.sat-item:last-child { border-bottom: 0; }
.sat-item .sd { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.sat-item .sn { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sat-item .sc { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-faint); white-space: nowrap; }

/* ───────────── AIR & NAVAL ───────────── */
.dn-row { display: flex; align-items: center; gap: 11px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.dn-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 15px; flex-shrink: 0; }
.dn-ico--air { background: var(--cyan-dim); color: var(--cyan); }
.dn-ico--naval { background: rgba(169,139,255,0.14); color: var(--violet); }
.dn-txt { min-width: 0; }
.dn-txt b { display: block; font-size: 0.76rem; color: var(--ink); text-transform: capitalize; }
.dn-txt small { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-faint); }
.mini-list { margin-top: 8px; }
.mini-item { padding: 6px 3px; border-bottom: 1px solid var(--line); font-size: 0.72rem; color: var(--ink-dim); line-height: 1.35; }
.mini-item:last-child { border-bottom: 0; }
.mini-item a { color: var(--ink); text-decoration: none; }
.mini-item a:hover { color: var(--amber-soft); }

/* ───────────── ALERT TICKER ───────────── */
.ticker { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); background: rgba(0,0,0,0.3); overflow: hidden; min-height: 34px; }
.ticker--hot { border-color: rgba(255,84,112,0.4); box-shadow: 0 0 18px rgba(255,84,112,0.12), inset 0 0 24px rgba(255,84,112,0.05); }
.ticker__label { display: grid; place-items: center; padding: 0 14px; font-family: var(--stencil); font-size: 0.6rem; letter-spacing: 0.16em; color: var(--red-soft); background: repeating-linear-gradient(-45deg, rgba(255,84,112,0.14) 0 8px, rgba(255,84,112,0.06) 8px 16px); border-right: 1px solid rgba(255,84,112,0.25); white-space: nowrap; flex-shrink: 0; }
.ticker--hot .ticker__label { animation: blink 1.6s infinite; }
.ticker__track { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker__inner { display: inline-flex; align-items: center; gap: 18px; white-space: nowrap; padding: 0 18px; will-change: transform; }
.ticker__inner.run { animation: tickerScroll linear infinite; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-item { font-family: var(--mono); font-size: 0.66rem; color: var(--ink); text-decoration: none; }
.tk-item b { color: var(--red-soft); font-weight: 600; margin-right: 6px; }
.tk-item:hover { color: var(--amber-soft); }
.tk-item--dim { color: var(--ink-faint); letter-spacing: 0.1em; }
.tk-sep { color: var(--red); opacity: 0.5; font-size: 0.6rem; }

/* ───────────── WAR ALERTS PANEL ───────────── */
.panel--alerts .panel__head h2::before { background: var(--red); box-shadow: 0 0 8px rgba(255,84,112,0.6); }
.alert-tools { display: flex; align-items: center; gap: 7px; }
.tool-btn { width: 26px; height: 26px; display: grid; place-items: center; font-size: 0.72rem; background: rgba(0,0,0,0.3); border: 1px solid var(--line-2); border-radius: 3px; cursor: pointer; transition: all 0.18s; filter: grayscale(1); opacity: 0.55; }
.tool-btn:hover { opacity: 0.9; }
.tool-btn.active { filter: none; opacity: 1; border-color: var(--amber); box-shadow: 0 0 10px rgba(255,194,75,0.25); }
.tool-btn--rf { filter: none; color: var(--ink-dim); font-size: 0.82rem; }
.tool-btn--rf:hover { color: var(--cyan); border-color: var(--cyan-dim); }
.tool-btn--rf span { display: inline-block; line-height: 1; }
.tool-btn--rf.spin span { animation: rfspin 0.7s linear infinite; }
.tool-btn--rf.spin { color: var(--cyan); opacity: 1; }
@keyframes rfspin { to { transform: rotate(360deg); } }

.tool-btn--tr { width: auto; padding: 0 9px; font-family: var(--mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em; color: var(--ink-dim); filter: none; }
.tool-btn--tr.active { color: #0a0d12; background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px rgba(255,194,75,0.3); opacity: 1; }

/* help "?" em cada painel — usa title nativo do navegador (evita clipping
   pelo overflow:hidden do .panel) */
.panel__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.help-btn { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 0.58rem; color: var(--ink-faint); background: rgba(0,0,0,0.25); border: 1px solid var(--line-2); cursor: help; transition: all 0.18s; }
.help-btn:hover, .help-btn:focus-visible { color: var(--amber); border-color: var(--amber-dim); opacity: 1; }

/* ───────────── ESCALADA POR TEATRO ───────────── */
.esc-list { list-style: none; }
.esc-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.esc-row:last-child { border-bottom: 0; }
.esc-name { font-size: 0.78rem; color: var(--ink); }
.esc-ct { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.esc-ct small { font-size: 0.52rem; color: var(--ink-faint); }
.esc-trend { font-size: 0.62rem; width: 14px; text-align: center; }
.esc-lvl { font-family: var(--mono); font-size: 0.52rem; font-weight: 600; letter-spacing: 0.12em; border: 1px solid; border-radius: 3px; padding: 2px 7px; min-width: 64px; text-align: center; }

.alert-list { list-style: none; }
.alert-item { padding: 8px 4px 8px 12px; border-bottom: 1px solid var(--line); border-left: 2px solid var(--red); margin-left: 2px; animation: fade-up 0.4s ease both; transition: background 0.2s; }
.alert-item:hover { background: linear-gradient(90deg, rgba(255,84,112,0.1), transparent 75%); }
.alert-item:last-child { border-bottom: 0; }
.alert-item--hot { background: linear-gradient(90deg, rgba(255,84,112,0.08), transparent 70%); }
.alert-item--hot { border-left-color: var(--red); box-shadow: inset 2px 0 8px -4px rgba(255,84,112,0.6); }
.alert-item a { color: var(--ink); text-decoration: none; font-size: 0.76rem; line-height: 1.4; display: block; }
.alert-item a:hover { color: var(--red-soft); }
.alert-meta { font-family: var(--mono); font-size: 0.54rem; color: var(--ink-faint); margin-top: 3px; display: flex; gap: 10px; }
.alert-meta .src { color: var(--red-soft); }
.alert-meta .src--tg { color: var(--cyan); }

/* ───────────── FIELD REPORTS (Telegram) ───────────── */
.tg-bar { padding: 9px 15px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.tg-chans { display: flex; gap: 6px; flex-wrap: wrap; }
.tg-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.58rem; color: var(--ink-dim); border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 5px 3px 10px; background: rgba(0,0,0,0.25); }
.tg-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); flex-shrink: 0; }
.tg-chip--ok .tg-chip__dot { background: var(--green); box-shadow: 0 0 7px var(--green); }
.tg-chip--err .tg-chip__dot { background: var(--red); box-shadow: 0 0 7px var(--red); }
.tg-chip--pend .tg-chip__dot { animation: blink 1.2s infinite; }
.tg-chip__x { background: none; border: none; color: var(--ink-faint); font-size: 0.75rem; cursor: pointer; line-height: 1; padding: 2px 5px; border-radius: 50%; transition: all 0.15s; }
.tg-chip__x:hover { color: var(--red); background: rgba(255,84,112,0.12); }
.tg-add { display: flex; gap: 6px; }
.tg-add input { flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--line); border-radius: 3px; outline: none; color: var(--ink); font-family: var(--mono); font-size: 0.62rem; padding: 6px 10px; transition: border-color 0.2s; }
.tg-add input:focus { border-color: var(--cyan); }
.tg-add input::placeholder { color: var(--ink-faint); }
.tg-add button { width: 28px; background: var(--cyan-dim); color: var(--cyan); border: 1px solid var(--cyan-dim); border-radius: 3px; font-size: 0.85rem; cursor: pointer; transition: all 0.18s; }
.tg-add button:hover { background: rgba(70,220,235,0.25); }
.tg-list { list-style: none; }
.tg-post { padding: 10px 4px 10px 12px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; margin-left: 2px; animation: fade-up 0.4s ease both; transition: background 0.2s, border-color 0.2s; }
.tg-post:hover { background: linear-gradient(90deg, rgba(70,220,235,0.05), transparent 70%); border-left-color: var(--cyan); }
.tg-post:last-child { border-bottom: 0; }
.tg-post--hot { border-left-color: var(--cyan); background: linear-gradient(90deg, rgba(70,220,235,0.05), transparent 60%); }
.tg-post__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.tg-post__ch { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.08em; color: var(--cyan); text-transform: uppercase; }
.tg-post__time { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-faint); white-space: nowrap; }
.tg-post__text { font-size: 0.76rem; color: var(--ink); line-height: 1.45; white-space: pre-line; word-break: break-word; }
.tg-post__img { display: block; max-width: 100%; border-radius: 8px; margin-top: 7px; border: 1px solid var(--line); }
.tg-post__vid { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; margin-top: 7px; border: 1px solid var(--line); background: #000; }
.alert-media { display: block; max-width: 100%; max-height: 150px; object-fit: cover; border-radius: 6px; margin-top: 6px; border: 1px solid rgba(255,84,112,0.25); }
video.alert-media { object-fit: contain; background: #000; }
.tg-post__foot { display: flex; gap: 12px; margin-top: 5px; font-family: var(--mono); font-size: 0.54rem; color: var(--ink-faint); }
.tg-post__foot a { color: var(--cyan); text-decoration: none; }
.tg-post__foot a:hover { color: var(--amber-soft); }
.x-links { padding: 8px 15px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.56rem; color: var(--ink-faint); display: flex; gap: 10px; flex-wrap: wrap; }
.x-links a { color: var(--ink-dim); text-decoration: none; transition: color 0.15s; }
.x-links a:hover { color: var(--amber-soft); }

/* news freshness */
.news-item.is-new a::before { color: var(--red-soft); }
.new-badge { display: inline-block; font-family: var(--mono); font-size: 0.46rem; letter-spacing: 0.12em; color: var(--red-soft); border: 1px solid rgba(255,84,112,0.35); border-radius: 4px; padding: 1px 5px; background: rgba(255,84,112,0.1); animation: blink 2.2s infinite; }
.hot { color: var(--red-soft) !important; }

/* ───────────── SOURCE MATRIX ───────────── */
.node-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.node-row:hover { background: rgba(255,255,255,0.02); }
.node-row:last-child { border-bottom: 0; }
.node-row__name { font-size: 0.74rem; color: var(--ink); }
.node-row__ep { font-family: var(--mono); font-size: 0.52rem; color: var(--ink-faint); margin-top: 2px; }
.node-row__st { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.1em; color: var(--ink-dim); }

/* ───────────── FOOTER ───────────── */
.foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 12px; font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.06em; color: var(--ink-faint); text-align: center; }
.foot__sep { opacity: 0.4; }

/* reveal / motion */
.reveal { opacity: 0; transform: translateY(16px); }
.deck.ready .reveal { animation: reveal 0.7s cubic-bezier(0.22,1,0.36,1) both; animation-delay: calc(var(--d,1) * 0.08s); }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* scrollbars */
.panel__body--scroll::-webkit-scrollbar { width: 6px; }
.panel__body--scroll::-webkit-scrollbar-track { background: transparent; }
.panel__body--scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.panel__body--scroll::-webkit-scrollbar-thumb:hover { background: var(--amber-dim); }

/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 1240px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .col--center { grid-column: 1 / -1; order: -1; }
  .metrics { order: 3; flex: 1 1 100%; justify-content: space-between; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px; }
  .cmdbar { flex-direction: column; }
  .cmd-status { display: none; }
  .metric { min-width: 0; flex: 1; padding: 6px 8px; }
  .geo-wrap { aspect-ratio: 4 / 3; }
  .layer-ctrl { min-width: 118px; padding: 7px; }
  .ticker__label { padding: 0 9px; font-size: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .radar-sweep { display: none; }
}
