/* ============================================
   STYLE.CSS — Aditor Hub v2 Premium
   Design Tokens · Components · Animations · Responsive
   ============================================ */

/* ───── DESIGN TOKENS ───── */

:root {
  /* Easing */
  --ease-golden: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing (4px grid) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ───── DARK MODE (default) ───── */

[data-theme="dark"], :root {
  --color-bg: #08090E;
  --color-surface: rgba(255,255,255,0.03);
  --color-surface-2: rgba(255,255,255,0.06);
  --color-surface-3: rgba(255,255,255,0.09);
  --color-glass-border: rgba(255,255,255,0.08);
  --color-glass-border-hover: rgba(255,255,255,0.15);

  --color-text: #E8E9ED;
  --color-text-muted: #6B6E7B;
  --color-text-faint: #3D3F4A;

  --color-accent: #FF6B35;
  --color-accent-hover: #FF8F5E;
  --color-accent-glow: rgba(255,107,53,0.15);

  --color-blue: #2A5F8F;
  --color-blue-glow: rgba(42,95,143,0.2);

  --color-success: #34D399;
  --color-warning: #FBBF24;
  --color-error: #F87171;

  --shadow-glass: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-card-hover: 0 8px 32px rgba(255,107,53,0.08);
  --shadow-login: 0 20px 60px rgba(255,107,53,0.08);
}

/* ───── LIGHT MODE ───── */

[data-theme="light"] {
  --color-bg: #F5F6FA;
  --color-surface: rgba(255,255,255,0.8);
  --color-surface-2: rgba(255,255,255,0.95);
  --color-surface-3: rgba(255,255,255,1);
  --color-glass-border: rgba(0,0,0,0.06);
  --color-glass-border-hover: rgba(0,0,0,0.12);

  --color-text: #1A1B23;
  --color-text-muted: #6B6E7B;
  --color-text-faint: #B0B3BE;

  --color-accent: #E85A2A;
  --color-accent-hover: #FF6B35;
  --color-accent-glow: rgba(255,107,53,0.1);

  --shadow-glass: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 8px 32px rgba(255,107,53,0.06);
  --shadow-login: 0 20px 60px rgba(255,107,53,0.06);
}

/* ───── BACKGROUND GLOW ───── */

body::before {
  content: '';
  position: fixed;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: bgGlow 20s ease-in-out infinite alternate;
  opacity: 0.5;
}

@keyframes bgGlow {
  0% { transform: translate(0, 0); }
  33% { transform: translate(10%, 15%); }
  66% { transform: translate(-5%, 10%); }
  100% { transform: translate(5%, -5%); }
}

/* ───── GLASS CARD SYSTEM ───── */

.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-interactive),
              background var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}

.glass-card-interactive {
  cursor: pointer;
}

.glass-card-interactive:hover {
  border-color: var(--color-glass-border-hover);
  background: var(--color-surface-2);
}

.glass-card-interactive:active {
  transform: scale(0.99);
}

/* ───── VIEW SYSTEM ───── */

.view {
  display: none;
  opacity: 0;
}

.view.active {
  display: block;
  opacity: 0;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

@keyframes viewEnter {
  to { opacity: 1; transform: scale(1); }
}

/* ───── LOGIN VIEW ───── */

.login-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-view.active {
  display: flex;
  opacity: 0;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: var(--login-bg-url) center / cover no-repeat;
}

.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 14, 0.75);
  backdrop-filter: blur(2px);
}

.login-card {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: calc(100% - 48px);
  padding: var(--sp-12);
  text-align: center;
  box-shadow: var(--shadow-login);
}

.login-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--sp-6);
  box-shadow: 0 0 40px var(--color-accent-glow), 0 0 80px var(--color-accent-glow);
  border: 2px solid rgba(255,107,53,0.2);
}

.login-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.login-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-8);
}

.login-step { width: 100%; }
.login-step:not(.active) { display: none; }

.login-check-icon {
  margin: 0 auto var(--sp-4);
  width: 48px;
  height: 48px;
}

.login-label {
  display: block;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
  text-align: center;
}

.login-input {
  display: block;
  width: 100%;
  height: 48px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-full);
  padding: 0 var(--sp-6);
  font-size: 15px;
  color: var(--color-text);
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
  margin-bottom: var(--sp-4);
  text-align: center;
}

.login-input::placeholder { color: var(--color-text-faint); }

.login-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.login-input-code {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.3em;
  font-family: var(--font-body);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  width: 100%;
  height: 48px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive);
  cursor: pointer;
  border: none;
}

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

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-link {
  display: block;
  width: 100%;
  margin-top: var(--sp-3);
  font-size: 13px;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: color var(--transition-interactive);
}

.btn-link:hover { color: var(--color-text); }

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-powered {
  margin-top: var(--sp-6);
  font-size: 12px;
  color: var(--color-text-faint);
}

/* ───── DASHBOARD LAYOUT ───── */

.dashboard-view {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.dashboard-view.active {
  display: block;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

/* Top bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--color-glass-border);
  padding: var(--sp-4) var(--sp-8);
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}

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

.top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
  position: relative;
}

.icon-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 2px solid var(--color-bg);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface-3);
  border: 1px solid var(--color-glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Main content */
.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-8) var(--sp-16);
}

/* ───── GREETING ───── */

.greeting {
  margin-bottom: var(--sp-6);
}

.greeting-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.greeting-sub {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-top: var(--sp-2);
}

.greeting-sub .pending-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  margin-right: var(--sp-2);
  animation: syncPulse 2s infinite;
}

/* ───── STATS ROW ───── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-10);
}

.stat-card {
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}

.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  color: var(--color-text-faint);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: var(--sp-2);
}

.stat-delta {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.stat-delta.positive { color: var(--color-success); }
.stat-delta.neutral { color: var(--color-blue); }
.stat-delta.negative { color: var(--color-error); }

/* Trust score ring */
.trust-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.trust-ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: var(--sp-3);
}

.trust-ring-wrap svg {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
}

.trust-ring-track {
  fill: none;
  stroke: var(--color-surface-3);
  stroke-width: 6;
}

.trust-ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 1s var(--ease-golden);
}

.trust-ring-fill.green { stroke: var(--color-success); }
.trust-ring-fill.yellow { stroke: var(--color-warning); }
.trust-ring-fill.red { stroke: var(--color-error); }

.trust-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
}

.trust-label {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ───── TRAINING BANNER ───── */

.training-banner {
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
  border-left: 3px solid;
  border-image: linear-gradient(to bottom, var(--color-accent), transparent) 1;
  animation: bannerPulse 3s infinite;
}

@keyframes bannerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.97; }
}

.banner-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.banner-icon svg {
  width: 22px;
  height: 22px;
}

.banner-content {
  flex: 1;
  min-width: 0;
}

.banner-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 2px;
}

.banner-sub {
  font-size: 13px;
  color: var(--color-text-muted);
}

.btn-orange {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.btn-orange:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--color-accent-glow);
}

.btn-orange:active {
  transform: translateY(0);
}

/* ───── TOOL SECTION ───── */

.tools-section {
  margin-bottom: var(--sp-12);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

/* Filter pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.filter-pill {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid transparent;
  transition: all var(--transition-interactive);
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.filter-pill.active {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-glass-border-hover);
}

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

.tool-card {
  padding: var(--sp-5);
  cursor: pointer;
  text-decoration: none;
  display: block;
  opacity: 0;
  transform: scale(0.97);
  animation: cardEnter 400ms var(--ease-golden) forwards;
}

.tool-card:hover {
  border-color: rgba(255,107,53,0.3);
  background: var(--color-surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.tool-card:active {
  transform: translateY(0) scale(0.99);
}

@keyframes cardEnter {
  to { opacity: 1; transform: scale(1); }
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: var(--sp-3);
}

.tool-icon.image { background: rgba(139, 92, 246, 0.1); }
.tool-icon.video { background: rgba(59, 130, 246, 0.1); }
.tool-icon.talkinghead { background: rgba(236, 72, 153, 0.1); }
.tool-icon.internal { background: rgba(107, 110, 123, 0.08); }
.tool-icon.productivity { background: rgba(34, 211, 153, 0.1); }

.tool-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.tool-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ───── FOOTER / SYNC ───── */

.dash-footer {
  text-align: center;
  padding: var(--sp-12) 0 var(--sp-8);
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}

.sync-dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
  animation: syncPulse 2s infinite;
}

@keyframes syncPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

.dash-footer-text {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ───── TRAINING MODAL ───── */

.training-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.training-overlay.active {
  display: flex;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

.training-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.training-modal {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  padding: var(--sp-8);
  border-radius: var(--radius-xl);
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: modalSlideUp 400ms var(--ease-golden) forwards;
}

.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  z-index: 2;
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
}

.modal-close:hover {
  color: var(--color-text);
  background: var(--color-surface-3);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

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

.training-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-4);
}

/* Video placeholder */
.video-placeholder {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0F1219;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-5);
}

.video-placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}

.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px var(--color-accent-glow);
}

.play-btn svg {
  width: 24px;
  height: 24px;
  color: #fff;
  margin-left: 3px;
}

.video-label {
  font-size: 13px;
  color: var(--color-text-faint);
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--color-surface-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--sp-5);
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.btn-watched {
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-golden);
}

.btn-watched.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Quiz */
.quiz-phase {
  display: none;
}

.quiz-phase.active {
  display: block;
  animation: slideInRight 400ms var(--ease-golden) forwards;
}

@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.quiz-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.quiz-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}

.quiz-question {
  display: none;
}

.quiz-question.active {
  display: block;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

.quiz-question-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--sp-5);
  line-height: 1.5;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.quiz-answer {
  width: 100%;
  padding: var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-md);
  text-align: left;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.quiz-answer:hover {
  background: var(--color-surface-2);
  border-color: var(--color-glass-border-hover);
}

.quiz-answer.correct {
  background: rgba(52, 211, 153, 0.15);
  border-color: var(--color-success);
  color: var(--color-success);
  transform: scale(1.02);
}

.quiz-answer.wrong {
  background: rgba(248, 113, 113, 0.15);
  border-color: var(--color-error);
  color: var(--color-error);
  animation: shake 0.4s var(--ease-golden);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.quiz-answer:disabled {
  cursor: default;
  pointer-events: none;
}

/* Progress dots */
.quiz-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.quiz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-surface-3);
  transition: all var(--transition-interactive);
}

.quiz-dot.answered { background: var(--color-accent); }
.quiz-dot.current { 
  background: var(--color-accent);
  animation: syncPulse 1.5s infinite;
}

/* Result phase */
.result-phase {
  display: none;
  text-align: center;
  padding: var(--sp-8) 0;
}

.result-phase.active {
  display: block;
  animation: viewEnter 400ms var(--ease-golden) forwards;
}

.result-emoji {
  font-size: 48px;
  margin-bottom: var(--sp-4);
}

.result-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.result-score {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}

.result-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--sp-6);
  animation: playerFloat 3s ease-in-out infinite;
}

@keyframes playerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.btn-full-orange {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-8);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.btn-full-orange:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--color-accent-glow);
}

.btn-full-orange:active {
  transform: translateY(0);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-8);
  background: var(--color-surface);
  border: 1px solid var(--color-glass-border);
  color: var(--color-text);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-interactive);
}

.btn-glass:hover {
  background: var(--color-surface-2);
  border-color: var(--color-glass-border-hover);
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ───── ADMIN VIEW ───── */

.admin-view {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.admin-view.active {
  display: block;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

.admin-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-8) var(--sp-16);
}

.admin-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.admin-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
}

.admin-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
}

.admin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.admin-tab {
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.admin-tab:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.admin-tab.active {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-glass-border-hover);
}

/* Admin panel */
.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  animation: viewEnter 300ms var(--ease-golden) forwards;
}

/* Tables */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-glass-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
}

.admin-table tbody td {
  padding: var(--sp-4) var(--sp-5);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-glass-border);
  font-variant-numeric: tabular-nums lining-nums;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

[data-theme="light"] .admin-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

.admin-table tbody tr:hover {
  background: var(--color-surface-2);
}

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-green {
  background: rgba(52,211,153,0.12);
  color: var(--color-success);
}

.badge-yellow {
  background: rgba(251,191,36,0.12);
  color: var(--color-warning);
}

.badge-red {
  background: rgba(248,113,113,0.12);
  color: var(--color-error);
}

/* Ghost button */
.btn-ghost-orange {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-interactive);
}

.btn-ghost-orange:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Training cards in admin */
.training-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.training-item {
  padding: var(--sp-5);
}

.training-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}

.training-item-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.training-item-date {
  font-size: 12px;
  color: var(--color-text-muted);
}

.training-item-progress {
  height: 4px;
  background: var(--color-surface-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.training-item-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
}

.training-item-count {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Editors table */
.admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-5);
}

/* ───── MOBILE BOTTOM NAV ───── */

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--color-surface);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid var(--color-glass-border);
  padding: var(--sp-2) 0 max(var(--sp-2), env(safe-area-inset-bottom));
}

.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  min-width: 64px;
  min-height: 44px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-interactive);
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--color-accent);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

/* ───── RESPONSIVE ───── */

/* Tablet */
@media (max-width: 1199px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .mobile-nav {
    display: block;
  }

  .dashboard-content,
  .admin-content {
    padding: var(--sp-6) var(--sp-4) calc(var(--sp-16) + 60px);
  }

  .top-bar {
    padding: var(--sp-3) var(--sp-4);
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .stat-value {
    font-size: 36px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .training-banner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-4);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: var(--sp-2);
    -webkit-overflow-scrolling: touch;
  }

  .admin-table-wrap {
    margin: 0 calc(-1 * var(--sp-4));
  }

  .training-modal {
    padding: var(--sp-6);
    margin: var(--sp-4);
    max-height: calc(100vh - 32px);
  }

  .login-card {
    padding: var(--sp-8);
  }

  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* Desktop large */
@media (min-width: 1200px) {
  .tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Touch device adjustments */
@media (hover: none) {
  .glass-card-interactive:hover {
    border-color: var(--color-glass-border);
    background: var(--color-surface);
    transform: none;
    box-shadow: none;
  }

  .tool-card:hover {
    border-color: var(--color-glass-border);
    background: var(--color-surface);
    transform: none;
    box-shadow: none;
  }

  .tool-card:active {
    background: var(--color-surface-2);
    border-color: rgba(255,107,53,0.3);
  }
}

/* ───── SKELETON LOADING ───── */

.skeleton {
  background: linear-gradient(90deg, var(--color-surface-2) 25%, rgba(255,255,255,0.06) 50%, var(--color-surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ───── TOAST NOTIFICATIONS ───── */

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-golden), transform 0.3s var(--ease-golden);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: calc(100% - 48px);
  text-align: center;
  white-space: nowrap;
}

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

.toast-info {
  background: rgba(42, 95, 143, 0.85);
  color: #fff;
  border: 1px solid rgba(42, 95, 143, 0.5);
}

.toast-error {
  background: rgba(248, 113, 113, 0.85);
  color: #fff;
  border: 1px solid rgba(248, 113, 113, 0.5);
}

/* ───── SIGN OUT BUTTON ───── */

.btn-sign-out {
  color: var(--color-text-muted);
}

.btn-sign-out:hover {
  color: var(--color-error);
  background: rgba(248, 113, 113, 0.1);
}

/* ───── SYNC NOW BUTTON ───── */

.btn-sync-now {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  margin-left: var(--sp-3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.btn-sync-now:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-sync-now:disabled {
  opacity: 0.5;
  pointer-events: none;
}
