/*
 * Entretiens Annuels - moduloTech
 * Glassmorphism Design System + Gamification
 * Bootstrap 5.3.3 Flatly base + custom glass overlay
 */

/* ======================================
   CSS TOKENS / VARIABLES
   ====================================== */

:root {
  /* Brand palette */
  --mtech-primary: #2C3E50;
  --mtech-accent: #555DFF;

  /* Derived accent colors */
  --mtech-accent-light: color-mix(in srgb, var(--mtech-accent) 70%, white);
  --mtech-accent-dark: color-mix(in srgb, var(--mtech-accent) 80%, black);
  --mtech-accent-hero-start: color-mix(in srgb, var(--mtech-accent) 65%, #3498DB);

  /* Opacity tokens */
  --accent-2:  color-mix(in srgb, var(--mtech-accent)  2%, transparent);
  --accent-3:  color-mix(in srgb, var(--mtech-accent)  3%, transparent);
  --accent-4:  color-mix(in srgb, var(--mtech-accent)  4%, transparent);
  --accent-6:  color-mix(in srgb, var(--mtech-accent)  6%, transparent);
  --accent-8:  color-mix(in srgb, var(--mtech-accent)  8%, transparent);
  --accent-10: color-mix(in srgb, var(--mtech-accent) 10%, transparent);
  --accent-12: color-mix(in srgb, var(--mtech-accent) 12%, transparent);
  --accent-15: color-mix(in srgb, var(--mtech-accent) 15%, transparent);
  --accent-20: color-mix(in srgb, var(--mtech-accent) 20%, transparent);
  --accent-25: color-mix(in srgb, var(--mtech-accent) 25%, transparent);
  --accent-30: color-mix(in srgb, var(--mtech-accent) 30%, transparent);
  --accent-35: color-mix(in srgb, var(--mtech-accent) 35%, transparent);
  --accent-40: color-mix(in srgb, var(--mtech-accent) 40%, transparent);
  --accent-50: color-mix(in srgb, var(--mtech-accent) 50%, transparent);

  --mtech-success: #18BC9C;
  --mtech-info: #3498DB;
  --mtech-warning: #F39C12;
  --mtech-danger: #E74C3C;
  --mtech-secondary: #95A5A6;

  /* Glassmorphism tokens */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-elevated: rgba(255, 255, 255, 0.78);
  --glass-bg-inset: rgba(255, 255, 255, 0.35);
  --glass-blur: 16px;
  --glass-blur-heavy: 24px;
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
  --glass-shadow-elevated: 0 12px 48px rgba(44, 62, 80, 0.12);
  --glass-shadow-glow: 0 0 30px var(--accent-15);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, var(--mtech-accent), var(--mtech-accent-light));
  --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-success: linear-gradient(135deg, #18BC9C, #0ea5e9);
  --gradient-hero: linear-gradient(135deg, var(--mtech-accent-hero-start) 0%, var(--mtech-accent-dark) 50%, var(--mtech-accent) 100%);
  --gradient-card-border: linear-gradient(135deg, var(--accent-40), color-mix(in srgb, var(--mtech-accent-light) 20%, transparent), rgba(59, 130, 246, 0.3));

  /* Layout */
  --mtech-bg-light: #f0f2f5;
  --mtech-bg-card: #FFFFFF;
  --mtech-border: #E9ECEF;
  --mtech-text: #2D3436;
  --mtech-text-muted: #636E72;
  --mtech-radius: 16px;
  --mtech-radius-sm: 10px;
  --mtech-radius-lg: 20px;

  /* XP bar */
  --xp-bar-height: 3px;
  --xp-bar-color: var(--gradient-accent);
}

/* ======================================
   DARK MODE
   ====================================== */

[data-bs-theme="dark"] {
  /* Brand palette — brighter for dark backgrounds */
  --mtech-primary: #A0AEC0;
  --mtech-accent: #7B83FF;

  /* Semantic — vivid on dark */
  --mtech-success: #34D399;
  --mtech-info: #60A5FA;
  --mtech-warning: #FBBF24;
  --mtech-danger: #F87171;
  --mtech-secondary: #94A3B8;

  /* Glassmorphism — dark glass */
  --glass-bg: rgba(30, 30, 46, 0.65);
  --glass-bg-elevated: rgba(30, 30, 46, 0.82);
  --glass-bg-inset: rgba(30, 30, 46, 0.40);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --glass-shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.35);

  /* Layout */
  --mtech-bg-light: #121218;
  --mtech-bg-card: #1E1E2E;
  --mtech-border: #2A2A3C;
  --mtech-text: #E0E0E6;
  --mtech-text-muted: #9CA3AF;

  /* Gradients — keep functional, adjust tones */
  --gradient-hero: linear-gradient(135deg, color-mix(in srgb, var(--mtech-accent) 65%, #60A5FA) 0%, color-mix(in srgb, var(--mtech-accent) 80%, black) 50%, var(--mtech-accent) 100%);

  /* Bootstrap sync */
  --bs-body-bg: #121218;
  --bs-body-color: #E0E0E6;
  --bs-border-color: #2A2A3C;
  --bs-tertiary-bg: #1E1E2E;
  --bs-secondary-bg: #252536;
  color-scheme: dark;
}

/* Navbar dark override */
[data-bs-theme="dark"] .navbar-app {
  background: rgba(30, 30, 46, 0.85);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .navbar-app .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(224,224,230,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Table headers */
[data-bs-theme="dark"] .table-rows-container th {
  background: rgba(30, 30, 46, 0.7);
}

[data-bs-theme="dark"] .glass-table-card .table thead th {
  background: rgba(30, 30, 46, 0.6);
}

[data-bs-theme="dark"] .glass-table-card .table tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Progress bar background */
[data-bs-theme="dark"] .progress {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Welcome overlay */
[data-bs-theme="dark"] .welcome-overlay {
  background: rgba(18, 18, 24, 0.92);
}

/* Body orbs — subtler on dark */
[data-bs-theme="dark"] body::before,
[data-bs-theme="dark"] body::after {
  opacity: 0.2;
}

/* Trophy cards — dark mode */
[data-bs-theme="dark"] .trophy-name {
  color: #fff;
}

[data-bs-theme="dark"] .trophy-desc {
  color: rgba(255, 255, 255, 0.35);
}

[data-bs-theme="dark"] .badge-svg-wrap {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

/* Badge tooltip — dark mode */
[data-bs-theme="dark"] .hero-badge__tooltip {
  background: rgba(30, 30, 46, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .hero-badge__tooltip strong {
  color: #fff;
}

[data-bs-theme="dark"] .hero-badge__tooltip span {
  color: rgba(255, 255, 255, 0.55);
}

[data-bs-theme="dark"] .hero-badge__tooltip::after {
  border-top-color: rgba(30, 30, 46, 0.92);
}

/* Badge flip back — dark mode (darker silver) */
[data-bs-theme="dark"] .badge-flipper__back,
[data-bs-theme="dark"] .hero-badge__back {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.2) 0%, transparent 50%),
    linear-gradient(145deg, #8a8a8a 0%, #6a6a6a 30%, #555 50%, #6a6a6a 70%, #7a7a7a 100%);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.2),
    inset 0 -2px 6px rgba(0,0,0,0.3),
    0 4px 16px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.15);
}
[data-bs-theme="dark"] .badge-flipper__engrave-date,
[data-bs-theme="dark"] .hero-badge__engrave {
  background: linear-gradient(180deg, #555 0%, #3a3a3a 40%, #555 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 1px rgba(255,255,255,0.15);
}

/* Logo — light/dark swap */
.navbar-logo--dark { display: none; }

[data-bs-theme="dark"] .navbar-logo--light { display: none; }
[data-bs-theme="dark"] .navbar-logo--dark  { display: inline; }

/* Badge overrides for dark readability */
[data-bs-theme="dark"] .badge-not_started,
[data-bs-theme="dark"] .badge-not-started {
  color: #94A3B8;
}

[data-bs-theme="dark"] .badge-signed {
  color: var(--mtech-success);
}

/* Dropdown menus */
[data-bs-theme="dark"] .dropdown-menu {
  background: var(--mtech-bg-card);
  border-color: var(--glass-border);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.06);
}

/* Form controls */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--mtech-bg-card);
  border-color: var(--mtech-border);
  color: var(--mtech-text);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #252536;
  border-color: var(--mtech-accent);
  color: var(--mtech-text);
}

/* Section headers — accent instead of muted primary */
[data-bs-theme="dark"] .section-header h2,
[data-bs-theme="dark"] .section-header h3,
[data-bs-theme="dark"] .section-header h4 {
  color: var(--mtech-text);
}

/* Show page: section titles use text-primary via Bootstrap */
[data-bs-theme="dark"] .glass-card-static h4.text-primary {
  color: var(--mtech-accent) !important;
}

/* Table grid headers (edit page — table_rows questions) */
[data-bs-theme="dark"] .table-grid__header {
  background: rgba(30, 30, 46, 0.7);
}

[data-bs-theme="dark"] .table-grid__header-cell {
  color: var(--mtech-text);
}

/* Table grid row borders */
[data-bs-theme="dark"] .table-grid__row {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Show page: inline table with bg-light th */
[data-bs-theme="dark"] .table th.bg-light,
[data-bs-theme="dark"] th.bg-light {
  background-color: rgba(30, 30, 46, 0.7) !important;
  color: var(--mtech-text);
}

/* Bootstrap .table-bordered in dark */
[data-bs-theme="dark"] .table-bordered,
[data-bs-theme="dark"] .table-bordered th,
[data-bs-theme="dark"] .table-bordered td {
  border-color: var(--mtech-border);
}

/* Bootstrap .table in dark — body rows */
[data-bs-theme="dark"] .table {
  color: var(--mtech-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--mtech-border);
}

/* Theme toggle button */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mtech-text-muted);
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
}

.theme-toggle-btn:hover {
  color: var(--mtech-accent);
  background: var(--accent-6);
}

/* Toggle icon container — stacks both icons */
.theme-toggle-icons {
  position: relative;
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Both icons stacked, hidden by default */
.theme-icon {
  position: absolute;
  opacity: 0;
  transform: translateY(8px) rotate(30deg) scale(0.6);
  transition: none;
  pointer-events: none;
}

/* Active icon visible and centered */
.theme-icon--active {
  opacity: 1;
  transform: translateY(0) rotate(0deg) scale(1);
}

/* Setting = icon goes down + rotates out (coucher) */
.theme-icon--setting {
  animation: iconSet 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes iconSet {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(10px) rotate(-30deg) scale(0.5);
  }
}

/* Rising = icon comes up from below + rotates in (lever) */
.theme-icon--rising.theme-icon--active {
  animation: iconRise 0.4s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes iconRise {
  0% {
    opacity: 0;
    transform: translateY(10px) rotate(30deg) scale(0.5);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) rotate(-5deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

/* Smooth theme transition */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease !important;
}

/* ======================================
   BASE
   ====================================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--mtech-bg-light);
  color: var(--mtech-text);
  position: relative;
  min-height: 100vh;
}

/* Background orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.4;
}

body::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-25), transparent 70%);
  top: -100px;
  right: -100px;
  animation: floatOrb 20s ease-in-out infinite;
}

body::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(24, 188, 156, 0.2), transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: floatOrb 25s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -20px); }
  50% { transform: translate(-20px, 30px); }
  75% { transform: translate(20px, 20px); }
}

/* ======================================
   GLASS UTILITIES
   ====================================== */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius);
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-elevated);
}

.glass-elevated {
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-lg);
  box-shadow: var(--glass-shadow-elevated);
}

.glass-inset {
  background: var(--glass-bg-inset);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--mtech-radius-sm);
}

.glass-glow {
  box-shadow: var(--glass-shadow), var(--glass-shadow-glow);
}

/* No hover lift for static glass cards */
.glass-card-static {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius);
  box-shadow: var(--glass-shadow);
}

/* ======================================
   NAVBAR
   ====================================== */

.navbar-app {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(233, 236, 239, 0.6);
  position: relative;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.navbar-app .navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0;
}

.navbar-app .navbar-brand img {
  height: 26px;
  width: auto;
}

.navbar-app .nav-link {
  color: var(--mtech-text-muted);
  transition: color 0.2s ease, background 0.2s ease;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
}

.navbar-app .nav-link:hover {
  color: var(--mtech-text);
  background: var(--accent-6);
}

.navbar-app .nav-link.active {
  color: var(--mtech-accent);
  background: var(--accent-8);
}

/* XP bar at bottom of navbar */
.navbar-xp-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--xp-bar-height);
  background: var(--accent-8);
  overflow: hidden;
}

.navbar-xp-bar__fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 0 2px 2px 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar gamification items */
.navbar-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--gradient-accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.navbar-xp-text {
  color: var(--mtech-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.navbar-streak {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f59e0b;
}

.navbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  object-fit: cover;
  letter-spacing: 0.5px;
}

/* Light navbar toggler */
.navbar-app .navbar-toggler {
  border-color: var(--accent-20);
  padding: 4px 8px;
}

.navbar-app .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44,62,80,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Light navbar dropdown */
.navbar-app .dropdown-toggle {
  color: var(--mtech-text);
  font-size: 0.85rem;
  font-weight: 500;
}

.navbar-app .dropdown-toggle:hover {
  color: var(--mtech-accent);
}

.navbar-app .notification-badge {
  color: var(--mtech-text-muted);
}

.navbar-app .notification-badge:hover {
  color: var(--mtech-accent);
}

/* ======================================
   CARDS
   ====================================== */

.interview-card {
  border: none;
  border-radius: var(--mtech-radius);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.interview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.interview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-elevated);
}

.interview-card:hover::before {
  background: var(--gradient-card-border);
}

.interview-card .xp-earned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mtech-accent);
  background: var(--accent-8);
  padding: 2px 8px;
  border-radius: 12px;
}

.interview-card__countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mtech-accent);
  background: var(--accent-6);
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.interview-card__countdown--urgent {
  color: var(--mtech-danger);
  background: rgba(231, 76, 60, 0.1);
  font-weight: 700;
}

/* ======================================
   STATUS BADGES
   ====================================== */

.badge-not_started,
.badge-not-started {
  background: rgba(149, 165, 166, 0.2);
  color: #5D6D7E;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(149, 165, 166, 0.25);
}
.badge-in_progress,
.badge-in-progress {
  background: rgba(52, 152, 219, 0.15);
  color: var(--mtech-info);
  backdrop-filter: blur(4px);
}
.badge-submitted {
  background: rgba(243, 156, 18, 0.15);
  color: var(--mtech-warning);
  backdrop-filter: blur(4px);
}
.badge-reviewed {
  background: var(--accent-15);
  color: var(--mtech-accent);
  backdrop-filter: blur(4px);
}
.badge-validated {
  background: rgba(24, 188, 156, 0.15);
  color: var(--mtech-success);
  backdrop-filter: blur(4px);
}
.badge-signed {
  background: rgba(24, 188, 156, 0.15);
  color: #0d6e3f;
  backdrop-filter: blur(4px);
}

/* ======================================
   PROGRESS BARS
   ====================================== */

.progress {
  height: 8px;
  border-radius: 4px;
  background-color: rgba(233, 236, 239, 0.5);
  overflow: hidden;
}

.progress-bar {
  border-radius: 4px;
  background: var(--gradient-success);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmerBar 2s ease-in-out infinite;
}

@keyframes shimmerBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ======================================
   WIZARD
   ====================================== */

.wizard-sidebar {
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border-right: 1px solid var(--glass-border);
  min-height: calc(100vh - 60px);
}

.wizard-page-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--mtech-radius-sm);
  color: var(--mtech-text-muted);
  text-decoration: none;
  transition: all 0.25s ease;
  margin-bottom: 4px;
}

.wizard-page-item:hover {
  background: var(--accent-6);
  color: var(--mtech-text);
}

.wizard-page-item.active {
  background: var(--accent-10);
  color: var(--mtech-accent);
  font-weight: 600;
  box-shadow: 0 0 20px var(--accent-8);
}

.wizard-page-item .page-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--mtech-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.wizard-page-item.active .page-number {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 0 12px var(--accent-30);
}

.wizard-page-item.completed .page-number {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 0 12px rgba(24, 188, 156, 0.25);
}

.wizard-xp-info {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mtech-accent);
  margin-top: 8px;
}

/* ======================================
   QUESTION BLOCKS
   ====================================== */

.question-block {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--mtech-radius);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.question-block:focus-within {
  border-color: var(--accent-30);
  box-shadow: 0 0 24px var(--accent-8);
}

.question-block .form-label {
  font-weight: 600;
  color: var(--mtech-text);
}

/* Question answered state */
.question-block.question-answered {
  border-left: 3px solid var(--mtech-success);
  background: linear-gradient(90deg, rgba(24, 188, 156, 0.04) 0%, var(--glass-bg) 40%);
}

.answered-check {
  vertical-align: middle;
  opacity: 0.7;
}

/* ======================================
   RATING
   ====================================== */

.rating-option .btn-check:checked + .btn-outline-primary {
  background: var(--gradient-accent);
  border-color: var(--mtech-accent);
  color: white;
  box-shadow: 0 0 12px var(--accent-25);
}

/* ======================================
   TRI-EVAL
   ====================================== */

.tri-eval-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tri-eval-option {
  text-align: center;
  padding: 10px;
  border: 2px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--glass-bg-inset);
}

.tri-eval-option:hover {
  border-color: var(--mtech-accent);
}

.tri-eval-option.selected {
  border-color: var(--mtech-accent);
  background: var(--accent-10);
  box-shadow: 0 0 16px var(--accent-10);
}

/* ======================================
   TABLE ROWS
   ====================================== */

.table-rows-container {
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  overflow: hidden;
  background: var(--glass-bg);
}

.table-rows-container table {
  margin-bottom: 0;
}

.table-rows-container th {
  background: rgba(240, 242, 245, 0.7);
  font-weight: 600;
  font-size: 0.85rem;
}

.table-rows-container td {
  vertical-align: top;
}

.table-rows-container textarea {
  border: none;
  background: transparent;
  resize: vertical;
  min-height: 60px;
  width: 100%;
}

.table-rows-container textarea:focus {
  outline: none;
  background-color: var(--accent-3);
}

/* ======================================
   FEELING CARDS (single choice)
   ====================================== */

.feeling-option {
  display: block;
  padding: 16px;
  border: 2px solid var(--glass-border);
  border-radius: var(--mtech-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
  background: var(--glass-bg-inset);
}

.feeling-option:hover {
  border-color: var(--mtech-accent);
  background: var(--accent-4);
}

.feeling-option.selected,
.feeling-option input:checked ~ .feeling-content {
  border-color: var(--mtech-accent);
  background: var(--accent-8);
}

.feeling-option input[type="radio"] {
  display: none;
}

/* ======================================
   QUESTION HINT (inline callout)
   ====================================== */

.question-hint {
  background: var(--accent-3);
  border-left: 3px solid var(--mtech-accent);
  border-radius: 0 var(--mtech-radius-sm) var(--mtech-radius-sm) 0;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.question-hint__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--mtech-accent);
  margin-bottom: 0.35rem;
}

.question-hint__body {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--mtech-text-muted);
}

.question-hint__body span {
  display: block;
}

.question-hint__body span + span {
  margin-top: 0.25rem;
}

.question-hint__eval-legend {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.question-hint__eval-line {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.question-hint__eval-line strong {
  font-weight: 600;
}

.question-hint__eval-line.active {
  background: var(--accent-8);
  color: var(--mtech-text);
  font-weight: 600;
}

/* ======================================
   COACH TIP (collapsible coaching advice — manager view)
   ====================================== */

.coach-tip {
  margin-bottom: 0.75rem;
}

.coach-tip__header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mtech-accent);
  background: var(--accent-6);
  border-radius: 20px;
}

.coach-tip__body {
  margin-top: 10px;
  padding: 14px 18px;
  background: var(--accent-3);
  border-left: 3px solid var(--mtech-accent);
  border-radius: 0 var(--mtech-radius-sm) var(--mtech-radius-sm) 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--mtech-text-muted);
  animation: coachTipReveal 0.25s ease;
}

.coach-tip__body ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.coach-tip__body ul li + li {
  margin-top: 0.2rem;
}

/* Warning variant */
.coach-tip--warning .coach-tip__header {
  color: var(--mtech-warning);
  background: color-mix(in srgb, var(--mtech-warning) 8%, transparent);
}

.coach-tip--warning .coach-tip__body {
  border-left-color: var(--mtech-warning);
  background: color-mix(in srgb, var(--mtech-warning) 4%, transparent);
}

/* Example blocks inside coach tips (good/bad synthèse) */
.coach-tip__example {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--mtech-radius-sm);
  font-size: 0.8rem;
  line-height: 1.6;
}

.coach-tip__example--good {
  background: color-mix(in srgb, var(--mtech-success) 6%, transparent);
  border-left: 2px solid var(--mtech-success);
}

.coach-tip__example--bad {
  background: color-mix(in srgb, var(--mtech-danger) 6%, transparent);
  border-left: 2px solid var(--mtech-danger);
}

.coach-tip__example-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.coach-tip__example--good .coach-tip__example-label {
  color: var(--mtech-success);
}

.coach-tip__example--bad .coach-tip__example-label {
  color: var(--mtech-danger);
}

@keyframes coachTipReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======================================
   COACH ALERT (contextual coaching feedback — manager view)
   ====================================== */

.coach-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-top: 8px;
  border-radius: 0 var(--mtech-radius-sm) var(--mtech-radius-sm) 0;
  border-left: 3px solid;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--mtech-text);
  animation: coachTipReveal 0.3s ease;
}

.coach-alert__icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.coach-alert--danger {
  background: color-mix(in srgb, var(--mtech-danger) 6%, transparent);
  border-left-color: var(--mtech-danger);
}

.coach-alert--danger .coach-alert__icon { color: var(--mtech-danger); }

.coach-alert--warning {
  background: color-mix(in srgb, var(--mtech-warning) 6%, transparent);
  border-left-color: var(--mtech-warning);
}

.coach-alert--warning .coach-alert__icon { color: var(--mtech-warning); }

.coach-alert--success {
  background: color-mix(in srgb, var(--mtech-success) 6%, transparent);
  border-left-color: var(--mtech-success);
}

.coach-alert--success .coach-alert__icon { color: var(--mtech-success); }

.coach-alert--info {
  background: color-mix(in srgb, var(--mtech-info) 6%, transparent);
  border-left-color: var(--mtech-info);
}

.coach-alert--info .coach-alert__icon { color: var(--mtech-info); }

.coach-alert--purple {
  background: color-mix(in srgb, #7c3aed 8%, transparent);
  border-left-color: #7c3aed;
}

.coach-alert--purple .coach-alert__icon { color: #7c3aed; }

/* ======================================
   AUTOSAVE INDICATOR
   ====================================== */

.autosave-indicator {
  font-size: 0.75rem;
  color: var(--mtech-text-muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.autosave-indicator.saving {
  opacity: 1;
  color: var(--mtech-warning);
}

.autosave-indicator.saved {
  opacity: 1;
  color: var(--mtech-success);
  animation: fadeOut 2s ease 1s forwards;
}

.autosave-indicator.error {
  opacity: 1;
  color: var(--mtech-danger);
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* ======================================
   AUTH PAGE
   ====================================== */

.auth-container {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 40%, #24243e 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Animated floating orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.auth-orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-40), transparent 70%);
  top: -15%;
  left: -10%;
  animation: authFloat1 20s ease-in-out infinite;
}

.auth-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, color-mix(in srgb, var(--mtech-accent-light) 30%, transparent), transparent 70%);
  bottom: -10%;
  right: -8%;
  animation: authFloat2 25s ease-in-out infinite;
}

.auth-orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(52, 152, 219, 0.25), transparent 70%);
  top: 50%;
  left: 60%;
  animation: authFloat3 18s ease-in-out infinite;
}

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

@keyframes authFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, -30px) scale(1.05); }
  66% { transform: translate(40px, -50px) scale(0.9); }
}

@keyframes authFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.15); }
}

/* Glass card */
.auth-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: authSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

/* Logo icon */
.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px var(--accent-40);
}

/* Typography */
.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.auth-brand {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: color-mix(in srgb, var(--mtech-accent-light) 90%, transparent);
  margin-bottom: 1rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Login button */
.auth-btn {
  background: linear-gradient(135deg, var(--mtech-accent) 0%, var(--mtech-accent-light) 50%, var(--mtech-accent) 100%) !important;
  background-size: 200% 100% !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 0.85rem 1.5rem !important;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #fff !important;
  position: relative;
  overflow: hidden;
  transition: background-position 0.4s ease, box-shadow 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 20px var(--accent-35);
}

.auth-btn:hover {
  background-position: 100% 0 !important;
  box-shadow: 0 8px 32px var(--accent-50);
  transform: translateY(-1px);
}

.auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px var(--accent-30);
}

.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.auth-btn:hover::after {
  transform: translateX(100%);
}

.auth-btn__ms-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  white-space: nowrap;
}

/* Footer */
.auth-footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Auth alerts */
.auth-card .alert {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.85rem;
}

.auth-card .alert-danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.1);
}

.auth-card .alert-success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.1);
}

/* Entrance animation */
@keyframes authSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile adjustments */
@media (max-width: 576px) {
  .auth-card {
    margin: 1rem;
    padding: 2rem !important;
    border-radius: 20px;
  }
  .auth-title {
    font-size: 1.4rem;
  }
  .auth-orb { filter: blur(40px); }
  .auth-orb--1 { width: 300px; height: 300px; }
  .auth-orb--2 { width: 250px; height: 250px; }
  .auth-orb--3 { width: 200px; height: 200px; }
}

/* ======================================
   FLASH MESSAGES
   ====================================== */

.flash-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

/* ---- Liquid Glass Toast ---- */

.liquid-toast {
  --toast-color: var(--mtech-info);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--mtech-radius);
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--glass-shadow-elevated),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--mtech-text);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(30px) scale(0.96);
  transition: none;
}

.liquid-toast--visible {
  animation: liquidToastIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.liquid-toast--exit {
  animation: liquidToastOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* Colored glow behind the toast */
.liquid-toast::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--toast-color) 25%, transparent),
    transparent 60%
  );
  z-index: -1;
  opacity: 0.6;
}

/* Subtle inner highlight (glass refraction) */
.liquid-toast::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 100%
  );
  pointer-events: none;
}

/* Icon */
.liquid-toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--toast-color) 15%, transparent);
  color: var(--toast-color);
}

.liquid-toast__icon i,
.liquid-toast__icon svg {
  width: 18px;
  height: 18px;
}

/* Body */
.liquid-toast__body {
  flex: 1;
  font-weight: 500;
}

/* Close button */
.liquid-toast__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--mtech-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.liquid-toast__close:hover {
  background: color-mix(in srgb, var(--mtech-text) 10%, transparent);
  color: var(--mtech-text);
}

.liquid-toast__close i,
.liquid-toast__close svg {
  width: 14px;
  height: 14px;
}

/* Progress bar (auto-dismiss countdown) */
.liquid-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--toast-color);
  border-radius: 0 0 var(--mtech-radius) var(--mtech-radius);
  transform-origin: left;
  animation: liquidToastProgress 5s linear forwards;
  opacity: 0.5;
}

/* Variant colors */
.liquid-toast--success { --toast-color: var(--mtech-success); }
.liquid-toast--danger  { --toast-color: var(--mtech-danger); }
.liquid-toast--warning { --toast-color: var(--mtech-warning); }
.liquid-toast--info    { --toast-color: var(--mtech-info); }

/* Animations */
@keyframes liquidToastIn {
  0% {
    opacity: 0;
    transform: translateX(30px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes liquidToastOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(40px) scale(0.92);
  }
}

@keyframes liquidToastProgress {
  0%   { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* ======================================
   NOTIFICATION BADGE
   ====================================== */

.notification-badge {
  position: relative;
}

.notification-badge .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.65rem;
  padding: 2px 5px;
}

/* ======================================
   SECTION HEADER
   ====================================== */

.section-header {
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent-15);
}

.section-header h3,
.section-header h2 {
  color: var(--mtech-primary);
  font-weight: 700;
}

/* ======================================
   DASHBOARD
   ====================================== */

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-weight: 700;
  color: var(--mtech-primary);
}

/* Hero section */
.dashboard-hero {
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-lg);
  box-shadow: var(--glass-shadow-elevated);
  padding: 2rem;
  margin-bottom: 2rem;
}

.dashboard-hero .hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.dashboard-hero .hero-stat {
  text-align: center;
}

.dashboard-hero .hero-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-hero .hero-stat-label {
  font-size: 0.75rem;
  color: var(--mtech-text-muted);
  font-weight: 500;
}

/* Hero badges — shaped trophies */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 10px 0;
}

.hero-badge {
  position: relative;
  width: 66px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.hero-badge__svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge__svg svg {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.hero-badge:hover {
  transform: translateY(-3px) scale(1.08);
  z-index: 10;
}

.hero-badge:hover .hero-badge__svg svg {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.hero-badge__emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 21px;
  line-height: 1;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  user-select: none;
}

/* Tooltip — glass */
.hero-badge__tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--mtech-text);
  padding: 8px 14px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 0.8125rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 10;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-badge__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.88);
}

.hero-badge__tooltip strong {
  font-weight: 600;
  font-size: 0.8125rem;
}

.hero-badge__tooltip span {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--mtech-text-muted);
}

.hero-badge:hover .hero-badge__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.hero-badges-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mtech-accent);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.hero-badges-link:hover {
  gap: 8px;
  color: var(--mtech-accent-dark);
}

/* Collaborator row */
.collaborator-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(233, 236, 239, 0.3);
  transition: background 0.15s ease;
  color: inherit;
}
.collaborator-row:last-of-type {
  border-bottom: none;
}
.collaborator-row:hover {
  background: var(--accent-2);
  color: inherit;
}
.collaborator-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  object-fit: cover;
  flex-shrink: 0;
}
.collaborator-row__info {
  flex: 1;
  min-width: 0;
}
.collaborator-row__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mtech-text);
}
.collaborator-row__meta {
  display: flex;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--mtech-text-muted);
  margin-top: 2px;
}
.collaborator-row__badges {
  flex-shrink: 0;
}
.collaborator-row__xp {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mtech-accent);
  display: flex;
  align-items: center;
}
.collaborator-row__count {
  flex-shrink: 0;
}

/* Mini hero badges for tables */
.hero-badge--sm {
  width: 28px;
  height: 30px;
}
.hero-badge--sm .hero-badge__svg svg {
  width: 28px;
  height: 28px;
}
.hero-badge--sm .hero-badge__tooltip {
  white-space: nowrap;
  font-size: 0.7rem;
  padding: 4px 8px;
  bottom: calc(100% + 6px);
}

@keyframes shapeShimmer {
  0%   { background-position: 200% 0, 0 0; }
  100% { background-position: -50% 0, 0 0; }
}

@keyframes checkPop {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ======================================
   GAMIFICATION - XP BAR
   ====================================== */

.xp-bar {
  position: relative;
  height: 8px;
  background: var(--accent-10);
  border-radius: 4px;
  overflow: hidden;
}

.xp-bar--navbar {
  height: 4px;
  max-width: 80px;
}

.xp-bar__fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.xp-bar__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerBar 2.5s ease-in-out infinite;
}

.xp-bar__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--mtech-text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ======================================
   GAMIFICATION - LEVEL BADGE
   ====================================== */

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--gradient-accent);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 12px var(--accent-30);
}

.level-badge--gold {
  background: var(--gradient-gold);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

/* ======================================
   GAMIFICATION - ACHIEVEMENT CARDS
   ====================================== */

.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border-radius: var(--mtech-radius);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  text-align: center;
  min-width: 110px;
  transition: all 0.3s ease;
}

.achievement-card.earned {
  box-shadow: 0 4px 20px var(--accent-12);
}

.achievement-card.earned .achievement-icon {
  background: var(--gradient-accent);
  color: white;
  animation: shimmerBadge 3s ease-in-out infinite;
}

.achievement-card.locked {
  opacity: 0.5;
  filter: grayscale(0.4);
}

.achievement-card.locked .achievement-icon {
  background: rgba(149, 165, 166, 0.15);
  color: var(--mtech-secondary);
}

.achievement-icon {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.achievement-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mtech-text);
  line-height: 1.2;
}

@keyframes shimmerBadge {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 16px 4px var(--accent-15); }
}

/* ======================================
   GAMIFICATION - STREAK
   ====================================== */

.streak-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.streak-flame {
  color: #f59e0b;
  animation: flickerFlame 1.5s ease-in-out infinite;
}

.streak-count {
  font-size: 0.9rem;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes flickerFlame {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  25% { transform: scale(1.1) rotate(-3deg); opacity: 0.9; }
  50% { transform: scale(0.95) rotate(2deg); opacity: 1; }
  75% { transform: scale(1.05) rotate(-1deg); opacity: 0.95; }
}

/* ======================================
   GAMIFICATION - ACHIEVEMENT SHOWCASE
   ====================================== */

.achievement-showcase {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-20) transparent;
}

.achievement-showcase::-webkit-scrollbar {
  height: 4px;
}

.achievement-showcase::-webkit-scrollbar-thumb {
  background: var(--accent-20);
  border-radius: 2px;
}

/* ======================================
   GAMIFICATION - XP FLOATER
   ====================================== */

.xp-floater {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 1rem;
  font-weight: 800;
  color: var(--mtech-accent);
  text-shadow: 0 0 10px var(--accent-30);
  animation: xpFloat 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes xpFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  60% {
    opacity: 1;
    transform: translateY(-50px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(0.8);
  }
}

/* ======================================
   GAMIFICATION - LEVEL UP OVERLAY
   ====================================== */

.level-up-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: levelUpFadeIn 0.3s ease;
}

.level-up-card {
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-lg);
  padding: 3rem 4rem;
  text-align: center;
  box-shadow: 0 0 60px var(--accent-30);
  animation: levelUpPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-up-card h2 {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.level-up-card p {
  color: var(--mtech-text-muted);
  font-weight: 500;
}

@keyframes levelUpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes levelUpPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ======================================
   WELCOME OVERLAY (first-time interview)
   ====================================== */

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: welcomeFadeIn 0.4s ease;
  padding: 1rem;
  overflow-y: auto;
}

.welcome-card {
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-lg);
  padding: 2.5rem 3rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px var(--accent-30);
  animation: welcomePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-10);
  color: var(--mtech-accent);
  margin-bottom: 1rem;
}

.welcome-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.welcome-card__intro {
  color: var(--mtech-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.welcome-card__structure {
  background: var(--accent-3);
  border: 1px solid var(--accent-10);
  border-radius: var(--mtech-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.welcome-card__structure h6 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mtech-text-muted);
  margin-bottom: 0.75rem;
}

.welcome-card__pages {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.welcome-card__page {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mtech-text);
}

.welcome-card__page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

.welcome-card__duration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--mtech-text-muted);
  margin-bottom: 0;
}

.welcome-card__tips {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}

.welcome-card__tips li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--mtech-text);
  line-height: 1.5;
}

.welcome-card__tips li i {
  flex-shrink: 0;
  color: var(--mtech-accent);
  margin-top: 2px;
}

.welcome-card__cta {
  font-size: 1rem;
  padding: 0.65rem 2.5rem;
  font-weight: 600;
}

@keyframes welcomeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes welcomePop {
  0% { transform: scale(0.8) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes welcomeFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (max-width: 576px) {
  .welcome-card {
    padding: 1.5rem 1.25rem;
  }

  .welcome-card h2 {
    font-size: 1.25rem;
  }

  .welcome-card__pages {
    gap: 0.5rem;
  }
}

/* ======================================
   GAMIFICATION - BADGE UNLOCK TOAST
   ====================================== */

.badge-unlock-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--accent-30);
  border-radius: var(--mtech-radius);
  box-shadow: 0 8px 32px var(--accent-15);
  animation: shimmerBadge 3s ease-in-out infinite;
}

/* ======================================
   GAMIFICATION TOASTS
   ====================================== */

.gamification-toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

.gamification-toast {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--mtech-radius-sm);
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mtech-text);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 3px solid transparent;
}

.gamification-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.gamification-toast.hide {
  opacity: 0;
  transform: translateX(20px);
}

.gamification-toast--success {
  border-left-color: var(--mtech-success);
  color: var(--mtech-success);
}

.gamification-toast--success span { color: var(--mtech-text); }

.gamification-toast--info {
  border-left-color: var(--mtech-accent);
  color: var(--mtech-accent);
}

.gamification-toast--info span { color: var(--mtech-text); }

.gamification-toast--warning {
  border-left-color: var(--mtech-info);
  color: var(--mtech-info);
}

.gamification-toast--warning span { color: var(--mtech-text); }

.gamification-toast--xp {
  border-left-color: var(--mtech-accent);
  color: var(--mtech-accent);
}

.gamification-toast--xp span { color: var(--mtech-text); }

/* ======================================
   BADGE CELEBRATION — FULL SCREEN
   ====================================== */

.badge-celebration {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: celebrationFadeIn 0.4s ease;
}

.badge-celebration--out {
  animation: celebrationFadeOut 0.5s ease forwards;
}

/* Shockwave ring */
.badge-celebration__shockwave {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.6);
  animation: shockwave 1s ease-out forwards;
  pointer-events: none;
}

/* Rotating light rays */
.badge-celebration__rays {
  position: absolute;
  width: 300px;
  height: 300px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 215, 0, 0.15) 10deg,
    transparent 20deg,
    transparent 40deg,
    rgba(255, 215, 0, 0.1) 50deg,
    transparent 60deg,
    transparent 80deg,
    rgba(255, 215, 0, 0.15) 90deg,
    transparent 100deg,
    transparent 120deg,
    rgba(255, 215, 0, 0.1) 130deg,
    transparent 140deg,
    transparent 160deg,
    rgba(255, 215, 0, 0.15) 170deg,
    transparent 180deg,
    transparent 200deg,
    rgba(255, 215, 0, 0.1) 210deg,
    transparent 220deg,
    transparent 240deg,
    rgba(255, 215, 0, 0.15) 250deg,
    transparent 260deg,
    transparent 280deg,
    rgba(255, 215, 0, 0.1) 290deg,
    transparent 300deg,
    transparent 320deg,
    rgba(255, 215, 0, 0.15) 330deg,
    transparent 340deg,
    transparent 360deg
  );
  border-radius: 50%;
  animation: raysRotate 8s linear infinite, raysFadeIn 0.8s ease forwards;
  opacity: 0;
  pointer-events: none;
}

/* Sparkle particles orbiting */
.badge-celebration__sparkles {
  position: absolute;
  width: 200px;
  height: 200px;
  pointer-events: none;
}

.badge-celebration__sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #FFD700;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.5);
  animation: sparkleOrbit 2.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.2s);
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 30deg)) translateX(80px);
}

.badge-celebration__sparkle:nth-child(odd) {
  background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.5);
  width: 4px;
  height: 4px;
}

/* Badge shape — the hero */
.badge-celebration__badge {
  position: relative;
  z-index: 1;
  animation: badgeReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0);
}

.badge-celebration__badge-shape {
  width: 90px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.badge-celebration__badge-shape svg {
  width: 90px;
  height: 90px;
}

.badge-celebration__badge-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.8));
  z-index: 2;
}

/* Text — typed label + description */
.badge-celebration__text {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 24px;
}

.badge-celebration__label {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFD700;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
  min-height: 2rem;
  letter-spacing: 0.02em;
}

.badge-celebration__description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.badge-celebration__description.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dismiss button */
.badge-celebration__dismiss {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.badge-celebration__dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Confetti particles */
.badge-celebration__confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 2px;
  animation: celebrationConfetti 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: var(--delay, 0s);
  opacity: 0;
  pointer-events: none;
}

/* Multi-badge row */
.badge-celebration__badges-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  animation: badgeReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0);
}

.badge-celebration__badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.badge-celebration__badge-shape--multi {
  width: 70px;
  height: 75px;
}

.badge-celebration__badge-shape--multi svg {
  width: 70px;
  height: 70px;
}

.badge-celebration__badge-emoji--multi {
  font-size: 28px;
}

.badge-celebration__badge-item-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  max-width: 120px;
}

/* Keyframes */
@keyframes celebrationFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes celebrationFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes shockwave {
  0% { transform: scale(1); opacity: 1; border-width: 3px; }
  100% { transform: scale(8); opacity: 0; border-width: 1px; }
}

@keyframes raysRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes raysFadeIn {
  0% { opacity: 0; transform: rotate(0deg) scale(0.5); }
  100% { opacity: 1; transform: rotate(30deg) scale(1); }
}

@keyframes sparkleOrbit {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) rotate(calc(var(--i) * 30deg)) translateX(80px) scale(0.5); }
  50% { opacity: 1; transform: translate(-50%, -50%) rotate(calc(var(--i) * 30deg + 60deg)) translateX(95px) scale(1.2); }
}

@keyframes badgeReveal {
  0% { transform: scale(0) rotate(-20deg); filter: brightness(0.3); }
  50% { filter: brightness(2); }
  70% { transform: scale(1.15) rotate(5deg); filter: brightness(1.2); }
  100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}

@keyframes badgeShimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

@keyframes celebrationConfetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

/* ======================================
   CONFETTI
   ====================================== */

.confetti-container {
  position: fixed;
  top: 40%;
  left: 50%;
  z-index: 9999;
  pointer-events: none;
}

.confetti-particle {
  position: absolute;
  width: 6px;
  height: 10px;
  border-radius: 1px;
  opacity: 1;
  animation: confetti-burst 2.5s cubic-bezier(0.15, 0.6, 0.35, 1) var(--delay, 0s) forwards;
}

.confetti-particle:nth-child(odd) {
  border-radius: 50%;
  width: 7px;
  height: 7px;
}

@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--x, 0), var(--y, -200px)) rotate(var(--r, 360deg)) scale(0.4);
    opacity: 0;
  }
}

/* Page completion pop */
.page-pop {
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ======================================
   PROGRESS RING
   ====================================== */

.progress-ring-wrapper {
  position: relative;
  display: inline-block;
  width: 96px;
  height: 96px;
}

.progress-ring__bg {
  opacity: 0.3;
}

.progress-ring__progress {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.6s ease;
  filter: drop-shadow(0 0 6px var(--accent-30));
}

.progress-ring__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1;
}

.progress-ring__percentage {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mtech-primary);
  letter-spacing: -0.5px;
}

.progress-ring__unit {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--mtech-text-muted);
  vertical-align: super;
  margin-left: 1px;
}

/* ======================================
   MILESTONE DOTS
   ====================================== */

.milestone-dots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0;
  position: relative;
}

.milestone-dots__track {
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  height: 2px;
  background-color: rgba(233, 236, 239, 0.5);
  transform: translateY(-50%);
  border-radius: 1px;
}

.milestone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--mtech-border);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  border: 2px solid var(--mtech-bg-card);
}

.milestone-dot.reached {
  background-color: var(--mtech-success);
  box-shadow: 0 0 8px rgba(24, 188, 156, 0.35);
  transform: scale(1.2);
}

/* ======================================
   COMPLETED CARD
   ====================================== */

.completed-card {
  border: 1px solid rgba(24, 188, 156, 0.25) !important;
}

.completed-card:hover {
  border-color: rgba(24, 188, 156, 0.4) !important;
  box-shadow: var(--glass-shadow), 0 0 20px rgba(24, 188, 156, 0.1) !important;
}

.closed-card {
  opacity: 0.85;
  border: 1px solid var(--glass-border) !important;
  background: var(--glass-bg);
}

.closed-card:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.interview-card__closed-banner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mtech-accent);
  background: var(--accent-6);
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

/* ======================================
   SIGNATURE MODAL
   ====================================== */

.signature-checkbox {
  font-size: 0.9rem;
}

/* Signature zone with gradient border */
.signature-zone {
  border: 2px solid transparent;
  border-image: var(--gradient-accent) 1;
  border-radius: var(--mtech-radius);
  padding: 1.5rem;
}

/* ======================================
   LEADERBOARD
   ====================================== */

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--mtech-radius-sm);
  transition: background 0.2s ease;
}

.leaderboard-row:hover {
  background: var(--accent-4);
}

.leaderboard-rank {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--mtech-text-muted);
  min-width: 24px;
}

.leaderboard-rank.top-1 { color: #f59e0b; }
.leaderboard-rank.top-2 { color: #94a3b8; }
.leaderboard-rank.top-3 { color: #b45309; }

.leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  object-fit: cover;
  flex-shrink: 0;
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mtech-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-level {
  font-size: 0.7rem;
  color: var(--mtech-text-muted);
}

.leaderboard-xp {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mtech-accent);
  white-space: nowrap;
}

/* ======================================
   ADMIN
   ====================================== */

.admin-stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius);
  box-shadow: var(--glass-shadow);
  padding: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-elevated);
}

.admin-stat-card:hover::before {
  background: var(--gradient-accent);
}

.admin-stat-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-stat-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mtech-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Color variants for stat cards */
.admin-stat-card--secondary .admin-stat-card__icon {
  background: rgba(149, 165, 166, 0.12);
  color: var(--mtech-secondary);
}
.admin-stat-card--info .admin-stat-card__icon {
  background: rgba(52, 152, 219, 0.12);
  color: var(--mtech-info);
}
.admin-stat-card--info .admin-stat-card__value {
  background: linear-gradient(135deg, #3498DB, #2980B9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-stat-card--warning .admin-stat-card__icon {
  background: rgba(243, 156, 18, 0.12);
  color: var(--mtech-warning);
}
.admin-stat-card--warning .admin-stat-card__value {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-stat-card--accent .admin-stat-card__icon {
  background: var(--accent-12);
  color: var(--mtech-accent);
}
.admin-stat-card--success .admin-stat-card__icon {
  background: rgba(24, 188, 156, 0.12);
  color: var(--mtech-success);
}
.admin-stat-card--success .admin-stat-card__value {
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Campaign cards (index) */
.campaign-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.campaign-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  transition: background 0.3s ease;
}

.campaign-card--draft::before { background: var(--mtech-secondary); }
.campaign-card--active::before { background: var(--gradient-success); }
.campaign-card--closed::before { background: var(--mtech-primary); }

.campaign-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-elevated);
}

.campaign-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mtech-text);
  margin-bottom: 4px;
}

.campaign-card__period {
  font-size: 0.78rem;
  color: var(--mtech-text-muted);
}

.campaign-card__stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 236, 239, 0.4);
}

.campaign-card__stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--mtech-text);
}

.campaign-card__stat-label {
  font-size: 0.68rem;
  color: var(--mtech-text-muted);
  font-weight: 500;
}

/* Campaign status badges */
.badge-campaign-draft {
  background: rgba(149, 165, 166, 0.15);
  color: #5D6D7E;
  border: 1px solid rgba(149, 165, 166, 0.2);
}

.badge-campaign-active {
  background: rgba(24, 188, 156, 0.12);
  color: var(--mtech-success);
  border: 1px solid rgba(24, 188, 156, 0.2);
}

/* badge-campaign-closed: removed, replaced by interview-card__closed-banner */

.badge-ready-submit {
  background: rgba(48, 209, 88, 0.1);
  color: var(--mtech-success);
  border: 1px solid rgba(48, 209, 88, 0.15);
  font-size: 0.7rem;
}

/* Admin nav pills */
.admin-nav {
  gap: 0.5rem;
}

.admin-nav .nav-link {
  color: var(--mtech-text-secondary);
  border-radius: 50rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-nav .nav-link:hover {
  background: var(--glass-bg);
  color: var(--mtech-text);
}

.admin-nav .nav-link.active {
  background: var(--mtech-accent);
  color: #fff;
}

/* Platform toggle */
.platform-toggle {
  border: 1px dashed var(--glass-border) !important;
  color: #e74c3c !important;
  font-size: 0.8rem !important;
  opacity: 0.8;
}
.platform-toggle:hover {
  background: rgba(231, 76, 60, 0.08) !important;
  opacity: 1;
}
.platform-toggle--active {
  border-style: solid !important;
  color: #27ae60 !important;
}
.platform-toggle--active:hover {
  background: rgba(39, 174, 96, 0.08) !important;
}

/* Completion bar large */
.completion-bar-lg {
  height: 12px;
  border-radius: 6px;
  background: rgba(233, 236, 239, 0.5);
  overflow: hidden;
}

.completion-bar-lg__fill {
  height: 100%;
  border-radius: 6px;
  background: var(--gradient-success);
  position: relative;
  overflow: hidden;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.completion-bar-lg__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmerBar 2s ease-in-out infinite;
}

/* Interview row */
.interview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(233, 236, 239, 0.3);
  transition: background 0.15s ease;
}

.interview-row:last-child {
  border-bottom: none;
}

.interview-row:hover {
  background: var(--accent-2);
}

.interview-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  object-fit: cover;
  flex-shrink: 0;
}

.interview-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-2);
  color: var(--mtech-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.interview-row__info {
  flex: 1;
  min-width: 0;
}

.interview-row__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mtech-text);
}

.interview-row__manager {
  font-size: 0.72rem;
  color: var(--mtech-text-muted);
}

.interview-row__progress {
  width: 100px;
  flex-shrink: 0;
}

/* ======================================
   NOTIFICATIONS
   ====================================== */

.btn-mark-all-read {
  color: var(--mtech-accent);
  border-color: var(--mtech-accent);
  background: transparent;
}

.btn-mark-all-read:hover {
  background: var(--mtech-accent);
  border-color: var(--mtech-accent);
  color: #fff;
}

.notification-item {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  padding: 16px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background: var(--glass-bg-elevated);
}

.notification-item.unread {
  border-left-color: var(--mtech-accent);
  box-shadow: 0 0 16px var(--accent-6);
}

.notification-type-reminder { border-left-color: var(--mtech-info); }
.notification-type-submission { border-left-color: var(--mtech-warning); }
.notification-type-review { border-left-color: var(--mtech-accent); }
.notification-type-export_ready { border-left-color: var(--mtech-success); }
.notification-type-campaign_launch { border-left-color: var(--mtech-danger); }
.notification-type-badge_earned { border-left-color: #FFD60A; }

/* Notification badge icon (mini badge in notification row) */
.notification-badge-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-self: center;
}

.notification-badge-icon__svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-badge-icon__emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  pointer-events: none;
  user-select: none;
}

/* ======================================
   GLASS TABLE
   ====================================== */

.glass-table-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.glass-table-card .table {
  margin-bottom: 0;
}

.glass-table-card .table thead th {
  background: rgba(240, 242, 245, 0.5);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mtech-text-muted);
  padding: 12px 16px;
}

.glass-table-card .table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(233, 236, 239, 0.3);
  vertical-align: middle;
}

.glass-table-card .table tbody tr:last-child td {
  border-bottom: none;
}

.glass-table-card .table tbody tr:hover {
  background: var(--accent-2);
}

/* ======================================
   BUTTONS - GRADIENT
   ====================================== */

.btn-gradient {
  background: var(--gradient-accent);
  border: none;
  color: white;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.btn-gradient:hover {
  color: white;
  box-shadow: 0 4px 16px var(--accent-30);
}

.btn-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn-gradient:hover::after {
  transform: translateX(100%);
}

/* ======================================
   RESPONSIVE
   ====================================== */

/* ======================================
   NOTION-STYLE TEXTAREA
   ====================================== */

.notion-textarea-wrapper {
  background: var(--glass-bg-inset);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--mtech-radius-sm);
  padding: 2px;
  transition: all 0.3s ease;
}

.notion-textarea-wrapper:focus-within {
  border-color: var(--accent-35);
  box-shadow: 0 0 20px var(--accent-10);
}

.notion-textarea-wrapper textarea {
  border: none;
  background: transparent;
  width: 100%;
  resize: vertical;
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--mtech-text);
  min-height: 100px;
}

.notion-textarea-wrapper textarea:focus {
  outline: none;
  box-shadow: none;
}

.notion-textarea-wrapper textarea::placeholder {
  color: var(--mtech-text-muted);
  opacity: 0.6;
}

.notion-textarea-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 10px;
  font-size: 0.72rem;
  color: var(--mtech-text-muted);
  opacity: 0.7;
}

/* ======================================
   RATING SCALE MODERN (Emoji Cards)
   ====================================== */

.rating-scale-modern {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 0;
}

.rating-scale-modern .rating-card {
  position: relative;
  width: 64px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.rating-scale-modern .rating-card input[type="radio"] {
  display: none;
}

.rating-scale-modern .rating-card__face {
  width: 64px;
  height: 64px;
  border-radius: var(--mtech-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(149, 165, 166, 0.1);
  border: 2px solid var(--glass-border);
  transition: all 0.25s ease;
  filter: grayscale(0.6);
}

.rating-scale-modern .rating-card:hover .rating-card__face {
  transform: translateY(-3px);
  border-color: var(--accent-30);
  filter: grayscale(0);
}

.rating-scale-modern .rating-card input:checked ~ .rating-card__face {
  filter: grayscale(0);
  transform: scale(1.08);
  border-width: 2px;
}

/* Color variants per value */
.rating-scale-modern .rating-card[data-rating-color="red"] input:checked ~ .rating-card__face {
  background: rgba(231, 76, 60, 0.12);
  border-color: #E74C3C;
  box-shadow: 0 0 16px rgba(231, 76, 60, 0.2);
}
.rating-scale-modern .rating-card[data-rating-color="orange"] input:checked ~ .rating-card__face {
  background: rgba(243, 156, 18, 0.12);
  border-color: #F39C12;
  box-shadow: 0 0 16px rgba(243, 156, 18, 0.2);
}
.rating-scale-modern .rating-card[data-rating-color="gray"] input:checked ~ .rating-card__face {
  background: rgba(149, 165, 166, 0.15);
  border-color: #95A5A6;
  box-shadow: 0 0 16px rgba(149, 165, 166, 0.2);
}
.rating-scale-modern .rating-card[data-rating-color="blue"] input:checked ~ .rating-card__face {
  background: rgba(52, 152, 219, 0.12);
  border-color: #3498DB;
  box-shadow: 0 0 16px rgba(52, 152, 219, 0.2);
}
.rating-scale-modern .rating-card[data-rating-color="green"] input:checked ~ .rating-card__face {
  background: rgba(24, 188, 156, 0.12);
  border-color: #18BC9C;
  box-shadow: 0 0 16px rgba(24, 188, 156, 0.2);
}

.rating-scale-modern .rating-card__sublabel {
  display: block;
  font-size: 0.65rem;
  color: var(--mtech-text-muted);
  margin-top: 6px;
  line-height: 1.2;
  font-weight: 500;
}

/* ======================================
   CHOICE CARDS (Single Choice Modern)
   ====================================== */

.choice-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 2px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--glass-bg-inset);
  overflow: hidden;
}

.choice-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.25s ease;
}

.choice-card input[type="radio"] {
  display: none;
}

.choice-card:hover {
  border-color: var(--accent-25);
  background: var(--accent-3);
  transform: translateX(4px);
}

.choice-card__indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--mtech-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
  transition: all 0.25s ease;
}

.choice-card__indicator svg {
  width: 12px;
  height: 12px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.choice-card__text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mtech-text);
}

/* Selected state (server-rendered class + live :has selector) */
.choice-card.selected,
.choice-card:has(input:checked) {
  border-color: var(--accent-40);
  background: var(--accent-6);
}

.choice-card.selected::before,
.choice-card:has(input:checked)::before {
  background: var(--gradient-accent);
}

.choice-card.selected .choice-card__indicator,
.choice-card:has(input:checked) .choice-card__indicator {
  background: var(--gradient-accent);
  border-color: var(--mtech-accent);
  box-shadow: 0 0 10px var(--accent-25);
}

.choice-card.selected .choice-card__indicator svg,
.choice-card:has(input:checked) .choice-card__indicator svg {
  opacity: 1;
}

/* ======================================
   TRI-EVAL MODERN (Semantic Icon Cards)
   ====================================== */

.tri-eval-modern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tri-eval-card {
  position: relative;
  text-align: center;
  padding: 16px 10px;
  border: 2px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--glass-bg-inset);
}

.tri-eval-card input[type="radio"] {
  display: none;
}

.tri-eval-card:hover {
  transform: translateY(-2px);
}

.tri-eval-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  transition: all 0.25s ease;
}

.tri-eval-card__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mtech-text);
  line-height: 1.3;
}

/* Below expectations */
.tri-eval-card[data-eval-color="red"] .tri-eval-card__icon {
  background: rgba(231, 76, 60, 0.1);
  color: #E74C3C;
}
.tri-eval-card[data-eval-color="red"]:hover {
  border-color: rgba(231, 76, 60, 0.3);
}
.tri-eval-card[data-eval-color="red"].selected,
.tri-eval-card[data-eval-color="red"]:has(input:checked) {
  border-color: #E74C3C;
  background: rgba(231, 76, 60, 0.06);
  box-shadow: 0 0 16px rgba(231, 76, 60, 0.12);
}

/* Meets expectations */
.tri-eval-card[data-eval-color="blue"] .tri-eval-card__icon {
  background: rgba(52, 152, 219, 0.1);
  color: #3498DB;
}
.tri-eval-card[data-eval-color="blue"]:hover {
  border-color: rgba(52, 152, 219, 0.3);
}
.tri-eval-card[data-eval-color="blue"].selected,
.tri-eval-card[data-eval-color="blue"]:has(input:checked) {
  border-color: #3498DB;
  background: rgba(52, 152, 219, 0.06);
  box-shadow: 0 0 16px rgba(52, 152, 219, 0.12);
}

/* Above expectations */
.tri-eval-card[data-eval-color="green"] .tri-eval-card__icon {
  background: rgba(24, 188, 156, 0.1);
  color: #18BC9C;
}
.tri-eval-card[data-eval-color="green"]:hover {
  border-color: rgba(24, 188, 156, 0.3);
}
.tri-eval-card[data-eval-color="green"].selected,
.tri-eval-card[data-eval-color="green"]:has(input:checked) {
  border-color: #18BC9C;
  background: rgba(24, 188, 156, 0.06);
  box-shadow: 0 0 16px rgba(24, 188, 156, 0.12);
}

/* Manager readonly */
.tri-eval-card.readonly {
  cursor: default;
  opacity: 0.65;
}

.tri-eval-card.readonly:hover {
  transform: none;
}

/* ======================================
   TABLE GRID (replaces <table>)
   ====================================== */

.table-grid {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  overflow: hidden;
}

.table-grid__header {
  display: grid;
  grid-template-columns: var(--table-cols, repeat(3, 1fr));
  background: rgba(240, 242, 245, 0.7);
  border-bottom: 1px solid var(--glass-border);
}

.table-grid__header-cell {
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mtech-text-muted);
}

.table-grid__row {
  display: grid;
  grid-template-columns: var(--table-cols, repeat(3, 1fr));
  border-bottom: 1px solid rgba(233, 236, 239, 0.3);
}

.table-grid__row:last-child {
  border-bottom: none;
}

.table-grid__cell {
  padding: 10px 14px;
}

.table-grid__cell-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mtech-text);
  margin-bottom: 4px;
}

.table-grid__cell textarea {
  border: none;
  background: transparent;
  width: 100%;
  resize: vertical;
  min-height: 50px;
  padding: 6px 8px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--mtech-text);
  border-radius: 6px;
  transition: background 0.2s ease;
}

.table-grid__cell textarea:focus {
  outline: none;
  background: var(--accent-3);
}

.table-grid__cell textarea::placeholder {
  color: var(--mtech-text-muted);
  opacity: 0.5;
}

/* ======================================
   TABLE STACKED (vertical objective layout)
   ====================================== */

.table-stacked {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-stacked__row {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-stacked__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-stacked__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mtech-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
}

.table-stacked__field textarea {
  resize: vertical;
  min-height: 60px;
}

.table-stacked__field .form-select,
.table-stacked__field .form-control {
  background: var(--glass-bg-inset);
  border: 1px solid var(--glass-border);
  border-radius: var(--mtech-radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-stacked__field .form-select:focus,
.table-stacked__field .form-control:focus {
  border-color: var(--mtech-accent);
  box-shadow: 0 0 0 3px var(--accent-10);
}

.table-stacked__error {
  display: flex;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(231, 76, 60, 0.08);
  border-radius: var(--mtech-radius-sm);
  border-left: 3px solid var(--mtech-danger);
  line-height: 1.4;
}

.table-stacked__actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ======================================
   STAR RATING (in table grid)
   ====================================== */

.star-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}

.star-rating__star {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  border-radius: 4px;
}

.star-rating__star:focus {
  outline: none;
}

.star-rating__star:hover {
  transform: scale(1.2);
}

.star-rating__star.inactive {
  color: rgba(149, 165, 166, 0.3);
}

.star-rating__star.active {
  color: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.35));
}

.star-rating__star.active svg {
  fill: #f59e0b;
}

.star-rating__star.inactive svg {
  fill: rgba(149, 165, 166, 0.15);
  stroke: rgba(149, 165, 166, 0.4);
}

.star-rating--readonly {
  gap: 2px;
  padding: 0;
}

.star-rating--readonly .star-rating__star {
  cursor: default;
  padding: 0;
}

.star-rating--readonly .star-rating__star:hover {
  transform: none;
}

/* ======================================
   ACHIEVEMENT CARD MODERN
   ====================================== */

/* ── Trophy Card (Apple Watch sculptural style) ── */
.trophy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 10px 12px;
  transition: transform 0.25s ease;
  cursor: pointer;
  position: relative;
}

.trophy-card.earned:hover {
  transform: translateY(-2px);
}

.trophy-card.locked {
  opacity: 0.5;
}

.trophy-card.locked .badge-icon-overlay {
  color: rgba(150, 150, 150, 0.7);
}

.trophy-card.locked .badge-svg-wrap {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1)) grayscale(0.7);
}

/* Badge area */
.badge-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
  flex-shrink: 0;
  perspective: 600px;
}

.badge-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.trophy-card:hover .badge-glow { opacity: 0.4; }
.trophy-card.earned .badge-glow { opacity: 0.2; }

.badge-svg-wrap {
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.trophy-card:hover .badge-svg-wrap {
  transform: scale(1.08) translateY(-3px);
}

/* Emoji overlay centered on badge */
.badge-emoji-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  user-select: none;
}

.trophy-card.locked .badge-emoji-overlay {
  font-size: 20px;
}

/* Text */
.trophy-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mtech-text);
  line-height: 1.3;
  margin-bottom: 3px;
}

.trophy-desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--mtech-text-muted);
  line-height: 1.3;
}

.trophy-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mtech-accent);
  opacity: 0.7;
  line-height: 1.3;
}

/* Achievement Showcase Grid */
.achievement-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

/* ===== Badge Flip — Achievement Cards ===== */
.badge-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
  transform-style: preserve-3d;
}

.badge-flipped .badge-flipper {
  transform: rotateY(180deg);
}

.badge-flipper__front,
.badge-flipper__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
}

.badge-flipper__front {
  z-index: 2;
}

.badge-flipper__back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.55) 0%, transparent 50%),
    linear-gradient(145deg, #e8e8e8 0%, #c0c0c0 30%, #a8a8a8 50%, #c0c0c0 70%, #d8d8d8 100%);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.6),
    inset 0 -2px 6px rgba(0,0,0,0.15),
    0 4px 16px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.4);
}

.badge-flipper__engrave {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  text-align: center;
}

.badge-flipper__engrave-date {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: transparent;
  background: linear-gradient(180deg, #888 0%, #666 40%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 1px rgba(255,255,255,0.4);
  text-transform: uppercase;
}

/* Disable hover lift when flipped */
.trophy-card.badge-flipped:hover {
  transform: none;
}
.trophy-card.badge-flipped .badge-glow {
  opacity: 0 !important;
}
.trophy-card.badge-flipped:hover .badge-svg-wrap {
  transform: none;
}

/* ===== Badge Flip — Hero (mini) ===== */
.hero-badge {
  perspective: 400px;
}

.hero-badge__flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
  transform-style: preserve-3d;
}

.hero-badge.badge-flipped .hero-badge__flipper {
  transform: rotateY(180deg);
}

.hero-badge__front,
.hero-badge__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge__front {
  z-index: 2;
}

.hero-badge__back {
  transform: rotateY(180deg);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.55) 0%, transparent 50%),
    linear-gradient(145deg, #e8e8e8 0%, #c0c0c0 30%, #a8a8a8 50%, #c0c0c0 70%, #d8d8d8 100%);
  box-shadow:
    inset 0 1px 3px rgba(255,255,255,0.6),
    inset 0 -1px 4px rgba(0,0,0,0.15),
    0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  width: 52px;
  height: 52px;
  margin: auto;
}

.hero-badge__engrave {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  padding: 4px;
  color: transparent;
  background: linear-gradient(180deg, #888 0%, #666 40%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 1px rgba(255,255,255,0.4);
  text-transform: uppercase;
}

/* Hide tooltip while flipped */
.hero-badge.badge-flipped .hero-badge__tooltip {
  display: none;
}

/* Disable hover transform while flipped */
.hero-badge.badge-flipped:hover {
  transform: none;
}

@media (max-width: 991.98px) {
  .wizard-sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .wizard-page-item {
    padding: 8px 12px;
  }

  .dashboard-hero {
    padding: 1.5rem;
  }

  .dashboard-hero .hero-stats {
    gap: 1rem;
  }

  body::before,
  body::after {
    display: none;
  }

  .navbar-level-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .achievement-showcase {
    gap: 8px;
  }

  .achievement-card {
    min-width: 90px;
    padding: 12px 8px;
  }

  .achievement-showcase-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  .tri-eval-modern {
    gap: 6px;
  }

  .tri-eval-card {
    padding: 12px 6px;
  }

  .rating-scale-modern {
    gap: 6px;
  }

  .rating-scale-modern .rating-card__face {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .table-grid__header,
  .table-grid__row {
    grid-template-columns: 1fr !important;
  }

  .table-grid__header-cell:not(:first-child) {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .leaderboard-row {
    padding: 8px 12px;
  }

  .navbar-xp-text,
  .navbar-streak {
    display: none;
  }

  .achievement-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ======================================
   ZEN MASTER EASTER EGG
   ====================================== */

.zen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zenFadeIn 0.8s ease-out;
}

.zen-overlay--out {
  animation: zenFadeOut 0.6s ease-in forwards;
}

.zen-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.zen-rings-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.zen-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  border: 2px solid rgba(48, 209, 88, 0.4);
  animation: zenRipple 3s ease-out infinite;
}

.zen-ring--1 {
  width: 200px;
  height: 200px;
  animation-delay: 0s;
}

.zen-ring--2 {
  width: 200px;
  height: 200px;
  animation-delay: 1s;
}

.zen-ring--3 {
  width: 200px;
  height: 200px;
  animation-delay: 2s;
}

.zen-figure {
  font-size: 80px;
  line-height: 1;
  animation: zenPulse 2.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 30px rgba(48, 209, 88, 0.3));
}

.zen-text {
  text-align: center;
  animation: zenFadeIn 1s ease-out 0.5s both;
  position: relative;
  z-index: 1;
}

.zen-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(48, 209, 88, 0.4);
}

.zen-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-style: italic;
}

@keyframes zenFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zenFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes zenPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes zenRipple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* ======================================
   ADMIN HELP PAGE
   ====================================== */

/* Section headers */
.help-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  margin-bottom: 8px;
}

.help-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* XP rows */
.help-xp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.15s;
  font-size: 0.875rem;
}

.help-xp-row:hover {
  background: var(--accent-3);
}

.help-xp-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mtech-success);
  background: rgba(24, 188, 156, 0.1);
  white-space: nowrap;
}

.help-xp-pill--total {
  color: white;
  background: var(--gradient-accent);
  font-size: 0.8rem;
  padding: 4px 14px;
}

.help-xp-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--accent-4);
  border: 1px solid var(--accent-10);
}

/* Level rows */
.help-level-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background 0.15s;
}

.help-level-row:hover {
  background: var(--accent-3);
}

.help-level-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-level-number {
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.help-level-title {
  font-weight: 600;
  font-size: 0.875rem;
}

/* Category headers */
.help-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.help-category-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Badge cards grid */
.help-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.help-badge-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: var(--mtech-radius-sm);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.help-badge-card:hover {
  background: var(--accent-3);
  border-color: var(--accent-10);
  transform: translateY(-1px);
}

.help-badge-card__visual {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-badge-card__visual > [data-badge-svg-target="svg"] {
  line-height: 0;
}

.help-badge-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.3s;
}

.help-badge-card:hover .help-badge-glow {
  opacity: 0.25;
}

.help-badge-emoji {
  position: absolute;
  bottom: -4px;
  right: -6px;
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.help-badge-card__body {
  flex: 1;
  min-width: 0;
}

/* Secret pill */
.help-secret-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #BF5AF2;
  background: rgba(191, 90, 242, 0.1);
  border: 1px solid rgba(191, 90, 242, 0.2);
}

/* Rarity stars */
.help-rarity {
  display: flex;
  gap: 2px;
}

.help-star--filled {
  color: #FFD60A;
  fill: #FFD60A;
}

.help-star--empty {
  color: #e0e0e0;
  opacity: 0.5;
}

/* ======================================
   HR DOCUMENTATION
   ====================================== */

/* --- Markdown Body --- */
.markdown-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  word-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 1.75em;
  margin-bottom: 0.75em;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.markdown-body h1 { font-size: 2rem; }
.markdown-body h2 {
  font-size: 1.5rem;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--glass-border);
}
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.1rem; }

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body p {
  margin-bottom: 1em;
}

.markdown-body a {
  color: var(--mtech-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.markdown-body a:hover {
  border-bottom-color: var(--mtech-accent);
}

.markdown-body strong {
  font-weight: 700;
  color: var(--text-primary);
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.markdown-body li {
  margin-bottom: 0.35em;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin-top: 0.35em;
  margin-bottom: 0;
}

.markdown-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--mtech-accent);
  background: var(--accent-4);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body code {
  padding: 0.15em 0.4em;
  font-size: 0.875em;
  background: var(--accent-8);
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--mtech-accent);
}

.markdown-body pre {
  margin: 1.5em 0;
  padding: 1.25em;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow-x: auto;
}

.markdown-body pre code {
  padding: 0;
  background: none;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.markdown-body table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.markdown-body thead {
  background: var(--accent-6);
}

.markdown-body th {
  padding: 0.75em 1em;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.markdown-body td {
  padding: 0.75em 1em;
  border-top: 1px solid var(--glass-border);
}

.markdown-body tbody tr:hover {
  background: var(--accent-3);
}

.markdown-body hr {
  margin: 2em 0;
  border: none;
  border-top: 2px solid var(--glass-border);
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1em 0;
}

.markdown-body mark {
  background: color-mix(in srgb, var(--mtech-accent) 20%, transparent);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.markdown-body del {
  color: var(--text-muted);
}

/* --- Table of Contents --- */
.doc-toc-card {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.doc-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-toc-link {
  display: block;
  padding: 0.3em 0.75em;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
  line-height: 1.4;
}

.doc-toc-link:hover {
  color: var(--mtech-accent);
  background: var(--accent-6);
}

.doc-toc-link--3 {
  padding-left: 1.5em;
  font-size: 0.78rem;
}

/* --- Document list items --- */
.doc-list-item {
  background: transparent !important;
  padding: 0.75em 1em !important;
  transition: all 0.15s;
}

.doc-list-item:hover {
  background: var(--accent-4) !important;
}

.doc-list-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-6);
  flex-shrink: 0;
}

/* --- Markdown Editor --- */
.markdown-editor {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 400px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.markdown-editor:focus {
  outline: none;
  box-shadow: none !important;
}
