/* =========================================================
   حارس | HARIS — Cinematic Product Demo
   Calm Mission-Control Glass · Military SOC aesthetic
   ========================================================= */

:root {
  --bg: #070B14;
  --navy: #0B1220;
  --card: #121A2C;
  --card-2: #151D2E;
  --steel: #1E2A3D;
  --steel-hi: #2A3A52;
  --border: #243049;
  --border-soft: rgba(36, 48, 73, 0.75);
  --blue: #2563EB;
  --cyan: #06B6D4;
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #EF4444;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --dim: #64748B;
  --font-display: "Changa", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font-ui: "IBM Plex Sans Arabic", "Changa", Tahoma, sans-serif;
  --font-mono: "Share Tech Mono", "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 12px;
  --radius-lg: 16px;
  --glow-blue: 0 0 28px rgba(37, 99, 235, 0.22);
  --glow-cyan: 0 0 24px rgba(6, 182, 212, 0.18);
  --glow-green: 0 0 22px rgba(34, 197, 94, 0.18);
  --glass: linear-gradient(165deg, rgba(30, 42, 61, 0.55), rgba(11, 18, 32, 0.88));
  --vignette: radial-gradient(ellipse 75% 65% at 50% 42%, transparent 40%, rgba(7, 11, 20, 0.55) 100%);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

.ltr { direction: ltr; unicode-bidi: isolate; }
.en { font-family: var(--font-ui); letter-spacing: 0.06em; }
.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }

/* Icon helper */
.icon {
  width: 1.35em;
  height: 1.35em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.2em;
}
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 40px; height: 40px; }
.icon-kpi { width: 24px; height: 24px; opacity: 0.95; }

#icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(37, 99, 235, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 95%, rgba(6, 182, 212, 0.05), transparent 50%),
    linear-gradient(180deg, #070B14 0%, #0B1220 100%);
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 48, 73, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 73, 0.1) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 40%, black, transparent);
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--vignette);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Intro ---------- */
.intro {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 48% at 50% 42%, rgba(18, 26, 44, 0.96), rgba(7, 11, 20, 0.99));
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.intro.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-mark {
  width: 92px;
  height: 92px;
  margin-bottom: 1.35rem;
  filter: drop-shadow(0 10px 32px rgba(37, 99, 235, 0.35));
  animation: logoPulse 3.4s ease-in-out infinite;
}

.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 6.5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.intro .en-title {
  margin-top: 0.3rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.32em;
}

.intro .sub {
  margin-top: 1rem;
  max-width: 28rem;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.65;
}

.intro .duration {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.play-btn {
  margin-top: 1.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.88rem 1.9rem;
  border: 1px solid rgba(37, 99, 235, 0.5);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(6, 182, 212, 0.14));
  color: var(--text);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glow-blue);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}

.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.38);
}

.play-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* ---------- Chrome ---------- */
.chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.94), transparent);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}

.chrome.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark { width: 34px; height: 34px; }

.brand-text .brand-name {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.1;
  color: var(--text);
}

.intro h1.en {
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
}

.brand-text .ar {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-text .en {
  font-size: 0.65rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  font-weight: 600;
}

.chrome-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  background: rgba(18, 26, 44, 0.9);
  font-family: var(--font-mono);
}

.badge .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge.demo { color: var(--amber); border-color: rgba(245, 158, 11, 0.35); }
.badge.live { color: var(--green); border-color: rgba(34, 197, 94, 0.35); }
.badge.live .dot { animation: blink 1.6s ease-in-out infinite; }

.scene-label {
  padding: 0.26rem 0.7rem;
  border-radius: 8px;
  background: rgba(18, 26, 44, 0.92);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 10.5rem;
  text-align: center;
}

/* ---------- Scenes ---------- */
.scenes {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.85s var(--ease), visibility 0.85s;
  padding: 5.2rem 2rem 7.2rem;
}

.scene.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scene-inner {
  width: min(1140px, 100%);
  position: relative;
  z-index: 3;
}

.scene-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.16em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.scene-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.15rem;
  line-height: 1.25;
}

.scene-title.center { text-align: center; }

/* ---------- Glass panels ---------- */
.panel {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.75rem;
}

.panel-head h3 {
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.online,
.status-pill.valid { color: var(--green); background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.28); }
.status-pill.warn { color: var(--amber); background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.32); }
.status-pill.alert { color: var(--red); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.32); }
.status-pill.info { color: var(--blue); background: rgba(37, 99, 235, 0.1); border-color: rgba(37, 99, 235, 0.28); }
.status-pill.cyan { color: var(--cyan); background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.28); }

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.15rem;
  align-items: stretch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

/* ---------- Opening ---------- */
.facility-sil {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 44%;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.facility-sil svg { width: 100%; height: 100%; display: block; }

.open-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.15rem;
  filter: drop-shadow(0 12px 36px rgba(37, 99, 235, 0.38));
  animation: logoIn 1.4s var(--ease) both;
}

.open-brand {
  text-align: center;
  animation: fadeUp 1.1s 0.2s var(--ease) both;
}

.open-brand h2 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  font-weight: 800;
}

.open-brand .en {
  margin-top: 0.2rem;
  color: var(--cyan);
  letter-spacing: 0.34em;
  font-weight: 600;
  font-size: 1rem;
}

.open-tagline {
  margin-top: 1.6rem;
  max-width: 32rem;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  animation: fadeUp 1.1s 0.5s var(--ease) both;
}

.open-sub {
  margin-top: 0.7rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  animation: fadeUp 1.1s 0.75s var(--ease) both;
}

/* ---------- Questions ---------- */
.questions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  max-width: 860px;
  margin: 0 auto;
}

.q-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  background:
    linear-gradient(155deg, rgba(36, 48, 73, 0.55), rgba(11, 18, 32, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(14px);
  transition:
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.q-card:hover {
  border-color: rgba(6, 182, 212, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(6, 182, 212, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(6, 182, 212, 0.12);
  transform: translateY(-2px);
}

.scene.active .q-card { animation: fadeUp 0.65s var(--ease) forwards; }
.scene.active .q-card:nth-child(1) { animation-delay: 0.15s; }
.scene.active .q-card:nth-child(2) { animation-delay: 0.35s; }
.scene.active .q-card:nth-child(3) { animation-delay: 0.55s; }
.scene.active .q-card:nth-child(4) { animation-delay: 0.75s; }
.scene.active .q-card:nth-child(5) { animation-delay: 0.95s; }
.scene.active .q-card:nth-child(6) { animation-delay: 1.15s; }

.q-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(148, 163, 184, 0.35), transparent 42%),
    linear-gradient(145deg, #3a4d6a 0%, #1a2438 48%, #0e1524 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.18),
    inset 0 -3px 6px rgba(0, 0, 0, 0.45),
    0 4px 14px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(11, 18, 32, 0.85);
  flex-shrink: 0;
  position: relative;
}

.q-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.q-icon .icon { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }

.q-card p {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  font-family: var(--font-display);
}

/* ---------- Architecture strip ---------- */
.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.15rem;
  padding: 0.75rem 0.9rem;
  background: rgba(11, 18, 32, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.arch-node {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--card);
  white-space: nowrap;
}

.arch-node.physical { color: var(--dim); }
.arch-node.sensors { color: var(--cyan); border-color: rgba(6, 182, 212, 0.32); }
.arch-node.core { color: var(--blue); border-color: rgba(37, 99, 235, 0.42); background: rgba(37, 99, 235, 0.1); }
.arch-node.ops { color: var(--green); border-color: rgba(34, 197, 94, 0.32); }

.arch-arrow {
  color: var(--dim);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* ---------- Command center ---------- */
.cmd-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.1rem;
}

.cmd-visual {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #0e1628, #080d16);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
}

.cmd-visual svg { width: 100%; height: 100%; display: block; }

.cmd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.stat-tile {
  padding: 1.15rem 1.05rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(42, 58, 82, 0.45), rgba(11, 18, 32, 0.82));
  border: 1px solid rgba(42, 58, 82, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  min-height: 96px;
}

.stat-tile .label {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stat-tile .label .icon {
  width: 20px;
  height: 20px;
  opacity: 0.95;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.25));
}

.stat-tile .value {
  font-size: 2.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  direction: ltr;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 18px rgba(37, 99, 235, 0.18);
}

.stat-tile.people .value { color: var(--blue); }
.stat-tile.vehicles .value { color: var(--cyan); }
.stat-tile.events .value { color: var(--text); }
.stat-tile.exceptions .value { color: var(--amber); }

.gate-status-row {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(18, 26, 44, 0.8);
  border: 1px solid var(--border-soft);
  font-size: 0.8rem;
}

.gate-row .id {
  font-family: var(--font-mono);
  font-weight: 700;
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Clear command center redesign */
#scene-command.scene {
  align-items: flex-start;
  padding-top: 4.6rem;
  padding-bottom: 6.4rem;
  overflow: auto;
}

#scene-command .scene-inner {
  margin-top: 0.25rem;
}

.cmd-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.cmd-kpi {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(36, 52, 78, 0.55), rgba(10, 16, 28, 0.92));
  border: 1px solid rgba(58, 78, 110, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 32px rgba(0, 0, 0, 0.28);
  min-height: 96px;
}

.cmd-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(11, 18, 32, 0.75);
  border: 1px solid rgba(100, 116, 139, 0.35);
  flex-shrink: 0;
}
.cmd-kpi-icon .icon { width: 28px; height: 28px; }

.cmd-kpi.people .cmd-kpi-icon { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 18px rgba(37, 99, 235, 0.18); }
.cmd-kpi.vehicles .cmd-kpi-icon { border-color: rgba(6, 182, 212, 0.45); box-shadow: 0 0 18px rgba(6, 182, 212, 0.18); }
.cmd-kpi.events .cmd-kpi-icon { border-color: rgba(148, 163, 184, 0.4); }
.cmd-kpi.exceptions .cmd-kpi-icon { border-color: rgba(245, 158, 11, 0.5); box-shadow: 0 0 18px rgba(245, 158, 11, 0.15); }

.cmd-kpi-value {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  direction: ltr;
  letter-spacing: -0.03em;
}
.cmd-kpi.people .cmd-kpi-value { color: #60A5FA; }
.cmd-kpi.vehicles .cmd-kpi-value { color: var(--cyan); }
.cmd-kpi.events .cmd-kpi-value { color: var(--text); }
.cmd-kpi.exceptions .cmd-kpi-value { color: var(--amber); }

.cmd-kpi-label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.cmd-main {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.cmd-panel {
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: linear-gradient(165deg, rgba(30, 42, 61, 0.55), rgba(11, 18, 32, 0.9));
  border: 1px solid rgba(58, 78, 110, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cmd-panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.cmd-panel-head h3 {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-display);
}
.cmd-panel-head .icon { width: 22px; height: 22px; }

.cmd-device-grid { display: grid; gap: 0.55rem; }

.cmd-device {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid rgba(36, 48, 73, 0.85);
}

.cmd-device-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(18, 26, 44, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.cmd-device-icon .icon { width: 22px; height: 22px; }
.cmd-device-info .name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.cmd-device-info .code { margin-top: 0.15rem; font-size: 0.72rem; color: var(--dim); }

.cmd-live-list { display: grid; gap: 0.55rem; }

.cmd-live-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid rgba(36, 48, 73, 0.85);
}

.cmd-live-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(18, 26, 44, 0.95);
  border: 1px solid rgba(36, 48, 73, 0.9);
}
.cmd-live-item.entry .cmd-live-ico { border-color: rgba(34, 197, 94, 0.4); }
.cmd-live-item.match .cmd-live-ico { border-color: rgba(37, 99, 235, 0.4); }
.cmd-live-item.alert .cmd-live-ico { border-color: rgba(245, 158, 11, 0.45); }
.cmd-live-ico .icon { width: 20px; height: 20px; }

.cmd-live-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.cmd-live-text strong { font-size: 0.9rem; font-weight: 800; }
.cmd-live-text span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-live-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}
.cmd-live-item time { font-size: 0.72rem; color: var(--dim); }

.cmd-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.7rem;
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.72);
  border: 1px solid rgba(36, 48, 73, 0.8);
}

.cmd-flow-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 11px;
  background: rgba(18, 26, 44, 0.9);
  border: 1px solid rgba(71, 85, 105, 0.45);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.cmd-flow-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(7, 11, 20, 0.8);
}
.cmd-flow-ico .icon { width: 16px; height: 16px; }
.cmd-flow-step.cyan { color: var(--cyan); border-color: rgba(6, 182, 212, 0.35); }
.cmd-flow-step.core {
  color: #93C5FD;
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.14);
}
.cmd-flow-step.green { color: #86EFAC; border-color: rgba(34, 197, 94, 0.35); }
.cmd-flow-arrow {
  align-self: center;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.scene.active .cmd-kpi { opacity: 0; animation: fadeUp 0.55s var(--ease) forwards; }
.scene.active .cmd-kpi:nth-child(1) { animation-delay: 0.1s; }
.scene.active .cmd-kpi:nth-child(2) { animation-delay: 0.2s; }
.scene.active .cmd-kpi:nth-child(3) { animation-delay: 0.3s; }
.scene.active .cmd-kpi:nth-child(4) { animation-delay: 0.4s; }
.scene.active .cmd-panel { opacity: 0; animation: fadeUp 0.55s var(--ease) forwards; }
.scene.active .cmd-main .cmd-panel:nth-child(1) { animation-delay: 0.45s; }
.scene.active .cmd-main .cmd-panel:nth-child(2) { animation-delay: 0.55s; }
.scene.active .cmd-flow { opacity: 0; animation: fadeUp 0.55s var(--ease) 0.65s forwards; }

@media (max-width: 980px) {
  .cmd-kpi-row, .cmd-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cmd-kpi-row, .cmd-main { grid-template-columns: 1fr; }
}

/* ---------- Registration ---------- */
#scene-registration.scene {
  align-items: flex-start;
  padding-top: 4.5rem;
  padding-bottom: 6.2rem;
  overflow: auto;
}

.reg-inner { width: min(1180px, 100%); }
.reg-inner .scene-title { margin-bottom: 0.9rem; }

.reg-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1rem;
  align-items: stretch;
}

.reg-form-panel,
.reg-qr-panel {
  border-radius: 18px;
  padding: 1.05rem 1.1rem;
  background:
    linear-gradient(160deg, rgba(36, 52, 78, 0.5), rgba(10, 16, 28, 0.94));
  border: 1px solid rgba(58, 78, 110, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 16px 36px rgba(0, 0, 0, 0.28);
}

.reg-panel-head,
.reg-qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.reg-panel-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.reg-panel-title h3,
.reg-qr-head h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}

.reg-panel-title p {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.reg-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(11, 18, 32, 0.8);
  border: 1px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.15);
}
.reg-ico .icon { width: 22px; height: 22px; }

.reg-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.reg-field label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.reg-field label .icon { width: 14px; height: 14px; opacity: 0.85; }

.reg-input {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 11px;
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid rgba(42, 58, 82, 0.95);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.reg-input.typing {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.12), inset 0 0 12px rgba(6, 182, 212, 0.05);
}

.reg-input.typing::after {
  content: "";
  width: 2px;
  height: 1em;
  margin-inline-start: 0.2rem;
  background: var(--cyan);
  animation: blink 0.9s step-end infinite;
}

.reg-input-plate { padding-block: 0.4rem; }

.reg-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

.reg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s, box-shadow 0.2s;
}

.reg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.reg-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.reg-btn .icon { width: 18px; height: 18px; }

.reg-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.75));
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.reg-btn.whatsapp {
  color: #ECFDF5;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.95), rgba(34, 197, 94, 0.75));
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.22);
}

.reg-wa-status {
  margin-top: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #86EFAC;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.reg-qr-panel {
  display: flex;
  flex-direction: column;
}

.reg-qr-stage {
  position: relative;
  flex: 1;
  min-height: 280px;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.65);
  border: 1px solid rgba(36, 48, 73, 0.9);
  overflow: hidden;
}

.reg-qr-waiting,
.reg-qr-generating,
.reg-qr-ready {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.reg-qr-stage[data-state="waiting"] .reg-qr-waiting,
.reg-qr-stage[data-state="generating"] .reg-qr-generating,
.reg-qr-stage[data-state="ready"] .reg-qr-ready {
  opacity: 1;
  visibility: visible;
}

.reg-qr-waiting p,
.reg-qr-generating p {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  max-width: 16rem;
}

.reg-qr-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed rgba(100, 116, 139, 0.55);
  animation: spinSlow 8s linear infinite;
}

.reg-qr-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}

.reg-pass-card {
  width: min(240px, 100%);
  padding: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(165deg, #1a2740, #0d1524);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(6, 182, 212, 0.12);
  text-align: center;
  animation: fadeUp 0.55s var(--ease);
}

.reg-pass-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
}
.reg-pass-top .en { color: var(--cyan); letter-spacing: 0.12em; }
.reg-pass-top .ok { color: var(--green); }

.reg-pass-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.reg-pass-meta {
  margin-top: 0.2rem;
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.reg-qr-code {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.reg-qr-code svg { width: 100%; height: 100%; display: block; }
.reg-qr-code .scan-beam {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06B6D4, transparent);
  animation: scanLine 2s ease-in-out infinite;
}

.reg-pass-id {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--cyan);
}

.reg-side-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.reg-side-facts > div {
  padding: 0.55rem 0.45rem;
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid rgba(36, 48, 73, 0.85);
  text-align: center;
}
.reg-side-facts span {
  display: block;
  font-size: 0.68rem;
  color: var(--dim);
  margin-bottom: 0.2rem;
}
.reg-side-facts strong {
  font-size: 0.78rem;
  font-weight: 800;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.scene.active .reg-form-panel,
.scene.active .reg-qr-panel {
  opacity: 0;
  animation: fadeUp 0.55s var(--ease) forwards;
}
.scene.active .reg-form-panel { animation-delay: 0.12s; }
.scene.active .reg-qr-panel { animation-delay: 0.28s; }

@media (max-width: 980px) {
  .reg-layout { grid-template-columns: 1fr; }
  .reg-actions { grid-template-columns: 1fr; }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.field .input {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 2.35rem;
  position: relative;
  overflow: hidden;
}

.field .input.mono { letter-spacing: 0.04em; }

.field .input.typing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.07), transparent);
  animation: scanSweep 1.8s ease-in-out infinite;
}

.scene.active .field .input { animation: fieldFill 0.45s var(--ease) both; }
.scene.active .field:nth-child(1) .input { animation-delay: 0.25s; }
.scene.active .field:nth-child(2) .input { animation-delay: 0.45s; }
.scene.active .field:nth-child(3) .input { animation-delay: 0.65s; }
.scene.active .field:nth-child(4) .input { animation-delay: 0.85s; }
.scene.active .field:nth-child(5) .input { animation-delay: 1.05s; }
.scene.active .field:nth-child(6) .input { animation-delay: 1.25s; }
.scene.active .field:nth-child(7) .input { animation-delay: 1.45s; }

.btn-primary {
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.48);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(6, 182, 212, 0.16));
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  opacity: 0;
}

.scene.active .btn-primary {
  animation: fadeUp 0.55s 1.8s var(--ease) forwards;
}

.reg-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.mini-note {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid rgba(6, 182, 212, 0.22);
  background: rgba(6, 182, 212, 0.06);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.mini-note strong { color: var(--cyan); }

/* ---------- QR Pass ---------- */
.pass-wrap {
  display: flex;
  justify-content: center;
}

.qr-pass {
  width: min(400px, 100%);
  padding: 1.35rem;
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(30, 42, 61, 0.95), rgba(11, 18, 32, 0.98));
  border: 1px solid rgba(37, 99, 235, 0.38);
  box-shadow: var(--glow-blue), 0 28px 64px rgba(0, 0, 0, 0.48);
  position: relative;
  overflow: hidden;
  animation: passIn 1s var(--ease) both;
}

.qr-pass::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
}

.qr-pass::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%);
  pointer-events: none;
}

.pass-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.pass-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}

.pass-brand span {
  display: block;
  font-size: 0.65rem;
  color: var(--cyan);
  letter-spacing: 0.18em;
  font-weight: 600;
  font-family: var(--font-mono);
}

.pass-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.pass-fields { display: grid; gap: 0.4rem; }

.pass-row {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.pass-row .k { font-size: 0.65rem; color: var(--dim); }
.pass-row .v { font-size: 0.88rem; font-weight: 700; }
.pass-row .v.mono { font-size: 0.85rem; letter-spacing: 0.04em; }

.qr-box {
  width: 112px;
  height: 112px;
  border-radius: 10px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.qr-box svg { width: 100%; height: 100%; display: block; }

.qr-box .scan-beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  animation: scanLine 2s ease-in-out infinite;
  top: 0;
  opacity: 0.85;
  pointer-events: none;
}

.pass-footer {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

.pass-id {
  font-family: var(--font-mono);
  direction: ltr;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Checkpoint / Arrival ---------- */
.checkpoint {
  position: relative;
  min-height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #101827, #070b12);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.4);
}

.checkpoint svg { width: 100%; height: 100%; display: block; }

.overlay-stack {
  position: absolute;
  inset: auto 1rem 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 240px;
  z-index: 2;
}

.float-chip {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.92);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  transform: translateX(-10px);
}

.scene.active .float-chip { animation: chipIn 0.55s var(--ease) forwards; }
.scene.active .float-chip:nth-child(1) { animation-delay: 0.35s; }
.scene.active .float-chip:nth-child(2) { animation-delay: 0.7s; }

.float-chip .meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
}

.float-chip .meta .eg-plate { margin-top: 0.15rem; }

.float-chip > div { flex: 1; }

/* ---------- LPR ---------- */
.lpr-layout {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.lpr-cam-hero {
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--border);
}

.lpr-cam-hero svg {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

.lpr-cam-hero .cam-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.lpr-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.38);
  background: #080d14;
  min-height: 280px;
  box-shadow: var(--glow-cyan);
}

.lpr-frame svg { width: 100%; height: 100%; display: block; }

.lpr-frame::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: scanLine 2.4s ease-in-out infinite;
  top: 0;
  opacity: 0.8;
  pointer-events: none;
  z-index: 2;
}

.lpr-box-pulse {
  animation: lprPulse 2.2s ease-in-out infinite;
}

.lpr-meta {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.plate-big {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.85rem;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(6, 182, 212, 0.1), transparent 70%),
    rgba(11, 18, 32, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.conf-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(36, 48, 73, 0.9);
  overflow: hidden;
}

.conf-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.scene.active .conf-bar > span {
  animation: confFill 1.5s 0.5s var(--ease) forwards;
}

.match-list { display: grid; gap: 0.45rem; }

.match-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(18, 26, 44, 0.75);
  border: 1px solid var(--border-soft);
  font-size: 0.8rem;
}

.match-item .ok { color: var(--green); font-weight: 700; }

/* ---------- QR Scan ---------- */
.reader-ui {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

.reader-device {
  width: 168px;
  padding: 1rem 0.85rem 1.1rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #1e2a3d 0%, #121a2c 40%, #0d1422 100%);
  border: 1px solid var(--steel-hi);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  position: relative;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.reader-device::before {
  content: "";
  position: absolute;
  top: 10px;
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: #334155;
}

.reader-screen {
  width: 118px;
  height: 118px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
  box-shadow: inset 0 0 0 2px #0B1220;
}

.reader-screen::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--blue);
  animation: scanLine 1.8s ease-in-out infinite;
  top: 0;
  z-index: 2;
}

.reader-screen svg { width: 100%; height: 100%; display: block; }

.reader-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.visitor-card-mini .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(36, 48, 73, 0.65);
  font-size: 0.85rem;
}

.visitor-card-mini .row:last-child { border-bottom: none; }
.visitor-card-mini .k { color: var(--muted); }
.visitor-card-mini .v { font-weight: 700; }
.visitor-card-mini .v.mono { letter-spacing: 0.03em; }

/* ---------- Verification ---------- */
.verify-stage {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.verify-cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin: 1.3rem 0;
}

.verify-box {
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.verify-box .tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.verify-box .val {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  direction: ltr;
  letter-spacing: 0.04em;
}

.verify-mid {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: var(--green);
  animation: popIn 0.55s 0.7s var(--ease) both;
  box-shadow: var(--glow-green);
}

.verify-mid .icon { width: 28px; height: 28px; }

.verify-result {
  margin-top: 0.35rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.38);
  box-shadow: var(--glow-green);
  animation: fadeUp 0.65s 1.1s var(--ease) both;
}

.verify-result h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--green);
}

.verify-result p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.monitor-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--dim);
  line-height: 1.5;
}

/* ---------- Entry / Exit ---------- */
.event-board {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.event-banner {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 197, 94, 0.38);
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.1), rgba(18, 26, 44, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.event-banner.exit {
  border-color: rgba(37, 99, 235, 0.38);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.1), rgba(18, 26, 44, 0.92));
}

.event-banner h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-banner.entry h3 { color: var(--green); }
.event-banner.exit h3 { color: var(--blue); }

.event-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1rem;
  font-size: 0.85rem;
}

.event-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.event-meta span { color: var(--muted); font-size: 0.7rem; }
.event-meta strong { font-weight: 700; }
.event-meta strong.mono { letter-spacing: 0.04em; }

.counters { display: grid; gap: 0.75rem; }

.counter-card {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.counter-card .label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.counter-card .nums {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-mono);
  direction: ltr;
}

.counter-card .from {
  font-size: 1.25rem;
  color: var(--dim);
  font-weight: 700;
}

.counter-card .arrow { color: var(--cyan); font-size: 1rem; }

.counter-card .to {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.counter-card .to.bump {
  animation: countBump 0.55s var(--ease);
}

/* ---------- Dashboard ---------- */
.dash-block {
  margin-bottom: 1rem;
}

.dash-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.55rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kpi {
  padding: 1.1rem 0.9rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(36, 48, 73, 0.5), rgba(11, 18, 32, 0.9));
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(10px);
}

.scene.active .kpi { animation: fadeUp 0.5s var(--ease) forwards; }
.scene.active .grid-4 .kpi:nth-child(1) { animation-delay: 0.15s; }
.scene.active .grid-4 .kpi:nth-child(2) { animation-delay: 0.28s; }
.scene.active .grid-4 .kpi:nth-child(3) { animation-delay: 0.4s; }
.scene.active .grid-4 .kpi:nth-child(4) { animation-delay: 0.52s; }
.scene.active .grid-3 .kpi:nth-child(1) { animation-delay: 0.7s; }
.scene.active .grid-3 .kpi:nth-child(2) { animation-delay: 0.85s; }
.scene.active .grid-3 .kpi:nth-child(3) { animation-delay: 1s; }

.kpi .ico {
  margin-bottom: 0.45rem;
  width: 40px;
  height: 40px;
  margin-inline: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(148, 163, 184, 0.28), transparent 45%),
    linear-gradient(145deg, #2f405c, #121a2c);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.12),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

.kpi .ico .icon-kpi {
  width: 22px;
  height: 22px;
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.2));
}

.kpi .n {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 800;
  font-family: var(--font-mono);
  direction: ltr;
  line-height: 1;
  letter-spacing: -0.02em;
}

.kpi .l {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.kpi.people .n { color: var(--blue); text-shadow: 0 0 16px rgba(37, 99, 235, 0.25); }
.kpi.vehicles .n { color: var(--cyan); text-shadow: 0 0 16px rgba(6, 182, 212, 0.22); }
.kpi.methods .n { color: var(--amber); text-shadow: 0 0 14px rgba(245, 158, 11, 0.2); }
.kpi.people .ico { box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12), 0 0 12px rgba(37, 99, 235, 0.15); }
.kpi.vehicles .ico { box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12), 0 0 12px rgba(6, 182, 212, 0.15); }
.kpi.methods .ico { box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.12), 0 0 12px rgba(245, 158, 11, 0.12); }

.feed-list {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.4rem;
}

.feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.72);
  border: 1px solid var(--border-soft);
  font-size: 0.8rem;
}

.feed-item .who {
  font-weight: 700;
  min-width: 7.5rem;
  display: flex;
  align-items: center;
}
.feed-item .who.mono { font-family: var(--font-mono); direction: ltr; }
.feed-item .act { color: var(--muted); flex: 1; text-align: start; }
.feed-item .t { font-family: var(--font-mono); direction: ltr; color: var(--dim); font-size: 0.72rem; }

/* ---------- Unknown / Exception ---------- */
.alert-panel {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.1);
}

.alert-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.alert-title h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--amber);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.action-btn {
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 44, 0.95);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: default;
}

.action-btn.primary {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

.action-btn.info {
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(37, 99, 235, 0.1);
  color: #93c5fd;
}

.no-control-note {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--dim);
  line-height: 1.45;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid rgba(36, 48, 73, 0.75);
}

/* ---------- Inside now ---------- */
.inside-hero {
  text-align: center;
  margin-bottom: 1.15rem;
}

.inside-nums {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 0.9rem;
}

.inside-nums .block {
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--border);
  min-width: 140px;
}

.inside-nums .block .n {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  direction: ltr;
  line-height: 1;
  letter-spacing: -0.03em;
}

.inside-nums .block .l {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.ahmed-card {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid rgba(34, 197, 94, 0.32);
  box-shadow: var(--glow-green);
  animation: fadeUp 0.75s 0.35s var(--ease) both;
}

.ahmed-card .name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ahmed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.84rem;
}

.ahmed-grid .k { color: var(--dim); font-size: 0.68rem; display: block; }
.ahmed-grid .v { font-weight: 700; }
.ahmed-grid .v.mono { letter-spacing: 0.03em; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding-right: 0.4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  right: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--cyan), var(--green));
  opacity: 0.5;
}

.tl-item {
  position: relative;
  padding: 0.45rem 2rem 0.45rem 0.4rem;
  opacity: 0;
  transform: translateY(8px);
}

.scene.active .tl-item { animation: fadeUp 0.5s var(--ease) forwards; }
.scene.active .tl-item:nth-child(1) { animation-delay: 0.1s; }
.scene.active .tl-item:nth-child(2) { animation-delay: 0.25s; }
.scene.active .tl-item:nth-child(3) { animation-delay: 0.4s; }
.scene.active .tl-item:nth-child(4) { animation-delay: 0.55s; }
.scene.active .tl-item:nth-child(5) { animation-delay: 0.7s; }
.scene.active .tl-item:nth-child(6) { animation-delay: 0.85s; }
.scene.active .tl-item:nth-child(7) { animation-delay: 1s; }

.tl-item::before {
  content: "";
  position: absolute;
  right: 9px;
  top: 0.75rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--navy);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.tl-item.verify::before { background: var(--green); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3); }
.tl-item.lpr::before { background: var(--cyan); box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.3); }
.tl-item.exit::before { background: var(--blue); }

.tl-item .t {
  font-size: 0.68rem;
  color: var(--dim);
  font-family: var(--font-mono);
  direction: ltr;
  display: block;
  margin-bottom: 0.1rem;
}

.tl-item .e {
  font-size: 0.9rem;
  font-weight: 700;
}

.tl-item .d {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ---------- Closing ---------- */
.closing {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.closing .open-logo {
  animation: logoPulse 3s ease-in-out infinite;
}

.closing-lines {
  margin-top: 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.85;
  animation: fadeUp 1s 0.25s var(--ease) both;
}

.closing-final {
  margin-top: 1.2rem;
  font-size: 1rem;
  color: var(--cyan);
  font-weight: 600;
  animation: fadeUp 1s 0.6s var(--ease) both;
}

.closing-arch {
  margin-top: 1.4rem;
  animation: fadeUp 1s 0.9s var(--ease) both;
}

/* ---------- Captions / Progress / Controls ---------- */
.captions {
  position: absolute;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  z-index: 35;
  width: min(820px, calc(100% - 2rem));
  padding: 0.7rem 1.05rem;
  border-radius: var(--radius);
  background: rgba(7, 11, 20, 0.9);
  border: 1px solid rgba(36, 48, 73, 0.85);
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s;
  backdrop-filter: blur(12px);
}

.captions.visible { opacity: 1; }

.captions #voText {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
}

.progress {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 3.5rem;
  z-index: 36;
  opacity: 0;
  transition: opacity 0.4s;
}

.progress.visible { opacity: 1; }

.progress-track {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(36, 48, 73, 0.9);
  cursor: pointer;
  overflow: visible;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.1s linear;
}

.progress-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.progress-marks span {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 7px;
  margin-top: -3.5px;
  background: rgba(148, 163, 184, 0.4);
  transform: translateX(50%);
}

.time-readout {
  margin-top: 0.3rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--dim);
  font-family: var(--font-mono);
  direction: ltr;
}

.controls {
  position: absolute;
  left: 50%;
  bottom: 0.8rem;
  transform: translateX(-50%);
  z-index: 37;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.4s;
}

.controls.visible { opacity: 1; }

.ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 44, 0.92);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.ctrl-btn:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.42);
}

.ctrl-btn svg { width: 15px; height: 15px; fill: currentColor; }
.ctrl-btn.play-toggle { width: 46px; height: 38px; }

.scene-dots {
  display: flex;
  gap: 4px;
  margin-inline: 0.3rem;
  max-width: 220px;
  flex-wrap: wrap;
  justify-content: center;
}

.scene-dots button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(100, 116, 139, 0.5);
  cursor: pointer;
  padding: 0;
}

.scene-dots button.active {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.45);
}

.hint-keys {
  position: absolute;
  bottom: 0.9rem;
  left: 1.4rem;
  z-index: 37;
  font-size: 0.65rem;
  color: var(--dim);
  opacity: 0;
  transition: opacity 0.4s;
  font-family: var(--font-mono);
  direction: ltr;
}

.hint-keys.visible { opacity: 1; }

/* ---------- Animations ---------- */
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 8px 24px rgba(37, 99, 235, 0.28)); transform: scale(1); }
  50% { filter: drop-shadow(0 10px 30px rgba(6, 182, 212, 0.35)); transform: scale(1.025); }
}

@keyframes logoIn {
  from { opacity: 0; transform: scale(0.88) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scanSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fieldFill {
  from { opacity: 0.35; border-color: rgba(37, 99, 235, 0.45); }
  to { opacity: 1; border-color: var(--border); }
}

@keyframes passIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chipIn {
  to { opacity: 1; transform: none; }
}

@keyframes scanLine {
  0% { top: 8%; opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.85; }
  100% { top: 88%; opacity: 0; }
}

@keyframes confFill {
  from { width: 0; }
  to { width: 98.7%; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes countBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); color: var(--green); }
  100% { transform: scale(1); }
}

@keyframes vehicleApproach {
  from { transform: translateX(-36px); opacity: 0.35; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes lprPulse {
  0%, 100% { stroke-opacity: 0.55; }
  50% { stroke-opacity: 1; }
}

.scene.active .veh-move {
  animation: vehicleApproach 2.2s var(--ease) both;
}

/* ---------- Egyptian license plates ---------- */
.eg-plate {
  --eg-face: #f3f3ee;
  --eg-face-hi: #fafaf6;
  --eg-ink: #141414;
  --eg-stripe: #1a4f9c;
  --eg-stripe-hi: #2a6bc4;
  --eg-stripe-lo: #123a78;
  --eg-metal: #2c2c2c;
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  direction: ltr;
  unicode-bidi: isolate;
  vertical-align: middle;
  background: var(--eg-face);
  border: 1.5px solid var(--eg-metal);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 10px rgba(0, 0, 0, 0.35);
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  line-height: 1;
  flex-shrink: 0;
}

.eg-plate::before,
.eg-plate::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4d4d4, #6b6b6b 55%, #3a3a3a);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}
.eg-plate::before { left: 3px; }
.eg-plate::after { right: 3px; }

.eg-stripe {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  padding: 0.2em 0.28em;
  min-width: 1.55em;
  background: linear-gradient(180deg, var(--eg-stripe-hi), var(--eg-stripe) 45%, var(--eg-stripe-lo));
  color: #fff;
  font-weight: 800;
  font-size: 0.55em;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  border-inline-end: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12);
}

.eg-stripe .eg-sub {
  font-size: 0.92em;
  font-weight: 700;
  opacity: 0.95;
}

.eg-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  padding: 0.22em 0.7em 0.18em;
  background:
    linear-gradient(180deg, var(--eg-face-hi) 0%, var(--eg-face) 55%, #e8e8e2 100%);
  color: var(--eg-ink);
  min-width: 3.6em;
}

.eg-letters {
  font-weight: 800;
  font-size: 0.72em;
  letter-spacing: 0.22em;
  direction: rtl;
  unicode-bidi: isolate;
}

.eg-nums {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95em;
  letter-spacing: 0.14em;
  direction: ltr;
  unicode-bidi: isolate;
}

.eg-plate--sm {
  font-size: 11px;
  border-radius: 2px;
}
.eg-plate--sm .eg-face { padding: 0.12em 0.45em 0.1em; min-width: 3.2em; }
.eg-plate--sm .eg-stripe { min-width: 1.35em; padding: 0.1em 0.18em; }
.eg-plate--sm::before,
.eg-plate--sm::after { width: 2.5px; height: 2.5px; left: 2px; }
.eg-plate--sm::after { left: auto; right: 2px; }

.eg-plate--md {
  font-size: 15px;
}
.eg-plate--md .eg-face { padding: 0.2em 0.65em 0.16em; }

.eg-plate--lg {
  font-size: 26px;
  border-width: 2px;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(6, 182, 212, 0.12);
}
.eg-plate--lg .eg-face { padding: 0.28em 0.85em 0.22em; min-width: 4.2em; }
.eg-plate--lg .eg-stripe { min-width: 1.7em; padding: 0.28em 0.35em; }
.eg-plate--lg::before,
.eg-plate--lg::after { width: 6px; height: 6px; left: 5px; }
.eg-plate--lg::after { left: auto; right: 5px; }

.eg-plate--warn {
  --eg-stripe: #b45309;
  --eg-stripe-hi: #d97706;
  --eg-stripe-lo: #92400e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(245, 158, 11, 0.35),
    0 0 16px rgba(245, 158, 11, 0.22),
    0 3px 10px rgba(0, 0, 0, 0.35);
}

.field .input.input-plate {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.4rem 0.65rem;
}

.pass-row .v.v-plate,
.visitor-card-mini .v.v-plate,
.event-meta .v-plate,
.ahmed-grid .v.v-plate {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.verify-box .val.val-plate {
  font-size: inherit;
  letter-spacing: normal;
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}

.tl-item .d {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.overlay-stack { max-width: 260px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-2, .cmd-layout, .event-board, .reader-ui, .verify-cols, .lpr-layout {
    grid-template-columns: 1fr;
  }
  .lpr-cam-hero { width: 100%; flex-direction: row; justify-content: flex-start; padding: 0.75rem 1rem; }
  .lpr-cam-hero svg { width: 72px; }
  .verify-mid { margin: 0.35rem auto; }
  .grid-3, .grid-4, .questions { grid-template-columns: 1fr 1fr; }
  .form-grid, .event-meta { grid-template-columns: 1fr; }
  .overlay-stack { position: relative; inset: auto; max-width: none; margin-top: 0.75rem; }
  .checkpoint { min-height: 240px; }
  .hint-keys { display: none; }
}

@media (max-width: 640px) {
  .scene { padding: 4.4rem 1rem 7.8rem; }
  .chrome-meta .badge.live { display: none; }
  .grid-3, .grid-4, .ahmed-grid, .cmd-stats, .questions { grid-template-columns: 1fr; }
  .captions { bottom: 6rem; }
  .inside-nums { gap: 1rem; }
  .inside-nums .block .n { font-size: 2.2rem; }
  .kpi .n { font-size: 1.6rem; }
}
