/* ==========================================================================
   BEASTMODE DESIGN SYSTEM & STYLESHEET (100% FREE STUDENT EDITION + FIREBASE CLOUD)
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s var(--ease-out);

  --color-high: #ef4444;
  --color-high-bg: rgba(239, 68, 68, 0.12);
  --color-high-border: rgba(239, 68, 68, 0.25);
  
  --color-med: #f59e0b;
  --color-med-bg: rgba(245, 158, 11, 0.12);
  --color-med-border: rgba(245, 158, 11, 0.25);
  
  --color-low: #10b981;
  --color-low-bg: rgba(16, 185, 129, 0.12);
  --color-low-border: rgba(16, 185, 129, 0.25);

  --brand-primary: #6366f1;
  --brand-primary-hover: #4f46e5;
  --brand-primary-light: rgba(99, 102, 241, 0.15);
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --brand-glow: rgba(99, 102, 241, 0.35);
}

/* ==================== THEME 1: CYBER NEON (DEFAULT BEAST) ==================== */
[data-theme="dark"],
[data-theme="cyber"] {
  --bg-app: #08090f;
  --bg-sidebar: rgba(13, 17, 28, 0.78);
  --bg-card: rgba(17, 23, 38, 0.68);
  --bg-card-hover: rgba(25, 33, 54, 0.82);
  --bg-subtle: rgba(29, 39, 65, 0.5);
  --bg-input: rgba(12, 16, 27, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(139, 92, 246, 0.18);
  --border-focus: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --brand-primary: #8b5cf6;
  --brand-primary-hover: #7c3aed;
  --brand-primary-light: rgba(139, 92, 246, 0.16);
  --brand-accent: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --brand-glow: rgba(139, 92, 246, 0.4);

  --glow-top: rgba(99, 102, 241, 0.18);
  --glow-bottom: rgba(6, 182, 212, 0.12);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.68);
  --card-glass-glow: 0 0 24px rgba(139, 92, 246, 0.07);

  --modal-backdrop: rgba(4, 6, 12, 0.82);
}

/* ==================== THEME 2: AURORA MATRIX (CALM FOCUS) ==================== */
[data-theme="emerald"] {
  --bg-app: #040d0c;
  --bg-sidebar: rgba(8, 22, 20, 0.78);
  --bg-card: rgba(10, 30, 27, 0.68);
  --bg-card-hover: rgba(16, 43, 39, 0.82);
  --bg-subtle: rgba(18, 56, 50, 0.5);
  --bg-input: rgba(6, 19, 17, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(16, 185, 129, 0.2);
  --border-focus: #10b981;

  --text-main: #f0fdf4;
  --text-muted: #99f6e4;
  --text-subtle: #4ade80;

  --brand-primary: #10b981;
  --brand-primary-hover: #059669;
  --brand-primary-light: rgba(16, 185, 129, 0.16);
  --brand-accent: #14b8a6;
  --brand-gradient: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #06b6d4 100%);
  --brand-glow: rgba(16, 185, 129, 0.4);

  --glow-top: rgba(16, 185, 129, 0.18);
  --glow-bottom: rgba(20, 184, 166, 0.12);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.68);
  --card-glass-glow: 0 0 24px rgba(16, 185, 129, 0.07);

  --modal-backdrop: rgba(2, 8, 7, 0.82);
}

/* ==================== THEME 3: CRIMSON FIRE (GRIND BEAST) ==================== */
[data-theme="crimson"] {
  --bg-app: #0e0707;
  --bg-sidebar: rgba(23, 11, 11, 0.78);
  --bg-card: rgba(30, 15, 15, 0.68);
  --bg-card-hover: rgba(43, 21, 21, 0.82);
  --bg-subtle: rgba(58, 25, 25, 0.5);
  --bg-input: rgba(19, 9, 9, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(249, 115, 22, 0.22);
  --border-focus: #f97316;

  --text-main: #fff1f2;
  --text-muted: #fed7aa;
  --text-subtle: #fb7185;

  --brand-primary: #f97316;
  --brand-primary-hover: #ea580c;
  --brand-primary-light: rgba(249, 115, 22, 0.16);
  --brand-accent: #ef4444;
  --brand-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #f59e0b 100%);
  --brand-glow: rgba(249, 115, 22, 0.4);

  --glow-top: rgba(239, 68, 68, 0.18);
  --glow-bottom: rgba(245, 158, 11, 0.12);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.68);
  --card-glass-glow: 0 0 24px rgba(249, 115, 22, 0.07);

  --modal-backdrop: rgba(8, 2, 2, 0.82);
}

/* ==================== THEME 4: ROYAL VELVET (AMETHYST LUXURY) ==================== */
[data-theme="velvet"] {
  --bg-app: #0b0614;
  --bg-sidebar: rgba(19, 11, 35, 0.78);
  --bg-card: rgba(27, 15, 48, 0.68);
  --bg-card-hover: rgba(38, 21, 67, 0.82);
  --bg-subtle: rgba(52, 27, 88, 0.5);
  --bg-input: rgba(17, 9, 31, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(217, 70, 239, 0.22);
  --border-focus: #d946ef;

  --text-main: #fdf4ff;
  --text-muted: #f0abfc;
  --text-subtle: #c084fc;

  --brand-primary: #d946ef;
  --brand-primary-hover: #c026d3;
  --brand-primary-light: rgba(217, 70, 239, 0.16);
  --brand-accent: #8b5cf6;
  --brand-gradient: linear-gradient(135deg, #ec4899 0%, #d946ef 50%, #8b5cf6 100%);
  --brand-glow: rgba(217, 70, 239, 0.4);

  --glow-top: rgba(217, 70, 239, 0.18);
  --glow-bottom: rgba(139, 92, 246, 0.12);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.68);
  --card-glass-glow: 0 0 24px rgba(217, 70, 239, 0.07);

  --modal-backdrop: rgba(6, 2, 12, 0.82);
}

/* ==================== THEME 5: FROST LIGHT (CLEAN SUNLIGHT) ==================== */
[data-theme="light"] {
  --bg-app: #f3f6fc;
  --bg-sidebar: rgba(255, 255, 255, 0.85);
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-subtle: #e9eff8;
  --bg-input: #ffffff;
  
  --border-subtle: rgba(226, 232, 240, 0.85);
  --border-card: rgba(203, 213, 225, 0.7);
  --border-focus: #6366f1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --brand-primary: #6366f1;
  --brand-primary-hover: #4f46e5;
  --brand-primary-light: rgba(99, 102, 241, 0.12);
  --brand-accent: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --brand-glow: rgba(99, 102, 241, 0.25);

  --glow-top: rgba(99, 102, 241, 0.08);
  --glow-bottom: rgba(6, 182, 212, 0.05);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
  --card-glass-glow: none;

  --modal-backdrop: rgba(15, 23, 42, 0.45);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background-color: var(--bg-app);
  background-image: 
    radial-gradient(ellipse 70% 50% at 50% -10%, var(--glow-top), transparent 75%),
    radial-gradient(ellipse 55% 45% at 90% 95%, var(--glow-bottom), transparent 70%);
  background-attachment: fixed;
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

input, button, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.hidden { display: none !important; }
.text-danger { color: var(--color-high) !important; }

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.sidebar-header {
  padding: var(--space-lg) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.brand-text h2,
.brand-text .brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin: 0;
}

.brand-text h2 span,
.brand-text .brand-name span { color: var(--brand-primary); }

.badge-free {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-left: 4px;
}

.student-tag-banner {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-close-sidebar { display: none; }
.sidebar-action { padding: var(--space-md); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px var(--brand-glow);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--brand-glow);
}

.btn-primary.btn-block {
  width: 100%;
  padding: 12px var(--space-md);
}

.btn-primary kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xs);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-subtle);
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-ghost-sm:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.btn-link {
  font-size: 0.8rem;
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Nav Menu */
.nav-menu {
  flex: 1;
  padding: 0 var(--space-sm);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: var(--space-md) var(--space-sm) var(--space-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

.nav-item.active {
  color: #ffffff;
  background: var(--brand-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.nav-item.active svg { stroke: #ffffff; }

.nav-counter {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.nav-item.active .nav-counter {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.timer-mini-indicator, .exam-mini-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.nav-item.active .timer-mini-indicator, .nav-item.active .exam-mini-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.streak-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.streak-icon { font-size: 1.5rem; display: flex; align-items: center; }
.streak-icon img { border-radius: 8px; display: block; }
.streak-count { font-weight: 700; font-size: 0.85rem; color: var(--text-main); }
.streak-sub { font-size: 0.72rem; color: var(--text-muted); }
.storage-controls { display: flex; align-items: center; justify-content: space-between; gap: 4px; }

.btn-install-app {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-install-app img { border-radius: 6px; }
.btn-install-app:hover { filter: brightness(1.08); }

/* Topbar & Main */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.topbar {
  height: 70px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar-left { display: flex; align-items: center; gap: var(--space-md); }
.mobile-menu-btn { display: none; }
.page-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text-main); }
.page-subtitle { font-size: 0.82rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: var(--space-md); }

.date-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.quick-timer-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--brand-primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-timer-widget:hover { transform: translateY(-1px); }
.timer-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--brand-primary); }
.timer-dot.running { background: #10b981; box-shadow: 0 0 8px #10b981; }

/* Auth Topbar Elements */
.auth-topbar-section {
  position: relative;
}

.btn-auth-signin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 3px 10px var(--brand-glow);
  transition: all var(--transition-fast);
}

.btn-auth-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px var(--brand-glow);
}

.user-profile-widget {
  position: relative;
}

.user-avatar-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-avatar-pill:hover {
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
}

.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.user-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 150;
  animation: fadeIn 0.2s var(--ease-out);
}

.profile-dropdown-header {
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.profile-dropdown-header strong {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cloud-sync-status {
  font-size: 0.7rem;
  color: #10b981;
  font-weight: 600;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.dropdown-item.text-danger:hover {
  background: var(--color-high-bg);
  color: var(--color-high);
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-primary);
  transform: rotate(15deg);
  box-shadow: 0 0 15px var(--brand-glow);
}

.theme-icon-sun, .theme-icon-moon {
  position: absolute;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

[data-theme="dark"] .theme-icon-sun,
[data-theme="cyber"] .theme-icon-sun,
[data-theme="emerald"] .theme-icon-sun,
[data-theme="crimson"] .theme-icon-sun,
[data-theme="velvet"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0);
  color: #f59e0b;
}

[data-theme="dark"] .theme-icon-moon,
[data-theme="cyber"] .theme-icon-moon,
[data-theme="emerald"] .theme-icon-moon,
[data-theme="crimson"] .theme-icon-moon,
[data-theme="velvet"] .theme-icon-moon {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}

[data-theme="light"] .theme-icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
  color: var(--brand-primary);
}

/* ==================== THEME PALETTE PICKER ==================== */
.theme-palette-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.theme-palette-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all var(--transition-fast);
}

.theme-palette-btn:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 0 16px var(--brand-glow);
  transform: translateY(-1px);
}

.theme-active-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 10px var(--brand-primary);
  display: inline-block;
  flex-shrink: 0;
}

.theme-palette-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-lg), 0 0 30px var(--brand-glow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeIn 0.18s var(--ease-out);
}

.theme-dropdown-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.theme-option-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateX(3px);
}

.theme-option-item.active {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary);
  box-shadow: 0 0 12px var(--brand-glow);
}

.theme-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: inline-block;
}

.swatch-cyber { background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4); box-shadow: 0 0 8px #8b5cf6; }
.swatch-emerald { background: linear-gradient(135deg, #10b981, #14b8a6, #06b6d4); box-shadow: 0 0 8px #10b981; }
.swatch-crimson { background: linear-gradient(135deg, #ef4444, #f97316, #f59e0b); box-shadow: 0 0 8px #f97316; }
.swatch-velvet { background: linear-gradient(135deg, #ec4899, #d946ef, #8b5cf6); box-shadow: 0 0 8px #d946ef; }

.theme-option-text {
  display: flex;
  flex-direction: column;
}

.theme-option-text strong {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.2;
}

.theme-option-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Content Container */
.content-container {
  flex: 1;
  padding: var(--space-xl);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.view-panel {
  display: none;
  animation: fadeIn 0.25s var(--ease-out);
}
.view-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm), var(--card-glass-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px var(--brand-glow);
  border-color: var(--brand-primary);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-purple { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.stat-content { flex: 1; min-width: 0; }
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.stat-val { font-size: 1.6rem; font-weight: 800; color: var(--text-main); margin: 2px 0 4px; }
.stat-hint { font-size: 0.78rem; color: var(--text-subtle); }

.progress-bar-wrap {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: #10b981;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Free Templates Card */
.free-templates-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px var(--space-md);
  margin-bottom: var(--space-md);
}

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.template-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btn-template {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-template:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Toolbar */
.controls-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.search-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.search-box:focus-within { border-color: var(--brand-primary); }
.search-box input { border: none; background: transparent; width: 100%; outline: none; color: var(--text-main); font-size: 0.9rem; }
.clear-search-btn { font-size: 1.1rem; color: var(--text-subtle); line-height: 1; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }

.select-dropdown, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], textarea {
  padding: 9px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.select-dropdown:focus, input:focus, textarea:focus { border-color: var(--brand-primary); }

.active-filters-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.82rem;
}

.filter-tag-label { font-weight: 600; color: var(--text-muted); }
.filter-chips-container { display: flex; flex-wrap: wrap; gap: 6px; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}
.filter-chip-remove { cursor: pointer; }

/* Tasks Section & Item */
.tasks-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.section-title-wrap { display: flex; align-items: center; gap: var(--space-sm); }
.section-title { font-size: 1.15rem; font-weight: 700; }

.task-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.task-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.task-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm), var(--card-glass-glow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.task-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-md), 0 0 16px var(--brand-glow);
}

.task-item.completed { opacity: 0.65; background: var(--bg-subtle); }
.task-item.completed .task-title-text { text-decoration: line-through; color: var(--text-subtle); }

.task-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.task-item.priority-high::before { background: var(--color-high); }
.task-item.priority-medium::before { background: var(--color-med); }
.task-item.priority-low::before { background: var(--color-low); }

.task-checkbox-wrap { display: flex; align-items: center; cursor: pointer; }
.task-checkbox {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-card);
  border-radius: 6px;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.task-checkbox:checked { background: #10b981; border-color: #10b981; }
.task-checkbox:checked::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

.task-main-info { flex: 1; min-width: 0; }
.task-title-text { font-size: 0.98rem; font-weight: 600; color: var(--text-main); }

.task-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.task-badge-subject { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); color: white; }
.task-badge-priority { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }

.badge-high { background: var(--color-high-bg); color: var(--color-high); border: 1px solid var(--color-high-border); }
.badge-medium { background: var(--color-med-bg); color: var(--color-med); border: 1px solid var(--color-med-border); }
.badge-low { background: var(--color-low-bg); color: var(--color-low); border: 1px solid var(--color-low-border); }
.task-meta-item { display: inline-flex; align-items: center; gap: 4px; }

.task-pomo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.task-actions { display: flex; align-items: center; gap: 4px; }
.btn-task-action { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-muted); transition: all var(--transition-fast); }
.btn-task-action:hover { background: var(--bg-subtle); color: var(--text-main); }
.btn-task-action.action-delete:hover { background: var(--color-high-bg); color: var(--color-high); }
.btn-task-action.action-focus:hover { background: var(--brand-primary-light); color: var(--brand-primary); }

.empty-state { text-align: center; padding: var(--space-2xl) var(--space-md); }
.empty-icon { font-size: 3.5rem; margin-bottom: var(--space-sm); }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); max-width: 420px; margin: 0 auto var(--space-lg); font-size: 0.9rem; }
.empty-actions { display: flex; justify-content: center; gap: var(--space-md); flex-wrap: wrap; }

/* Planner Views */
.planner-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.nav-controls { display: flex; align-items: center; gap: var(--space-md); }
.current-date-heading h2 { font-size: 1.25rem; font-weight: 800; }
.date-sub { font-size: 0.8rem; color: var(--text-muted); }
.planner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.custom-date-input { padding: 8px 10px; background: var(--bg-subtle); border-radius: var(--radius-md); }

/* Daily View */
.daily-view-layout { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-lg); }
.daily-timeline-card, .daily-tasks-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}
.timeline-scroll-area { max-height: 620px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.timeline-slot {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  min-height: 52px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-app);
  border: 1px dashed var(--border-subtle);
}
.timeline-time { width: 70px; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.timeline-tasks-container { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.timeline-task-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary-light);
  border-left: 3px solid var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.timeline-empty-slot { font-size: 0.8rem; color: var(--text-subtle); cursor: pointer; }
.daily-checklist-container { display: flex; flex-direction: column; gap: var(--space-sm); max-height: 580px; overflow-y: auto; }

/* Weekly View */
.weekly-board-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-md);
}
.week-column {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  min-width: 150px;
}
.week-column.is-today { border-color: var(--brand-primary); }
.week-col-header { padding: var(--space-sm) var(--space-md); text-align: center; border-bottom: 1px solid var(--border-subtle); background: var(--bg-app); }
.week-col-day { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.week-col-num { font-size: 1.25rem; font-weight: 800; }
.week-column.is-today .week-col-num { color: var(--brand-primary); }
.week-col-tasks { flex: 1; padding: var(--space-sm); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.week-task-card {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 0.8rem;
  cursor: pointer;
}
.week-add-btn {
  margin: var(--space-sm);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

/* Monthly View */
.monthly-calendar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.calendar-weekdays-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-sm);
}
.calendar-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-day-cell {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: 95px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.calendar-day-cell:hover { border-color: var(--brand-primary); background: var(--bg-card-hover); }
.calendar-day-cell.other-month { opacity: 0.35; }
.calendar-day-cell.is-today { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.cal-day-num { font-size: 0.88rem; font-weight: 700; }
.cal-day-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.cal-dot { width: 7px; height: 7px; border-radius: var(--radius-full); }
.month-day-inspector {
  margin-top: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

/* Pomodoro View */
.pomodoro-container { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-lg); }
.pomodoro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pomodoro-modes {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-app);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
}
.pomo-mode-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pomo-mode-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--brand-glow);
}
.timer-display-ring-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto var(--space-xl);
}
.timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-circle-bg { fill: none; stroke: var(--bg-subtle); stroke-width: 12; }
.timer-circle-progress {
  fill: none;
  stroke: var(--brand-primary);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 754;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s linear;
}
.timer-inner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timer-digits {
  font-family: var(--font-mono);
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1;
}
.timer-state-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}
.active-focus-task-pill {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  max-width: 220px;
}
.focus-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--brand-primary); }
.focus-task-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.timer-controls { display: flex; align-items: center; justify-content: center; gap: var(--space-md); margin-bottom: var(--space-xl); }
.btn-timer-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 34px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px var(--brand-glow);
  transition: all var(--transition-fast);
}
.btn-timer-primary:hover { background: var(--brand-primary-hover); transform: translateY(-2px); }
.btn-timer-reset, .btn-timer-skip {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-timer-reset:hover, .btn-timer-skip:hover { color: var(--text-main); background: var(--bg-card-hover); }
.timer-task-selector { width: 100%; max-width: 380px; margin-bottom: var(--space-lg); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.timer-task-selector label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.ambient-sound-bar { width: 100%; max-width: 520px; padding: var(--space-md); background: var(--bg-app); border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); margin-bottom: var(--space-md); text-align: left; }
.ambient-label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-sm); }
.ambient-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-sound { padding: 6px 12px; border-radius: var(--radius-full); background: var(--bg-subtle); border: 1px solid var(--border-card); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.btn-sound.active { background: var(--brand-primary-light); border-color: var(--brand-primary); color: var(--brand-primary); }
.timer-settings-details { width: 100%; max-width: 520px; text-align: left; border-top: 1px solid var(--border-subtle); padding-top: var(--space-md); }
.timer-settings-details summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.settings-inputs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-top: var(--space-md); }
.input-field label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.input-field input { width: 100%; }
.checkbox-row { display: flex; flex-direction: column; gap: 8px; margin-top: var(--space-md); }
.custom-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; }
.pomodoro-stats-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-xl); padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-lg); }
.pomo-metrics-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.pomo-metric { background: var(--bg-app); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-md); text-align: center; }
.metric-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--brand-primary); }
.metric-text { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.focus-tips-card { background: var(--brand-primary-light); border-left: 4px solid var(--brand-primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: var(--space-md); font-size: 0.85rem; }
.tip-header { font-weight: 700; color: var(--brand-primary); margin-bottom: 4px; }

/* ==================== EXAM COUNTDOWN STYLES ==================== */
.exam-countdown-layout { display: flex; flex-direction: column; gap: var(--space-lg); }
.exam-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.exam-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.exam-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.exam-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.exam-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.exam-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.exam-days-huge {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-primary);
  line-height: 1;
  margin: var(--space-sm) 0;
}

.exam-days-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.exam-date-str {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.exam-delete-btn {
  color: var(--text-subtle);
  font-size: 1.1rem;
}
.exam-delete-btn:hover { color: var(--color-high); }

/* ==================== QUICK NOTES STYLES ==================== */
.notes-layout { display: flex; flex-direction: column; gap: var(--space-md); }
.notes-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.notes-editor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  min-height: 480px;
  display: flex;
}

#studentQuickNotesArea {
  width: 100%;
  height: 440px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

#studentQuickNotesArea:focus {
  border-color: var(--brand-primary);
}

/* ==================== AUTH MODAL STYLES ==================== */
.auth-modal-content {
  max-width: 440px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-app);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--space-md);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-align: center;
}

.auth-tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
}

.social-auth-wrap {
  margin-bottom: var(--space-md);
}

.btn-google-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px var(--space-md);
  background: var(--bg-app);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.btn-google-auth:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-subtle);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 10px;
}

.auth-alert {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.auth-alert.error {
  background: var(--color-high-bg);
  border: 1px solid var(--color-high-border);
  color: var(--color-high);
}

.auth-alert.success {
  background: var(--color-low-bg);
  border: 1px solid var(--color-low-border);
  color: var(--color-low);
}

/* Analytics View */
.analytics-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.analytics-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: var(--space-lg); }
.analytics-card.full-width { grid-column: 1 / -1; }
.completion-rate-badge { font-size: 1.2rem; font-weight: 800; color: var(--brand-primary); }
.progress-detailed-wrap { margin-top: var(--space-md); }
.progress-bar-large { height: 12px; background: var(--bg-subtle); border-radius: var(--radius-full); overflow: hidden; margin-bottom: var(--space-md); }
.progress-fill-large { height: 100%; background: var(--brand-gradient); border-radius: var(--radius-full); transition: width 0.5s ease; }
.progress-stats-row { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--text-muted); }
.subject-bars-list, .priority-distribution-list { display: flex; flex-direction: column; gap: var(--space-md); margin-top: var(--space-md); }
.subject-stat-row, .priority-stat-row { display: flex; align-items: center; gap: var(--space-md); }
.subject-name, .priority-name { width: 140px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subject-bar-wrap, .priority-bar-wrap { flex: 1; height: 8px; background: var(--bg-subtle); border-radius: var(--radius-full); overflow: hidden; }
.subject-bar-fill, .priority-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.4s ease; }
.bg-high { background: var(--color-high); }
.bg-med { background: var(--color-med); }
.bg-low { background: var(--color-low); }
.priority-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-full); margin-right: 4px; }
.dot-high { background: var(--color-high); }
.dot-med { background: var(--color-med); }
.dot-low { background: var(--color-low); }
.subject-qty, .priority-qty { font-size: 0.85rem; font-weight: 700; width: 30px; text-align: right; color: var(--text-muted); }

/* Modal Dialog */
.modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 580px;
  width: 90%;
  border-radius: var(--radius-xl);
}
.modal-dialog::backdrop {
  background-color: var(--modal-backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg), 0 0 35px var(--brand-glow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: var(--text-main);
  animation: modalScale 0.25s var(--ease-out);
}
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title-group { display: flex; align-items: center; gap: var(--space-sm); }
.modal-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-title-group h2 { font-size: 1.25rem; font-weight: 800; }
.btn-close-modal { font-size: 1.8rem; line-height: 1; color: var(--text-muted); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); }
.btn-close-modal:hover { background: var(--bg-subtle); color: var(--text-main); }
.modal-form { display: flex; flex-direction: column; gap: var(--space-md); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.form-group .required { color: var(--color-high); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-row-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--space-md); }
.pomo-stepper { display: flex; align-items: center; gap: var(--space-sm); }
.btn-stepper { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--bg-subtle); border: 1px solid var(--border-card); font-weight: 700; font-size: 1.1rem; }
.btn-stepper:hover { background: var(--bg-card-hover); }
.pomo-stepper input { width: 60px; text-align: center; font-family: var(--font-mono); font-weight: 700; }
.pomo-calc-hint { font-size: 0.8rem; color: var(--text-subtle); margin-left: 6px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-sm); margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border-subtle); }

/* Toasts & Confetti */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  animation: toastSlideIn 0.3s var(--ease-out);
}
.toast.toast-success { border-left-color: #10b981; }
.toast.toast-error { border-left-color: var(--color-high); }
.toast.toast-info { border-left-color: var(--brand-primary); }
.toast-message { font-size: 0.88rem; font-weight: 500; color: var(--text-main); }
.toast-close { color: var(--text-subtle); font-size: 1.1rem; }
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0); }
}
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10000; }

/* Responsive Media Queries */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  z-index: 95;
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(12px);
}
.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px;
}
.mobile-nav-btn.active { color: var(--brand-primary); }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 98;
}

@media (max-width: 1024px) {
  .daily-view-layout, .pomodoro-container, .analytics-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { position: fixed; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-backdrop.active { display: block; }
  .mobile-close-sidebar, .mobile-menu-btn, .mobile-bottom-nav { display: flex; }
  .main-wrapper { padding-bottom: 70px; }
  .topbar { padding: 0 var(--space-md); }
  .content-container { padding: var(--space-md); }
  .controls-toolbar, .filter-group { flex-direction: column; align-items: stretch; }
  .filter-group .select-dropdown { width: 100%; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .weekly-board-grid { grid-template-columns: repeat(7, 240px); }
  .date-chip { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .timer-display-ring-wrapper { width: 240px; height: 240px; }
  .timer-digits { font-size: 3.2rem; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 9999;
  background: var(--brand-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus { left: 8px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.seo-landing {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding-bottom: 24px;
}
.seo-card, .faq-card {
  background: var(--bg-card, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 20px 22px;
}
.seo-card h2, .faq-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}
.seo-card p, .faq-card p, .how-it-works {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}
.how-it-works { padding-left: 1.2rem; margin: 8px 0 0; }
.how-it-works li { margin: 6px 0; }
.faq-card details {
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  padding: 10px 0;
}
.faq-card details:first-of-type { border-top: 0; }
.faq-card summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
}
.faq-card details p { margin: 8px 0 0; }

/* ==================== FLOATING WHATSAPP CHANNEL WIDGET ==================== */
.whatsapp-widget-container {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
  display: block !important;
}

.whatsapp-float-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: #25D366 !important;
  color: #ffffff !important;
  padding: 12px 18px !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  border: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.whatsapp-float-btn:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.7) !important;
  color: #ffffff !important;
}

.wa-badge {
  background: #ffffff !important;
  color: #075E54 !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
}

@media (max-width: 768px) {
  .whatsapp-widget-container {
    bottom: 80px !important;
    right: 14px !important;
  }
  .whatsapp-float-btn {
    padding: 10px 14px !important;
    font-size: 0.82rem !important;
  }
}

@media (display-mode: standalone) {
  .whatsapp-widget-container {
    bottom: 90px !important;
    right: 14px !important;
    z-index: 999999 !important;
    display: block !important;
  }
}

/* ==================== BADGES & ACHIEVEMENTS STYLES ==================== */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.badge-card {
  background: var(--bg-app);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.badge-card.unlocked {
  background: var(--bg-card);
  border-color: var(--brand-primary);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.badge-card.locked {
  opacity: 0.55;
  filter: grayscale(0.8);
}

.badge-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.badge-card.unlocked .badge-icon-box {
  background: var(--brand-primary-light);
}

.badge-info-wrap {
  display: flex;
  flex-direction: column;
}

.badge-title-str {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.badge-desc-str {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-status-tag {
  font-size: 0.68rem;
  font-weight: 800;
  margin-top: 4px;
  display: inline-block;
}

.badge-card.unlocked .badge-status-tag { color: var(--brand-primary); }
.badge-card.locked .badge-status-tag { color: var(--text-subtle); }

/* ============================================================================
   AI PREDICTOR, EXAM WARNINGS & MOTIVATOR STYLES
   ============================================================================ */

/* Dashboard Predictor Hero Widget */
.predictor-hero-widget {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(236, 72, 153, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.predictor-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.predictor-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.predictor-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-on-track {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tight-pace {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger-zone {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulseDanger 2s infinite;
}

@keyframes pulseDanger {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.predictor-velocity-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* Warnings Container & Alert Items */
.warning-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warning-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
}

.warning-alert-item.danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.warning-alert-item.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.warning-alert-item.info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.alert-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.alert-text-wrap {
  flex: 1;
}

.alert-title {
  font-weight: 700;
  font-size: 0.85rem;
}

.alert-sub {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* Motivator Coach Card */
.motivator-coach-card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.coach-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.coach-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coach-quote {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  font-style: italic;
  line-height: 1.35;
}

.coach-action-tip {
  font-size: 0.78rem;
  color: #a78bfa;
  font-weight: 600;
}

.btn-coach-nudge {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-coach-nudge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* AI Predictor View Layout */
.predictor-page-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.predictor-hero-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.predictor-score-col {
  flex-shrink: 0;
}

.readiness-gauge-wrap {
  width: 130px;
  height: 130px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg-card) 60%, rgba(99, 102, 241, 0.2) 100%);
  border: 4px solid var(--brand-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.3);
}

.gauge-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
}

.gauge-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.predictor-details-col {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.predictor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.predictor-status-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.velocity-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #a78bfa;
}

.predictor-desc-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.predictor-stats-mini-row {
  display: flex;
  gap: 20px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
}

.mini-stat span {
  font-size: 0.72rem;
  color: var(--text-muted);

}

.mini-stat strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.predictor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.predictor-card.full-width {
  width: 100%;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  font-size: 1.2rem;
}

.card-icon.red { color: #ef4444; }
.card-icon.gold { color: #f59e0b; }

.warnings-detailed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-warning-msg {
  padding: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: #10b981;
  font-weight: 600;
  text-align: center;
}

.motivator-card-bg {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(236, 72, 153, 0.04) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.coach-full-display {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.coach-quote-large {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f3e8ff;
  line-height: 1.5;
  font-style: italic;
  padding-left: 14px;
  border-left: 4px solid var(--brand-primary);
}

.coach-action-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-step-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-velocity-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subject-vel-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subject-vel-name {
  width: 140px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subject-vel-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.subject-vel-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.subject-vel-stat {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 90px;
  text-align: right;
}

.nav-counter.danger-badge {
  background: #ef4444 !important;
  color: #fff !important;
  font-weight: 800;
}

/* ==========================================================================
   BEAST MODE ULTRA PRO STYLES & GAMIFICATION COMPONENTS
   ========================================================================== */

/* Topbar Upgrade Elements */
.btn-lang-toggle {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-lang-toggle:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.xp-level-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.level-badge {
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.xp-bar-wrap {
  width: 60px;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #6366f1 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.xp-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-beast-focus {
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-beast-focus:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}

.btn-demo {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-demo:hover {
  background: #10b981;
  color: #ffffff;
}

/* Beast Gamification Row */
.beast-gamification-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .beast-gamification-row {
    grid-template-columns: 1fr;
  }
}

.beast-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.beast-card-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
}

.beast-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Circular Goal Ring */
.goal-ring-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.goal-ring-body {
  display: flex;
  align-items: center;
  gap: 18px;
}

.svg-ring-container {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-ring-svg {
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--bg-subtle);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: url(#ringGradient);
  stroke: #6366f1;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.ring-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ring-percent {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.ring-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.goal-hints-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.goal-stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.goal-stat-pill .pill-title {
  color: var(--text-muted);
}

.goal-stat-pill strong {
  color: var(--text-main);
  font-weight: 800;
}

/* 30-Day Heatmap */
.heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legend-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-box.lvl-0 { background: var(--bg-subtle); }
.legend-box.lvl-1 { background: rgba(99, 102, 241, 0.3); }
.legend-box.lvl-2 { background: rgba(99, 102, 241, 0.7); }
.legend-box.lvl-3 { background: #6366f1; }

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.heatmap-day {
  aspect-ratio: 1;
  background: var(--bg-subtle);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.heatmap-day:hover {
  transform: scale(1.15);
  z-index: 2;
}

.heatmap-day.lvl-1 { background: rgba(99, 102, 241, 0.35); }
.heatmap-day.lvl-2 { background: rgba(99, 102, 241, 0.7); }
.heatmap-day.lvl-3 { background: #6366f1; box-shadow: 0 0 8px rgba(99, 102, 241, 0.5); }

/* Quick Export Toolbar */
.quick-export-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-whatsapp-share {
  background: linear-gradient(135deg, #075E54 0%, #25D366 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.15s ease;
}

.btn-whatsapp-share:hover {
  transform: translateY(-1px);
}

.btn-print-pdf {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.btn-print-pdf:hover {
  background: var(--bg-subtle);
}

/* ==================== BEAST FOCUS MODE FULLSCREEN MODAL ==================== */
.beast-focus-modal {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  background: #090b10 !important;
  color: #f3f4f6 !important;
  padding: 0 !important;
}

.beast-focus-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, rgba(12, 14, 20, 0.95) 70%);
}

.focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.focus-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.focus-logo-icon {
  font-size: 1.5rem;
}

.focus-brand h2 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.focus-mode-tag {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.btn-close-focus {
  background: var(--bg-subtle);
  color: #ffffff;
  border: 1px solid var(--border-card);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-focus:hover {
  background: #ef4444;
  border-color: #ef4444;
}

.focus-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  gap: 24px;
}

.focus-task-lock {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  width: 100%;
}

.lock-label {
  font-size: 0.75rem;
  color: var(--brand-primary);
  font-weight: 800;
  letter-spacing: 1px;
}

.focus-task-lock h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 4px;
}

.focus-timer-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.focus-timer-digits {
  font-family: var(--font-mono);
  font-size: 5.5rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
  letter-spacing: 2px;
  line-height: 1;
}

.focus-timer-status {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 8px;
}

.focus-timer-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-focus-action {
  background: var(--bg-subtle);
  color: #ffffff;
  border: 1px solid var(--border-card);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-focus-action.main-start {
  background: var(--brand-gradient);
  border: none;
  padding: 14px 36px;
  font-size: 1.05rem;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.btn-focus-action:hover {
  transform: translateY(-2px);
}

/* Ambient Sound Player */
.ambient-sound-player {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: var(--radius-lg);
  width: 100%;
}

.ambient-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.ambient-buttons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.ambient-sound-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ambient-sound-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.ambient-volume-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ambient-volume-wrap input[type="range"] {
  accent-color: var(--brand-primary);
}

.beast-quote-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999999;
}

/* ==================== INTERACTIVE AI FLASHCARDS ==================== */
.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.flashcard {
  perspective: 1000px;
  height: 170px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-card);
}

.flashcard-front {
  background: var(--bg-card);
  color: var(--text-main);
}

.flashcard-front .card-prompt {
  font-size: 0.92rem;
  font-weight: 700;
}

.flashcard-front .card-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.flashcard-back {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  transform: rotateY(180deg);
}

.flashcard-back .card-answer {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

/* ==================== SYLLABUS SPLITTER BUTTON & MODAL ==================== */
.btn-syllabus-splitter {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-syllabus-splitter:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.badge-mini-glow {
  background: #ffffff;
  color: #ef4444;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.splitter-preview-table-box {
  padding: 8px 12px;
}

.splitter-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.splitter-preview-item:last-child {
  border-bottom: none;
}

.splitter-preview-item .task-prev-date {
  font-weight: 700;
  color: var(--brand-primary);
  width: 90px;
}

.splitter-preview-item .task-prev-title {
  flex: 1;
  color: var(--text-main);
  padding: 0 8px;
}

.splitter-preview-item .task-prev-type {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ==================== SPACED REPETITION VIEW STYLES ==================== */
.spaced-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.spaced-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spaced-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.spaced-status-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.status-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill.active-due {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.status-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse 1.8s infinite;
}

/* Active 3D Flashcard Stage */
.active-flashcard-stage {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.stage-card-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 580px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
}

.card-subject-tag {
  background: rgba(99, 102, 241, 0.15);
  color: var(--brand-primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
}

.study-flashcard {
  perspective: 1200px;
  width: 100%;
  max-width: 580px;
  height: 280px;
  cursor: pointer;
}

.study-flashcard .flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.study-flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-card);
  user-select: none;
}

.flashcard-face.flashcard-front {
  background: radial-gradient(circle at center, var(--bg-card-hover) 0%, var(--bg-card) 100%);
  color: var(--text-main);
}

.flashcard-face.flashcard-back {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
  color: #ffffff;
  transform: rotateY(180deg);
}

.face-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--brand-primary);
  margin-bottom: 12px;
}

.flashcard-back .face-label {
  color: #a5b4fc;
}

.card-prompt-text {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 16px;
}

.card-answer-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
}

.flip-hint-pill {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* SRS Rating Actions */
.flashcard-actions-bar {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 580px;
}

.btn-srs-rating {
  flex: 1;
  padding: 12px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-srs-rating:hover {
  transform: translateY(-2px);
}

.btn-srs-rating.hard:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.btn-srs-rating.good:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
}

.btn-srs-rating.easy:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.rating-title {
  font-size: 0.85rem;
  font-weight: 800;
}

.rating-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Concept Cards Deck Grid */
.deck-list-section {
  width: 100%;
}

.deck-list-section .section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.flashcard-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.flashcard-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.flashcard-mini-card:hover {
  transform: translateY(-2px);
}

.mini-card-front {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.mini-card-back {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.mini-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
}

/* ==================== PRINT PDF STYLESHEET ==================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sidebar, .topbar, .quick-export-toolbar, .whatsapp-widget-container, .whatsapp-float-btn, .btn-primary, .theme-toggle-btn, .beast-gamification-row {
    display: none !important;
  }
  .main-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }
  .view-panel {
    display: block !important;
  }
  .task-card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
    box-shadow: none !important;
  }
}
