/* ==========================================================================
   TRYOUT CPNS CAT SIMULATOR - DESIGN SYSTEM & STYLES
   Modern Glassmorphism & High Contrast Dark/Light Theme Design System
   ========================================================================== */

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

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(99, 102, 241, 0.3);

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Brand Accents */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.05) 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-tutor: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  /* Status Colors */
  --color-twk: #3b82f6;   /* Blue */
  --color-tiu: #8b5cf6;   /* Purple */
  --color-tkp: #ec4899;   /* Pink */
  
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-danger: #ef4444;
  --status-info: #06b6d4;

  /* CAT Answer Grid Status Colors */
  --grid-unanswered: #1f2937;
  --grid-answered: #10b981;
  --grid-ragu: #f59e0b;
  --grid-current: #6366f1;

  /* Layout & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);

  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.25);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --grid-unanswered: #e2e8f0;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Ambient Lighting */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: orbFloat 18s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #6366f1, transparent 70%);
}

.orb-2 {
  bottom: -15%;
  right: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  animation-delay: -5s;
}

.orb-3 {
  top: 40%;
  left: 30%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -60px) scale(1.1); }
  100% { transform: translate(-30px, 30px) scale(0.95); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-highlight);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ==========================================================================
   HEADER & NAVIGATION BAR
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-normal);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--border-highlight);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-item button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.nav-item button:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item button.active {
  color: #ffffff;
  background: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

/* Realtime Clock Header Badge */
.realtime-header-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.realtime-header-badge i {
  color: var(--status-warning);
}

/* User Account Profile Pill */
.user-profile-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-profile-badge:hover {
  border-color: var(--accent-primary);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.user-avatar.tutor {
  background: var(--status-warning);
  color: #000;
}

.user-role-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  text-transform: uppercase;
}

.user-role-tag.peserta {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

.user-role-tag.tutor {
  background: rgba(245, 158, 11, 0.2);
  color: var(--status-warning);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--status-danger);
  color: var(--status-danger);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-logout:hover {
  background: var(--status-danger);
  color: #ffffff;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  transform: rotate(15deg);
}

/* ==========================================================================
   MAIN CONTAINER & VIEWS MANAGEMENT
   ========================================================================== */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.app-view {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

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

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

/* ==========================================================================
   LANDING LOGIN MENU SCREEN (#view-login) - SLEEK SINGLE CENTER CARD
   ========================================================================== */
.login-landing-container {
  max-width: 580px;
  margin: 2.5rem auto;
  text-align: center;
}

.login-landing-header {
  margin-bottom: 2rem;
}

.login-landing-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-landing-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.portal-single-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: left;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Subtle Discreet Tutor Link */
.subtle-tutor-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  margin-top: 1.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  transition: var(--transition-fast);
  opacity: 0.7;
}

.subtle-tutor-link:hover {
  color: var(--status-warning);
  opacity: 1;
  background: rgba(245, 158, 11, 0.1);
}

/* Tabs for Peserta Login */
.tab-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.tab-switcher button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-switcher button.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-switcher button#role-tab-tutor.active {
  background: var(--gradient-tutor);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-portal-action {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
}

.btn-portal-action.peserta {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-portal-action.peserta:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-portal-action.tutor {
  background: var(--gradient-tutor);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-portal-action.tutor:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* ==========================================================================
   DASHBOARD VIEW
   ========================================================================== */
.welcome-hero {
  background: var(--gradient-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.welcome-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
  pointer-events: none;
}

.hero-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
}

.btn-cta {
  background: var(--gradient-primary);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-fast);
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.5);
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-4px);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.twk { background: rgba(59, 130, 246, 0.15); color: var(--color-twk); }
.stat-icon.tiu { background: rgba(139, 92, 246, 0.15); color: var(--color-tiu); }
.stat-icon.tkp { background: rgba(236, 72, 153, 0.15); color: var(--color-tkp); }
.stat-icon.total { background: rgba(16, 185, 129, 0.15); color: var(--status-success); }
.stat-icon.tutor { background: rgba(245, 158, 11, 0.15); color: var(--status-warning); }

.stat-info h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 0.2rem;
}

.stat-info .stat-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Passing Grade Target Banner */
.passing-grade-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.passing-grade-banner h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pg-cards-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.pg-mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pg-mini-card.twk { border-left: 4px solid var(--color-twk); }
.pg-mini-card.tiu { border-left: 4px solid var(--color-tiu); }
.pg-mini-card.tkp { border-left: 4px solid var(--color-tkp); }

.pg-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.pg-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-primary);
}

/* Dashboard Analytics Section */
.analytics-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .analytics-section { grid-template-columns: 1fr; }
}

.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Audit Log Location Badge */
.audit-loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* ==========================================================================
   TRYOUT HUB VIEW
   ========================================================================== */
.tryout-hub-header {
  margin-bottom: 2rem;
}

.tryout-hub-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
}

.tryout-hub-header p {
  color: var(--text-secondary);
}

.package-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.package-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.package-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.package-card.locked {
  opacity: 0.65;
  filter: grayscale(0.5);
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(17, 24, 39, 0.6) !important;
}

.package-card.locked:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.package-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.package-badge.lock-badge {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.package-badge.unlocked-badge {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Sequential Pipeline Stepper */
.pipeline-stepper-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stepper-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  transition: var(--transition-fast);
}

.stepper-step-card.active {
  border-color: var(--status-warning);
  background: rgba(245, 158, 11, 0.08);
}

.stepper-step-card.completed {
  border-color: var(--status-success);
  background: rgba(16, 185, 129, 0.08);
}

.stepper-step-card.locked {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.08);
}

.stepper-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.stepper-step-card.completed .stepper-step-num {
  background: var(--status-success);
  color: #ffffff;
}

.stepper-step-card.active .stepper-step-num {
  background: var(--status-warning);
  color: #000000;
}

.package-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.package-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.package-meta {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.package-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-start-package {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-start-package:hover {
  background: var(--accent-primary-hover);
}

/* ==========================================================================
   CAT EXAM ROOM VIEW (INTERACTIVE EXAM SIMULATOR)
   ========================================================================== */
.exam-header {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
}

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

.candidate-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
}

.candidate-meta h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.candidate-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timer-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timer-box.warning {
  animation: pulseTimer 1s infinite alternate;
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--status-danger);
}

@keyframes pulseTimer {
  from { transform: scale(1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
  to { transform: scale(1.05); box-shadow: 0 0 20px rgba(239, 68, 68, 0.7); }
}

.timer-icon {
  color: var(--status-danger);
  font-size: 1.2rem;
}

.timer-display {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--status-danger);
  letter-spacing: 1px;
}

.btn-finish-exam {
  background: var(--gradient-success);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-finish-exam:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

/* Exam Main Split Area */
.exam-split-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .exam-split-container { grid-template-columns: 1fr; }
}

/* Question Box */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 550px;
  justify-content: space-between;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.question-number-badge {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.question-category-tags {
  display: flex;
  gap: 0.5rem;
}

.tag-cat {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
  color: #ffffff;
}

.tag-cat.twk { background: var(--color-twk); }
.tag-cat.tiu { background: var(--color-tiu); }
.tag-cat.tkp { background: var(--color-tkp); }

.tag-topic {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

.question-body {
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 500;
  margin-bottom: 2rem;
  white-space: pre-line;
}

/* Options Container */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.option-item {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition-fast);
  position: relative;
}

.option-item:hover {
  border-color: var(--border-highlight);
  background: rgba(99, 102, 241, 0.05);
}

.option-item.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.option-item.selected .option-radio {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  display: none;
}

.option-item.selected .option-radio::after {
  display: block;
}

.option-text {
  font-size: 1rem;
  color: var(--text-primary);
  flex: 1;
}

/* Keyboard Shortcut Badge */
.key-hint {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
}

/* Question Action Footer Controls */
.question-footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-nav-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-nav-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.btn-nav-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-flag-ragu {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--status-warning);
  color: var(--status-warning);
  font-family: inherit;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-flag-ragu:hover {
  background: rgba(245, 158, 11, 0.3);
}

.btn-flag-ragu.flagged {
  background: var(--status-warning);
  color: #000000;
}

/* Grid Navigator Sidebar */
.grid-navigator-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.grid-sidebar-header {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Status Legend */
.status-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.answered { background: var(--grid-answered); }
.legend-dot.ragu { background: var(--grid-ragu); }
.legend-dot.unanswered { background: var(--grid-unanswered); border: 1px solid var(--border-color); }
.legend-dot.current { background: var(--grid-current); }

/* Question Grid Matrix */
.questions-grid-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.q-grid-btn {
  background: var(--grid-unanswered);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  position: relative;
}

.q-grid-btn:hover {
  transform: scale(1.08);
  z-index: 2;
}

.q-grid-btn.answered {
  background: var(--grid-answered);
  color: #ffffff;
  border-color: var(--status-success);
}

.q-grid-btn.ragu {
  background: var(--grid-ragu);
  color: #000000;
  border-color: var(--status-warning);
}

.q-grid-btn.current {
  outline: 3px solid var(--grid-current);
  outline-offset: 1px;
  font-weight: 800;
}

/* ==========================================================================
   RESULTS & ANALYTICS REVIEW VIEW
   ========================================================================== */
.result-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.result-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 800;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.result-status-badge.passed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--status-success);
  border: 2px solid var(--status-success);
}

.result-status-badge.failed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--status-danger);
  border: 2px solid var(--status-danger);
}

.result-score-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.score-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.score-box h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.score-box .score-num {
  font-size: 2.25rem;
  font-weight: 800;
}

.score-box .score-target {
  font-size: 0.8rem;
  margin-top: 0.4rem;
  color: var(--text-secondary);
}

.score-box.passed .score-num { color: var(--status-success); }
.score-box.failed .score-num { color: var(--status-danger); }

/* Pembahasan Filter & Discussion Section */
.discussion-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 2rem;
}

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

.filter-btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.discussion-card-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.discussion-card-item.correct { border-left: 5px solid var(--status-success); }
.discussion-card-item.wrong { border-left: 5px solid var(--status-danger); }

.discussion-pembahasan-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.discussion-pembahasan-box h5 {
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Modal Popups & Confirmations */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.modal-body {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Form controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM (MOBILE HP, TABLET/IPAD, LAPTOP, DESKTOP)
   ========================================================================== */

/* Utility: Safe Mobile Viewport & Smooth Layouts */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* 1. Global Touch Screen & Accessibility Improvements */
@media (hover: none) and (pointer: coarse) {
  button, .option-item, .nav-item button, .q-grid-btn {
    -webkit-tap-highlight-color: transparent;
  }
}

/* 2. Extra-Small Mobile Screens (Smartphones <= 480px) */
@media (max-width: 480px) {
  .main-content {
    padding: 1rem 0.75rem !important;
  }

  .app-header {
    padding: 0.6rem 0.75rem !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
  }

  .brand-logo {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-text h1 {
    font-size: 0.95rem !important;
  }

  .brand-text span {
    font-size: 0.6rem !important;
  }

  .realtime-header-badge {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.72rem !important;
  }

  .user-profile-badge {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.72rem !important;
    max-width: 130px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .btn-logout {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.75rem !important;
  }

  .theme-toggle-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
  }

  .nav-links {
    order: 3;
    width: 100%;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.35rem;
    padding: 0.4rem 0.1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-item button {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  .login-landing-container {
    padding: 0.5rem 0;
    margin: 1.25rem auto;
  }

  .login-landing-header h2 {
    font-size: 1.5rem !important;
  }

  .login-landing-header p {
    font-size: 0.85rem !important;
  }

  .portal-single-card {
    padding: 1.5rem 1rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .tab-switcher button {
    padding: 0.5rem 0.4rem !important;
    font-size: 0.78rem !important;
  }

  .realtime-dashboard-card {
    padding: 1rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .welcome-hero {
    padding: 1.5rem 1rem !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 1.25rem !important;
  }

  .hero-text h2 {
    font-size: 1.3rem !important;
  }

  .hero-text p {
    font-size: 0.85rem !important;
  }

  .btn-cta {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    padding: 0.8rem 1.2rem !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }

  .stat-card {
    padding: 0.85rem 0.6rem !important;
    gap: 0.5rem !important;
    flex-direction: column !important;
    text-align: center !important;
  }

  .stat-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
  }

  .stat-value {
    font-size: 1.25rem !important;
  }

  .stat-info h3 {
    font-size: 0.72rem !important;
  }

  .stat-info .stat-subtext {
    font-size: 0.68rem !important;
  }

  .pg-cards-wrapper {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .passing-grade-banner {
    padding: 1.25rem 1rem !important;
  }

  .pipeline-stepper-container {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .package-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .package-card {
    padding: 1.5rem 1.2rem !important;
  }

  /* Exam CAT Simulator View on HP */
  .exam-header {
    padding: 1rem 0.85rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }

  .candidate-info {
    justify-content: space-between !important;
  }

  .candidate-avatar {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }

  .timer-box {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.6rem 1rem !important;
  }

  .timer-display {
    font-size: 1.4rem !important;
  }

  .btn-finish-exam {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
  }

  .exam-split-container {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .question-card {
    min-height: auto !important;
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .question-header {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .question-body {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
  }

  .option-item {
    padding: 0.9rem 1rem !important;
    gap: 0.75rem !important;
  }

  .option-text {
    font-size: 0.92rem !important;
  }

  .key-hint {
    display: none !important;
  }

  .question-footer-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
    padding-top: 1rem !important;
  }

  .btn-flag-ragu {
    grid-column: 1 / -1 !important;
    order: -1 !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 0.7rem 1rem !important;
  }

  .btn-nav-nav {
    justify-content: center !important;
    width: 100% !important;
    padding: 0.7rem 0.85rem !important;
    font-size: 0.85rem !important;
  }

  .grid-navigator-sidebar {
    position: static !important;
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .questions-grid-matrix {
    grid-template-columns: repeat(5, 1fr) !important;
    max-height: 240px !important;
    gap: 0.4rem !important;
  }

  .q-grid-btn {
    height: 38px !important;
    font-size: 0.8rem !important;
  }

  /* Result View on HP */
  .result-hero-card {
    padding: 1.5rem 1rem !important;
  }

  .result-status-badge {
    font-size: 1.05rem !important;
    padding: 0.5rem 1.25rem !important;
  }

  .result-score-summary {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
  }

  .score-box {
    padding: 1rem 0.75rem !important;
    text-align: center !important;
  }

  .score-box .score-num {
    font-size: 1.6rem !important;
  }

  .discussion-section {
    padding: 1.25rem 1rem !important;
  }

  .filter-btn-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .filter-btn {
    text-align: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.4rem !important;
    font-size: 0.78rem !important;
  }

  /* Modals on HP */
  .modal-overlay {
    padding: 0.75rem !important;
  }

  .modal-box {
    max-width: 95vw !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .modal-actions {
    flex-direction: column !important;
    gap: 0.6rem !important;
  }

  .modal-actions button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Tables Responsive Scroll */
  .table-responsive-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: var(--radius-md);
  }

  table {
    min-width: 580px !important;
    font-size: 0.8rem !important;
  }
}

/* 3. Medium Mobile & Phablets (481px to 640px) */
@media (min-width: 481px) and (max-width: 640px) {
  .main-content {
    padding: 1.25rem 1rem !important;
  }

  .app-header {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1.25rem !important;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.4rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }

  .package-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .pipeline-stepper-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }

  .exam-split-container {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .exam-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    text-align: center !important;
  }

  .candidate-info {
    justify-content: center !important;
  }

  .questions-grid-matrix {
    grid-template-columns: repeat(6, 1fr) !important;
    max-height: 220px !important;
    overflow-y: auto !important;
  }

  .result-score-summary {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.85rem !important;
  }

  .table-responsive-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table {
    min-width: 620px !important;
  }
}

/* 4. Tablets & iPads Portrait/Landscape (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .main-content {
    padding: 1.5rem 1.5rem !important;
  }

  .app-header {
    padding: 0.85rem 1.75rem !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .package-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }

  .exam-split-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .questions-grid-matrix {
    grid-template-columns: repeat(10, 1fr) !important;
    max-height: 280px !important;
  }

  .pipeline-stepper-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .table-responsive-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-box {
    max-width: 85vw !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
  }
}

/* 5. Laptops & MacBooks Standard (1025px to 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .main-content {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
  }

  .package-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  }

  .exam-split-container {
    grid-template-columns: 1fr 340px !important;
  }

  .grid-navigator-sidebar {
    position: sticky !important;
    top: 90px !important;
  }
}

/* 6. Desktop PCs, Ultrawide & 4K Monitors (min-width: 1441px) */
@media (min-width: 1441px) {
  .main-content {
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 2.5rem 2rem !important;
  }

  .exam-split-container {
    grid-template-columns: 1fr 380px !important;
  }

  .package-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)) !important;
  }
}
