@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   DESIGN TOKENS
   Premium light theme — clean, spacious, professional
   Inspired by Linear, Vercel dashboard, Stripe
   ============================================================ */
:root {
  /* Background layers */
  --bg-base: #f8f9fc;
  --bg-primary: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-surface-solid: #ffffff;
  --bg-surface-hover: #f3f4f6;
  --bg-surface-raised: #ffffff;
  --bg-inset: #f1f3f7;

  /* Glass effect (light variant) */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-highlight: rgba(255, 255, 255, 0.9);

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-default: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --border-focus: rgba(16, 185, 129, 0.4);

  /* Text */
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-heading: #111827;
  --text-body: #374151;

  /* Brand / Accent — emerald */
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-muted: rgba(16, 185, 129, 0.08);
  --accent-glow: rgba(16, 185, 129, 0.15);
  --accent-bright: #34d399;

  /* Secondary accent — emerald */
  --accent-blue: #10b981;
  --accent-blue-muted: rgba(16, 185, 129, 0.08);

  /* Tertiary accent — amber */
  --accent-purple: #f59e0b;
  --accent-purple-muted: rgba(245, 158, 11, 0.08);

  /* Brand gradient */
  --brand-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --brand-gradient-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);

  /* Status */
  --success: #059669;
  --success-muted: rgba(5, 150, 105, 0.08);
  --warning: #d97706;
  --warning-muted: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-muted: rgba(220, 38, 38, 0.08);

  /* Shadows — soft, layered, light-theme appropriate */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 0 3px rgba(16, 185, 129, 0.12);
  --shadow-glow-strong: 0 4px 20px rgba(16, 185, 129, 0.18);
  --shadow-glow-blue: 0 4px 20px rgba(16, 185, 129, 0.15);
  --shadow-glow-purple: 0 4px 20px rgba(245, 158, 11, 0.15);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 50px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 220ms ease;
  --transition-smooth: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 380ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Backwards-compat aliases used in inline styles */
  --surface: var(--bg-surface-solid);
  --surface-2: var(--bg-inset);
  --border: var(--border-default);
  --text: var(--text-primary);
  --red: var(--danger);
  --green: var(--success);
  --accent-primary: var(--accent);
  --accent-light: var(--accent-muted);
  --bg-surface-old: var(--bg-surface-solid);
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */
[data-theme="dark"] {
  --bg-base: #070714;
  --bg-primary: #070714;
  --bg-surface: #12141a;
  --bg-surface-solid: #12141a;
  --bg-surface-hover: #1a1d26;
  --bg-surface-raised: #161922;
  --bg-inset: #0e1016;
  --glass-bg: rgba(18, 20, 26, 0.88);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(16, 185, 129, 0.5);
  --text-primary: #f1f3f9;
  --text-secondary: #c9cdd8;
  --text-muted: #6b7280;
  --text-heading: #f1f3f9;
  --text-body: #c9cdd8;
  --accent-muted: rgba(16, 185, 129, 0.12);
  --accent-glow: rgba(16, 185, 129, 0.2);
  --accent-blue-muted: rgba(16, 185, 129, 0.12);
  --accent-purple-muted: rgba(245, 158, 11, 0.12);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
  --success-muted: rgba(5, 150, 105, 0.12);
  --warning-muted: rgba(217, 119, 6, 0.12);
  --danger-muted: rgba(220, 38, 38, 0.12);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  --shadow-glow-strong: 0 4px 20px rgba(16, 185, 129, 0.25);
  --shadow-glow-blue: 0 4px 20px rgba(16, 185, 129, 0.2);
  --shadow-glow-purple: 0 4px 20px rgba(245, 158, 11, 0.2);
  --surface: var(--bg-surface-solid);
  --surface-2: var(--bg-inset);
  --border: var(--border-default);
  --text: var(--text-primary);
}

[data-theme="dark"] body {
  background: var(--bg-base);
  color: var(--text-primary);
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-secondary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle animated gradient background */
@media (prefers-reduced-motion: no-preference) {
  [data-theme="light"] body {
    background: linear-gradient(135deg, #f8f9fc 0%, #ecfdf5 50%, #f8f9fc 100%);
    background-size: 400% 400%;
    animation: subtleGradientShift 20s ease infinite;
  }
  [data-theme="dark"] body {
    background: #070714;
  }
}

@keyframes subtleGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Neon orbs replaced — light ambient blobs */
.neon-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.neon-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.neon-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
  top: -15%;
  left: -10%;
}

.neon-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
  bottom: -15%;
  right: -10%;
}

.neon-orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
  top: 40%;
  left: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .neon-orb-1 {
    animation: floatOrbBg1 18s ease-in-out infinite;
  }
  .neon-orb-2 {
    animation: floatOrbBg2 22s ease-in-out infinite;
  }
  .neon-orb-3 {
    animation: floatOrbBg3 26s ease-in-out infinite;
  }
}

@keyframes floatOrbBg1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(80px, 60px) scale(1.1); }
  50%  { transform: translate(40px, 120px) scale(0.92); }
  75%  { transform: translate(-30px, 50px) scale(1.05); }
}

@keyframes floatOrbBg2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-70px, -40px) scale(1.08); }
  50%  { transform: translate(-30px, -100px) scale(0.9); }
  75%  { transform: translate(50px, -60px) scale(1.04); }
}

@keyframes floatOrbBg3 {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  33%  { transform: translate(-30%, -60px) scale(1.1); }
  66%  { transform: translate(-70%, 50px) scale(0.94); }
}

/* Subtle dot-grid pattern overlay */
body::before {
  content: '';
  position: fixed;
  inset: -20px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}

[data-theme="light"] body::before {
  opacity: 0.3;
  background-image: radial-gradient(rgba(16, 185, 129, 0.06) 1px, transparent 1px);
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: driftGrid 40s linear infinite;
  }
}

@keyframes driftGrid {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(32px, 32px); }
}

/* No grain texture on light theme */
body::after {
  display: none;
}

body > * {
  position: relative;
  z-index: 1;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
}


/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.18);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.32);
}


/* ============================================================
   UTILITY
   ============================================================ */
.hidden {
  display: none !important;
}


/* ============================================================
   HEADER / NAV
   ============================================================ */
header {
  padding: 0 32px;
  height: 56px;
  background: rgba(7, 7, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-subtle);
}

/* Clean header bottom line */
header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(16, 185, 129, 0.15) 50%,
    transparent 100%
  );
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: white;
  font-weight: 800;
  flex-shrink: 0;
  transition: var(--transition-smooth);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

@media (prefers-reduced-motion: no-preference) {
  .logo-icon {
    animation: logoPulse 5s ease-in-out infinite;
  }
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.15); }
  50%       { box-shadow: 0 0 24px rgba(16, 185, 129, 0.25); }
}

.logo:hover .logo-icon {
  box-shadow: var(--shadow-glow-strong);
  transform: scale(1.08) rotate(-3deg);
}

.logo h1 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Landing-page style nav links in header */
.header-right > .btn.ghost,
.header-right > a.btn.ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: color 0.2s ease;
  box-shadow: none;
}

.header-right > .btn.ghost:hover,
.header-right > a.btn.ghost:hover {
  color: var(--text-primary);
  background: none;
  border: none;
  box-shadow: none;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 4px;
}

.org-switcher {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.org-switcher:focus,
.org-switcher:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: var(--shadow-glow);
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-badge.active {
  background: rgba(5, 150, 105, 0.07);
  border-color: rgba(5, 150, 105, 0.2);
  color: var(--success);
}

@media (prefers-reduced-motion: no-preference) {
  .status-badge.active::before,
  .status-badge.listening::before,
  .status-badge.speaking::before {
    animation: statusPulse 1.5s ease-in-out infinite;
  }
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.5); }
}

.status-badge.listening {
  background: var(--accent-muted);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .status-badge.listening::before {
    animation: pulse 1.5s infinite;
  }
}

.status-badge.speaking {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-purple);
}

@media (prefers-reduced-motion: no-preference) {
  .status-badge.speaking::before {
    animation: pulse 1s infinite;
  }
}

@keyframes pulse {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.35; transform: scale(1.8); }
  100% { opacity: 1; transform: scale(1); }
}


/* ============================================================
   MAIN LAYOUT
   ============================================================ */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 64px 40px;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97) translateY(0);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35), var(--shadow-md);
  transform: translateY(-2px);
}

.btn.primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn.danger {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: var(--danger);
  box-shadow: none;
}

.btn.danger:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  box-shadow: none;
}

.btn.ghost:hover {
  color: var(--text-primary);
  background: var(--bg-inset);
  border-color: var(--border-subtle);
  box-shadow: none;
}

.btn.small {
  padding: 6px 14px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}


/* ============================================================
   VERTICAL SELECTOR
   ============================================================ */
.vertical-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.vertical-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.vertical-btn:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  transform: none;
}

.vertical-btn.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  .vertical-btn.active {
    animation: tabActivate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

@keyframes tabActivate {
  0%   { transform: scale(0.94); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}


/* ============================================================
   MODE TABS
   ============================================================ */
.mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 56px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 6px;
  overflow-x: auto;
  box-shadow: none;
}

.mode-tab {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mode-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  transform: none;
}

.mode-tab.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  .mode-tab.active {
    animation: tabActivate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

.mode-tab .tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.mode-tab .tab-icon img {
  width: 28px;
  height: 28px;
}

.mode-tab:hover .tab-icon {
  transform: scale(1.1);
}


/* ============================================================
   START SCREEN
   ============================================================ */
.start-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .start-screen {
    animation: fadeIn 0.4s ease-out;
  }
}

#modeTitle {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #f8fafc 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] #modeTitle {
  background: linear-gradient(135deg, #111827 0%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-reduced-motion: no-preference) {
  #modeTitle {
    animation: titleReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

#modeDescription {
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 56px;
  color: var(--text-muted);
  line-height: 1.75;
}

@media (prefers-reduced-motion: no-preference) {
  #modeDescription {
    animation: titleReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
  }
}


/* ============================================================
   SCENARIO CARDS
   ============================================================ */
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 56px;
}

.scenario-card {
  padding: 28px 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .scenario-card {
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  /* Staggered entrance for cards */
  .scenario-card:nth-child(1) { animation-delay: 0.05s; }
  .scenario-card:nth-child(2) { animation-delay: 0.10s; }
  .scenario-card:nth-child(3) { animation-delay: 0.15s; }
  .scenario-card:nth-child(4) { animation-delay: 0.20s; }
  .scenario-card:nth-child(5) { animation-delay: 0.25s; }
  .scenario-card:nth-child(6) { animation-delay: 0.30s; }
}

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

/* Shimmer on hover */
.scenario-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.scenario-card:hover::before {
  opacity: 1;
}

.scenario-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.scenario-card.selected {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2), 0 0 30px rgba(16, 185, 129, 0.08);
  background: rgba(16, 185, 129, 0.06);
}

.scenario-card.selected::before {
  opacity: 1;
}

.scenario-card strong {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: block;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.scenario-card span {
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
  color: var(--text-muted);
}

.scenario-card .difficulty {
  align-self: flex-start;
  margin-top: 20px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.difficulty.easy {
  background: var(--success-muted);
  color: var(--success);
}

.difficulty.medium {
  background: var(--warning-muted);
  color: var(--warning);
}

.difficulty.hard {
  background: var(--danger-muted);
  color: var(--danger);
}

.delete-persona, .copy-persona {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--text-muted);
}
.delete-persona { right: 8px; }
.delete-persona:hover { background: var(--danger-muted); color: var(--danger); }
.copy-persona { right: 40px; }
.copy-persona:hover { background: var(--accent-muted); color: var(--accent); }
.scenario-card:hover .delete-persona,
.scenario-card:hover .copy-persona { opacity: 1; }


/* ============================================================
   ADD PERSONA CARD
   ============================================================ */
.add-persona-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-default);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  min-height: 180px;
}

.add-persona-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.add-persona-card .plus {
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
}


/* ============================================================
   INTERVIEW FORM
   ============================================================ */
.interview-form {
  width: 100%;
  max-width: 600px;
  text-align: left;
  margin-bottom: 40px;
}

.interview-form h3 {
  font-size: 20px;
  margin-bottom: 28px;
}


/* ============================================================
   CALL SCREEN
   ============================================================ */
.call-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .call-screen {
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.orb-container {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 56px 0 32px;
}

.orb {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  z-index: 2;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
  z-index: 1;
}

.orb-container.connecting .orb {
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 0 30px rgba(217, 119, 6, 0.08);
}

@media (prefers-reduced-motion: no-preference) {
  .orb-container.connecting .orb {
    animation: pulseOrb 2s infinite ease-in-out;
  }
}

.orb-container.listening .orb {
  border-color: transparent;
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3), 0 0 60px rgba(16, 185, 129, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
  .orb-container.listening .orb {
    animation: floatOrb 4s ease-in-out infinite, pulseOrb 2.5s infinite ease-in-out;
  }
}

.orb-container.listening .orb-ring {
  border-color: var(--accent);
  opacity: 0.25;
}

@media (prefers-reduced-motion: no-preference) {
  .orb-container.listening .orb-ring {
    animation: rippleRing 2.5s infinite cubic-bezier(0.0, 0.0, 0.2, 1);
  }
}

.orb-container.speaking .orb {
  border-color: transparent;
  background: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
  color: white;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.25), 0 0 60px rgba(245, 158, 11, 0.1);
}

@media (prefers-reduced-motion: no-preference) {
  .orb-container.speaking .orb {
    animation: speakingPulse 0.6s infinite alternate;
  }
}

.orb-container.speaking .orb-ring {
  border-color: var(--accent);
  opacity: 0.25;
}

@media (prefers-reduced-motion: no-preference) {
  .orb-container.speaking .orb-ring {
    animation: rippleRing 1.2s infinite cubic-bezier(0.0, 0.0, 0.2, 1);
  }
}

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

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

@keyframes speakingPulse {
  0%   { transform: scale(1);    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.2); }
  100% { transform: scale(1.07); box-shadow: 0 10px 36px rgba(16, 185, 129, 0.32); }
}

@keyframes rippleRing {
  0%   { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.orb-label {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.timer {
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-bottom: 40px;
  background: var(--bg-surface);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}

.call-actions {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  justify-content: center;
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--bg-base);
}


/* ============================================================
   TRANSCRIPT
   ============================================================ */
#transcript {
  flex: 1;
  width: 100%;
  max-width: 720px;
  min-height: 120px;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.msg {
  display: flex;
  gap: 12px;
  max-width: 80%;
}

@media (prefers-reduced-motion: no-preference) {
  .msg {
    animation: slideUp 0.3s ease-out;
  }
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  font-weight: 700;
}

.msg.agent .msg-avatar {
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.msg.user .msg-avatar {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.msg-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.7;
}

.msg.agent .msg-bubble {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: 4px;
  color: var(--text-primary);
}

.msg.user .msg-bubble {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-top-right-radius: 4px;
  color: #ffffff;
}

.msg-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.msg.user .msg-label {
  color: rgba(255, 255, 255, 0.65);
}

.msg.agent .msg-label {
  color: var(--text-muted);
}


/* ============================================================
   MODALS & EDITORS (overlays)
   ============================================================ */
.modal-overlay,
.editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  .modal-overlay,
  .editor-overlay {
    animation: fadeIn 0.2s ease;
  }
}

.modal,
.editor {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .modal,
  .editor {
    animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Accent top edge on modals */
.modal::before,
.editor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--brand-gradient);
  border-radius: 0 0 2px 2px;
  opacity: 0.6;
}

@keyframes modalEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h3,
.editor h3 {
  font-size: 22px;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
  line-height: 1;
}

.modal-close:hover {
  background: var(--danger-muted);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.2);
}


/* ============================================================
   FORMS & INPUTS
   ============================================================ */
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="color"],
select,
textarea {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  transition: var(--transition-fast);
  line-height: 1.5;
}

input[type="color"] {
  padding: 4px 8px;
  height: 44px;
  cursor: pointer;
  border-radius: var(--radius-md);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-hover);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

input[type="file"] {
  font-family: inherit;
  font-size: 13px;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.editor-row {
  margin-bottom: 20px;
}

.editor-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.editor-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.editor-section {
  margin-top: 16px;
}

.editor-section h4 {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  font-weight: 700;
}

.settings-form {
  max-width: 480px;
}

.error-msg {
  color: var(--danger);
  font-size: 14px;
  margin-top: 12px;
  padding: 12px 18px;
  background: var(--danger-muted);
  border-radius: var(--radius-md);
  border: 1px solid rgba(220, 38, 38, 0.15);
}


/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 32px;
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

/* Ambient light blobs behind login */
.login-screen::before,
.login-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  z-index: 0;
  pointer-events: none;
}

.login-screen::before {
  width: 700px;
  height: 700px;
  background: rgba(16, 185, 129, 0.07);
  top: -250px;
  left: -200px;
}

.login-screen::after {
  width: 600px;
  height: 600px;
  background: rgba(245, 158, 11, 0.06);
  bottom: -200px;
  right: -200px;
}

@media (prefers-reduced-motion: no-preference) {
  .login-screen::before {
    animation: floatBlob 16s infinite alternate ease-in-out;
  }
  .login-screen::after {
    animation: floatBlob 16s infinite alternate-reverse ease-in-out;
  }
}

@keyframes floatBlob {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -30px) scale(1.08); }
}

.login-screen > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .login-screen > * {
    animation: loginEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  .login-screen > *:nth-child(1) { animation-delay: 0.1s; }
  .login-screen > *:nth-child(2) { animation-delay: 0.18s; }
  .login-screen > *:nth-child(3) { animation-delay: 0.26s; }
  .login-screen > *:nth-child(4) { animation-delay: 0.34s; }
  .login-screen > *:nth-child(5) { animation-delay: 0.42s; }
}

@keyframes loginEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.login-screen .logo-icon {
  width: 80px;
  height: 80px;
  font-size: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.28), 0 0 0 1px rgba(16, 185, 129, 0.1);
  margin-bottom: 8px;
  background: var(--brand-gradient);
  color: white;
}

@media (prefers-reduced-motion: no-preference) {
  .login-screen .logo-icon {
    animation: loginEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards,
               logoFloat 6s ease-in-out infinite 1s;
  }
}

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

.login-screen h2 {
  font-size: 48px;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(135deg, #111827 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-screen p {
  font-size: 17px;
  max-width: 460px;
  line-height: 1.75;
  color: var(--text-muted);
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  margin-top: 8px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 15px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.login-btn:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--accent-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

/* Magic link login */
.login-divider {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 380px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

.magic-link-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}

.magic-link-input {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.magic-link-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.magic-link-btn {
  color: var(--accent);
}

.magic-link-status {
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Invite link box */
.invite-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.invite-link-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.invite-link-url {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
  background: var(--bg-surface);
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-subtle);
}

/* Pending invites */
.pending-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.pending-invite:last-child {
  border-bottom: none;
}

.pending-invite-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pending-invite-info strong {
  font-size: 14px;
}

.pending-invite-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.pending-invite-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}


/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  .dashboard-screen {
    animation: fadeIn 0.3s ease-out;
  }
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.dashboard-header h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.dash-stat {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Subtle top accent line on stat cards */
.dash-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dash-stat:hover {
  border-color: rgba(16, 185, 129, 0.18);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dash-stat:hover::before {
  opacity: 0.7;
}

.dash-stat-value {
  font-size: 40px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.dash-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dash-sessions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.dash-session:hover {
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.dash-session-left strong {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: block;
  font-weight: 600;
}


/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 5px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.admin-tab {
  flex: 1;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.admin-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-inset);
}

.admin-tab.active {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.admin-panel {
}

@media (prefers-reduced-motion: no-preference) {
  .admin-panel {
    animation: fadeIn 0.2s ease-out;
  }
}

.admin-invite-form {
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.admin-invite-form h3 {
  font-size: 16px;
  margin-bottom: 20px;
}

.admin-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  margin-bottom: 10px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.admin-member:hover {
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: var(--shadow-md);
}


/* ============================================================
   KNOWLEDGE BANK
   ============================================================ */
.kb-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.kb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  transition: var(--transition-smooth);
  gap: 12px;
}

.kb-item:hover {
  border-color: rgba(16, 185, 129, 0.18);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.kb-add-section {
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.kb-add-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 20px;
}

.kb-add-tab {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.kb-add-tab:hover {
  color: var(--text-secondary);
}

.kb-add-tab.active {
  background: var(--bg-surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   SCORECARD — premium results display
   ============================================================ */
.scorecard {
  width: 100%;
  max-width: 720px;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  margin-top: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: no-preference) {
  .scorecard {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Gradient top accent on scorecard */
.scorecard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
}

.scorecard-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.scorecard-overall {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-weight: 900;
  border: 4px solid;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.scorecard-overall.score-good {
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.08);
}

.scorecard-overall.score-ok {
  border-color: var(--warning);
  color: var(--warning);
  box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.08);
}

.scorecard-overall.score-low {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.08);
}

.scorecard-number {
  font-size: 34px;
}

.scorecard-max {
  font-size: 16px;
  opacity: 0.35;
  margin-left: 2px;
}

.scorecard-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-primary);
}

.scorecard-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-label {
  width: 160px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.score-bar-bg {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-inset);
  overflow: hidden;
}

.score-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-bar.score-good {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.score-bar.score-ok {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.score-bar.score-low {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

.score-value {
  width: 36px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.scorecard-feedback {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 28px;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
}

.scorecard-list {
  margin-bottom: 28px;
}

.scorecard-list strong {
  font-size: 16px;
  display: block;
  margin-bottom: 12px;
}

.scorecard-list.good strong   { color: var(--success); }
.scorecard-list.improve strong { color: var(--warning); }

.scorecard-list ul {
  padding-left: 20px;
}

.scorecard-list li {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.scorecard-loading {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

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


/* ============================================================
   UPLOAD AREA
   ============================================================ */
.upload-area {
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-default);
  background: var(--bg-inset);
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: var(--shadow-md);
}

.upload-area.has-file {
  border-color: var(--success);
  border-style: solid;
  background: var(--success-muted);
}

.upload-area .upload-icon {
  font-size: 32px;
  margin-bottom: 14px;
  opacity: 0.6;
}

.upload-area .upload-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.upload-area .upload-filename {
  font-size: 14px;
  color: var(--success);
  font-weight: 700;
}

.upload-area input[type="file"] {
  display: none;
}


/* ============================================================
   ANIMATIONS (global keyframes referenced above)
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  header {
    padding: 0 16px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .header-right {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
  }

  .user-menu {
    gap: 4px;
  }

  main {
    padding: 32px 20px;
  }

  .orb-container {
    width: 170px;
    height: 170px;
    margin: 40px 0 24px;
  }

  .orb {
    width: 105px;
    height: 105px;
    font-size: 40px;
  }

  #modeTitle {
    font-size: 28px;
  }

  .login-screen h2 {
    font-size: 32px;
  }

  .scenario-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .scorecard-header {
    flex-direction: column;
    text-align: center;
  }

  .score-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .score-label {
    width: auto;
  }

  .mode-tabs {
    margin-bottom: 36px;
  }

  .modal,
  .editor {
    padding: 28px 20px;
  }

  .scorecard {
    padding: 28px 20px;
  }
}

/* ============================================================
   PRICING PAGE
   Premium pricing UI within the admin billing tab
   ============================================================ */

.pricing-page {
  max-width: 900px;
  margin: 0 auto;
}

/* Current plan banner */
.pricing-current-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.pricing-current-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pricing-current-badge {
  background: var(--brand-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--radius-full);
}
.pricing-current-period {
  font-size: 13px;
  color: var(--text-muted);
}

/* Usage bars */
.pricing-usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.pricing-usage-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.pricing-usage-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pricing-usage-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pricing-usage-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.pricing-usage-bar {
  height: 6px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
}
.pricing-usage-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.pricing-usage-fill.pricing-usage-warn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* Hero */
.pricing-hero {
  text-align: center;
  margin-bottom: 32px;
}
.pricing-hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.pricing-hero-accent {
  color: var(--accent);
}
.pricing-hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Plans grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}
.pricing-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Plan card */
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Featured card */
.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(160deg, rgba(16,185,129,0.03) 0%, var(--bg-surface) 100%);
}
.pricing-card-featured:hover {
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-glow-strong);
}

/* Enterprise card */
.pricing-card-enterprise {
  background: linear-gradient(160deg, rgba(5,150,105,0.03) 0%, var(--bg-surface) 100%);
  border-color: rgba(5,150,105,0.25);
}
.pricing-card-enterprise:hover {
  border-color: rgba(5,150,105,0.45);
  box-shadow: 0 10px 30px rgba(5,150,105,0.08);
}

/* Current plan indicator */
.pricing-card-current {
  border-color: var(--accent);
}

/* Top badge */
.pricing-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 0 0 10px 10px;
}

.pricing-plan-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 8px;
}
.pricing-card-featured .pricing-plan-name {
  color: var(--accent);
}
.pricing-card-enterprise .pricing-plan-name {
  color: var(--success);
}

/* Minutes big number */
.pricing-mins-big {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-heading);
  letter-spacing: -2px;
}
.pricing-mins-unit {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 16px;
}

.pricing-price-area {
  margin-bottom: 20px;
}
.pricing-price {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-heading);
  letter-spacing: -1.5px;
}
.pricing-card-featured .pricing-price {
  color: var(--accent);
}
.pricing-price-enterprise {
  font-size: 22px !important;
  color: var(--success) !important;
}
.pricing-period {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.pricing-ppm {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 4px;
}

/* Overage notice */
.pricing-overage-notice {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.pricing-overage-notice strong {
  color: var(--text-primary);
}

.pricing-divider {
  height: 1px;
  background: var(--border-default);
  margin-bottom: 18px;
}

/* Features list */
.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 20px;
  padding: 0;
}
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
  line-height: 1.5;
}
.pricing-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success-muted);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 1px;
}
.pricing-card-featured .pricing-check {
  background: var(--accent-muted);
  color: var(--accent);
}
.pricing-check-muted {
  background: var(--bg-inset);
  color: var(--text-muted);
}
.pricing-feature-missing {
  opacity: 0.4;
}

/* CTA buttons */
.pricing-cta {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  box-sizing: border-box;
}
.pricing-cta-default {
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}
.pricing-cta-default:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
}
.pricing-cta-upgrade {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.pricing-cta-upgrade:hover {
  background: var(--brand-gradient-hover);
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(-1px);
}
.pricing-cta-current {
  background: var(--accent-muted);
  color: var(--accent);
  cursor: default;
  font-weight: 600;
}
.pricing-cta-enterprise {
  background: var(--success-muted);
  border: 1px solid rgba(5,150,105,0.25);
  color: var(--success);
}
.pricing-cta-enterprise:hover {
  background: rgba(5,150,105,0.12);
}

/* Add-ons section */
.pricing-addons-section {
  margin-top: 8px;
}
.pricing-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
}
.pricing-addons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pricing-addon {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.2s;
}
.pricing-addon:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pricing-addon-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}
.pricing-addon-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pricing-addon-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.pricing-addon-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.pricing-addon-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Responsive */
@media (max-width: 960px) {
  .pricing-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .pricing-grid,
  .pricing-grid-4 {
    grid-template-columns: 1fr;
  }
  .pricing-addons-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pricing-usage-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .pricing-addons-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   Reseller Tab
   ===================================================== */

.reseller-section {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--surface, #1a1a2e);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 12px;
}

.reseller-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.reseller-connect-status {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}

.reseller-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.reseller-status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border, #2a2a4a);
  background: var(--surface, #1a1a2e);
  color: var(--text, #e2e8f0);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-sm:hover {
  background: var(--hover, #2a2a4a);
}

.btn-sm.danger {
  color: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
}

.btn-sm.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.lang-switcher:hover {
  border-color: var(--border-hover);
}

.lang-switcher:focus {
  border-color: var(--border-focus);
}

.login-lang-wrapper {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-default);
  padding: 24px 0;
  margin-top: 48px;
  text-align: center;
}

.footer-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

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

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface-solid);
  border-top: 1px solid var(--border-default);
  padding: 16px 24px;
  z-index: 9999;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner-content p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 200px;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.cookie-link:hover {
  text-decoration: underline;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  padding: 6px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-muted);
}

/* ============================================================
   ONBOARDING WIZARD
   ============================================================ */
.onboarding-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.onboarding-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-default);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.onboarding-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}
.onboarding-dot.done {
  background: var(--success);
}
.onboarding-step {
  animation: fadeSlideUp 0.3s ease;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.onboarding-verticals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  text-align: center;
}
.onboarding-vertical-btn {
  padding: 16px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.onboarding-vertical-btn:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}
.onboarding-vertical-btn.selected {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: var(--shadow-glow);
}
.onboarding-tour {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.onboarding-tour-step {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  padding: 20px 12px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
  position: relative;
}
.onboarding-tour-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.onboarding-tour-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.onboarding-tour-step p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* ============================================================
   DASHBOARD CHARTS
   ============================================================ */
.dash-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}
.chart-container h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
}
.chart-container canvas {
  max-height: 220px;
}
.chart-container.full-width {
  grid-column: 1 / -1;
}
.chart-no-data {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1 / -1;
}
@media (max-width: 760px) {
  .dash-charts {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SESSION REPLAY
   ============================================================ */
.replay-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-inset);
  border-radius: var(--radius-md);
  margin: 12px 0;
}
.replay-controls button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.replay-controls button:hover {
  background: var(--accent-hover);
}
.replay-speed {
  display: flex;
  gap: 4px;
}
.replay-speed button {
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border-default);
}
.replay-speed button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.replay-progress {
  flex: 1;
  height: 4px;
  background: var(--border-default);
  border-radius: 2px;
  overflow: hidden;
}
.replay-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s linear;
  width: 0%;
}
.replay-message {
  animation: replayFadeIn 0.4s ease;
}
@keyframes replayFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PDF DOWNLOAD BUTTON (in session modal)
   ============================================================ */
.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
