/* ==========================================================================
   Islamic Studies LMS - Comprehensive IDEO Design System & Theme Engine
   ========================================================================== */

:root {
  /* Layout Dimensions */
  --sidebar-width: 280px;

  /* Brand Palette - Deep Emerald, Warm Gold & Obsidian Slate */
  --emerald-primary: #059669;
  --emerald-hover: #047857;
  --emerald-dark: #064e3b;
  --emerald-light: rgba(5, 150, 105, 0.15);
  
  --gold-accent: #d97706;
  --gold-hover: #b45309;
  --gold-light: rgba(217, 119, 6, 0.15);
  --gold-border: #f59e0b;

  /* Dark Theme Defaults */
  --bg-color: #090d16;
  --sidebar-bg: #0f172a;
  --card-bg: #131c2e;
  --card-hover: #1a263e;
  --card-border: #1e293b;
  --input-bg: #0b1120;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --glass-bg: rgba(19, 28, 46, 0.75);
  --header-bg: rgba(9, 13, 22, 0.85);

  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: #10b981;
  --success-text: #34d399;
  
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-border: #ef4444;
  --danger-text: #f87171;

  --info-bg: rgba(59, 130, 246, 0.15);
  --info-border: #3b82f6;
  --info-text: #60a5fa;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.35), 0 3px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 24px -4px rgba(0, 0, 0, 0.45), 0 6px 12px -4px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1200px) {
  :root {
    --sidebar-width: 250px;
  }
}

/* Light Theme Overrides */
body.theme-light {
  --bg-color: #f8fafc;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --card-hover: #f1f5f9;
  --card-border: #cbd5e1;
  --input-bg: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #475569;
  
  --gold-accent: #92400e;
  --gold-hover: #78350f;
  --gold-light: rgba(146, 64, 14, 0.12);
  --gold-border: #b45309;

  --glass-bg: rgba(255, 255, 255, 0.92);
  --header-bg: rgba(248, 250, 252, 0.95);

  --success-bg: #d1fae5;
  --success-border: #059669;
  --success-text: #047857;
  
  --danger-bg: #fee2e2;
  --danger-border: #dc2626;
  --danger-text: #991b1b;

  --info-bg: #dbeafe;
  --info-border: #2563eb;
  --info-text: #1e40af;

  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 20px -3px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.15);
}

/* ==========================================================================
   Accessibility Utilities & Focus Ring Styles (WCAG AA Compliant)
   ========================================================================== */

/* Visually Hidden Helper for Screen Readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  background: var(--emerald-primary);
  color: #ffffff !important;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 99999;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: top 0.2s ease-in-out;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 20px;
  outline: 3px solid #ffffff !important;
  outline-offset: 3px !important;
}

/* Universal High-Contrast Focus Visible Ring */
:focus-visible {
  outline: 2px solid var(--emerald-primary) !important;
  outline-offset: 2px !important;
}

body.theme-dark :focus-visible {
  outline: 2px solid #34d399 !important;
  outline-offset: 2px !important;
}

body.theme-light :focus-visible {
  outline: 2px solid #059669 !important;
  outline-offset: 2px !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="radio"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--emerald-primary) !important;
  outline-offset: 2px !important;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, .logo-title, .cert-title {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.025em;
}

.arabic-text {
  font-family: 'Amiri', serif;
  font-size: 1.35em;
  direction: rtl;
  color: var(--gold-accent);
  line-height: 1.8;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
}

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

.logo-icon-bg {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--emerald-primary), var(--gold-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.logo-icon {
  font-size: 1.4rem;
  color: #ffffff;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.72rem;
  color: var(--emerald-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Track Selector */
.track-selector-container {
  padding: 18px 20px;
  border-bottom: 1px solid var(--card-border);
}

.track-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-selector {
  display: flex;
  background-color: var(--input-bg);
  padding: 4px;
  border-radius: var(--radius-sm);
  gap: 4px;
  border: 1px solid var(--card-border);
}

.track-btn {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-muted);
  padding: 8px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.track-btn i {
  font-size: 0.95rem;
}

.track-btn.active {
  background-color: var(--emerald-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Progress Card */
.progress-card {
  padding: 16px 20px;
  background-color: var(--input-bg);
  margin: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  margin-bottom: 8px;
}

.progress-info span {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-info strong {
  color: var(--emerald-primary);
  font-size: 1rem;
}

.progress-bar-bg {
  height: 8px;
  background-color: var(--card-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald-primary), var(--gold-accent));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-subtext {
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-top: 6px;
  text-align: right;
}

/* Modules Nav List */
.modules-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 20px 14px;
}

.nav-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 8px 8px 8px;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.btn-dashboard-jump {
  background: none;
  border: none;
  color: var(--emerald-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-dashboard-jump:hover {
  text-decoration: underline;
}

.modules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
}

.module-nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.module-nav-item:hover {
  background-color: var(--card-hover);
  color: var(--text-main);
}

.module-nav-item.active {
  background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-hover));
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.module-nav-item.completed i.fa-check {
  color: var(--gold-accent);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--card-border);
}

.btn-theme-toggle {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background-color: var(--input-bg);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* Top Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 540px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 42px 10px 44px;
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.clear-search {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

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

.badge-madhhab {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--gold-light);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.header-btn:hover {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

/* Search Panel */
.search-results-panel {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin: 20px 32px 0 32px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.search-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.results-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background-color: var(--input-bg);
  color: var(--text-muted);
}

.search-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--input-bg);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--card-border);
}

.search-item:hover {
  border-color: var(--emerald-primary);
  transform: translateX(4px);
}

.search-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.925rem;
  margin-bottom: 4px;
}

.search-item-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* View Containers */
.view-container {
  padding: 32px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.18), rgba(217, 119, 6, 0.12));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.hero-badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--emerald-light);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-primary);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-badge.gold {
  background-color: var(--gold-light);
  color: var(--gold-accent);
  border-color: var(--gold-border);
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.25;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 780px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 800px;
}

.stat-card {
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--emerald-light);
  color: var(--emerald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-card strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Dashboard Filter Bar */
.dashboard-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-filter-bar h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  border-color: var(--emerald-primary);
  color: var(--text-main);
}

.filter-pill.active {
  background-color: var(--emerald-primary);
  color: #ffffff;
  border-color: var(--emerald-primary);
  box-shadow: var(--shadow-sm);
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.module-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.module-card:hover {
  transform: translateY(-6px);
  border-color: var(--emerald-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.module-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.module-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-hover));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background-color: var(--input-bg);
  color: var(--emerald-primary);
  border: 1px solid var(--card-border);
}

.module-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.35;
}

.module-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.55;
}

.module-card-meta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.module-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  font-size: 0.875rem;
  color: var(--emerald-primary);
  font-weight: 700;
}

/* Module View Header */
.module-header-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.module-meta-top {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.track-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background-color: var(--gold-light);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
}

.time-badge, .bloom-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background-color: var(--input-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.module-header-card h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.module-header-card p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
}

/* Objectives Card */
.objectives-card {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.objectives-header {
  font-size: 0.875rem;
  color: var(--gold-accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.objectives-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.objectives-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.objectives-list li::before {
  content: '✓';
  color: var(--emerald-primary);
  font-weight: 800;
}

/* Tab Nav */
.tab-nav {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: var(--input-bg);
}

.tab-btn.active {
  background-color: var(--emerald-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.content-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.content-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-right {
  display: flex;
  gap: 12px;
}

.maliki-citation-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-accent);
  background-color: var(--gold-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gold-border);
}

.btn-read-aloud {
  background-color: var(--emerald-primary);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-read-aloud:hover {
  background-color: var(--emerald-hover);
  transform: translateY(-2px);
}

.btn-mark-complete {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-mark-complete.completed {
  background-color: var(--emerald-primary);
  color: #ffffff;
  border-color: var(--emerald-primary);
}

/* Markdown Styling */
.markdown-body {
  font-size: 1.025rem;
  line-height: 1.75;
  color: var(--text-main);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  color: var(--text-main);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 8px;
}

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

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

.markdown-body blockquote {
  border-left: 4px solid var(--emerald-primary);
  padding: 12px 20px;
  background-color: var(--input-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.2em;
  font-style: italic;
}

/* Read Aloud Page */
.read-aloud-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.read-aloud-header {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-audio-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--emerald-primary);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-audio-action:hover {
  transform: scale(1.08);
}

.btn-audio-action.stop {
  background-color: var(--card-border);
  color: var(--text-main);
}

.audio-setting {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.audio-select {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.audio-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#raProgressLabel {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.audio-progress-bar {
  height: 6px;
  background-color: var(--card-border);
  border-radius: 3px;
  overflow: hidden;
}

.audio-progress-fill {
  height: 100%;
  background-color: var(--emerald-primary);
  transition: width 0.3s ease;
}

.read-aloud-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sentence-block {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.05rem;
  line-height: 1.6;
}

.sentence-block:hover {
  border-color: var(--emerald-primary);
  background-color: var(--card-hover);
}

.sentence-block.speaking {
  border-color: var(--emerald-primary);
  background-color: var(--emerald-light);
  box-shadow: 0 0 0 2px var(--emerald-primary);
  font-weight: 600;
}

/* Teleprompter Portal */
.teleprompter-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.teleprompter-toolbar {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.tp-controls-left, .tp-controls-center, .tp-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slide-nav-btn {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.slide-nav-btn:hover {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

.slide-counter {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-auto-scroll {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-auto-scroll.active {
  background-color: var(--gold-accent);
  color: #ffffff;
  border-color: var(--gold-accent);
}

.scroll-speed-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-tp-font {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.teleprompter-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
}

.tp-slide-box, .tp-script-box {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tp-box-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--emerald-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.tp-speed-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: none;
  letter-spacing: normal;
}

.tp-scroll-progress-track {
  width: 100%;
  height: 4px;
  background: var(--card-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: -8px;
  margin-bottom: 4px;
}

.tp-scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--emerald-primary), var(--gold-accent));
  border-radius: var(--radius-full);
  transition: width 0.1s linear;
}

.cue-pill {
  background-color: rgba(139, 92, 246, 0.15);
  border: 1px solid #8b5cf6;
  color: #c4b5fd;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

.teleprompter-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-main);
  background-color: var(--input-bg);
  padding: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  white-space: pre-line;
  max-height: 380px;
  overflow-y: auto;
  transition: font-size 0.2s ease;
}

.teleprompter-text.font-large {
  font-size: 1.4rem;
}

.teleprompter-text.font-xlarge {
  font-size: 1.7rem;
}

.analogy-card {
  background-color: var(--gold-light);
  border: 1px solid var(--gold-border);
  padding: 16px;
  border-radius: var(--radius-sm);
}

.analogy-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-accent);
  margin-bottom: 6px;
}

.check-q-card {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: var(--radius-sm);
}

.check-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-primary);
  margin-bottom: 6px;
}

.btn-show-answer {
  margin-top: 10px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Interactive Quiz Engine */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.quiz-score-banner {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.2), rgba(217, 119, 6, 0.15));
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.score-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--gold-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.score-details h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.score-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.score-actions {
  display: flex;
  gap: 12px;
}

.btn-retry, .btn-certificate {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-certificate {
  background-color: var(--gold-accent);
  color: #ffffff;
  border-color: var(--gold-accent);
}

.btn-certificate:hover {
  background-color: var(--gold-hover);
}

.quiz-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.quiz-card-header {
  display: flex;
  gap: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.q-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--emerald-light);
  color: var(--emerald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.mcq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.opt-btn {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-main);
  font-size: 0.925rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: var(--transition);
}

.opt-btn:hover {
  border-color: var(--emerald-primary);
  background-color: var(--card-hover);
}

.opt-btn.selected {
  border-color: var(--emerald-primary);
  background-color: var(--emerald-light);
  box-shadow: 0 0 0 2px var(--emerald-primary);
}

.opt-btn.correct {
  border-color: var(--success-border) !important;
  background-color: var(--success-bg) !important;
  color: var(--success-text) !important;
  font-weight: 700;
}

.opt-btn.incorrect {
  border-color: var(--danger-border) !important;
  background-color: var(--danger-bg) !important;
  color: var(--danger-text) !important;
}

.quiz-explanation-card {
  margin-top: 14px;
  padding: 14px 18px;
  background-color: var(--input-bg);
  border-left: 4px solid var(--gold-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.quiz-explanation-card strong {
  color: var(--gold-accent);
}

.fib-input {
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--emerald-primary);
  font-weight: 700;
  padding: 4px 10px;
  font-size: 0.95rem;
  outline: none;
  width: 140px;
}

.reflection-input {
  width: 100%;
  min-height: 100px;
  background-color: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  margin-top: 10px;
}

.quiz-submit-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.btn-submit-quiz {
  background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-hover));
  color: #ffffff;
  border: none;
  padding: 14px 36px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-submit-quiz:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Slideshow Container */
.slideshow-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slideshow-controls {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slide-frame {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 48px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.btn-fullscreen {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

/* Sticky Audio Control Bar */
.sticky-audio-bar {
  position: fixed;
  bottom: 24px;
  right: 32px;
  z-index: 150;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--emerald-primary);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 24px;
}

.audio-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-pulse-icon {
  font-size: 1.2rem;
  color: var(--emerald-primary);
  animation: pulse 1.5s infinite;
}

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

.audio-bar-title {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
}

.audio-bar-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-bar-controls {
  display: flex;
  gap: 10px;
}

.bar-btn {
  background-color: var(--emerald-primary);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Certificate Modal */
.cert-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cert-modal-backdrop.is-open,
.cert-modal-backdrop[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cert-modal-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.cert-modal-backdrop.is-open .cert-modal-card,
.cert-modal-backdrop[aria-hidden="false"] .cert-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.cert-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.cert-frame {
  border: 8px double var(--gold-accent);
  padding: 36px;
  text-align: center;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.05) 0%, rgba(0,0,0,0) 80%);
  position: relative;
}

.cert-header-icon {
  font-size: 2.5rem;
  color: var(--gold-accent);
  margin-bottom: 12px;
}

.cert-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-accent);
  margin-bottom: 4px;
}

.cert-subtitle {
  font-size: 1rem;
  color: var(--emerald-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 28px;
}

.cert-body {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 32px;
  line-height: 1.8;
}

.cert-name-input {
  display: block;
  width: 80%;
  margin: 12px auto;
  background: none;
  border: none;
  border-bottom: 2px solid var(--emerald-primary);
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  outline: none;
}

.cert-course-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--emerald-primary);
  margin: 8px 0;
}

.cert-score-badge {
  display: inline-block;
  background-color: var(--gold-light);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 10px;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 40px;
}

.cert-sign-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cert-sign-line {
  width: 140px;
  border-top: 1px solid var(--text-muted);
  margin-bottom: 6px;
}

.cert-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gold-accent);
}

.cert-seal i {
  font-size: 2rem;
}

.cert-seal span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.cert-modal-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.btn-certificate-print {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-hover));
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Print Rules */
@media print {
  .sidebar, .top-header, .sticky-audio-bar, .cert-modal-actions, .cert-close-btn, .content-toolbar, .tab-nav {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .view-container {
    padding: 0 !important;
  }
  .cert-modal-backdrop {
    position: static;
    background: none;
  }
  .cert-modal-card {
    box-shadow: none;
    border: none;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-toggle {
    display: block;
  }
  .main-content {
    margin-left: 0;
  }
  .teleprompter-grid {
    grid-template-columns: 1fr;
  }
  .mcq-options {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Multi-Tenant Auth, Learner Switcher, Parent & Admin Dashboard Styles
   ========================================================================== */

/* Header Learner Switcher Pill */
.learner-switcher-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-full);
  padding: 4px 14px 4px 6px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.15);
}

.learner-switcher-pill:hover {
  background: var(--card-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(5, 150, 105, 0.3);
}

.learner-avatar {
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--emerald-light);
  border-radius: 50%;
}

.learner-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.learner-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-subtle);
  font-weight: 600;
}

.learner-name {
  font-size: 0.85rem;
  color: var(--text-main);
}

.pill-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Header Buttons Extensions */
.header-btn.primary {
  background: var(--emerald-primary);
  color: #ffffff;
  border-color: var(--emerald-hover);
}

.header-btn.primary:hover {
  background: var(--emerald-hover);
}

.header-btn.gold {
  background: var(--gold-light);
  color: var(--gold-accent);
  border-color: var(--gold-border);
}

.header-btn.gold:hover {
  background: var(--gold-accent);
  color: #ffffff;
}

/* Parent & Admin Heroes */
.hero-banner.parent-hero {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.9), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.hero-banner.admin-hero {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.9), rgba(9, 13, 22, 0.95)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.hero-banner.level1-hero {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.92), rgba(30, 58, 138, 0.9)), url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1200&q=80') center/cover;
}

.hero-banner.level2-hero {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 27, 75, 0.92)), url('https://images.unsplash.com/photo-1509198397868-475647b2a1e5?auto=format&fit=crop&w=1200&q=80') center/cover;
}

/* Learner Next Action Card */
.learner-next-action-card {
  background: var(--card-bg);
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
}

.level2-mode .learner-next-action-card {
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.next-action-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.next-action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--emerald-light);
  color: var(--emerald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.level2-mode .next-action-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.next-action-info .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--emerald-primary);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.level2-mode .next-action-info .badge {
  color: #3b82f6;
}

.next-action-info h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 2px 0;
}

.next-action-info p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.next-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Track-Specific Module Card Styles */
.module-card.level1-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  transition: var(--transition);
}

.module-card.level1-card:hover {
  border-color: var(--emerald-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.2);
}

.module-card.level2-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, var(--card-bg) 0%, rgba(15, 23, 42, 0.8) 100%);
  transition: var(--transition);
}

.module-card.level2-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.track-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.track-tag-pill.level1 {
  background: var(--emerald-light);
  color: var(--emerald-primary);
}

.track-tag-pill.level2 {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* Action Buttons */
.btn-primary-action {
  background: var(--emerald-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary-action:hover {
  background: var(--emerald-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary-action {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-secondary-action:hover {
  background: var(--card-hover);
  border-color: var(--emerald-primary);
}

/* Parent Children Grid & Cards */
.parent-children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
}

.child-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.child-card:hover {
  transform: translateY(-4px);
  border-color: var(--emerald-primary);
  box-shadow: var(--shadow-md);
}

.child-card.active-learner {
  border: 2px solid var(--emerald-primary);
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.25);
}

.active-learner-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--emerald-primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.child-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.child-avatar-lg {
  font-size: 2.2rem;
  width: 60px;
  height: 60px;
  background: var(--emerald-light);
  border: 2px solid var(--emerald-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.child-details h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.child-meta-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.meta-pill.pin {
  color: var(--gold-accent);
  border-color: var(--gold-border);
}

.child-progress-box {
  margin: 16px 0;
}

.child-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.child-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.btn-child-switch {
  flex: 2;
  background: var(--emerald-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-child-switch:hover {
  background: var(--emerald-hover);
}

.btn-child-icon {
  background: var(--input-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-child-icon:hover {
  background: var(--card-hover);
  color: var(--text-main);
}

.btn-child-icon.danger:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

/* Active Learner Spotlight */
.active-learner-spotlight {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.2), rgba(15, 23, 42, 0.6));
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}

.spotlight-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.spotlight-avatar {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--emerald-light);
  border: 2px solid var(--emerald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--emerald-primary);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.spotlight-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 2px 0;
}

.spotlight-info p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.spotlight-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Empty State Child Card */
.empty-child-card {
  grid-column: 1 / -1;
  background: var(--card-bg);
  border: 2px dashed var(--card-border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.empty-child-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.empty-child-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.empty-child-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Child Card Stats Row */
.child-stats-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.child-mini-stat {
  background: var(--input-bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.child-mini-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.child-mini-stat-val {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Family Activity Log */
.family-activity-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-avatar {
  font-size: 1.2rem;
}

.activity-text {
  font-size: 0.9rem;
  color: var(--text-main);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

/* Admin Dashboard Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--input-bg);
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-main);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.role-badge.super_admin {
  background: var(--gold-light);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
}

.role-badge.parent {
  background: var(--emerald-light);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-primary);
}

.btn-role-toggle {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-role-toggle:hover {
  background: var(--card-hover);
  border-color: var(--gold-border);
}

/* Admin Quick-Switch Banner on Parent View */
.admin-quick-switch-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-banner-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-banner-info i {
  font-size: 1.8rem;
  color: var(--gold-accent);
}

.admin-banner-info strong {
  display: block;
  font-size: 1rem;
  color: var(--gold-accent);
  margin-bottom: 2px;
}

.admin-banner-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-admin-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  transition: var(--transition);
}

.btn-admin-switch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.btn-dashboard-jump.gold-btn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
}

.btn-dashboard-jump.gold-btn:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* Admin Module Analytics Grid */
.admin-modules-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 1rem;
}

.admin-module-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: var(--transition);
}

.admin-module-stat-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
}

.admin-module-stat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-module-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gold-light);
  color: var(--gold-accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.admin-module-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-module-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.admin-metric-box {
  background: var(--input-bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.admin-metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.admin-metric-val {
  font-weight: 700;
  color: var(--text-main);
}

.admin-module-bar-wrap {
  background: var(--input-bg);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.admin-module-bar-fill {
  background: linear-gradient(90deg, #10b981, #f59e0b);
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* System Health Grid */
.admin-system-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 1rem;
}

.health-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.health-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.health-icon.green {
  background: var(--emerald-light);
  color: var(--emerald-primary);
}

.health-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.health-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

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

.health-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.health-info strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-open,
.modal-backdrop[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.modal-backdrop.is-open .modal-card,
.modal-backdrop[aria-hidden="false"] .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--input-bg);
  color: var(--text-main);
}

.modal-header {
  padding: 28px 28px 16px 28px;
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px auto;
}

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-body {
  padding: 0 28px 28px 28px;
}

/* Auth Modal Specifics */
.btn-google-auth {
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-google-auth:hover {
  background: #f9fafb;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-subtle);
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--card-border);
}

.auth-divider span {
  padding: 0 10px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.2);
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.btn-submit-auth {
  width: 100%;
  background: var(--emerald-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit-auth:hover {
  background: var(--emerald-hover);
}

/* Avatar Picker Grid */
.avatar-selector-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.avatar-opt {
  font-size: 1.5rem;
  background: var(--input-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-opt:hover {
  border-color: var(--emerald-primary);
  transform: scale(1.1);
}

.avatar-opt.active {
  border-color: var(--emerald-primary);
  background: var(--emerald-light);
}

.modal-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-cancel-modal {
  flex: 1;
  background: var(--input-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save-modal {
  flex: 2;
  background: var(--emerald-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
}

/* Learner Modal List */
.learner-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learner-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.learner-select-item:hover {
  border-color: var(--emerald-primary);
  background: var(--card-hover);
}

.learner-select-item.active {
  border: 2px solid var(--emerald-primary);
  background: var(--emerald-light);
}

.learner-modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.btn-parent-portal-link {
  width: 100%;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-parent-portal-link:hover {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

/* ==========================================================================
   Enhanced Auth Tabs, Federated Identity & Multi-Role UI Styles
   ========================================================================== */

/* Auth Mode Tabs (Sign In vs Sign Up) */
.auth-tabs {
  display: flex;
  background: var(--input-bg);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 16px 24px 0 24px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.auth-tab-btn:hover {
  color: var(--text-main);
}

.auth-tab-btn.active {
  background: var(--card-bg);
  color: var(--emerald-primary);
  box-shadow: var(--shadow-sm);
}

/* Federated Social Identity Buttons */
.federated-auth-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.federated-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-federated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-federated:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--emerald-primary);
}

.btn-federated.google:hover {
  background: rgba(66, 133, 244, 0.1);
  border-color: #4285f4;
}

.btn-federated.apple:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.btn-federated.microsoft:hover {
  background: rgba(0, 164, 239, 0.1);
  border-color: #00a4ef;
}

.btn-submit-auth.gold {
  background: var(--gold-accent);
  color: #1a1a1a;
}

/* Auth Alert Banner */
.auth-alert-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.auth-alert-msg.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
}

.auth-alert-msg.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

/* User Account Profile Modal */
.user-profile-card {
  max-width: 440px;
}

.user-avatar-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px auto;
  border: 3px solid var(--gold-accent);
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.3);
}

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

.profile-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.badge-role {
  background: var(--emerald-light);
  color: var(--emerald-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--emerald-primary);
}

.badge-provider {
  background: var(--gold-light);
  color: var(--gold-accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--gold-border);
}

.profile-actions-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.btn-sign-out {
  width: 100%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-sign-out:hover {
  background: #ef4444;
  color: #ffffff;
}

/* PIN Challenge Modal */
.pin-modal-card {
  max-width: 380px;
}

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

.pin-input {
  font-size: 2rem !important;
  letter-spacing: 12px;
  text-align: center;
  width: 180px !important;
  font-weight: 800;
  padding: 10px !important;
}

.pin-error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Admin Dashboard Table Controls */
.admin-filter-controls {
  flex-wrap: wrap;
  gap: 12px;
}

.admin-search-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.admin-search-input {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 36px;
  font-size: 0.88rem;
  min-width: 220px;
}

.admin-role-select {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-action-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 6px;
}

.btn-action-delete:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-action-role {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-role:hover {
  border-color: var(--gold-accent);
  color: var(--gold-accent);
}

/* ==========================================================================
   Homepage Parent Sign In & Sign Up Landing Hero Layout
   ========================================================================== */

.auth-landing-hero {
  padding: 40px 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(6, 78, 59, 0.9));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

.landing-text-col h1 {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin: 14px 0 16px 0;
}

.landing-text-col p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.landing-features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.feature-item i {
  font-size: 1.3rem;
  margin-top: 2px;
}

.feature-item div strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.feature-item div span {
  font-size: 0.84rem;
  color: var(--text-subtle);
}

.btn-guest-browse {
  background: transparent;
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-guest-browse:hover {
  background: var(--gold-light);
  border-color: var(--gold-accent);
}

/* Landing Auth Embedded Card */
.landing-auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.card-header-auth {
  text-align: center;
  margin-bottom: 16px;
}

.auth-card-icon {
  width: 52px;
  height: 52px;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 12px auto;
}

.card-header-auth h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.card-header-auth p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.landing-tabs {
  margin: 12px 0 18px 0;
}

/* Landing Top Navigation Bar */
.landing-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-brand-icon {
  width: 40px;
  height: 40px;
  background: var(--emerald-light);
  color: var(--emerald-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.landing-brand-text strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.landing-brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-landing-nav-guest {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-landing-nav-guest:hover {
  background: var(--card-hover);
  border-color: var(--emerald-primary);
}

.btn-landing-nav-auth {
  background: var(--emerald-primary);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-landing-nav-auth:hover {
  background: var(--emerald-hover);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Landing Trust Strip */
.landing-trust-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 24px 0;
}

.trust-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 600;
}

.trust-badge-pill i {
  color: var(--emerald-primary);
}

.trust-badge-pill.gold i {
  color: var(--gold-accent);
}

.btn-guest-browse.primary-glow {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-guest-browse.primary-glow:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Landing Curriculum Showcase Section */
.landing-section {
  margin-top: 40px;
  padding: 32px 0;
}

.landing-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px auto;
}

.landing-section-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.landing-section-header p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.landing-curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.landing-module-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.landing-module-card:hover {
  border-color: var(--emerald-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.landing-module-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.landing-module-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--emerald-light);
  color: var(--emerald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.landing-module-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}

.landing-module-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.landing-meta-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-muted);
  font-weight: 600;
}

.landing-meta-tag.green {
  background: var(--emerald-light);
  color: var(--emerald-primary);
}

.landing-meta-tag.gold {
  background: var(--gold-light);
  color: var(--gold-accent);
}

.landing-module-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.btn-preview-module {
  width: 100%;
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-preview-module:hover {
  background: var(--emerald-light);
  color: var(--emerald-primary);
  border-color: var(--emerald-primary);
}

/* Why This Portal Matters Pillar Cards */
.landing-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.landing-pillar-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.landing-pillar-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-4px);
}

.pillar-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.pillar-icon-box.emerald {
  background: var(--emerald-light);
  color: var(--emerald-primary);
}

.pillar-icon-box.gold {
  background: var(--gold-light);
  color: var(--gold-accent);
}

.pillar-icon-box.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.landing-pillar-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.landing-pillar-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.pillar-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pillar-checklist li {
  font-size: 0.86rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar-checklist li i {
  color: var(--emerald-primary);
  font-size: 0.9rem;
}

/* Landing Final Call to Action Banner */
.landing-cta-banner {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1200&q=80') center/cover;
  border: 1px solid var(--emerald-hover);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.landing-cta-content {
  max-width: 680px;
  margin: 0 auto;
}

.landing-cta-content h2 {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.landing-cta-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  line-height: 1.6;
}

.landing-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-cta-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  transition: var(--transition);
}

.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Unauthenticated View Layout (Hides Top Header & Sidebar before Login)
   ========================================================================== */

body.unauthenticated-view #sidebar,
body.unauthenticated-view .top-header {
  display: none !important;
}

body.unauthenticated-view .main-content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ==========================================================================
   Mobile Responsive Breakpoints (768px & 480px)
   ========================================================================== */

@media (max-width: 768px) {
  .auth-landing-hero {
    padding: 24px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }

  .landing-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .landing-text-col h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .landing-text-col p {
    font-size: 0.92rem;
    margin-bottom: 18px;
  }

  .landing-features-list {
    gap: 10px;
    margin-bottom: 20px;
  }

  .feature-item {
    padding: 10px 12px;
  }

  .landing-auth-card {
    padding: 20px 16px;
  }

  .federated-btn-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .parent-stats-grid,
  .admin-stats-grid,
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .parent-children-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    max-width: 95vw;
    margin: 10px auto;
  }

  .modal-header {
    padding: 20px 18px 12px 18px;
  }

  .modal-body {
    padding: 0 18px 20px 18px;
  }

  .avatar-selector-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .admin-users-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .admin-controls-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .admin-controls-bar .search-box {
    max-width: 100%;
  }

  .track-answer-toggle {
    flex-direction: column;
  }

  .header-actions .btn-text {
    display: none;
  }

  .header-actions .header-btn {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .auth-landing-hero {
    padding: 18px 12px;
  }

  .landing-text-col h1 {
    font-size: 1.45rem;
  }

  .landing-auth-card {
    padding: 16px 12px;
  }

  .parent-stats-grid,
  .admin-stats-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .avatar-selector-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .btn-federated {
    font-size: 0.82rem;
    padding: 8px 10px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   Password Input UX & Strength Meter
   ========================================================================== */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-input {
  padding-right: 44px;
}

.btn-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-password-toggle:hover {
  color: var(--text-main);
}

.password-strength-container {
  margin-top: 8px;
}

.strength-bar-track {
  width: 100%;
  height: 5px;
  background: var(--input-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--card-border);
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar-fill.weak {
  width: 25%;
  background-color: #ef4444;
}

.strength-bar-fill.fair {
  width: 50%;
  background-color: #f59e0b;
}

.strength-bar-fill.good {
  width: 75%;
  background-color: #3b82f6;
}

.strength-bar-fill.strong {
  width: 100%;
  background-color: #10b981;
}

.strength-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  gap: 8px;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 48px);
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.toast-hiding {
  animation: toastSlideOut 0.25s ease forwards;
}

.toast.success {
  border-left: 4px solid var(--emerald-primary);
}

.toast.celebration {
  border-left: 4px solid var(--gold-accent);
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(217, 119, 6, 0.12) 100%);
}

.toast.info {
  border-left: 4px solid var(--info-border);
}

.toast.error {
  border-left: 4px solid var(--danger-border);
}

.toast-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast.success .toast-icon {
  color: var(--emerald-primary);
}

.toast.celebration .toast-icon {
  color: var(--gold-accent);
}

.toast.info .toast-icon {
  color: var(--info-border);
}

.toast.error .toast-icon {
  color: var(--danger-text);
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-main);
}

.toast-message {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.toast-close-btn:hover {
  color: var(--text-main);
  background: var(--input-bg);
}

.toast-action-btn {
  margin-top: 8px;
  background: var(--card-hover);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toast-action-btn:hover {
  background: var(--emerald-primary);
  color: #ffffff;
  border-color: var(--emerald-hover);
}

/* Form Validation Feedback */
.form-input.is-invalid,
.auth-input.is-invalid {
  border-color: var(--danger-border) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

.form-error-msg {
  color: var(--danger-text);
  font-size: 0.76rem;
  margin-top: 4px;
  display: none;
  font-weight: 500;
}

.form-error-msg.visible {
  display: block;
}

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

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
}

/* ==========================================================================
   Accessibility: Reduced Motion Support (WCAG 2.3.3)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .modal-backdrop,
  .cert-modal-backdrop,
  .modal-card,
  .cert-modal-card,
  .toast,
  .sidebar {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}




