/* ==========================================================================
   Clean & Robust Multi-Theme Design System
   ========================================================================== */

:root {
  --font-arabic: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-english: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= THEME 1: Petrol Teal & Warm Sand (Matching Screenshots) ================= */
body.theme-petrol-teal {
  --bg-color: #06403d;
  --bg-gradient: #06403d;
  --quiz-bg: #fbf7ee;
  
  --header-bg: #042e2c;
  --header-border: rgba(230, 223, 207, 0.2);
  --header-text: #ffffff;
  --header-ctrl-bg: #074e4a;
  --header-ctrl-border: rgba(230, 223, 207, 0.3);
  --header-ctrl-text: #ffffff;
  --header-logo-bg: #edd8b7;
  --header-logo-text: #06403d;

  --card-bg: rgba(4, 38, 36, 0.9);
  --card-border: rgba(13, 148, 136, 0.4);
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  
  --btn-main-bg: #0d9488;
  --btn-main-text: #ffffff;
  --btn-sec-bg: rgba(4, 38, 36, 0.85);
  --btn-sec-text: #5eead4;
  --btn-sec-border: rgba(13, 148, 136, 0.4);
  
  --landing-card-bg: rgba(4, 38, 36, 0.9);
  --landing-btn-bg: #0d9488;
  --landing-btn-text: #ffffff;
  --landing-input-bg: rgba(255, 255, 255, 0.06);
  --landing-input-text: #ffffff;
  
  /* Quadrant Colors */
  --b-color: #d84315; /* Action */
  --c-color: #0277bd; /* Analysis */
  --i-color: #2e7d32; /* Harmony */
  --a-color: #d97706; /* Expression */
  
  --accent-glow-1: rgba(7, 78, 74, 0.3);
  --accent-glow-2: rgba(237, 216, 183, 0.15);
}

/* ================= THEME 2: Clean Modern Light ================= */
body.theme-light {
  --bg-color: #f1f5f9;
  --bg-gradient: radial-gradient(circle at 15% 10%, #f8fafc 0%, #f1f5f9 60%, #e2e8f0 100%);
  --quiz-bg: #f8fafc;
  
  --header-bg: #ffffff;
  --header-border: #e2e8f0;
  --header-text: #0f172a;
  --header-ctrl-bg: #f1f5f9;
  --header-ctrl-border: #cbd5e1;
  --header-ctrl-text: #0f172a;
  --header-logo-bg: #0f172a;
  --header-logo-text: #ffffff;

  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --btn-main-bg: #0f172a;
  --btn-main-text: #ffffff;
  --btn-sec-bg: #ffffff;
  --btn-sec-text: #334155;
  --btn-sec-border: #cbd5e1;
  
  --landing-card-bg: #ffffff;
  --landing-btn-bg: #0f172a;
  --landing-btn-text: #ffffff;
  --landing-input-bg: #f8fafc;
  --landing-input-text: #0f172a;
  
  --b-color: #d97706;
  --c-color: #059669;
  --i-color: #2563eb;
  --a-color: #e11d48;
  
  --accent-glow-1: rgba(37, 99, 235, 0.08);
  --accent-glow-2: rgba(15, 23, 42, 0.06);
}

/* ================= THEME 3: Royal Navy Blue ================= */
body.theme-royal-blue {
  --bg-color: #080f24;
  --bg-gradient: radial-gradient(circle at 15% 15%, #0f1c3f 0%, #080f24 55%, #040817 100%);
  --quiz-bg: #080f24;
  
  --header-bg: #060c1d;
  --header-border: rgba(96, 165, 250, 0.2);
  --header-text: #ffffff;
  --header-ctrl-bg: rgba(37, 99, 235, 0.25);
  --header-ctrl-border: rgba(96, 165, 250, 0.35);
  --header-ctrl-text: #ffffff;
  --header-logo-bg: #2563eb;
  --header-logo-text: #ffffff;

  --card-bg: rgba(15, 28, 63, 0.85);
  --card-border: rgba(96, 165, 250, 0.2);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --btn-main-bg: #2563eb;
  --btn-main-text: #ffffff;
  --btn-sec-bg: rgba(15, 28, 63, 0.85);
  --btn-sec-text: #e2e8f0;
  --btn-sec-border: rgba(96, 165, 250, 0.3);
  
  --landing-card-bg: rgba(15, 28, 63, 0.95);
  --landing-btn-bg: #2563eb;
  --landing-btn-text: #ffffff;
  --landing-input-bg: rgba(8, 15, 36, 0.9);
  --landing-input-text: #ffffff;
  
  --b-color: #06b6d4;
  --c-color: #38bdf8;
  --i-color: #3b82f6;
  --a-color: #818cf8;
  
  --accent-glow-1: rgba(37, 99, 235, 0.25);
  --accent-glow-2: rgba(6, 182, 212, 0.2);
}

/* ================= THEME 4: Emerald & Gold Luxury ================= */
body.theme-emerald-gold {
  --bg-color: #041710;
  --bg-gradient: radial-gradient(circle at 15% 15%, #062419 0%, #041710 60%, #020b08 100%);
  --quiz-bg: #041710;
  
  --header-bg: #020e0a;
  --header-border: rgba(52, 211, 153, 0.2);
  --header-text: #ffffff;
  --header-ctrl-bg: rgba(5, 150, 105, 0.25);
  --header-ctrl-border: rgba(52, 211, 153, 0.35);
  --header-ctrl-text: #ffffff;
  --header-logo-bg: #fbbf24;
  --header-logo-text: #020e0a;

  --card-bg: rgba(6, 36, 25, 0.88);
  --card-border: rgba(52, 211, 153, 0.22);
  --text-main: #f0fdf4;
  --text-muted: #86efac;
  --text-dim: #4ade80;
  
  --btn-main-bg: #059669;
  --btn-main-text: #ffffff;
  --btn-sec-bg: rgba(6, 36, 25, 0.88);
  --btn-sec-text: #f0fdf4;
  --btn-sec-border: rgba(52, 211, 153, 0.35);
  
  --landing-card-bg: rgba(6, 36, 25, 0.95);
  --landing-btn-bg: #fbbf24;
  --landing-btn-text: #020e0a;
  --landing-input-bg: rgba(4, 23, 16, 0.9);
  --landing-input-text: #ffffff;
  
  --b-color: #fbbf24;
  --c-color: #34d399;
  --i-color: #2dd4bf;
  --a-color: #f59e0b;
  
  --accent-glow-1: rgba(16, 185, 129, 0.25);
  --accent-glow-2: rgba(251, 191, 36, 0.2);
}

/* ================= THEME 5: Cyber Slate & Indigo ================= */
body.theme-cyber-indigo {
  --bg-color: #0d061a;
  --bg-gradient: radial-gradient(circle at 20% 15%, #180d2e 0%, #0d061a 60%, #06020c 100%);
  --quiz-bg: #0d061a;
  
  --header-bg: #07030d;
  --header-border: rgba(168, 85, 247, 0.25);
  --header-text: #ffffff;
  --header-ctrl-bg: rgba(147, 51, 234, 0.25);
  --header-ctrl-border: rgba(168, 85, 247, 0.35);
  --header-ctrl-text: #ffffff;
  --header-logo-bg: #9333ea;
  --header-logo-text: #ffffff;

  --card-bg: rgba(24, 13, 46, 0.88);
  --card-border: rgba(168, 85, 247, 0.25);
  --text-main: #faf5ff;
  --text-muted: #d8b4fe;
  --text-dim: #a855f7;
  
  --btn-main-bg: #9333ea;
  --btn-main-text: #ffffff;
  --btn-sec-bg: rgba(24, 13, 46, 0.88);
  --btn-sec-text: #faf5ff;
  --btn-sec-border: rgba(168, 85, 247, 0.35);
  
  --landing-card-bg: rgba(24, 13, 46, 0.95);
  --landing-btn-bg: #ec4899;
  --landing-btn-text: #ffffff;
  --landing-input-bg: rgba(13, 6, 26, 0.9);
  --landing-input-text: #ffffff;
  
  --b-color: #f43f5e;
  --c-color: #06b6d4;
  --i-color: #a855f7;
  --a-color: #ec4899;
  
  --accent-glow-1: rgba(147, 51, 234, 0.3);
  --accent-glow-2: rgba(236, 72, 153, 0.2);
}

/* ================= THEME 6: Minimal Nordic Slate ================= */
body.theme-nordic-minimal {
  --bg-color: #0f172a;
  --bg-gradient: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  --quiz-bg: #0f172a;
  
  --header-bg: #090e1a;
  --header-border: rgba(148, 163, 184, 0.2);
  --header-text: #f8fafc;
  --header-ctrl-bg: rgba(71, 85, 105, 0.3);
  --header-ctrl-border: rgba(148, 163, 184, 0.3);
  --header-ctrl-text: #ffffff;
  --header-logo-bg: #38bdf8;
  --header-logo-text: #0f172a;

  --card-bg: rgba(30, 41, 59, 0.9);
  --card-border: rgba(148, 163, 184, 0.22);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --btn-main-bg: #38bdf8;
  --btn-main-text: #0f172a;
  --btn-sec-bg: rgba(30, 41, 59, 0.9);
  --btn-sec-text: #f8fafc;
  --btn-sec-border: rgba(148, 163, 184, 0.3);
  
  --landing-card-bg: rgba(30, 41, 59, 0.95);
  --landing-btn-bg: #38bdf8;
  --landing-btn-text: #0f172a;
  --landing-input-bg: rgba(15, 23, 42, 0.9);
  --landing-input-text: #ffffff;
  
  --b-color: #38bdf8;
  --c-color: #2dd4bf;
  --i-color: #60a5fa;
  --a-color: #f472b6;
  
  --accent-glow-1: rgba(56, 189, 248, 0.2);
  --accent-glow-2: rgba(96, 165, 250, 0.15);
}

/* ================= Base Styles ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-arabic);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: normal !important;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  transition: background 0.3s ease;
}

body.lang-ar * {
  letter-spacing: normal !important;
}

body.lang-en {
  font-family: var(--font-english);
}

body.theme-petrol-teal.in-quiz,
body.theme-petrol-teal.in-report {
  background: var(--quiz-bg);
}

/* Atmospheric Glows */
.ambient-glow-1 {
  position: fixed;
  top: -140px;
  right: -140px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--accent-glow-1) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: 0;
  pointer-events: none;
}
.ambient-glow-2 {
  position: fixed;
  bottom: -180px;
  left: -180px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, var(--accent-glow-2) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

/* Header */
header.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-badge {
  background: var(--header-logo-bg);
  color: var(--header-logo-text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--header-text);
  white-space: nowrap;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-select-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--header-text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.theme-select {
  background: var(--header-ctrl-bg);
  color: var(--header-ctrl-text);
  border: 1px solid var(--header-ctrl-border);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  max-width: 140px;
}

.lang-toggle-btn {
  background: var(--header-ctrl-bg);
  border: 1px solid var(--header-ctrl-border);
  color: var(--header-ctrl-text);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-toggle-btn:hover, .theme-select:hover {
  filter: brightness(1.15);
}

/* Main Container */
main.container {
  flex: 1;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 60px;
  position: relative;
  z-index: 10;
}

/* Welcome Screen */
.welcome-hero {
  text-align: center;
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
}

.badge-pill {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e0f2f1;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
body.theme-light .badge-pill {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  margin-bottom: 12px;
  color: #ffffff;
}
body.theme-light .hero-title {
  color: #0f172a;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 24px;
}
body.theme-light .hero-subtitle {
  color: #475569;
}

.landing-dimensions-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 28px;
  flex-wrap: wrap;
}
.landing-dim-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 10px 18px;
  min-width: 90px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
body.theme-light .landing-dim-pill {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.landing-dim-stripe {
  width: 24px;
  height: 4px;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* Landing Card */
.welcome-hero .glass-panel {
  background: var(--landing-card-bg);
  border-radius: 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  padding: 32px 36px;
}

.name-input-group {
  margin-bottom: 22px;
  text-align: right;
}
body.lang-en .name-input-group {
  text-align: left;
}

.input-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.modern-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--landing-input-bg);
  border: 1.5px solid var(--card-border);
  color: var(--landing-input-text);
  font-size: 1.1rem;
  outline: none;
  transition: var(--transition);
}

.modern-input:focus {
  border-color: var(--b-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* Modern Unified Button System */
.btn-primary,
.btn-secondary {
  position: relative;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: normal !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-md);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  outline: none;
}

.btn-primary {
  background: var(--btn-main-bg);
  color: var(--btn-main-text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 30px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.welcome-hero .btn-primary {
  background: var(--landing-btn-bg);
  color: var(--landing-btn-text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: var(--btn-sec-bg);
  color: var(--btn-sec-text);
  border: 1px solid var(--btn-sec-border);
  padding: 12px 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  filter: brightness(1.04);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Quiz Wizard View */
.quiz-container {
  max-width: 860px;
  margin: 0 auto;
}

.progress-track {
  background: var(--card-border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--btn-main-bg);
  transition: width 0.3s ease;
}

.quiz-set-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 680px) {
  .quiz-set-grid {
    grid-template-columns: 1fr;
  }
}

.quiz-card-item {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  user-select: none;
}

.quiz-card-item:hover {
  border-color: var(--text-main);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.quiz-card-item.selected-card {
  border-color: var(--text-main);
}

.card-rank-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
}

.rank-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--btn-main-bg);
  color: var(--btn-main-text);
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-circle-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.03);
  border: 1.5px dashed var(--card-border);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
  white-space: nowrap;
}

.card-content {
  flex: 1;
}

.card-main-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card-sub-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Quick Nav Dots */
.quick-dots-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.dot-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.dot-btn:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

.dot-btn.active {
  border-color: var(--btn-main-bg);
  color: var(--btn-main-text);
  background: var(--btn-main-bg);
}

.dot-btn.filled {
  background: rgba(46, 125, 50, 0.15);
  border-color: rgba(46, 125, 50, 0.4);
  color: #2e7d32;
}

/* ================= REPORT DASHBOARD STYLES ================= */
.report-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

.report-card-white {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1.5px solid var(--card-border);
}

.vertical-chart-area {
  position: relative;
  margin-top: 15px;
  padding-top: 45px;
  padding-bottom: 55px;
  border-bottom: 1px solid var(--card-border);
}

/* Chart Switcher Buttons (Bars vs Radar) */
.chart-mode-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  border: 1px solid var(--card-border);
}

.chart-mode-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 7px 16px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: normal !important;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
  outline: none;
}

.chart-mode-btn:hover {
  color: var(--text-main);
}

.chart-mode-btn.active {
  background: var(--card-bg);
  color: var(--text-main);
  border-color: var(--card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Radar Chart Container */
.radar-chart-area {
  position: relative;
  margin-top: 15px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--card-border);
}

.radar-svg-wrapper {
  width: 100%;
  max-width: 440px;
  height: auto;
  aspect-ratio: 1 / 1;
}

.radar-quadrant-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
}

.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radar-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Chart Structure: Score numbers on top, Plot surface in middle with Midline, Labels on bottom */
.chart-bars-plot {
  position: relative;
  height: 180px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
}

/* Midline 40: Positioned strictly relative to .chart-bars-plot height (50% = 40) */
.chart-midline-guide {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50%;
  display: flex;
  align-items: center;
  z-index: 1;
  pointer-events: none;
  transform: translateY(50%);
}

.midline-dashed {
  flex: 1;
  border-bottom: 2px dashed #e6a23c;
  opacity: 0.85;
}

.midline-tag {
  background: #e6a23c;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-inline-start: 10px;
}

.vertical-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95px;
  z-index: 2;
  position: relative;
  height: 100%;
}

.bar-score-num {
  position: absolute;
  top: -34px;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

/* Pillar container occupies the exact 100% height of .chart-bars-plot */
.bar-pillar-wrap {
  width: 68px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.vertical-bar-pillar {
  width: 100%;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bar-labels-wrap {
  position: absolute;
  bottom: -48px;
  text-align: center;
  white-space: nowrap;
}

.bar-foot-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  text-align: center;
  line-height: 1.2;
}

.bar-foot-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

/* Primary Pattern Box */
.report-card-petrol {
  background: #06403d;
  border-radius: 24px;
  padding: 38px 42px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
body.theme-light .report-card-petrol {
  background: #0f172a;
}
body.theme-royal-blue .report-card-petrol {
  background: #0f1c3f;
}
body.theme-emerald-gold .report-card-petrol {
  background: #062419;
}
body.theme-cyber-indigo .report-card-petrol {
  background: #180d2e;
}
body.theme-nordic-minimal .report-card-petrol {
  background: #1e293b;
}

.primary-pill-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 22px 26px;
  backdrop-filter: blur(10px);
}

.primary-pill-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: #edd8b7;
  letter-spacing: normal !important;
}

.primary-pill-sub {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.primary-pill-text {
  font-size: 1.05rem;
  color: #ffffff;
  line-height: 1.75;
  margin: 0;
}

.secondary-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #edd8b7;
}

.secondary-sub {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

/* 2x2 Dimensions Detailed Cards */
.dimensions-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 50px;
}

@media (max-width: 820px) {
  .dimensions-detail-grid {
    grid-template-columns: 1fr;
  }
}

.dim-detail-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.dim-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.dim-card-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.dim-card-name {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: normal !important;
}

.dim-card-pref {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.dim-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.dim-section-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 10px;
}

.dim-approach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.03);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  margin-bottom: 20px;
}

.dim-approach-grid strong {
  color: var(--text-main);
}

.dim-split-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .dim-split-lists {
    grid-template-columns: 1fr;
  }
}

.dim-subheading-green {
  font-size: 0.95rem;
  font-weight: 900;
  color: #2e7d32;
  margin-bottom: 8px;
}

.dim-subheading-red {
  font-size: 0.95rem;
  font-weight: 900;
  color: #d84315;
  margin-bottom: 8px;
}

.dim-bullet-list {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.dim-bullet-list li {
  position: relative;
  padding-inline-start: 16px;
  margin-bottom: 6px;
}

.dim-bullet-list li::before {
  content: '•';
  position: absolute;
  inset-inline-start: 0;
  color: var(--text-main);
  font-weight: 900;
}

/* ================= RESPONSIVE DESIGN (Media Queries) ================= */

/* Tablet & Medium Screens (<= 992px) */
@media (max-width: 992px) {
  .app-header {
    padding: 12px 18px;
  }

  main.container {
    padding: 24px 16px 50px;
  }

  .report-card-white,
  .report-card-petrol {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .vertical-bar-col {
    width: 80px;
  }

  .bar-pillar-wrap {
    width: 58px;
  }

  .bar-foot-title {
    font-size: 1.05rem;
  }
}

/* Mobile & Small Screens (<= 768px) */
@media (max-width: 768px) {
  header.app-header {
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .brand-wrapper {
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }

  .logo-badge {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .brand-title {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-controls {
    gap: 8px;
    flex-shrink: 0;
  }

  .theme-label-text {
    display: none;
  }

  .theme-select {
    width: auto;
    max-width: 100px;
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  .lang-toggle-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    gap: 4px;
  }

  /* Hero & Landing */
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .landing-dimensions-bar {
    gap: 8px;
    margin-bottom: 20px;
  }

  .landing-dim-pill {
    padding: 8px 12px;
    min-width: 75px;
    font-size: 0.85rem;
  }

  .welcome-hero .glass-panel {
    padding: 24px 20px;
    border-radius: 20px;
  }

  /* Quiz Screen */
  .quiz-set-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quiz-card-item {
    padding: 16px 18px;
    border-radius: 16px;
    gap: 14px;
  }

  .card-main-title {
    font-size: 1.2rem;
  }

  .card-sub-title {
    font-size: 0.85rem;
  }

  .rank-circle, .rank-circle-placeholder {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .dot-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  /* Report & Charts */
  .vertical-chart-area {
    padding-top: 40px;
    padding-bottom: 55px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chart-bars-plot {
    min-width: 320px;
    height: 160px;
  }

  .vertical-bar-col {
    width: 65px;
  }

  .bar-pillar-wrap {
    width: 46px;
  }

  .bar-score-num {
    font-size: 1.45rem;
    top: -28px;
  }

  .bar-foot-title {
    font-size: 0.92rem;
  }

  .bar-foot-sub {
    font-size: 0.75rem;
  }

  .primary-pill-title {
    font-size: 1.4rem;
  }

  .primary-pill-box {
    padding: 16px 18px;
  }

  .dimensions-detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dim-detail-card {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .dim-card-circle {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .dim-card-name {
    font-size: 1.25rem;
  }

  .report-tabs-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .report-tabs-nav .tab-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
  header.app-header {
    padding: 8px 10px;
    gap: 6px;
  }

  .brand-wrapper {
    gap: 6px;
  }

  .logo-badge {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .brand-title {
    display: none; /* Show PSI logo badge only on tiny screens to guarantee 100% space for Theme & Lang */
  }

  .header-controls {
    gap: 6px;
  }

  .theme-select {
    max-width: 86px;
    font-size: 0.76rem;
    padding: 4px 6px;
  }

  .lang-toggle-btn {
    padding: 4px 8px;
    font-size: 0.76rem;
    gap: 3px;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .vertical-bar-col {
    width: 55px;
  }

  .bar-pillar-wrap {
    width: 38px;
  }

  .bar-labels-wrap {
    bottom: -46px;
  }

  .btn-primary {
    padding: 12px 20px;
    font-size: 1rem;
  }

  .export-btn-group {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .btn-action-primary,
  .btn-action-accent,
  .btn-action-secondary {
    height: 38px;
    padding: 0 12px;
    font-size: 0.82rem;
  }
}


/* ================= REPORT ACTION BAR & EXPORT BUTTONS ================= */
.export-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Modern Segmented Action Button Architecture */
.btn-action-primary,
.btn-action-accent,
.btn-action-secondary {
  position: relative;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: normal !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  outline: none;
}

.btn-action-primary .btn-icon,
.btn-action-accent .btn-icon,
.btn-action-secondary .btn-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* 1. Primary Action: PDF Export (Modern Brand Solid with Inset Highlight) */
.btn-action-primary {
  background: var(--btn-main-bg);
  color: var(--btn-main-text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-action-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* 2. Accent Action: Social Card (Refined Glass Pill) */
.btn-action-accent {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.28);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.theme-royal-blue .btn-action-accent,
body.theme-emerald-gold .btn-action-accent,
body.theme-cyber-indigo .btn-action-accent,
body.theme-nordic-minimal .btn-action-accent {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-action-accent:hover {
  transform: translateY(-2px);
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28);
}

.btn-action-accent:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.2);
}

/* 3. Secondary Actions: Print & Retake (Glass-morphic Subtle Outlines) */
.btn-action-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-action-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--text-dim);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  filter: brightness(1.03);
}

.btn-action-secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Report Detail Tab Buttons (Modern Segmented Navigation) */
.report-tabs-nav {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.report-tabs-nav .tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: normal !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
  outline: none;
}

.report-tabs-nav .tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.report-tabs-nav .tab-btn.active {
  background: var(--card-bg);
  color: var(--text-main);
  border-color: var(--card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Backward compatibility classes */
.btn-export-pdf {
  background: var(--btn-main-bg);
  color: var(--btn-main-text);
}
.btn-social-card {
  background: #d97706;
  color: #ffffff;
}

/* Modal Overlay */
.psi-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.psi-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.psi-modal-dialog {
  background: #ffffff;
  border-radius: 24px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.psi-modal-overlay.active .psi-modal-dialog {
  transform: scale(1);
}

.psi-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
}

.psi-modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
}

.psi-modal-close {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.psi-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Premium Social Card Canvas Container */
.social-card-render-box {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #06403d 0%, #032523 100%);
  border-radius: 20px;
  padding: 28px 24px;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(6, 64, 61, 0.4);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.social-card-render-box::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.social-card-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.social-card-badge {
  background: #d97706;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.social-card-name {
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: 4px;
  color: #ffffff;
}

.social-card-style-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 14px;
  border-radius: 8px;
  color: #edd8b7;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.social-card-scores-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 10px;
  border-radius: 14px;
  margin-bottom: 18px;
  text-align: center;
}

.social-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-score-num {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.social-score-lbl {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

.social-card-quote {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.5;
  border-inline-start: 3px solid #d97706;
  padding-inline-start: 10px;
  margin-bottom: 16px;
}

.social-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

/* Modal Actions */
.modal-actions-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Toast Notification for progress */
.psi-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #06403d;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.psi-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ================= PORTAL REGISTRATION & JOURNEY ROADMAP ================= */
.pipeline-roadmap-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 18px 0 32px;
}

@media (max-width: 1024px) {
  .pipeline-roadmap-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .pipeline-roadmap-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.roadmap-step-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 160px;
  backdrop-filter: blur(12px);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-sizing: border-box;
}

body.lang-en .roadmap-step-card {
  text-align: center;
}

body.theme-light .roadmap-step-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.roadmap-step-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.roadmap-step-card.active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.18);
}

.roadmap-step-card.completed {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.roadmap-step-card.completed .roadmap-step-badge {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

body.theme-light .roadmap-step-card.completed {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

body.theme-light .roadmap-step-card.completed .roadmap-step-badge {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.roadmap-step-head {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.roadmap-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

body.theme-light .roadmap-step-badge {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

.roadmap-step-card.active .roadmap-step-badge {
  background: #fbbf24;
  border-color: #f59e0b;
  color: #020e0a;
}

.roadmap-step-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}

.roadmap-step-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
  letter-spacing: normal !important;
}

body.theme-light .roadmap-step-title {
  color: #0f172a;
}

.roadmap-step-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
  letter-spacing: normal !important;
}

body.theme-light .roadmap-step-desc {
  color: #64748b;
}

/* Centered & Balanced Registration Card */
.portal-registration-card {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  text-align: right;
  box-sizing: border-box;
}

body.lang-en .portal-registration-card {
  text-align: left;
}

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

.portal-card-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: normal !important;
}

.portal-card-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Registration Grid Inputs */
.registration-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 680px) {
  .registration-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group-full {
  grid-column: 1 / -1;
}

.portal-input-wrap {
  position: relative;
}

.portal-input-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 16px;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.7;
  pointer-events: none;
}

.portal-modern-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border-radius: 12px;
  background: var(--landing-input-bg);
  border: 1.5px solid var(--card-border);
  color: var(--landing-input-text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

body.lang-ar .portal-modern-input {
  padding: 0 46px 0 16px;
}

.portal-modern-input:focus {
  border-color: var(--b-color);
  box-shadow: 0 0 0 3px rgba(6, 64, 61, 0.15);
}

.portal-hint-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Session Active Notice Banner */
.session-status-banner {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  text-align: right;
}

body.lang-en .session-status-banner {
  text-align: left;
}

.session-status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-status-icon {
  font-size: 1.6rem;
}

.session-status-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #b45309;
}

.session-status-banner.session-status-completed {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.session-status-banner.session-status-completed .session-status-title {
  color: #10b981;
}

body.theme-petrol-teal .session-status-banner.session-status-completed .session-status-title,
body.theme-emerald-gold .session-status-banner.session-status-completed .session-status-title {
  color: #34d399;
}

body.theme-royal-blue .session-status-title,
body.theme-emerald-gold .session-status-title,
body.theme-cyber-indigo .session-status-title,
body.theme-nordic-minimal .session-status-title {
  color: #fbbf24;
}

.session-status-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Resume Modal Prompt */
.resume-modal-dialog {
  max-width: 520px;
  text-align: right;
}

body.lang-en .resume-modal-dialog {
  text-align: left;
}

.resume-progress-pill {
  background: rgba(6, 64, 61, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Attempts History Archive Modal */
.attempts-modal-dialog {
  max-width: 780px !important;
  width: 95% !important;
  background: var(--card-bg) !important;
  color: var(--text-main) !important;
  border: 1.5px solid var(--card-border) !important;
  border-radius: 24px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45) !important;
}

.attempt-card-item {
  background: rgba(6, 64, 61, 0.05);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.attempt-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
  border-color: var(--gold-primary);
}

.attempt-card-item.is-latest {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.03);
}

.attempt-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.attempt-stage-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.attempt-stage-pill.pending {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Print Only Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .app-header, .ambient-glow-1, .ambient-glow-2, #themeSelect, #langToggleBtn, .header-controls, .btn-secondary, #retakeAssessmentBtn, .export-btn-group, .psi-modal-overlay, .psi-toast {
    display: none !important;
  }
  .report-wrapper {
    max-width: 100% !important;
  }
  .report-card-white, .report-card-petrol, .dim-detail-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   Admin Sandbox Preview Mode Banner (Shared Across All Assessments)
   ========================================================================== */
.admin-sandbox-top-banner {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.95), rgba(180, 83, 9, 0.98));
  border-bottom: 2px solid #fbbf24;
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 99999;
  backdrop-filter: blur(12px);
  animation: bannerFadeDown 0.3s ease;
}
@keyframes bannerFadeDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.sandbox-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.sandbox-tag {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sandbox-note {
  color: #fef3c7;
  font-size: 0.82rem;
}
.sandbox-back-btn {
  background: #ffffff;
  color: #b45309;
  border: 1.5px solid #fbbf24;
  padding: 6px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sandbox-back-btn:hover {
  background: #fef3c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
@media (max-width: 768px) {
  .admin-sandbox-top-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 8px;
    text-align: center;
  }
  .sandbox-banner-content {
    justify-content: center;
  }
  .sandbox-back-btn {
    justify-content: center;
    width: 100%;
  }
}



/* === PETROL TEAL HARMONIOUS CARD & INPUT SYSTEM === */
body.theme-petrol-teal .welcome-hero .glass-panel,
body.theme-petrol-teal .portal-registration-card {
  background: rgba(4, 38, 36, 0.9) !important;
  border: 1.5px solid #0d9488 !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(13, 148, 136, 0.25) !important;
  color: #ffffff !important;
  border-radius: 20px !important;
}

body.theme-petrol-teal .portal-card-title {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

body.theme-petrol-teal .portal-card-subtitle {
  color: #cbd5e1 !important;
}

body.theme-petrol-teal .input-label {
  color: #5eead4 !important;
  font-weight: 800 !important;
}

body.theme-petrol-teal .portal-input-wrap {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1.5px solid rgba(13, 148, 136, 0.45) !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}

body.theme-petrol-teal .portal-modern-input {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

body.theme-petrol-teal .portal-modern-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

body.theme-petrol-teal .portal-hint-text {
  color: #94a3b8 !important;
}

body.theme-petrol-teal .portal-btn-submit {
  background: linear-gradient(135deg, #0d9488, #059669) !important;
  color: #ffffff !important;
  border: 1.5px solid #34d399 !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4) !important;
  border-radius: 12px !important;
}

body.theme-petrol-teal .portal-btn-submit:hover {
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.55) !important;
  transform: translateY(-2px) !important;
}

/* Dropdown Select & Options System */
body.theme-petrol-teal select {
  background-color: #042e2c;
  color: #ffffff;
}

body.theme-petrol-teal select option {
  background-color: #042e2c !important;
  color: #ffffff !important;
}

body.theme-light select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}
