:root {
  --sidebar-w: 320px;
  --event-w: 340px;
  --topbar-h: 52px;
}

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0e17;
  color: #c8d4e8;
  font-family: 'Share Tech Mono', monospace;
  -webkit-text-size-adjust: 100%;
}

#main {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  width: 100%;
  position: relative;
  overflow: hidden;
}

#topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #0d121c;
  border-bottom: 1px solid rgba(0,255,136,0.25);
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
}
#topbar .logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700; font-size: 14px;
  white-space: nowrap; flex-shrink: 0;
}
#topbar .logo img { width: 88px; height: 66px; }

.weather-center {
  font-size: 12px; white-space: nowrap;
  overflow-x: auto; flex: 1; text-align: center;
  scrollbar-width: none;
}
.weather-center::-webkit-scrollbar { display: none; }

.status-bar {
  display: flex; gap: 12px;
  font-size: 11px; white-space: nowrap; flex-shrink: 0;
}

#sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  overflow-y: auto; background: #0b1019;
  border-right: 1px solid rgba(0,255,136,0.2);
  padding: 12px; box-sizing: border-box;
}

#eventPanel {
  width: var(--event-w); flex-shrink: 0;
  display: flex; flex-direction: column;
  background: #0b1019;
  border-left: 1px solid rgba(0,255,136,0.2);
}

#content {
  flex: 1; display: flex;
  flex-direction: column;
  position: relative; min-width: 0;
}

#map { flex: 1; width: 100%; height: 100%; min-height: 200px; }

.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 90;
}

.mobile-nav {
  display: none; position: fixed;
  bottom: 0; left: 0; right: 0; height: 56px;
  background: #0d121c;
  border-top: 1px solid rgba(0,255,136,0.3);
  z-index: 100; justify-content: space-around; align-items: center;
}

.mobile-nav button {
  background: none; border: none; color: #00ff88;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px; letter-spacing: 1px; padding: 8px 6px;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px; cursor: pointer; min-width: 64px;
}
.mobile-nav button.active { color: #fff; text-shadow: 0 0 8px #00ff88; }
.mobile-nav button span { font-size: 18px; line-height: 1; }

@media (max-width: 1100px) {
  :root { --sidebar-w: 280px; --event-w: 300px; }
}

@media (max-width: 900px) {
  #sidebar, #eventPanel {
    position: fixed; top: var(--topbar-h); bottom: 56px;
    z-index: 95; width: min(340px, 88vw); max-width: 100%;
    transition: transform 0.28s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
  }
  #sidebar { left: 0; transform: translateX(-105%); }
  #sidebar.open { transform: translateX(0); }
  #eventPanel { right: 0; transform: translateX(105%); }
  #eventPanel.open { transform: translateX(0); }
  #content { width: 100%; }
  .mobile-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .mobile-overlay.visible { opacity: 1; pointer-events: auto; }
  .mobile-nav { display: flex; }
  #topbar { padding: 0 8px; gap: 6px; }
  #topbar .logo { font-size: 12px; }
  .status-bar { display: none; }
  .weather-center { font-size: 11px; }
  #main { height: calc(100vh - var(--topbar-h) - 56px); }
  .content-header { padding: 6px 10px !important; font-size: 11px; }
  #footer { font-size: 10px !important; padding: 4px 8px !important; flex-wrap: wrap; gap: 4px; }
}

@media (max-width: 600px) {
  #topbar .logo span { display: none; }
  .weather-center { font-size: 10px; }
  #sidebar, #eventPanel { width: 100%; max-width: 100%; }
}

.status-badge { font-weight: bold; letter-spacing: 0.5px; }
.status-badge.reviewed  { color: #00ff88; text-shadow: 0 0 6px rgba(0,255,136,0.5); }
.status-badge.automatic { color: var(--amber, #ff9800); text-shadow: 0 0 6px rgba(255,152,0,0.4); }
.status-badge.unknown   { color: var(--muted, #6b7a8f); }

.eq-status { display: flex; align-items: center; gap: 4px; font-size: 10px; letter-spacing: 0.5px; margin-top: 2px; }
.eq-status .status-dot-sm { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.eq-status.is-reviewed  { color: #00ff88; }
.eq-status.is-reviewed .status-dot-sm  { background: #00ff88; box-shadow: 0 0 5px #00ff88; }
.eq-status.is-automatic { color: var(--amber, #ff9800); }
.eq-status.is-automatic .status-dot-sm { background: var(--amber, #ff9800); box-shadow: 0 0 5px var(--amber, #ff9800); }
.eq-status.is-unknown   { color: var(--muted, #6b7a8f); }
.eq-status.is-unknown .status-dot-sm   { background: var(--muted, #6b7a8f); }

.scan-line {
  position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,0.9), transparent);
  box-shadow: 0 0 12px #00ff88, 0 0 24px #00ff88;
  animation: scanMove 4.2s linear infinite; pointer-events: none;
}
@keyframes scanMove { 0% { left: -60%; } 100% { left: 160%; } }