:root {
  --bg-dark: #0b1120;
  --bg-card: #1e293b;
  --border: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #eab308;
  --accent-bright: #facc15;
  --orange: #ea580c;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #38bdf8;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: radial-gradient(circle at top right, #1f2937 0%, var(--bg-dark) 55%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;
}

/* ==================== CLEAN WHITE BANNER ==================== */
.brand-banner {
  background: #ffffff;
  border-bottom: 4px solid var(--accent);
  padding: 12px 28px;
}

.brand-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.banner-logo-right { height: 60px; width: auto; display: block; }

.portal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
}

.portal-back-link:hover { border-color: var(--accent); background: #fefce8; }

.banner-center-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.banner-kicker { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; color: #475569; }
.banner-main-title { font-size: 20px; font-weight: 900; letter-spacing: 0.8px; color: #0f172a; }

@media (max-width: 780px) {
  .banner-center-title { display: none; }
  .banner-logo-right { height: 42px; }
}

/* ==================== TOPBAR ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 24px;
  background: rgba(11, 17, 32, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-icon {
  font-size: 26px;
  background: linear-gradient(135deg, #ca8a04, var(--accent-bright));
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 15px; font-weight: 900; color: var(--accent-bright); }
.brand-sub { font-size: 12px; color: var(--text-muted); }

.nav-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.nav-pill {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.nav-pill:hover { color: var(--text-main); border-color: var(--accent-bright); }
.nav-pill.active {
  background: linear-gradient(135deg, #ca8a04, var(--accent-bright));
  color: #0b1120;
  border-color: transparent;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.score-pill {
  background: rgba(250, 204, 21, 0.16);
  border: 2px solid var(--accent-bright);
  color: var(--accent-bright);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 17px;
  cursor: pointer;
}

/* ==================== MAIN & BUTTONS ==================== */
.main-container { max-width: 1440px; margin: 0 auto; padding: 24px 28px 40px; }
.module { display: none; animation: fadeIn 0.25s ease; }
.module.active { display: block; }
.hidden { display: none !important; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.14s, filter 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 15px 24px; font-size: 17px; }
.btn-primary { background: linear-gradient(135deg, #ca8a04, var(--accent-bright)); color: #0b1120; }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent-bright); }
.btn-outline { background: transparent; color: var(--text-main); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent-bright); }
.btn-success { background: var(--green); color: #052e16; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #ef4444); color: #ffffff; box-shadow: 0 0 24px rgba(239, 68, 68, 0.5); }

/* ==================== HOME ==================== */
.hero-banner {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(30, 41, 59, 0.92));
  border: 2px solid rgba(250, 204, 21, 0.35);
  border-radius: 20px;
  padding: 36px 40px;
  text-align: center;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.18);
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.hero-banner h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 900; margin-bottom: 12px; }
.hero-banner .highlight { color: var(--accent-bright); }
.hero-lead { font-size: 18px; color: #cbd5e1; margin-bottom: 24px; font-weight: 600; }
.hero-cta-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-bottom: 22px; }
.module-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}
.module-card:hover { transform: translateY(-4px); border-color: var(--accent-bright); }
.card-accent { border-color: rgba(250, 204, 21, 0.55); background: linear-gradient(160deg, rgba(234, 179, 8, 0.14), var(--bg-card)); }
.card-num { position: absolute; top: 16px; right: 18px; font-size: 26px; font-weight: 900; color: rgba(148, 163, 184, 0.22); }
.card-icon { font-size: 36px; }
.module-card h3 { font-size: 19px; }
.module-card p { font-size: 14px; color: var(--text-muted); flex: 1; }
.card-tag { align-self: flex-start; background: rgba(56, 189, 248, 0.14); color: var(--blue); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }

.presenter-tip { background: rgba(30, 41, 59, 0.75); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; text-align: center; font-size: 14px; color: var(--text-muted); }
kbd { background: #0f172a; border: 1px solid #475569; border-radius: 5px; padding: 2px 7px; font-family: monospace; color: var(--accent-bright); font-weight: 700; }

/* ==================== HEADERS & SLIDES ==================== */
.module-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--accent-bright); margin-bottom: 4px; }
.module-header h2 { font-size: clamp(22px, 2.5vw, 30px); font-weight: 900; }
.header-controls, .case-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-counter { font-size: 16px; font-weight: 800; color: var(--accent-bright); }

.chapter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chapter-pill { background: var(--bg-card); color: var(--text-muted); border: 1.5px solid var(--border); padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; }
.chapter-pill.active { background: rgba(250, 204, 21, 0.2); border-color: var(--accent-bright); color: var(--accent-bright); }

.slide-stage { background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%); border: 2px solid var(--border); border-radius: 20px; padding: 34px 40px; box-shadow: var(--shadow); min-height: 480px; display: flex; flex-direction: column; justify-content: space-between; }
.slide-top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.slide-badge { display: inline-block; background: rgba(250, 204, 21, 0.18); color: var(--accent-bright); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 900; }
.slide-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

.slide-visual-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  min-height: 170px;
  overflow: hidden;
}

.slide-photo-thumb {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.slide-sign-thumb {
  height: 130px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.slide-title { font-size: clamp(26px, 3vw, 36px); font-weight: 900; margin-bottom: 10px; line-height: 1.15; }
.slide-subtitle { font-size: 17px; color: #cbd5e1; margin-bottom: 0; }
.slide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.slide-card { background: rgba(15, 23, 42, 0.8); border: 1.5px solid var(--border); border-top: 4px solid var(--accent-bright); border-radius: 14px; padding: 20px; }
.slide-card-icon { font-size: 34px; margin-bottom: 8px; }
.slide-card h4 { font-size: 18px; font-weight: 800; color: var(--accent-bright); margin-bottom: 8px; }
.slide-card p { font-size: 15px; color: #e2e8f0; line-height: 1.5; }
.slide-footer-tip { background: rgba(56, 189, 248, 0.14); border-left: 5px solid var(--blue); border-radius: 10px; padding: 14px 18px; font-size: 16px; font-weight: 700; color: #e0f2fe; }
.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.slide-dot { width: 12px; height: 12px; border-radius: 999px; border: none; background: var(--border); cursor: pointer; }
.slide-dot.active { width: 32px; background: var(--accent-bright); }

/* ==================== MODULE 1: IMPAIRED VISION SIMULATOR ==================== */
.tab-switcher { display: flex; gap: 8px; background: var(--bg-card); padding: 6px; border-radius: 12px; border: 1px solid var(--border); }
.tab-btn { background: transparent; color: var(--text-muted); border: none; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 800; cursor: pointer; }
.tab-btn.active { background: var(--accent-bright); color: #0b1120; }
.subtab { display: none; }
.subtab.active { display: block; }

.vision-mode-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.mode-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.mode-btn.active { border-color: var(--accent-bright); background: rgba(250, 204, 21, 0.18); color: var(--accent-bright); }

.vision-layout, .blind-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }

.windshield-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--border);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.road-svg, .real-photo { width: 100%; height: auto; display: block; }

.windshield-scene {
  position: relative;
}

.pov-callout {
  position: absolute;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.4px;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.callout-ped { top: 44%; left: 42%; background: rgba(220, 38, 38, 0.88); }
.callout-bike { top: 62%; right: 6%; background: rgba(234, 88, 12, 0.9); }
.callout-moto { top: 58%; left: 7%; background: rgba(239, 68, 68, 0.88); }

.photo-overlay-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
}

.blind-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Alcohol visual simulation: blur + double vision + sway */
.windshield-scene.fx-alcohol {
  filter: blur(4px) contrast(1.15);
  animation: alcoholSway 2.4s infinite ease-in-out;
}

@keyframes alcoholSway {
  0%, 100% { transform: scale(1.06) rotate(-1.6deg) translateX(-6px); }
  50% { transform: scale(1.06) rotate(1.6deg) translateX(6px); }
}

.overlay-tunnel {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 22%, rgba(0, 0, 0, 0.88) 68%, rgba(0, 0, 0, 0.98) 100%);
}

/* Fatigue visual simulation: heavy blur + closing eyelids microsleep */
.windshield-scene.fx-fatigue {
  filter: blur(2.5px) brightness(0.75);
}

.overlay-eyelids {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eyelid-top, .eyelid-bottom {
  position: absolute;
  left: 0;
  right: 0;
  background: #020617;
  animation: microsleepClose 4.2s infinite ease-in-out;
}
.eyelid-top { top: 0; }
.eyelid-bottom { bottom: 0; }

@keyframes microsleepClose {
  0%, 25% { height: 0%; }
  48%, 72% { height: 52%; }
  100% { height: 0%; }
}

.microsleep-tag {
  position: relative;
  z-index: 5;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 16px;
}

/* Phone distraction overlay */
.overlay-phone {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.phone-mockup {
  background: #0f172a;
  border: 4px solid #64748b;
  border-radius: 22px;
  padding: 22px;
  max-width: 390px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}
.phone-bar { font-size: 14px; font-weight: 900; color: #4ade80; margin-bottom: 10px; }
.phone-msg { background: #1e293b; padding: 14px; border-radius: 12px; font-size: 16px; margin-bottom: 14px; }
.phone-warn { background: rgba(220, 38, 38, 0.85); color: #fff; padding: 12px; border-radius: 10px; font-size: 14px; }

.vision-stats-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.vision-stats-card h3 { font-size: 24px; margin-bottom: 12px; color: var(--accent-bright); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.stat-box { background: #0f172a; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px; }
.stat-box span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 700; }
.stat-box strong { font-size: 22px; font-weight: 900; color: var(--accent-bright); }
.vision-stats-card ul { margin-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }

.blind-zone { cursor: pointer; opacity: 0.82; transition: opacity 0.18s; }
.blind-zone:hover, .blind-zone.active-blind { opacity: 1; }

/* ==================== MODULE 2: REACTION GAME ==================== */
.rx-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; align-items: start; }

.rx-arena {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  border: 3px solid var(--border);
  border-radius: 20px;
  padding: 24px 28px;
  min-height: 490px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rx-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.25s ease, filter 0.25s ease;
}

@keyframes driveForward {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}

.rx-arena.state-wait .rx-bg-photo {
  animation: driveForward 4.5s linear infinite alternate;
}

.rx-arena.state-go .rx-bg-photo {
  transform: scale(1.06);
}

.rx-arena.state-impaired .rx-bg-photo {
  filter: blur(4px) contrast(1.1);
}

.rx-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.72) 0%, rgba(2, 6, 23, 0.25) 45%, rgba(2, 6, 23, 0.82) 100%);
  transition: background 0.15s;
}

.rx-arena.state-wait { border-color: var(--accent-bright); }
.rx-arena.state-go {
  border-color: #ef4444;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.7);
}
.rx-arena.state-go .rx-scrim {
  background: radial-gradient(circle at center, rgba(127, 29, 29, 0.15) 25%, rgba(185, 28, 28, 0.72) 100%);
}

@keyframes rxCrashShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-12px, -8px); }
  40% { transform: translate(12px, 8px); }
  60% { transform: translate(-8px, 6px); }
  80% { transform: translate(8px, -6px); }
}

.rx-arena.state-crash {
  animation: rxCrashShake 0.5s ease-in-out;
  border-color: #ef4444;
}

.rx-hud, .rx-display, .rx-controls {
  position: relative;
  z-index: 2;
}

.rx-hud { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 15px; }
.rx-speed-badge { background: rgba(15, 23, 42, 0.88); border: 1.5px solid var(--border); padding: 6px 14px; border-radius: 999px; font-weight: 800; color: #f8fafc; }
.rx-tag-sober { background: rgba(20, 83, 45, 0.9); border: 1px solid var(--green); color: #bbf7d0; padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: 13px; }
.rx-tag-impaired { background: rgba(127, 29, 29, 0.92); border: 1px solid var(--red); color: #fecaca; padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: 13px; }

.rx-display {
  text-align: center;
  padding: 18px 22px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  max-width: 640px;
  margin: 0 auto;
}

.rx-alert-pill {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.rx-display h3 { font-size: clamp(22px, 2.8vw, 30px); font-weight: 900; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(0,0,0,0.7); }
.rx-display p { font-size: 16px; color: #e2e8f0; }

.rx-controls { display: flex; justify-content: center; gap: 14px; }

.rx-sidebar { display: flex; flex-direction: column; gap: 16px; }
.rx-result-card, .rx-board-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 16px; padding: 20px; }
.rx-result-card h4, .rx-board-card h4 { font-size: 18px; color: var(--accent-bright); margin-bottom: 10px; }
.rx-history { display: flex; flex-direction: column; gap: 8px; }
.rx-row { background: #0f172a; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }

/* ==================== MODULE 3 & 4: SIGNALS & DECISIONS ==================== */
.case-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 20px; padding: 30px 34px; box-shadow: var(--shadow); }
.sig-card-layout, .visual-split-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
}

.sig-visual-box, .photo-hero-box {
  background: #0f172a;
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

.official-sign-stage {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  padding: 28px;
  min-height: 330px;
  flex-direction: column;
  gap: 12px;
}

.official-sign-img {
  max-height: 255px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.3));
}

.official-sign-code {
  background: #0f172a;
  color: #facc15;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.scene-photo-img {
  width: 100%;
  height: 100%;
  max-height: 410px;
  object-fit: cover;
  display: block;
}

.case-meta { display: flex; gap: 10px; margin-bottom: 12px; }
.case-tag { background: rgba(250, 204, 21, 0.2); color: var(--accent-bright); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; }
.case-area { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.case-title { font-size: clamp(24px, 3vw, 32px); font-weight: 900; margin-bottom: 12px; }
.case-scenario { font-size: 20px; color: #e2e8f0; background: #0f172a; border-left: 5px solid var(--accent-bright); padding: 18px 22px; border-radius: 12px; margin-bottom: 22px; line-height: 1.5; }

.case-vote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.vote-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; border-radius: 16px; border: 3px solid transparent; cursor: pointer; color: #fff; text-align: center; }
.vote-go { background: linear-gradient(135deg, #15803d, #166534); border-color: #22c55e; }
.vote-stop { background: linear-gradient(135deg, #dc2626, #991b1b); border-color: #f87171; }
.vote-opt-a { background: linear-gradient(135deg, #0369a1, #0c4a6e); border-color: #38bdf8; }
.vote-opt-b { background: linear-gradient(135deg, #b45309, #78350f); border-color: #fbbf24; }
.vote-emoji { font-size: 32px; }
.vote-label { font-size: 19px; font-weight: 900; }
.vote-sub { font-size: 13px; opacity: 0.9; }

.result-banner { padding: 16px 20px; border-radius: 12px; font-size: 19px; font-weight: 900; margin-bottom: 14px; }
.result-banner.correct { background: rgba(20, 83, 45, 0.7); border: 2px solid var(--green); color: #bbf7d0; }
.result-banner.wrong { background: rgba(127, 29, 29, 0.7); border: 2px solid var(--red); color: #fecaca; }
.result-col { background: #0f172a; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.result-col h4 { font-size: 16px; margin-bottom: 8px; color: var(--accent-bright); }
.result-col p { font-size: 16px; color: #e2e8f0; }

/* ==================== MODULE 5: PREOPERATIONAL ==================== */
.permit-sheet { background: var(--bg-card); border: 2px solid var(--border); border-radius: 18px; padding: 26px 30px; box-shadow: var(--shadow); }
.permit-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 18px; margin-bottom: 20px; }
.permit-title-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.permit-logo-pill {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.permit-gp-img {
  height: 46px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}
.permit-top h3 { font-size: 22px; font-weight: 900; color: var(--accent-bright); }
.permit-top p { color: var(--text-muted); font-size: 14px; }
.permit-stamp { padding: 12px 20px; border-radius: 12px; font-size: 15px; font-weight: 900; border: 3px dashed; }
.permit-stamp.pending { color: #fca5a5; border-color: var(--red); background: rgba(127, 29, 29, 0.4); }
.permit-stamp.approved { color: #bbf7d0; border-color: var(--green); border-style: solid; background: rgba(20, 83, 45, 0.7); }

.permit-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.permit-col { background: #0f172a; border: 1.5px solid var(--border); border-radius: 14px; padding: 18px; }
.permit-col h4 { font-size: 16px; color: var(--accent-bright); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.permit-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; margin-bottom: 8px; background: rgba(30, 41, 59, 0.55); border: 1px solid transparent; font-size: 14px; }
.permit-item:hover { border-color: var(--accent-bright); }
.permit-item.checked { background: rgba(20, 83, 45, 0.4); border-color: var(--green); color: #dcfce7; }
.permit-box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #64748b; display: grid; place-items: center; flex-shrink: 0; font-weight: 900; }
.permit-item.checked .permit-box { background: var(--green); border-color: var(--green); color: #052e16; }

.permit-bottom-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 2px solid var(--border); padding-top: 18px; }
.permit-progress-wrap { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 240px; }
.permit-progress-bar { flex: 1; height: 15px; background: #0f172a; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.permit-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-bright), var(--green)); transition: width 0.25s; }
.permit-watch-note { background: rgba(250, 204, 21, 0.14); border: 1px solid var(--accent-bright); color: #fef9c3; padding: 10px 16px; border-radius: 10px; font-size: 14px; }

.app-footer { text-align: center; padding: 14px 24px 26px; font-size: 13px; color: var(--text-muted); border-top: 1px solid rgba(51, 65, 85, 0.6); }
.app-footer strong { color: #e2e8f0; }

@media (max-width: 1024px) {
  .slide-hero-grid, .vision-layout, .blind-layout, .rx-layout, .sig-card-layout, .visual-split-card, .slide-cards, .permit-columns, .case-vote-row {
    grid-template-columns: 1fr;
  }
}
