/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #08080a;
  --bg-card: #111113;
  --bg-card-hover: #1a1a1e;
  --bg-input: #141416;
  --border: #2a2a2e;
  --text: #f0ece4;
  --text-muted: #8a8478;
  --primary: #d4a520;
  --primary-hover: #e8b92a;
  --primary-glow: rgba(212, 165, 32, 0.3);
  --success: #4ade80;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --font-main: 'MainFont', 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-secondary: 'SecondaryFont', -apple-system, system-ui, sans-serif;
}

@font-face {
  font-family: 'MainFont';
  src: url('/fonts/eb-garamond-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SecondaryFont';
  src: url('/fonts/Helvetica.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: var(--font-secondary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(212, 165, 32, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(212, 165, 32, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(212, 165, 32, 0.04) 0%, transparent 50%),
    repeating-conic-gradient(rgba(255, 255, 255, 0.01) 0% 25%, transparent 0% 50%) 0 0 / 60px 60px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ===== HERO ===== */
.hero {
  min-height: calc(88vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 100px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(212, 165, 32, 0.12) 0%, transparent 60%);
}

.hero-brand {
  width: 100%;
  padding: 0 24px;
  text-align: center;
}

.hero-brand__text {
  display: inline-block;
  width: 100%;
  font-family: var(--font-main);
  font-size: clamp(3rem, 11vw, 8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #000;
}

.hero-brand__subtitle {
  display: block;
  font-family: var(--font-secondary);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-body {
  padding: 40px 0 80px;
  text-align: center;
}

.hero-body h1 {
  font-size: 52px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(212, 165, 32, 0.12);
  border: 1px solid rgba(212, 165, 32, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-main);
  font-size: 5.25rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #1f1f1e, #d4d4d4, #535352);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== FEATURES ===== */
.features {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-main);
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 48px;
}

.features-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.feature-item {
  flex: 1;
  min-width: 260px;
  padding: 56px 60px;
  text-align: center;
  border-radius: 16px;
}

.feature-item h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.feature-item p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.feature-divider {
  width: 2px;
  min-height: 90px;
  background: linear-gradient(to bottom, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
  align-self: center;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .features-grid {
    flex-direction: column;
  }

  .feature-divider {
    width: 100%;
    height: 2px;
    min-height: auto;
    background: linear-gradient(to right, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
  }
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 80px 0;
}

.cta-box {
  background: linear-gradient(135deg, rgba(212, 165, 32, 0.15), rgba(212, 165, 32, 0.05));
  border: 1px solid rgba(212, 165, 32, 0.3);
  border-radius: 20px;
  padding: 60px;
  text-align: center;
}

.cta-box h2 {
  font-family: var(--font-main);
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .hero-brand__text {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .hero-brand__subtitle {
    font-size: clamp(0.85rem, 3.5vw, 1.2rem);
    letter-spacing: 0.08em;
  }

  .hero-body h1 {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 12px;
  }

  .section-title {
    font-size: 2.2rem;
    margin-bottom: 36px;
  }

  .feature-item {
    min-width: auto;
    padding: 40px 28px;
  }

  .feature-item h3 {
    font-size: 1.25rem;
  }

  .feature-item p {
    font-size: 1rem;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .cta-box h2 {
    font-size: 2.4rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }
}

/* ===== AUTH PAGES ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 40px 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CANDIDATE TEST PAGES ===== */
.test-card {
  --test-accent: var(--primary);
  --test-accent-glow: var(--primary-glow);
}

.test-card--connection {
  --test-accent: var(--success);
  --test-accent-glow: rgba(34, 197, 94, 0.3);
}

.test-card--typing {
  --test-accent: var(--primary);
  --test-accent-glow: var(--primary-glow);
}

.test-card--grammar {
  --test-accent: #8b5cf6;
  --test-accent-glow: rgba(139, 92, 246, 0.3);
}

.test-card--reasoning {
  --test-accent: var(--warning);
  --test-accent-glow: rgba(245, 158, 11, 0.3);
}

.test-card--comprehension {
  --test-accent: #06b6d4;
  --test-accent-glow: rgba(6, 182, 212, 0.3);
}

.test-card--profile {
  --test-accent: var(--success);
  --test-accent-glow: rgba(16, 185, 129, 0.3);
}

.auth-card.test-card {
  max-width: 700px;
}

.auth-card.test-card--wide {
  max-width: 750px;
}

.candidat-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #08080a;
  margin: 0 auto 16px;
  box-shadow: 0 4px 20px var(--test-accent-glow, var(--primary-glow));
}

.candidat-icon--avatar {
  background-image: url('/images/default-avatar.png');
  background-size: cover;
  background-position: center;
}

.candidat-icon--accent {
  background: var(--test-accent);
}

/* Progress bar */
.test-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0 10px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 70px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s;
}

.progress-step.active .step-number {
  background: var(--test-accent);
  border-color: var(--test-accent);
  color: #08080a;
  box-shadow: 0 0 16px var(--test-accent-glow);
}

.progress-step.done .step-number {
  background: var(--success);
  border-color: var(--success);
  color: #08080a;
}

.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.progress-step.active .step-label {
  color: var(--test-accent);
}

.progress-step.done .step-label {
  color: var(--success);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 22px;
  min-width: 20px;
  transition: background 0.3s;
}

.progress-line.done {
  background: var(--success);
}

/* Questions */
.test-question {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.test-question:last-of-type {
  border-bottom: none;
}

.question-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.question-number {
  background: var(--test-accent);
  color: #08080a;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.test-question textarea,
.test-question input[type="number"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.test-question textarea:focus,
.test-question input[type="number"]:focus {
  border-color: var(--test-accent);
  outline: none;
}

.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text);
  font-size: 0.9rem;
}

.mcq-option:hover {
  border-color: var(--test-accent);
  background: var(--test-accent-glow);
}

.mcq-option input[type="radio"] {
  accent-color: var(--test-accent);
  width: 16px;
  height: 16px;
}

/* Typing test */
.typing-source {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 0.95rem;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}

.typing-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.typing-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
}

.typing-metric .metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.typing-metric .metric-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--test-accent);
}

.typing-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 16px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.8;
  resize: none;
  transition: border-color 0.2s;
}

.typing-input:focus {
  border-color: var(--test-accent);
  outline: none;
}

/* Comprehension */
.comprehension-passage {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 4px solid var(--test-accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 0.93rem;
  color: var(--text);
}

.passage-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--test-accent);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Connection test */
.conn-intro {
  text-align: center;
  padding: 12px 0 24px;
}

.conn-running,
.conn-results {
  text-align: center;
  padding: 20px 0;
}

.conn-results.is-hidden,
.conn-running.is-hidden {
  display: none;
}

.conn-start {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.conn-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--test-accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: conn-spin 0.9s linear infinite;
}

@keyframes conn-spin {
  to {
    transform: rotate(360deg);
  }
}

.conn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.conn-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
}

.conn-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
}

.conn-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

.conn-verdict {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
}

.conn-good {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.conn-mid {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.conn-bad {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.conn-form {
  margin-top: 24px;
}

/* Utilities */
.test-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.test-hint--danger {
  color: var(--danger);
}

.test-submit {
  width: 100%;
  justify-content: center;
  margin-top: 20px;
}

.is-hidden {
  display: none !important;
}

.empty-state--sm {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}

@media (max-width: 500px) {
  .test-progress {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .test-progress::-webkit-scrollbar {
    display: none;
  }

  .step-label {
    font-size: 0.6rem;
  }

  .progress-step {
    min-width: 46px;
  }


  .typing-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .conn-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input+input {
  margin-top: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input {
  width: auto !important;
}

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--danger);
}

/* ===== PAGE CONTENT ===== */
.page-content {
  padding: 40px 0 80px;
  min-height: calc(100vh - 64px - 60px);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
}

.page-header p {
  color: var(--text-muted);
  width: 100%;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

/* ===== COURSES GRID ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  color: var(--text);
}

.course-card:hover {
  border-color: rgba(212, 165, 32, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(212, 165, 32, 0.1), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.course-thumb {
  height: 160px;
  background: linear-gradient(135deg, #141414, #1e1e1e);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
}

.course-category {
  background: rgba(212, 165, 32, 0.2);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.course-info {
  padding: 20px;
}

.course-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.course-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.difficulty {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: capitalize;
}

.difficulty-debutant {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
}

.difficulty-intermediaire {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
}

.difficulty-avance {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger);
}

.lesson-count {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.progress-bar-container {
  background: var(--bg-input);
  border-radius: 50px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-container.large {
  height: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #d4a520, #f0d060);
  border-radius: 50px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== COURSE DETAIL ===== */
.course-header {
  margin-bottom: 40px;
}

.course-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 8px;
  margin-bottom: 8px;
}

.course-header p {
  color: var(--text-muted);
}

.module-block {
  margin-bottom: 32px;
}

.module-header {
  margin-bottom: 16px;
}

.module-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.module-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 4px;
}

.module-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: all 0.2s;
}

.lesson-item:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.lesson-item.lesson-completed {
  border-color: rgba(0, 206, 201, 0.3);
}

.lesson-status {
  flex-shrink: 0;
}

.status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-icon.pending {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.status-icon.completed {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
}

.lesson-info {
  flex: 1;
}

.lesson-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.lesson-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.lesson-badges {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-quiz {
  background: rgba(212, 165, 32, 0.15);
  color: var(--primary);
}

.badge-video {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
}

.badge-published {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
}

.badge-draft {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
}

/* ===== LESSON PAGE ===== */
.lesson-page {
  max-width: 900px;
}

.lesson-page h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.lesson-module-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.video-wrapper #player-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
}

.video-watermark {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
  user-select: none;
  z-index: 10;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.3s;
}

.video-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Video loading overlay */
.video-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: opacity 0.4s ease;
}

.video-loading-overlay.hidden {
  display: none;
}

.video-loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  padding: 24px;
  max-width: 280px;
  width: 100%;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.loading-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.loading-percent {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

/* Video error overlay */
.video-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
}

.video-error-overlay.hidden {
  display: none;
}

.video-error-overlay .overlay-content p {
  margin-bottom: 16px;
}

.overlay-content {
  text-align: center;
  padding: 24px;
}

.overlay-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.overlay-content p {
  font-size: 1rem;
  color: var(--text-muted);
}

.video-progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.video-progress-info .progress-bar-container {
  flex: 1;
}

#video-progress-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 36px;
}

#video-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.text-success {
  color: var(--success) !important;
}

.lesson-description {
  margin-bottom: 40px;
}

.lesson-description h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lesson-description p {
  color: var(--text-muted);
}

/* ===== QUIZ ===== */
.quiz-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.quiz-header {
  margin-bottom: 28px;
}

.quiz-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.quiz-locked {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(255, 165, 2, 0.1);
  border: 1px solid rgba(255, 165, 2, 0.3);
  border-radius: var(--radius-sm);
  color: var(--warning);
  font-size: 0.9rem;
}

.quiz-form.locked {
  opacity: 0.5;
  pointer-events: none;
}

.quiz-question {
  margin-bottom: 28px;
}

.quiz-question h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.q-number {
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 38px;
}

.quiz-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-answer:hover {
  border-color: var(--primary);
}

.quiz-answer input[type="radio"] {
  accent-color: var(--primary);
}

.answer-text {
  font-size: 0.95rem;
}

.quiz-result {
  padding: 24px;
  border-radius: var(--radius);
  margin-top: 20px;
}

.quiz-result.hidden {
  display: none;
}

.quiz-passed {
  background: rgba(0, 206, 201, 0.1);
  border: 1px solid rgba(0, 206, 201, 0.3);
}

.quiz-passed h3 {
  color: var(--success);
}

.quiz-failed {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.quiz-failed h3 {
  color: var(--danger);
}

.next-lesson {
  margin-top: 40px;
  text-align: center;
}

/* ===== ADMIN ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-card-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
}

.stat-card-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-section {
  margin-top: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table thead {
  background: var(--bg-input);
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.admin-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.admin-form h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.module-admin-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.module-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.module-admin-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.lessons-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lesson-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  gap: 12px;
}

.lesson-admin-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

.inline-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.add-module-form {
  margin-top: 20px;
  border-style: dashed;
}

/* ===== QUIZ ADMIN ===== */
.question-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.answers-list {
  list-style: none;
  padding-left: 16px;
}

.answers-list li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.answers-list li.correct-answer {
  color: var(--success);
  font-weight: 600;
}

.add-question-form {
  border-style: dashed;
}

.text-muted {
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

/* ===== LOCKED LESSONS ===== */
.lesson-item.lesson-locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.lesson-item.lesson-locked:hover {
  border-color: var(--border);
  background: var(--bg-card);
}

.status-icon.locked {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
  font-size: 0.75rem;
}

.status-icon.in-progress {
  background: rgba(212, 165, 32, 0.15);
  color: var(--primary);
}

.locked-text {
  color: var(--warning) !important;
  font-size: 0.8rem;
  font-style: italic;
}

.badge-passed {
  background: rgba(0, 206, 201, 0.15);
  color: var(--success);
}

/* ===== COURSE COMPLETED BANNER ===== */
.course-completed-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08), rgba(212, 165, 32, 0.08));
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.banner-icon {
  font-size: 2.5rem;
}

.course-completed-banner h3 {
  color: var(--success);
  font-size: 1.2rem;
}

.course-completed-banner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== PROFILE ===== */
.profile-grid {
  display: grid;
  gap: 24px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.profile-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.alert-success {
  background: rgba(0, 206, 201, 0.1);
  border: 1px solid rgba(0, 206, 201, 0.3);
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== CERTIFICATES ===== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.certificate-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 206, 201, 0.3);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.certificate-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.certificate-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.certificate-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ===== CERTIFICATE PAGE ===== */
.certificate-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.certificate {
  width: 100%;
  max-width: 800px;
}

.cert-border {
  border: 3px solid;
  border-image: linear-gradient(135deg, #d4a520, #f0d060, #d4a520) 1;
  border-radius: 20px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(212, 165, 32, 0.05), rgba(212, 165, 32, 0.02));
}

.cert-inner {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 60px 48px;
  text-align: center;
  background: var(--bg-card);
}

.cert-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 16px;
  font-size: 1.8rem;
  font-weight: 900;
  color: white;
  margin-bottom: 24px;
}

.cert-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.cert-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 8px;
}

.cert-name {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #d4a520, #f0d060);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.cert-text {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cert-course {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.cert-details {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
}

.cert-detail {
  text-align: center;
}

.cert-detail-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.cert-detail-value {
  font-weight: 700;
  font-size: 1rem;
}

.cert-footer {
  display: flex;
  justify-content: center;
}

.cert-signature {
  text-align: center;
}

.cert-line {
  width: 160px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 8px;
}

.cert-signature span {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===== PRINT ===== */
@media print {

  .navbar,
  .footer,
  .back-link,
  button,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .cert-border {
    border-color: #d4a520;
  }

  .cert-inner {
    background: white;
    border-color: #ddd;
  }

  .cert-name {
    color: #d4a520;
    -webkit-text-fill-color: #d4a520;
  }

  .cert-title {
    color: #d4a520;
  }

  .page-content {
    padding: 0;
  }
}

/* ===== FOOTER ===== */
.footer {
  padding: 24px 0;
  border-top: 1px solid rgba(212, 165, 32, 0.15);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
/* ===== LESSON EDIT FORM ===== */
.lesson-edit-form {
  margin: 8px 0 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lesson-edit-form.hidden {
  display: none;
}

/* ===== CHAPTERS - ADMIN ===== */
.chapters-admin-block {
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  margin-bottom: 12px;
}

.chapters-admin-list {
  margin-bottom: 8px;
}

.chapter-admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  margin-bottom: 4px;
  font-size: 13px;
}

.chapter-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.chapter-admin-title {
  font-weight: 500;
  flex: 1;
}

.chapter-admin-time {
  font-size: 12px;
  white-space: nowrap;
}

.chapter-form {
  margin-top: 6px;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  border: none;
  cursor: pointer;
  line-height: 1.4;
}

/* ===== CHAPTERS - PLAYER ===== */
.chapters-section {
  margin-top: 24px;
}

.chapters-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.chapters-list-player {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
}

.chapter-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateX(4px);
}

.chapter-item.active {
  background: rgba(212, 165, 32, 0.08);
  border-color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.chapter-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(212, 165, 32, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.chapter-item.active .chapter-num {
  background: var(--primary);
  color: #000;
}

.chapter-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chapter-title {
  font-weight: 600;
  font-size: 14px;
}

.chapter-timestamp {
  font-size: 12px;
  color: var(--text-muted);
}

.chapter-play-btn {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}

.chapter-item:hover .chapter-play-btn {
  color: var(--primary);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3.3rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    flex-direction: column;
  }

  .inline-form input {
    width: 100%;
  }

  .lesson-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .lesson-badges {
    margin-top: 8px;
  }

  .module-admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-header,
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .lesson-admin-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-forms {
    grid-template-columns: 1fr;
  }

  .course-completed-banner {
    flex-direction: column;
    text-align: center;
  }

  .cert-inner {
    padding: 40px 24px;
  }

  .cert-name {
    font-size: 1.8rem;
  }

  .cert-details {
    flex-direction: column;
    gap: 16px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .chapters-admin-block {
    margin-left: 8px;
    padding-left: 10px;
  }

  .chapter-item {
    padding: 10px 12px;
  }
}

/* ===== DOCUMENT CONTENT ===== */
.document-content-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 20px;
}

.document-content {
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
}

.document-content h2,
.document-content h3,
.document-content h4 {
  color: var(--primary);
  margin: 24px 0 12px;
}

.document-content h2 {
  font-size: 1.4rem;
}

.document-content h3 {
  font-size: 1.2rem;
}

.document-content h4 {
  font-size: 1.05rem;
}

.document-content p {
  margin-bottom: 16px;
}

.document-content ul,
.document-content ol {
  margin: 0 0 16px 24px;
}

.document-content li {
  margin-bottom: 6px;
}

.document-content code {
  background: rgba(212, 165, 32, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary);
}

.document-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.document-content pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.document-content a {
  color: var(--primary);
  text-decoration: underline;
}

.document-content strong {
  color: #fff;
}

.document-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 16px 0;
  background: rgba(212, 165, 32, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.document-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.document-progress-info {
  margin-bottom: 24px;
}

.document-status.completed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-weight: 600;
}

.badge-doc {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #60a5fa !important;
}

.add-lesson-form {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.add-lesson-form .form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-lesson-form textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px;
  font-family: inherit;
  resize: vertical;
}

.add-lesson-form select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px;
}

/* ===== SIMULATOR - DASHBOARD ===== */
.sim-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.sim-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.sim-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.sim-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-global-progress {
  margin-bottom: 40px;
}

/* League cards grid */
.leagues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.league-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.league-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--league-color);
  opacity: 0.5;
}

.league-card.league-active {
  border-color: var(--league-color, var(--primary));
}

.league-card.league-active::before {
  opacity: 1;
}

.league-card.league-completed {
  border-color: rgba(74, 222, 128, 0.3);
}

.league-card.league-completed::before {
  background: var(--success);
  opacity: 1;
}

.league-card.league-locked {
  opacity: 0.5;
}

.league-card:not(.league-locked):hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--league-color) 15%, transparent);
}

.league-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.league-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.4rem;
  border: 2px solid;
}

.league-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.league-status-badge.completed {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}

.league-status-badge.in-progress {
  background: rgba(212, 165, 32, 0.15);
  color: var(--primary);
}

.league-status-badge.available {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.league-status-badge.locked {
  background: rgba(138, 132, 120, 0.15);
  color: var(--text-muted);
}

.league-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.league-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.league-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.league-locked-msg {
  margin-top: 16px;
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.league-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}

/* ===== SIMULATOR - LEAGUE DETAIL ===== */
.league-detail-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.league-icon-large {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2rem;
  border: 2px solid;
  flex-shrink: 0;
}

.league-detail-stats {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Scenarios list */
.scenarios-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scenario-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  gap: 24px;
}

.scenario-card:hover {
  border-color: rgba(212, 165, 32, 0.3);
  background: var(--bg-card-hover);
}

.scenario-card-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.scenario-number {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212, 165, 32, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.scenario-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.scenario-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.scenario-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 500;
}

.scenario-tag.difficulty-easy {
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
}

.scenario-tag.difficulty-medium {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.scenario-tag.difficulty-hard {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.scenario-objective {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.scenario-card-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.scenario-best-score {
  text-align: center;
}

.score-big {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
}

.score-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.scenario-attempts {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Objections */
.objections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.objection-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.objection-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.objection-text {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.5;
}

.objection-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== SIMULATOR - CHAT ===== */
.sim-chat-page {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.sim-sidebar {
  width: 320px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sim-fan-profile {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sim-fan-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  margin: 0 auto 10px;
}

.sim-fan-profile h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.sim-info-block {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sim-info-block h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sim-info-block p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.sim-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sim-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--bg-input);
  color: var(--text-muted);
}

.sim-stats-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sim-stat-mini {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.sim-stat-mini .val {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.sim-stat-mini .lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-objective {
  background: rgba(212, 165, 32, 0.08);
  border: 1px solid rgba(212, 165, 32, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.sim-objective p {
  color: var(--primary) !important;
  font-weight: 600;
}

.sim-msg-counter {
  text-align: center;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 16px;
}

.sim-msg-counter span {
  color: var(--primary);
  font-size: 1.2rem;
}

/* Chat main area */
.sim-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sim-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.sim-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.sim-chat-status {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Messages area */
.sim-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 70%;
  animation: msgIn 0.25s ease;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sim-msg-fan {
  align-self: flex-start;
}

.sim-msg-chatter {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.sim-msg-system {
  align-self: center;
  max-width: 100%;
}

.sim-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sim-msg-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.sim-msg-bubble.fan {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.sim-msg-bubble.chatter {
  background: var(--primary);
  color: #000;
  border-bottom-right-radius: 4px;
}

.sim-system-msg {
  text-align: center;
  padding: 12px 20px;
  background: rgba(212, 165, 32, 0.08);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  align-self: center;
}

/* Chat input */
.sim-chat-input {
  padding: 16px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.sim-chat-input form {
  display: flex;
  gap: 12px;
}

.sim-chat-input input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.sim-chat-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.sim-chat-input .btn {
  border-radius: 24px;
  padding: 14px 24px;
}

/* Typing indicator */
.sim-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  align-self: flex-start;
}

.sim-typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.sim-typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.sim-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.sim-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* ===== SIMULATOR - RESULTS ===== */
.results-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
}

.results-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--score-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--score-color) 8%, transparent);
}

.results-score-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--score-color);
}

.results-score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.results-info h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.results-verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.verdict-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
}

.verdict-badge.passed {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}

.verdict-badge.failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Score breakdown */
.results-scores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.result-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.result-score-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 12px;
}

.result-score-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 1s ease;
}

.result-score-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-score-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.result-score-val {
  font-weight: 800;
  font-size: 1.1rem;
}

/* Feedback */
.results-feedback {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.results-feedback h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.results-feedback p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Results meta */
.results-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.results-meta-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  flex: 1;
}

.results-meta-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.results-meta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Replay */
.results-replay {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* ===== RESPONSIVE - SIMULATOR ===== */
@media (max-width: 900px) {
  .sim-chat-page {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .sim-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 300px;
    overflow-y: auto;
  }

  .sim-chat-main {
    min-height: 60vh;
  }

  .sim-msg {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  .sim-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .leagues-grid {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .scenario-card-right {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
  }

  .results-scores-grid {
    grid-template-columns: 1fr;
  }

  .results-meta {
    flex-direction: column;
  }

  .results-actions {
    flex-direction: column;
  }

  .league-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .league-detail-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .objections-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== NEW ADMIN UI COMPONENTS ===== */

:root {
  --color-ink: #0e1116;
  --color-cloud: #ffffff;
  --color-edge: #e3e8ee;
  --color-mist: #5b6472;
  --color-signal: #2e7def;
}

/* --- Admin layout --- */
body.admin-ui {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f6fa;
  --bg-input: #ffffff;
  --border: #e3e8ee;
  --text: #0e1116;
  --text-muted: #5b6472;
  --primary: #0e1116;
  --primary-hover: #1a1f28;
  --primary-glow: rgba(14, 17, 22, 0.12);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  background: var(--bg);
  color: var(--color-ink);
}

body.admin-ui::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(#969696 1px, #f5f5f5 1px);
  background-size: 30px 30px;
  opacity: 0.35;
  pointer-events: none;
}

body.admin-ui::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(#0e1116 1.2px, transparent 1.2px),
    radial-gradient(#0e1116 1.16px, transparent 1.16px),
    radial-gradient(#0e1116 1.12px, transparent 1.12px),
    radial-gradient(#0e1116 1.08px, transparent 1.08px),
    radial-gradient(#0e1116 1.04px, transparent 1.04px);
  background-size: 30px 30px;
  opacity: 0;
  animation: fadeInBgDots 0.7s ease 1s forwards;
  transition: opacity 0.35s ease;
  -webkit-mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
  mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
}

body.admin-ui.halo-idle::after {
  opacity: 0 !important;
}

@keyframes fadeInBgDots {
  to {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .sim-chat-page {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .sim-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 300px;
    overflow-y: auto;
  }

  .sim-chat-main {
    min-height: 60vh;
  }

  .sim-msg {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  .sim-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .leagues-grid {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .scenario-card-right {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
  }

  .results-scores-grid {
    grid-template-columns: 1fr;
  }

  .results-meta {
    flex-direction: column;
  }

  .results-actions {
    flex-direction: column;
  }

  .league-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .league-detail-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .objections-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== NEW ADMIN UI COMPONENTS ===== */

:root {
  --color-ink: #0e1116;
  --color-cloud: #ffffff;
  --color-edge: #e3e8ee;
  --color-mist: #5b6472;
  --color-signal: #2e7def;
}

/* --- Admin layout --- */
body.admin-ui {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f6fa;
  --bg-input: #ffffff;
  --border: #e3e8ee;
  --text: #0e1116;
  --text-muted: #5b6472;
  --primary: #0e1116;
  --primary-hover: #1a1f28;
  --primary-glow: rgba(14, 17, 22, 0.12);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  background: var(--bg);
  color: var(--color-ink);
}

body.admin-ui::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(#969696 1px, #f5f5f5 1px);
  background-size: 30px 30px;
  opacity: 0.35;
  pointer-events: none;
}

body.admin-ui::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(#0e1116 1.2px, transparent 1.2px),
    radial-gradient(#0e1116 1.16px, transparent 1.16px),
    radial-gradient(#0e1116 1.12px, transparent 1.12px),
    radial-gradient(#0e1116 1.08px, transparent 1.08px),
    radial-gradient(#0e1116 1.04px, transparent 1.04px);
  background-size: 30px 30px;
  opacity: 0;
  animation: fadeInBgDots 0.7s ease 2.2s forwards;
  transition: opacity 0.35s ease;
  -webkit-mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
  mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
}

body.admin-ui.halo-idle::after {
  opacity: 0 !important;
}

@keyframes fadeInBgDots {
  to {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .sim-chat-page {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .sim-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 300px;
    overflow-y: auto;
  }

  .sim-chat-main {
    min-height: 60vh;
  }

  .sim-msg {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  .sim-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .leagues-grid {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .scenario-card-right {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
  }

  .results-scores-grid {
    grid-template-columns: 1fr;
  }

  .results-meta {
    flex-direction: column;
  }

  .results-actions {
    flex-direction: column;
  }

  .league-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .league-detail-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .objections-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== NEW ADMIN UI COMPONENTS ===== */

:root {
  --color-ink: #0e1116;
  --color-cloud: #ffffff;
  --color-edge: #e3e8ee;
  --color-mist: #5b6472;
  --color-signal: #2e7def;
}

/* --- Admin layout --- */
body.admin-ui {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f6fa;
  --bg-input: #ffffff;
  --border: #e3e8ee;
  --text: #0e1116;
  --text-muted: #5b6472;
  --primary: #0e1116;
  --primary-hover: #1a1f28;
  --primary-glow: rgba(14, 17, 22, 0.12);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  background: var(--bg);
  color: var(--color-ink);
}

body.admin-ui::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(#969696 1px, #f5f5f5 1px);
  background-size: 30px 30px;
  opacity: 0.35;
  pointer-events: none;
}

body.admin-ui::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(#0e1116 1.2px, transparent 1.2px),
    radial-gradient(#0e1116 1.16px, transparent 1.16px),
    radial-gradient(#0e1116 1.12px, transparent 1.12px),
    radial-gradient(#0e1116 1.08px, transparent 1.08px),
    radial-gradient(#0e1116 1.04px, transparent 1.04px);
  background-size: 30px 30px;
  opacity: 0;
  animation: fadeInBgDots 0.7s ease 2.2s forwards;
  transition: opacity 0.35s ease;
  -webkit-mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
  mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
}

body.admin-ui.halo-idle::after {
  opacity: 0 !important;
}

@keyframes fadeInBgDots {
  to {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .sim-chat-page {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .sim-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 300px;
    overflow-y: auto;
  }

  .sim-chat-main {
    min-height: 60vh;
  }

  .sim-msg {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  .sim-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .leagues-grid {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .scenario-card-right {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .results-header {
    flex-direction: column;
    text-align: center;
  }

  .results-scores-grid {
    grid-template-columns: 1fr;
  }

  .results-meta {
    flex-direction: column;
  }

  .results-actions {
    flex-direction: column;
  }

  .league-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .league-detail-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .objections-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== NEW ADMIN UI COMPONENTS ===== */

:root {
  --color-ink: #0e1116;
  --color-cloud: #ffffff;
  --color-edge: #e3e8ee;
  --color-mist: #5b6472;
  --color-signal: #2e7def;
}

/* --- Admin layout --- */
body.admin-ui {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f6fa;
  --bg-input: #ffffff;
  --border: #e3e8ee;
  --text: #0e1116;
  --text-muted: #5b6472;
  --primary: #0e1116;
  --primary-hover: #1a1f28;
  --primary-glow: rgba(14, 17, 22, 0.12);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  background: var(--bg);
  color: var(--color-ink);
}

body.admin-ui::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(#969696 1px, #f5f5f5 1px);
  background-size: 30px 30px;
  opacity: 0.35;
  pointer-events: none;
}

body.admin-ui::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(#0e1116 1.2px, transparent 1.2px),
    radial-gradient(#0e1116 1.16px, transparent 1.16px),
    radial-gradient(#0e1116 1.12px, transparent 1.12px),
    radial-gradient(#0e1116 1.08px, transparent 1.08px),
    radial-gradient(#0e1116 1.04px, transparent 1.04px);
  background-size: 30px 30px;
  opacity: 0;
  animation: fadeInBgDots 0.7s ease 2.2s forwards;
  transition: opacity 0.35s ease;
  -webkit-mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
  mask-image:
    radial-gradient(circle 70px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 42px, transparent 100%),
    radial-gradient(circle 115px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 65px, transparent 100%),
    radial-gradient(circle 165px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 110px, transparent 100%),
    radial-gradient(circle 220px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 90px, rgba(0, 0, 0, 1) 150px, transparent 100%),
    radial-gradient(circle 285px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 125px, rgba(0, 0, 0, 1) 200px, transparent 100%);
}

body.admin-ui.halo-idle::after {
  opacity: 0 !important;
}

@keyframes fadeInBgDots {
  to {
    opacity: 1;
  }
}


@media (max-width: 900px) {
  body.admin-ui::after {
    transition: opacity 0s ease;
    -webkit-mask-image:
      radial-gradient(circle 45px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 28px, transparent 100%),
      radial-gradient(circle 75px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 12px, rgba(0, 0, 0, 1) 45px, transparent 100%),
      radial-gradient(circle 110px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 30px, rgba(0, 0, 0, 1) 75px, transparent 100%),
      radial-gradient(circle 150px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 105px, transparent 100%),
      radial-gradient(circle 195px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 80px, rgba(0, 0, 0, 1) 140px, transparent 100%);
    mask-image:
      radial-gradient(circle 45px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 28px, transparent 100%),
      radial-gradient(circle 75px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 12px, rgba(0, 0, 0, 1) 45px, transparent 100%),
      radial-gradient(circle 110px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 30px, rgba(0, 0, 0, 1) 75px, transparent 100%),
      radial-gradient(circle 150px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 55px, rgba(0, 0, 0, 1) 105px, transparent 100%),
      radial-gradient(circle 195px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 80px, rgba(0, 0, 0, 1) 140px, transparent 100%);
  }

  body.admin-ui.halo-idle::after {
    transition: opacity 0.9s ease;
  }
}

body.admin-ui .page-content {
  padding-top: 250px;
  padding-bottom: 60px;
}

body.admin-ui .page-header h1 {
  font-family: var(--font-main);
  font-size: 3.6rem;
  font-weight: 400;
  color: var(--color-ink);
  letter-spacing: 0;
}

body.admin-ui .section-header h2 {
  font-family: var(--font-main);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--color-ink);
}

body.admin-ui .page-content a:not(.cir-btn):not(.cir-tabs__t):not(.admin-logo):not(.course-card):not(.lesson-item):not(.feature-card):not(.certificate-card):not(.league-card):not(.scenario-card) {
  color: var(--color-ink);
  text-decoration: none;
}

body.admin-ui .page-content a:not(.cir-btn):not(.cir-tabs__t):not(.admin-logo):not(.course-card):not(.lesson-item):not(.feature-card):not(.certificate-card):not(.league-card):not(.scenario-card):hover {
  color: var(--color-signal);
}

/* --- Floating admin navbar --- */
.admin-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 28px;
  pointer-events: none;
}

.admin-top-bar>* {
  pointer-events: auto;
}

.admin-nav-float {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  padding: 1px 1px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-edge);
  border-radius: 999px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04),
    0 10px 60px -4px rgba(14, 17, 22, 0.18);
  max-width: calc(100% - 32px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.admin-nav-float::-webkit-scrollbar {
  display: none;
}

.admin-logo {
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}

.admin-logo__img {
  height: 120px;
  width: auto;
  display: block;
}

.admin-logo__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--color-ink);
  color: var(--color-cloud);
  border-radius: 50%;
  font-weight: 900;
  font-size: 1rem;
}

/* --- Cirrus tabs (used as admin nav) --- */
.cir-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 5px;
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 999px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04),
    0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

.cir-tabs__t {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-mist);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cir-tabs__t:hover {
  color: var(--color-ink);
}

.cir-tabs__t.is-active {
  background: var(--color-ink);
  color: var(--color-cloud);
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.06),
    0 8px 18px -5px rgba(14, 17, 22, 0.5);
}

.cir-tabs__t:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 125, 239, 0.32);
}

/* --- Mobile navigation drawer --- */
.admin-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-edge);
  border-radius: 50%;
  box-shadow: 0 10px 30px -10px rgba(14, 17, 22, 0.15);
  cursor: pointer;
  pointer-events: auto;
  z-index: 1003;
}

.admin-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.admin-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.admin-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.admin-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.admin-nav-mobile {
  display: none;
}

.admin-top-bar__auth {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* --- Cirrus button --- */
.cir-btn {
  --ink: var(--color-ink, #0e1116);
  --cloud: var(--color-cloud, #ffffff);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cloud);
  font-family: 'SecondaryFont', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.06),
    0 14px 28px -18px rgba(14, 17, 22, 0.4);
  transition:
    transform 140ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cir-btn__arrow {
  width: 16px;
  height: 16px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cir-btn:hover {
  border-color: white;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.08),
    0 20px 36px -16px rgba(14, 17, 22, 0.48);
}

.cir-btn:hover .cir-btn__arrow {
  transform: translate(2px, -2px);
}

.cir-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(46, 125, 239, 0.32),
    0 14px 28px -18px rgba(14, 17, 22, 0.4);
}

.cir-btn:active {
  transform: translateY(1px);
}

.cir-btn--sm {
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
}

/* --- Cirrus stat cards --- */
.cir-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.cir-stat {
  padding: 22px 24px 18px;
  background: var(--color-cloud);
  border: 1px solid #00000024;
  border-radius: 28px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 50px -14px rgba(14, 17, 22, 0.18);
  font-family: 'SecondaryFont', system-ui, -apple-system, sans-serif;
  color: var(--color-ink);
}

.cir-stat:hover {
  box-shadow: 0 20px 50px -14px rgba(14, 17, 22, 0.18);
  border: 1px solid #2e2e2e18;
}

.cir-stat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cir-stat__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-mist);
}

.cir-stat__label svg {
  width: 16px;
  height: 16px;
}

.cir-stat__value {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 63px;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
}

/* --- Cirrus table --- */
.cir-table-wrap {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04),
    0 20px 40px -24px rgba(14, 17, 22, 0.18);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 24px;
}

.cir-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'SecondaryFont', system-ui, sans-serif;
  color: var(--color-ink);
}

.cir-table:hover {
  box-shadow: 0 20px 50px -14px rgba(14, 17, 22, 0.18);
  border: 1px solid #b9b9b924;
}

.cir-table thead {
  background: #f3f6fa;
}

.cir-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-mist);
  border-bottom: 1px solid var(--color-edge);
}

.cir-table td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-edge);
}

.cir-table tbody tr:last-child td {
  border-bottom: 0;
}

.cir-table tbody tr:hover {
  background: #f9fafc;
}

.cir-table a {
  color: white;
  text-decoration: none;
}

.cir-table a:hover {
  color: var(--color-signal);
}

/* --- Cirrus badges --- */
.cir-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--color-edge);
  background: #f3f6fa;
  color: var(--color-mist);
}

.cir-badge--published {
  background: #e8f5ee;
  border-color: #c3e9d4;
  color: #1b7a46;
}

.cir-badge--draft {
  background: #f3f6fa;
  border-color: var(--color-edge);
  color: var(--color-mist);
}

.cir-badge--admin {
  background: #eef3fd;
  border-color: #c8d9f7;
  color: var(--color-signal);
}

.cir-badge--chatteur {
  background: #fff6e8;
  border-color: #f9dfb2;
  color: #9a6b16;
}

.cir-badge--manager {
  background: #e9f7f0;
  border-color: #bfe6d4;
  color: #0f7a52;
}

.cir-badge--recruteur {
  background: #f3eefe;
  border-color: #ddcefa;
  color: #6b3fc0;
}

/* --- Page loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.page-loader.is-active {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.page-loader .spinner {
  position: relative;
  width: 32px;
  height: 32px;
}

.page-loader .spinner div {
  background: var(--color-ink);
}

/* --- Spinner component --- */
.spinner {
  position: absolute;
  width: 9px;
  height: 9px;
}

.spinner div {
  position: absolute;
  width: 10%;
  height: 200%;
  background: #000000;
  transform: rotate(calc(var(--rotation) * 1deg)) translate(0, calc(var(--translation) * 1%));
  animation: spinner-fzua35 1s calc(var(--delay) * 1s) infinite ease;
}

.spinner div:nth-child(1) {
  --delay: 0.1;
  --rotation: 36;
  --translation: 120;
}

.spinner div:nth-child(2) {
  --delay: 0.2;
  --rotation: 72;
  --translation: 120;
}

.spinner div:nth-child(3) {
  --delay: 0.3;
  --rotation: 108;
  --translation: 120;
}

.spinner div:nth-child(4) {
  --delay: 0.4;
  --rotation: 144;
  --translation: 120;
}

.spinner div:nth-child(5) {
  --delay: 0.5;
  --rotation: 180;
  --translation: 120;
}

.spinner div:nth-child(6) {
  --delay: 0.6;
  --rotation: 216;
  --translation: 120;
}

.spinner div:nth-child(7) {
  --delay: 0.7;
  --rotation: 252;
  --translation: 120;
}

.spinner div:nth-child(8) {
  --delay: 0.8;
  --rotation: 288;
  --translation: 120;
}

.spinner div:nth-child(9) {
  --delay: 0.9;
  --rotation: 324;
  --translation: 120;
}

.spinner div:nth-child(10) {
  --delay: 1;
  --rotation: 360;
  --translation: 120;
}

@keyframes spinner-fzua35 {

  0%,
  10%,
  20%,
  30%,
  50%,
  60%,
  70%,
  80%,
  90%,
  100% {
    transform: rotate(calc(var(--rotation) * 1deg)) translate(0, calc(var(--translation) * 1%));
  }

  50% {
    transform: rotate(calc(var(--rotation) * 1deg)) translate(0, calc(var(--translation) * 1.5%));
  }
}

/* --- Admin section blocks --- */
body.admin-ui .admin-section {
  margin-bottom: 48px;
}

body.admin-ui .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

body.admin-ui .section-header .cir-btn {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* --- Admin forms --- */
body.admin-ui .admin-form {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04),
    0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .form-group label,
body.admin-ui .admin-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--color-ink);
}

body.admin-ui .form-group input,
body.admin-ui .form-group textarea,
body.admin-ui .form-group select,
body.admin-ui .admin-form input:not([type="checkbox"]):not([type="radio"]),
body.admin-ui .admin-form textarea,
body.admin-ui .admin-form select {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--color-edge);
  border-radius: 12px;
  color: var(--color-ink);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.admin-ui .form-group input:focus,
body.admin-ui .form-group textarea:focus,
body.admin-ui .form-group select:focus,
body.admin-ui .admin-form input:focus,
body.admin-ui .admin-form textarea:focus,
body.admin-ui .admin-form select:focus {
  outline: none;
  border-color: var(--color-signal);
  box-shadow: 0 0 0 3px rgba(46, 125, 239, 0.15);
}

body.admin-ui .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--color-ink);
  font-weight: 500;
}

body.admin-ui .checkbox-label input {
  width: auto;
  accent-color: var(--color-signal);
}

body.admin-ui .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

body.admin-ui .module-admin-block,
body.admin-ui .question-block {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
}

body.admin-ui .module-admin-header,
body.admin-ui .question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

body.admin-ui .module-admin-header h3,
body.admin-ui .question-header h3,
body.admin-ui .admin-form h3 {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--color-ink);
}

body.admin-ui .lesson-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid var(--color-edge);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

body.admin-ui .lesson-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.admin-ui .text-muted {
  color: var(--color-mist);
}

body.admin-ui .badge-doc {
  background: #2563eb;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

body.admin-ui .chapters-admin-block {
  margin: 0 0 16px 16px;
  padding: 12px;
  background: #f9fafc;
  border: 1px dashed var(--color-edge);
  border-radius: 14px;
}

body.admin-ui .chapter-admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-edge);
  font-size: 0.88rem;
}

body.admin-ui .chapter-admin-item:last-child {
  border-bottom: none;
}

body.admin-ui .chapter-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

body.admin-ui .chapter-admin-title {
  flex: 1;
  color: var(--color-ink);
}

body.admin-ui .chapter-admin-time {
  color: var(--color-mist);
  font-size: 0.8rem;
}

body.admin-ui .inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.admin-ui .inline-form input,
body.admin-ui .inline-form select,
body.admin-ui .inline-form textarea {
  background: #ffffff;
  border: 1px solid var(--color-edge);
  border-radius: 10px;
  color: var(--color-ink);
  padding: 10px 12px;
  font-family: inherit;
}

body.admin-ui .inline-form input:focus,
body.admin-ui .inline-form select:focus,
body.admin-ui .inline-form textarea:focus {
  outline: none;
  border-color: var(--color-signal);
  box-shadow: 0 0 0 3px rgba(46, 125, 239, 0.12);
}

body.admin-ui .lesson-edit-form {
  background: #f9fafc;
  border: 1px solid var(--color-edge);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 16px 0;
}

body.admin-ui .lesson-edit-form.hidden {
  display: none;
}

body.admin-ui .add-module-form,
body.admin-ui .add-question-form,
body.admin-ui .add-lesson-form {
  border-style: dashed;
  background: #fafbfc;
}

body.admin-ui .answers-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.admin-ui .answers-list li {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1px solid var(--color-edge);
  border-radius: 10px;
  color: var(--color-ink);
  font-size: 0.9rem;
}

body.admin-ui .answers-list li.correct-answer {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
}

body.admin-ui .admin-form .btn,
body.admin-ui .admin-form button[type="submit"],
body.admin-ui .form-card button[type="submit"] {
  margin-top: 8px;
}

body.admin-ui .sim-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

body.admin-ui .sim-stat {
  background: #ffffff;
  border: 1px solid var(--color-edge);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

body.admin-ui .sim-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
}

body.admin-ui .sim-stat-label {
  font-size: 0.8rem;
  color: var(--color-mist);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.admin-ui .objection-category {
  display: inline-block;
  background: #f3f6fa;
  color: var(--color-ink);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

body.admin-ui .progress-bar-container {
  background: var(--color-edge);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

body.admin-ui .progress-bar-container.large {
  height: 12px;
}

body.admin-ui .progress-bar {
  background: var(--color-signal);
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* --- Quiz league admin --- */
.cir-btn--ghost {
  background: #ffffff;
  color: var(--color-ink);
  border: 1px solid var(--color-edge);
}

.cir-btn--ghost:hover {
  background: var(--color-cloud);
  border-color: var(--color-mist);
}

body.admin-ui .cir-btn--danger {
  background: #ffffff;
  color: var(--danger);
  border: 1px solid #fecaca;
}

body.admin-ui .cir-btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

body.admin-ui .quiz-admin-block {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

body.admin-ui .quiz-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

body.admin-ui .quiz-admin-header h3 {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--color-ink);
  margin: 0;
}

body.admin-ui .quiz-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-mist);
  font-size: 0.85rem;
  font-weight: 400;
}

body.admin-ui .situation-admin-block {
  background: #ffffff;
  border: 1px solid var(--color-edge);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

body.admin-ui .situation-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

body.admin-ui .situation-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

body.admin-ui .situation-text {
  margin: 4px 0 0;
  font-style: italic;
  color: var(--color-ink);
}

body.admin-ui .situation-text.empty {
  color: var(--color-mist);
}

body.admin-ui .question-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 8px 2px 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--color-mist);
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
}

body.admin-ui .question-option--correct {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
  font-weight: 600;
}

body.admin-ui .question-block .question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.admin-ui .question-block .question-main {
  flex: 1;
}

body.admin-ui .question-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Responsive admin --- */
@media (max-width: 1130px) {
  .admin-top-bar {
    padding: 16px 20px;
    justify-content: space-between;
    gap: 12px;
  }

  .admin-top-bar__auth {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .admin-nav-float {
    display: none;
  }

  .admin-nav-mobile {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    position: fixed;
    left: 16px;
    top: 130px;
    z-index: 1002;
    pointer-events: none;
    max-width: calc(100vw - 32px);
    padding-left: 5px;
  }

  .admin-nav-toggle {
    display: inline-flex;
    pointer-events: auto;
    flex-shrink: 0;
  }

  .admin-nav-mobile__panel {
    display: inline-flex;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-edge);
    border-radius: 999px;
    box-shadow: 0 10px 60px -4px rgba(14, 17, 22, 0.18);
    padding: 2px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition:
      max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.25s ease;
    pointer-events: auto;
  }

  .admin-nav-mobile.is-open .admin-nav-mobile__panel {
    max-width: calc(100vw - 90px);
    opacity: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .admin-nav-mobile.is-open .admin-nav-mobile__panel::-webkit-scrollbar {
    display: none;
  }

  .admin-nav-mobile__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 17, 22, 0.12);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: rgba(14, 17, 22, 0.6) 0px 2px 80px -15px;
  }

  .admin-nav-mobile.is-open .admin-nav-mobile__backdrop {
    opacity: 1;
    pointer-events: auto;
    border-radius: 25px;
  }

  .cir-tabs--mobile {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    background: var(--color-cloud);
    border: 1px solid var(--color-edge);
    border-radius: 999px;
    box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
    padding: 4px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .cir-tabs--mobile::-webkit-scrollbar {
    display: none;
  }

  .cir-tabs--mobile .cir-tabs__t {
    justify-content: center;
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  body.admin-ui .page-content {
    padding-top: 140px;
  }
}

@media (max-width: 640px) {
  .admin-logo__img {
    height: 80px;
  }

  .admin-nav-float {
    top: 140px;
  }

  body.admin-ui .page-content {
    padding-top: 220px;
  }

  .cir-tabs__t {
    padding: 0 8px;
    font-size: 11px;
    height: 32px;
  }

  .cir-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
  }

  .cir-stat {
    padding: 16px 12px;
    border-radius: 16px;
  }

  .cir-stat__label {
    font-size: 11px;
    gap: 4px;
  }

  .cir-stat__label svg {
    width: 14px;
    height: 14px;
  }

  .cir-stat__value {
    font-size: 28px;
  }

  .cir-search {
    width: 100%;
  }

  .cir-table th,
  .cir-table td {
    padding: 10px 12px;
  }
}

/* --- Public pages overrides (admin-ui theme) --- */
body.admin-ui .hero {
  background: transparent;
  padding-top: 250px;
}

body.admin-ui .hero-badge {
  background: var(--color-ink);
  color: var(--color-cloud);
  border-color: var(--color-ink);
}

body.admin-ui .hero h1,
body.admin-ui .section-title,
body.admin-ui .page-header h1 {
  color: var(--color-ink);
}

body.admin-ui .hero-subtitle,
body.admin-ui .stat-label,
body.admin-ui .module-header p,
body.admin-ui .lesson-module-label {
  color: var(--color-mist);
}

body.admin-ui .stat-number {
  color: var(--color-ink);
}

body.admin-ui .features {
  padding-top: 60px;
}

body.admin-ui .feature-item h3 {
  color: var(--color-ink);
}

body.admin-ui .feature-divider {
  background: linear-gradient(to bottom, transparent 0%, var(--color-edge) 20%, var(--color-edge) 80%, transparent 100%);
}

@media (max-width: 768px) {
  body.admin-ui .feature-divider {
    background: linear-gradient(to right, transparent 0%, var(--color-edge) 20%, var(--color-edge) 80%, transparent 100%);
  }
}

body.admin-ui .cta-box {
  background: var(--color-cloud);
  border-color: var(--color-edge);
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .cta-box h2 {
  color: var(--color-ink);
}

body.admin-ui .auth-page {
  min-height: calc(100vh - 154px);
  padding-top: 180px;
}

body.admin-ui .auth-card {
  background: var(--color-cloud);
  border-color: var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 80px -4px rgb(255 255 255 / 18%);
}

body.admin-ui .auth-card:hover {
  border: 1px solid #ffffffc0;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 80px -4px rgb(255 255 255 / 18%);
}

body.admin-ui .auth-header h1,
body.admin-ui .auth-form h3 {
  color: var(--color-ink);
}

body.admin-ui .auth-header p,
body.admin-ui .auth-footer {
  color: var(--color-mist);
}

body.admin-ui .form-group label {
  color: var(--color-ink);
}

body.admin-ui .form-group input,
body.admin-ui .form-group textarea,
body.admin-ui .form-group select {
  background: #ffffff;
  border-color: var(--color-edge);
  color: var(--color-ink);
  border-radius: 12px;
}

body.admin-ui .form-group input:focus,
body.admin-ui .form-group textarea:focus,
body.admin-ui .form-group select:focus {
  border-color: var(--color-signal);
  box-shadow: 0 0 0 3px rgba(46, 125, 239, 0.15);
}

/* --- Admin search --- */
.cir-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 320px;
  max-width: 100%;
  height: 48px;
  padding: 0 8px 0 18px;
  background: var(--color-cloud, #ffffff);
  border: 1px solid var(--color-edge, #e3e8ee);
  border-radius: 999px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.03),
    0 18px 36px -22px rgba(14, 17, 22, 0.18);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cir-search__icon {
  width: 16px;
  height: 16px;
  color: var(--color-mist, #5b6472);
  flex-shrink: 0;
}

.cir-search__field {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--color-ink, #0e1116);
}

.cir-search__field::placeholder {
  color: #8a93a3;
}

.cir-search:focus-within {
  border-color: var(--color-signal, #2e7def);
  box-shadow:
    0 0 0 3px rgba(46, 125, 239, 0.22),
    0 18px 36px -22px rgba(14, 17, 22, 0.2);
}

.admin-search__counter {
  font-size: 0.8rem;
  color: var(--color-mist);
  font-weight: 500;
  white-space: nowrap;
}

.admin-search-empty td {
  text-align: center;
  padding: 28px 20px;
  color: var(--color-mist);
  font-style: italic;
}

.admin-search-empty a {
  color: var(--color-signal, #2e7def);
  text-decoration: underline;
  font-weight: 500;
}

/* --- Loading button / pagination loader --- */
.cir-load {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 14px;
  background: var(--color-cloud, #ffffff);
  border: 1px solid var(--color-edge, #e3e8ee);
  border-radius: 999px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04),
    0 18px 36px -24px rgba(14, 17, 22, 0.18);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-ink, #0e1116);
}

.cir-load__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cir-load__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-signal, #2e7def);
  animation: cir-load-pulse 1.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.cir-load__dots i:nth-child(2) {
  background: var(--color-citrus, #ff7a3d);
  animation-delay: 0.16s;
}

.cir-load__dots i:nth-child(3) {
  background: var(--color-meadow, #2bc48a);
  animation-delay: 0.32s;
}

.cir-load__text {
  letter-spacing: -0.005em;
}

@keyframes cir-load-pulse {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

body.admin-ui .alert {
  background: var(--color-cloud);
  border-color: var(--color-edge);
  color: var(--color-ink);
  border-radius: 12px;
}

body.admin-ui .alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

body.admin-ui .alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

body.admin-ui .course-card {
  background: var(--color-cloud);
  border-color: var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .course-card:hover {
  border-color: var(--color-edge);
  box-shadow: 0 10px 40px rgba(14, 17, 22, 0.08), 0 4px 15px rgba(14, 17, 22, 0.06);
}

body.admin-ui .course-thumb {
  background: linear-gradient(135deg, #f3f6fa, #e3e8ee);
}

body.admin-ui .course-category {
  background: var(--color-ink);
  color: var(--color-cloud);
}

body.admin-ui .module-block {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .module-header h2 {
  color: var(--color-ink);
}

body.admin-ui .module-number {
  color: var(--color-mist);
}

body.admin-ui .lesson-item {
  background: #ffffff;
  border-color: var(--color-edge);
  border-radius: 12px;
}

body.admin-ui .lesson-item:hover {
  background: #f9fafc;
  border-color: var(--color-edge);
}

body.admin-ui .lesson-item.lesson-locked {
  opacity: 0.6;
}

body.admin-ui .lesson-completed {
  border-color: #bbf7d0;
}

body.admin-ui .status-icon.pending {
  background: #f3f6fa;
  color: var(--color-mist);
  border-color: var(--color-edge);
}

body.admin-ui .status-icon.completed {
  background: #f0fdf4;
  color: var(--success);
}

body.admin-ui .status-icon.in-progress {
  background: #fff6e8;
  color: #d97706;
}

body.admin-ui .status-icon.locked {
  background: #fff6e8;
  color: #d97706;
}

body.admin-ui .badge-quiz {
  background: #f3f6fa;
  color: var(--color-ink);
}

body.admin-ui .badge-video {
  background: #fff6e8;
  color: #d97706;
}

body.admin-ui .badge-doc,
body.admin-ui .badge-passed {
  background: #f0fdf4;
  color: #166534;
}

body.admin-ui .back-link {
  color: var(--color-mist);
}

body.admin-ui .back-link:hover {
  color: var(--color-ink);
}

body.admin-ui .course-completed-banner {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

body.admin-ui .course-completed-banner h3 {
  color: #166534;
}

body.admin-ui .document-content-wrapper {
  background: var(--color-cloud);
  border-color: var(--color-edge);
  border-radius: 20px;
}

body.admin-ui .document-content {
  color: var(--color-ink);
}

body.admin-ui .page-header,
body.admin-ui .section-header {
  background: rgba(248, 249, 252, 0.72);
  box-shadow: 0 0 40px 24px rgba(248, 249, 252, 0.72);
  border-radius: var(--radius);
  padding: 16px 20px;
}

body.admin-ui .page-header p {
  margin-bottom: 0;
}

body.admin-ui .hero {
  box-shadow: 0 0 60px 40px rgba(248, 249, 252, 0.7);
}

body.admin-ui .hero-subtitle,
body.admin-ui .hero-stats {
  background: rgba(248, 249, 252, 0.72);
  box-shadow: 0 0 30px 20px rgba(248, 249, 252, 0.72);
  border-radius: var(--radius);
  padding: 12px 16px;
}

body.admin-ui .quiz-section {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .quiz-header h2 {
  color: var(--color-ink);
}

body.admin-ui .quiz-locked {
  background: #fff6e8;
  color: #92400e;
}

body.admin-ui .quiz-answer {
  background: #ffffff;
  border-color: var(--color-edge);
  color: var(--color-ink);
}

body.admin-ui .quiz-answer:hover {
  border-color: var(--color-signal);
}

body.admin-ui .quiz-passed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

body.admin-ui .quiz-failed {
  background: #fef2f2;
  border-color: #fecaca;
}

body.admin-ui .quiz-failed h3 {
  color: #991b1b;
}

body.admin-ui .stat-card {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 28px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 50px -14px rgba(14, 17, 22, 0.18);
}

body.admin-ui .stat-card-number {
  color: var(--color-ink);
  font-family: var(--font-main);
  font-size: 63px;
  font-weight: 400;
}

body.admin-ui .stat-card-label {
  color: var(--color-mist);
}

body.admin-ui .profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

body.admin-ui .certificate-card {
  background: var(--color-cloud);
  border-color: var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .certificate {
  background: var(--color-cloud);
}

body.admin-ui .cert-inner {
  background: var(--color-cloud);
  border-color: var(--color-edge);
}

body.admin-ui .cert-title,
body.admin-ui .cert-name,
body.admin-ui .cert-course {
  color: var(--color-ink);
}

body.admin-ui .result-score-card {
  background: var(--color-cloud);
  border-color: var(--color-edge);
}

body.admin-ui .empty-state {
  color: var(--color-mist);
}

body.admin-ui .footer {
  border-color: var(--color-edge);
  color: var(--color-mist);
}

body.admin-ui .video-loading-overlay,
body.admin-ui .video-overlay,
body.admin-ui .video-error-overlay {
  color: var(--color-cloud);
}

.card-2 {
  width: 190px;
  height: 254px;
  border-radius: 30px;
  background: #e0e0e0;
  box-shadow: 15px 15px 30px #bebebe,
    -15px -15px 30px #ffffff;
}

/* ===== AETHER PRIMARY BTN ===== */
.aether-primary-btn {
  --color-ink: #1d1d1f;
  --color-ink-inverse: #f5f5f7;
  --color-surface-glass-strong: rgba(255, 255, 255, 0.75);
  --color-hairline: rgba(15, 23, 42, 0.08);
  --color-bevel-light: rgba(255, 255, 255, 0.9);
  --color-bevel-soft: rgba(255, 255, 255, 0.55);
  --color-accent-ring: rgba(10, 132, 255, 0.32);
  --glass-bevel-inset: inset 1.5px 1.5px 0 0 var(--color-bevel-light),
    inset -1px -1px 0 0 var(--color-bevel-soft),
    inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  --glass-shadow-resting: 0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 28px -10px rgba(15, 23, 42, 0.16);
  --glass-shadow-raised: 0 2px 4px rgba(15, 23, 42, 0.06),
    0 22px 44px -14px rgba(15, 23, 42, 0.22);
  --glass-bevel-pressed: inset 1px 1px 1px 0 rgba(15, 23, 42, 0.08),
    inset -1px -1px 0 0 var(--color-bevel-soft);
  --glass-blur: blur(20px) saturate(180%);
  --focus-ring: 0 0 0 3px var(--color-accent-ring);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.5, 1.6, 0.4, 1);
  --dur-fast: 140ms;
  --dur-med: 220ms;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 0.375rem 0 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.002em;
  color: var(--color-ink);
  background: var(--color-surface-glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--color-hairline);
  border-radius: 9999px;
  box-shadow: var(--glass-bevel-inset), var(--glass-shadow-resting);
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.aether-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--glass-bevel-inset), var(--glass-shadow-raised);
}

.aether-primary-btn:hover .aether-primary-btn__chip {
  transform: scale(1.06);
}

.aether-primary-btn:active {
  transform: scale(0.97);
  box-shadow: var(--glass-bevel-pressed), var(--glass-shadow-resting);
}

.aether-primary-btn:active .aether-primary-btn__chip {
  transform: scale(0.94);
}

.aether-primary-btn:focus-visible {
  outline: none;
  box-shadow: var(--glass-bevel-inset), var(--glass-shadow-raised),
    var(--focus-ring);
}

.aether-primary-btn__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 0.75rem;
  border-radius: 9999px;
  background: var(--color-ink);
  color: var(--color-ink-inverse);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform var(--dur-med) var(--ease-spring);
}

/* ===== ULTRA FLUID PAGE ENTRY ANIMATION ===== */
@keyframes fluidFadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content,
.auth-card,
.hero,
.features,
.cta-section,
.sim-chat-page,
.dashboard-content,
.profile-content,
.lesson-content {
  animation: fluidFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.features,
.dashboard-content,
.profile-content {
  animation-delay: 0.15s;
}

.cta-section {
  animation-delay: 0.3s;
}

/* ===== CANDIDATE LEAGUE QUIZ SHARED STYLES ===== */

/* Layout utilities */
.container--narrow {
  max-width: 900px;
}

.container--narrower {
  max-width: 760px;
}

.container--md {
  max-width: 800px;
}

.mt-4 {
  margin-top: 4px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-32 {
  margin-bottom: 32px;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.font-bold {
  font-weight: 700;
}

/* League accent (parent defines --league-color) */
.league-icon--colored {
  background: rgba(205, 127, 50, 0.12);
  background: color-mix(in srgb, var(--league-color, #cd7f32) 12%, transparent);
  color: var(--league-color, #cd7f32);
  border-color: color-mix(in srgb, var(--league-color, #cd7f32) 25%, transparent);
}

.league-title {
  color: var(--league-color);
}

.league-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.league-logo-img--large {
  width: 72px;
  height: 72px;
}

.progress-bar--league {
  background: linear-gradient(90deg, var(--league-color, #cd7f32), color-mix(in srgb, var(--league-color, #cd7f32) 70%, #ffffff));
}

/* Situation blocks */
.situation-block {
  background: #f8fafc;
  border-left: 3px solid var(--league-color, #cd7f32);
  border-radius: 0 12px 12px 0;
  padding: 16px;
  margin-bottom: 20px;
}

.situation-block--compact {
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 0 10px 10px 0;
}

.situation-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--league-color, #cd7f32);
  margin-bottom: 6px;
}

.situation-quote {
  margin: 0;
  font-style: italic;
  color: #334155;
  line-height: 1.55;
}

/* Quiz */
.quiz-question--accent {
  border-left: 3px solid var(--league-color, #cd7f32);
}

.quiz-question__title {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  color: #1e293b;
}

.quiz-timer-note {
  font-size: 0.85rem;
  color: #64748b;
}

.empty-state--sm {
  padding: 24px;
}

/* Result detailed blocks */
.question-block--compact {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.question-block__title {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #1e293b;
}

.question-block__meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 10px;
}

.answer-review {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 0.9rem;
}

.explanation-note {
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #475569;
}

.section-heading {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.border-left-success {
  border-left: 3px solid var(--success);
}

.border-left-danger {
  border-left: 3px solid var(--danger);
}

/* ===== CANDIDATE SIMULATOR IN ADMIN-UI THEME ===== */
/* Ces overrides adaptent les composants legacy du simulateur candidat au theme clair Cirrus. */

body.admin-ui .league-card {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .league-card:not(.league-locked):hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -14px rgba(14, 17, 22, 0.18);
}

body.admin-ui .league-card.league-active {
  border-color: var(--league-color, var(--color-edge));
}

body.admin-ui .league-card.league-completed {
  border-color: rgba(22, 163, 74, 0.3);
}

body.admin-ui .league-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.admin-ui .league-status-badge.completed {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

body.admin-ui .league-status-badge.in-progress {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

body.admin-ui .league-status-badge.available {
  background: rgba(46, 125, 239, 0.12);
  color: var(--color-signal);
}

body.admin-ui .league-status-badge.locked {
  background: rgba(91, 100, 114, 0.12);
  color: var(--color-mist);
}

body.admin-ui .badge-draft {
  background: rgba(91, 100, 114, 0.12);
  color: var(--color-mist);
}

body.admin-ui .league-locked-msg {
  color: var(--color-mist);
  background: #f3f6fa;
}

body.admin-ui .scenario-card {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .scenario-card:hover {
  border-color: var(--color-edge);
  background: var(--bg-card-hover);
}

body.admin-ui .scenario-number {
  background: #f3f6fa;
  color: var(--color-ink);
}

body.admin-ui .scenario-tag {
  background: #f3f6fa;
  color: var(--color-mist);
}

body.admin-ui .quiz-header {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
  padding: 28px;
}

body.admin-ui .quiz-question.quiz-question--accent {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .situation-block {
  background: #f8f9fc;
  border: 1px solid var(--color-edge);
  border-radius: 12px;
}

body.admin-ui .situation-label {
  color: var(--color-mist);
}

body.admin-ui .situation-quote {
  color: var(--color-ink);
}

body.admin-ui .results-header {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 20px;
  box-shadow: 0 1px 1px rgba(14, 17, 22, 0.04), 0 20px 40px -24px rgba(14, 17, 22, 0.18);
}

body.admin-ui .results-score-circle {
  background: #f8f9fc;
  border: 2px solid var(--color-edge);
}

body.admin-ui .verdict-badge.passed {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

body.admin-ui .verdict-badge.failed {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

body.admin-ui .question-block--compact {
  background: var(--color-cloud);
  border: 1px solid var(--color-edge);
  border-radius: 12px;
}

body.admin-ui .question-block__title {
  color: var(--color-ink);
}

body.admin-ui .question-block__meta {
  color: var(--color-mist);
}

body.admin-ui .answer-review {
  background: #f8f9fc;
  color: var(--color-ink);
}

body.admin-ui .explanation-note {
  background: #f8f9fc;
  border-left-color: var(--color-mist);
  color: var(--color-mist);
}

/* Scenarios */
.scenario-number--success {
  background: var(--success);
  color: #ffffff;
}

/* Responsive */
@media (max-width: 640px) {
  .league-logo-img {
    width: 40px;
    height: 40px;
  }

  .league-logo-img--large {
    width: 56px;
    height: 56px;
  }
}

/* ===== SCROLL REVEAL ===== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-body.reveal-on-scroll {
  opacity: 1;
  transform: none;
  filter: blur(4px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-body.reveal-on-scroll.is-visible {
  filter: blur(0);
}

.reveal-on-scroll:nth-child(1) {
  transition-delay: 0s;
}

.reveal-on-scroll:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal-on-scroll:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal-on-scroll:nth-child(4) {
  transition-delay: 0.3s;
}

.reveal-on-scroll:nth-child(5) {
  transition-delay: 0.4s;
}

.reveal-on-scroll:nth-child(6) {
  transition-delay: 0.5s;
}

/* Wave timing sync */
body.admin-ui::after {
  animation-delay: 1s !important;
}

/* ===== EXTRA SMALL DEVICES (Mobiles < 480px) ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-brand__text {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .hero-body h1 {
    font-size: 1.8rem;
  }

  .cta-box {
    padding: 30px 16px;
  }

  .cta-box h2 {
    font-size: 1.8rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .auth-page {
    padding: 24px 16px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .feature-item {
    padding: 30px 20px;
  }

  .lesson-page h1 {
    font-size: 1.6rem;
  }
}

/* ===== MOBILE HALO ===== */
@media (max-width: 768px) {
  body.admin-ui::after {
    transition: opacity 0.25s ease;
    -webkit-mask-image:
      radial-gradient(circle 25px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 15px, transparent 100%),
      radial-gradient(circle 45px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 8px, rgba(0, 0, 0, 1) 25px, transparent 100%),
      radial-gradient(circle 65px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 45px, transparent 100%),
      radial-gradient(circle 90px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 35px, rgba(0, 0, 0, 1) 65px, transparent 100%),
      radial-gradient(circle 120px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 50px, rgba(0, 0, 0, 1) 85px, transparent 100%);
    mask-image:
      radial-gradient(circle 25px at var(--halo-x, 50%) var(--halo-y, 50%), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 15px, transparent 100%),
      radial-gradient(circle 45px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 8px, rgba(0, 0, 0, 1) 25px, transparent 100%),
      radial-gradient(circle 65px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 20px, rgba(0, 0, 0, 1) 45px, transparent 100%),
      radial-gradient(circle 90px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 35px, rgba(0, 0, 0, 1) 65px, transparent 100%),
      radial-gradient(circle 120px at var(--halo-x, 50%) var(--halo-y, 50%), transparent 50px, rgba(0, 0, 0, 1) 85px, transparent 100%);
  }
}

/* ===== BOUTON QR CODE (acces mobile, desktop uniquement) ===== */
.qr-access {
  position: relative;
}

.qr-access__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--color-ink);
  border: 1px solid var(--color-edge);
}

.qr-access__popover[hidden] {
  display: none;
}

.qr-access__popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-edge);
  border-radius: 16px;
  box-shadow:
    0 1px 1px rgba(14, 17, 22, 0.04),
    0 10px 60px -4px rgba(14, 17, 22, 0.18);
}

.qr-access__popover img {
  width: 300px;
  height: auto;
  border-radius: 8px;
}

.qr-access__popover p {
  margin: 0;
  max-width: 200px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-mist);
}

@media (max-width: 1130px) {
  .qr-access {
    display: none;
  }
}

/* ===== GARDE ORDINATEUR : TEST DE FRAPPE ===== */
.typing-desktop-guard {
  display: none;
}

@media (max-width: 768px),
(pointer: coarse) and (hover: none) {
  .typing-desktop-guard {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .typing-desktop-guard__box {
    max-width: 420px;
    padding: 40px 32px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--color-edge);
    border-radius: 20px;
    box-shadow:
      0 1px 1px rgba(14, 17, 22, 0.04),
      0 10px 60px -4px rgba(14, 17, 22, 0.18);
  }

  .typing-desktop-guard__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    color: var(--color-signal);
    background: rgba(46, 125, 239, 0.08);
    border-radius: 50%;
  }

  .typing-desktop-guard__box h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    color: var(--color-ink);
  }

  .typing-desktop-guard__box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-mist);
  }
}