@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #070c18;
  background-image: radial-gradient(circle at 50% 0%, #111f38 0%, #060911 100%);
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 1440px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: #38bdf8;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-audio {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-audio:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

.btn-abort {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-abort:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  font-size: 1.4rem;
  background: #1e293b;
  padding: 4px;
  border-radius: 50%;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}

.user-role {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* ==========================================================================
   Screen Transitions
   ========================================================================== */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

/* ==========================================================================
   1. Scenario Selection Grid (Lobby)
   ========================================================================== */
.hero-header {
  text-align: center;
  margin-bottom: 28px;
}

.badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.scenario-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.scenario-card.featured {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.scenario-card.featured:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.25);
}

.scenario-card.disabled {
  opacity: 0.45;
  filter: grayscale(0.8);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.scenario-tag {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.scenario-tag.live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.scenario-tag.lock {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.scenario-card h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 6px;
}

.card-desc {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 16px;
  flex: 1;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn-primary:disabled {
  background: #334155;
  cursor: not-allowed;
}

/* ==========================================================================
   2. Interactive Workspace Dashboard Layout
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr 240px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 120px);
  min-height: 640px;
}

.dash-panel {
  min-height: 0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.panel-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

/* Patient Profile & DDx Column (Left) */
.patient-panel {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  gap: 14px;
}

.tag-status {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.patient-id-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.5);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.patient-avatar-box {
  width: 44px;
  height: 44px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.patient-id-meta h4 {
  font-size: 0.95rem;
  color: #fff;
}

.patient-id-meta p {
  font-size: 0.75rem;
  color: #94a3b8;
}

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

.meta-item {
  background: rgba(30, 41, 59, 0.4);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.meta-item.full {
  grid-column: 1 / 3;
}

.meta-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
}

.meta-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
}

/* Dynamic DDx Probability Board */
.ddx-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
}

.ddx-header {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.ddx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ddx-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.ddx-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.ddx-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ddx-bar-fill.red { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.ddx-bar-fill.yellow { background: #eab308; box-shadow: 0 0 8px rgba(234, 179, 8, 0.4); }
.ddx-bar-fill.blue { background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.4); }

.doctor-notes-card {
  margin-top: auto;
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 14px;
}

.notes-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
}

#doctor-note-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.45;
}

/* ==========================================================================
   Bedside Telemetry & Vitals Monitor (Top Right)
   ========================================================================== */
.monitor-panel {
  grid-column: 2 / 4;
  grid-row: 1 / 2;
  background: #090e1a;
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.monitor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-diag {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-diag:hover {
  background: #38bdf8;
  color: #040812;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.monitor-subtext {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #eab308;
}

.monitor-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: center;
}

.ecg-screen {
  height: 135px;
  background: #030712;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  overflow: hidden;
  background-image: linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

#ecg-canvas {
  width: 100%;
  height: 100%;
}

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

.vital-box {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.vital-name {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
}

.vital-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.vital-unit {
  font-size: 0.65rem;
  color: #64748b;
  margin-left: 2px;
}

.vital-num-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
}

/* ==========================================================================
   Clinical Interaction Log & Command Console (Bottom Center)
   ========================================================================== */
.chat-panel {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.turn-indicator {
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
}

.chat-log {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 8px;
}

.chat-log::-webkit-scrollbar {
  width: 6px;
}

.chat-log::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
}

.chat-log::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 8px;
}

.chat-log::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

.log-entry {
  max-width: 88%;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  animation: fadeIn 0.2s ease-out;
}

.log-entry.hasta {
  background: #1e293b;
  color: #f1f5f9;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-entry.hasta::before {
  content: '👤 [PATIENT]';
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
}

.log-entry.user {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #0891b2 100%);
  color: #fff;
  align-self: flex-end;
  width: fit-content;
  min-height: 64px;
  padding-top: 28px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.22);
  animation: userOrderDispatch 0.52s cubic-bezier(0.18, 0.89, 0.32, 1.18);
}

.log-entry.user::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.24) 46%, transparent 72%);
  transform: translateX(-120%);
  animation: userOrderSweep 0.85s ease-out 0.08s;
  pointer-events: none;
  z-index: -1;
}

.log-entry.user::before {
  content: '🩺 [PHYSICIAN / YOU]';
  position: absolute;
  top: 8px;
  right: 14px;
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #bfdbfe;
  text-align: right;
  line-height: 1;
  white-space: nowrap;
}

.log-entry.sistem {
  background: rgba(30, 41, 59, 0.45);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  font-size: 0.85rem;
  text-align: left;
  align-self: center;
  width: 98%;
  padding: 10px 14px;
}

.log-entry.clinical-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: rgba(56, 189, 248, 0.72);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.08), rgba(30, 41, 59, 0.45));
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.loading-pulse {
  position: relative;
  width: 34px;
  height: 16px;
  flex: 0 0 34px;
  overflow: hidden;
}

.loading-pulse::before {
  content: "";
  position: absolute;
  inset: 7px 0 auto 0;
  height: 2px;
  background: rgba(56, 189, 248, 0.22);
}

.loading-pulse::after {
  content: "";
  position: absolute;
  top: 2px;
  left: -18px;
  width: 18px;
  height: 12px;
  border-left: 2px solid #38bdf8;
  border-bottom: 2px solid #38bdf8;
  transform: skewX(-25deg);
  animation: clinicalPulse 1.1s linear infinite;
}

.loading-copy {
  color: #38bdf8;
  font-weight: 700;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}

.loading-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #38bdf8;
  opacity: 0.35;
  animation: loadingDot 1s ease-in-out infinite;
}

.loading-dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.loading-dots i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes userOrderDispatch {
  0% {
    opacity: 0;
    transform: translateX(18px) scale(0.96);
    box-shadow: 0 0 0 rgba(37, 99, 235, 0);
  }
  58% {
    opacity: 1;
    transform: translateX(-3px) scale(1.02);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.38);
  }
  100% {
    transform: translateX(0) scale(1);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.22);
  }
}

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

@keyframes clinicalPulse {
  0% {
    left: -18px;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    left: 36px;
    opacity: 0;
  }
}

@keyframes loadingDot {
  0%, 80%, 100% {
    opacity: 0.28;
    transform: translateY(0) scale(0.86);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px) scale(1.12);
  }
}

/* Quick Action Chips */
.quick-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chip-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.chip-btn.warning:hover {
  background: #ef4444;
  border-color: #f87171;
  color: #fff;
}

/* Command Input Form */
.action-form {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.action-form input {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.action-form input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.action-form button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 24px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.action-form button:hover:not(:disabled) {
  background: #1d4ed8;
}

.action-form button:disabled {
  background: #334155;
  cursor: not-allowed;
}

/* ==========================================================================
   Triage Status & Code Red Engine (Bottom Right)
   ========================================================================== */
.timer-panel {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

.code-red-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 12px;
}

.code-red-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.countdown-circle {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  border: 4px solid #ef4444;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

#timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
}

.sec-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.timer-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

/* ==========================================================================
   Pop-up Modals (EMS Arrival & Diagnostics)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-card.wide {
  max-width: 720px;
}

.modal-badge {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.modal-text {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-details-grid {
  background: #1e293b;
  border-radius: 10px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
  font-size: 0.85rem;
  color: #94a3b8;
}

.modal-details-grid span {
  color: #38bdf8;
  font-weight: 700;
}

.btn-modal {
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-modal:hover {
  background: #1d4ed8;
}

/* Stat Diagnostics Panel Grid */
.lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 24px;
  text-align: left;
  font-size: 0.85rem;
}

.lab-box {
  background: #1e293b;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.lab-box h4 {
  font-size: 0.75rem;
  color: #38bdf8;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.lab-box p {
  margin-bottom: 6px;
  color: #cbd5e1;
  line-height: 1.4;
}

.text-danger {
  color: #ef4444;
  font-weight: 700;
}

/* ==========================================================================
   3. Evaluation Scorecard & Jury Rubric Screen
   ========================================================================== */
.report-container {
  max-width: 1080px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(20px);
}

.report-header {
  text-align: center;
  margin-bottom: 24px;
}

.report-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.report-header p {
  color: #94a3b8;
  font-size: 0.9rem;
}

.report-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.radar-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.metrics-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.metric-row.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-row.red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.metric-row.yellow { background: rgba(234, 179, 8, 0.15); color: #facc15; }

.total-score-box {
  margin-top: auto;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.score-title {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 700;
}

.score-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  font-weight: 800;
  color: #38bdf8;
}

.score-status-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  margin-top: 4px;
}

/* ==========================================================================
   Görselleştirilmiş Timeline Replay Stilleri
   ========================================================================== */
.timeline-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}

.timeline-container h4 {
  font-size: 0.8rem;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 12px;
}

.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-events::-webkit-scrollbar {
  width: 6px;
}

.timeline-events::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 8px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.timeline-item.danger {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.timeline-item.success {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.timeline-item.primary {
  border-left: 4px solid #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.timeline-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.timeline-body {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  font-size: 0.82rem;
}

.timeline-tag {
  color: #f1f5f9;
  font-weight: 700;
}

.timeline-action {
  color: #cbd5e1;
}

/* Scorecard Feedback Cards */
.report-grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.feedback-card {
  border-radius: 12px;
  padding: 16px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.feedback-card h4 {
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.green-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #e2e8f0;
}

.green-card h4 {
  color: #34d399;
}

.red-card {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #e2e8f0;
}

.red-card h4 {
  color: #f87171;
}

.blue-card {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e2e8f0;
}

.blue-card h4 {
  color: #38bdf8;
}

.report-actions {
  text-align: center;
}
