/* ===========================================================
   SAMARITANUS · HUD PRO — Look "Medical Holographic Cockpit"
   Panouri hexagonale cu margini neon tip tub de lumină,
   anatomie wireframe lateral, hartă mondială, creier.
   Layer peste hub.css + hud.css.
   =========================================================== */

/* Stratul de bază — DEZACTIVAT, lăsăm fundalul din hub.css */
/* .hub-body override eliminat */

/* ---------- ANATOMY WIREFRAME LATERAL ---------- */
.hud-anatomy {
  position: fixed;
  top: 80px;
  bottom: 70px;
  width: 180px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
}
.hud-anatomy.left  { left: 290px; }
.hud-anatomy.right { right: 10px; }
.hud-anatomy svg { width: 100%; height: 100%; }
.hud-anatomy .body-stroke { stroke: #5ce8ff; fill: none; stroke-width: 0.8; filter: drop-shadow(0 0 2px rgba(92, 232, 255,0.6)); }
.hud-anatomy .body-fill   { fill: rgba(92, 232, 255, 0.03); stroke: #5ce8ff; stroke-width: 0.6; }
.hud-anatomy .organ       { fill: rgba(255, 77, 87, 0.08); stroke: #ff4d57; stroke-width: 0.6; }
.hud-anatomy .lung        { fill: rgba(92, 232, 255, 0.04); stroke: #8af0ff; stroke-width: 0.6; }
.hud-anatomy .scan-line {
  stroke: #2cf3a0;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  filter: drop-shadow(0 0 5px #2cf3a0);
  animation: scanSweep 4s linear infinite;
}
@keyframes organPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; transform: scale(1.05); transform-origin: center; } }
@keyframes scanSweep {
  0%   { transform: translateY(-300px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(300px); opacity: 0; }
}

/* ---------- COCKPIT WRAP NEON TUBES ---------- */
.hub-main {
  padding-left: 200px;
  padding-right: 200px;
  position: relative;
}
@media (max-width: 1500px) {
  .hub-main { padding-left: 26px; padding-right: 26px; }
  .hud-anatomy { display: none; }
}

/* Light-strip frame pe interior cockpit — DEZACTIVAT (chenar disproporționat) */
.hub-main::before { content: none !important; }
.hub-main::after { content: none !important; }

/* ============================================================
   COCKPIT PANELS — Octagon profesional (colțuri tăiate)
   Stil curat: border solid neon, interior opac, conținut lizibil.
   ============================================================ */

/* ===== KPI: 4 coloane, 2 rânduri ===== */
.hub-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin: 24px 0 28px;
  padding: 0;
}

.hub-kpi {
  position: relative;
  isolation: isolate;
  /* Octagon cu colțuri tăiate de 14px */
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px), 0 14px
  );
  aspect-ratio: auto;
  min-height: 168px;
  padding: 14px 14px 12px;
  background:
    linear-gradient(135deg, rgba(8, 26, 44, 0.96), rgba(12, 36, 60, 0.94));
  color: #5ce8ff;
  outline: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  filter: none;
  transform: none !important;
}

/* Border-ul prin SVG octagon (stroke 1.5px crisp pe orice dimensiune) */
.hub-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 168' preserveAspectRatio='none'><polygon points='14,0 186,0 200,14 200,154 186,168 14,168 0,154 0,14' fill='none' stroke='%235ce8ff' stroke-width='1.4' stroke-opacity='0.7' vector-effect='non-scaling-stroke'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 2;
  filter: none;
}

.hub-kpi.alert {
  color: #ff4d57;
}
.hub-kpi.alert::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 168' preserveAspectRatio='none'><polygon points='14,0 186,0 200,14 200,154 186,168 14,168 0,154 0,14' fill='none' stroke='%23ff4d57' stroke-width='1.4' stroke-opacity='0.8' vector-effect='non-scaling-stroke'/></svg>");
  filter: none;
}
.hub-kpi.warn {
  color: #8af0ff;
}
.hub-kpi.warn::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 168' preserveAspectRatio='none'><polygon points='14,0 186,0 200,14 200,154 186,168 14,168 0,154 0,14' fill='none' stroke='%238af0ff' stroke-width='1.4' stroke-opacity='0.75' vector-effect='non-scaling-stroke'/></svg>");
  filter: none;
}

.hub-kpi::after { content: none !important; }
.hub-kpi > * { position: relative; z-index: 1; }
.hub-kpi > .kpi-grid-bg { display: none; }
.hub-kpi .kpi-corner { display: none !important; }

/* Layout interior — clar și ierarhic */
.hub-kpi .kpi-idx {
  position: absolute;
  top: 8px;
  right: 14px;
  left: auto;
  transform: none;
  font-family: var(--hub-mono, Consolas, monospace);
  font-size: 9px;
  letter-spacing: 1.8px;
  opacity: 0.55;
  color: currentColor;
}

.hub-kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.85;
  margin: 2px 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-row {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  flex: 1;
}

.hub-kpi-value {
  font-family: var(--hub-mono, Consolas, monospace);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: currentColor;
  text-shadow: none;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.hub-kpi-value .unit {
  font-size: 14px;
  opacity: 0.65;
  margin-left: 3px;
  font-weight: 600;
}

.kpi-art {
  width: 56px;
  height: 50px;
  margin: 0;
  opacity: 0.55;
  color: currentColor;
  filter: none;
}
.kpi-art::before { display: none; }

.hub-kpi-delta {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 8px;
  color: currentColor;
  opacity: 0.7;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  .hub-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== Monitor cards: 3 octagoane mari ===== */
.hub-monitors { gap: 18px; padding: 0; }

.hub-monitor-card {
  position: relative;
  isolation: isolate;
  clip-path: polygon(
    18px 0, calc(100% - 18px) 0, 100% 18px,
    100% calc(100% - 18px), calc(100% - 18px) 100%,
    18px 100%, 0 calc(100% - 18px), 0 18px
  );
  aspect-ratio: auto;
  min-height: 220px;
  padding: 24px 24px 20px !important;
  background: linear-gradient(135deg, rgba(8, 26, 44, 0.96), rgba(12, 38, 64, 0.94));
  color: #5ce8ff;
  outline: none;
  border: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  filter: none;
  box-shadow: none;
  transform: none !important;
}
.hub-monitor-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 220' preserveAspectRatio='none'><polygon points='18,0 282,0 300,18 300,202 282,220 18,220 0,202 0,18' fill='none' stroke='%235ce8ff' stroke-width='1.4' stroke-opacity='0.7' vector-effect='non-scaling-stroke'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 2;
  filter: none;
}
.hub-monitor-card.m1 { color: #ff4d57; }
.hub-monitor-card.m1::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 220' preserveAspectRatio='none'><polygon points='18,0 282,0 300,18 300,202 282,220 18,220 0,202 0,18' fill='none' stroke='%23ff4d57' stroke-width='1.4' stroke-opacity='0.8' vector-effect='non-scaling-stroke'/></svg>");
  filter: none;
}
.hub-monitor-card.m2 { color: #8af0ff; }
.hub-monitor-card.m2::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 220' preserveAspectRatio='none'><polygon points='18,0 282,0 300,18 300,202 282,220 18,220 0,202 0,18' fill='none' stroke='%238af0ff' stroke-width='1.4' stroke-opacity='0.75' vector-effect='non-scaling-stroke'/></svg>");
  filter: none;
}
.hub-monitor-card::after { content: none !important; }
.hub-monitor-card > * { position: relative; z-index: 1; }

.hub-monitors { gap: 28px; padding: 16px 40px; }

/* Vitals strip — hex tubes */
.hud-vital {
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  outline: 1.5px solid #5ce8ff;
  outline-offset: -1.5px;
  border: none;
  filter: drop-shadow(0 0 3px rgba(92, 232, 255, 0.4));
}
.hud-vital.red    { outline-color: #ff4d57; filter: drop-shadow(0 0 3px rgba(255, 77, 87, 0.55)); }
.hud-vital.green  { outline-color: #2cf3a0; filter: drop-shadow(0 0 3px rgba(44, 243, 160, 0.55)); }
.hud-vital.amber  { outline-color: #8af0ff; filter: drop-shadow(0 0 3px rgba(138, 240, 255, 0.55)); }

/* Modal — hex clip mare */
.hub-modal {
  clip-path: polygon(28px 0, calc(100% - 28px) 0, 100% 28px, 100% calc(100% - 28px), calc(100% - 28px) 100%, 28px 100%, 0 calc(100% - 28px), 0 28px);
  outline: 2px solid #5ce8ff;
  outline-offset: -2px;
  border: none;
  filter: drop-shadow(0 0 8px rgba(92, 232, 255, 0.5)) drop-shadow(0 0 24px rgba(92, 232, 255, 0.3));
}

/* ---------- SIDEBAR upgrade ---------- */
.hub-sidebar {
  background: linear-gradient(180deg, rgba(0, 8, 20, 0.92), rgba(0, 16, 36, 0.75));
  border-right: 2px solid #5ce8ff;
  box-shadow: 2px 0 18px rgba(92, 232, 255, 0.2);
}
.hub-nav-item {
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.hub-nav-item.active {
  outline: 1px solid #5ce8ff;
  outline-offset: -1px;
  filter: drop-shadow(0 0 4px rgba(92, 232, 255, 0.5));
  background: linear-gradient(90deg, rgba(92, 232, 255, 0.2), rgba(92, 232, 255, 0.05));
}

/* ---------- TOPBAR upgrade ---------- */
.hub-topbar {
  border-bottom: 2px solid #5ce8ff;
  box-shadow: 0 2px 18px rgba(92, 232, 255, 0.25);
}

/* ---------- HARTĂ MUREȘ + CREIER FUNCȚIONAL ---------- */
.hud-world-panel {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}
@media (max-width: 1100px) { .hud-world-panel { grid-template-columns: 1fr; } }

.hud-world {
  position: relative;
  clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  background: linear-gradient(135deg, rgba(2, 20, 40, 0.95), rgba(8, 24, 48, 0.85));
  outline: 1.5px solid rgba(92, 232, 255, 0.55);
  outline-offset: -1.5px;
  padding: 16px 18px 14px;
  min-height: 320px;
}
.hud-world-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font-size: 10px; letter-spacing: 2.5px; color: #8af0ff; text-transform: uppercase;
  flex-wrap: wrap;
}
.hud-world-coord {
  margin-left: auto;
  font-family: var(--hub-mono);
  font-size: 9px;
  color: rgba(140, 200, 240, 0.6);
  letter-spacing: 1.4px;
  text-transform: none;
}
.hud-world-head .led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2cf3a0; box-shadow: 0 0 6px #2cf3a0;
  animation: hubPulse 1.6s ease-in-out infinite;
}
.hud-world-svg {
  position: relative;
  width: 100%; height: 280px;
}
.hud-world-svg svg { width: 100%; height: 100%; display: block; }

.hud-world-dot {
  position: absolute;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  background: #5ce8ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #5ce8ff, 0 0 16px rgba(92, 232, 255, 0.5);
  animation: nodeBlink 2s ease-in-out infinite;
  cursor: help;
}
.hud-world-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid #5ce8ff;
  border-radius: 50%;
  opacity: 0.35;
  animation: nodeRing 2.2s ease-out infinite;
}
.hud-world-dot.hq {
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  background: #ffd23f;
  box-shadow: 0 0 12px #ffd23f, 0 0 24px rgba(255, 210, 63, 0.7);
}
.hud-world-dot.hq::before { border-color: #ffd23f; opacity: 0.5; }
.hud-world-dot.red   { background: #ff4d57; box-shadow: 0 0 10px #ff4d57, 0 0 20px rgba(255, 77, 87, 0.6); }
.hud-world-dot.red::before  { border-color: #ff4d57; }
.hud-world-dot.amber { background: #ffa726; box-shadow: 0 0 10px #ffa726; }
.hud-world-dot.amber::before { border-color: #ffa726; }
.hud-world-dot.green { background: #2cf3a0; box-shadow: 0 0 10px #2cf3a0; }
.hud-world-dot.green::before { border-color: #2cf3a0; }
@keyframes nodeBlink { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.75); } }
@keyframes nodeRing  { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(2.8); opacity: 0; } }

/* ════ BRAIN — funcțional ════ */
.hud-brain {
  position: relative;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  background: linear-gradient(135deg, rgba(2, 20, 40, 0.95), rgba(8, 24, 48, 0.85));
  outline: 1.5px solid rgba(138, 123, 255, 0.55);
  outline-offset: -1.5px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
}
.hud-brain-head {
  font-size: 10px; letter-spacing: 2.5px; color: #b8a8ff;
  margin-bottom: 6px; text-transform: uppercase;
}
.hud-brain-svg-wrap { flex: 1; min-height: 180px; position: relative; }
.hud-brain svg { width: 100%; height: 100%; display: block; }

/* Neuroni — corp celular */
.neuron {
  fill: rgba(140, 200, 240, 0.55);
  transition: fill 0.2s, filter 0.2s;
}
.neuron.firing {
  fill: var(--fire-color, #5ce8ff);
  filter: drop-shadow(0 0 5px var(--fire-color, #5ce8ff)) drop-shadow(0 0 10px var(--fire-color, #5ce8ff));
  animation: neuronFlash 0.6s ease-out;
}
@keyframes neuronFlash {
  0%   { r: 1.6; }
  40%  { r: 3.2; }
  100% { r: 1.6; }
}

/* Sinapse — în repaus subtile */
.synapse {
  stroke: rgba(140, 200, 240, 0.12);
  stroke-width: 0.5;
  fill: none;
  pointer-events: none;
}
.synapse.firing {
  stroke: var(--fire-color, #5ce8ff);
  stroke-width: 1.2;
  stroke-opacity: 1;
  stroke-dasharray: 10 80;
  stroke-dashoffset: 80;
  filter: drop-shadow(0 0 3px var(--fire-color, #5ce8ff));
  animation: synapseFire 0.7s linear forwards;
}
@keyframes synapseFire {
  0%   { stroke-dashoffset: 80; stroke-opacity: 1; }
  80%  { stroke-dashoffset: -10; stroke-opacity: 0.9; }
  100% { stroke-dashoffset: -20; stroke-opacity: 0; }
}

/* Legendă tipuri eveniment */
.hud-brain-legend {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 8px 0;
  padding: 6px 4px;
  border-top: 1px solid rgba(140, 200, 240, 0.12);
  border-bottom: 1px solid rgba(140, 200, 240, 0.12);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: rgba(184, 205, 236, 0.7);
}
.hud-brain-legend span { display: flex; align-items: center; gap: 4px; }
.hud-brain-legend i {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block;
}
.hud-brain-legend .dot-call    { background: #5ce8ff; box-shadow: 0 0 4px #5ce8ff; }
.hud-brain-legend .dot-alert   { background: #ff4d57; box-shadow: 0 0 4px #ff4d57; }
.hud-brain-legend .dot-case    { background: #ffa726; box-shadow: 0 0 4px #ffa726; }
.hud-brain-legend .dot-consult { background: #2cf3a0; box-shadow: 0 0 4px #2cf3a0; }

.hud-brain-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hud-brain-stat {
  text-align: center;
  padding: 6px 4px;
  background: rgba(138, 123, 255, 0.06);
  border: 1px solid rgba(138, 123, 255, 0.22);
}
.hud-brain-stat b {
  display: block; font-family: var(--hub-mono); font-size: 14px;
  color: #b8a8ff;
  font-weight: 700;
}
.hud-brain-stat span { font-size: 8px; letter-spacing: 1.5px; color: #7d97c4; }

/* Stronger neon text */
.hub-section-title h1,
.hub-brand-name,
.hub-kpi-value {
  text-shadow:
    0 0 8px #5ce8ff,
    0 0 18px rgba(92, 232, 255, 0.55),
    0 0 32px rgba(92, 232, 255, 0.3);
}

/* Subtle parallax glow under main */
.hub-main {
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(92, 232, 255, 0.04), transparent 70%);
}

/* Override hud-ecg to use brighter cyan/green and align with neon frame */
.hud-ecg {
  border-top: 2px solid #5ce8ff;
  box-shadow: 0 -2px 18px rgba(92, 232, 255, 0.3);
  background: linear-gradient(180deg, transparent, rgba(0, 8, 20, 0.85));
}
.hud-ecg .ecg-line { stroke: #2cf3a0; filter: drop-shadow(0 0 10px #2cf3a0); }

/* (Vechiul bloc "KPI INTERIORS" a fost eliminat — totul e definit curat mai sus) */

/* placeholder marker */

/* =========================================================
   STATIC HUD — toate animațiile pe panouri OPRITE

/* =========================================================
   STATIC HUD — toate animațiile pe panouri OPRITE
   (rămân doar inele de fundal lent rotative + ECG strip)
   ========================================================= */

/* KPI value: fără scan-line sweep (din hud.css) */
.hub-kpi-value::after { content: none !important; animation: none !important; }

/* Title LED bar: fără blink */
.hub-section-title h1::before { animation: none !important; opacity: 1 !important; }

/* Status pill / brand orbital ring: fără rotație */
.hub-brand::after,
.hub-monitor-icon::before { animation: none !important; }

/* World map nodes: static, fără blink, fără inel de propagare */
.hud-world-dot {
  animation: none !important;
}
.hud-world-dot::before {
  animation: none !important;
  opacity: 0.5;
  transform: scale(1.6);
}

/* World head LED: static */
.hud-world-head .led { animation: none !important; }

/* Anatomy: inima fără puls, scan-line eliminat */
.hud-anatomy .organ { animation: none !important; opacity: 0.85 !important; transform: none !important; }
.hud-anatomy .scan-line { display: none !important; }

/* Vitals strip sparklines: fără mișcare (dacă există) */
.hud-vital svg polyline,
.hud-vital svg path { animation: none !important; }

/* Topbar status pulse: static */
.hub-topbar-pulse,
.hub-status-pill .dot { animation: none !important; }
