:root {
  --void: #03060f;
  --glass: rgba(8, 18, 40, 0.72);
  --glass-hi: rgba(12, 28, 60, 0.88);
  --glass-border: rgba(0, 200, 255, 0.12);
  --glass-border-hi: rgba(0, 200, 255, 0.35);
  --cyan: #00c8ff;
  --cyan-dim: rgba(0, 200, 255, 0.55);
  --red: #ff3b5c;
  --green: #00e5a0;
  --amber: #ffb800;
  --white: #edf4ff;
  --muted: rgba(180, 210, 255, 0.45);
  --muted2: rgba(120, 160, 220, 0.3);
  --font-ui: "Outfit", sans-serif;
  --font-hud: "Exo 2", sans-serif;
  --font-mono: "Share Tech Mono", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--white);
  font-family: var(--font-ui);
}

body {
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── TOPBAR ── */
.topbar {
  height: 58px;
  background: rgba(3, 8, 20, 0.95);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 500;
}

.topbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-dim), transparent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 24px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--white);
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--cyan-dim);
  letter-spacing: 2px;
  margin-top: 1px;
}

.nav-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(180, 210, 255, 0.4);
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  transition: all 150ms;
  position: relative;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--white);
  background: var(--glass);
  border-color: var(--glass-border);
}

.nav-btn.active {
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.08);
  border-color: rgba(0, 200, 255, 0.25);
}

.nav-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--cyan);
  border-radius: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

#live-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 2px;
}

.sys-ok {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 1px;
}

.sys-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.top-sep {
  width: 1px;
  height: 20px;
  background: var(--glass-border);
}

/* ── Tenant switcher ── */
.tenant-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  padding: 4px 10px;
  border: 1px solid rgba(0,200,255,0.2);
  border-radius: 4px;
  user-select: none;
  transition: border-color 0.15s;
}
.tenant-switcher:hover { border-color: rgba(0,200,255,0.5); }
.tenant-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.tenant-caret { font-size: 9px; opacity: 0.6; }
.tenant-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: rgba(5,15,40,0.97);
  border: 1px solid rgba(0,200,255,0.2);
  border-radius: 6px;
  z-index: 1000;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.tenant-dropdown-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,200,255,0.2) transparent;
}
.tenant-dropdown-list::-webkit-scrollbar { width: 4px; }
.tenant-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.tenant-dropdown-list::-webkit-scrollbar-thumb { background: rgba(0,200,255,0.2); border-radius: 2px; }
.tenant-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}
.tenant-option:hover { background: rgba(0,200,255,0.08); color: var(--white); }
.tenant-option.active { color: var(--cyan); }
.tenant-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted2);
}

.top-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  cursor: pointer;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 280px;
  background: rgba(3, 10, 28, 0.9);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 20px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  color: rgba(180, 210, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: all 150ms;
}

.sidebar-item:hover {
  color: var(--white);
  background: rgba(0, 200, 255, 0.05);
  border-left-color: rgba(0, 200, 255, 0.3);
}

.sidebar-item.active {
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.08);
  border-left-color: var(--cyan);
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(3, 10, 28, 0.5), var(--void));
}

.main-content::-webkit-scrollbar {
  width: 3px;
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.2);
  border-radius: 2px;
}

/* ── GLASS PANELS ── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  padding: 20px;
  transition: all 200ms;
}

.glass:hover {
  border-color: var(--glass-border-hi);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 140ms;
  font-family: var(--font-hud);
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.12);
}

.btn:active {
  transform: scale(0.97);
}

.btn-c {
  background: rgba(0, 200, 255, 0.15);
  border: 1px solid rgba(0, 200, 255, 0.4);
  color: var(--cyan);
}

.btn-r {
  background: rgba(255, 59, 92, 0.15);
  border: 1px solid rgba(255, 59, 92, 0.4);
  color: var(--red);
}

.btn-g {
  background: rgba(0, 229, 160, 0.12);
  border: 1px solid rgba(0, 229, 160, 0.35);
  color: var(--green);
}

.btn-a {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.35);
  color: var(--amber);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: var(--glass-border-hi);
  color: var(--white);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 11px;
  gap: 4px;
}

.btn-full {
  width: 100%;
}

/* ── INPUTS ── */
.inp {
  background: rgba(5, 15, 40, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--white);
  border-radius: 7px;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-family: var(--font-ui);
  transition: border-color 140ms;
  width: 100%;
}

.inp:focus {
  outline: none;
  border-color: rgba(0, 200, 255, 0.4);
}

.inp::placeholder {
  color: rgba(180, 210, 255, 0.3);
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 2px;
  background: rgba(3, 10, 28, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
}

.tab {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--muted);
  transition: all 130ms;
  font-family: var(--font-hud);
  letter-spacing: 0.5px;
}

.tab.active {
  background: rgba(0, 200, 255, 0.14);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--cyan);
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.b-r {
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.35);
  color: var(--red);
}

.b-g {
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid rgba(0, 229, 160, 0.3);
  color: var(--green);
}

.b-c {
  background: rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--cyan);
}

.b-a {
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: var(--amber);
}

/* ── UTILITIES ── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-c {
  align-items: center;
}

.jc-b {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-8 {
  margin-top: 8px;
}

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

.grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.txt-sm {
  font-size: 13px;
}

.txt-xs {
  font-size: 11px;
}

.txt-c {
  color: var(--cyan);
}

.txt-r {
  color: var(--red);
}

.txt-g {
  color: var(--green);
}

.txt-m {
  color: var(--muted);
}

.bolt {
  font-weight: 700;
}

.mono {
  font-family: var(--font-mono);
}

.hidden {
  display: none;
}

/* ── WORLD BACKGROUND ── */
.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.world-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 62% 50%, #020b1e 0%, #03060f 70%);
}
.world-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,180,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: grid-flash 6s ease-in-out infinite;
}
.radar-rings {
  position: absolute;
  left: 62%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,200,255,0.07);
  animation: ring-pulse 4s ease-in-out infinite;
  transform-origin: center;
}

/* ── SHELL (above world layer) ── */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── SECTION HEADER ── */
.ph {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.ph-bar {
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--cyan);
  flex-shrink: 0;
}
.ph-bar.red { background: var(--red); }
.ph-bar.green { background: var(--green); }
.ph-bar.amber { background: var(--amber); }
.ph-title {
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
}

/* ── LICENSE PLATE ── */
.plate {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0,200,255,0.08);
  border: 1px solid rgba(0,200,255,0.28);
  border-radius: 5px;
  padding: 3px 9px;
  white-space: nowrap;
  display: inline-block;
  font-size: 13px;
}
.plate-sm {
  font-size: 11px;
  padding: 2px 7px;
}

/* ── STAT TILES ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-tile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(16px);
  transition: border-color 200ms;
}
.stat-tile:hover { border-color: var(--glass-border-hi); }
.stat-tile.s-red { border-color: rgba(255,59,92,0.2); }
.stat-tile.s-red:hover { border-color: rgba(255,59,92,0.4); }
.stat-tile.s-green { border-color: rgba(0,229,160,0.2); }
.stat-tile.s-amber { border-color: rgba(255,184,0,0.2); }
.stat-tile > div:last-child {
  flex: 1;
  min-width: 0;
}
.stat-num {
  font-family: var(--font-hud);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.stat-lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* ── ALARM CARDS ── */
.alarm-card {
  background: var(--glass);
  border: 1px solid rgba(255,59,92,0.22);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 180ms, box-shadow 180ms;
  margin-bottom: 10px;
}
.alarm-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(255,59,92,0.08), transparent);
  pointer-events: none;
}
.alarm-card:hover { border-color: rgba(255,59,92,0.45); }
.alarm-card-clickable { cursor: pointer; }
.alarm-card-clickable:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255,59,92,0.18); }
.alarm-card-clickable.behandeling:hover { box-shadow: 0 6px 24px rgba(255,184,0,0.14); }
.alarm-card-clickable.afgesloten:hover { box-shadow: 0 6px 24px rgba(0,229,160,0.10); }
.alarm-card.behandeling { border-color: rgba(255,184,0,0.22); border-left-color: var(--amber); }
.alarm-card.behandeling::before { background: radial-gradient(circle at top right, rgba(255,184,0,0.06), transparent); }
.alarm-card.behandeling:hover { border-color: rgba(255,184,0,0.5); }
.alarm-card.afgesloten { border-color: rgba(0,229,160,0.15); border-left-color: var(--green); opacity: 0.7; }
.alarm-card.expanded { box-shadow: 0 8px 40px rgba(255,59,92,0.12); cursor: default; }
.alarm-card.expanded.behandeling { box-shadow: 0 8px 40px rgba(255,184,0,0.08); }

.alarm-header { padding: 14px 18px; display: flex; flex-direction: column; gap: 7px; }
.alarm-header-row1 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.alarm-header-row2 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.alarm-title { font-family: var(--font-hud); font-size: 14px; font-weight: 700; letter-spacing: 0.5px; color: var(--white); }
.alarm-expand-hint { font-family: var(--font-mono); font-size: 10px; color: rgba(0,200,255,0.3); display: flex; align-items: center; gap: 4px; transition: color 150ms; }
.alarm-card:not(.expanded):hover .alarm-expand-hint { color: rgba(0,200,255,0.6); }
.alarm-card.expanded .alarm-expand-hint { display: none; }

.alarm-expanded-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 350ms ease, opacity 250ms ease;
  opacity: 0;
}
.alarm-card.expanded .alarm-expanded-body {
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  opacity: 1;
  border-top: 1px solid rgba(255,59,92,0.1);
}
.alarm-card.expanded.behandeling .alarm-expanded-body {
  border-top-color: rgba(255,184,0,0.1);
}
.alarm-acties {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(0,200,255,0.06);
  background: rgba(0,200,255,0.02);
}

/* ── NAV ALARM BADGE ── */
.nav-alarm-badge {
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
  animation: blink 2s infinite;
}

/* ── TOGGLE SWITCH ── */
.tog {
  width: 38px;
  height: 21px;
  border-radius: 11px;
  cursor: pointer;
  position: relative;
  transition: background 180ms;
  flex-shrink: 0;
  border: none;
  outline: none;
}
.tog::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  transition: left 180ms;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.tog.on { background: var(--cyan); }
.tog.on::after { left: 20px; }
.tog.off { background: rgba(100,120,180,0.2); }
.tog.off::after { left: 3px; }

/* ── LOG TABLE ── */
.log-wrap {
  background: rgba(2,6,18,0.6);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
}
.log { width: 100%; border-collapse: collapse; font-size: 12px; }
.log thead th {
  background: rgba(0,200,255,0.04);
  padding: 8px 12px;
  text-align: left;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.log tbody td { padding: 9px 12px; border-bottom: 1px solid rgba(0,200,255,0.04); vertical-align: middle; }
.log tbody tr:hover td { background: rgba(0,200,255,0.03); }

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid rgba(0,200,255,0.07);
  margin: 14px 0;
}

/* ── ALERT BANNER ── */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  border-left: 3px solid;
  margin-bottom: 12px;
}
.alert-banner svg { width: 16px; height: 16px; stroke-width: 2; fill: none; flex-shrink: 0; }
.ab-red { background: rgba(255,59,92,0.07); border-color: var(--red); color: var(--red); }
.ab-cyan { background: rgba(0,200,255,0.06); border-color: var(--cyan); color: var(--cyan); }
.ab-amber { background: rgba(255,184,0,0.07); border-color: var(--amber); color: var(--amber); }
.ab-green { background: rgba(0,229,160,0.07); border-color: var(--green); color: var(--green); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein 150ms ease-out;
}
.modal-paneel {
  background: rgba(3,10,28,0.98);
  border: 1px solid rgba(0,200,255,0.3);
  border-radius: 14px;
  padding: 28px;
  width: 480px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
}
.modal-titel {
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--white);
  margin-bottom: 20px;
}

/* ── SETTINGS TABS ── */
.cc-tabs-outer {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0,200,255,0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cc-tab {
  padding: 8px 18px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 140ms;
  white-space: nowrap;
}
.cc-tab:hover { color: var(--white); }
.cc-tab.cc-actief { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ── USER / ITEM ROWS ── */
.item-rij {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(0,200,255,0.06);
}
.item-rij:last-child { border-bottom: none; }
.item-av {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── WATCH LAYOUT (Video) ── */
.watch-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: calc(100vh - 78px);
}
.watch-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.watch-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 130ms;
  margin-bottom: 4px;
}
.vs-item:last-child { margin-bottom: 0; }
.vs-item:hover { background: rgba(0,200,255,0.06); border-color: rgba(0,200,255,0.15); }
.vs-item.actief { background: rgba(0,200,255,0.09); border-color: rgba(0,200,255,0.3); }

/* ── CAMERA TILE ── */
.cam-tile {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  contain: paint;
  cursor: pointer;
  transition: border-color 140ms;
}
.cam-tile:hover { border-color: rgba(0,200,255,0.4); }
.cam-tile:hover .fs-hint { opacity: 0.9 !important; }
.cam-tile .scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(0,200,255,0.012) 3px, rgba(0,200,255,0.012) 4px);
  pointer-events: none;
}
.cam-tile .sweep {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(transparent, rgba(0,200,255,0.1), transparent);
  animation: scanline 4s linear infinite;
  pointer-events: none;
}
.cam-lbl {
  position: absolute; top: 7px; left: 7px;
  background: rgba(0,4,14,0.85);
  border-radius: 3px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
}
.cam-rec-dot { width: 5px; height: 5px; background: var(--red); border-radius: 50%; animation: blink 1s infinite; display: inline-block; }
.cam-rec-lbl {
  position: absolute; top: 7px; right: 7px;
  background: rgba(0,4,14,0.85);
  border-radius: 3px;
  padding: 2px 7px;
  display: flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 9px; color: var(--red);
}

/* ── GEEN SIGNAAL OVERLAY ── */
.cam-tile.no-signal::after {
  content: none;
}
.cam-tile.no-signal .no-signal-overlay {
  display: flex !important;
}

.no-signal-overlay {
  display: none;
  position: absolute; inset: 0;
  z-index: 6;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.no-signal-icon {
  width: 32px; height: 32px;
  stroke: rgba(0,200,255,0.25);
  stroke-width: 1.5;
  fill: none;
}
.no-signal-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(0,200,255,0.25);
}

/* ── MAP STYLING ── */
.map-container {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  position: relative;
}
.leaflet-container {
  background: #020c1e !important;
  font-family: var(--font-mono) !important;
}
.leaflet-tile-pane { filter: brightness(0.7) saturate(0.5) hue-rotate(180deg); }
.leaflet-control-attribution { background: rgba(2,10,28,0.9) !important; color: rgba(100,140,200,0.4) !important; font-size: 9px !important; }
.leaflet-control-zoom a { background: rgba(3,10,28,0.9) !important; color: var(--cyan) !important; border-color: rgba(0,200,255,0.2) !important; }
.leaflet-popup-content-wrapper { background: rgba(3,10,28,0.95) !important; border: 1px solid rgba(0,200,255,0.3) !important; border-radius: 8px !important; color: var(--white) !important; }
.leaflet-popup-tip { background: rgba(3,10,28,0.95) !important; }


/* ═══════════════════════════════════════════ */
/*  LOGIN PAGE                                */
/* ═══════════════════════════════════════════ */

.login-page {
  position: fixed; inset: 0;
  background: #020810;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* Achtergrond */
.login-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-radar {
  position: absolute;
  left: 25%; top: 50%;
  transform: translate(-50%, -50%);
}
.login-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(0,200,255,0.06);
  animation: login-ring-pulse 6s ease-in-out infinite;
}
.login-ring.r1 { width:200px; height:200px; margin:-100px 0 0 -100px; }
.login-ring.r2 { width:360px; height:360px; margin:-180px 0 0 -180px; animation-delay:1s; }
.login-ring.r3 { width:540px; height:540px; margin:-270px 0 0 -270px; animation-delay:2s; }
.login-ring.r4 { width:750px; height:750px; margin:-375px 0 0 -375px; animation-delay:3s; }
.login-sweep {
  position: absolute; left: 0; top: 0;
  width: 200px; height: 200px; margin: -100px 0 0 -100px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(0,200,255,0.08) 40deg, transparent 80deg);
  border-radius: 50%;
  animation: login-sweep-spin 8s linear infinite;
}
.login-glow {
  position: absolute;
  left: 25%; top: 50%;
  width: 600px; height: 600px;
  margin: -300px 0 0 -300px;
  background: radial-gradient(circle, rgba(0,120,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes login-ring-pulse {
  0%,100% { opacity: .4; transform: scale(1); }
  50% { opacity: .1; transform: scale(1.04); }
}
@keyframes login-sweep-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Container */
.login-container {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 420px 400px;
  gap: 0;
  max-width: 820px;
  width: 100%;
  min-height: 520px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,200,255,0.1);
  box-shadow:
    0 0 80px rgba(0,100,200,0.08),
    0 32px 64px rgba(0,0,0,0.4);
}

/* Linker paneel */
.login-brand {
  background: linear-gradient(170deg, rgba(0,30,80,0.5) 0%, rgba(2,8,20,0.95) 100%);
  border-right: 1px solid rgba(0,200,255,0.08);
  padding: 48px 36px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.login-brand-inner { position: relative; z-index: 1; }

.login-title {
  font-family: var(--font-hud);
  font-size: 36px; font-weight: 700;
  letter-spacing: 8px;
  color: var(--white);
  margin: 0;
}
.login-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(0,200,255,0.5);
  margin-top: 4px;
}
.login-divider {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin: 28px 0;
  border-radius: 1px;
}
.login-features {
  display: flex; flex-direction: column; gap: 14px;
}
.login-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: rgba(180,210,255,0.4);
}
.login-feature svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.login-brand-footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(120,160,220,0.25);
  margin-top: 32px;
}
.login-version {
  padding: 2px 6px;
  border: 1px solid rgba(0,200,255,0.1);
  border-radius: 4px;
  font-size: 9px;
}
.login-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(0,200,255,0.2);
}
.login-radar-line {
  transform-origin: 40px 40px;
  animation: login-sweep-spin 6s linear infinite;
}

/* Rechter paneel */
.login-form-panel {
  background: rgba(6,14,32,0.95);
  padding: 48px 36px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-form-header {
  text-align: center;
  margin-bottom: 32px;
}
.login-form-title {
  font-family: var(--font-hud);
  font-size: 22px; font-weight: 600;
  color: var(--white);
  margin: 0 0 6px;
}
.login-form-desc {
  font-size: 12px;
  color: rgba(180,210,255,0.35);
  margin: 0;
}
.login-field {
  margin-bottom: 18px;
}
.login-label {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(180,210,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-label svg { opacity: 0.4; }

.login-error {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,59,92,0.08);
  border: 1px solid rgba(255,59,92,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 12px;
}

.login-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(0,160,255,0.2) 0%, rgba(0,100,200,0.15) 100%);
  border: 1px solid rgba(0,200,255,0.3);
  border-radius: 8px;
  color: var(--cyan);
  font-family: var(--font-hud);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 200ms ease;
}
.login-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0,160,255,0.3) 0%, rgba(0,100,200,0.25) 100%);
  border-color: rgba(0,200,255,0.5);
  box-shadow: 0 0 20px rgba(0,150,255,0.15);
}
.login-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.login-btn-back {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(0,200,255,0.08);
  border-radius: 8px;
  color: rgba(180,210,255,0.35);
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 200ms ease;
}
.login-btn-back:hover:not(:disabled) {
  border-color: rgba(0,200,255,0.2);
  color: rgba(180,210,255,0.6);
}

.login-footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: rgba(120,160,220,0.25);
}

/* ═══════════════════════════════════════════ */
/*  ALARM DETAIL PAGE                         */
/* ═══════════════════════════════════════════ */

.alarm-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.alarm-detail-id {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.alarm-detail-body {
  display: grid;
  grid-template-columns: 650px 1fr 340px;
  gap: 16px;
  align-items: start;
}
.alarm-detail-main {
  min-width: 0;
  width: 650px;
}
.alarm-detail-notes {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: stretch;
}
.alarm-detail-sidebar {
  position: sticky;
  top: 0;
}

/* Clip / camera grid */
.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

/* Playbook panel */
.playbook-panel {
  padding: 18px;
}
.playbook-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.playbook-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 180ms ease;
}
.playbook-step.done {
  background: rgba(0,229,160,0.04);
  border-color: rgba(0,229,160,0.12);
}
.playbook-step.active {
  background: rgba(0,200,255,0.06);
  border-color: rgba(0,200,255,0.28);
  box-shadow: 0 0 0 1px rgba(0,200,255,0.1);
  animation: playbook-pulse 2.5s ease-in-out infinite;
}
.playbook-step.future {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.05);
}
.playbook-step.active:hover,
.playbook-step.future:hover {
  background: rgba(0,200,255,0.09);
  border-color: rgba(0,200,255,0.35);
}
@keyframes playbook-pulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(0,200,255,0.1); }
  50% { box-shadow: 0 0 0 2px rgba(0,200,255,0.25), 0 0 12px rgba(0,200,255,0.1); }
}
.playbook-step-check {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0,200,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.playbook-step.done .playbook-step-check {
  border-color: rgba(0,229,160,0.4);
  background: rgba(0,229,160,0.08);
}
.playbook-step.active .playbook-step-check {
  border-color: rgba(0,200,255,0.5);
  background: rgba(0,200,255,0.08);
}
.playbook-step-body {
  flex: 1;
  min-width: 0;
}
.playbook-step-desc {
  font-size: 13px;
  line-height: 1.4;
}

/* Accept banner */
.accept-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0,229,160,0.07);
  border: 1px solid rgba(0,229,160,0.25);
  border-radius: 8px;
  color: var(--green);
  font-size: 13px;
  margin-bottom: 12px;
  animation: fadein 300ms ease-out;
}

/* Modal box for detail page */
.modal-box {
  background: rgba(3,10,28,0.98);
  border: 1px solid rgba(0,200,255,0.3);
  border-radius: 14px;
  padding: 28px;
  width: 440px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  animation: fadein 150ms ease-out;
}
.modal-title {
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--white);
  margin-bottom: 4px;
}

/* Loading state */
.detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 240px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ═══════════════════════════════════════════ */
/*  VEHICLE CARDS                              */
/* ═══════════════════════════════════════════ */

.vehicle-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--muted2);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color 180ms, box-shadow 180ms;
  margin-bottom: 10px;
  overflow: hidden;
}
.vehicle-card:hover { border-color: var(--glass-border-hi); }
.vehicle-card.online { border-left-color: var(--green); }
.vehicle-card.online:hover { border-color: rgba(0,229,160,0.35); }
.vehicle-card.offline { border-left-color: var(--muted2); }
.vehicle-card.expanded { cursor: default; }
.vehicle-card.expanded.online { box-shadow: 0 6px 24px rgba(0,229,160,0.08); }

.vehicle-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 10px;
  flex-wrap: wrap;
}

.vehicle-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.vehicle-status-dot.dot-green { background: var(--green); box-shadow: 0 0 6px rgba(0,229,160,0.4); }
.vehicle-status-dot.dot-red   { background: var(--red);   box-shadow: 0 0 6px rgba(255,80,80,0.4); }
.vehicle-status-dot.dot-muted { background: var(--muted2); }

.vehicle-expanded {
  padding: 0 18px 16px;
  border-top: 1px solid rgba(0,200,255,0.06);
  padding-top: 14px;
  animation: fadein 200ms ease-out;
}

.vehicle-stat-mini {
  background: rgba(0,200,255,0.03);
  border: 1px solid rgba(0,200,255,0.08);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}

/* ═══════════════════════════════════════════ */
/*  TENANT SWITCHER (PROMINENT)                */
/* ═══════════════════════════════════════════ */

.tenant-switcher-prominent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--cyan);
  padding: 5px 12px;
  border: 1px solid rgba(0,200,255,0.25);
  border-radius: 6px;
  user-select: none;
  transition: all 0.15s;
  background: rgba(0,200,255,0.04);
}
.tenant-switcher-prominent:hover {
  border-color: rgba(0,200,255,0.5);
  background: rgba(0,200,255,0.08);
  box-shadow: 0 0 12px rgba(0,200,255,0.1);
}

.tenant-label-prominent {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  padding: 4px 10px;
  border: 1px solid rgba(0,200,255,0.15);
  border-radius: 5px;
  background: rgba(0,200,255,0.03);
}

/* Responsive: small screens */
@media (max-width: 860px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .login-brand { display: none; }
  .login-form-panel { border-radius: 16px; }
}

/* ── NOTIFICATION BELL ── */
.notif-bell {
  position: relative;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--muted);
  transition: color 200ms;
  display: flex;
  align-items: center;
}
.notif-bell:hover { color: var(--cyan); }
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: rgba(3,10,28,0.97);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.notif-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,200,255,0.06);
  cursor: pointer;
  transition: background 200ms;
}
.notif-item:hover { background: rgba(0,200,255,0.04); }
.notif-item.unread { border-left: 3px solid var(--cyan); }

/* ── OVERVIEW PAGE ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.tenant-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 18px;
  backdrop-filter: blur(16px);
  transition: border-color 200ms, transform 200ms;
}
.tenant-card:hover {
  border-color: var(--glass-border-hi);
  transform: translateY(-2px);
}
.tenant-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.tenant-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-hud);
  background: rgba(0,200,255,0.08);
  border: 1px solid rgba(0,200,255,0.2);
  color: var(--cyan);
}
.tenant-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.tenant-card-stat {
  text-align: center;
  padding: 6px;
  background: rgba(0,200,255,0.03);
  border-radius: 6px;
}
.tenant-card-stat-num {
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.tenant-card-stat-lbl {
  font-size: 9px;
  color: var(--muted2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 3px;
}
.tenant-card-actions {
  display: flex;
  gap: 6px;
}
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.quick-action-card {
  flex: 1;
  min-width: 200px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 16px;
  backdrop-filter: blur(16px);
}
.server-status {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 6px var(--red); }
