/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global Performance Optimizations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  /* Enable smooth scrolling with hardware acceleration */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Optimize rendering for scroll performance */
body, html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  background: #FFFFFF;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  color: #000000;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Vercel-style subtle background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  will-change: auto;
}

/* Quiz/Player-only styles - scoped to avoid affecting login/admin pages */
.player-quiz-container .container,
.player-gate-container .container {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 48rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-quiz-container h1,
.player-gate-container h1 {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  color: #fcd34d;
  margin-bottom: 2.5rem;
  letter-spacing: 0.1em;
  animation: pulse 3s infinite;
}

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

.player-quiz-container p,
.player-gate-container p {
  font-size: 14px;
  padding-top: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-quiz-container label,
.player-gate-container label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fef2c7;
}

.player-quiz-container input[type="file"],
.player-gate-container input[type="file"] {
  width: 100%;
  max-width: 28rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.player-quiz-container input[type="file"]::-webkit-file-upload-button,
.player-gate-container input[type="file"]::-webkit-file-upload-button {
  margin-right: 1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 700;
  background: #fcd34d;
  color: #581c87;
  cursor: pointer;
  -webkit-transition: background 0.3s ease;
  transition: background 0.3s ease;
}

.player-quiz-container input[type="file"]::-webkit-file-upload-button:hover,
.player-gate-container input[type="file"]::-webkit-file-upload-button:hover {
  background: #fbbf24;
}

.player-quiz-container button:not(.indicator-btn):not(.answer-btn),
.player-gate-container button {
  padding: 0.75rem 2.5rem;
  background: #fcd34d;
  color: #581c87;
  font-weight: 700;
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.player-quiz-container button:not(.indicator-btn):not(.answer-btn):hover,
.player-gate-container button:hover {
  background: #fbbf24;
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.player-quiz-container button:not(.indicator-btn):not(.answer-btn):focus,
.player-gate-container button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(252, 211, 77, 0.5);
}

.player-quiz-container .question-box {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.player-quiz-container .question-number {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fcd34d;
  margin-bottom: 0.75rem;
}

.player-quiz-container .question-text {
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.player-quiz-container input[type="text"] {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 0.75rem;
}

.player-quiz-container input[type="text"]:focus {
  outline: none;
  border-color: #fcd34d;
  box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.4);
}

.player-quiz-container input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.player-quiz-container .answer-box {
  background: rgba(52, 211, 153, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.25rem;
  animation: fadeIn 0.5s ease-in-out;
}

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

.player-quiz-container .answer-text {
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-quiz-container .user-answer {
  font-size: 0.875rem;
  color: #fef2c7;
  margin-top: 0.75rem;
}

.player-quiz-container .action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.25rem;
}

.player-quiz-container .action-buttons button:nth-child(1) {
  background: #ef4444;
  color: white;
}

.player-quiz-container .action-buttons button:nth-child(1):hover {
  background: #dc2626;
}

.player-quiz-container .action-buttons button:nth-child(2) {
  background: #34d399;
  color: white;
}

.player-quiz-container .action-buttons button:nth-child(2):hover {
  background: #10b981;
}

.player-quiz-container .score-display {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fcd34d;
  margin-top: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-quiz-container .quiz-finished h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fcd34d;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-quiz-container .quiz-finished p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.player-quiz-container .quiz-finished .score {
  font-size: 1.875rem;
  font-weight: 800;
  color: #fef2c7;
  margin-bottom: 2rem;
}

.player-quiz-container .history-section {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.player-quiz-container .history-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fcd34d;
  margin-bottom: 1.25rem;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.player-quiz-container .history-list {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  max-height: 12rem;
  overflow-y: auto;
}

.player-quiz-container .history-item {
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 0;
}

.player-quiz-container .history-item:last-child {
  border-bottom: none;
}

.player-quiz-container .history-note {
  font-size: 0.75rem;
  color: #fef2c7;
  margin-top: 0.75rem;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Inter is loaded from public/index.html so production CSS minify does not choke on @import. */

/* ============================================================
   Apple glassmorphism theme layer
   Visual overlay only — no markup or behavior changes.
   Loaded after component styles so appearance wins.
   ============================================================ */

:root {
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-soft: rgba(0, 113, 227, 0.12);
  --apple-green: #30d158;
  --apple-red: #ff3b30;
  --apple-orange: #ff9f0a;

  --ink-900: #1d1d1f;
  --ink-700: #424245;
  --ink-500: #6e6e73;
  --ink-400: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.12);

  --surface: rgba(255, 255, 255, 0.18);
  --surface-strong: rgba(255, 255, 255, 0.26);
  --surface-hover: rgba(255, 255, 255, 0.38);
  --app-bg: #b9c7de;
  --glass-blur: saturate(220%) blur(44px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.42);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.55);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-pill: 980px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04);

  /* Remap legacy brand tokens so existing component CSS follows Apple */
  --brand-950: #1d1d1f;
  --brand-900: #1d1d1f;
  --brand-800: #2c2c2e;
  --brand-700: rgba(0, 113, 227, 0.18);
  --brand-solid-700: #1d1d1f;
  --brand-600: #0071e3;
  --brand-500: #0071e3;
  --brand-400: #2997ff;
  --brand-300: #64b5ff;
  --brand-100: rgba(255, 255, 255, 0.28);
  --brand-50: rgba(255, 255, 255, 0.18);
  --brand-accent: #0071e3;
}

/* ---------- Canvas ---------- */
html,
body {
  transform: none !important;
  -webkit-transform: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  background:
    radial-gradient(1200px 700px at 8% -10%, #8ec5ff 0%, transparent 55%),
    radial-gradient(900px 640px at 96% 4%, #d7b7ff 0%, transparent 52%),
    radial-gradient(800px 520px at 70% 110%, #9ee7ff 0%, transparent 50%),
    radial-gradient(700px 480px at 0% 90%, #f3d6c4 0%, transparent 48%),
    linear-gradient(165deg, #c5d3ea 0%, #dcd6ea 46%, #e6e0d8 100%) !important;
  background-attachment: fixed !important;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  display: block !important;
  background-image:
    radial-gradient(ellipse 70% 45% at 20% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(255, 255, 255, 0.22), transparent 55%) !important;
  background-size: auto !important;
  opacity: 1 !important;
  z-index: 0;
}

.admin-dashboard-layout,
.admin-main-content,
.content-wrapper,
.admin-dashboard {
  background: transparent !important;
  transform: none !important;
  contain: none !important;
}

/* ---------- Sidebar ---------- */
.sidebar-nav {
  background: rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-right: var(--glass-border) !important;
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.28),
    16px 0 48px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.28),
    16px 0 48px rgba(15, 23, 42, 0.08),
    var(--glass-inset) !important;
}

.sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid var(--line) !important;
}

.sidebar-logo-full,
.sidebar-logo-img {
  background: transparent !important;
}

.sidebar-logo-text {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  font-weight: 650 !important;
  letter-spacing: -0.02em !important;
}

.sidebar-item {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  background: transparent !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  transform: none;
}

.sidebar-item.active {
  background: rgba(255, 255, 255, 0.42) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  box-shadow: var(--glass-inset), var(--shadow-sm) !important;
}

.sidebar-item.active::before,
.sidebar-indicator {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
}

.sidebar-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-top: 1px solid var(--line) !important;
}

.sidebar-toggle {
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  color: #424245 !important;
  color: var(--ink-700) !important;
  border-radius: 980px !important;
  border-radius: var(--radius-pill) !important;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12) !important;
}

/* ---------- Top bar / chrome ---------- */
.top-bar {
  background: rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-bottom: var(--glass-border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35), var(--glass-inset) !important;
  transform: none !important;
}

.top-bar-user-btn,
.mobile-menu-toggle {
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 12px !important;
  color: #424245 !important;
  color: var(--ink-700) !important;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.top-bar-user-btn:hover,
.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

.mobile-menu-toggle {
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.mobile-menu-toggle svg,
.mobile-menu-toggle .icon {
  display: block !important;
  margin: 0 auto !important;
}

.user-avatar-small,
.user-avatar-medium {
  background: linear-gradient(145deg, #3a3a3c, #1d1d1f) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: #ffffff !important;
}

.notification-badge {
  background: #0071e3 !important;
  background: var(--apple-blue) !important;
}

.user-dropdown {
  background: rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-lg), var(--glass-inset) !important;
}

.user-dropdown-header {
  background: rgba(255, 255, 255, 0.22) !important;
  border-radius: 12px !important;
}

.user-dropdown-item {
  border-radius: 10px !important;
}

.user-dropdown-item:hover {
  background: rgba(0, 113, 227, 0.08) !important;
}

.user-dropdown-divider {
  background: rgba(0, 0, 0, 0.08) !important;
  background: var(--line) !important;
}

/* ---------- Section headers ---------- */
.section-header h1,
.calendar-section-header h1,
.scheduler-embed-header h1 {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

.section-header p,
.calendar-section-header p,
.scheduler-embed-header p {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  font-size: 0.95rem !important;
}

/* ---------- Glass cards ---------- */
.dashboard-card,
.stat-card,
.stat-item,
.reports-card,
.quiz-action-card,
.quiz-history-card,
.quiz-upload-card,
.create-session-card,
.metrics-graph-card,
.user-management-card,
.report-session,
.book-slot-modal,
.confirm-modal,
.calendar-wrap,
.profile-card,
.td-card,
.td-stat,
.scheduler-embed-frame,
.report-view-card,
.timesheet-card,
.consultant-bookings-card {
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 18px !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-sm), var(--glass-inset) !important;
  contain: none !important;
  isolation: auto !important;
}

.dashboard-card:hover,
.stat-card:hover,
.quiz-session-card:hover,
.stat-item:hover,
.td-stat:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-md), var(--glass-inset) !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
  background: rgba(255, 255, 255, 0.38) !important;
  background: var(--surface-hover) !important;
}

.stat-card {
  padding: 22px !important;
  position: relative;
  overflow: hidden;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  padding-left: 26px !important;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 99px;
  background: #1d1d1f;
  background: var(--ink-900);
  opacity: 0.85;
}

.card-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  border-bottom-color: var(--line) !important;
}

.card-header h3 {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.card-icon {
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.stat-number,
.stat-value {
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}

.stat-description,
.stat-label {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.stat-card .card-header {
  display: flex !important;
  width: 100% !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid var(--line) !important;
}

@media (min-width: 700px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important;
  }
}

/* ---------- Buttons ---------- */
.primary-btn,
.quiz-session-start-btn,
.view-btn,
.copy-btn,
.confirm-btn.confirm-primary,
.btn-download-all,
.btn-download-session,
.btn-download-report,
a.btn-download-report,
.calendar-view-tab.active,
.scheduler-embed-btn:not(.scheduler-embed-btn-secondary),
.user-add-btn,
.save-btn,
.profile-save-btn {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease !important;
}

.primary-btn:hover,
.quiz-session-start-btn:hover,
.view-btn:hover,
.copy-btn:hover,
.confirm-btn.confirm-primary:hover,
.btn-download-all:hover,
.btn-download-session:hover,
.btn-download-report:hover,
a.btn-download-report:hover,
.scheduler-embed-btn:not(.scheduler-embed-btn-secondary):hover {
  background: #2c2c2e !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
  filter: none !important;
}

.secondary-btn,
.btn-select-all,
.cancel-btn,
.confirm-btn.cancel-btn,
.calendar-nav-btn,
.calendar-today-btn,
.calendar-add-btn,
.refresh-btn,
.upload-btn,
.scheduler-embed-btn-secondary {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--glass-inset) !important;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.secondary-btn:hover,
.btn-select-all:hover,
.confirm-btn.cancel-btn:hover,
.calendar-nav-btn:hover,
.calendar-today-btn:hover,
.calendar-add-btn:hover,
.scheduler-embed-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

.btn-delete-report,
.btn-delete-selected,
.delete-session-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px !important;
  min-height: 34px !important;
  background: #ff3b30 !important;
  background: var(--apple-red) !important;
  border: none !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 14px rgba(255, 59, 48, 0.22) !important;
  white-space: nowrap !important;
}

.btn-delete-report:hover,
.btn-delete-selected:hover,
.delete-session-btn:hover {
  background: #e0352b !important;
  transform: translateY(-1px) !important;
}

/* ---------- Forms / inputs ---------- */
.search-input,
.reports-search,
.book-slot-field select,
.book-slot-field input,
.profile-card input,
.profile-card select,
.create-session-card input,
.create-session-card select,
.create-session-card textarea,
.user-management-card input,
.user-management-card select,
.custom-select-trigger,
.calendar-consultant-select .custom-select-trigger {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.search-input:focus,
.reports-search:focus-within,
.book-slot-field select:focus,
.book-slot-field input:focus,
.profile-card input:focus,
.create-session-card input:focus,
.create-session-card select:focus,
.create-session-card textarea:focus,
.user-management-card input:focus {
  border-color: #0071e3 !important;
  border-color: var(--apple-blue) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12) !important;
  box-shadow: 0 0 0 4px var(--apple-blue-soft) !important;
  outline: none !important;
}

.loading-spinner {
  border-top-color: #0071e3 !important;
  border-top-color: var(--apple-blue) !important;
  border-right-color: #0071e3 !important;
  border-right-color: var(--apple-blue) !important;
}

/* ---------- Progress ---------- */
.report-view-progress-fill,
.progress-fill,
.quiz-progress-fill,
.td-progress-bar {
  background: linear-gradient(90deg, #1d1d1f, #0071e3) !important;
}

.progress-ring {
  --ring-size: 132px;
  --ring-thickness: 15px;
  --ring-value: 0;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, #ffffff calc(100% - var(--ring-thickness)), transparent calc(100% - var(--ring-thickness) + 1px)),
    conic-gradient(#0071e3 calc(var(--ring-value) * 1%), #e8e8ed 0);
  background:
    radial-gradient(closest-side, #ffffff calc(100% - var(--ring-thickness)), transparent calc(100% - var(--ring-thickness) + 1px)),
    conic-gradient(var(--apple-blue) calc(var(--ring-value) * 1%), #e8e8ed 0);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.progress-ring-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1d1d1f;
  color: var(--ink-900);
}

.progress-ring-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6e6e73;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-progress-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  margin-bottom: 20px;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(0, 113, 227, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.26) !important;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(0, 113, 227, 0.10), transparent 60%),
    var(--surface-strong) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 18px !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-md), var(--glass-inset) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}

.dashboard-progress-copy h3 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1d1d1f;
  color: var(--ink-900);
}

.dashboard-progress-copy p {
  margin: 0;
  color: #6e6e73;
  color: var(--ink-500);
  font-size: 0.875rem;
}

/* ---------- Metrics / pulse board ---------- */
.metrics-graph-card {
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(0, 113, 227, 0.06), transparent 55%),
    rgba(255, 255, 255, 0.26) !important;
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(0, 113, 227, 0.06), transparent 55%),
    var(--surface-strong) !important;
}

.metrics-chip {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #424245 !important;
  color: var(--ink-700) !important;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

.metrics-chip strong,
.metrics-back-btn,
.metrics-drill-hint,
.metrics-tooltip-row strong,
.metrics-tooltip-hint,
.pulse-count,
.pulse-row.is-lead .pulse-rank {
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.metrics-chip-accent {
  background: rgba(255, 246, 229, 0.28) !important;
  border-color: rgba(243, 217, 164, 0.5) !important;
}

.metrics-overview-hit:hover,
.metrics-overview-hit:focus-visible {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  box-shadow: var(--shadow-sm) !important;
}

.pulse-spark {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.pulse-spark-line { stroke: #0071e3 !important; stroke: var(--apple-blue) !important; }
.pulse-spark-dot { fill: #0071e3 !important; fill: var(--apple-blue) !important; }

.pulse-row {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.pulse-row.is-lead {
  background: rgba(255, 255, 255, 0.32) !important;
  border-color: rgba(0, 113, 227, 0.22) !important;
}

.pulse-avatar {
  background: linear-gradient(145deg, #3a3a3c, #1d1d1f) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18) !important;
}

.pulse-bar {
  background: linear-gradient(90deg, #1d1d1f 0%, #0071e3 100%) !important;
}

.pulse-ring-fg { stroke: #0071e3 !important; stroke: var(--apple-blue) !important; }
.metrics-legend .lg-green {
  background: linear-gradient(180deg, #2997ff, #0071e3) !important;
}

/* ---------- Reports / tables ---------- */
.report-session-header {
  background: rgba(255, 255, 255, 0.16) !important;
}

.report-session-title {
  font-weight: 700 !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

.report-user-item {
  border-radius: 12px !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  border-color: var(--line) !important;
}

.report-user-header:hover {
  background: rgba(0, 113, 227, 0.06) !important;
}

.reports-sample-banner,
.dashboard-sample-banner {
  background: rgba(0, 113, 227, 0.08) !important;
  border-color: rgba(0, 113, 227, 0.16) !important;
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.report-answers-table th,
.report-view-answers-table th,
.user-table th,
.result-analysis-table th {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  text-transform: uppercase !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em !important;
  font-weight: 600 !important;
}

.report-answers-table tr:hover td,
.user-table tbody tr:hover td {
  background: rgba(0, 113, 227, 0.04) !important;
}

.quiz-session-card {
  border-radius: 12px !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-sm), var(--glass-inset) !important;
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
          backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
          backdrop-filter: var(--glass-blur) !important;
}

.reports-empty h3,
.empty-state h3 {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

/* ---------- Calendar ---------- */
.calendar-view-tabs {
  background: rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px !important;
  padding: 4px !important;
}

.calendar-view-tab {
  border-radius: 10px !important;
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.calendar-weekdays,
.calendar-grid,
.calendar-row {
  background: rgba(0, 0, 0, 0.08) !important;
  background: var(--line) !important;
}

.calendar-weekday {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.calendar-cell {
  background: rgba(255, 255, 255, 0.22) !important;
}

.calendar-cell:hover {
  background: rgba(255, 255, 255, 0.38) !important;
}

.calendar-cell--empty {
  background: rgba(255, 255, 255, 0.08) !important;
}

.calendar-cell--today {
  background: rgba(0, 113, 227, 0.10) !important;
  border-color: rgba(0, 113, 227, 0.28) !important;
}

.calendar-event--mine {
  background: rgba(0, 113, 227, 0.14) !important;
  border: 1px solid rgba(0, 113, 227, 0.28) !important;
  color: #003e92 !important;
}

.book-slot-modal,
.confirm-modal {
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04) !important;
  box-shadow: var(--shadow-lg) !important;
}

.confirm-overlay,
.modal-overlay,
.book-slot-overlay {
  background: rgba(29, 29, 31, 0.36) !important;
  backdrop-filter: saturate(140%) blur(10px) !important;
  -webkit-backdrop-filter: saturate(140%) blur(10px) !important;
}

.scheduler-embed-fallback {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.scheduler-embed-fallback-icon {
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.scheduler-embed-cmd {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #d2d2d7 !important;
}

/* ---------- Login ---------- */
.tech-login-container.login-unified {
  background:
    radial-gradient(120% 80% at 70% 12%, rgba(142, 197, 255, 0.45) 0%, transparent 48%),
    radial-gradient(90% 70% at 12% 88%, rgba(215, 183, 255, 0.32) 0%, transparent 50%),
    linear-gradient(165deg, #c5d3ea 0%, #dcd6ea 48%, #e6e0d8 100%) !important;
}

.aurora-canvas {
  z-index: 0 !important;
}

.login-card {
  width: 100% !important;
  max-width: min(920px, 100%) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    var(--shadow-lg),
    var(--glass-inset) !important;
  padding: 0 !important;
}

.login-headline {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  text-align: left !important;
  margin: 0 !important;
}

.login-kicker,
.login-form-hint,
.login-subhead {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.login-form-title {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
}

.login-pill {
  background: rgba(0, 113, 227, 0.12) !important;
  background: var(--apple-blue-soft) !important;
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.login-tagline {
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.tech-login-container .form-label {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  font-weight: 600 !important;
}

.login-card .form-input,
.tech-login-container .form-input {
  background: rgba(255, 255, 255, 0.48) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 14px !important;
}

.login-card .form-input:focus,
.tech-login-container .form-input:focus {
  border-color: #0071e3 !important;
  border-color: var(--apple-blue) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12) !important;
  box-shadow: 0 0 0 4px var(--apple-blue-soft) !important;
}

.tech-login-container .primary-btn {
  min-height: 48px !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.google-btn {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.48) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  min-height: 48px !important;
}

.google-btn:hover,
.tech-login-container .login-card .form-actions .google-btn:focus {
  border-color: #0071e3 !important;
  border-color: var(--apple-blue) !important;
  transform: none !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  box-shadow: var(--shadow-md) !important;
}

.tech-login-container .security-title {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

.tech-login-container .security-desc {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.tech-login-container .security-desc::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 1024px) {
  .login-card {
    max-width: min(480px, 100%) !important;
  }

  .login-headline {
    text-align: center !important;
    font-size: 1.55rem !important;
  }
}

/* ---------- Banners ---------- */
.emulator-banner {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(29, 29, 31, 0.42);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  color: #f5f5f7;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 16px;
  text-align: center;
}

.emulator-banner a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.emulator-banner a:hover {
  background: rgba(255, 255, 255, 0.24);
}

body:has(.emulator-banner) .preview-role-banner {
  top: 52px;
}

body:has(.emulator-banner) .top-bar {
  top: 40px;
}

body:has(.emulator-banner) .sidebar-nav {
  top: 40px;
  height: calc(100vh - 40px);
}

body:has(.emulator-banner) .admin-main-content {
  margin-top: calc(64px + 40px);
  height: calc(100vh - 64px - 40px);
  min-height: calc(100vh - 64px - 40px);
}

@media (max-width: 768px) {
  body:has(.emulator-banner) .admin-main-content {
    margin-top: calc(60px + 40px);
    height: calc(100vh - 60px - 40px);
    min-height: calc(100vh - 60px - 40px);
  }
}

.preview-role-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  background: rgba(29, 29, 31, 0.42);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: capitalize;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-role-banner .preview-role-exit {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-decoration: none;
  text-transform: none;
}

.preview-role-banner .preview-role-exit:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ---------- Toast ---------- */
.toast {
  background: rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-lg), var(--glass-inset) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
}

.toast.success { border-left: 4px solid #30d158 !important; border-left: 4px solid var(--apple-green) !important; }
.toast.error { border-left: 4px solid #ff3b30 !important; border-left: 4px solid var(--apple-red) !important; }
.toast.warning { border-left: 4px solid #ff9f0a !important; border-left: 4px solid var(--apple-orange) !important; }
.toast.info { border-left: 4px solid #0071e3 !important; border-left: 4px solid var(--apple-blue) !important; }

/* ---------- Quiz result ---------- */
.player-quiz-container .quiz-completed {
  min-height: calc(100vh - 48px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: transparent !important;
}

.player-quiz-container .result-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 28px !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-lg), var(--glass-inset) !important;
  padding: 40px 32px 28px !important;
  text-align: center;
}

.player-quiz-container .result-title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  letter-spacing: -0.035em !important;
  margin: 0 0 22px 0 !important;
  text-shadow: none !important;
  animation: none !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

.player-quiz-container .result-badge,
.player-quiz-container .result-badge.pass,
.player-quiz-container .result-badge.fail {
  display: none;
}

.player-quiz-container .result-score-hero {
  width: 148px;
  height: 148px;
  margin: 0 auto 22px;
}

.player-quiz-container .result-ring-label .result-percent {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  letter-spacing: -0.04em !important;
}

.player-quiz-container .result-score-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.player-quiz-container .result-fraction {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  font-size: 0.95rem !important;
}

.player-quiz-container .result-status,
.player-quiz-container .result-status.pass,
.player-quiz-container .result-status.fail {
  display: none;
}

.player-quiz-container .result-subtitle {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  text-shadow: none !important;
  font-size: 0.98rem !important;
  padding-top: 0 !important;
  margin: 0 0 26px !important;
}

.player-quiz-container .review-answers-box {
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-top: 26px;
  background: rgba(245, 245, 247, 0.7);
}

.player-quiz-container .result-btn {
  width: 100% !important;
  min-height: 48px !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
  padding: 12px 20px !important;
}

.player-quiz-container .result-btn.primary {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.player-quiz-container .result-btn.outline {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
}

.player-quiz-container .result-analysis-table tr.correct td {
  background: rgba(48, 209, 88, 0.08);
}

.player-quiz-container .result-analysis-table tr.incorrect td {
  background: rgba(255, 59, 48, 0.07);
}

.player-quiz-container .result-analysis-table tr.correct td:nth-child(5) { color: #248a3d; }
.player-quiz-container .result-analysis-table tr.incorrect td:nth-child(5) { color: #ff3b30; color: var(--apple-red); }

.player-quiz-container .exit-note {
  color: #c93400 !important;
  text-shadow: none !important;
}

/* ---------- Quiz start page ---------- */
.player-quiz-container .quiz-name-entry {
  min-height: calc(100vh - 48px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: transparent !important;
}

.player-quiz-container .name-entry-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 28px !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-lg), var(--glass-inset) !important;
  padding: 40px 32px 28px !important;
  text-align: center;
}

.player-quiz-container .name-entry-title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  letter-spacing: -0.035em !important;
  margin: 0 0 8px 0 !important;
  text-shadow: none !important;
  animation: none !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

.player-quiz-container .name-entry-kicker {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin: 0 0 8px !important;
}

.player-quiz-container .name-entry-hint {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  font-size: 0.98rem !important;
  margin: 0 0 18px !important;
  text-shadow: none !important;
}

.player-quiz-container .name-entry-pill {
  background: rgba(0, 113, 227, 0.12) !important;
  background: var(--apple-blue-soft) !important;
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.player-quiz-container .name-entry-label {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  text-align: left;
}

.player-quiz-container .quiz-name-entry .name-input {
  background: rgba(255, 255, 255, 0.48) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
}

.player-quiz-container .quiz-name-entry .name-input:focus {
  border-color: #0071e3 !important;
  border-color: var(--apple-blue) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12) !important;
  box-shadow: 0 0 0 4px var(--apple-blue-soft) !important;
}

.player-quiz-container .start-quiz-btn {
  width: 100% !important;
  min-height: 48px !important;
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
  padding: 12px 20px !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.player-quiz-container .start-quiz-btn:disabled {
  background: rgba(29, 29, 31, 0.28) !important;
  color: rgba(255, 255, 255, 0.78) !important;
  box-shadow: none !important;
}

/* ---------- Quiz test page (match portal glass) ---------- */
.player-quiz-container,
.player-gate-container {
  background: transparent !important;
}

.player-quiz-container h1,
.player-gate-container h1 {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  text-align: left !important;
  animation: none !important;
  margin: 0 !important;
  text-shadow: none !important;
}

.player-quiz-container p,
.player-gate-container p {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  text-shadow: none !important;
}

.player-quiz-container .confirm-modal {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22) !important;
}

.player-quiz-container .confirm-modal h3 {
  color: #1d1d1f !important;
}

.player-quiz-container .confirm-modal p {
  color: #1d1d1f !important;
  font-weight: 500 !important;
}

.player-quiz-container .confirm-btn.cancel-btn {
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.player-quiz-container .quiz-header,
.player-quiz-container .quiz-content,
.player-quiz-container .quiz-sidebar,
.player-quiz-container .quiz-loading,
.player-quiz-container .quiz-error,
.player-quiz-container .quiz-fallback,
.player-gate-content {
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 18px !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-sm), var(--glass-inset) !important;
}

.player-quiz-container .quiz-header h1 {
  font-size: 1.15rem !important;
  text-align: left !important;
}

.player-quiz-container .question-number {
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.player-quiz-container .question-text,
.player-quiz-container .answer-btn .answer-text {
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  text-shadow: none !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  text-overflow: initial !important;
  -webkit-line-clamp: unset !important;
}

.player-quiz-container .answer-btn {
  background: rgba(255, 255, 255, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border-radius: 12px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  align-items: flex-start !important;
  box-shadow: none !important;
  transform: none !important;
}

.player-quiz-container .answer-btn:hover {
  background: rgba(255, 255, 255, 0.38) !important;
  background: var(--surface-hover) !important;
  transform: none !important;
}

.player-quiz-container .answer-btn.selected {
  background: rgba(0, 113, 227, 0.16) !important;
  border-color: rgba(0, 113, 227, 0.4) !important;
}

.player-quiz-container .answer-letter {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  flex-shrink: 0 !important;
}

.player-quiz-container .answer-btn.selected .answer-letter {
  background: #0071e3 !important;
  background: var(--apple-blue) !important;
  color: #ffffff !important;
}

.player-quiz-container button:not(.indicator-btn):not(.answer-btn),
.player-gate-container button {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
  font-weight: 600 !important;
  transform: none !important;
}

.player-quiz-container button:not(.indicator-btn):not(.answer-btn):hover,
.player-gate-container button:hover {
  background: #2c2c2e !important;
  transform: translateY(-1px) !important;
}

.player-quiz-container .control-btn.prev-btn:disabled,
.player-quiz-container .quiz-exit-btn {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  box-shadow: none !important;
}

.player-quiz-container .timer-display.timer-top {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border-color: #1d1d1f !important;
  border-color: var(--ink-900) !important;
  border-radius: 12px !important;
}

.player-quiz-container .progress-fill {
  background: #0071e3 !important;
  background: var(--apple-blue) !important;
}

.player-quiz-container .indicator-btn.active {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  border-color: #1d1d1f !important;
  border-color: var(--ink-900) !important;
  color: #ffffff !important;
}

.player-quiz-container .indicator-btn.answered:not(.active) {
  background: rgba(0, 113, 227, 0.16) !important;
  border-color: rgba(0, 113, 227, 0.28) !important;
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

.player-quiz-container .name-input,
.player-quiz-container input[type="text"] {
  background: rgba(255, 255, 255, 0.4) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 12px !important;
}

.player-quiz-container .quiz-nav-under-choices {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
  border-top-color: var(--line) !important;
}

/* ---------- Training dashboard extras ---------- */
.td-progress-track,
.pulse-track {
  background: #e8e8ed !important;
}

.td-progress-count {
  color: #0071e3 !important;
  color: var(--apple-blue) !important;
}

/* ---------- Scrollbars ---------- */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
  background-clip: padding-box;
}

/* ---------- Remaining portal surfaces ---------- */
.user-management-container .card,
.session-card,
.upload-area,
.timesheet-toolbar,
.timesheet-grid-wrapper,
.my-sessions-user-row,
.cb-header,
.dashboard-bookings {
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 12px !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--shadow-sm), var(--glass-inset) !important;
  backdrop-filter: saturate(220%) blur(44px) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: saturate(220%) blur(44px) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}

.upload-area {
  border: 1.5px dashed rgba(255, 255, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

.upload-area:hover {
  border-color: rgba(0, 113, 227, 0.45) !important;
  background: rgba(255, 255, 255, 0.28) !important;
}

.form-input,
.form-select,
.timesheet-select,
.file-select,
.existing-files .file-select {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 12px !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.form-input:focus,
.form-select:focus,
.timesheet-select:focus,
.file-select:focus {
  border-color: #0071e3 !important;
  border-color: var(--apple-blue) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12) !important;
  box-shadow: 0 0 0 4px var(--apple-blue-soft) !important;
  outline: none !important;
}

.btn-primary,
.tab-btn.active,
.timesheet-btn.today-btn {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border-color: #1d1d1f !important;
  border-color: var(--ink-900) !important;
  border-radius: 12px !important;
}

.tab-btn,
.timesheet-btn,
.btn-refresh-files,
.btn-sign-out {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 12px !important;
  color: #424245 !important;
  color: var(--ink-700) !important;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

.tab-btn.active {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
}

.timesheet-grid thead th,
.timesheet-grid th {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
}

.timesheet-grid td {
  background: rgba(255, 255, 255, 0.12) !important;
}

.my-sessions-container {
  background: transparent !important;
}

.profile-card {
  max-width: 480px;
}

.login-card .form-input {
  background: rgba(255, 255, 255, 0.48) !important;
}

.td-card,
.td-stat {
  background: rgba(255, 255, 255, 0.26) !important;
  background: var(--surface-strong) !important;
}

.progress-ring {
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, 0.35) calc(100% - var(--ring-thickness)), transparent calc(100% - var(--ring-thickness) + 1px)),
    conic-gradient(#0071e3 calc(var(--ring-value) * 1%), rgba(255, 255, 255, 0.28) 0);
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, 0.35) calc(100% - var(--ring-thickness)), transparent calc(100% - var(--ring-thickness) + 1px)),
    conic-gradient(var(--apple-blue) calc(var(--ring-value) * 1%), rgba(255, 255, 255, 0.28) 0);
}

/* ---------- Portal-wide layout containment ---------- */
.admin-dashboard-layout,
.admin-main-content,
.content-wrapper,
.dashboard-grid,
.quiz-management-row,
.training-dashboard,
.td-main,
.td-side,
.reports-card,
.user-management-container,
.calendar-wrap,
.timesheet-section,
.scheduler-embed,
.profile-container,
.consultant-bookings {
  min-width: 0 !important;
  max-width: 100%;
}

.admin-main-content {
  overflow-x: hidden !important;
}

.dashboard-card,
.stat-card,
.stat-item,
.reports-card,
.quiz-action-card,
.quiz-history-card,
.quiz-upload-card,
.metrics-graph-card,
.user-management-card,
.report-session,
.book-slot-modal,
.confirm-modal,
.calendar-wrap,
.profile-card,
.td-card,
.td-stat,
.scheduler-embed-frame,
.timesheet-card,
.consultant-bookings-card,
.user-management-container .card,
.session-card,
.timesheet-grid-wrapper,
.dashboard-bookings {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.admin-main-content h1,
.admin-main-content h2,
.admin-main-content h3,
.admin-main-content h4,
.admin-main-content p,
.admin-main-content li,
.admin-main-content td,
.admin-main-content th,
.admin-main-content label,
.admin-main-content .empty-hint,
.admin-main-content .stat-description,
.admin-main-content .stat-label,
.admin-main-content .card-header h3,
.admin-main-content .quiz-session-card-title,
.admin-main-content .report-session-title,
.admin-main-content .user-email,
.admin-main-content .profile-value {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  max-width: 100%;
}

.admin-main-content input,
.admin-main-content select,
.admin-main-content textarea {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.admin-main-content button,
.confirm-modal button,
.book-slot-modal button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.card-header {
  gap: 12px !important;
  min-width: 0 !important;
}

.card-header h3 {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.users-table,
.timesheet-grid-wrapper,
.report-view-card,
.result-analysis {
  overflow-x: auto !important;
  max-width: 100%;
}

.table-cell,
.user-details,
.user-info,
.profile-row,
.report-session-summary,
.quiz-session-card,
.metrics-graph-header {
  min-width: 0 !important;
}

.confirm-modal,
.book-slot-modal {
  max-width: min(560px, calc(100vw - 32px)) !important;
  box-sizing: border-box !important;
}

.reports-search {
  min-width: 0 !important;
}

.quiz-action-card .create-quiz-session,
.quiz-action-card .create-session-form,
.quiz-action-card .form-section,
.quiz-action-card .existing-files,
.quiz-action-card .existing-files-row {
  min-width: 0 !important;
  max-width: 100% !important;
}

.quiz-source-tabs {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-self: flex-start !important;
  width: auto !important;
  flex: 0 0 auto !important;
  gap: 2px !important;
  padding: 3px !important;
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  border-radius: 14px !important;
  max-width: 100%;
}

.quiz-source-tabs .tab-btn {
  background: transparent !important;
  border: none !important;
  color: #6e6e73 !important;
  color: var(--ink-500) !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}

.quiz-source-tabs .tab-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
}

.quiz-source-tabs .tab-btn.active {
  background: rgba(255, 255, 255, 0.72) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border: none !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), var(--glass-inset) !important;
}

.btn-create-session,
.btn-upload-inline {
  background: #1d1d1f !important;
  background: var(--ink-900) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
  font-weight: 600 !important;
}

.btn-create-session:hover:not(:disabled),
.btn-upload-inline:hover:not(:disabled) {
  background: #2c2c2e !important;
}

.btn-refresh-files,
.refresh-users-btn,
.browse-btn-inline,
.select-all-btn {
  background: rgba(255, 255, 255, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border: var(--glass-border) !important;
  color: #1d1d1f !important;
  color: var(--ink-900) !important;
  border-radius: 12px !important;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  box-shadow: var(--glass-inset) !important;
}

.existing-files .file-select,
.session-title-input,
.duration-select {
  max-width: 100% !important;
  height: 44px !important;
  box-sizing: border-box !important;
}

.create-quiz-session .file-select,
.create-quiz-session .duration-select {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding: 0 40px 0 16px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%236e6e73%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
}

.create-quiz-session .session-title-input {
  padding: 0 16px !important;
  background-image: none !important;
}

.create-quiz-session .btn-refresh-files {
  height: 44px !important;
  padding: 0 16px !important;
}

.empty-hint,
.section-label-text,
.create-session-desc,
.create-session-error {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

@media (max-width: 768px) {
  .admin-main-content {
    padding: 20px 16px !important;
  }
}

/* ---------- Cross-breakpoint layout (no design/behavior change) ---------- */
html,
body,
#root {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe,
canvas {
  max-width: 100%;
}

.admin-dashboard-layout,
.admin-main-content,
.content-wrapper,
.login-stage,
.login-card,
.login-form,
.form-section,
.quiz-action-card,
.reports-card,
.users-table,
.timesheet-grid-wrapper,
.scheduler-embed,
.player-quiz-container {
  min-width: 0;
  max-width: 100%;
}

.quick-actions-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)) !important;
}

.quiz-ready-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)) !important;
}

.emulator-banner,
.preview-role-banner {
  max-width: calc(100vw - 16px);
  flex-wrap: wrap;
  box-sizing: border-box;
}

.preview-role-banner {
  width: -webkit-max-content;
  width: max-content;
}

@media (max-width: 1280px) {
  .admin-main-content {
    padding: 24px 20px;
  }
}

@media (max-width: 1024px) {
  .sidebar-nav {
    left: -280px !important;
    transform: none !important;
    pointer-events: none;
  }

  .sidebar-nav.mobile-open {
    left: 0 !important;
    transform: none !important;
    pointer-events: auto;
  }

  .dashboard-grid,
  .quiz-management-row,
  .quiz-section,
  .system-stats,
  .quick-actions-grid,
  .training-dashboard,
  .add-user-form {
    grid-template-columns: 1fr !important;
  }

  .calendar-section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .calendar-consultant-select-wrap {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  .sidebar-nav {
    left: -100% !important;
    width: min(320px, 100%) !important;
  }

  .sidebar-nav.mobile-open {
    left: 0 !important;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr !important;
  }

  .time-input-row {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 480px) {
  .admin-main-content {
    padding: 16px 12px !important;
  }

  .emulator-banner {
    font-size: 0.75rem;
    padding: 8px 10px;
    gap: 8px;
  }
}


/* App.css - Styles for the main App component */

.App {
  text-align: center;
}

.App-logo {
  height: 6vmin;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .App-logo {
    animation: App-logo-spin infinite 20s linear;
  }
}

.App-header {
  background-color: #282c34;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 2vmin);
  color: white;
}

.App-link {
  color: #61dafb;
}

@keyframes App-logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Custom styles for the quiz app */
.min-h-screen {
  min-height: 100vh;
}

.font-inter {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, #3b82f6, #8b5cf6);
}

.from-blue-50 {
  background-color: #eff6ff;
}

.to-indigo-100 {
  background-color: #e0e7ff;
}

.p-4 {
  padding: 1rem;
}

.text-gray-800 {
  color: #1f2937;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.bg-white {
  background-color: #ffffff;
}

.p-8 {
  padding: 2rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.w-full {
  width: 100%;
}

.max-w-2xl {
  max-width: 42rem;
}

.border {
  border-width: 1px;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.font-extrabold {
  font-weight: 800;
}

.text-center {
  text-align: center;
}

.text-indigo-700 {
  color: #4338ca;
}

.mb-8 {
  margin-bottom: 2rem;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-gray-600 {
  color: #4b5563;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.bg-indigo-600 {
  background-color: #4f46e5;
}

.text-white {
  color: #ffffff;
}

.font-semibold {
  font-weight: 600;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hover\:bg-indigo-700:hover {
  background-color: #4338ca;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.hover\:scale-105:hover {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(1.05) scaleY(1.05);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-4:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-indigo-500:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgba(99, 102, 241, var(--tw-ring-opacity));
}

.focus\:ring-opacity-50:focus {
  --tw-ring-opacity: 0.5;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.bg-indigo-50 {
  background-color: #eef2ff;
}

.border-indigo-200 {
  border-color: #c7d2fe;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.p-5 {
  padding: 1.25rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.font-medium {
  font-weight: 500;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.text-indigo-800 {
  color: #3730a3;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.font-semibold {
  font-weight: 600;
}

.flex {
  display: flex;
}

.justify-center {
  justify-content: center;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.bg-blue-500 {
  background-color: #3b82f6;
}

.hover\:bg-blue-600:hover {
  background-color: #2563eb;
}

.bg-green-50 {
  background-color: #f0fdf4;
}

.border-green-200 {
  border-color: #bbf7d0;
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}

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

.text-green-800 {
  color: #166534;
}

.mt-4 {
  margin-top: 1rem;
}

.justify-end {
  justify-content: flex-end;
}

.space-x-3 > * + * {
  margin-left: 0.75rem;
}

.bg-red-500 {
  background-color: #ef4444;
}

.hover\:bg-red-600:hover {
  background-color: #dc2626;
}

.transition-colors {
  transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-200 {
  transition-duration: 200ms;
}

.bg-green-500 {
  background-color: #22c55e;
}

.hover\:bg-green-600:hover {
  background-color: #16a34a;
}

.text-center {
  text-align: center;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-gray-700 {
  color: #374151;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-gray-600 {
  color: #4b5563;
}

.mt-4 {
  margin-top: 1rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-indigo-800 {
  color: #3730a3;
}

.mb-8 {
  margin-bottom: 2rem;
}

.border-t {
  border-top-width: 1px;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.mt-10 {
  margin-top: 2.5rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.text-center {
  text-align: center;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-gray-700 {
  color: #374151;
}

.mb-4 {
  margin-bottom: 1rem;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.p-4 {
  padding: 1rem;
}

.shadow-inner {
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.max-h-48 {
  max-height: 12rem;
}

.overflow-y-auto {
  overflow-y: auto;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.border-b {
  border-bottom-width: 1px;
}

.last\:border-b-0:last-child {
  border-bottom-width: 0px;
}

.border-gray-100 {
  border-color: #f3f4f6;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.font-medium {
  font-weight: 500;
}

.text-gray-700 {
  color: #374151;
}

.mr-2 {
  margin-right: 0.5rem;
}

.text-gray-500 {
  color: #6b7280;
}

.text-blue-600 {
  color: #2563eb;
}

.font-semibold {
  font-weight: 600;
}

.text-green-600 {
  color: #16a34a;
}

.text-blue-600 {
  color: #2563eb;
}

.text-indigo-700 {
  color: #4338ca;
}

.mt-2 {
  margin-top: 0.5rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-center {
  text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
  .p-8 {
    padding: 1rem;
  }
  
  .text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  .max-w-2xl {
    max-width: 100%;
  }
}

/* Apple-style glassmorphism sidebar — structure unchanged */

.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 280px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: saturate(220%) blur(44px);
  -webkit-backdrop-filter: saturate(220%) blur(44px);
  border-right: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.28),
    16px 0 48px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav.collapsed {
  width: 80px;
}

.sidebar-header {
  padding: 22px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.sidebar-logo-full {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  display: block;
  border-radius: 12px;
  background: transparent;
}

.sidebar-logo-full.is-collapsed {
  height: 40px;
  width: 40px;
  max-width: 40px;
  object-fit: cover;
  object-position: left center;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sidebar-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #1d1d1f;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar-toggle {
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  height: 36px;
  border-radius: 980px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.45);
  color: #424245;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #1d1d1f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.sidebar-nav.collapsed .sidebar-toggle {
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  padding: 0;
}

.sidebar-menu {
  flex: 1 1;
  padding: 14px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-item {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #6e6e73;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #1d1d1f;
  border-color: rgba(255, 255, 255, 0.7);
}

.sidebar-item.active {
  background: rgba(255, 255, 255, 0.42);
  color: #1d1d1f;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(15, 23, 42, 0.06);
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: #1d1d1f;
  border-radius: 999px;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  stroke-width: 1.65;
}

.sidebar-label {
  flex: 1 1;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sidebar-nav.collapsed .sidebar-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1d1d1f;
  flex-shrink: 0;
}

.sidebar-nav.collapsed .sidebar-indicator {
  display: none;
}

.sidebar-footer {
  padding: 16px 12px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 99px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.22);
}

@media (max-width: 1024px) {
  .sidebar-nav {
    left: -280px;
    width: 280px;
    transform: none;
    pointer-events: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar-nav.mobile-open {
    left: 0;
    transform: none;
    pointer-events: auto;
  }

  .sidebar-nav.collapsed {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .sidebar-nav {
    left: -100%;
    width: min(320px, 100%);
    max-width: 320px;
  }

  .sidebar-nav.mobile-open {
    left: 0;
  }
}

/* Modern Top Bar - SaaS Dashboard Style */

.top-bar {
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: saturate(220%) blur(44px);
  -webkit-backdrop-filter: saturate(220%) blur(44px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 999;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sidebar-nav.collapsed ~ .top-bar {
  left: 80px;
}

/* Left Section */
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #666666;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
  color: #000000;
}

.top-bar-search {
  display: none;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #999999;
  pointer-events: none;
  stroke-width: 2;
}

.search-input {
  width: 100%;
  padding: 8px 16px 8px 44px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FAFAFA;
  color: #000000;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  outline: none;
}

.search-input:focus {
  background: #FFFFFF;
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.search-input::placeholder {
  color: #999999;
}

/* Right Section */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.top-bar-icon-btn {
  display: none;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #000000;
  color: #FFFFFF;
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

/* User Menu */
.top-bar-user-menu {
  position: relative;
}

.top-bar-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
}

.top-bar-user-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 500;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-name-short {
  font-size: 0.875rem;
  font-weight: 400;
  color: #000000;
  white-space: nowrap;
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: #999999;
  transition: transform 0.2s ease;
}

.top-bar-user-btn:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 8px;
  z-index: 1000;
  animation: dropdownFadeIn 0.2s ease;
}

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

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #FAFAFA;
  margin-bottom: 8px;
}

.user-avatar-medium {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 500;
  font-size: 1rem;
  flex-shrink: 0;
}

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

.user-dropdown-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  margin-bottom: 4px;
}

.user-dropdown-email {
  font-size: 0.75rem;
  color: #666666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  height: 1px;
  background: #E5E5E5;
  margin: 4px 0;
}

.user-dropdown-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: #F0F7FF;
  color: #000000;
}

.user-dropdown-item.logout-item {
  color: #000000;
}

.user-dropdown-item.logout-item:hover {
  background: #FAFAFA;
  color: #000000;
}

.user-dropdown-item .icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .top-bar {
    left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .top-bar-search {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: 0 16px;
    height: 60px;
  }

  .top-bar-search {
    display: none;
  }

  .user-name-short {
    display: none;
  }

  .top-bar-user-btn {
    padding: 6px;
  }
}

.create-quiz-session {
  padding: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.quiz-action-card .create-quiz-session > h3 {
  display: none;
}

.create-quiz-session h3 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}

.create-session-desc {
  margin: 0 0 16px 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #6e6e73;
}

.create-session-loading {
  padding: 32px 8px;
  text-align: center;
  color: #6e6e73;
}

.create-session-loading .loading-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: #0071e3;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.create-session-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: rgba(255, 59, 48, 0.1);
  color: #c93400;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  min-width: 0;
}

.create-session-error svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.create-session-error span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.create-session-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.section-label svg {
  flex-shrink: 0;
}

.section-label-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quiz-source-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  align-self: flex-start;
  width: auto;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  box-sizing: border-box;
}

.tab-btn {
  padding: 8px 14px;
  min-height: 36px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #6e6e73;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.tab-btn:hover {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.28);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.72);
  color: #1d1d1f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.existing-files {
  width: 100%;
  min-width: 0;
}

.existing-files-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.duration-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  width: 100%;
  min-width: 0;
}

.duration-select {
  width: 100%;
  max-width: 280px;
}

.existing-files .file-select,
.duration-select,
.session-title-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  padding: 0 16px;
  font-size: 0.875rem;
  line-height: 1.25;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.22);
  color: #1d1d1f;
  box-sizing: border-box;
}

.existing-files .file-select,
.duration-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 0 40px 0 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%236e6e73%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

.btn-refresh-files,
.refresh-users-btn,
.browse-btn-inline,
.select-all-btn,
.btn-upload-inline,
.btn-create-session {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.btn-refresh-files,
.refresh-users-btn,
.browse-btn-inline,
.select-all-btn {
  height: 44px;
  padding: 0 16px;
  font-size: 0.8125rem;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

.btn-refresh-files:hover:not(:disabled),
.refresh-users-btn:hover:not(:disabled),
.browse-btn-inline:hover,
.select-all-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #1d1d1f;
  text-decoration: none;
}

.btn-refresh-files:disabled,
.refresh-users-btn:disabled,
.btn-upload-inline:disabled,
.btn-create-session:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.refresh-users-btn {
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
}

.upload-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.file-input-label-inline {
  cursor: pointer;
}

.file-input-hidden {
  display: none;
}

.upload-file-name {
  font-size: 0.875rem;
  color: #6e6e73;
  min-width: 0;
  overflow-wrap: anywhere;
}

.btn-upload-inline,
.btn-create-session {
  padding: 11px 20px;
  font-size: 0.9rem;
  background: #1d1d1f;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.btn-upload-inline:hover:not(:disabled),
.btn-create-session:hover:not(:disabled) {
  background: #2c2c2e;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-create-session {
  align-self: flex-start;
  margin-top: 4px;
}

.upload-spinner.small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.empty-hint,
.selected-count {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #6e6e73;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.user-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  scroll-behavior: smooth;
  min-width: 0;
}

.user-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  cursor: pointer;
  min-width: 0;
}

.user-checkbox span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-checkbox input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #1d1d1f;
}

@media (max-width: 768px) {
  .existing-files-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-refresh-files,
  .btn-create-session,
  .btn-upload-inline {
    width: 100%;
  }

  .section-label {
    flex-wrap: wrap;
  }

  .refresh-users-btn {
    margin-left: 0;
  }

  .quiz-source-tabs {
    width: 100% !important;
    align-self: stretch !important;
  }

  .tab-btn {
    flex: 1 1 auto;
    text-align: center;
    white-space: normal;
  }
}

/* Modern User Management Styles - Consistent with Login Design */

.user-management-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  min-height: auto;
}

.user-management-header {
  text-align: left;
  margin-bottom: 24px;
}

.user-management-header h1 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: #000000;
  font-weight: 500;
  letter-spacing: -0.25px;
}

.user-management-header p {
  font-size: 0.875rem;
  color: #666666;
  margin: 0;
}

/* Add User Section */
.add-user-section {
  margin-bottom: 24px;
}

.card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 24px;
  border: 1px solid #E5E5E5;
  box-shadow: none;
  /* Performance optimizations */
  transform: none;
  will-change: auto;
  contain: none;
}

.card h3 {
  color: #000000;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 500;
}

.form-hint {
  font-size: 0.8125rem;
  color: #666666;
  margin: 0 0 16px 0;
}

.add-user-form {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  grid-gap: 12px;
  gap: 12px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FAFAFA;
  color: #000000;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-input::placeholder, .form-select {
  color: #999999;
}

.form-input:focus, .form-select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  background: #FFFFFF;
}

.btn-primary {
  padding: 10px 20px;
  background: #000000;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-message {
  grid-column: 1 / -1;
  color: #666666;
  background: #FAFAFA;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  margin-top: 12px;
  font-size: 0.875rem;
}

/* Users List Section */
.users-list-section {
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.card-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #000000;
  font-weight: 500;
}

.btn-secondary {
  padding: 8px 16px;
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-secondary:hover:not(:disabled) {
  background: #FAFAFA;
  border-color: #CCCCCC;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E5E7EB;
  border-radius: 50%;
  border-top-color: #21334f;
  animation: spin 1s ease-in-out infinite;
  margin: 2rem auto;
}

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

/* Users Table */
.users-table {
  overflow-x: auto;
}

.table-header, .table-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.table-header {
  background: #F9FAFB;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.table-row {
  transition: all 0.2s ease;
  background: #FFFFFF;
}

.table-row:hover {
  background: #F9FAFB;
}

.table-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 500;
  font-size: 1rem;
  box-shadow: none;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  color: #000000;
  font-weight: 500;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.user-date, .user-email {
  color: #666666;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* Role Select */
.role-select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FAFAFA;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 400;
}

.role-select.user {
  border-color: #E5E5E5;
  background: #FAFAFA;
  color: #000000;
}

.role-select.admin {
  border-color: #E5E5E5;
  background: #FAFAFA;
  color: #000000;
}

.role-readonly {
  font-size: 0.875rem;
  color: #000000;
}

.you-badge {
  color: #666666;
  font-size: 0.8125rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-edit, .btn-delete, .btn-update {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  text-transform: none;
  font-size: 0.75rem;
  letter-spacing: 0;
  color: #FFFFFF;
}

.btn-update {
  background: #2563EB;
}

.btn-update:hover:not(:disabled) {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-update:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-edit {
  background: #DC2626;
}

.btn-edit:hover:not(:disabled) {
  background: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-delete {
  background: #000000;
}

.btn-delete:hover:not(:disabled) {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Stats Section */
.stats-section {
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.stat-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #000000;
}

.stat-icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  color: inherit;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info h4 {
  color: #6B7280;
  margin: 0 0 4px 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-value {
  color: #21334f;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Sign Out Section */
.signout-section {
  text-align: center;
  margin-top: 24px;
}

.btn-signout {
  padding: 12px 32px;
  background: #FFFFFF;
  color: #21334f;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-signout:hover {
  background: #F9FAFB;
  border-color: #21334f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .user-management-container {
    padding: 0;
  }
  
  .user-management-header h1 {
    font-size: 1.125rem;
  }
  
  .add-user-form {
    grid-template-columns: 1fr;
  }
  
  .table-header, .table-row {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 8px;
  }
  
  .table-cell {
    justify-content: space-between;
  }
  
  .user-info {
    width: 100%;
    justify-content: space-between;
  }
  
  .action-buttons {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation for new users */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-row.new {
  animation: fadeIn 0.5s ease-out;
}

/* Delete confirmation modal - matches quiz exit popup */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.confirm-modal {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.confirm-modal h3 {
  margin: 0 0 12px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000000;
}

.confirm-modal p {
  margin: 0 0 20px 0;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-btn.cancel-btn {
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.confirm-btn.cancel-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.confirm-btn.confirm-primary {
  background: #000000;
  color: #FFFFFF;
  border: none;
}

.confirm-btn.confirm-primary:hover {
  background: #333333;
}

.profile-container {
  padding: 0;
}

.profile-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
  max-width: 480px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar svg {
  color: #666;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #000;
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1 1;
}

.profile-icon {
  color: #666;
  flex-shrink: 0;
}

.profile-label {
  font-size: 0.875rem;
  color: #666;
  min-width: 80px;
  flex-shrink: 0;
}

.profile-signout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9375rem;
  color: #666;
  background: transparent;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-signout-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.profile-preview-note {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.reports-card {
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  padding: 24px;
}

.reports-sample-banner {
  margin: -4px 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.16);
  color: #0071e3;
  font-size: 0.82rem;
  font-weight: 600;
}

.reports-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.reports-selection-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reports-selected-count {
  font-size: 0.875rem;
  color: #666666;
}

.btn-select-all {
  padding: 6px 12px;
  background: transparent;
  color: #333333;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.btn-select-all:hover {
  background: #F5F5F5;
}

.btn-delete-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #dc2626;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-delete-selected:hover {
  background: #b91c1c;
}

.report-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.reports-search {
  flex: 1 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
}

.reports-search:focus-within {
  border-color: #000000;
  background: #FFFFFF;
}

.search-icon {
  flex-shrink: 0;
  color: #666666;
}

.search-input {
  flex: 1 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  color: #000000;
  outline: none;
}

.search-input::placeholder {
  color: #999999;
}

.reports-header {
  margin-bottom: 20px;
}

.btn-download-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #000000;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-download-all:hover {
  background: #333333;
}

.reports-loading,
.reports-empty {
  text-align: center;
  padding: 48px 24px;
}

.reports-empty-icon {
  opacity: 0.5;
  margin-bottom: 16px;
}

.reports-empty h3 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000000;
}

.reports-empty p {
  margin: 0;
  color: #666666;
  font-size: 0.875rem;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reports-by-session {
  gap: 12px;
}

.report-session {
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  overflow: hidden;
}

.report-session-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #FAFAFA;
  transition: background 0.2s;
}

.report-session-header:hover {
  background: #F0F0F0;
}

.report-session-summary {
  flex: 1 1;
  min-width: 0;
}

.report-session-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #000000;
  overflow-wrap: anywhere;
}

.report-session-meta {
  display: block;
  font-size: 0.8125rem;
  color: #666666;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.btn-download-session {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #000000;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-download-session:hover {
  background: #333333;
}

.report-session-users {
  padding: 8px;
  background: #FFFFFF;
  border-top: 1px solid #E5E5E5;
}

.report-user-item {
  border: 1px solid #E8E8E8;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.report-user-item:last-child {
  margin-bottom: 0;
}

.report-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #FFFFFF;
  transition: background 0.2s;
}

.report-user-header:hover {
  background: #FAFAFA;
}

.report-user-summary {
  flex: 1 1;
  min-width: 0;
}

.report-user-email {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: #000000;
}

.report-user-name {
  display: block;
  font-size: 0.8125rem;
  color: #444444;
  margin-top: 2px;
}

.report-user-meta {
  display: block;
  font-size: 0.75rem;
  color: #666666;
  margin-top: 2px;
}

.report-expand-small {
  width: 20px;
  flex-shrink: 0;
}

.report-expand-placeholder {
  display: inline-block;
  width: 16px;
  height: 16px;
}

.report-user-details {
  padding: 12px 14px 12px 44px;
  background: #FAFAFA;
  border-top: 1px solid #E8E8E8;
}

.report-item {
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  overflow: hidden;
}

.report-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #FAFAFA;
  transition: background 0.2s;
}

.report-item-header:hover {
  background: #F5F5F5;
}

.report-expand-icon {
  flex-shrink: 0;
  color: #666666;
}

.report-item-summary {
  flex: 1 1;
  min-width: 0;
}

.report-user {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  color: #000000;
}

.report-meta {
  display: block;
  font-size: 0.8125rem;
  color: #666666;
  margin-top: 2px;
}

.report-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-download-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #000000;
  flex-shrink: 0;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-download-report:hover {
  background: #333333;
}

.btn-delete-report {
  background: #dc2626;
}

.btn-delete-report:hover {
  background: #b91c1c;
}

a.btn-download-report {
  text-decoration: none;
  color: #FFFFFF;
}

.report-item-details {
  padding: 16px;
  background: #FFFFFF;
  border-top: 1px solid #E5E5E5;
}

.report-answers {
  overflow-x: auto;
}

.report-no-answers {
  margin: 0;
  color: #666666;
  font-size: 0.875rem;
}

.report-answers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.report-answers-table th,
.report-answers-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #E5E5E5;
}

.report-answers-table th {
  font-weight: 600;
  color: #000000;
  background: #F9FAFB;
}

.report-answers-table td {
  color: #333333;
}

.report-answers-table tr.correct td {
  background: rgba(34, 197, 94, 0.06);
}

.report-answers-table tr.incorrect td {
  background: rgba(239, 68, 68, 0.06);
}

.report-answers-table td:first-child {
  max-width: 280px;
  word-break: break-word;
}

@media (max-width: 768px) {
  .reports-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reports-selection-actions {
    flex-wrap: wrap;
  }

  .report-session-header,
  .report-user-header {
    flex-wrap: wrap;
  }

  .btn-download-session,
  .btn-download-report {
    margin-left: auto;
  }
}

.dashboard-bookings {
  margin-top: 4px;
  padding: 18px 20px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
}

.db-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.db-copy {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-column-gap: 8px;
  column-gap: 8px;
  grid-row-gap: 2px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
  flex: 1 1 220px;
}

.db-title-icon {
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  height: 18px;
  color: #0071e3;
  display: block;
}

.db-copy-text {
  display: contents;
}

.db-title {
  grid-column: 2;
  grid-row: 1;
  display: block;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 18px;
  color: #0f1c17;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.db-sub {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #64756d;
  overflow-wrap: anywhere;
}

.db-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.db-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  cursor: pointer;
}

.db-icon-btn:hover:not(:disabled) {
  background: rgba(0, 113, 227, 0.16);
}

.db-icon-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.db-icon-btn .spin {
  animation: db-spin 0.8s linear infinite;
}

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

.db-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: #0071e3;
  text-decoration: none;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  background: rgba(255, 255, 255, 0.55);
  box-sizing: border-box;
}

.db-link:hover {
  background: rgba(0, 113, 227, 0.08);
}

.db-sample {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.16);
  color: #0071e3;
  font-size: 0.78rem;
  font-weight: 600;
}

.db-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 100px;
  color: #64756d;
  font-size: 0.85rem;
}

.db-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
}

@media (max-width: 1024px) {
  .db-columns {
    grid-template-columns: 1fr;
  }
}

.db-col {
  border-radius: 12px;
  background: #f7faf8;
  border: 1px solid #e6efea;
  padding: 12px;
  min-height: 120px;
}

.db-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.db-col-head h4 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a5f56;
}

.db-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.db-empty {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #7a8c84;
  line-height: 1.4;
}

.db-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-item {
  display: grid;
  grid-template-columns: minmax(96px, 110px) 1fr;
  grid-gap: 10px;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2ebe6;
}

.db-when {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0071e3;
}

.db-when span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.db-date {
  color: #64756d !important;
  font-weight: 600 !important;
}

.db-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.db-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #0f1c17;
  min-width: 0;
}

.db-line strong,
.db-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-line svg {
  flex-shrink: 0;
  color: #64756d;
}

.db-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.72rem;
  color: #64756d;
  font-weight: 600;
}

.db-meta svg {
  color: #0071e3;
}

.db-dot {
  color: #8a9b93;
}

.db-more {
  margin: 8px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0071e3;
}

/* Compact sidebar variant for consultant TrainingDashboard */
.db-consultant.dashboard-bookings {
  margin-top: 0;
  padding: 14px;
}

.td-side .db-columns {
  grid-template-columns: 1fr;
}

.td-side .db-item {
  grid-template-columns: 1fr;
}

.td-side .db-when {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.training-dashboard {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.td-main,
.td-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.td-card {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 22px;
  backdrop-filter: saturate(200%) blur(36px);
  -webkit-backdrop-filter: saturate(200%) blur(36px);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Bookings panel has its own card chrome */
.td-bookings-card {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.td-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
}

.td-empty {
  margin: 0;
  color: #64756d;
  color: var(--ink-500, #64756d);
  font-size: 0.85rem;
}

/* ---------- Progress ---------- */
.td-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.td-progress-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
}

.td-progress-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #126047;
  color: var(--brand-solid-700, #126047);
}

.td-progress-track {
  height: 12px;
  border-radius: 999px;
  background: #e8efeb;
  overflow: hidden;
}

.td-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #126047, #22a875);
  background: linear-gradient(90deg, var(--brand-solid-700, #126047), var(--brand-400, #22a875));
  transition: width 0.5s ease;
}

/* ---------- Key stats ---------- */
.td-keystats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 14px;
  gap: 14px;
}

.td-stat {
  border: 1px solid #e6ede9;
  border: 1px solid var(--line, #e6ede9);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  background: linear-gradient(160deg, #ffffff, #eef8f3);
  background: linear-gradient(160deg, #ffffff, var(--brand-50, #eef8f3));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.td-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 40, 31, 0.1);
  box-shadow: var(--shadow-md, 0 6px 16px rgba(16, 40, 31, 0.1));
}

.td-stat-clickable {
  cursor: pointer;
  font: inherit;
  display: block;
  width: 100%;
}

.td-stat-clickable:hover {
  border-color: #47c399;
  border-color: var(--brand-300, #47c399);
}

.td-stat-badges.has-badges .td-badge-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #ffffff;
  animation: td-badge-pulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35);
}

.td-stat-badges.has-badges .td-stat-value {
  background: linear-gradient(120deg, #b45309, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.td-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d8f2e7;
  background: var(--brand-100, #d8f2e7);
  color: #126047;
  color: var(--brand-solid-700, #126047);
}

.td-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #126047;
  color: var(--brand-solid-700, #126047);
}

.td-stat-label {
  font-size: 0.78rem;
  color: #64756d;
  color: var(--ink-500, #64756d);
  margin-top: 2px;
}

/* ---------- Badges ---------- */
.td-badges-count {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #126047;
  color: var(--brand-solid-700, #126047);
  background: #eef8f3;
  background: var(--brand-50, #eef8f3);
  padding: 2px 10px;
  border-radius: 999px;
}

.td-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 12px;
  gap: 12px;
}

.td-badge {
  position: relative;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid #e6ede9;
  border: 1px solid var(--line, #e6ede9);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
  font: inherit;
  width: 100%;
  display: block;
}

.td-badge.locked:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(16, 40, 31, 0.1);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(16, 40, 31, 0.1));
  opacity: 0.9;
}

.td-badge.earned {
  background: linear-gradient(160deg, #fffdf5, #fef3c7);
  border-color: #f6d986;
}

.td-badge.earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(180, 120, 10, 0.18);
}

.td-badge.locked {
  background: #f6f8f7;
  opacity: 0.72;
}

.td-badge-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 8px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-badge.earned .td-badge-icon {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
}

.td-badge.locked .td-badge-icon {
  background: #e6ebe8;
  color: #9aa8a1;
}

.td-badge-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
}

.td-badge.locked .td-badge-name {
  color: #64756d;
  color: var(--ink-500, #64756d);
}

.td-badge-desc {
  font-size: 0.68rem;
  color: #64756d;
  color: var(--ink-500, #64756d);
  margin-top: 3px;
  line-height: 1.3;
}

.td-badge-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
  background: #fde68a;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Badge modal ---------- */
.td-badge-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 42, 31, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: td-fade-in 0.16s ease;
}

.td-badge-modal {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 26px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(7, 42, 31, 0.3);
  animation: td-pop-in 0.2s ease;
}

.td-badge-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: #f1f4f2;
  color: #64756d;
  color: var(--ink-500, #64756d);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease;
}

.td-badge-modal-close:hover {
  background: #e3e8e5;
}

.td-badge-modal-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-badge-modal.earned .td-badge-modal-icon {
  position: relative;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.4);
  animation: td-badge-icon-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.td-badge-modal.locked .td-badge-modal-icon {
  background: #e6ebe8;
  color: #9aa8a1;
}

.td-badge-burst {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.55);
  animation: td-ring-burst 0.9s ease-out both;
  pointer-events: none;
}

.td-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
  pointer-events: none;
  animation: td-spark-fly 0.85s ease-out both;
}
.td-spark.s1 { top: 8%; left: 50%; animation-delay: 0.05s; --sx: 0px; --sy: -28px; }
.td-spark.s2 { top: 50%; right: 6%; animation-delay: 0.1s; --sx: 26px; --sy: 4px; background: #0071e3; }
.td-spark.s3 { bottom: 10%; left: 50%; animation-delay: 0.14s; --sx: -6px; --sy: 26px; background: #f59e0b; }
.td-spark.s4 { top: 50%; left: 6%; animation-delay: 0.08s; --sx: -26px; --sy: -2px; background: #64b5ff; }

.td-badge-modal-name {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
}

.td-badge-modal-status {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.td-badge-modal-status.earned {
  color: #b45309;
  background: #fde68a;
}

.td-badge-modal-status.locked {
  color: #64756d;
  color: var(--ink-500, #64756d);
  background: #eef1ef;
}

.td-badge-modal-desc {
  margin: 14px 0 18px;
  font-size: 0.9rem;
  color: #33413b;
  color: var(--ink-700, #33413b);
}

.td-badge-modal-howto {
  background: #eef8f3;
  background: var(--brand-50, #eef8f3);
  border: 1px solid #d8f2e7;
  border: 1px solid var(--brand-100, #d8f2e7);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}

.td-badge-modal-howto-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #126047;
  color: var(--brand-solid-700, #126047);
  margin-bottom: 4px;
}

.td-badge-modal-howto-text {
  font-size: 0.9rem;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
  font-weight: 600;
}

/* Earned badges popup */
.td-earned-modal {
  max-width: 460px;
  text-align: left;
}

.td-earned-modal-head {
  text-align: center;
  margin-bottom: 18px;
}

.td-earned-modal-trophy {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.38);
  animation: td-trophy-float 2.8s ease-in-out infinite;
}

.td-trophy-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.45);
  animation: td-ring-pulse 2s ease-out infinite;
  pointer-events: none;
}

.td-earned-modal-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
}

.td-earned-modal-sub {
  margin: 0;
  font-size: 0.85rem;
  color: #64756d;
  color: var(--ink-500, #64756d);
}

.td-earned-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 12px;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.td-earned-item {
  cursor: pointer;
  font: inherit;
  text-align: center;
  border-radius: 14px;
  padding: 16px 12px;
  border: 1px solid #f6d986;
  background: linear-gradient(160deg, #fffdf5, #fef3c7);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  animation: td-badge-slide-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0 * 70ms);
  animation-delay: calc(var(--badge-i, 0) * 70ms);
}

.td-earned-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 22px rgba(180, 120, 10, 0.22);
}

.td-earned-item:hover .td-earned-item-icon {
  animation: td-icon-wiggle 0.55s ease;
}

.td-earned-item-icon {
  position: relative;
  overflow: hidden;
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
}

.td-badge-shine {
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    120deg,
    transparent 35%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: td-shine-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

.td-earned-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
}

.td-earned-item-desc {
  font-size: 0.7rem;
  color: #64756d;
  color: var(--ink-500, #64756d);
  margin-top: 3px;
  line-height: 1.3;
}

.td-earned-empty {
  text-align: center;
  padding: 28px 16px;
  color: #64756d;
  color: var(--ink-500, #64756d);
}

.td-earned-empty p {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

@keyframes td-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes td-pop-in {
  from { opacity: 0; transform: scale(0.94) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes td-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); transform: scale(1.06); }
}

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

@keyframes td-ring-pulse {
  0% { transform: scale(0.92); opacity: 0.75; }
  70% { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(1.2); opacity: 0; }
}

@keyframes td-badge-slide-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes td-shine-sweep {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@keyframes td-icon-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.08); }
  55% { transform: rotate(7deg) scale(1.08); }
}

@keyframes td-badge-icon-pop {
  0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  60% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes td-ring-burst {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

@keyframes td-spark-fly {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .td-stat-badges.has-badges .td-badge-stat-icon,
  .td-earned-modal-trophy,
  .td-trophy-ring,
  .td-badge-shine,
  .td-badge-burst,
  .td-spark,
  .td-earned-item,
  .td-badge-modal.earned .td-badge-modal-icon {
    animation: none !important;
  }
}

/* ---------- Module list ---------- */
.td-module-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-module-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e6ede9;
  border: 1px solid var(--line, #e6ede9);
  border-radius: 12px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.td-module-row:hover {
  border-color: #47c399;
  border-color: var(--brand-300, #47c399);
  box-shadow: 0 1px 3px rgba(16, 40, 31, 0.08);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(16, 40, 31, 0.08));
}

.td-module-continue {
  background: linear-gradient(120deg, #eef8f3, #ffffff);
  background: linear-gradient(120deg, var(--brand-50, #eef8f3), #ffffff);
  border-color: #d8f2e7;
  border-color: var(--brand-100, #d8f2e7);
}

.td-module-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef8f3;
  background: var(--brand-50, #eef8f3);
  color: #126047;
  color: var(--brand-solid-700, #126047);
}

.td-module-completed .td-module-icon {
  background: #e6f5ee;
  color: #248a3d;
}

.td-module-text {
  flex: 1 1;
  min-width: 0;
}

.td-module-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-module-caption {
  font-size: 0.72rem;
  color: #64756d;
  color: var(--ink-500, #64756d);
  margin-top: 2px;
}

.td-module-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: default;
}

.td-module-btn.continue {
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(120deg, #126047, #1a8f61);
  background: linear-gradient(120deg, var(--brand-solid-700, #126047), var(--brand-500, #1a8f61));
  box-shadow: 0 4px 10px rgba(18, 96, 71, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.td-module-btn.continue:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(18, 96, 71, 0.28);
}

.td-module-btn.done {
  background: #e6f5ee;
  color: #248a3d;
}

/* ---------- Leaderboard ---------- */
.td-leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.td-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  transition: background 0.16s ease;
}

.td-lb-row:hover {
  background: #eef8f3;
  background: var(--brand-50, #eef8f3);
}

.td-lb-row.me {
  background: #eef8f3;
  background: var(--brand-50, #eef8f3);
  box-shadow: inset 0 0 0 1px #d8f2e7;
  box-shadow: inset 0 0 0 1px var(--brand-100, #d8f2e7);
}

.td-lb-rank {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #33413b;
  color: var(--ink-700, #33413b);
  background: #eef1ef;
}

.td-lb-rank.rank-1 { background: #fef3c7; color: #b45309; }
.td-lb-rank.rank-2 { background: #e5e7eb; color: #4b5563; }
.td-lb-rank.rank-3 { background: #fde3cf; color: #c2410c; }

.td-lb-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(120deg, #126047, #22a875);
  background: linear-gradient(120deg, var(--brand-solid-700, #126047), var(--brand-400, #22a875));
}

.td-lb-name {
  flex: 1 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-lb-points {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #126047;
  color: var(--brand-solid-700, #126047);
}

/* ---------- Deadlines ---------- */
.td-deadlines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-deadline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-deadline-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff3e6;
  color: #d97706;
}

.td-deadline-info {
  min-width: 0;
}

.td-deadline-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f1c17;
  color: var(--ink-900, #0f1c17);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-deadline-meta {
  font-size: 0.72rem;
  color: #64756d;
  color: var(--ink-500, #64756d);
}

/* ---------- Loading ---------- */
.td-loading {
  text-align: center;
  padding: 60px 20px;
  color: #64756d;
  color: var(--ink-500, #64756d);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .training-dashboard {
    grid-template-columns: 1fr;
  }
  .td-keystats-grid {
    grid-template-columns: 1fr;
  }
  .td-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .td-badges-grid {
    grid-template-columns: 1fr;
  }
}

.scheduler-embed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 120px);
}

.scheduler-embed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.scheduler-embed-header h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f1c17;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
}

.scheduler-embed-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #64756d;
}

.scheduler-embed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scheduler-embed-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #1d1d1f, #0071e3);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.scheduler-embed-btn:hover {
  filter: brightness(1.05);
}

.scheduler-embed-btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.scheduler-embed-frame {
  flex: 1 1;
  width: 100%;
  min-height: calc(100vh - 200px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.scheduler-embed-fallback {
  flex: 1 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed #cfe9dc;
  border-radius: 16px;
  background: #f8fbf9;
}

.scheduler-embed-fallback-icon {
  color: #0071e3;
  opacity: 0.7;
  margin-bottom: 4px;
}

.scheduler-embed-fallback h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #0f1c17;
}

.scheduler-embed-fallback p {
  margin: 0;
  color: #64756d;
  max-width: 420px;
}

.scheduler-embed-cmd {
  display: inline-block;
  margin: 6px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1d1d1f;
  color: #d2d2d7;
  font-size: 0.8rem;
}

.scheduler-embed-url {
  font-size: 0.85rem;
}

.consultant-bookings {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
}

.cb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cb-header h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f1c17;
  overflow-wrap: anywhere;
}

.cb-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #64756d;
  overflow-wrap: anywhere;
}

.cb-sample-banner {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.16);
  color: #0071e3;
  font-size: 0.82rem;
  font-weight: 600;
}

.cb-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cb-refresh:hover:not(:disabled) {
  background: rgba(0, 113, 227, 0.16);
}

.cb-refresh:disabled {
  opacity: 0.7;
  cursor: default;
}

.cb-refresh .spin {
  animation: cb-spin 0.8s linear infinite;
}

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

.cb-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 28px 20px;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed #cfe9dc;
  background: #f8fbf9;
  color: #64756d;
}

.cb-state h3 {
  margin: 0;
  color: #0f1c17;
  font-size: 1.1rem;
}

.cb-state p {
  margin: 0;
  max-width: 420px;
  line-height: 1.45;
}

.cb-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.cb-section-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0071e3;
}

.cb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cb-card {
  border-radius: 16px;
  border: 1px solid #d8e3dd;
  background: #ffffff;
  padding: 18px 18px 14px;
  box-shadow: 0 6px 18px rgba(7, 42, 31, 0.05);
}

.cb-card.is-past {
  opacity: 0.78;
  background: #f8fbf9;
}

.cb-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1ef;
}

.cb-when {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cb-date,
.cb-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f1c17;
}

.cb-time {
  font-weight: 600;
  color: #33413b;
}

.cb-status {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  border: 1px solid rgba(0, 113, 227, 0.16);
}

.cb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px 16px;
  gap: 12px 16px;
}

.cb-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #0071e3;
}

.cb-field > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cb-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64756d;
}

.cb-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f1c17;
  word-break: break-word;
}

.cb-notes {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  color: #33413b;
  font-size: 0.85rem;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .cb-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Dashboard Layout with Sidebar */
.admin-dashboard-layout {
  min-height: 100vh;
  display: flex;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Main Content Area - only this area scrolls; navbar and sidebar stay fixed */
.admin-main-content {
  margin-left: 280px;
  margin-top: 64px;
  flex: 1 1;
  min-width: 0;
  max-width: 100%;
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 32px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.admin-dashboard-layout.sidebar-collapsed .admin-main-content {
  margin-left: 80px;
}

.admin-dashboard-layout.sidebar-collapsed .top-bar {
  left: 80px;
}

.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

.section-header {
  margin-bottom: 32px;
  min-width: 0;
}

.section-header h1 {
  color: #000000;
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}

.section-header p {
  color: #666666;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 400;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.dashboard-sample-banner {
  margin: -12px 0 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.16);
  color: #0071e3;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

/* Legacy styles for backward compatibility */
.admin-dashboard {
  min-height: 100vh;
  background: transparent;
  padding: 40px 20px;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transform: translateZ(0);
  will-change: scroll-position;
  -webkit-font-smoothing: antialiased;
}

/* Stat Cards */
.stat-card {
  text-align: center;
}

.stat-content {
  padding: 20px 0;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 8px;
}

.stat-description {
  font-size: 0.875rem;
  color: #666666;
}

/* Quick Actions */
.quick-actions {
  margin-top: 24px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-top: 20px;
}

/* Quiz Section Layout */
.quiz-section {
  grid-template-columns: 1fr 1fr;
}

.create-session-card {
  grid-column: 1 / -1;
}

.quiz-upload-card,
.quiz-history-card {
  min-height: 500px;
}

/* Unified Quiz Module */
.quiz-management-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 24px;
  gap: 24px;
  margin-bottom: 32px;
  min-width: 0;
}

.quiz-action-card {
  min-height: 320px;
  min-width: 0;
  overflow: hidden;
}

.quiz-action-card .card-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.quiz-ready-section {
  margin-bottom: 32px;
}

.quiz-ready-title {
  color: #000000;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  letter-spacing: -0.25px;
}

.quiz-ready-loading,
.quiz-ready-empty {
  text-align: center;
  padding: 48px 24px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  color: #666666;
}

.quiz-ready-loading .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E5E5E5;
  border-top-color: #0066FF;
  border-radius: 50%;
  animation: quiz-spin 0.8s linear infinite;
  margin: 0 auto 12px;
  display: block;
}

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

.quiz-ready-empty h4,
.quiz-ready-loading p {
  color: #000000;
  margin: 16px 0 8px 0;
  font-size: 1.125rem;
  font-weight: 500;
}

.quiz-ready-empty p,
.quiz-ready-loading p {
  color: #666666;
  margin: 0;
  font-size: 0.875rem;
}

.quiz-ready-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.quiz-session-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.quiz-session-card:hover {
  border-color: #CCCCCC;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.quiz-session-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  margin-bottom: 16px;
}

.quiz-session-card-title {
  color: #000000;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  letter-spacing: -0.25px;
  overflow-wrap: anywhere;
}

.quiz-session-card-meta {
  color: #666666;
  font-size: 0.8125rem;
  margin: 0 0 16px 0;
  overflow-wrap: anywhere;
  flex: 1 1;
}

.quiz-session-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-session-start-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quiz-history-section {
  margin-top: 32px;
}

.quiz-history-title {
  color: #000000;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  letter-spacing: -0.25px;
}

.quiz-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 1024px) {
  .quiz-management-row {
    grid-template-columns: 1fr;
  }

  .quiz-ready-grid {
    grid-template-columns: 1fr;
  }

  .quiz-section {
    grid-template-columns: 1fr;
  }
}

.quick-action-btn {
  padding: 24px;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.quick-action-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-icon {
  width: 24px;
  height: 24px;
  color: inherit;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.action-label {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666666;
}

.empty-state h3 {
  color: #000000;
  margin: 16px 0 8px 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.empty-state p {
  color: #666666;
  margin-bottom: 24px;
}

.primary-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.primary-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.6;
  color: inherit;
  stroke-width: 1.5;
  margin: 0 auto 16px;
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 24px;
  gap: 24px;
  margin-bottom: 24px;
  min-width: 0;
}

.dashboard-grid > * {
  min-width: 0;
}

.dash-field-in {
  animation: dashFieldIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.dash-delay-1 { animation-delay: 0.08s; }
.dash-delay-2 { animation-delay: 0.16s; }
.dash-delay-3 { animation-delay: 0.24s; }
.dash-delay-4 { animation-delay: 0.32s; }

.stat-number,
.progress-ring-value {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

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

.metrics-chip {
  animation: dashChipIn 0.4s ease backwards;
}

.metrics-chip:nth-child(1) { animation-delay: 0.42s; }
.metrics-chip:nth-child(2) { animation-delay: 0.5s; }
.metrics-chip:nth-child(3) { animation-delay: 0.58s; }
.metrics-chip:nth-child(4) { animation-delay: 0.66s; }

@keyframes dashChipIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-field-in,
  .metrics-chip,
  .pulse-row,
  .pulse-bar,
  .pulse-bar-glow {
    animation: none !important;
  }
}

/* Team Pulse board — unique ranked activity graph */
.metrics-graph-card {
  grid-column: 1 / -1;
  margin-top: 0;
  overflow: hidden;
}

.pulse-board-card {
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(34, 197, 138, 0.1) 0%, transparent 55%),
    #ffffff;
}

.metrics-graph-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.metrics-graph-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f1c17;
}

.metrics-graph-sub {
  margin: 0;
  font-size: 0.82rem;
  color: #64756d;
}

.metrics-graph-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metrics-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 245, 247, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.75rem;
  color: #424245;
}

.metrics-chip strong {
  color: #0071e3;
  font-weight: 700;
}

.metrics-chip-accent {
  background: linear-gradient(120deg, #f5f5f7, #fff6e5);
  border-color: #f3d9a4;
}

.metrics-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 8px;
  padding: 4px 8px 4px 2px;
  border: none;
  background: transparent;
  color: #0071e3;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.metrics-back-btn:hover {
  color: #003e92;
  text-decoration: underline;
}

.metrics-overview-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.metrics-overview-hit:hover,
.metrics-overview-hit:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  outline: none;
}

.metrics-graph {
  min-height: 280px;
  width: 100%;
  padding-top: 4px;
}

.metrics-drill-hint {
  display: block;
  text-align: right;
  padding: 4px 8px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0071e3;
}

.metrics-tooltip {
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d8e3dd;
  box-shadow: 0 12px 28px rgba(16, 40, 31, 0.14);
  min-width: 180px;
}

.metrics-tooltip-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f1c17;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1ef;
  word-break: break-all;
}

.metrics-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
  color: #64756d;
  margin-top: 6px;
}

.metrics-tooltip-row strong {
  color: #0071e3;
  font-weight: 700;
}

.metrics-tooltip-row strong.low {
  color: #dc2626;
}

.metrics-tooltip-row strong.ok {
  color: #248a3d;
}

.metrics-tooltip-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #d8e3dd;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0071e3;
}

.pulse-spark {
  height: 44px;
  margin: 8px 0 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f5f7 0%, #ececef 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.pulse-spark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pulse-spark-line {
  fill: none;
  stroke: #0071e3;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.pulse-spark-dot {
  fill: #0071e3;
}
.pulse-spark-dot.tone-mid { fill: #d97706; }
.pulse-spark-dot.tone-low { fill: #dc2626; }
.pulse-spark-dot.tone-neutral { fill: #94a3b8; }

.pulse-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pulse-row {
  display: grid;
  grid-template-columns: 28px 40px 1fr 52px;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  animation: pulseRowIn 0.45s ease both;
  animation-delay: 0ms;
  animation-delay: var(--pulse-delay, 0ms);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pulse-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.pulse-row.is-lead {
  background: linear-gradient(110deg, rgba(0, 113, 227, 0.06) 0%, #ffffff 55%, #fff8e8 100%);
  border-color: rgba(0, 113, 227, 0.18);
}

@keyframes pulseRowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.pulse-rank {
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
}

.pulse-row.is-lead .pulse-rank {
  color: #0071e3;
}

.pulse-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(145deg, #3a3a3c, #1d1d1f);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.pulse-row.tone-mid .pulse-avatar {
  background: linear-gradient(145deg, #fbbf24, #b45309);
}

.pulse-row.tone-low .pulse-avatar {
  background: linear-gradient(145deg, #f87171, #b91c1c);
}

.pulse-main {
  min-width: 0;
}

.pulse-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.pulse-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f1c17;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-count {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0071e3;
  white-space: nowrap;
}

.pulse-count em {
  font-style: normal;
  font-weight: 600;
  color: #64756d;
}

.pulse-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e8e8ed;
  overflow: hidden;
}

.pulse-bar {
  height: 100%;
  width: 8%;
  width: var(--bar-width, 8%);
  border-radius: 999px;
  background: linear-gradient(90deg, #1d1d1f 0%, #0071e3 100%);
  animation: pulseBarGrow 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0ms;
  animation-delay: var(--pulse-delay, 0ms);
  transform-origin: left center;
}

.pulse-row.tone-mid .pulse-bar {
  background: linear-gradient(90deg, #b45309 0%, #fbbf24 100%);
}

.pulse-row.tone-low .pulse-bar {
  background: linear-gradient(90deg, #b91c1c 0%, #f87171 100%);
}

.pulse-bar-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8%;
  width: var(--bar-width, 8%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: pulseSheen 2.4s ease-in-out infinite;
  animation-delay: 0ms;
  animation-delay: var(--pulse-delay, 0ms);
  pointer-events: none;
}

@keyframes pulseBarGrow {
  from { width: 0; }
  to { width: 8%; width: var(--bar-width, 8%); }
}

@keyframes pulseSheen {
  0% { background-position: 120% 0; opacity: 0; }
  30% { opacity: 0.7; }
  100% { background-position: -120% 0; opacity: 0; }
}

.pulse-score {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}

.pulse-ring-bg {
  fill: none;
  stroke: #e8e8ed;
  stroke-width: 4;
}

.pulse-ring-fg {
  fill: none;
  stroke: #0071e3;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.pulse-row.tone-mid .pulse-ring-fg { stroke: #d97706; }
.pulse-row.tone-low .pulse-ring-fg { stroke: #dc2626; }
.pulse-row.tone-neutral .pulse-ring-fg { stroke: #94a3b8; }

.pulse-score-val {
  position: relative;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 800;
  color: #0f1c17;
}

.metrics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef1ef;
  font-size: 0.72rem;
  color: #64756d;
}

.metrics-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.metrics-legend .lg-green {
  background: linear-gradient(180deg, #2997ff, #0071e3);
}

.metrics-legend .lg-amber {
  background: linear-gradient(180deg, #fbbf24, #d97706);
}

.metrics-legend .lg-red {
  background: linear-gradient(180deg, #f87171, #dc2626);
}

@media (max-width: 640px) {
  .pulse-row {
    grid-template-columns: 22px 34px 1fr 44px;
    gap: 8px;
    padding: 10px;
  }

  .pulse-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.85rem;
  }

  .pulse-score,
  .pulse-ring {
    width: 42px;
    height: 42px;
  }
}

.dashboard-card {
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  padding: 24px;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  transform: none;
  will-change: transform;
  contain: none;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.dashboard-card:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #CCCCCC;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.card-header h3 {
  color: #000000;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.25px;
  min-width: 0;
  flex: 1 1;
  overflow-wrap: anywhere;
}

.card-icon {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  color: inherit;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.system-info {
  grid-column: 1 / -1;
}

.user-management-card {
  grid-column: 1 / -1;
  min-height: 600px;
}

.user-management-content {
  height: 100%;
  width: 100%;
}

.system-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

.stat-item {
  background: #FFFFFF;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* Performance optimizations */
  transform: translateZ(0);
  will-change: transform;
}

.stat-item:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-label {
  display: block;
  color: #666666;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  color: #000000;
  font-size: 1.75rem;
  font-weight: 600;
}

.upload-history {
  min-height: 200px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #666666;
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
  color: inherit;
  stroke-width: 1.5;
  margin: 0 auto 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-item {
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* Performance optimizations */
  transform: translateZ(0);
  will-change: transform;
}

.history-item:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
  transform: translate3d(2px, 0, 0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-name {
  color: #000000;
  font-weight: 500;
  font-size: 0.875rem;
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-time {
  color: #666666;
  font-size: 0.75rem;
}

.history-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.view-btn,
.copy-btn,
.delete-session-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  white-space: nowrap;
}

.view-btn:hover,
.copy-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.delete-session-btn {
  background: #DC2626 !important;
  color: #FFFFFF !important;
}

.delete-session-btn:hover {
  background: #B91C1C !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.session-item .file-name {
  max-width: 240px;
}

/* Delete session confirmation modal */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.confirm-modal {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.confirm-modal h3 {
  margin: 0 0 12px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000000;
}

.confirm-modal p {
  margin: 0 0 20px 0;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-btn.cancel-btn {
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.confirm-btn.cancel-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.confirm-btn.confirm-primary {
  background: #000000;
  color: #FFFFFF;
  border: none;
}

.confirm-btn.confirm-primary:hover {
  background: #333333;
}

/* --- Calendar --- */
.calendar-wrap {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  padding: 24px;
  min-height: 400px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.calendar-toolbar-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.calendar-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-add-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
}

.calendar-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
  line-height: 1.2;
  margin-top: 2px;
}

.calendar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.calendar-section-header h1 {
  margin: 0 0 8px 0;
}

.calendar-section-header p {
  margin: 0;
}

.calendar-consultant-select-wrap {
  min-width: 280px;
  max-width: 360px;
  flex-shrink: 0;
}

.calendar-consultant-select {
  width: 100%;
}

.calendar-consultant-select .custom-select-trigger {
  min-width: 100%;
}

.calendar-view-tabs {
  display: flex;
  gap: 0;
  padding: 4px;
  background: #F3F4F6;
  border-radius: 8px;
}

.calendar-view-tab {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #6B7280;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-view-tab:hover {
  background: #E5E7EB;
  color: #374151;
}

.calendar-view-tab.active {
  background: #000000;
  color: #FFFFFF;
}

.calendar-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-nav-btn,
.calendar-today-btn {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover,
.calendar-today-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
}

.calendar-month {
  width: 100%;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 1px;
  gap: 1px;
  background: #E5E5E5;
  border: 1px solid #E5E5E5;
  border-bottom: none;
}

.calendar-weekday {
  padding: 10px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666666;
  background: #FAFAFA;
  text-align: center;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #E5E5E5;
  border: 1px solid #E5E5E5;
  min-height: 360px;
}

.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 1px;
  gap: 1px;
  background: #E5E5E5;
  height: 100px;
}

.calendar-cell {
  background: #FFFFFF;
  padding: 6px 8px;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: background 0.15s ease;
  overflow: hidden;
}

.calendar-cell:hover {
  background: #F5F5F5;
}

.calendar-cell--empty {
  background: #FAFAFA;
  cursor: default;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
}

.calendar-cell--today {
  background: #E8F4FF;
}

.calendar-cell--today:hover {
  background: #D6EEFF;
}

.calendar-cell-date {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #000000;
  margin-bottom: 4px;
}

.calendar-cell-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  flex: 1 1;
  min-height: 0;
  overflow: hidden;
}

.calendar-event {
  font-size: 0.6875rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.calendar-event--mine {
  background: rgba(0, 113, 227, 0.12);
  border: 1px solid rgba(0, 113, 227, 0.28);
  color: #003e92;
}

.calendar-event--blocked {
  background: #9CA3AF;
  color: #FFFFFF;
}

.calendar-event-details {
  font-size: 0.6875rem;
  line-height: 1.25;
  text-align: left;
  overflow: hidden;
}

.calendar-event-details--compact .calendar-event-details-header,
.calendar-event-details--compact .calendar-event-details-row {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event-details-header {
  font-weight: 600;
  margin-bottom: 1px;
}

.calendar-event-details-time {
  font-weight: 400;
  opacity: 0.95;
}

.calendar-event-details-row {
  font-size: 0.625rem;
  opacity: 0.9;
}

.calendar-event--mine .calendar-event-details {
  color: #003e92;
}

.calendar-event--mine .calendar-event-details-time,
.calendar-event--mine .calendar-event-details-row {
  color: #0071e3;
  opacity: 1;
}

.calendar-cell-more {
  font-size: 0.6875rem;
  color: #666666;
  padding-left: 4px;
}

.calendar-loading {
  grid-column: 1 / -1;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

.calendar-week-view,
.calendar-day-view,
.calendar-year-view {
  padding: 16px 0;
}

.calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 16px;
  gap: 16px;
}

.calendar-week-day-col {
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 12px;
  min-height: 200px;
}

.calendar-week-day-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E5E5;
}

.calendar-week-day-cells {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-week-event {
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 4px;
}

.calendar-week-add {
  margin-top: 8px;
  padding: 6px;
  font-size: 0.875rem;
  border: 1px dashed #CCCCCC;
  background: transparent;
  color: #666666;
  border-radius: 4px;
  cursor: pointer;
}

.calendar-week-add:hover {
  background: #FAFAFA;
  color: #000000;
}

.calendar-day-header {
  font-size: 1.125rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 16px;
}

.calendar-day-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-day-event {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-day-event-time {
  font-weight: 500;
  color: #666666;
  min-width: 60px;
}

.calendar-day-add {
  padding: 12px;
  border: 1px dashed #CCCCCC;
  background: transparent;
  color: #666666;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
}

.calendar-day-add:hover {
  background: #FAFAFA;
  color: #000000;
}

.calendar-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
}

.calendar-year-month {
  padding: 20px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-year-month:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
}

/* Book slot modal */
.book-slot-overlay {
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.book-slot-modal {
  position: relative;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 28px;
  max-width: min(560px, 100%);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin: auto;
}

.book-slot-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.book-slot-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
}

.book-slot-close-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #FFFFFF;
  color: #000000;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.book-slot-close-btn:hover {
  background: #000000;
  color: #FFFFFF;
}

.book-slot-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.book-slot-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
}

.book-slot-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-slot-field--full {
  grid-column: 1 / -1;
}

.book-slot-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #000000;
}

.book-slot-field input,
.book-slot-field select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 0.9375rem;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  background: #FFFFFF;
  color: #000000;
}

.book-slot-field select:hover {
  background: #000000;
  color: #FFFFFF;
  outline: none;
  border-color: #000000;
}

.book-slot-field select:focus {
  outline: none;
  border-color: #000000;
}

.book-slot-field input:focus {
  outline: none;
  border-color: #000000;
}

.book-slot-field-error {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #DC2626;
  margin-top: 4px;
  background: none;
  border: none;
}

.time-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
}

.time-input-hour {
  flex: 1 1;
  min-width: 64px;
}

.time-input-hour .custom-select-trigger {
  padding: 10px 16px;
  min-width: 0;
  justify-content: center;
  font-size: 0.9375rem;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  height: 100%;
  box-sizing: border-box;
}

.time-input-hour .custom-select-chevron {
  margin-left: 2px;
  width: 12px;
  height: 12px;
}

.time-input-minute {
  flex: 1 1;
  min-width: 68px;
}

.time-input-minute .custom-select-trigger {
  padding: 10px 16px;
  min-width: 0;
  justify-content: center;
  font-size: 0.9375rem;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  height: 100%;
  box-sizing: border-box;
}

.time-input-minute .custom-select-chevron {
  margin-left: 2px;
  width: 12px;
  height: 12px;
}

.time-input-sep {
  flex: 0 0 auto;
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
}

.time-input-ampm {
  flex: 1 1;
  max-width: 100px;
  display: flex;
  border: 1px solid #E5E5E5;
  border-radius: 4px;
  overflow: hidden;
  background: #FFFFFF;
  min-width: 0;
}

.time-ampm-btn {
  flex: 1 1;
  min-width: 0;
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: #FFFFFF;
  color: #6B7280;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.time-ampm-btn:hover {
  background: #F5F5F5;
  color: #000000;
}

.time-ampm-btn.active {
  background: #000000;
  color: #FFFFFF;
}

/* Custom dropdown (white options list) */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9375rem;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  background: #FFFFFF;
  color: #000000;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease;
}

.custom-select-trigger:hover {
  border-color: #CCCCCC;
}

.custom-select-value {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  flex-shrink: 0;
  margin-left: 8px;
  opacity: 0.7;
}

.custom-select-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
}

.custom-select-option {
  padding: 10px 12px;
  font-size: 0.9375rem;
  color: #000000;
  cursor: pointer;
  background: #FFFFFF;
  transition: background 0.15s ease;
}

.custom-select-option:hover {
  background: #F5F5F5;
}

.custom-select-option[aria-selected="true"] {
  background: #FAFAFA;
  font-weight: 500;
}

.book-slot-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

/* Slot details modal (view booked slot) */
.slot-details-modal {
  position: relative;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-width: 440px;
  width: 100%;
  overflow: hidden;
}

.slot-details-modal-header {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slot-details-modal-header .book-slot-title {
  flex: 1 1;
  text-align: center;
}

.slot-details-modal-header .book-slot-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
}

.slot-details-body {
  padding: 0 24px 16px;
}

.slot-details-success {
  text-align: center;
  padding: 16px 0 20px;
}

.slot-details-success-icon {
  color: #16A34A;
  margin-bottom: 8px;
}

.slot-details-success-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #166534;
}

.slot-details-list {
  display: grid;
  grid-gap: 8px 16px;
  gap: 8px 16px;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid #E5E5E5;
}

.slot-details-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-gap: 8px;
  gap: 8px;
  margin: 0;
  font-size: 0.875rem;
}

.slot-details-row dt {
  margin: 0;
  font-weight: 500;
  color: #6B7280;
}

.slot-details-row dd {
  margin: 0;
  color: #111827;
}

.slot-details-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #E5E5E5;
  background: #FAFAFA;
}

.slot-cancel-confirm-dialog {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 24px;
  max-width: 360px;
  width: 100%;
}

.slot-cancel-confirm-text {
  margin: 0 0 20px;
  font-size: 1rem;
  color: #374151;
}

.slot-cancel-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Responsive design */
@media (max-width: 1024px) {
  .admin-main-content {
    margin-left: 0 !important;
    padding: 24px 16px;
  }

  .admin-dashboard-layout.sidebar-collapsed .admin-main-content {
    margin-left: 0 !important;
  }

  .top-bar {
    left: 0 !important;
  }

  .mobile-overlay {
    display: block;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .system-stats {
    grid-template-columns: 1fr;
  }
  
  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .history-actions {
    align-self: flex-end;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .section-header h1 {
    font-size: 1.75rem;
  }

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

  .calendar-consultant-select-wrap {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .book-slot-form-grid {
    grid-template-columns: 1fr;
  }

  .time-input-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .admin-main-content {
    padding: 20px 12px;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-header h1 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 0.875rem;
  }

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

  .calendar-consultant-select-wrap {
    max-width: none;
  }

  .calendar-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-view-tabs {
    order: 1;
  }

  .book-slot-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-dashboard {
    padding: 20px 15px;
  }
  
  .dashboard-header h1 {
    font-size: 28px;
  }
  
  .dashboard-card {
    padding: 20px 15px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .dashboard-header h1 {
    font-size: 24px;
  }
  
  .stat-item {
    padding: 15px;
  }
  
  .stat-value {
    font-size: 20px;
  }
}

/* Timesheet section */
.timesheet-section {
  width: 100%;
}

.timesheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.timesheet-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timesheet-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
}

.timesheet-btn.today-btn {
  margin-right: 8px;
}

.timesheet-btn.nav-btn {
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timesheet-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timesheet-week-label {
  font-size: 0.9375rem;
  color: #666666;
  min-width: 200px;
  text-align: center;
}

.timesheet-user-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.timesheet-user-select label {
  font-size: 0.875rem;
  color: #666666;
  font-weight: 500;
}

.timesheet-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  font-size: 0.9375rem;
  min-width: 180px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.timesheet-select:hover,
.timesheet-select:focus {
  border-color: #CCCCCC;
  outline: none;
}

.timesheet-loading,
.timesheet-empty {
  padding: 48px 24px;
  text-align: center;
  color: #666666;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
}

.timesheet-loading p,
.timesheet-empty p {
  margin: 12px 0 0 0;
  font-size: 0.9375rem;
}

.timesheet-grid-wrapper {
  overflow: auto;
  max-width: 100%;
  max-height: calc(100vh - 260px);
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  background: #FFFFFF;
  transition: box-shadow 0.2s ease;
}

.timesheet-grid-wrapper:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.timesheet-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.timesheet-grid th,
.timesheet-grid td {
  border: 1px solid #E5E5E5;
  padding: 8px 10px;
  text-align: left;
  transition: background 0.2s ease;
}

.timesheet-grid thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #FAFAFA;
  box-shadow: 0 1px 0 0 #E5E5E5;
}

.timesheet-corner,
.timesheet-time-col {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #FAFAFA;
  color: #666666;
  font-weight: 500;
  white-space: nowrap;
  width: 64px;
  min-width: 64px;
  box-shadow: 1px 0 0 0 #E5E5E5;
}

.timesheet-grid tbody .timesheet-time-col {
  background: #FAFAFA;
  z-index: 0;
}

.timesheet-day-header {
  background: #FAFAFA;
  color: #000000;
  font-weight: 500;
  min-width: 90px;
  padding: 8px 10px;
}

.timesheet-day-header-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.timesheet-day-header .day-date {
  flex: 1 1;
  text-align: left;
}

.timesheet-day-header-hours {
  font-size: 0.75rem;
  font-weight: 600;
  color: #000000;
  flex-shrink: 0;
}

.timesheet-no-users-hint {
  font-size: 0.8125rem;
  color: #666666;
  margin-left: 8px;
}

.timesheet-day-header .day-name {
  display: block;
  font-size: 0.8125rem;
}

.timesheet-day-header .day-date {
  font-size: 0.75rem;
  color: #666666;
}

.timesheet-cell {
  min-width: 88px;
  min-height: 32px;
  cursor: pointer;
  background: #FFFFFF;
  vertical-align: top;
}

.timesheet-cell:hover {
  background: #F5F5F5;
}

.timesheet-cell.selected {
  background: #F0F7FF;
  outline: 1px solid #000000;
  outline-offset: -1px;
}

.timesheet-cell.filled {
  background: #E8E8E8;
  border-left: 3px solid #2e7d32;
}

.timesheet-cell.filled:hover {
  background: #E0E0E0;
}

.timesheet-cell-entry {
  font-size: 0.7rem;
  color: #333333;
  line-height: 1.35;
  padding: 2px 0;
}

.timesheet-cell-entry .cell-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.timesheet-cell-entry .cell-primary {
  flex: 1 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.timesheet-cell-entry .cell-hours {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.7rem;
  color: #000000;
}

.timesheet-cell-entry .cell-line2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.65rem;
  color: #666666;
}

.timesheet-cell-entry .cell-line2.cell-project {
  margin-bottom: 1px;
}

.timesheet-cell-entry .cell-working-for {
  color: #555555;
}

.timesheet-popup-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 24px;
  animation: timesheetFadeIn 0.2s ease;
  overflow-y: auto;
}

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

.timesheet-popup {
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: timesheetSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes timesheetSlideIn {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.timesheet-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #E5E5E5;
}

.timesheet-popup-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
}

.timesheet-popup-close {
  padding: 8px;
  border: none;
  background: transparent;
  color: #666666;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.timesheet-popup-close:hover {
  background: #FAFAFA;
  color: #000000;
}

.timesheet-popup-form {
  padding: 24px;
}

.timesheet-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 16px;
}

.timesheet-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timesheet-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333333;
}

.timesheet-required {
  color: #c62828;
}

.timesheet-field-error {
  display: block;
  font-size: 0.8125rem;
  color: #c62828;
  margin-top: 4px;
}

.timesheet-input.timesheet-input-error {
  border-color: #c62828;
}

.timesheet-input.timesheet-input-error:focus {
  border-color: #c62828;
  outline-color: rgba(198, 40, 40, 0.3);
}

.timesheet-input,
.timesheet-textarea {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #000000;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease;
}

.timesheet-input:hover,
.timesheet-input:focus,
.timesheet-textarea:hover,
.timesheet-textarea:focus {
  border-color: #CCCCCC;
  outline: none;
}

.timesheet-textarea {
  resize: vertical;
  min-height: 72px;
}

.timesheet-hours-select {
  min-width: 100px;
}

.timesheet-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E5E5E5;
}

.timesheet-btn.cancel-btn {
  color: #666666;
}

.timesheet-btn.save-btn {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.timesheet-btn.save-btn:hover:not(:disabled) {
  background: #333333;
  border-color: #333333;
}

.timesheet-btn.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* View-only time entry modal */
.timesheet-view-user {
  padding: 12px 24px;
  background: #FAFAFA;
  border-bottom: 1px solid #E5E5E5;
  font-size: 0.875rem;
}

.timesheet-view-user-label {
  font-weight: 600;
  color: #666666;
  margin-right: 8px;
}

.timesheet-view-user-value {
  color: #000000;
}

.timesheet-view-only .timesheet-popup-form {
  padding: 24px;
}

.timesheet-input-readonly {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
  background: #F5F5F5;
  color: #333333;
  font-size: 0.9375rem;
  min-height: 40px;
  cursor: default;
}

.timesheet-input-readonly.timesheet-comment-readonly {
  min-height: 72px;
  white-space: pre-wrap;
  word-break: break-word;
}

.timesheet-view-only .timesheet-popup-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E5E5E5;
}

/* Timesheet header row and top user selector */
.timesheet-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.timesheet-header-row .timesheet-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #000000;
}

.timesheet-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.timesheet-user-select-top {
  flex-shrink: 0;
}

.timesheet-subtitle {
  color: #666666;
  margin: -8px 0 16px 0;
  font-size: 0.9375rem;
}

/* Week/Month dropdown and toolbar */
.timesheet-view-mode-dropdown {
  flex-shrink: 0;
}

.timesheet-view-select-wrap {
  position: relative;
  width: auto;
  min-width: 100px;
}

.timesheet-view-select-wrap .custom-select-panel {
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
}

.timesheet-view-select-wrap .custom-select-option:hover {
  background: #000000;
  color: #FFFFFF;
}

.timesheet-view-select-wrap .custom-select-option[aria-selected="true"] {
  background: #F5F5F5;
}

.timesheet-view-select-wrap .custom-select-option[aria-selected="true"]:hover {
  background: #000000;
  color: #FFFFFF;
}

.timesheet-view-select {
  min-width: 100px;
}

.timesheet-period-label {
  min-width: 140px;
  text-align: center;
  font-weight: 500;
  color: #333333;
}

.timesheet-period-total {
  font-weight: 600;
  color: #000000;
  font-size: 0.9375rem;
}

.timesheet-period-total-toolbar {
  margin-left: auto;
}


/* Month view grid - narrower columns */
.timesheet-day-header-month {
  min-width: 56px;
  padding: 6px 4px;
}

.timesheet-day-header-month .day-name {
  font-size: 0.7rem;
}

.timesheet-day-header-month .day-date {
  font-size: 0.65rem;
}

.timesheet-day-header-month .timesheet-day-header-hours {
  font-size: 0.65rem;
}

.timesheet-cell-month {
  min-width: 56px;
}

.timesheet-cell-month .timesheet-cell-entry {
  font-size: 0.6rem;
}

/* Cell hover tooltip */
.timesheet-cell-tooltip {
  z-index: 1200;
}

.timesheet-cell-tooltip-inner {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: #333333;
  max-width: 200px;
  min-width: 140px;
}

.timesheet-cell-tooltip-row {
  margin-bottom: 4px;
  line-height: 1.4;
}

.timesheet-cell-tooltip-row:last-child {
  margin-bottom: 0;
}

.timesheet-cell-tooltip-row strong {
  color: #000000;
  margin-right: 4px;
}

/* Timesheet month view - calendar grid */
.timesheet-grid-wrapper-month {
  overflow: auto;
}

.timesheet-grid-month {
  table-layout: fixed;
  width: 100%;
}

.timesheet-month-weekdays {
  background: #FAFAFA;
}

.timesheet-month-weekday {
  padding: 10px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666666;
  text-align: center;
  border: 1px solid #E5E5E5;
  width: 14.285714%;
}

.timesheet-month-week-row td {
  border: 1px solid #E5E5E5;
  vertical-align: top;
}

.timesheet-month-cell {
  padding: 0;
  min-width: 0;
}

.timesheet-month-cell-empty {
  background: #FAFAFA;
  height: 100px;
  min-height: 100px;
}

.timesheet-month-day-cell {
  background: #FFFFFF;
  height: 100px;
  min-height: 100px;
}

.timesheet-month-cell--today {
  background: #E8F4FF;
}

.timesheet-month-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid #E5E5E5;
  background: #FAFAFA;
  font-size: 0.8125rem;
}

.timesheet-month-cell--today .timesheet-month-day-header {
  background: #D6EEFF;
}

.timesheet-month-day-date {
  font-weight: 500;
  color: #000000;
}

.timesheet-month-day-total {
  font-weight: 600;
  font-size: 0.75rem;
  color: #333333;
}

.timesheet-month-day-worklogs {
  padding: 4px 6px;
  overflow: hidden;
  max-height: 88px;
  font-size: 0.65rem;
  line-height: 1.4;
}

.timesheet-month-worklog-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 6px;
  margin-bottom: 2px;
  color: #333333;
  cursor: default;
  font-size: 0.7rem;
  line-height: 1.35;
  background: #E8E8E8;
  border-left: 3px solid #2e7d32;
  transition: background 0.2s ease;
}

.timesheet-month-worklog-line:last-child {
  margin-bottom: 0;
}

.timesheet-month-worklog-line:hover {
  background: #E0E0E0;
}

.report-view-container {
  min-height: 100vh;
  background: #F5F5F5;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.report-view-card {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E5E5E5;
  padding: 32px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.report-view-message {
  margin: 0;
  color: #666666;
  font-size: 1rem;
}

.report-view-password-card {
  max-width: 400px;
}

.report-view-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
}

.report-view-hint {
  margin: 0 0 20px 0;
  font-size: 0.875rem;
  color: #666666;
}

.report-view-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-view-password-input {
  padding: 12px 14px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 1rem;
}

.report-view-password-input:focus {
  outline: none;
  border-color: #000000;
}

.report-view-error {
  margin: 0;
  font-size: 0.875rem;
  color: #DC2626;
}

.report-view-submit {
  padding: 12px 20px;
  background: #000000;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.report-view-submit:hover {
  background: #333333;
}

.report-view-card .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E5E5E5;
  border-radius: 50%;
  border-top-color: #000000;
  animation: report-view-spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.report-view-report-title {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #000000;
}

.report-view-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 0.9375rem;
  color: #333333;
}

.report-view-score-block {
  margin-bottom: 28px;
}

.report-view-score-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 10px;
}

.report-view-progress-bar {
  height: 12px;
  background: #E5E5E5;
  border-radius: 6px;
  overflow: hidden;
}

.report-view-progress-fill {
  height: 100%;
  background: #000000;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.report-view-section-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #000000;
}

.report-view-table-wrap {
  overflow-x: auto;
}

.report-view-answers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.report-view-answers-table th,
.report-view-answers-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #E5E5E5;
}

.report-view-answers-table th {
  font-weight: 600;
  color: #000000;
  background: #F9FAFB;
}

.report-view-answers-table td {
  color: #333333;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

.report-view-answers-table tr.correct td {
  background: rgba(34, 197, 94, 0.06);
}

.report-view-answers-table tr.incorrect td {
  background: rgba(239, 68, 68, 0.06);
}

.report-view-answers-table td:first-child {
  width: 1%;
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.report-view-no-answers {
  margin: 0;
  color: #666666;
  font-size: 0.9375rem;
}

/* PlayerQuiz — layout and wrapping. Appearance is finished in theme.css. */

.player-quiz-container {
  min-height: calc(100vh - 48px);
  background: transparent;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  box-sizing: border-box;
}

.player-quiz-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 0;
  gap: 20px;
  align-items: flex-start;
  position: relative;
}

.quiz-sidebar {
  flex: 0 0 220px;
  width: 220px;
  max-width: 220px;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  position: -webkit-sticky;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  max-height: calc(100vh - 80px);
  overflow: visible;
}

/* Default: start alignment so numbers 1,2,3... show at top when scrollable. Center only when list fits (see --fits). */
.quiz-sidebar .question-indicators {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(5, 32px);
  justify-items: center;
  align-content: start;
  grid-column-gap: 6px;
  column-gap: 6px;
  grid-row-gap: 10px;
  row-gap: 10px;
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.quiz-sidebar .question-indicators.question-indicators--fits {
  align-content: center;
}

.quiz-main {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-left: 0;
}

.quiz-nav-under-choices {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E5E5E5;
}

.quiz-nav-under-choices .control-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-nav-under-choices .control-btn:hover:not(:disabled) {
  background: #333333;
}

.quiz-nav-under-choices .control-btn:disabled {
  background: #CCCCCC;
  cursor: not-allowed;
}

.quiz-nav-under-choices .control-btn.prev-btn:disabled {
  background: #E5E5E5;
  color: #999999;
}

.answer-required-msg {
  margin: 12px 0 0;
  color: #c93400;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.quiz-loading,
.quiz-error,
.quiz-fallback,
.quiz-completed {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  width: 100%;
}

.quiz-name-entry {
  min-height: calc(100vh - 48px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: transparent;
  text-align: center;
}

.name-entry-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px 28px;
  text-align: center;
}

.name-entry-hero {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 22px;
}

.name-entry-ring {
  width: 148px;
  height: 148px;
  transform: rotate(-90deg);
}

.name-entry-ring-track,
.name-entry-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.name-entry-ring-track {
  stroke: rgba(0, 0, 0, 0.08);
}

.name-entry-ring-fill {
  stroke: #0071e3;
}

.name-entry-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0071e3;
}

.name-entry-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6e73;
}

.name-entry-title {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #1d1d1f;
  line-height: 1.2;
}

.name-entry-hint {
  margin: 0 0 18px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #6e6e73;
}

.name-entry-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.name-entry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 113, 227, 0.12);
  color: #0071e3;
}

.name-entry-label {
  display: block;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6e6e73;
  margin: 0 0 8px;
}

.quiz-name-entry .name-input,
.player-quiz-container .name-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  font-size: 1rem;
  margin-bottom: 16px;
  color: #1d1d1f !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

.quiz-name-entry .name-input::placeholder,
.player-quiz-container .name-input::placeholder {
  color: #86868b;
}

.quiz-name-entry .name-input:focus,
.player-quiz-container .name-input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}

.start-quiz-btn {
  width: 100%;
  min-height: 48px;
  background: #1d1d1f;
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.start-quiz-btn:hover:not(:disabled) {
  background: #333336;
}

.start-quiz-btn:disabled {
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
  box-shadow: none;
}

.quiz-header {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E5E5E5;
  padding: 12px 16px;
  margin-bottom: 10px;
  width: 100%;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.quiz-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-exit-btn,
.quiz-pause-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-exit-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #000000;
}

.quiz-pause-btn {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.quiz-pause-btn:hover {
  background: #333333;
  border-color: #000000;
  color: #FFFFFF;
}

.player-quiz-container .quiz-header h1 {
  color: #000000;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  animation: none;
}

.progress-info {
  margin-top: 0;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 16px;
}

.progress-text {
  color: #666666;
  font-size: 0.875rem;
  font-weight: 500;
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FAFAFA;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #E5E5E5;
}

.timer-display.timer-top {
  margin-bottom: 0;
  padding: 8px 12px;
  font-size: 0.9rem;
  justify-content: center;
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

.timer-display.timer-top .timer-icon {
  color: #FFFFFF;
}

.timer-display.timer-top .timer-text {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.timer-display.timer-top.timer-warning {
  background: #F59E0B;
  border-color: #F59E0B;
}

.timer-display.timer-top.timer-critical {
  background: #DC2626;
  border-color: #DC2626;
}

.timer-display.timer-warning {
  background: #FFF7ED;
  border-color: #FED7AA;
}

.timer-display.timer-critical {
  background: #FEF2F2;
  border-color: #FECACA;
}

.timer-icon {
  flex-shrink: 0;
  color: #666666;
}

.timer-text {
  color: #000000;
  font-size: 0.875rem;
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #E5E5E5;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #000000;
  transition: width 0.2s ease;
}

.quiz-content {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 22px;
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.question-card {
  margin-bottom: 0;
  min-width: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}

/* Override index.css - slate instead of yellow for numbers */
.player-quiz-container .question-number {
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.player-quiz-container .question-text {
  color: #1d1d1f;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 20px;
  text-shadow: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  display: block;
  text-overflow: initial;
}

.answers-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-quiz-container .answer-btn {
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 400;
  height: auto;
  min-height: 0;
  max-height: none;
  white-space: normal;
  overflow: visible;
  line-height: 1.45;
  width: 100%;
  box-sizing: border-box;
}

.player-quiz-container .answer-btn:hover {
  background: #F5F5F5;
  border-color: #CCCCCC;
}

.player-quiz-container .answer-btn.selected {
  background: rgba(0, 113, 227, 0.14);
  border-color: rgba(0, 113, 227, 0.45);
  color: #1d1d1f;
}

.player-quiz-container .answer-letter {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: #E5E5E5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
}

.player-quiz-container .answer-btn .answer-text {
  color: inherit;
  text-shadow: none;
  font-weight: 400;
  min-width: 0;
  flex: 1 1 auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  height: auto;
  max-height: none;
  overflow: visible;
  text-overflow: initial;
  display: block;
}

.player-quiz-container .answer-btn.selected .answer-text {
  color: #1d1d1f;
}

.player-quiz-container .answer-btn.selected .answer-letter {
  background: #0071e3;
  color: #ffffff;
}

.quiz-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E5E5E5;
}

.control-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover:not(:disabled) {
  background: #333333;
}

.control-btn:disabled {
  background: #CCCCCC;
  cursor: not-allowed;
}

.control-btn.prev-btn:disabled {
  background: #E5E5E5;
  color: #999999;
}

.question-indicators {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1 1;
}

.indicator-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  color: #666666;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.indicator-btn:hover {
  background: #F0F0F0;
  border-color: #CCCCCC;
  color: #000000;
}

.indicator-btn.active {
  background: #1d1d1f;
  border-color: #1d1d1f;
  color: #ffffff;
}

.indicator-btn.answered {
  background: rgba(0, 113, 227, 0.16);
  border-color: rgba(0, 113, 227, 0.28);
  color: #0071e3;
}

.indicator-btn.locked,
.indicator-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.indicator-btn.locked:hover,
.indicator-btn:disabled:hover {
  background: #FAFAFA;
  border-color: #E5E5E5;
  color: #666666;
}

/* Loading */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E5E5E5;
  border-radius: 50%;
  border-top-color: #000000;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 16px auto;
}

.loading-text {
  color: #666666;
  font-size: 0.9375rem;
  margin: 0;
  font-weight: 500;
}

/* Error */
.quiz-error h2 {
  color: #000000;
  margin: 0 0 12px 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.quiz-error p {
  color: #666666;
  margin: 0 0 24px 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.retry-btn,
.fallback-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.retry-btn:hover,
.fallback-btn:hover {
  background: #333333;
}

/* Completion */
.player-quiz-container .completion-card {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E5E5E5;
  padding: 32px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.player-quiz-container .completion-card h2 {
  color: #000000;
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.score-number {
  color: #000000;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.score-total {
  color: #666666;
  font-size: 1.25rem;
  font-weight: 500;
}

.score-percentage {
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 24px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
}

.player-info {
  margin-bottom: 24px;
  padding: 16px 0;
}

.player-info p {
  color: #666666;
  margin: 4px 0;
  font-size: 0.875rem;
}

.completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.restart-btn,
.copy-report-btn,
.back-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.restart-btn:hover,
.copy-report-btn:hover {
  background: #333333;
}

.copy-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-btn {
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
}

.back-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
}

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

/* Confirm modal */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.confirm-modal {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.confirm-modal h3 {
  margin: 0 0 12px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1d1d1f;
}

.confirm-modal p {
  margin: 0 0 20px 0;
  font-size: 0.9375rem;
  color: #1d1d1f;
  line-height: 1.5;
  font-weight: 500;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-btn.cancel-btn {
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.confirm-btn.cancel-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.confirm-btn.confirm-primary {
  background: #000000;
  color: #FFFFFF;
  border: none;
}

.confirm-btn.confirm-primary:hover {
  background: #333333;
}

/* Responsive */
@media (max-width: 1024px) {
  .player-quiz-container {
    padding: 16px;
  }

  .player-quiz-layout {
    flex-direction: column;
    position: static;
  }

  .quiz-main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .quiz-sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .quiz-sidebar.collapsed {
    width: 100%;
    max-height: 52px;
    padding: 12px;
  }

  .quiz-sidebar-toggle {
    width: auto;
    min-width: 44px;
  }

  .quiz-sidebar .question-indicators {
    margin-top: 0;
    margin-left: 8px;
    flex: 1 1;
    min-width: 0;
    max-height: 140px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .quiz-sidebar .question-indicators.question-indicators--fits {
    align-content: center;
  }

  .quiz-content {
    padding: 20px;
  }

  .quiz-header h1 {
    font-size: 1.125rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .question-indicators {
    justify-content: center;
  }

  .score-number {
    font-size: 2.5rem;
  }

  .progress-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .player-quiz-container {
    padding: 12px;
  }

  .quiz-loading,
  .quiz-error,
  .quiz-fallback,
  .quiz-completed {
    padding: 32px 24px;
  }

  .quiz-sidebar .question-indicators {
    max-height: 120px;
  }

  .quiz-sidebar .question-indicators.question-indicators--fits {
    align-content: center;
  }

  .quiz-header {
    padding: 16px;
  }

  .score-number {
    font-size: 2rem;
  }

  .answer-btn {
    padding: 12px;
    font-size: 0.875rem;
  }

  .answer-letter {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 0.75rem;
  }

  .quiz-nav-under-choices .control-btn,
  .control-btn {
    padding: 10px 16px;
    font-size: 0.8125rem;
  }

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

/* Completion results */
.quiz-completed {
  min-height: calc(100vh - 48px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: transparent;
}

.result-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px 28px;
  text-align: center;
}

.result-title {
  margin: 0 0 22px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #1d1d1f;
  line-height: 1.2;
}

.result-score-hero {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 22px;
}

.result-ring {
  width: 148px;
  height: 148px;
  transform: rotate(-90deg);
}

.result-ring-track,
.result-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.result-ring-track {
  stroke: rgba(0, 0, 0, 0.08);
}

.result-ring-fill {
  stroke: #0071e3;
  transition: stroke-dashoffset 0.7s ease;
}

.result-score-hero.pass .result-ring-fill { stroke: #30d158; }
.result-score-hero.warn .result-ring-fill { stroke: #ff9f0a; }
.result-score-hero.retry .result-ring-fill { stroke: #ff3b30; }

.result-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.result-ring-label .result-percent {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #1d1d1f;
  line-height: 1;
}

.result-ring-check {
  color: #248a3d;
  margin-top: 4px;
}

.result-score-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.result-fraction {
  font-size: 0.95rem;
  font-weight: 500;
  color: #6e6e73;
}

.result-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-status-pill.pass {
  background: rgba(48, 209, 88, 0.16);
  color: #1f7a38;
}

.result-status-pill.warn {
  background: rgba(255, 159, 10, 0.16);
  color: #b25000;
}

.result-status-pill.retry {
  background: rgba(255, 59, 48, 0.12);
  color: #c93400;
}

.result-subtitle {
  margin: 0 0 26px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #6e6e73;
}

.result-actions-simple {
  display: flex;
  justify-content: center;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.result-btn.primary {
  background: #1d1d1f;
  color: #ffffff;
  border: none;
}

.result-analysis {
  margin-top: 22px;
  overflow-x: auto;
}

.result-analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.player-gate-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 20px;
}

.player-gate-content {
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  padding: 48px;
  text-align: center;
  box-shadow: none;
  width: 100%;
  max-width: 400px;
}

.player-gate-header h1 {
  color: #000000;
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.player-gate-header p {
  color: #666666;
  margin: 0 0 20px 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.player-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.player-signin-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: none;
}

.player-signin-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

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

.player-signout-btn {
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
}

.player-signout-btn:hover {
  background: #FAFAFA;
  border-color: #CCCCCC;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.player-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E5E5E5;
}

.player-email-hint {
  color: #666666;
  font-size: 0.75rem;
  margin: 0;
  font-style: italic;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E5E5E5;
  border-radius: 50%;
  border-top-color: #0066FF;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 15px auto;
}

.loading-text {
  color: #666666;
  font-size: 0.875rem;
  margin: 0;
  font-weight: 500;
}

.google-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  color: inherit;
}

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

/* Responsive design */
@media (max-width: 480px) {
  .player-gate-content {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .player-gate-header h1 {
    font-size: 20px;
  }
  
  .player-signin-btn, .player-signout-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* Modern Admin Gate Styles - Consistent with Login Design */

.admin-gate-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 20px;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* Performance optimizations */
  transform: translateZ(0);
  will-change: scroll-position;
  -webkit-font-smoothing: antialiased;
}

.admin-gate-content {
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: saturate(220%) blur(44px);
  -webkit-backdrop-filter: saturate(220%) blur(44px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 48px;
  text-align: center;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.admin-gate-header h1 {
  color: #000000;
  margin: 0 0 12px 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.admin-gate-header p {
  color: #666666;
  margin: 0 0 24px 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.user-email {
  font-family: 'Courier New', monospace;
  background: #F9FAFB;
  color: #21334f;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  font-size: 0.875rem;
  margin-top: 16px;
  display: inline-block;
}

.admin-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.admin-signin-btn {
  background: #000000;
  color: #FFFFFF;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: none;
}

.admin-signin-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

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

.admin-signout-btn {
  background: #FFFFFF;
  color: #21334f;
  border: 1px solid #D1D5DB;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-signout-btn:hover {
  background: #F9FAFB;
  border-color: #21334f;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E5E7EB;
  border-radius: 50%;
  border-top-color: #21334f;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 16px auto;
}

.loading-text {
  color: #6B7280;
  font-size: 0.875rem;
  margin: 0;
  font-weight: 500;
}

.google-icon {
  font-size: 18px;
}

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

/* Responsive design */
@media (max-width: 480px) {
  .admin-gate-content {
    padding: 32px 24px;
    margin: 20px;
  }
  
  .admin-gate-header h1 {
    font-size: 1.5rem;
  }
  
  .admin-signin-btn, .admin-signout-btn {
    padding: 12px 20px;
    font-size: 0.9375rem;
  }
}

/* Isometric Login Page Styles */

.tech-login-container {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: transparent;
}

/* One composition: full-bleed motion + centered card */
.tech-login-container.login-unified {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 70% 12%, rgba(0, 113, 227, 0.16) 0%, transparent 48%),
    radial-gradient(90% 70% at 12% 88%, rgba(175, 82, 222, 0.08) 0%, transparent 50%),
    linear-gradient(165deg, #ececef 0%, #f5f5f7 48%, #ffffff 100%);
}

.login-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  box-sizing: border-box;
}

.login-tagline,
.login-headline {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.035em;
  line-height: 1.15;
  animation: captionIn 0.55s ease both;
}

.login-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6e73;
}

.login-subhead {
  margin: 10px 0 0;
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 500;
  color: #6e6e73;
  animation: captionIn 0.55s ease both;
}

.login-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 113, 227, 0.12);
  color: #0071e3;
}

.login-form-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1d1d1f;
}

.login-form-hint {
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: #6e6e73;
  line-height: 1.45;
}

.story-progress-inline {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin-top: 28px;
  max-width: 220px;
}

/* Tech Background Elements */
.tech-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.4;
}

/* Tech Grid Pattern - Optimized */
.tech-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  /* Disable animation for better scroll performance */
  /* animation: gridMove 20s linear infinite; */
  /* Performance optimizations */
  transform: translateZ(0);
  will-change: auto;
}

/* Circuit Lines */
.tech-circuit {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.tech-circuit-1 {
  width: 200px;
  height: 2px;
  top: 20%;
  left: 10%;
  transform: rotate(25deg) translateZ(0);
  /* Disable animation for better scroll performance */
  /* animation: circuitPulse 3s ease-in-out infinite; */
  opacity: 0.2;
  will-change: auto;
}

.tech-circuit-2 {
  width: 150px;
  height: 2px;
  bottom: 25%;
  right: 15%;
  transform: rotate(-35deg) translateZ(0);
  /* animation: circuitPulse 4s ease-in-out infinite 1s; */
  opacity: 0.2;
  will-change: auto;
}

.tech-circuit-3 {
  width: 180px;
  height: 2px;
  top: 60%;
  left: 20%;
  transform: rotate(45deg) translateZ(0);
  /* animation: circuitPulse 3.5s ease-in-out infinite 0.5s; */
  opacity: 0.2;
  will-change: auto;
}

/* Tech Nodes (Connection Points) */
.tech-node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  animation: nodePulse 2s ease-in-out infinite;
}

.tech-node-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.tech-node-2 {
  top: 60%;
  left: 20%;
  animation-delay: 0.5s;
}

.tech-node-3 {
  bottom: 25%;
  right: 15%;
  animation-delay: 1s;
}

.tech-node-4 {
  top: 40%;
  right: 25%;
  animation-delay: 1.5s;
}

@keyframes nodePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
}

/* Hexagon Tech Shapes */
.tech-hexagon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
          clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
  animation: hexFloat 8s ease-in-out infinite;
}

.tech-hex-1 {
  top: 15%;
  right: 20%;
  animation-delay: 0s;
}

.tech-hex-2 {
  bottom: 20%;
  left: 15%;
  animation-delay: 2s;
}

.tech-hex-3 {
  top: 50%;
  right: 10%;
  animation-delay: 4s;
}

@keyframes hexFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.08;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.15;
  }
}

/* Data Bars (Tech Visualization) */
.tech-background::before {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 8%;
  width: 4px;
  height: 80px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-radius: 2px;
  animation: dataBar 2s ease-in-out infinite;
}

.tech-background::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 12%;
  width: 4px;
  height: 60px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
  border-radius: 2px;
  animation: dataBar 2.5s ease-in-out infinite 0.3s;
}

@keyframes dataBar {
  0%, 100% {
    height: 60px;
    opacity: 0.3;
  }
  50% {
    height: 100px;
    opacity: 0.5;
  }
}

/* Additional Tech Elements */
.tech-background {
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.aurora-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-veil {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 120deg,
    rgba(142, 197, 255, 0.7),
    rgba(215, 183, 255, 0.55),
    rgba(158, 231, 255, 0.5),
    rgba(243, 214, 196, 0.62),
    rgba(100, 181, 255, 0.55),
    rgba(142, 197, 255, 0.7)
  );
  filter: blur(72px);
  opacity: 0.9;
  animation: veilSpin 32s linear infinite;
  will-change: transform;
}

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

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.72;
  will-change: transform;
}

.aurora-orb-a {
  width: min(58vw, 620px);
  height: min(58vw, 620px);
  top: -18%;
  right: -10%;
  background: #8ec5ff;
  animation: orbDriftA 16s ease-in-out infinite alternate;
}

.aurora-orb-b {
  width: min(48vw, 520px);
  height: min(48vw, 520px);
  bottom: -12%;
  left: -14%;
  background: #d7b7ff;
  opacity: 0.65;
  animation: orbDriftB 20s ease-in-out infinite alternate;
}

.aurora-orb-c {
  width: min(38vw, 400px);
  height: min(38vw, 400px);
  top: 32%;
  left: 38%;
  background: #9ee7ff;
  opacity: 0.55;
  animation: orbDriftC 14s ease-in-out infinite alternate;
}

.aurora-orb-d {
  width: min(34vw, 360px);
  height: min(34vw, 360px);
  top: 8%;
  left: 6%;
  background: #f3d6c4;
  opacity: 0.7;
  animation: orbDriftD 18s ease-in-out infinite alternate;
}

.aurora-orb-e {
  width: min(30vw, 300px);
  height: min(30vw, 300px);
  bottom: 12%;
  right: 8%;
  background: #64b5ff;
  opacity: 0.5;
  animation: orbDriftE 12s ease-in-out infinite alternate;
}

@keyframes orbDriftA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-110px, 80px) scale(1.18); }
}
@keyframes orbDriftB {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, -70px) scale(1.14); }
}
@keyframes orbDriftC {
  from { transform: translate(0, 0) scale(0.92); }
  to { transform: translate(-70px, -90px) scale(1.2); }
}
@keyframes orbDriftD {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(80px, 60px) scale(1.16); }
}
@keyframes orbDriftE {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-50px, -80px) scale(1.22); }
}

.aurora-mesh {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 18%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 18%, transparent 78%);
  opacity: 0.55;
  animation: meshDrift 28s linear infinite;
}

@keyframes meshDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-56px, -56px, 0); }
}

.aurora-beams {
  position: absolute;
  inset: 0;
}

.aurora-beam {
  position: absolute;
  width: 42%;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  filter: blur(1px);
  opacity: 0;
  animation: beamSweep 7s ease-in-out infinite;
}

.aurora-beam.b1 {
  top: 22%;
  left: 8%;
  transform: rotate(-18deg);
  animation-delay: 0s;
}

.aurora-beam.b2 {
  top: 58%;
  left: 28%;
  transform: rotate(12deg);
  animation-delay: 2.4s;
}

.aurora-beam.b3 {
  top: 78%;
  left: 12%;
  width: 55%;
  transform: rotate(-8deg);
  animation-delay: 4.2s;
}

@keyframes beamSweep {
  0%, 100% { opacity: 0; }
  22% { opacity: 0.7; }
  60% { opacity: 0.15; }
}

.aurora-particles {
  position: absolute;
  inset: 0;
}

.aurora-particles span {
  position: absolute;
  left: 50%;
  left: var(--x, 50%);
  bottom: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.35);
  animation: particleRise 14s linear infinite;
  animation: particleRise var(--dur, 14s) linear infinite;
  animation-delay: 0s;
  animation-delay: var(--delay, 0s);
}

.aurora-particles span:nth-child(odd) {
  width: 4px;
  height: 4px;
  background: rgba(0, 113, 227, 0.45);
}

@keyframes particleRise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: 0.8; }
  80% { opacity: 0.25; }
  100% { transform: translate3d(18px, calc(-100vh - 40px), 0); opacity: 0; }
}

.orbit-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 24px rgba(0, 113, 227, 0.08);
}

.orbit-ring-1 {
  width: min(82vw, 680px);
  height: min(82vw, 680px);
  animation: orbitSpin 28s linear infinite;
}
.orbit-ring-2 {
  width: min(60vw, 480px);
  height: min(60vw, 480px);
  border-color: rgba(175, 82, 222, 0.22);
  animation: orbitSpin 20s linear infinite reverse;
}
.orbit-ring-3 {
  width: min(40vw, 300px);
  height: min(40vw, 300px);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.45);
  animation: orbitSpin 14s linear infinite;
}

@keyframes orbitSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.signal-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.signal-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64b5ff;
  box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.5);
  animation: nodePulse 3.2s ease-out infinite;
}

.signal-node.n1 { top: 18%; left: 16%; animation-delay: 0s; }
.signal-node.n2 { top: 34%; left: 78%; animation-delay: 0.6s; background: #af52de; }
.signal-node.n3 { top: 62%; left: 22%; animation-delay: 1.2s; }
.signal-node.n4 { top: 28%; left: 52%; animation-delay: 1.8s; background: #64b5ff; }
.signal-node.n5 { top: 74%; left: 70%; animation-delay: 2.4s; background: #ff9f0a; }

@keyframes nodePulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.45); transform: scale(1); }
  70% { box-shadow: 0 0 0 18px rgba(0, 113, 227, 0); transform: scale(1.2); }
  100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); transform: scale(1); }
}

.pulse-wave {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 16%;
  width: 84%;
  height: 120px;
  opacity: 0.7;
  z-index: 1;
}

.pulse-path {
  fill: none;
  stroke: #0071e3;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: drawPulse 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(0, 113, 227, 0.45));
}

@keyframes drawPulse {
  0% { stroke-dashoffset: 900; opacity: 0.35; }
  35% { opacity: 1; }
  70% { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: -900; opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-veil,
  .aurora-orb,
  .aurora-mesh,
  .aurora-beam,
  .aurora-particles span,
  .orbit-ring,
  .signal-node,
  .pulse-path {
    animation: none !important;
  }

  .aurora-veil {
    transform: rotate(28deg);
  }
}

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

.story-progress {
  display: flex;
  gap: 6px;
}

.story-progress-seg {
  flex: 1 1;
  height: 3px;
  border: none;
  padding: 0;
  border-radius: 99px;
  background: rgba(0, 113, 227, 0.15);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.story-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: #0071e3;
  border-radius: 99px;
}

.story-progress-seg.done .story-progress-fill {
  width: 100%;
}

.story-progress-seg.active .story-progress-fill {
  animation: progressFill 5.5s linear forwards;
}

@keyframes progressFill {
  from { width: 0%; }
  to { width: 100%; }
}

/* Tech Text Content */
.tech-text-content {
  position: relative;
  text-align: center;
  padding: 32px 40px;
  z-index: 10;
}

/* Backdrop for text visibility */
.tech-text-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: -1;
}

.tech-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #21334f;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.tech-subtitle {
  font-size: 1.125rem;
  margin: 0;
  color: #4B5563;
  font-weight: 500;
  position: relative;
  z-index: 1;
}


@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animated Particle Background */
.particle-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent);
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(2px);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Isometric Visual Section */
.iso-visual-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Isometric Building */
.iso-main-building {
  position: relative;
  width: 320px;
  height: 320px;
  transform-style: preserve-3d;
  transform: rotateX(60deg) rotateY(-45deg);
  animation: buildingFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

@keyframes buildingFloat {
  0%, 100% {
    transform: rotateX(60deg) rotateY(-45deg) translateY(0);
  }
  50% {
    transform: rotateX(60deg) rotateY(-45deg) translateY(-20px);
  }
}

.iso-building-front {
  position: absolute;
  width: 320px;
  height: 320px;
  background: #FFFFFF;
  transform: translateZ(160px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.iso-building-top {
  position: absolute;
  width: 320px;
  height: 320px;
  background: #FAFAFA;
  transform: rotateX(90deg) translateZ(160px);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.iso-building-side {
  position: absolute;
  width: 320px;
  height: 320px;
  background: #F3F4F6;
  transform: rotateY(90deg) translateZ(160px);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

/* Building Windows - 2x2 Grid */
.iso-window {
  position: absolute;
  width: 80px;
  height: 80px;
  background: #5E8BF2;
  border: 2px solid #4A90E2;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(94, 139, 242, 0.3);
}

.iso-window-1 {
  top: 70px;
  left: 70px;
  transform: translateZ(160px);
}

.iso-window-2 {
  top: 70px;
  left: 170px;
  transform: translateZ(160px);
}

.iso-window-3 {
  top: 170px;
  left: 70px;
  transform: translateZ(160px);
}

.iso-window-4 {
  top: 170px;
  left: 170px;
  transform: translateZ(160px);
}



/* Main Login Card — frosted mint glass over full stage */
.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: saturate(220%) blur(44px);
  -webkit-backdrop-filter: saturate(220%) blur(44px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  padding: 0;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.10),
    0 8px 24px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.login-card::after {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  top: -80px;
  left: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.16) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-hero {
  padding: 44px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.login-hero .logo-container {
  align-items: flex-start;
}

.login-hero .diologic-logo-image {
  margin: 0;
  width: 260px;
}


@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Brand Section */
.brand-section {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(18, 96, 71, 0.12);
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.diologic-logo-image {
  width: 220px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
  opacity: 1;
  filter: none;
  transition: none;
  display: block;
  margin: 0 0 8px;
  border-radius: 0;
  background: transparent;
}

.diologic-logo-image:hover {
  filter: none;
  transform: none;
}



/* Form Section */
.form-section {
  margin-bottom: 0;
  padding: 44px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
}

.form-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.78rem;
  color: #6e6e73;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
}

.input-wrapper {
  position: relative;
  margin: 0;
  width: 100%;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  color: #1d1d1f;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input::placeholder {
  color: #86868b;
  font-weight: 400;
}

.form-input:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.18);
}

.form-input:focus {
  background: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}

.input-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  background: linear-gradient(45deg, transparent, rgba(6, 182, 212, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.form-input:focus + .input-glow {
  opacity: 1;
}

/* Error Message */
.error-message {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.22);
  color: #c93400;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: errorShake 0.5s ease-in-out;
  font-weight: 500;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
  color: #ff3b30;
}

/* Form Actions */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: #999999;
  font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1 1;
  height: 1px;
  background: #E5E5E5;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  margin: 0;
}

.primary-btn {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  padding: 12px 20px;
  background: #1d1d1f;
  border: 1px solid #1d1d1f;
  border-radius: 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-btn:hover:not(.loading) {
  background: #333336;
  transform: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.primary-btn:active:not(.loading) {
  transform: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.primary-btn.loading {
  cursor: not-allowed;
  opacity: 0.8;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

.google-btn {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  color: #1d1d1f;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: none;
}

.google-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: none;
  transform: none;
}

.google-btn.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form Links */
.form-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.form-link {
  color: #000000;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-link:hover {
  color: #333333;
  text-decoration: underline;
}

.separator {
  color: #CCCCCC;
  font-size: 0.875rem;
  font-weight: 300;
}

/* Security Section */
.security-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.security-icon {
  width: 18px;
  height: 18px;
  color: #0071e3;
  stroke-width: 2;
  flex-shrink: 0;
}

.security-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.security-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: 0.1px;
}

.security-desc {
  font-size: 0.75rem;
  color: #6e6e73;
  font-weight: 400;
  line-height: 1.4;
  display: block;
}

/* Development Controls */
.dev-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
}


/* Responsive Design — unified single stage */
@media (max-width: 1024px) {
  .login-card {
    grid-template-columns: 1fr;
    max-width: min(480px, 100%);
  }

  .login-hero {
    padding: 32px 28px 24px;
    border-right: none;
    text-align: center;
    align-items: center;
  }

  .login-hero .logo-container {
    align-items: center;
  }

  .login-hero .diologic-logo-image {
    margin: 0 auto;
  }

  .login-pills {
    justify-content: center;
  }

  .story-progress-inline {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 8px;
  }

  .form-section {
    padding: 16px 28px 32px;
  }
}

@media (max-width: 768px) {
  .login-stage {
    padding: 24px 16px;
  }

  .login-card {
    padding: 0;
    max-width: 100%;
  }

  .diologic-logo-image {
    width: 180px;
    height: auto;
  }

  .login-headline {
    font-size: 1.55rem;
  }

  .pulse-wave {
    bottom: 14%;
    height: 70px;
    opacity: 0.4;
  }

  .form-input {
    padding: 12px 16px;
    font-size: 0.9375rem;
  }

  .primary-btn, .google-btn {
    padding: 12px 20px;
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .login-hero,
  .form-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .diologic-logo-image {
    width: 160px;
  }

  .login-headline {
    font-size: 1.35rem;
  }

  .orbit-ring-1,
  .orbit-ring-2 {
    opacity: 0.55;
  }

  .form-label {
    font-size: 0.8125rem;
  }
}

/* Accessibility */
.tech-login-container * {
  outline: none;
}

.form-input:focus-visible {
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.primary-btn:focus-visible, .google-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
  outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .login-card {
    background: #ffffff;
    border: 2px solid #000000;
  }
  
  .form-input {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
  }
  
  .primary-btn {
    background: #000000;
    color: #ffffff;
    border: 2px solid #0066FF;
  }
  
  .primary-btn:hover {
    background: #333333;
    border-color: #0052CC;
  }
  
  .google-btn {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
  }
}

.my-sessions-container {
  min-height: 100vh;
  padding: 40px 24px;
  background: #FFFFFF;
  max-width: 640px;
  margin: 0 auto;
}

.my-sessions-header {
  margin-bottom: 32px;
}

.my-sessions-header h1 {
  margin: 0 0 8px 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #000;
}

.my-sessions-header p {
  margin: 0 0 16px 0;
  font-size: 0.9375rem;
  color: #666;
}

.my-sessions-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 8px;
}

.user-email {
  font-size: 0.875rem;
  color: #666;
}

.btn-sign-out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: #666;
  background: transparent;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sign-out:hover {
  background: #f5f5f5;
  color: #000;
}

.my-sessions-loading {
  text-align: center;
  padding: 48px 24px;
  color: #666;
}

.my-sessions-loading .loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid #e5e5e5;
  border-top-color: #0066FF;
  border-radius: 50%;
  animation: my-sessions-spin 0.8s linear infinite;
}

.my-sessions-loading p {
  margin: 0;
  font-size: 0.9375rem;
}

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

.my-sessions-error {
  padding: 16px;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 8px;
  font-size: 0.9375rem;
}

.my-sessions-empty {
  text-align: center;
  padding: 64px 24px;
}

.my-sessions-empty .empty-icon {
  color: #ccc;
  margin-bottom: 16px;
}

.my-sessions-empty h3 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
}

.my-sessions-empty p {
  margin: 0;
  font-size: 0.9375rem;
  color: #666;
}

.my-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.session-card:hover {
  border-color: #0066FF;
  background: rgba(0, 102, 255, 0.04);
}

.session-icon {
  flex-shrink: 0;
  color: #0066FF;
}

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

.session-info h3 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #000;
}

.session-info p {
  margin: 0;
  font-size: 0.8125rem;
  color: #666;
}

.session-arrow {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: #0066FF;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 0;
  width: -webkit-max-content;
  width: max-content;
  max-width: min(500px, calc(100vw - 24px));
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

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

.toast.hide {
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
  border-left: 4px solid #0066FF;
}

.toast.error {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
  border-left: 4px solid #0066FF;
}

.toast.warning {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
  border-left: 4px solid #0066FF;
}

.toast.info {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #E5E5E5;
  border-left: 4px solid #0066FF;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1;
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  stroke-width: 2;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  word-wrap: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: #666666;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  stroke-width: 2;
  border-radius: 4px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  background-color: #FAFAFA;
  color: #000000;
}

.toast-close:active {
  background-color: #F0F0F0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .toast {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
  }
}

.toast-container {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000;
  pointer-events: none;
  padding: 20px;
}

.toast-container > * {
  pointer-events: auto;
  margin-bottom: 12px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .toast-container {
    padding: 10px;
  }
}


/*# sourceMappingURL=main.3c29c59b.css.map*/