/* =========================================================
   events1.css — Сеизмички мониторинг SM1 Штип
   Refакторирана тема (geotehnologija.mk палета + top-nav)
   ========================================================= */

:root {
  --bg0: #04090f;
  --bg1: #071322;
  --bg2: #0c2034;

  --panel: rgba(8, 21, 36, 0.56);
  --panel-strong: rgba(5, 15, 28, 0.88);

  --border: rgba(125, 180, 255, 0.14);
  --border-strong: rgba(125, 180, 255, 0.32);

  --text: #eef5ff;
  --text-soft: #a9c3dc;
  --text-dim: #7996b4;

  --accent: #22d3ee;
  --accent-2: #2dd4bf;
  --violet: #a78bfa;
  --green: #34d399;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --red: #fb7185;
  --gold: #d4af37;
  --gold-2: #f0d36d;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.35);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
  --maxw: 1380px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg0);
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(900px 600px at 88% -4%, rgba(45, 212, 191, 0.10), transparent 50%),
    radial-gradient(1000px 700px at 50% 110%, rgba(167, 139, 250, 0.10), transparent 55%),
    linear-gradient(150deg, var(--bg0), var(--bg1) 55%, var(--bg2));
  background-attachment: fixed;
}

.app-shell { position: relative; min-height: 100vh; }

/* =========================================================
   ГЛОБАЛНО НАМАЛУВАЊЕ НА ИНТЕРФЕЈСОТ (без browser zoom)
   Целокупниот UI се прикажува на 80 % → картата и KPI-ата се
   гледаат веднаш при отворање, без скролување (поука од студентите 😉).
   `zoom` (за разлика од `transform: scale`) ПРЕПОЛНУВА (reflow), па нема
   празен простор; работи во Chrome/Edge/Safari и Firefox (2024+).
   Оверлеите на `document.body` (интро, banner, toast, radar, flash) НЕ се
   внатре во .app-shell, па остануваат со полна големина.
   Промени ја вредноста на едно место: --app-zoom. */
:root { --app-zoom: 0.8; }
.app-shell {
  zoom: var(--app-zoom);
  /* vh-единиците не се „зумираат“ → по делиме со zoom за да покрие цел екран */
  min-height: calc(100vh / var(--app-zoom));
}
/* Firefox постари верзии без zoom → fallback преку ширина (поретко). */
@supports not (zoom: 1) {
  .app-shell {
    width: calc(100% / var(--app-zoom));
    min-height: 100vh;
    transform: scale(var(--app-zoom));
    transform-origin: top left;
  }
}

.bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.45), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.45), transparent 72%);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(8, 16, 30, 0.6); }
::-webkit-scrollbar-thumb {
  background: rgba(125, 180, 255, 0.25);
  border-radius: 6px;
  border: 2px solid rgba(8, 16, 30, 0.6);
}
::-webkit-scrollbar-thumb:hover { background: rgba(125, 180, 255, 0.45); }

/* =========================================================
   HEADER / TOP NAV (по аналогија на geotehnologija.mk)
   ========================================================= */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(6, 15, 27, 0.86);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.top-nav-inner {
  width: min(100% - 24px, var(--maxw));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
}

.brand-badge-img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 44px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 10px 22px rgba(212, 175, 55, 0.30);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  line-height: 1.05;
  color: var(--text);
  white-space: nowrap;
}

.brand-title .gold { color: var(--gold-2); }

.brand-tag {
  margin-top: 3px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 7px; }

.site-nav .nav-link {
  padding: 8px 13px;
  border-radius: 12px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1;
  color: #eef5ff;
  text-decoration: none;
  transition: 0.18s ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  background: #ffffff;
  color: #123a7a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20);
}

.site-nav .nav-link.prof {
  background: rgba(47, 128, 237, 0.16);
  border-color: rgba(77, 168, 255, 0.45);
  color: #9ed4ff;
}

.site-nav .nav-link.prof:hover,
.site-nav .nav-link.prof.active {
  background: #ffffff;
  color: #123a7a;
  border-color: transparent;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* --- статусни пилули --- */

.soft-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.soft-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 1.8s ease-in-out infinite;
}

.soft-dot.off { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.sync-status { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; }

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-variant-numeric: tabular-nums;
}

.sync-pill.ok { background: rgba(52, 211, 153, 0.08); }
.sync-pill.working { background: rgba(251, 191, 36, 0.08); }
.sync-pill.offline { background: rgba(251, 113, 133, 0.08); }

.sync-sub {
  font-size: 9.5px;
  color: var(--text-dim);
  padding-left: 13px;
  font-variant-numeric: tabular-nums;
}

/* --- прегледувач (2D/3D) --- */

.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.vt-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  transition: 0.16s ease;
}

.vt-btn:hover { color: #fff; }

.vt-btn.active {
  color: #041018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.30);
}

/* --- јазик --- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.ls-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  transition: 0.16s ease;
}

.ls-btn:hover { color: #fff; }

.ls-btn.active {
  color: #241c03;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.32);
}

.ls-sep { color: var(--text-dim); font-size: 10px; }

/* =========================================================
   MAIN WRAP
   ========================================================= */

.main-wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, var(--maxw));
  margin: 14px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* =========================================================
   HERO STRIP (компактен)
   ========================================================= */

.hero-strip {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  padding: 24px 26px 20px;
  background:
    linear-gradient(135deg, rgba(24, 50, 92, 0.72), rgba(21, 45, 92, 0.30)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  overflow: hidden;
}

.hero-strip::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--accent), var(--accent-3, var(--violet)));
  opacity: 0.85;
}

.hero-strip::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-text { flex: 1; min-width: 260px; position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: 0.4px;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 20%, var(--gold-2) 55%, var(--accent-2) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 16px rgba(0, 0, 0, 0.35));
}

.hero-subtitle {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 2.2px;
  color: #dbe8fb;
  text-transform: uppercase;
}

.hero-meta {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}

.hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #5fe8b4;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseRing 2.2s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(57, 217, 138, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(57, 217, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(57, 217, 138, 0); }
}

.hero-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-level-label {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.last-update {
  color: var(--text-dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   ГОЛЕМ ПРИКАЗ НА ТЕКОВНИОТ ЗЕМЈОТРЕС
   ========================================================= */

.now-banner-wrap { position: relative; }

.now-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(135deg, rgba(15, 32, 60, 0.85), rgba(10, 22, 44, 0.60)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  flex-wrap: wrap;
}

.now-banner::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold));
  opacity: 0.9;
}

/* Голема магнитуда */
.now-mag {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 20px 6px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}

.now-mag-sign {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 800;
  color: var(--text-dim);
}

.now-mag-value {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -1px;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.45));
  font-variant-numeric: tabular-nums;
}

/* Среден дел — податоци */
.now-main { flex: 1; min-width: 240px; }

.now-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.now-place {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 10px;
}

.now-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.now-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.now-cell-k {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.now-cell-v {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Десно — ниво */
.now-side { flex-shrink: 0; }

.now-level {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.now-banner.empty .now-mag-value { color: var(--text-dim); }
.now-banner.empty .now-place { color: var(--text-dim); font-size: 1rem; font-weight: 600; }

@media (max-width: 720px) {
  .now-banner { gap: 14px; padding: 14px 16px; }
  .now-mag { border-right: none; padding: 0; }
  .now-side { width: 100%; }
}

/* =========================================================
   METRICS GRID
   ========================================================= */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 27, 48, 0.78), rgba(9, 17, 30, 0.92));
  border: 1px solid rgba(125, 180, 255, 0.16);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  min-width: 0;
}

.metric-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
}

.metric-body { min-width: 0; }

.metric-title {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-subtitle {
  font-size: 9.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   CONTENT GRID + PANELS
   ========================================================= */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 382px;
  gap: 14px;
  align-items: start;
}

.left-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.panel {
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  min-width: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.panel-title::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  flex: none;
}

.panel-note {
  margin-top: 9px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
}

/* --- мапа --- */

.map-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 2D/3D прекинувач внатре во главата на мапата */
.map-view-toggle {
  flex-shrink: 0;
  background: rgba(4, 10, 19, 0.55);
  border-color: rgba(125, 180, 255, 0.20);
}

.map-view-toggle .vt-btn {
  padding: 4px 12px;
  font-size: 10.5px;
}

.map-graph-prop {
  height: 520px;
  border-radius: 16px;
  border: 1px solid rgba(125, 180, 255, 0.14);
  background: linear-gradient(180deg, rgba(4, 10, 19, 0.7), rgba(8, 16, 30, 0.85));
  overflow: hidden;
}

.map3d {
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #06101d;
  border: 1px solid rgba(125, 180, 255, 0.14);
}

.map3d canvas { display: block; }

.map3d-status {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.map3d-status.paused {
  color: var(--gold-2);
  font-weight: 700;
}

.maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib {
  background: rgba(6, 16, 29, 0.7) !important;
  font-size: 9px;
  color: #7d93ab;
}
.maplibregl-ctrl-attrib a { color: #8ee0ff; }

/* --- селектор на настани (3D) --- */

.event-selector-panel {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(8, 21, 36, 0.6);
  border: 1px solid var(--border);
}

.event-selector-panel .panel-title { margin-bottom: 5px; }

.selector-hint {
  color: var(--text-soft);
  font-size: 11.5px;
  margin-bottom: 10px;
}

.event-selector { display: flex; flex-wrap: wrap; gap: 8px; }

.ev-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e6eefb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
  line-height: 1.2;
  text-align: left;
  font-family: var(--font);
}

.ev-btn:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.08);
}

.ev-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(45, 212, 191, 0.92));
  color: #041018;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.3);
}

.ev-btn .ev-mag { font-weight: 900; font-family: var(--font-display); }
.ev-btn .ev-mining { color: #ffb84d; }

.ev-btn .ev-loc {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- чипови --- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
}

.chip-label {
  color: var(--text-dim);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.chip-sep { color: var(--text-dim); opacity: 0.5; }

.chip-value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   ANALYTICS GRIDS
   ========================================================= */

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.analysis-box, .catalog-box { min-width: 0; }

/* Геотехнички редови */

.analysis-rows { display: flex; flex-direction: column; gap: 8px; }

.analysis-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(16, 27, 48, 0.7), rgba(9, 17, 30, 0.88));
  border: 1px solid rgba(125, 180, 255, 0.12);
}

.analysis-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
}

.analysis-mid { flex: 1; min-width: 0; }

.analysis-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-sub {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-valwrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.analysis-value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.analysis-unit { font-size: 10px; color: var(--text-dim); }

.analysis-class {
  flex: none;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Каталошки картички + хистограми */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stat-tile {
  padding: 10px 8px;
  border-radius: 13px;
  text-align: center;
  background: linear-gradient(180deg, rgba(16, 27, 48, 0.7), rgba(9, 17, 30, 0.88));
  border: 1px solid rgba(125, 180, 255, 0.12);
  min-width: 0;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-sub {
  font-size: 8.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-wrap {
  border-radius: 13px;
  border: 1px solid rgba(125, 180, 255, 0.12);
  background: linear-gradient(180deg, rgba(4, 10, 19, 0.7), rgba(8, 16, 30, 0.85));
  overflow: hidden;
  margin-bottom: 8px;
}

.hist-wrap:last-of-type { margin-bottom: 0; }

.catalog-hist { width: 100%; }

/* =========================================================
   VIZ GRID (временска серија, M–h пресек, каталошка мапа)
   ========================================================= */

.viz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.viz-box .dash-graph {
  border-radius: 13px;
  border: 1px solid rgba(125, 180, 255, 0.12);
  background: linear-gradient(180deg, rgba(4, 10, 19, 0.7), rgba(8, 16, 30, 0.85));
  overflow: hidden;
}

.viz-box.wide { grid-column: span 2; }

/* =========================================================
   РУДАРСКА БЛИЗИНА
   ========================================================= */

.mine-rows { display: flex; flex-direction: column; gap: 9px; }

.mine-row {
  padding: 11px 13px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(16, 27, 48, 0.7), rgba(9, 17, 30, 0.88));
  border: 1px solid rgba(125, 180, 255, 0.12);
}

.mine-head { display: flex; align-items: center; margin-bottom: 7px; }

.mine-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text);
}

.mine-mid { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }

.mine-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.mine-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 3px;
}

.mine-dist {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mine-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mine-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.mine-r { font-size: 10px; color: var(--text-dim); }

.mine-blast-tag {
  font-size: 10px;
  font-weight: 800;
  color: #ffb84d;
  background: rgba(255, 184, 77, 0.1);
  border: 1px solid rgba(255, 184, 77, 0.35);
  padding: 2px 9px;
  border-radius: 999px;
}

/* =========================================================
   ДЕСНА КОЛОНА (detail panel)
   ========================================================= */

.detail-panel {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Преглед на настан */

.event-summary {
  margin-bottom: 10px;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.82), rgba(10, 18, 32, 0.88));
  border: 1px solid rgba(125, 180, 255, 0.18);
}

.sum-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sum-place {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sum-mag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--accent-2);
  white-space: nowrap;
}

.sum-rows { display: flex; flex-direction: column; gap: 4px; }

.sum-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sum-k {
  flex: 0 0 118px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sum-v {
  font-size: 11px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.tsunami-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #5fe8b4;
}

.tsunami-badge.on {
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.5);
  color: #fb8a9a;
}

/* Табела */

.table-wrap { min-width: 0; }

.tbl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tbl-hint {
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}

.live-btn {
  flex: none;
  border: 1px solid rgba(125, 180, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.2px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.18s ease;
}

.live-btn:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
}

.live-btn.active {
  color: #041018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.3);
}

.events-table {
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(125, 180, 255, 0.14);
}

.dash-table-container {
  border-radius: 13px;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
  border-collapse: separate !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
  font-family: var(--font) !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
  filter: brightness(1.15);
}

/* Лајн боксови */

.usgs-link-box,
.ai-comment-box,
.disclaimer-box {
  border-radius: 14px;
  padding: 11px 14px;
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.82), rgba(10, 18, 32, 0.88));
  border: 1px solid rgba(125, 180, 255, 0.18);
}

.usgs-title,
.ai-comment-title,
.disclaimer-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 6px;
}

.usgs-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.usgs-link:hover { text-decoration: underline; color: var(--accent-2); }

.usgs-note { font-size: 12px; color: var(--text-dim); }

.ai-comment-inner,
.disclaimer-inner {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-soft);
}

.disclaimer-inner {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer-card {
  margin-top: 2px;
  border-radius: var(--radius);
  padding: 16px 20px;
  background: rgba(8, 20, 45, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  color: #aebfd0;
  font-size: 12px;
  line-height: 1.75;
  position: relative;
  overflow: hidden;
}

.footer-card::before {
  content: "";
  display: block;
  position: absolute;
  left: 0; top: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--accent), var(--violet));
  opacity: 0.8;
}

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

@media (max-width: 1500px) {
  .metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .content-grid { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analysis-grid, .viz-grid { grid-template-columns: 1fr; }
  .viz-box.wide { grid-column: span 1; }
  .top-nav-inner { justify-content: center; }
  .top-nav-right { justify-content: center; }
}

@media (max-width: 700px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-graph-prop, .map3d { height: 360px; }
  .hero-strip { padding: 18px 16px; }
  .hero-side { align-items: flex-start; }
  .brand-tag { display: none; }
}

@media (max-width: 520px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .sum-k { flex-basis: 92px; }
}

@media (max-width: 520px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .sum-k { flex-basis: 92px; }
  .gl3d-legend { display: none; }
}

/* =========================================================
   ПРОПАГАЦИСКИ БРАНОВИ · 3D ЛЕГЕНДА (лево од глобусот, 2026-10-22)
   ========================================================= */

.gl3d-legend {
  flex: none;
  width: 180px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(6, 16, 29, 0.82);
  border: 1px solid rgba(125, 180, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font);
  pointer-events: none;
}

.gl3d-legend .lt-title {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gold-2);
  margin-bottom: 6px;
}

.gl3d-legend .lt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}

.gl3d-legend .lt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.gl3d-legend .lt-dot.pulse { border-radius: 3px; }

.gl3d-legend .lt-km {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.gl3d-legend .lt-sep {
  height: 1px;
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.12);
}

.gl3d-legend .lt-note {
  margin-top: 6px;
  font-size: 9px;
  color: var(--text-dim);
  line-height: 1.45;
  max-width: 156px;
}

/* потсетник за ротација на глобусот */
.gl3d-legend .lt-rotate {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--accent);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== AI анализа (Ollama) ===== */
.ai-ollama-box {
  margin-top: 10px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.07), rgba(9, 15, 28, 0.92));
}
.ai-ollama-box .ai-comment-title { font-size: 15.5px; font-weight: 700; letter-spacing: 0.3px; }
.ai-model-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.ai-model-label { font-size: 11px; color: #8aa0bf; letter-spacing: 0.4px; white-space: nowrap; }
.ai-model-sel {
  flex: 1;
  font-size: 12.5px;
  /* Dash 4 radix-токени — контраст на темна позадина */
  --Dash-Text-Strong: #eef5ff;
  --Dash-Text-Weak: #a9c3dc;
  --Dash-Text-Disabled: #7996b4;
  --Dash-Fill-Inverse-Strong: #0b1a2b;
  --Dash-Fill-Interactive-Strong: #22d3ee;
  --Dash-Fill-Interactive-Weak: rgba(34, 211, 238, 0.14);
  --Dash-Fill-Primary-Hover: rgba(34, 211, 238, 0.10);
  --Dash-Fill-Primary-Active: rgba(34, 211, 238, 0.18);
  --Dash-Fill-Disabled: rgba(255, 255, 255, 0.14);
  --Dash-Stroke-Strong: rgba(34, 211, 238, 0.5);
  --Dash-Stroke-Weak: rgba(34, 211, 238, 0.25);
  background: rgba(4, 9, 15, 0.75);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 8px;
}
.ai-model-sel .dash-dropdown-trigger { color: #eef5ff !important; background: transparent; }
.ai-model-sel .dash-dropdown-value,
.ai-model-sel .dash-dropdown-value-item { color: #eef5ff !important; }
.ai-model-sel .dash-dropdown-placeholder { color: #7996b4 !important; }
.ai-model-sel .dash-dropdown-trigger-icon { color: #22d3ee !important; fill: #22d3ee !important; }
/* менито — и ако е портилирано надвор од .ai-model-sel */
.dash-dropdown-content {
  background: #0b1a2b !important;
  color: #eef5ff !important;
  --Dash-Fill-Inverse-Strong: #0b1a2b;
  --Dash-Text-Strong: #eef5ff;
}
.dash-dropdown-option { background: #0b1a2b; color: #eef5ff; }
.dash-dropdown-option:hover,
.dash-dropdown-option[data-highlighted] { background: rgba(34, 211, 238, 0.16); color: #ffffff; }
.dash-dropdown-option[aria-selected="true"],
.dash-dropdown-option[data-state="checked"] {
  background: rgba(34, 211, 238, 0.22);
  color: #22d3ee;
  font-weight: 700;
}
.dash-dropdown-search-container { background: #0b1a2b !important; }
.dash-dropdown-search { color: #eef5ff !important; }
.ai-run-btn {
  width: 100%;
  margin-top: 4px;
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #04121f;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.ai-run-btn:hover { filter: brightness(1.08); }
.ai-run-btn:disabled { opacity: 0.55; cursor: wait; }
.ai-ollama-ctx { font-size: 13.5px; color: #22d3ee; font-weight: 600; margin-top: 10px; }
.ai-ollama-out {
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #d9e6f7;
  margin-top: 10px;
  max-height: 520px;
  overflow: auto;
}
.ai-ollama-hint { font-size: 13px; color: #8aa0bf; margin-top: 10px; line-height: 1.5; }
.ai-ollama-err { color: #ff9a9a; }
.ai-ollama-note { font-size: 11.5px; color: #6f86a6; margin-top: 10px; font-style: italic; }
.ai-spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(34, 211, 238, 0.25);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }

/* цела-ширина секција + копчиња Генерирај/Печати */
.ai-ollama-panel { margin-top: 16px; }
.ai-ollama-panel .ai-ollama-box { margin-top: 0; }
.ai-btn-row { display: flex; gap: 10px; margin-top: 10px; }
.ai-btn-row .ai-run-btn,
.ai-btn-row .ai-print-btn { width: auto; flex: 1; margin-top: 0; padding: 11px 14px; font-size: 13.5px; }
.ai-print-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.ai-print-btn i { color: var(--accent); }
.ai-print-btn:hover { background: rgba(34, 211, 238, 0.12); }
.ai-print-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Прирачник за студенти ===== */
.man-panel-wrap { margin-top: 16px; padding: 0; }
.man-details { border-radius: 10px; overflow: hidden; }
.man-summary {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #eef5ff;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.12), rgba(9, 15, 28, 0.92));
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 10px;
}
.man-summary::-webkit-details-marker { display: none; }
.man-summary:hover { border-color: rgba(167, 139, 250, 0.5); }
.man-summary .fa-graduation-cap { color: #a78bfa; }
.man-open-hint {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 400;
  color: #8aa0bf;
  letter-spacing: 0.3px;
}
.man-details[open] .man-open-hint { display: none; }
.man-details[open] .man-summary { border-radius: 10px 10px 0 0; border-bottom: 0; }
.man-container { border: 1px solid rgba(167, 139, 250, 0.28); border-top: 0; border-radius: 0 0 10px 10px; }
.man-body { padding: 16px 18px 18px; }
.man-head { font-size: 15px; font-weight: 700; color: #eef5ff; }
.man-sub { font-size: 12.5px; color: #8aa0bf; margin-top: 4px; }
.man-tabbar { margin: 14px 0 12px; }
.man-tabbar .man-tab {
  padding: 6px 13px !important;
  font-size: 12.5px !important;
  color: #a9c3dc !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  margin-right: 6px;
}
.man-tabbar .man-tab:hover { color: #eef5ff !important; border-color: rgba(167, 139, 250, 0.5) !important; }
.man-tabbar .man-tab--selected,
.man-tabbar .man-tab-on {
  color: #04121f !important;
  background: linear-gradient(135deg, #a78bfa, #8b5cf6) !important;
  border-color: transparent !important;
  font-weight: 700;
}
.man-tabbar .man-tab:focus { outline: none; }
.man-panel { padding: 4px 2px 0 !important; }
.man-term { font-size: 13.5px; font-weight: 700; color: #a78bfa; }
.man-def { font-size: 13px; line-height: 1.65; color: #d9e6f7; margin-top: 3px; }
.man-entry { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.man-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.man-intro { font-size: 12.5px; color: #8aa0bf; margin-bottom: 12px; }
.man-step { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.man-step:last-child { border-bottom: 0; padding-bottom: 0; }
.man-step-head { display: flex; gap: 8px; align-items: baseline; }
.man-step-n { font-size: 12px; font-weight: 700; color: #a78bfa; }
.man-step-t { font-size: 13.5px; font-weight: 700; color: #eef5ff; }
.man-step-body { font-size: 13px; line-height: 1.65; color: #d9e6f7; margin: 3px 0 0 22px; }
.man-ex { margin-bottom: 14px; }
.man-ex-t { font-size: 13.5px; font-weight: 700; color: #a78bfa; }
.man-ex-body { font-size: 13px; line-height: 1.65; color: #d9e6f7; margin-top: 3px; }
.man-note { font-size: 11.5px; color: #6f86a6; margin-top: 14px; font-style: italic; }
/* =========================================================
   WOW: интро-сцена при прво отворање + живи ефекти
   (чисто клиентски — не го допира events1.py)
   ========================================================= */

/* Скриени за време на интро (само додека трае) */
body.sm-intro-running { overflow: hidden; }
body.sm-intro-running .app-shell { opacity: 0; }

/* По интрото содржината едноставно се појавува — деталните влезни
   анимации на панелите/картичките веќе ги дава events1.modern.css. */
.app-shell.sm-app-in { animation: smAppFade 0.7s ease both; }
@keyframes smAppFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Оверлеј на интрото --- */
#sm-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 90% at 50% 42%, #0b1d33 0%, #050d18 58%, #01060c 100%);
  transition: opacity 0.7s ease;
}
#sm-intro.sm-fade { opacity: 0; pointer-events: none; }

/* Холограмски глобус: canvas ја црта мрежата/прстените, CSS дава сјај */
.sm-globe-wrap {
  position: relative;
  width: clamp(240px, 34vw, 400px);
  height: clamp(240px, 34vw, 400px);
  margin-top: -3vh;
}
.sm-globe-wrap .sm-globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: smGlobeIn 1.1s cubic-bezier(0.2, 0.7, 0.25, 1) 0.35s both;
}
@keyframes smGlobeIn {
  from { opacity: 0; transform: scale(0.82); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}
.sm-globe-glow {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 68%);
  filter: blur(7px);
  animation: smGlobeBreathe 3.4s ease-in-out infinite;
}
@keyframes smGlobeBreathe {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.07); }
}

/* Радарски прстен (удар од епицентарот — над глобусот) */
.sm-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 70%;
  margin: -35% 0 0 -35%;
  border: 2px solid rgba(34, 211, 238, 0.65);
  border-radius: 50%;
  animation: smRing 2.6s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.sm-ring.r2 { animation-delay: 0.85s; border-color: rgba(167, 139, 250, 0.55); }
.sm-ring.r3 { animation-delay: 1.7s; border-color: rgba(52, 211, 153, 0.45); }
@keyframes smRing {
  from { transform: scale(0.55); opacity: 0.9; }
  to   { transform: scale(2.1); opacity: 0; }
}

/* Текстот на интрото */
.sm-intro-text {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  bottom: 15%;
  pointer-events: none;
}
.sm-intro-kicker {
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #22d3ee;
  opacity: 0;
  animation: smTypeIn 0.8s ease 0.5s both;
}
.sm-intro-title {
  margin-top: 12px;
  font-size: clamp(24px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #eef5ff;
  opacity: 0;
  animation: smTypeIn 0.9s cubic-bezier(0.2, 0.7, 0.25, 1) 1.15s both;
  /* хроматска аберација (RGB раздвојување) за „холограм“ пречник */
  text-shadow:
    0 0 34px rgba(34, 211, 238, 0.35),
    -2px 0 rgba(34, 211, 238, 0.55),
    2px 0 rgba(251, 113, 133, 0.45);
}
.sm-intro-sub {
  margin-top: 10px;
  font-size: clamp(12px, 1.6vw, 15px);
  color: #8fb4d6;
  letter-spacing: 1.4px;
  opacity: 0;
  animation: smTypeIn 0.9s ease 1.85s both;
}
@keyframes smTypeIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Прогрес-линија на интрото */
.sm-intro-bar {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: min(320px, 60vw);
  height: 3px;
  margin-left: min(-160px, -30vw);
  background: rgba(255, 255, 255, 0.10);
  border-radius: 99px;
  overflow: hidden;
}
.sm-intro-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  animation: smBar 4.6s cubic-bezier(0.5, 0, 0.2, 1) 0.3s both;
}
@keyframes smBar { to { width: 100%; } }

/* Копче „Прескокни“ */
.sm-intro-skip {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  padding: 8px 16px;
  font-size: 12.5px;
  letter-spacing: 0.6px;
  color: #cfe6ff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  animation: smTypeIn 0.6s ease 0.9s both;
  transition: background 0.2s, border-color 0.2s;
}
.sm-intro-skip:hover { background: rgba(34, 211, 238, 0.16); border-color: #22d3ee; }

/* --- Звездено небо (canvas) --- */
#sm-intro .sm-stars {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: smFadeStars 1.6s ease 0.15s both;
}
@keyframes smFadeStars { to { opacity: 1; } }

/* --- Boot-секвенца: типографски системски линии --- */
.sm-boot {
  margin-top: 14px;
  min-height: 19px;
  font-family: "Space Grotesk", "Inter", monospace;
  font-size: 12.5px;
  letter-spacing: 1.6px;
  color: #7fe3f5;
  opacity: 0;
  animation: smTypeIn 0.6s ease 1.6s both;
}
.sm-boot::after {
  content: "▌";
  margin-left: 5px;
  color: #22d3ee;
  animation: smCaret 0.85s steps(1) infinite;
}
.sm-boot.sm-boot-in { animation: smBootIn 0.5s ease both; }
@keyframes smBootIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes smCaret { 50% { opacity: 0; } }

/* --- Скенирачки CRT-релјефи преку целиот екран --- */
#sm-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 3px
  );
  animation: smScanDrift 0.8s linear infinite;
}
@keyframes smScanDrift { from { background-position: 0 0; } to { background-position: 0 6px; } }
#sm-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 46%, transparent 55%, rgba(1, 5, 12, 0.55) 100%);
}

/* --- Сеизмичка waveform линија долу --- */
.sm-intro-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20%;
  height: 56px;
  opacity: 0;
  animation: smTypeIn 0.8s ease 2.4s both;
}
.sm-intro-wave svg { width: 100%; height: 100%; display: block; }
.sm-intro-wave path {
  fill: none;
  stroke: #22d3ee;
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.65));
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: smWaveDraw 2.1s cubic-bezier(0.35, 0.1, 0.25, 1) 2.45s both;
}
@keyframes smWaveDraw { to { stroke-dashoffset: 0; } }

/* --- Имплозија при излез од интрото --- */
#sm-intro.sm-fade .sm-globe-wrap {
  animation: smImplode 0.55s cubic-bezier(0.6, 0, 0.9, 0.4) both;
}
@keyframes smImplode {
  0%   { transform: scale(1); opacity: 1; filter: brightness(1); }
  45%  { transform: scale(1.12); opacity: 1; filter: brightness(1.9) saturate(1.5); }
  100% { transform: scale(0.15); opacity: 0; filter: brightness(2.4); }
}
#sm-intro.sm-fade .sm-intro-text,
#sm-intro.sm-fade .sm-intro-bar,
#sm-intro.sm-fade .sm-intro-wave,
#sm-intro.sm-fade .sm-boot { animation: smBlurOut 0.4s ease both; }
@keyframes smBlurOut {
  to { opacity: 0; transform: translateY(-14px); filter: blur(8px); }
}

/* --- Жив ефект: целоекрански блесок при нов настан --- */
#sm-flash {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0;
}
#sm-flash.sm-flash-on { animation: smFlash 1.15s ease-out both; }
@keyframes smFlash {
  0%   { opacity: 0; }
  12%  { opacity: 0.62; }
  100% { opacity: 0; }
}

/* --- Анимирани бројачи: меко појавување на KPI вредностите --- */
.metrics-grid .sm-count { animation: smCount 0.55s ease-out; }
@keyframes smCount {
  from { opacity: 0.25; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* --- Суптилен живо-пулс на LED/индикаторот (додаток кон постоечкиот) --- */
body.sm-live .hero-title { text-shadow: 0 0 30px rgba(34, 211, 238, 0.22); }

/* =========================================================
   БАНЕР СО ПРЕДУПРЕДУВАЊЕ — „прошетка“ низ екранот
   (чисто клиентски; JS-от само менува transform/opacity inline,
    па овие правила само го дотеруваат изгледот за време на шетање)
   ========================================================= */
#alarm-banner.sm-banner-wander {
  /* Континуирано линеарно движење — на композитор (мазно, без сецкање).
     Анимацијата ја вози CSS; JS само ја активира класата. */
  animation: smBannerCruise var(--sm-cruise-ms, 14000ms) linear both;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.28));
  pointer-events: none;
}
/* Банерот е центриран (left:50% + translateX(-50%)) → центарот му е на 50vw.
   РАМНОМЕРНО линеарно движење: целосно надвор-лево → целосно надвор-десно.
   calc(±50vw ± 50%) = ±половина екран (vw) + ±половина сопствена ширина (%) →
   секогаш целосно надвор независно од ширината. Само 2 клучни точки + `linear`
   = константна брзина (без забрзување/забавување, без „пауза“ во средината).
   Browser-от интерполира и vw и % компонентата линеарно → рамномерно. */
@keyframes smBannerCruise {
  0%   { transform: translateX(calc(-50vw - 50%)); opacity: 0; }
  4%   { transform: translateX(calc(-46vw - 50%)); opacity: 1; }
  96%  { transform: translateX(calc(46vw + 50%));  opacity: 1; }
  100% { transform: translateX(calc(50vw + 50%));  opacity: 0; }
}
/* блескава „трага“ при патување */
#alarm-banner.sm-banner-boost {
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.45));
}

/* =========================================================
   ПОВРЕМЕНИ „ЖИВИ“ ЕФЕКТИ (anti-boredom)
   ========================================================= */

/* --- Тивки toast известувања (долу-десно) --- */
#sm-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-end;
  pointer-events: none;
  max-width: min(340px, 80vw);
}
.sm-toast {
  padding: 9px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #dbe9fb;
  background: linear-gradient(180deg, rgba(17, 30, 50, 0.96), rgba(9, 16, 28, 0.97));
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-left: 3px solid rgba(34, 211, 238, 0.75);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 0.8, 0.28, 1);
}
.sm-toast.sm-toast-in  { opacity: 1; transform: none; }
.sm-toast.sm-toast-out { opacity: 0; transform: translateX(24px); }

/* --- Суптилен пулс на целиот панел --- */
.app-shell.sm-panel-pulse {
  animation: smPanelPulse 1.35s ease-out;
}
@keyframes smPanelPulse {
  0%   { box-shadow: inset 0 0 0 0 var(--sm-pulse-color, rgba(34, 211, 238, 0.5)); }
  30%  { box-shadow: inset 0 0 60px 4px var(--sm-pulse-color, rgba(34, 211, 238, 0.35)); }
  100% { box-shadow: inset 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* --- Жива радарска точка на 3D глобусот --- */
#sm-radar {
  position: fixed;
  width: 0;
  height: 0;
  z-index: 8500;
  pointer-events: none;
  display: none;
}
#sm-radar.sm-radar-on { display: block; }
#sm-radar > span {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid rgba(34, 211, 238, 0.8);
  border-radius: 50%;
  opacity: 0;
}
#sm-radar.sm-radar-on > span { animation: smRadar 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) both; }
#sm-radar.sm-radar-on > span:nth-child(2) { animation-delay: 0.6s; border-color: rgba(167, 139, 250, 0.7); }
@keyframes smRadar {
  0%   { transform: scale(0.15); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}

/* --- Ротирачко „smart“ статусно нишало --- */
.hero-meta.sm-whisper { animation: smWhisper 2.5s ease; }
@keyframes smWhisper {
  0%   { opacity: 1; }
  35%  { opacity: 0; transform: translateY(-4px); }
  65%  { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: none; }
}

/* Почитувај намалено-движење */
@media (prefers-reduced-motion: reduce) {
  #sm-intro { display: none !important; }
  body.sm-intro-running .app-shell { opacity: 1 !important; }
  .app-shell.sm-app-in { animation: none !important; }
  .sm-globe-wrap, .sm-intro-bar > i, .sm-boot { animation: none !important; }
  .sm-stars, .sm-intro-wave, .sm-intro-wave path, #sm-intro::before { animation: none !important; }
  #sm-flash { display: none; }
  #sm-toasts, #sm-radar { display: none !important; }
  .app-shell.sm-panel-pulse { animation: none !important; }
  .hero-meta.sm-whisper { animation: none !important; }
  /* Банерот е важен → не го исклучуваме, туку поблага „прошетка“ (помало
     отстапување, без scale) за да не е непријатна при намалено движење. */
  #alarm-banner.sm-banner-wander {
    animation: smBannerCruiseSoft 9s linear both;
  }
}
@keyframes smBannerCruiseSoft {
  0%   { transform: translateX(calc(-20vw - 50%)); opacity: 0; }
  5%   { transform: translateX(calc(-18vw - 50%)); opacity: 1; }
  95%  { transform: translateX(calc(18vw + 50%));  opacity: 1; }
  100% { transform: translateX(calc(20vw + 50%));  opacity: 0; }
}
