/* =================================================================
 * NEURO-ROBO STUDIO — Master Dark Neo-Tech Design System
 * Solution 1: 1:1 In-Panel Dedicated Sub-Toolbars + Iconic Yellow Logo
 * ================================================================= */

:root {
  --bg: #090d14;
  --surface: #111722;
  --surface-card: #161f2e;
  --surface-hover: #1f2b3e;
  --line: #222e42;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #ffd60a;
  --accent-glow: rgba(255, 214, 10, 0.45);
  --cyan: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.35);
  --green: #10b981;
  --orange: #ff7a3d;
  --red: #ef4444;
  --font-main: "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* General Button Styles */
button {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--surface-card);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

button:hover {
  background: var(--surface-hover);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

button[aria-pressed="true"], button.active {
  background: var(--accent) !important;
  color: #0b0e14 !important;
  border-color: var(--accent) !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px var(--accent-glow) !important;
}

button.primary {
  background: var(--accent);
  color: #0b0e14;
  border-color: var(--accent);
  font-weight: 800;
  box-shadow: 0 0 10px var(--accent-glow);
}

button.cyan-btn {
  background: var(--cyan);
  color: #0b0e14;
  border-color: var(--cyan);
  font-weight: 800;
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* Master Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Nav Header (Clean Single Bar) */
header.top-nav {
  height: 52px;
  padding: 0 20px;
  background: rgba(17, 23, 34, 0.98);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Iconic Solid Bright Yellow Logo Badge */
.brand-icon {
  font-size: 20px;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #0b0e14;
  border: 1px solid #ffe066;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px var(--accent-glow);
  font-weight: 900;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

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

/* 3-Panel Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.05fr 0.95fr;
  gap: 12px;
  padding: 8px 16px 4px;
  flex: 1;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 520px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Panel Header Row 1: Title & Status Badges */
.panel-head {
  padding: 8px 14px;
  background: var(--surface-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  min-height: 38px;
}

.panel-head .head-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-head .head-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-head .badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Panel Header Row 2: 1:1 In-Panel Dedicated Sub-Toolbar */
.panel-sub-toolbar {
  padding: 6px 10px;
  background: #0d121c;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
}

.panel-sub-toolbar::-webkit-scrollbar {
  height: 3px;
}
.panel-sub-toolbar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

.sub-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.sub-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  margin-right: 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* 3D Viewport Wrapping */
.viewport-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #090d14;
}

.viewport-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Viewport Overlays */
.status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(17, 23, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 10;
  pointer-events: none;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-pill i.live {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-pill i.dead {
  background: var(--orange);
}

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 214, 10, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  z-index: 10;
  pointer-events: none;
}

.view-bottom-hud {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(9, 13, 20, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  pointer-events: none;
}

/* Panel 3: Oscilloscope & Circuit Inspector */
.analytics-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.oscilloscope-box {
  height: 180px;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: #090d14;
}

.oscilloscope-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.inspector-box {
  flex: 1;
  padding: 8px 12px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.inspector-box h4 {
  font-size: 11.5px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.circuit-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  justify-content: space-between;
}

.step-item {
  background: var(--surface-card);
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.step-item:hover {
  background: var(--surface-hover);
  border-color: var(--cyan);
  transform: translateX(2px);
}

.step-item b { font-size: 11px; color: var(--text); }
.step-item small { font-size: 10px; color: var(--text-muted); }

/* Real-Time Signal Stream Ribbon */
.flow-ribbon {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 4px 16px 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.flow-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow-card small {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-card b {
  font-size: 13.5px;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 800;
}

.flow-card i {
  font-size: 9.5px;
  color: var(--text-muted);
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading Overlay */
#loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  background: #090d14;
  padding: 20px;
}

#loading[hidden] {
  display: none !important;
}

#loading p {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

#loading progress {
  width: min(320px, 80%);
  height: 8px;
  accent-color: var(--accent);
}

#loading small {
  color: var(--text-muted);
  font-size: 12px;
}

/* Sim-to-Real Modal Dialog */
dialog#simToRealDialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  width: min(720px, 90vw);
  max-height: 85vh;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  margin: auto;
}

dialog#simToRealDialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

dialog#simToRealDialog h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--accent);
}

dialog#simToRealDialog pre {
  background: #090d14;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
  max-height: 380px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
  color: #e2e8f0;
}

.dialog-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1380px) {
  .bento-grid { grid-template-columns: 1fr; }
  .panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 520px; }
  .flow-ribbon { grid-template-columns: repeat(3, 1fr); }
}




/* AI Prompt-to-Brain Wide Console */
.ai-console-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin: 0 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.ai-console-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #ffd60a, #38bdf8);
}

.ai-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-console-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-console-title b {
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.ai-console-title small {
  font-size: 11px;
  color: var(--text-muted);
}

.ai-console-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Always Visible High-Tech Terminal Input Box */
.prompt-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(13, 20, 36, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 3px 6px 3px 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.08);
  transition: all 0.2s ease;
  gap: 8px;
}

.prompt-input-wrap:hover {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 14px rgba(56, 189, 248, 0.2);
}

.prompt-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-glow);
  background: rgba(16, 26, 46, 0.98);
}

.prompt-lead-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  user-select: none;
}

.prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 4px;
  outline: none;
}

.prompt-input::placeholder {
  color: rgba(148, 163, 184, 0.7);
  font-size: 11.5px;
}

/* 1-Click Neural Presets Bar */
.ai-presets-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-presets-bar button {
  background: rgba(26, 36, 56, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-presets-bar button:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.ai-presets-bar button[aria-pressed="true"] {
  background: rgba(255, 214, 10, 0.18);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.prompt-status-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--cyan);
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  white-space: nowrap;
}

/* High-Tech Sub-Toolbar Select Dropdown */
.sub-select {
  background-color: #090d16;
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 22px 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sub-select:hover {
  border-color: var(--accent);
}

.sub-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.sub-select option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 6px 10px;
}

/* Floating Smart Target HUD Controller */
.target-hud-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(9, 13, 20, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border-radius: 24px;
  pointer-events: auto !important;
}


.hud-select {
  background: rgba(15, 23, 42, 0.92);
  color: var(--accent);
  border: 1px solid rgba(255, 214, 10, 0.45);
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  user-select: none;
}
.hud-select:hover, .hud-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}
.hud-select option {
  background: #0f172a;
  color: #f8fafc;
}

.hud-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 2px;
  user-select: none;
}

.hud-chip {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.hud-chip:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.hud-chip[aria-pressed="true"] {
  background: rgba(255, 214, 10, 0.25);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.hud-chip.danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fca5a5;
}

.hud-slider-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}



/* =========================================================================
   📖 Quick Guide & 🏆 Scorecard Dialog Styles
   ========================================================================= */
dialog#guideDialog,
dialog#scorecardDialog {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  border-radius: 16px;
  max-width: 860px;
  width: 92vw;
  max-height: 88vh;
  padding: 24px;
  box-sizing: border-box;
  overflow-y: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 10000;
}

dialog#guideDialog {
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.25);
}

dialog#scorecardDialog {
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.2);
}

dialog#guideDialog::backdrop,
dialog#scorecardDialog::backdrop {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
}

.scorecard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.scorecard-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.scorecard-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.scorecard-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.scorecard-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.scorecard-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
  transition: color 0.2s ease;
}

.scorecard-close-btn:hover {
  color: #fff;
}

/* Summary Card */
.scorecard-summary-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tier-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
  color: #000;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.tier-circle span {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.tier-circle small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.scorecard-summary-details {
  flex: 1;
}

.score-main-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.score-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.score-val {
  font-size: 24px;
  font-weight: 900;
}

.gold-text {
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.score-sub-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.meter-bar {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill.cyan {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-fill.gold {
  background: linear-gradient(90deg, #d97706, #f59e0b);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Benchmarks */
.scorecard-section {
  margin-bottom: 22px;
}

.section-badge-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.score-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.cyan-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.gold-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.scorecard-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
}

.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.scorecard-table th {
  background: rgba(30, 41, 59, 0.8);
  padding: 10px 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scorecard-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.scorecard-table tr:last-child td {
  border-bottom: none;
}

.bold-cell {
  font-weight: 800;
  color: #fff;
}

.grade-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.grade-s {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.grade-a {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.p-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 90px;
}

.p-bar i {
  display: inline-block;
  height: 5px;
  background: #38bdf8;
  border-radius: 3px;
}

.scorecard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scorecard-run-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.scorecard-run-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}
