@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  color-scheme: dark;
  /* Deep, pure darks for tactical feel */
  --bg: #010409; 
  --bg2: #050d18; 
  --panel: rgba(5, 13, 24, 0.7); 
  --border: rgba(0, 212, 255, 0.15); 
  --border2: rgba(255, 255, 255, 0.08);
  
  /* Vibrant Neon Cyber Colors */
  --teal: #00f0ff; 
  --cy: #00d4ff; 
  --mut: #6887a8; 
  --dim: #405872; 
  --faint: #203040; 
  --white: #ffffff;
  
  --red: #ff003c; 
  --orange: #ff8a00; 
  --amber: #fadb14; 
  --green: #39ff14; 
  --blue: #00d4ff; 
  --purple: #b538ff;
  
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --cond: "Space Grotesk", system-ui, sans-serif;
}

*{box-sizing:border-box}

/* Tactical Background with Grid and subtle Scanlines */
body {
  margin:0;
  background-color: var(--bg);
  color: var(--mut);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* Grid pattern */
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
  position: relative;
}

/* CRT Scanline overlay */
body::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 9999;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

a{color:var(--cy);text-decoration:none; transition: all 0.2s;}
a:hover{color:var(--white); text-shadow: 0 0 10px var(--cy);}

/* Topbar - Cyberpunk Header */
.topbar {
  display: flex; align-items: center; gap: 20px; padding: 18px 40px; 
  background: rgba(1, 4, 9, 0.85); 
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 212, 255, 0.05);
  position: sticky; top: 0; z-index: 100;
}
.brand {
  font-family: var(--mono); font-size: 22px; letter-spacing: 4px; 
  color: var(--white); font-weight: 800; display: flex; align-items: center; gap: 12px;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}
.dot {
  display: inline-block; width: 12px; height: 12px; background: var(--red);
  animation: p 1.5s infinite; box-shadow: 0 0 15px var(--red);
}
@keyframes p { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.topbar .sub { font-family: var(--mono); font-size: 10px; color: var(--cy); letter-spacing: 3px; text-transform: uppercase; }
.topbar .meta { margin-left: auto; display: flex; gap: 16px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--mut); }
.topbar .ro { color: var(--bg); font-weight: 800; letter-spacing: 2px; background: var(--red); padding: 4px 8px; border-radius: 2px; box-shadow: 0 0 15px rgba(255, 0, 60, 0.4); }
.about-link {
  color: var(--bg); background: var(--cy); font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; 
  border: 1px solid var(--cy); padding: 6px 16px; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: all 0.2s ease;
}
.about-link:hover { background: var(--white); color: var(--bg); box-shadow: 0 0 20px var(--cy); }

/* Tactical Tabs */
.tabs {
  display: flex; gap: 12px; padding: 16px 40px; flex-wrap: wrap; 
  background: rgba(1, 4, 9, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255,255,255,0.05); position: sticky; top: 76px; z-index: 99;
}
.tabs button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; font-weight: 700;
  padding: 10px 20px; cursor: pointer; text-transform: uppercase;
  background: transparent; border: 1px solid var(--border2); color: var(--mut); 
  position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.tabs button::before {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px; background: var(--cy); transition: width 0.3s;
}
.tabs button:hover { border-color: var(--cy); color: var(--white); background: rgba(0, 212, 255, 0.05); }
.tabs button:hover::before { width: 100%; }
.tabs button.active {
  background: rgba(0, 212, 255, 0.1); border-color: var(--cy); color: var(--cy); 
  box-shadow: inset 0 0 15px rgba(0,212,255,0.1); text-shadow: 0 0 8px rgba(0,212,255,0.5);
}
.tabs button.active::before { width: 100%; box-shadow: 0 -2px 10px var(--cy); }

/* Main Layout */
main { padding: 40px; max-width: 1400px; margin: 0 auto; position: relative; z-index: 10;}
.sec { display: none; }
.sec.active { display: block; animation: glitch-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes glitch-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); filter: blur(4px); }
  50% { filter: blur(0px); }
  100% { opacity: 1; transform: none; }
}

h2.title {
  font-family: var(--mono); font-size: 15px; letter-spacing: 4px; color: var(--cy); margin: 0 0 24px; 
  font-weight: 800; text-transform: uppercase; border-left: 6px solid var(--cy); padding-left: 14px;
  text-shadow: 0 0 15px rgba(0,212,255,0.4); display: flex; align-items: center;
}
h2.title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); margin-left: 20px; }

.grid { display: grid; gap: 24px; }
.cols { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* HUD Cards */
.card {
  background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 24px; position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 8px 30px rgba(0,0,0,0.4);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
/* Card Corner Accents */
.card::after {
  content: ''; position: absolute; top: 0; left: 0; width: 30px; height: 30px;
  border-top: 2px solid var(--cy); border-left: 2px solid var(--cy); opacity: 0.5; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-4px) scale(1.01); border-color: var(--cy); box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.05), 0 12px 40px rgba(0,212,255,0.15); z-index: 10; }
.card:hover::after { opacity: 1; box-shadow: -4px -4px 15px rgba(0,212,255,0.3); }

/* Stats within Cards */
.stat .k { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--mut); margin-bottom: 8px; text-transform: uppercase; font-weight: 700; }
.stat .v { font-family: var(--mono); font-size: 38px; font-weight: 800; color: var(--white); line-height: 1.1; text-shadow: 0 0 20px currentColor; }
.stat .v.sm { font-size: 24px; }

.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.tag { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; padding: 4px 10px; border-radius: 2px; border: 1px solid currentColor; text-transform: uppercase; background: rgba(0,0,0,0.6); box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 0; overflow: hidden; flex: 1; }
.bar>i { display: block; height: 100%; box-shadow: 0 0 10px currentColor; }
.muted { color: var(--mut); font-size: 12px; font-family: var(--mono); }

/* AI Analysis Block */
.analysis {
  white-space: pre-wrap; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--white);
  background: rgba(1, 4, 9, 0.7); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-left: 4px solid var(--purple);
  padding: 24px; margin-top: 16px;
  box-shadow: inset 0 0 30px rgba(181, 56, 255, 0.05);
}
.headline { font-family: var(--sans); font-size: 17px; color: var(--white); line-height: 1.5; font-weight: 600; }

.gauge { display: flex; align-items: baseline; gap: 12px; }
.gauge .n { font-family: var(--mono); font-size: 52px; font-weight: 800; text-shadow: 0 0 30px currentColor; }

.list>.item { padding: 16px 0; border-bottom: 1px dashed var(--border2); }
.list>.item:last-child { border-bottom: none; }

/* Interactive Rows (Links) */
.trow {
  display: flex; gap: 16px; align-items: center; padding: 18px 22px; 
  border: 1px solid var(--border2); background: rgba(5, 13, 24, 0.5); 
  backdrop-filter: blur(8px); text-decoration: none; 
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.trow::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dim); transition: width 0.2s;
}
a.trow:hover { border-color: var(--teal); background: rgba(0, 240, 255, 0.05); transform: translateX(8px); box-shadow: 0 8px 25px rgba(0, 240, 255, 0.1); }
a.trow:hover::before { background: var(--teal); width: 6px; box-shadow: 0 0 15px var(--teal); }
.trow .body { flex: 1; min-width: 0; padding-left: 8px; }
.trow .ttl { font-family: var(--sans); font-size: 17px; color: var(--white); line-height: 1.4; font-weight: 700; }
.trow .mrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.trow .src { font-family: var(--mono); font-size: 11px; color: var(--teal); letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; }
.trow .ext { color: var(--dim); font-size: 15px; flex-shrink: 0; }

.intens { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; width: 70px; }
.intens b { font-family: var(--mono); font-size: 22px; font-weight: 800; text-shadow: 0 0 15px currentColor; }
.ibar { width: 100%; height: 4px; background: rgba(255,255,255,0.1); overflow: hidden; }
.ibar>i { display: block; height: 100%; box-shadow: 0 0 8px currentColor; }

.tgrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

/* Buttons */
.ver-btn {
  margin-top: 20px; font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--purple); background: rgba(181, 56, 255, 0.1); 
  border: 1px solid rgba(181, 56, 255, 0.4); padding: 10px 24px; cursor: pointer; 
  transition: all 0.2s ease;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.ver-btn:hover { background: rgba(181, 56, 255, 0.25); border-color: var(--purple); color: var(--white); box-shadow: 0 0 20px rgba(181, 56, 255, 0.4); transform: scale(1.02); }

.brief { display: flex; flex-direction: column; gap: 20px; }
.bfield .blabel { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 2.5px; color: var(--dim); margin-bottom: 8px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.bfield .blabel::before { content: '■'; font-size: 9px; color: currentColor; opacity: 0.7;}
.bfield .btext { font-family: var(--sans); font-size: 16px; color: var(--white); line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 4px 12px; border: 1px solid rgba(255,255,255,0.15); color: var(--white); background: rgba(255,255,255,0.05); }

.mnrow { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; background: rgba(0,0,0,0.5); padding: 16px; border-left: 3px solid var(--border2); }
.mnname { font-family: var(--sans); font-size: 17px; font-weight: 700; color: var(--white); min-width: 130px; }
.mnbadge { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 4px 8px; border: 1px solid currentColor; background: rgba(0,0,0,0.8); }
.mnnar { font-family: var(--sans); font-size: 15px; color: var(--mut); flex: 1; line-height: 1.5; }

/* Modals */
.modal-back { position: fixed; inset: 0; background: rgba(1, 4, 9, 0.9); backdrop-filter: blur(15px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal-box { 
  width: min(800px, 94vw); max-height: 90vh; overflow-y: auto; 
  background: rgba(5, 13, 24, 0.95); border: 1px solid rgba(181, 56, 255, 0.4); 
  padding: 40px; box-shadow: 0 0 60px rgba(181, 56, 255, 0.2), inset 0 0 30px rgba(0,0,0,0.9); 
  animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}
@keyframes slideUp{from{transform:translateY(30px) scale(0.97);opacity:0}to{transform:none;opacity:1}}
.modal-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 30px; border-bottom: 1px solid rgba(181, 56, 255, 0.2); padding-bottom: 20px; }
.modal-title { font-family: var(--mono); font-size: 18px; font-weight: 800; letter-spacing: 4px; color: var(--purple); text-shadow: 0 0 20px rgba(181, 56, 255, 0.6); text-transform: uppercase; }
.modal-sub { font-family: var(--mono); font-size: 12px; color: var(--mut); margin-top: 8px; letter-spacing: 1.5px; }
.modal-x { 
  margin-left: auto; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); 
  width: 40px; height: 40px; color: var(--mut); cursor: pointer; font-size: 16px; font-family: var(--mono); 
  display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; 
  clip-path: polygon(25% 0%, 100% 0%, 100% 75%, 75% 100%, 0% 100%, 0% 25%);
}
.modal-x:hover { background: var(--red); color: var(--white); border-color: var(--red); box-shadow: 0 0 20px var(--red); }

.crank { color: var(--cy); font-family: var(--mono); font-size: 15px; font-weight: 800; display: inline-block; width: 28px; }
.spark { display: block; flex-shrink: 0; filter: drop-shadow(0 0 8px currentColor); }
.eng { font-family: var(--mono); font-size: 12px; color: var(--mut); display: flex; gap: 14px; }
.eng b { color: var(--white); font-weight: 700; }

.toggles { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.toggles button { 
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 10px 20px; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); 
  background: rgba(255,255,255,0.03); color: var(--mut); transition: all 0.2s ease;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.toggles button:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.toggles button[aria-pressed="true"] { border-color: var(--teal); color: var(--bg); background: var(--teal); box-shadow: 0 0 20px rgba(0, 240, 255, 0.5); text-shadow: none; font-weight: 800; }

.layer.off { display: none; }
.mapwrap { position: relative; background: rgba(1, 4, 9, 0.6); border: 1px solid var(--border); padding: 20px; max-width: 1000px; margin: 0 auto; box-shadow: inset 0 0 60px rgba(0,0,0,0.9); 
  /* Hologram grid effect inside the map container */
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}
/* Corner brackets for the map */
.mapwrap::before, .mapwrap::after { content: ''; position: absolute; width: 50px; height: 50px; border: 2px solid var(--cy); pointer-events: none; opacity: 0.6; }
.mapwrap::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.mapwrap::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.gtmap { display: block; max-height: 80vh; width: 100%; filter: drop-shadow(0 0 15px rgba(0,212,255,0.15)); }
.gtmap path { 
  transition: fill-opacity .2s ease, stroke .2s ease, stroke-width .2s ease, filter .2s ease; 
  cursor: pointer; 
  stroke: rgba(0, 240, 255, 0.35) !important; 
  stroke-width: 0.8px !important;
  vector-effect: non-scaling-stroke;
}
.gtmap path:hover { 
  fill-opacity: 0.9 !important; 
  stroke: var(--white) !important; 
  stroke-width: 2px !important; 
  /* Intense glow when hovering over a department */
  filter: drop-shadow(0 0 12px var(--cy)); 
}
.gtmap g.hideFill path { fill-opacity: .05 !important; }

/* Styling the OSINT markers (Circles and Rects) */
.gtmap circle, .gtmap rect {
  stroke: var(--white) !important;
  stroke-width: 1px !important;
  animation: pulse-marker 1.5s infinite alternate ease-in-out;
  transform-origin: center;
  transform-box: fill-box;
}
.gtmap rect {
  /* Make military rects pulse a bit differently */
  animation: pulse-marker-rect 1s infinite alternate step-end;
}
@keyframes pulse-marker {
  0% { filter: drop-shadow(0 0 3px currentColor) brightness(1); transform: scale(0.9); }
  100% { filter: drop-shadow(0 0 15px currentColor) brightness(1.5); transform: scale(1.1); }
}
@keyframes pulse-marker-rect {
  0% { filter: drop-shadow(0 0 5px currentColor); opacity: 1; }
  50% { filter: drop-shadow(0 0 20px currentColor); opacity: 0.6; }
}

/* Tooltip HUD */
.mapinfo { 
  position: absolute; pointer-events: none; z-index: 20; width: 340px; max-width: 90%; 
  background: rgba(1, 4, 9, 0.95); backdrop-filter: blur(10px); 
  border: 1px solid var(--cy); padding: 24px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 25px rgba(0,212,255,0.25); 
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  display: none;
}
.mapinfo::after { content: ''; position: absolute; top: -1px; left: -1px; width: 24px; height: 24px; border-top: 3px solid var(--white); border-left: 3px solid var(--white); }
.mapinfo.show { display: block; animation: fadeUp .2s ease forwards; }
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.mapinfo h4 { margin: 0 0 16px; font-family: var(--sans); font-size: 20px; color: var(--white); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; border-bottom: 1px solid rgba(0,212,255,0.4); padding-bottom: 10px; text-shadow: 0 0 15px rgba(0,212,255,0.6); }
.mapinfo .lbl { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 2.5px; color: var(--cy); margin: 20px 0 8px; text-transform: uppercase; }
.mapinfo .li { font-family: var(--sans); font-size: 15px; color: var(--white); line-height: 1.6; margin-bottom: 6px; }
.mapinfo .an { font-family: var(--mono); font-size: 13px; color: var(--mut); line-height: 1.7; background: rgba(0,212,255,0.05); padding: 14px; border-left: 3px solid var(--cy); margin-top: 12px; }

.empty { color: var(--mut); font-family: var(--mono); font-size: 14px; font-style: italic; padding: 30px 10px; opacity: 0.5; letter-spacing: 1px; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 30px 40px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 3px; background: rgba(1, 4, 9, 0.95); position: relative; z-index: 10;}

table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
th, td { text-align: left; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
th { font-size: 11px; letter-spacing: 3px; color: var(--mut); font-weight: 800; text-transform: uppercase; }
td.num { text-align: right; font-weight: 800; color: var(--white); text-shadow: 0 0 12px rgba(255,255,255,0.3); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 0; border: 1px solid var(--bg);}
::-webkit-scrollbar-thumb:hover { background: var(--cy); box-shadow: 0 0 15px var(--cy); }

/* ── PULSO SOCIAL: COMPLEX LAYOUT ── */
.top-kpis { display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
.kpi-box { flex: 1; min-width: 140px; padding: 15px; background: rgba(5,13,24,0.7); }
.kpi-box .k { font-size: 11px; color: var(--mut); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-box .v { font-size: 26px; font-weight: bold; font-family: 'Space Grotesk', sans-serif; line-height: 1; margin-bottom: 5px; }
.kpi-box .trend { font-size: 10px; }

.mod-title { margin-bottom: 20px; }
.mt-arrow { color: var(--cy); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: bold; margin-bottom: 5px; }
.mod-title h2 { font-size: 18px; color: var(--white); margin: 0 0 4px 0; }
.mod-title p { font-size: 12px; color: var(--dim); margin: 0; }

.mid-area { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 900px) { .mid-area { grid-template-columns: 1fr; } }

.box-lbl { font-size: 11px; color: var(--mut); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.flex-lbl { display: flex; justify-content: space-between; align-items: center; }
.wbadge { background: rgba(0, 212, 255, 0.1); color: var(--cy); border: 1px solid var(--cy); border-radius: 12px; padding: 2px 8px; font-size: 9px; }

.bar-box { background: rgba(5,13,24,0.7); padding: 20px; }
.hbar-row { margin-bottom: 18px; }
.hbar-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--white); margin-bottom: 6px; }
.hbar-track { width: 100%; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.hbar-fill { height: 100%; transition: width 1s ease-out; }

.word-box { background: rgba(5,13,24,0.7); padding: 20px; display: flex; flex-direction: column; }
.cloud-area { position: relative; flex: 1; min-height: 150px; background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGNpcmNsZSBjeD0iMSIgY3k9IjEiIHI9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiLz48L3N2Zz4='); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 15px; }
.cword { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-weight: bold; cursor: default; transition: text-shadow 0.2s, transform 0.2s; animation: floatWord 3s ease-in-out infinite alternate; }
.cword:hover { text-shadow: 0 0 10px currentColor; z-index: 10; animation-play-state: paused; transform: translate(-50%, -50%) scale(1.1) !important; }

@keyframes floatWord {
  0% { transform: translate(-50%, -50%); }
  100% { transform: translate(-50%, calc(-50% - 15px)); }
}
.cloud-leg { display: flex; gap: 15px; font-size: 10px; color: var(--dim); }
.cloud-leg span { display: flex; align-items: center; gap: 4px; }
.push-r { margin-left: auto; }

.eq-box { background: rgba(5,13,24,0.7); padding: 20px; text-align: center; border: 1px solid var(--border); }
.eq-inner { padding: 30px 10px; }
.eq-formula { font-family: 'JetBrains Mono', monospace; font-size: 24px; color: var(--white); letter-spacing: 2px; margin-bottom: 15px; }
.eq-desc { color: var(--mut); font-size: 13px; margin-bottom: 10px; }
.eq-result { font-weight: bold; font-size: 16px; letter-spacing: 1px; }

/* ── DIAGNOSTICO IA ── */
.ia-diagnostic { margin-top: 15px; display: flex; flex-direction: column; font-family: 'Space Grotesk', sans-serif; }
.ia-tabs-wrapper { position: relative; margin-bottom: 15px; }
.ia-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; border-bottom: 1px solid rgba(0, 212, 255, 0.1); padding-right: 20px; }
.ia-tabs::-webkit-scrollbar { display: none; }
.ia-tabs-wrapper::after { content: '❯'; position: absolute; right: 0; top: 0; bottom: 5px; width: 30px; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; color: var(--cy); font-size: 14px; font-weight: bold; pointer-events: none; background: linear-gradient(90deg, transparent, var(--bg) 60%); animation: pulseX 1.5s infinite; opacity: 0.8; border-bottom: 1px solid rgba(0, 212, 255, 0.1); }
@keyframes pulseX { 0% { transform: translateX(0); } 50% { transform: translateX(3px); } 100% { transform: translateX(0); } }
.ia-tab-btn { background: rgba(0,0,0,0.3); border: 1px solid rgba(0, 212, 255, 0.2); color: var(--mut); padding: 6px 12px; border-radius: 4px; font-size: 11px; font-weight: bold; cursor: pointer; white-space: nowrap; transition: all 0.2s; text-transform: uppercase; letter-spacing: 1px; }
.ia-tab-btn:hover { background: rgba(0, 212, 255, 0.1); color: var(--white); }
.ia-tab-btn.active { background: rgba(0, 212, 255, 0.2); border-color: var(--cy); color: var(--cy); box-shadow: 0 0 10px rgba(0, 212, 255, 0.2); }
.ia-content { position: relative; }
.ia-panel { display: none; flex-direction: column; gap: 10px; animation: slideIn 0.3s ease-out; }
.ia-panel.active { display: flex; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

.ia-header { font-size: 13px; color: var(--cy); letter-spacing: 1px; font-weight: bold; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.ia-header .dot { display: inline-block; width: 6px; height: 6px; background: var(--cy); border-radius: 50%; box-shadow: 0 0 5px var(--cy); }

.ia-bullet { background: rgba(5,13,24,0.6); padding: 12px 15px; border-left: 2px solid var(--dim); border-radius: 0 4px 4px 0; font-size: 13px; color: var(--white); line-height: 1.5; transition: border-color 0.2s, background 0.2s; }
.ia-bullet:hover { background: rgba(5,13,24,0.9); }

/* NIVELES DE AMENAZA */
.ia-level-critical { border-left-color: var(--red); }
.ia-level-critical:hover { background: rgba(220, 53, 69, 0.15); border-left-color: #ff4757; box-shadow: inset 0 0 20px rgba(220, 53, 69, 0.05); }
.ia-level-warning { border-left-color: var(--orange); }
.ia-level-warning:hover { background: rgba(253, 126, 20, 0.15); border-left-color: #ffa502; box-shadow: inset 0 0 20px rgba(253, 126, 20, 0.05); }
.ia-level-stable { border-left-color: var(--green); }
.ia-level-stable:hover { background: rgba(46, 204, 113, 0.15); border-left-color: #2ed573; box-shadow: inset 0 0 20px rgba(46, 204, 113, 0.05); }
.ia-level-info { border-left-color: var(--cy); }
.ia-level-info:hover { background: rgba(0, 212, 255, 0.15); border-left-color: #70a1ff; box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.05); }
.ia-level-purple { border-left-color: var(--purple); }
.ia-level-purple:hover { background: rgba(167, 139, 250, 0.15); border-left-color: #a78bfa; box-shadow: inset 0 0 20px rgba(167, 139, 250, 0.05); }

.ia-time { color: var(--white); font-family: 'JetBrains Mono', monospace; font-size: 11px; margin-right: 8px; font-weight: bold; background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 4px; }
.ia-text { color: var(--mut); }
.ia-bullet:hover .ia-text { color: var(--white); }
.ia-paragraph { font-size: 13px; color: var(--mut); line-height: 1.5; padding: 5px 0; }

/* ── GUATEMOOD MODAL ── */
.mood-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); z-index: 9999; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(10px); opacity: 1; transition: opacity 0.3s; }
/* visibility:hidden saca el modal del orden de tabulación y del árbol de
   accesibilidad (pointer-events:none NO bloquea teclado: sin esto, un usuario
   con Tab podía votar sin ver el modal). */
.mood-overlay.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
/* Máquina de estados form/chart: sin esta regla, class="hidden" en las vistas
   internas no ocultaba nada (la única regla .hidden era la del overlay). */
#mood-form-view.hidden, #mood-chart-view.hidden { display: none; }
.chart-note { font-size: 10px; color: var(--mut); margin: -4px 0 14px; line-height: 1.4; }
.mood-modal { background: #0b1120; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 30px; width: 90%; max-width: 450px; font-family: 'Space Grotesk', sans-serif; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.mood-title { font-size: 22px; color: var(--green); letter-spacing: 1px; font-weight: bold; margin-bottom: 5px; text-transform: uppercase; text-shadow: 0 0 10px rgba(46,204,113,0.3); }
.mood-sub { font-size: 12px; color: var(--mut); margin-bottom: 25px; line-height: 1.4; }
.mood-group { margin-bottom: 20px; }
.mood-group label { display: block; font-size: 11px; color: var(--white); font-weight: bold; letter-spacing: 1px; margin-bottom: 10px; }
#mood-dept { width: 100%; padding: 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: var(--white); border-radius: 6px; font-size: 14px; cursor: pointer; outline: none; }
#mood-dept:focus { border-color: var(--teal); }
.mood-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mood-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 15px 10px; color: var(--mut); font-size: 11px; font-weight: bold; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: all 0.2s; }
.mood-btn .emoji { font-size: 24px; filter: grayscale(1); transition: all 0.2s; }
.mood-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); border-color: rgba(255,255,255,0.2); }
.mood-btn:hover .emoji { filter: grayscale(0); transform: scale(1.1); }
.mood-btn.selected { background: rgba(46,204,113,0.1); border-color: var(--green); color: var(--white); box-shadow: 0 0 15px rgba(46,204,113,0.2); }
.mood-btn.selected .emoji { filter: grayscale(0); transform: scale(1.15); }
.mood-action-btn { width: 100%; padding: 14px; background: var(--green); color: #000; border: none; border-radius: 6px; font-size: 13px; font-weight: bold; letter-spacing: 1px; cursor: pointer; margin-top: 10px; transition: all 0.2s; }
.mood-action-btn:hover:not(:disabled) { background: #34e07e; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(46,204,113,0.3); }
.mood-action-btn:disabled { background: rgba(255,255,255,0.1); color: var(--dim); cursor: not-allowed; }
.mood-link-btn { width: 100%; background: none; border: none; color: var(--teal); font-size: 12px; margin-top: 15px; cursor: pointer; text-decoration: underline; }
.mood-link-btn:hover { color: var(--cy); }
.mood-white-btn { width: 100%; padding: 14px; background: #fff; color: #000; border: none; border-radius: 4px; font-size: 12px; font-weight: bold; margin-top: 15px; cursor: pointer; transition: background 0.2s; }
.mood-white-btn:hover { background: #eee; }

/* CHart View */
.chart-title { font-size: 14px; color: var(--cy); text-align: center; margin-bottom: 20px; letter-spacing: 1px; }
.chart-container { display: flex; flex-direction: column; gap: 12px; margin-bottom: 25px; }
.chart-row { display: flex; align-items: center; gap: 10px; }
.chart-lbl { width: 40%; font-size: 11px; color: var(--mut); text-align: right; }
.chart-bar-bg { flex: 1; height: 16px; background: rgba(255,255,255,0.05); border-radius: 8px; overflow: hidden; }
.chart-bar-fill { height: 100%; background: var(--teal); width: 0%; transition: width 1s ease-out; }
.chart-val { width: 15%; font-size: 12px; font-weight: bold; color: var(--white); font-family: 'JetBrains Mono', monospace;}

/* ── RESPONSIVE PARA MÓVILES ── */
@media (max-width: 600px) {
  .topbar { position: static; flex-direction: column; align-items: flex-start; padding: 15px; gap: 10px; }
  .topbar .meta { margin-left: 0; flex-wrap: wrap; gap: 10px; font-size: 10px; }
  .topbar .sub { font-size: 9px; }
  .tabs { top: 0; padding: 10px 15px; gap: 6px; }
  .tabs button { padding: 8px 12px; font-size: 10px; }
  main { padding: 15px; }
  .ia-tab-btn { flex-shrink: 0; padding: 6px 10px; font-size: 10px; }
  .cards { grid-template-columns: 1fr; }
  .ia-bullet { padding: 10px; font-size: 12px; }
  .top-kpis { flex-direction: column; gap: 10px; }
  .box-lbl { font-size: 10px; margin-bottom: 10px; }
  .kpi-box { padding: 10px; }
}
