/* Duolingo Inspired Assessment Design System - Rocket AI x UTEHY */
:root {
  --duo-green: #58cc02;
  --duo-green-shadow: #46a302;
  --duo-green-light: #f0fdf4;
  
  --duo-blue: #1cb0f6;
  --duo-blue-shadow: #1899d6;
  --duo-blue-light: #f0f9ff;

  --duo-purple: #6366f1;
  --duo-purple-shadow: #4338ca;
  --duo-purple-light: #eef2ff;

  --duo-yellow: #ffc800;
  --duo-yellow-shadow: #e5a500;

  --duo-red: #ff4b4b;
  --duo-red-shadow: #ea2b2b;

  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER ================= */
.app-header {
  background: #ffffff;
  border-bottom: 2px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
}

.brand-avatar {
  font-size: 2rem;
  background: var(--duo-purple-light);
  border-radius: 12px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--border-strong);
}

.brand-info .brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.badge-accent {
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 4px;
}

.brand-info .brand-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ================= 3D DUOLINGO BUTTONS ================= */
.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.4rem;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.1s ease;
  user-select: none;
}

.btn-3d:active, .btn-3d.active-press {
  transform: translateY(3px);
}

.btn-3d:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--duo-green);
  color: #ffffff;
  box-shadow: 0 4px 0 var(--duo-green-shadow);
}
.btn-primary:active {
  box-shadow: 0 1px 0 var(--duo-green-shadow);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-primary);
  box-shadow: 0 4px 0 #cbd5e1;
}
.btn-secondary:active {
  box-shadow: 0 1px 0 #cbd5e1;
}

.btn-accent {
  background: var(--duo-purple);
  color: #ffffff;
  box-shadow: 0 4px 0 var(--duo-purple-shadow);
}
.btn-accent:active {
  box-shadow: 0 1px 0 var(--duo-purple-shadow);
}

.btn-success {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 0 #059669;
}
.btn-success:active {
  box-shadow: 0 1px 0 #059669;
}

.btn-large {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
}

.btn-icon {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 2px 0 var(--border-strong);
  transition: all 0.1s ease;
}
.btn-icon:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--border-strong);
}

.btn-nav-outline {
  background: #ffffff;
  border: 2px solid var(--duo-purple);
  color: var(--duo-purple);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--duo-purple-shadow);
  transition: all 0.1s ease;
}
.btn-nav-outline:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--duo-purple-shadow);
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--duo-blue);
  font-weight: 800;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* ================= MAIN CONTAINER & VIEWS ================= */
.main-content {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem 1rem;
  width: 100%;
}

.app-view {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.app-view.active {
  display: block;
}

/* Room below the last option / explanation so the fixed bottom action bar never covers them */
#view-test {
  padding-bottom: 140px;
}

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

/* ================= HERO CARD ================= */
.hero-card {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.hero-desc {
  font-size: 1rem;
  color: #e0e7ff;
  max-width: 750px;
  margin-bottom: 1.25rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.feat-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ================= CARD BOXES & FORMS ================= */
.card-box {
  background: var(--card-bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
}

.form-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-num {
  background: var(--duo-green);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 2px 0 var(--duo-green-shadow);
}

.section-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.divider-line {
  height: 2px;
  background: var(--border-light);
  margin: 1.75rem 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #334155;
}

.req {
  color: var(--duo-red);
}

.form-input, .form-select, .form-textarea {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--duo-blue);
  box-shadow: 0 0 0 3px rgba(28, 176, 246, 0.15);
}

/* ================= PILL CHECKBOXES ================= */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-checkbox {
  cursor: pointer;
  user-select: none;
}

.pill-checkbox input {
  display: none;
}

.pill-label {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: #f1f5f9;
  border: 2px solid var(--border-strong);
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #475569;
  box-shadow: 0 2px 0 var(--border-strong);
  transition: all 0.15s ease;
}

.pill-checkbox input:checked + .pill-label {
  background: var(--duo-green-light);
  border-color: var(--duo-green);
  color: #15803d;
  box-shadow: 0 3px 0 var(--duo-green-shadow);
  transform: translateY(-2px);
}

.form-submit-row {
  margin-top: 2rem;
}

/* ================= VIEW 2: TEST LOBBY ================= */
.candidate-banner {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 0 var(--border-strong);
}

.candidate-info-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-circle {
  font-size: 1.75rem;
  background: #f1f5f9;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.candidate-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #0f172a;
}

.candidate-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.badge-code {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.duo-lobby-header {
  margin-bottom: 1.5rem;
}

.duo-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.duo-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.module-card {
  background: #ffffff;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 0 var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  position: relative;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--border-strong);
}

.module-card.completed {
  border-color: var(--duo-green);
  box-shadow: 0 4px 0 var(--duo-green-shadow);
  background: #fafdf8;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.mod-icon-badge {
  font-size: 2.2rem;
  background: #f8fafc;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
}

.mod-duration {
  font-size: 0.75rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  border-radius: 20px;
}

.mod-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.mod-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex: 1;
}

.mod-status-row {
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-badge.pending {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.done {
  background: #dcfce7;
  color: #15803d;
}

.lobby-footer-card {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.duo-progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 20px;
  height: 14px;
  overflow: hidden;
  position: relative;
}

.duo-progress-bar-wrap.large {
  height: 18px;
}

.duo-progress-bar-fill {
  background: var(--duo-green);
  height: 100%;
  border-radius: 20px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.1) inset;
}

.lobby-action-row {
  margin-top: 1.25rem;
}

/* ================= VIEW 3: DUOLINGO TEST RUNNER ================= */
.test-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.test-progress-container {
  flex: 1;
}

.timer-pill {
  background: #ffffff;
  border: 2px solid var(--border-strong);
  border-radius: 24px;
  padding: 6px 14px;
  font-weight: 900;
  font-size: 0.95rem;
  color: #334155;
  box-shadow: 0 2px 0 var(--border-strong);
  white-space: nowrap;
}

.timer-pill.urgent {
  border-color: var(--duo-red);
  color: var(--duo-red);
  animation: pulseUrgent 1s infinite alternate;
}

@keyframes pulseUrgent {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.test-body-card {
  background: #ffffff;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 6px 0 var(--border-strong);
  margin-bottom: 5rem; /* space for fixed bottom bar */
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.badge-module {
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--duo-blue-light);
  color: var(--duo-blue);
  padding: 4px 10px;
  border-radius: 12px;
}

.question-counter {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--text-secondary);
}

.question-text {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.code-snippet-wrap {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.code-snippet-wrap pre code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.option-card {
  background: #ffffff;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 0 var(--border-strong);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  transition: all 0.12s ease;
  user-select: none;
}

.option-card:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--border-strong);
}

.option-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border-strong);
}

.option-card.selected {
  border-color: var(--duo-blue);
  background: var(--duo-blue-light);
  color: #0369a1;
  box-shadow: 0 4px 0 var(--duo-blue-shadow);
  transform: translateY(-2px);
}

.opt-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: #475569;
}

.option-card.selected .opt-letter {
  background: var(--duo-blue);
  color: #ffffff;
  border-color: var(--duo-blue-shadow);
}

.opt-text {
  flex: 1;
}

/* ================= DUOLINGO FIXED BOTTOM BAR ================= */
.duo-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 2px solid var(--border-light);
  padding: 1rem;
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.bottom-bar-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.bottom-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: #334155;
}

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

/* ================= VIEW 4: RESULT & SCORECARD ================= */
.result-hero {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.result-badge-anim {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: bounceBadge 1s infinite alternate;
}

@keyframes bounceBadge {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.result-title {
  font-size: 2rem;
  font-weight: 900;
  color: #0f172a;
}

.result-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.result-actions-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

/* SCORECARD CERTIFICATE STYLING */
.scorecard-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.scorecard-card {
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border: 4px double #1e293b;
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 20px 20px;
}

.sc-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.sc-logo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: #475569;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.sc-collab {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
}

.sc-title-block {
  text-align: center;
}

.sc-main-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.sc-sub-title {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 700;
  margin-top: 0.25rem;
}

.sc-candidate-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.sc-detail-item {
  margin-bottom: 0.35rem;
}

.sc-score-highlight {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sc-score-box {
  text-align: center;
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  padding-right: 1.5rem;
  min-width: 140px;
}

.sc-score-num {
  font-size: 3rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
}

.sc-score-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-top: 0.4rem;
}

.sc-rank-box {
  flex: 1;
}

.sc-rank-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 0.25rem;
}

.sc-rank-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.sc-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sc-module-box {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.sc-mod-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.sc-mod-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #475569;
}

.sc-mod-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0.25rem 0;
}

.sc-bar {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.sc-bar-fill {
  background: var(--duo-green);
  height: 100%;
}

.sc-recommend-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 0.9rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.sc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px dashed #cbd5e1;
  padding-top: 1.25rem;
}

.sc-qr-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sc-qr-caption {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  line-height: 1.3;
}

.sc-stamp-box {
  text-align: right;
}

.sc-stamp-title {
  font-size: 0.75rem;
  font-weight: 900;
  color: #0f172a;
}

.sc-stamp-sig {
  font-size: 1.1rem;
  font-family: 'Brush Script MT', cursive, sans-serif;
  color: #2563eb;
  margin: 0.2rem 0;
}

.sc-stamp-sub {
  font-size: 0.7rem;
  color: #64748b;
}

/* ================= VIEW 5: ADMIN / INTERVIEWER BOOTH ================= */
.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
}

.admin-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 3px 0 var(--border-strong);
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.admin-filter-box {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.75rem;
}

.table-container {
  overflow-x: auto;
  padding: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem;
  border-bottom: 2px solid var(--border-light);
  text-align: left;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  color: #1e293b;
  font-weight: 600;
}

.admin-table tr:hover {
  background: #f1f5f9;
}

.table-badge-rank {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-diamond { background: #e0f2fe; color: #0284c7; }
.rank-gold { background: #fef3c7; color: #b45309; }
.rank-silver { background: #f1f5f9; color: #475569; }
.rank-bronze { background: #ffedd5; color: #c2410c; }

/* ================= MODALS & TOAST ================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: zoomIn 0.2s ease;
}

.modal-box.modal-large {
  max-width: 680px;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 900;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.rubric-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rubric-item label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #334155;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.form-range {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  accent-color: var(--duo-purple);
}

.range-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--duo-purple);
  min-width: 28px;
  text-align: center;
}

.toast-popup {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transition: all 0.3s ease;
  pointer-events: none; /* never swallow taps on the buttons underneath */
}

@media (max-width: 768px) {
  .toast-popup {
    top: 1rem;
    bottom: auto;
    left: 1rem;
    right: 1rem;
    text-align: center;
  }
}

.toast-popup.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* ================= RESPONSIVE ADJUSTMENTS ================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.4rem;
  }
  .sc-candidate-details {
    grid-template-columns: 1fr;
  }
  .sc-breakdown-grid {
    grid-template-columns: 1fr;
  }
  .filter-row {
    grid-template-columns: 1fr;
  }
  .sc-score-highlight {
    flex-direction: column;
    text-align: center;
  }
  .sc-score-box {
    border-right: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-right: 0;
    padding-bottom: 1rem;
  }
  .result-actions-top button {
    width: 100%;
  }
  .duo-bottom-bar .bottom-hint {
    display: none;
  }
  .duo-bottom-bar .btn-3d {
    width: 100%;
  }
}
