/* ==========================================================================
   Rania Classroom — Student Portal & SQL Infrastructure (Apple HIG Design)
   ========================================================================== */

:root {
  /* Ultra-Luxury Obsidian Velvet & Celestial Cyan Palette */
  --bg-main: #07090e;
  --bg-surface: rgba(14, 18, 30, 0.78);
  --bg-surface-solid: #0e121e;
  --bg-card: rgba(20, 25, 42, 0.65);
  --bg-card-solid: #14192a;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.1);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(0, 229, 255, 0.45);

  --text-primary: #f8fafc;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent Colors */
  --color-primary: #00e5ff;
  --color-primary-hover: #38bdf8;
  --color-primary-glow: rgba(0, 229, 255, 0.35);
  --color-secondary: #8b5cf6;
  --color-secondary-glow: rgba(139, 92, 246, 0.35);
  --color-success: #10b981;
  --color-success-subtle: rgba(16, 185, 129, 0.15);
  --color-warning: #f59e0b;
  --color-warning-subtle: rgba(245, 158, 11, 0.15);
  --color-purple: #a855f7;
  --color-purple-subtle: rgba(168, 85, 247, 0.15);
  --color-gold: #fbbf24;
  --color-gold-glow: rgba(251, 191, 36, 0.35);

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.2);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 980px;

  /* Fonts */
  --font-ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-mono: "Space Mono", monospace;

  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: all 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"], body.light-mode {
  --bg-main: #F8FAFC;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-solid: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-solid: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(0, 0, 0, 0.08);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-card: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(0, 113, 227, 0.35);

  --text-primary: #1d1d1f;
  --text-main: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;

  --color-primary: #0071e3;
  --color-primary-hover: #0077ed;
  --color-primary-glow: rgba(0, 113, 227, 0.2);
  --color-success: #34c759;
  --color-success-subtle: rgba(52, 199, 89, 0.12);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-ui);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Floating Glow Background */
.ambient-glow-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.4;
  will-change: transform;
}

[data-theme="light"] .glow-orb {
  opacity: 0.18;
  filter: blur(110px);
}

.orb-primary {
  width: 580px;
  height: 580px;
  top: -15%;
  left: 10%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.45), rgba(0, 113, 227, 0));
  animation: orbFloat1 24s ease-in-out infinite alternate;
}

.orb-secondary {
  width: 480px;
  height: 480px;
  top: 35%;
  right: 5%;
  background: radial-gradient(circle, rgba(48, 209, 88, 0.35), rgba(48, 209, 88, 0));
  animation: orbFloat2 28s ease-in-out infinite alternate;
}

.orb-accent {
  width: 620px;
  height: 450px;
  bottom: -10%;
  left: 25%;
  background: radial-gradient(circle, rgba(191, 90, 242, 0.3), rgba(0, 113, 227, 0));
  animation: orbFloat3 30s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 60px) scale(1.08); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-45px, -40px) scale(1.06); }
}

@keyframes orbFloat3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -50px) scale(0.95); }
}

/* ==========================================================================
   Navigation Header (Modern Floating Glass Island)
   ========================================================================== */
.portal-navbar {
  position: sticky;
  top: 10px;
  margin: 0.4rem 1rem 0.65rem 1rem;
  z-index: 1000;
  background: var(--bg-surface);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 0.5rem 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, box-shadow 0.3s ease;
}

/* Auto-hide state on scroll down */
.portal-navbar.nav-scrolled-hidden {
  transform: translateY(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
}

/* Level XP Micro Progress Strip */
.nav-xp-strip {
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--border-subtle);
  overflow: hidden;
  pointer-events: none;
}

.nav-xp-strip-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0071e3, #5856d6, #bf5af2);
  border-radius: var(--radius-pill);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.6);
}

.navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: nowrap;
}

/* Brand */
.brand-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-group:hover {
  transform: scale(1.03);
}

.brand-badge, .brand-logo-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.brand-svg-logo {
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 98, 227, 0.4));
  border-radius: 12px;
}

.brand-group:hover .brand-logo-wrap {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 6px 16px rgba(0, 98, 227, 0.6));
}

.stitch-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 98, 227, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(0, 98, 227, 0.28);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.stitch-badge-link:hover {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 98, 227, 0.35);
  transform: translateY(-1px);
}

.brand-sparkle {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.8rem;
  animation: sparkleRotate 3s infinite linear;
}

@keyframes sparkleRotate {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(0.9); }
}

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

.brand-name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Navigation Tabs & Sliding Magnetic Indicator */
.portal-nav-tabs {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-hover);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  isolation: isolate;
  flex-shrink: 1;
}

.portal-nav-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Sliding Magnetic Indicator Pill */
.nav-indicator-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.36s cubic-bezier(0.34, 1.35, 0.64, 1), width 0.32s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

.nav-tab {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent !important;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.nav-tab .tab-icon {
  font-size: 0.98rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab:hover .tab-icon {
  transform: scale(1.18);
}

.nav-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-tab.active .tab-icon {
  transform: scale(1.08);
}

.nav-skill-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(0, 113, 227, 0.16);
  color: var(--color-primary);
  margin-inline-start: 2px;
  letter-spacing: 0.02em;
}

/* Navbar Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Student Active Pill */
.student-active-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.student-active-pill:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 18px var(--color-primary-glow);
  transform: translateY(-1px);
}

.student-avatar-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: transform 0.25s ease;
}

.student-active-pill:hover .student-avatar-wrap {
  transform: scale(1.12);
}

.student-meta-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.student-name-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.student-grade-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.streak-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-warning);
  background: var(--color-warning-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  animation: flameGlow 2.5s infinite ease-in-out;
}

@keyframes flameGlow {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.22); }
}

/* Icon Control Buttons */
.icon-control-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.icon-control-btn:hover {
  border-color: var(--color-primary);
  transform: scale(1.08);
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

/* Language Toggle Button */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-toggle-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

/* ==========================================================================
   Portal Main Content & Views
   ========================================================================== */
.portal-main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  position: relative;
  z-index: 2;
}

.portal-view {
  display: none;
  animation: viewFadeIn 0.35s ease forwards;
}

.portal-view.active {
  display: block;
}

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

/* ==========================================================================
   VIEW 1: Student Dashboard
   ========================================================================== */
.dashboard-hero-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2.2rem;
  box-shadow: var(--shadow-md);
  align-items: center;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(0, 113, 227, 0.12);
  border: 1px solid rgba(0, 113, 227, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.hero-greeting-title {
  font-family: 'Plus Jakarta Sans', var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.hero-greeting-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.62;
  margin-bottom: 1.8rem;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Button Classes (Kinetic Academy Tactile 3D Styling) */
.primary-glow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.8rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', var(--font-ui);
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 0 #004bb0, 0 6px 16px rgba(0, 98, 227, 0.25);
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s;
}

.primary-glow-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #004bb0, 0 8px 20px rgba(0, 98, 227, 0.35);
}

.primary-glow-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #004bb0, 0 2px 6px rgba(0, 98, 227, 0.2);
}

.secondary-glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.8rem;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border-card);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.secondary-glass-btn:hover {
  background: var(--bg-card-solid);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.success-glow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.8rem;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  color: #051a0c;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px var(--color-success-subtle);
}

.success-glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(48, 209, 88, 0.4);
}

/* Student Level & XP Card */
.student-level-card {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.level-badge-large {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  color: #1a1200;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px var(--color-gold-glow);
}

.level-info-col {
  flex: 1;
}

.level-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.level-rank-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.level-xp-counter {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.xp-progress-bar-wrap {
  width: 100%;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.xp-progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-primary), #bf5af2);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.level-footer-tip {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* KPI Grid */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.2rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: var(--transition-smooth);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.icon-blue, .kpi-icon-wrap.blue { background: rgba(0, 113, 227, 0.15); color: #0071e3; }
.icon-green, .kpi-icon-wrap.green { background: rgba(48, 209, 88, 0.15); color: #30d158; }
.icon-purple, .kpi-icon-wrap.purple { background: rgba(191, 90, 242, 0.15); color: #bf5af2; }
.icon-orange, .kpi-icon-wrap.amber { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
.kpi-icon-wrap.red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.kpi-details {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Spotlight Search Capsule */
.search-capsule-section {
  margin-bottom: 2.8rem;
}

.search-capsule-box {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.search-capsule-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.22), var(--shadow-md);
}

.search-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
  margin-right: 0.85rem;
  flex-shrink: 0;
}

.search-capsule-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.98rem;
  color: var(--text-primary);
  font-family: var(--font-ui);
}

.search-capsule-box input::placeholder {
  color: var(--text-muted);
}

.kbd-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-card);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--text-secondary);
  user-select: none;
}

/* Section Header in Dashboard */
.dash-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.text-link-btn {
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.text-link-btn:hover {
  text-decoration: underline;
  transform: translateX(3px);
}

/* Dash Tracks Grid Preview */
.dash-tracks-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.4rem;
}

/* ==========================================================================
   VIEW 2: Curriculum Tracks View
   ========================================================================== */
.view-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2.4rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.view-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.view-main-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 600;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.view-lead-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 780px;
}

/* Segmented Control Component */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-hover);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.segmented-btn {
  padding: 0.42rem 1.15rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

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

.segmented-btn.active {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Teacher Track Cards */
.teacher-tracks-container {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
}

.teacher-track-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.4rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.teacher-track-card:hover {
  border-color: var(--border-hover);
}

.track-header {
  margin-bottom: 1.4rem;
}

.track-badge-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.subject-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 113, 227, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(0, 113, 227, 0.25);
  font-weight: 700;
}

.level-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.track-title {
  font-family: var(--font-serif);
  font-size: 1.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.track-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 820px;
}

.teacher-tip-callout {
  background: rgba(48, 209, 88, 0.08);
  border-left: 4px solid var(--color-success);
  padding: 1rem 1.4rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.3rem 0 1.8rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.track-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.4rem;
}

.unit-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

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

.unit-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.unit-num-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(0, 113, 227, 0.12);
  border: 1px solid rgba(0, 113, 227, 0.22);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.unit-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.unit-objective {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.unit-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.1rem;
}

.unit-skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  gap: 0.75rem;
  transition: var(--transition-smooth);
}

.unit-skill-row:hover {
  border-color: var(--color-primary);
}

.unit-skill-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.unit-skill-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-skill-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--color-primary);
  font-weight: 700;
}

.learn-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 1.05rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.learn-pill-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px) scale(1.03);
}

/* ==========================================================================
   VIEW 3: Skills Bank Explorer (24,792 Skills)
   ========================================================================== */
.skills-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.spotlight-input-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.58rem 1.2rem;
  transition: var(--transition-smooth);
}

.spotlight-input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.spotlight-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: var(--font-ui);
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.skills-browser-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.grades-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.sidebar-header-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 0 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.65rem;
}

.grades-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.grade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.grade-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.grade-item.active {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.grade-item .count-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  opacity: 0.8;
}

/* Skills Content Canvas */
.skills-content-canvas {
  min-width: 0;
}

.canvas-header-info {
  margin-bottom: 1.5rem;
}

.canvas-header-info h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--text-primary);
}

.canvas-header-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.skill-category-block {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.category-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  user-select: none;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.category-header-row:hover {
  background: var(--bg-active);
}

.cat-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cat-code-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}

.cat-name-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cat-skills-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.skills-list-grid {
  display: flex;
  flex-direction: column;
}

.skill-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
  transition: var(--transition-smooth);
}

.skill-row-card:last-child {
  border-bottom: none;
}

.skill-row-card:hover {
  background: var(--bg-hover);
}

.skill-row-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.skill-number-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  width: 48px;
  flex-shrink: 0;
}

.skill-title-name {
  font-size: 0.94rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-row-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.permacode-pill {
  display: none !important;
}

.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-smooth);
}

.action-icon-btn:hover {
  color: var(--color-primary);
}

.action-icon-btn.favorited {
  color: #ffcc00;
}

.action-icon-btn.mastered {
  color: var(--color-success);
}

.learn-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1.15rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', var(--font-ui);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 0 #004bb0, 0 4px 10px rgba(0, 98, 227, 0.25);
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s;
}

.learn-pill-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #004bb0, 0 6px 14px rgba(0, 98, 227, 0.35);
}

.learn-pill-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #004bb0, 0 2px 4px rgba(0, 98, 227, 0.2);
}

/* ==========================================================================
   VIEW 4: Student Performance Reports & Analytics (Key Requirement)
   ========================================================================== */
.printable-report-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.report-student-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.report-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.2), rgba(191, 90, 242, 0.2));
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  box-shadow: 0 6px 24px var(--color-primary-glow);
}

.report-student-info {
  flex: 1;
  min-width: 260px;
}

.report-student-name {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.report-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
}

.tag-badge.badge-primary {
  background: rgba(0, 113, 227, 0.15);
  color: var(--color-primary);
  border-color: rgba(0, 113, 227, 0.3);
}

.tag-badge.badge-streak {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
  border-color: rgba(255, 159, 10, 0.3);
}

.report-timestamp-box {
  text-align: right;
}

.report-date-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.report-date-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

/* Report Metrics Grid */
.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.metric-box {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.text-success { color: var(--color-success) !important; }
.text-gold { color: var(--color-gold) !important; }

.metric-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Report Section Blocks */
.report-section-block {
  margin-bottom: 2.5rem;
}

.report-block-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}

.block-header-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.record-counter-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Subject Progress Grid */
.subject-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.subject-progress-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.subj-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.subj-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.subj-acc-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-success);
}

.subj-bar-bg {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.subj-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
}

.subj-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Badges Showcase Grid */
.badges-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.badge-item-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.badge-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.badge-item-info {
  display: flex;
  flex-direction: column;
}

.badge-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* History Log Table */
.history-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-solid);
}

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

.history-table th {
  padding: 0.95rem 1.15rem;
  background: var(--bg-hover);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-card);
}

.history-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

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

.history-table tr:hover td {
  background: var(--bg-hover);
}

.status-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-mastered {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.status-proficient {
  background: rgba(0, 113, 227, 0.15);
  color: var(--color-primary);
}

.status-developing {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
}

/* ==========================================================================
   VIEW 5: Leaderboard
   ========================================================================== */
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.leaderboard-table-wrap {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table th {
  padding: 1rem 1.4rem;
  background: var(--bg-hover);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-card);
}

.leaderboard-table td {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

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

.rank-cell {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
}

.student-leader-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.leader-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.leader-name {
  font-weight: 600;
  font-size: 0.98rem;
}

/* ==========================================================================
   Practice Modal Window
   ========================================================================== */
.practice-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.practice-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.practice-modal-window {
  width: 100%;
  max-width: 920px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  animation: modalPopUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.practice-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.8rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-hover);
  gap: 1.5rem;
}

.practice-skill-header-info {
  flex: 1;
  min-width: 0;
}

.practice-skill-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 4px;
}

.practice-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Dedicated Tool Palette Strip */
.practice-toolbar-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.65rem 1.8rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.practice-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.skill-code-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(0, 113, 227, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 6px;
}

.skill-subject-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.practice-skill-heading {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

.practice-hud-metrics {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hud-item.highlight .hud-val {
  color: var(--color-success);
}

.modal-close-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: #f87171;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.modal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.1);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

.practice-modal-body {
  padding: 2rem 2.2rem;
  overflow-y: auto;
  flex: 1;
}

.question-container {
  margin-bottom: 1.8rem;
}

.question-text {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 1rem;
  white-space: pre-line;
}

.question-visual-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1.25rem;
  background: var(--bg-hover);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
  font-size: 1.75rem;
}

.options-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

@media (max-width: 640px) {
  .options-container {
    grid-template-columns: 1fr;
  }
}

.option-choice-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 58px;
}

.option-choice-btn:hover {
  border-color: var(--color-primary);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.option-choice-btn.selected {
  border-color: var(--color-primary);
  background: rgba(0, 113, 227, 0.15);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.option-choice-btn.correct {
  border-color: var(--color-success) !important;
  background: rgba(48, 209, 88, 0.18) !important;
}

.option-choice-btn.incorrect {
  border-color: #ff453a !important;
  background: rgba(255, 69, 58, 0.18) !important;
}

.practice-feedback-banner {
  padding: 1.4rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

.practice-feedback-banner.success {
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid var(--color-success);
}

.practice-feedback-banner.failure {
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid #ff453a;
}

.feedback-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.explanation-content {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.practice-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.2rem 2.2rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-hover);
}

/* ==========================================================================
   Authentication Modal
/* Auth Lock Gate: completely hide the app when unauthenticated */
body.auth-locked #portalNavbar,
body.auth-locked #portalSidebar,
body.auth-locked #sidebarBackdrop,
body.auth-locked #mainContentWrapper,
body.auth-locked .ambient-glow-background {
  display: none !important;
}

/* =============================================================================
   WORLD-CLASS ANIMATED LOGIN AURORA, COSMOS & TOP GAINERS SHOWCASE
   ============================================================================= */

.login-aurora-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2040;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #0c1224 0%, #050811 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

body.auth-locked .login-aurora-bg {
  opacity: 1;
  visibility: visible;
}

/* Glowing Fluid Aurora Orbs */
.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  opacity: 0.65;
  pointer-events: none;
}

.aurora-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.45) 0%, rgba(0, 102, 255, 0.15) 60%, transparent 80%);
  top: -150px;
  left: -150px;
  animation: auroraFloat1 18s ease-in-out infinite alternate;
}

.aurora-orb-2 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.45) 0%, rgba(99, 102, 241, 0.15) 60%, transparent 80%);
  bottom: -200px;
  right: -150px;
  animation: auroraFloat2 22s ease-in-out infinite alternate;
}

.aurora-orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(236, 72, 153, 0.15) 60%, transparent 80%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: auroraFloat3 15s ease-in-out infinite alternate;
}

@keyframes auroraFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 80px) scale(1.15); }
  100% { transform: translate(40px, 140px) scale(0.9); }
}

@keyframes auroraFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -90px) scale(1.2); }
  100% { transform: translate(-50px, -40px) scale(0.95); }
}

@keyframes auroraFloat3 {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  50% { transform: translate(-40%, -60%) scale(1.15) rotate(45deg); }
  100% { transform: translate(-60%, -40%) scale(0.85) rotate(-30deg); }
}

/* Perspective Cyber Grid Overlay */
.login-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 0%, transparent 75%);
}

/* Floating Math & Science Symbols Layer */
.floating-symbols-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-symbol {
  position: absolute;
  font-family: 'Space Mono', monospace, sans-serif;
  font-weight: 700;
  user-select: none;
  opacity: 0.22;
  transition: opacity 0.3s ease;
  animation: floatDrift 16s ease-in-out infinite alternate;
}

.float-s1 { top: 12%; left: 8%; font-size: 2.2rem; color: #00e5ff; animation-duration: 14s; }
.float-s2 { top: 22%; left: 22%; font-size: 1.8rem; color: #a855f7; animation-duration: 18s; animation-delay: -2s; }
.float-s3 { top: 70%; left: 10%; font-size: 1.7rem; color: #fbbf24; animation-duration: 20s; animation-delay: -5s; }
.float-s4 { top: 82%; left: 25%; font-size: 1.5rem; color: #34d399; animation-duration: 16s; animation-delay: -3s; }
.float-s5 { top: 15%; right: 12%; font-size: 2rem; color: #38bdf8; animation-duration: 15s; animation-delay: -4s; }
.float-s6 { top: 30%; right: 24%; font-size: 1.3rem; color: #f43f5e; animation-duration: 22s; animation-delay: -1s; }
.float-s7 { top: 65%; right: 15%; font-size: 1.9rem; color: #fbbf24; animation-duration: 17s; animation-delay: -7s; }
.float-s8 { top: 80%; right: 28%; font-size: 1.6rem; color: #a855f7; animation-duration: 19s; animation-delay: -6s; }
.float-s9 { top: 45%; left: 5%; font-size: 1.8rem; color: #f59e0b; animation-duration: 21s; animation-delay: -8s; }
.float-s10 { top: 50%; right: 6%; font-size: 1.7rem; color: #06b6d4; animation-duration: 18s; animation-delay: -9s; }

@keyframes floatDrift {
  0% { transform: translateY(0px) rotate(0deg); opacity: 0.18; }
  50% { transform: translateY(-30px) rotate(8deg); opacity: 0.35; text-shadow: 0 0 15px currentColor; }
  100% { transform: translateY(20px) rotate(-8deg); opacity: 0.18; }
}

/* Animated Login Cosmos Canvas */
#loginCosmosCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2050;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

body.auth-locked #loginCosmosCanvas {
  opacity: 1;
  visibility: visible;
}

/* Auth Modal Backdrop & Stage */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(6, 9, 19, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.75rem 1rem 3rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.auth-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Live Leaderboard Ticker Banner */
.login-ticker-banner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto 1.15rem;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 9999px;
  padding: 0.4rem 0.6rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.12);
  overflow: hidden;
  animation: modalPopUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticker-badge {
  background: linear-gradient(135deg, #00e5ff 0%, #6366f1 100%);
  color: #030712;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulseDot 1.5s ease infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

.ticker-track-wrap {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}

.ticker-track {
  display: inline-flex;
  gap: 2.5rem;
  padding-left: 1.5rem;
  animation: tickerMarquee 32s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #e2e8f0;
  font-weight: 500;
}

.ticker-item strong {
  color: #ffffff;
}

.ticker-item .ticker-xp {
  color: #38bdf8;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

.ticker-item .ticker-skill {
  color: #fbbf24;
  font-size: 0.76rem;
}

body.auth-locked #authModal {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: flex !important;
}

/* Universal scrollbar elimination inside Login Portal Stage */
#authModal,
#authModal * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#authModal::-webkit-scrollbar,
#authModal *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* 3-Column Portal Stage */
.auth-portal-stage {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.15rem;
  width: 100%;
  max-width: 1240px;
}

/* Side Showcase Panels (Top Gainers & Mastered Topics) */
.auth-showcase-panel {
  flex: 1;
  max-width: 360px;
  min-width: 280px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  max-height: 480px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: modalPopUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-showcase-panel:hover {
  border-color: rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 229, 255, 0.12);
}

.showcase-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.showcase-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.showcase-title {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.showcase-subtitle {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 1px;
}

.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden !important;
  max-height: 380px;
  padding-right: 2px;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.showcase-list::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Student Gainer List Item (Clean 2-line layout) */
.gainer-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.gainer-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateX(3px);
}

.gainer-rank {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.gainer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.gainer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gainer-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gainer-name {
  font-weight: 700;
  font-size: 0.8rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gainer-xp-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gainer-sub-line {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gainer-topic-tag {
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mastered Topic List Item */
.topic-card {
  padding: 0.6rem 0.8rem;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.topic-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(3px);
}

.topic-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.topic-title {
  font-weight: 700;
  font-size: 0.78rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.topic-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.topic-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.topic-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #00e5ff, #6366f1);
}

.topic-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Responsive Layout for Tablet & Mobile Displays */
@media (max-width: 1024px) {
  .auth-showcase-panel {
    display: none !important;
  }
  .auth-portal-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    gap: 0 !important;
  }
  .login-ticker-banner {
    max-width: 480px !important;
    width: 100% !important;
  }
  .login-curriculum-bar {
    max-width: 480px !important;
    width: 100% !important;
  }
  .login-contact-footer {
    max-width: 480px !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .auth-modal-backdrop {
    padding: 0.75rem 0.5rem 2rem !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .login-ticker-banner {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 12px !important;
    padding: 0.35rem 0.5rem !important;
    margin-bottom: 0.6rem !important;
  }
  .ticker-badge {
    font-size: 0.65rem !important;
    padding: 0.22rem 0.55rem !important;
  }
  .ticker-item {
    font-size: 0.72rem !important;
  }
  .auth-portal-stage {
    width: 100% !important;
    max-width: 100% !important;
  }
  .auth-modal-window {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7) !important;
  }
  .auth-modal-header,
  .auth-login-header {
    padding: 1.25rem 1rem 0.85rem !important;
  }
  .auth-modal-header h2,
  .auth-login-header h2 {
    font-size: 1.25rem !important;
  }
  .auth-tab-content,
  #authTabLogin {
    padding: 1.15rem 0.85rem 1.35rem !important;
  }
  .auth-form .form-group input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    padding: 0.7rem 0.85rem !important;
  }
  .login-curriculum-bar {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0.85rem 0.75rem !important;
    border-radius: 16px !important;
    margin-top: 0.65rem !important;
  }
  .curriculum-bar-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  .curriculum-bar-grid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
  }
  .curriculum-bar-card {
    padding: 0.65rem 0.75rem !important;
  }
  .login-contact-footer {
    max-width: 100% !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.4rem !important;
    margin-top: 0.65rem !important;
  }
  .contact-pill {
    justify-content: center !important;
    width: 100% !important;
    font-size: 0.78rem !important;
    padding: 0.45rem 0.75rem !important;
  }

  /* Internal Grid and Card Mobile Stacking */
  .dash-tracks-preview-grid,
  .teacher-kpi-grid,
  .teacher-columns-grid,
  .assignments-grid,
  .assignments-teacher-grid,
  .teacher-nav-groups-container,
  .demo-students-grid {
    grid-template-columns: 1fr !important;
  }

  /* Modal Mobile Safety */
  .practice-modal-backdrop {
    padding: 0.5rem !important;
  }
  .practice-modal-window {
    max-height: 96vh !important;
    border-radius: 16px !important;
  }
  .practice-modal-header {
    padding: 0.75rem 1rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .practice-modal-body {
    padding: 0.85rem !important;
  }
  .cert-container {
    padding: 1.25rem 0.85rem !important;
    border-width: 6px !important;
    outline-width: 2px !important;
    outline-offset: -4px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Header & Navbar Mobile Optimization */
  #topTeacherQuickBtn {
    display: none !important;
  }
  #portalNavbar .h-20 {
    height: 4.25rem !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }
  #brandHomeBtn .text-base {
    font-size: 0.88rem !important;
  }
  #brandHomeBtn .w-9 {
    width: 2.1rem !important;
    height: 2.1rem !important;
  }
  #sidebarToggleBtn {
    width: 2.1rem !important;
    height: 2.1rem !important;
  }
  #topSearchIconBtn {
    width: 2.1rem !important;
    height: 2.1rem !important;
  }
  #studentProfilePill {
    padding: 0.25rem 0.5rem !important;
  }
  #studentProfilePill #navStudentAvatar {
    width: 1.6rem !important;
    height: 1.6rem !important;
    font-size: 0.8rem !important;
  }
  #studentProfilePill #navStudentLevel {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.45rem !important;
  }
  .portal-main-content > div {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    padding-top: 1rem !important;
  }
}

/* The Main Center Login Modal Window */
.auth-modal-window {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 24px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 229, 255, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden !important;
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2110;
  animation: modalPopUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.auth-modal-window::-webkit-scrollbar,
.auth-tab-content::-webkit-scrollbar,
.auth-form::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.auth-tab-content,
.auth-form {
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* WhatsApp 1-Click Button */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: #25D366;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  border: none;
  cursor: pointer;
}
.whatsapp-btn:hover {
  background: #20ba5a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
}

/* Payment Status Badges */
.payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.payment-badge.paid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.payment-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.payment-badge.overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Receipt Preview Card & Thumbnail */
.receipt-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.receipt-thumb:hover {
  transform: scale(1.08);
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.auth-login-header {
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 1.75rem 1.5rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.15) 0%, transparent 70%);
}

.auth-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-hover);
  padding: 0 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.8rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
  text-align: center;
}

.auth-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: var(--bg-surface-solid);
}

.auth-tab-content {
  display: none;
  padding: 1.8rem 2rem 2.2rem;
}

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

/* Demo Students Grid */
.demo-intro-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.demo-students-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.demo-student-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.demo-student-card:hover {
  border-color: var(--color-primary);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.demo-avatar {
  font-size: 1.6rem;
}

.demo-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.demo-grade {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* Auth Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  flex: 1;
}

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

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.form-group input, .form-group select {
  padding: 0.6rem 0.85rem;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.875rem;
  font-family: var(--font-ui);
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: #243247;
}

.form-group input::placeholder {
  color: #64748b;
}

.form-group select option {
  background: #1e293b;
  color: #ffffff;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-row > .form-group {
  flex: 1 1 160px;
  min-width: 140px;
}

.avatar-selection-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.avatar-option-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border-card);
  background: var(--bg-card);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option-btn.selected {
  border-color: var(--color-primary);
  background: rgba(0, 113, 227, 0.2);
  transform: scale(1.1);
}

.full-width {
  width: 100%;
}

.form-error-msg {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid #ff453a;
  color: #ff453a;
  font-size: 0.84rem;
}

.demo-tip {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.4rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: slideUp 0.3s ease;
}

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

/* ==========================================================================
   Print Styles (Official Report Card Export)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .portal-navbar, .ambient-glow-background, .report-actions-row, .practice-modal-backdrop, .auth-modal-backdrop, .toast-notification {
    display: none !important;
  }
  .portal-main-content {
    padding: 0 !important;
  }
  .printable-report-card {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #000000 !important;
  }
  .metric-box, .subject-progress-card, .badge-item-card, .history-table-wrapper {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
  }
  .report-student-name, .metric-num, .subj-name, .badge-item-name, .history-table td {
    color: #000000 !important;
  }
  .history-table th {
    background: #f0f0f0 !important;
    color: #333333 !important;
  }
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .dashboard-hero-card {
    grid-template-columns: 1fr;
    padding: 1.8rem;
  }
  .skills-browser-layout {
    grid-template-columns: 1fr;
  }
  .grades-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .demo-students-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   VIEW 6: Teacher Console & Admin Styles
   ========================================================================== */
.teacher-nav-tab {
  background: rgba(175, 82, 222, 0.12) !important;
  color: #bf5af2 !important;
  border: 1px solid rgba(175, 82, 222, 0.25) !important;
}

.teacher-nav-tab.active {
  background: #af52de !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(175, 82, 222, 0.35) !important;
}

.teacher-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.teacher-columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.teacher-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.teacher-skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  gap: 1rem;
}

.teacher-skill-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.teacher-skill-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-primary);
  font-weight: 700;
}

.teacher-skill-title {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.teacher-skill-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.accuracy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
}

.accuracy-pill.green {
  background: rgba(52, 199, 89, 0.15);
  color: #30d158;
}

.accuracy-pill.amber {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

.accuracy-pill.orange {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

.action-btn-sm {
  padding: 0.22rem 0.52rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-card, #e2e8f0);
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1.2;
}

.action-btn-sm .btn-icon {
  font-size: 0.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.action-btn-sm:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.action-btn-sm.print:hover {
  background: #30d158;
  border-color: #30d158;
  color: #ffffff;
}

.action-btn-sm.edit {
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.28);
  background: rgba(2, 132, 199, 0.04);
}

.action-btn-sm.edit:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.action-btn-sm.key {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(217, 119, 6, 0.04);
}

.action-btn-sm.key:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #ffffff;
}

.action-btn-sm.delete {
  color: var(--color-danger, #ef4444);
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.03);
}

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

.actions-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Quick Teacher Login Card in Auth Modal */
.teacher-quick-login-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(175, 82, 222, 0.14), rgba(0, 113, 227, 0.08));
  border: 1px solid rgba(175, 82, 222, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.teacher-quick-login-card:hover {
  background: linear-gradient(135deg, rgba(175, 82, 222, 0.22), rgba(0, 113, 227, 0.14));
  border-color: #af52de;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(175, 82, 222, 0.25);
}

.teacher-avatar-badge {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(175, 82, 222, 0.2);
  border-radius: var(--radius-sm);
}

.teacher-quick-info {
  flex: 1;
}

.teacher-quick-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
}

.teacher-quick-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.teacher-quick-badge-btn {
  background: #af52de;
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(175, 82, 222, 0.3);
}

.teacher-auth-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.teacher-icon-huge {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.teacher-auth-intro h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.teacher-auth-intro p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}

.teacher-fast-login-btn {
  background: linear-gradient(135deg, #af52de, #5856d6) !important;
  margin-bottom: 1rem;
}

.teacher-fast-login-btn:hover {
  background: linear-gradient(135deg, #bf5af2, #5e5ce6) !important;
  box-shadow: 0 6px 20px rgba(175, 82, 222, 0.4) !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 1.2rem 0;
}

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

.auth-divider span {
  padding: 0 0.8rem;
}

/* ==========================================================================
   INTERACTIVE FEATURES: Scratchpad, Audio, Assignments, Confetti & Input Types
   ========================================================================== */

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* Assignments Dashboard Section */
.assignments-dashboard-section {
  margin: 2.2rem 0;
  padding: 1.6rem 1.8rem;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(175, 82, 222, 0.05));
  border: 1px solid rgba(0, 113, 227, 0.25);
  border-radius: var(--radius-lg);
  position: relative;
}

.assignment-count-pill {
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

.assignments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.assignment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: var(--transition-smooth);
}

.assignment-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.assignment-card.completed {
  border-color: rgba(52, 199, 89, 0.4);
  background: linear-gradient(135deg, var(--bg-card), rgba(52, 199, 89, 0.05));
}

.assign-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assign-skill-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
}

.assign-due-badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

.assign-due-badge.completed {
  background: rgba(52, 199, 89, 0.15);
  color: #30d158;
}

.assign-skill-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.assign-instructions {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.assign-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-card);
}

/* Teacher Assignments Manager */
.assignments-teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.teacher-assign-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.progress-track-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 0.4rem 0;
}

.progress-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #30d158);
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}

/* Practice Toolbar Actions */
.practice-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.practice-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.practice-tool-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.practice-tool-btn.active {
  background: #ff9f0a !important;
  color: #ffffff !important;
  border-color: #ff9f0a !important;
  box-shadow: 0 0 10px rgba(255, 159, 10, 0.4);
}

.practice-tool-btn.speaking {
  animation: pulseSpeaking 1s infinite alternate;
  background: var(--color-primary) !important;
  color: #ffffff !important;
}

@keyframes pulseSpeaking {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 113, 227, 0.4); }
  100% { transform: scale(1.05); box-shadow: 0 0 14px rgba(0, 113, 227, 0.7); }
}

/* Scratchpad Interactive Overlay */
.scratchpad-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  background: rgba(18, 18, 20, 0.82);
  backdrop-filter: blur(4px);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.scratchpad-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(30, 30, 34, 0.95);
  border-bottom: 1px solid var(--border-card);
  gap: 0.8rem;
  flex-wrap: wrap;
}

.scratchpad-tool-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sp-tool-btn {
  padding: 0.35rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sp-tool-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.scratchpad-colors {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sp-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 2px solid transparent;
}

.sp-color:hover {
  transform: scale(1.15);
}

.sp-color.active {
  border-color: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}

.scratchpad-width-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sp-width-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

.sp-width-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.sp-tool-btn.close-btn {
  margin-left: auto;
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
  border-color: rgba(255, 69, 58, 0.3);
}

#scratchpadCanvas {
  flex: 1;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* Fill-in-the-Blank Question Type */
.fill-in-container {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.fill-in-box-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.6rem 0.4rem 1.4rem;
  width: 100%;
  max-width: 420px;
  transition: var(--transition-smooth);
}

.fill-in-box-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2);
}

.fill-in-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.fill-in-submit-pill {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.fill-in-submit-pill:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.fill-in-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* True / False Interactive Cards */
.true-false-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.tf-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.8rem 1.2rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tf-icon {
  font-size: 2.2rem;
}

.tf-label {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.tf-card.true-card:hover {
  border-color: #30d158;
  background: rgba(52, 199, 89, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.25);
}

.tf-card.false-card:hover {
  border-color: #ff453a;
  background: rgba(255, 69, 58, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 69, 58, 0.25);
}

.tf-card.selected.true-card {
  border-color: #30d158;
  background: rgba(52, 199, 89, 0.22);
}

.tf-card.selected.false-card {
  border-color: #ff453a;
  background: rgba(255, 69, 58, 0.22);
}

.options-container.two-col-grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.option-choice-btn.tf-true-btn {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #30d158;
}

.option-choice-btn.tf-true-btn:hover {
  border-color: #30d158;
  background: rgba(48, 209, 88, 0.12);
}

.option-choice-btn.tf-false-btn {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ff453a;
}

.option-choice-btn.tf-false-btn:hover {
  border-color: #ff453a;
  background: rgba(255, 69, 58, 0.12);
}

.prompt-visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ==========================================================================
   Bilingual Support & RTL Direction Styles
   ========================================================================== */

[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[dir="rtl"] .logo-text-group,
[dir="rtl"] .nav-links-list,
[dir="rtl"] .user-meta-group,
[dir="rtl"] .stat-pill,
[dir="rtl"] .card-header-flex,
[dir="rtl"] .practice-header-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-stat-badge,
[dir="rtl"] .search-icon {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .nav-item-link {
  text-align: right;
}

[dir="rtl"] .practice-tool-btn,
[dir="rtl"] .primary-glow-btn,
[dir="rtl"] .secondary-glass-btn {
  flex-direction: row-reverse;
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-toggle-btn:hover {
  border-color: var(--color-primary);
  background: var(--bg-hover);
}

/* ==========================================================================
   Classroom Interactive Tools (Calculator, Number Line, Fraction Model)
   ========================================================================== */

.classroom-tool-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 320px;
  background: rgba(22, 22, 28, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  z-index: 1050;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] .classroom-tool-panel {
  right: auto;
  left: 2rem;
}

.tool-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-subtle);
}

.tool-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tool-panel-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.tool-panel-close:hover {
  color: #ff453a;
  background: rgba(255, 69, 58, 0.15);
}

.tool-panel-content {
  padding: 1rem;
}

/* Calculator Specific */
.calc-display {
  width: 100%;
  height: 52px;
  background: #0a0a0e;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: #30d158;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  text-align: right;
  padding: 0 0.8rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.calc-btn {
  padding: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.calc-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-card);
}

.calc-btn.op {
  color: var(--color-primary);
  background: rgba(0, 113, 227, 0.15);
}

.calc-btn.eq {
  background: var(--color-primary);
  color: #ffffff;
  grid-column: span 2;
}

.calc-btn.clear {
  color: #ff453a;
  background: rgba(255, 69, 58, 0.15);
}

/* Interactive Number Line Specific */
.number-line-container {
  padding: 0.5rem 0;
}

.number-line-axis {
  position: relative;
  height: 60px;
  border-bottom: 3px solid var(--color-primary);
  margin: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.nl-tick {
  position: relative;
  width: 2px;
  height: 14px;
  background: var(--text-secondary);
}

.nl-tick.major {
  height: 22px;
  background: var(--text-primary);
  width: 3px;
}

.nl-label {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.nl-pointer {
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 20px;
  background: #ffd60a;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  box-shadow: 0 0 12px rgba(255, 214, 10, 0.6);
  cursor: grab;
  transition: left 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nl-controls {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

/* Fraction Visualizer Specific */
.fraction-viz-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  align-items: center;
}

.fraction-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 70px;
}

.fraction-input-box {
  width: 100%;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-main);
  color: var(--text-primary);
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.fraction-bar-preview {
  display: flex;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-primary);
  overflow: hidden;
  margin-top: 0.5rem;
}

.fraction-slice {
  flex: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
}

.fraction-slice.active {
  background: linear-gradient(135deg, #0071e3, #64d2ff);
}

.fraction-slice.empty {
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Mastery Certificate Modal & Print System
   ========================================================================== */

.cert-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1200;
  padding: 1.5rem;
}

.cert-modal-backdrop.open {
  display: flex;
}

.cert-container {
  width: 820px;
  max-width: 95vw;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 3rem 2.5rem;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  border: 12px solid #dfb15b;
  outline: 3px solid #b8860b;
  outline-offset: -8px;
  background-image: radial-gradient(#faf6ee 15%, transparent 16%), radial-gradient(#faf6ee 15%, #ffffff 16%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}

.cert-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cert-seal {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.cert-title-top {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 800;
  color: #8b6508;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.cert-subtitle {
  font-size: 1.05rem;
  color: #555555;
  font-weight: 600;
}

.cert-body {
  text-align: center;
  margin: 2rem 0;
}

.cert-recipient-label {
  font-size: 1.1rem;
  color: #666666;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.cert-student-name {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: #0b3c5d;
  border-bottom: 2px solid #dfb15b;
  display: inline-block;
  padding: 0 2rem 0.3rem 2rem;
  margin-bottom: 1.2rem;
}

.cert-reason {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #333333;
  max-width: 600px;
  margin: 0 auto;
}

.cert-skill-highlight {
  font-weight: 700;
  color: #8b6508;
}

.cert-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.cert-sign-col {
  text-align: center;
  width: 220px;
}

.cert-sign-line {
  border-bottom: 1.5px solid #444444;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  font-family: "Brush Script MT", cursive, sans-serif;
  font-size: 1.6rem;
  color: #0b3c5d;
}

.cert-sign-title {
  font-size: 0.85rem;
  color: #666666;
  font-weight: 600;
}

.cert-badge-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 85px;
  height: 85px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe57f, #dfb15b);
  border: 3px solid #b8860b;
  color: #4a3800;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(223, 177, 91, 0.4);
}

.cert-actions-bar {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Responsive Mobile Navigation */
/* Responsive Navigation Styles */
@media (max-width: 1080px) {
  .brand-tagline {
    display: none;
  }
  .student-grade-label {
    display: none;
  }
}

@media (max-width: 768px) {
  .portal-navbar {
    top: 6px;
    margin: 0.25rem 0.4rem 0.5rem 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: 18px;
  }

  .navbar-inner {
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: space-between;
    align-items: center;
  }

  .brand-group {
    order: 1;
    flex-shrink: 0;
    gap: 0.4rem;
  }

  .brand-badge {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .brand-name {
    font-size: 0.78rem;
    letter-spacing: 0.01em;
  }

  .navbar-actions {
    order: 2;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  .student-active-pill {
    padding: 0.2rem 0.4rem;
    gap: 0.3rem;
  }

  .student-active-pill .student-meta-text {
    display: none;
  }

  .student-avatar-wrap {
    width: 22px;
    height: 22px;
    font-size: 0.9rem;
  }

  .streak-badge {
    font-size: 0.68rem;
    padding: 1px 4px;
  }

  .lang-toggle-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
  }

  .icon-control-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .portal-nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding: 3px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tab {
    padding: 0.32rem 0.58rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }

  .nav-tab .tab-icon {
    font-size: 0.88rem;
  }

  .nav-xp-strip {
    left: 12px;
    right: 12px;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }
  .cert-modal-backdrop,
  .cert-container,
  .cert-container * {
    visibility: visible !important;
  }
  .cert-modal-backdrop {
    position: absolute;
    inset: 0;
    background: transparent !important;
    padding: 0;
    display: block !important;
  }
  .cert-container {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
  }
  .cert-actions-bar {
    display: none !important;
  }
}


/* Stitch Kinetic Academy Canvas Enhancements */
[data-theme="light"] .ambient-glow-background,
body.light-mode .ambient-glow-background {
  display: none !important;
}

[data-theme="light"] {
  background-color: #F8FAFC !important;
}

[data-theme="light"] body {
  background-color: #F8FAFC !important;
}

/* Sidebar RTL Support */
html[dir="rtl"] aside#portalSidebar {
  left: auto !important;
  right: 0 !important;
  border-right: none !important;
  border-left: 1px solid #E2E8F0 !important;
}

html[dir="rtl"] #mainContentWrapper {
  padding-left: 0 !important;
  padding-right: 16rem !important;
}

/* ==========================================================================
   Cloud Synchronization Styles (Google Cloud Firebase)
   ========================================================================== */
.cloud-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  font-family: var(--font-ui);
}

.cloud-status-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.cloud-status-pill.connected {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

.cloud-status-pill.connected:hover {
  background: rgba(16, 185, 129, 0.15);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

.status-dot.amber {
  background-color: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.75;
  }
}

/* =============================================================================
   TEACHER COMMAND CENTER & SUB-PANEL SYSTEM (APPLE / SAAS DESIGN)
   ============================================================================= */
.report-section-card,
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.section-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-subtitle {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.45;
}

/* Teacher Sub-Navigation Tab Bar & Groups */
.teacher-nav-groups-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.teacher-tab-group {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.teacher-group-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  padding-left: 0.2rem;
}

.teacher-group-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.teacher-sub-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
}

.teacher-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  user-select: none;
  flex-shrink: 0;
}

.teacher-sub-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.teacher-sub-tab.active {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.teacher-sub-tab .material-symbols-outlined {
  font-size: 1.15rem;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}

.teacher-sub-tab:hover .material-symbols-outlined {
  transform: scale(1.1);
}

.teacher-tab-badge {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}
.teacher-tab-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
[data-theme="dark"] .teacher-tab-badge.amber {
  color: #fbbf24;
}
.teacher-tab-badge.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
[data-theme="dark"] .teacher-tab-badge.emerald {
  color: #34d399;
}

/* Student Roster Filter Bar */
.roster-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-hover);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.roster-filter-btn {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.roster-filter-btn:hover {
  color: var(--text-primary);
}

.roster-filter-btn.active {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Roster Table Design - Clean Responsive Layout with Horizontal Scrolling */
.table-responsive-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--bg-surface-solid);
  position: relative;
}

.report-history-table {
  width: 100%;
  min-width: 820px;
  table-layout: auto;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.report-history-table th {
  padding: 0.8rem 0.9rem;
  background: var(--bg-hover);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.report-history-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: 0.84rem;
  white-space: nowrap;
}

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

.report-history-table tr:hover td {
  background: var(--bg-hover);
}

/* Quick Zoom Banner */
.teacher-quick-banner {
  margin: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-hover);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: space-between;
}
@media (min-width: 640px) {
  .teacher-quick-banner {
    flex-direction: row;
    align-items: center;
  }
}
.teacher-quick-banner-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}
.teacher-quick-banner-desc {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  word-break: break-all;
  margin-top: 0.2rem;
}

/* Generic Teacher Item Cards (Payments & Sessions) */
.teacher-item-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.teacher-item-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.teacher-item-title {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

.teacher-item-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.25rem;
}

.teacher-item-notes {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  background: var(--bg-hover);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.teacher-empty-box {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-card);
}
.teacher-empty-box .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.teacher-empty-box .empty-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}
.teacher-empty-box .empty-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================================
   CURRICULUM BOOKS & FULL TEXTBOOKS PDF LIBRARY STYLES
   ============================================================================= */
.curriculum-book-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.curriculum-book-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

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

.curriculum-book-card:hover::before {
  opacity: 1;
}

.book-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.book-subject-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.book-subject-tag.maths {
  background: rgba(6, 182, 212, 0.15);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.35);
}
[data-theme="dark"] .book-subject-tag.maths {
  color: #22d3ee;
}

.book-subject-tag.english {
  background: rgba(168, 85, 247, 0.15);
  color: #9333ea;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
[data-theme="dark"] .book-subject-tag.english {
  color: #c084fc;
}

.book-subject-tag.science {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .book-subject-tag.science {
  color: #34d399;
}

.book-subject-tag.other {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .book-subject-tag.other {
  color: #fbbf24;
}

.book-age-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.book-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-top: 0.5rem;
}

.book-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.book-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.book-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* =============================================================================
   DAILY TEACHING PLANNER & TO-DO AGENDA (REFINED SAAS DESIGN)
   ============================================================================= */
.planner-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
@media (min-width: 640px) {
  .planner-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.planner-segmented-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-hover);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  max-width: 100%;
}

.planner-filter-tab {
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.planner-filter-tab:hover {
  color: var(--text-primary);
}
.planner-filter-tab.active {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.planner-date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.planner-date-input {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: var(--transition-smooth);
}
.planner-date-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* Planner Mini KPI Metrics */
.planner-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
}

.planner-kpi-item {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.planner-kpi-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.planner-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  display: block;
}

.planner-kpi-val {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 0.25rem;
  display: block;
  color: var(--text-primary);
}

.planner-kpi-item.pending {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.25);
}
.planner-kpi-item.pending .planner-kpi-label {
  color: #b45309;
}
.planner-kpi-item.pending .planner-kpi-val {
  color: #d97706;
}
[data-theme="dark"] .planner-kpi-item.pending {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}
[data-theme="dark"] .planner-kpi-item.pending .planner-kpi-label {
  color: #fcd34d;
}
[data-theme="dark"] .planner-kpi-item.pending .planner-kpi-val {
  color: #fbbf24;
}

.planner-kpi-item.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.25);
}
.planner-kpi-item.completed .planner-kpi-label {
  color: #047857;
}
.planner-kpi-item.completed .planner-kpi-val {
  color: #059669;
}
[data-theme="dark"] .planner-kpi-item.completed {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
[data-theme="dark"] .planner-kpi-item.completed .planner-kpi-label {
  color: #6ee7b7;
}
[data-theme="dark"] .planner-kpi-item.completed .planner-kpi-val {
  color: #34d399;
}

/* Planner Task Cards (Theme-Aware, Modern SaaS) */
.planner-task-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.planner-task-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.planner-task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  border-radius: 4px 0 0 4px;
  transition: background 0.25s ease;
}

.planner-task-card.completed {
  opacity: 0.88;
  background: var(--bg-surface);
  border-color: rgba(16, 185, 129, 0.25);
}

.planner-task-card.completed::before {
  background: var(--color-success);
}

.planner-task-card.completed .planner-lesson-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.planner-lesson-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-top: 0.25rem;
}

/* Meta Pills inside planner card */
.planner-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.planner-meta-pill.time {
  background: rgba(0, 113, 227, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(0, 113, 227, 0.2);
  font-weight: 700;
}
[data-theme="dark"] .planner-meta-pill.time {
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.25);
}

.planner-meta-pill.date {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.planner-meta-pill.student {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-weight: 700;
}
[data-theme="dark"] .planner-meta-pill.student {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
}

.planner-meta-pill.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 700;
}
[data-theme="dark"] .planner-meta-pill.status-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.planner-meta-pill.status-completed {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 700;
}
[data-theme="dark"] .planner-meta-pill.status-completed {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

/* Topics / "What They Will Take" box */
.planner-topics-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.4rem;
}

.planner-topics-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
  display: block;
}

.planner-topics-content {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Sub-meta tags (materials / homework) */
.planner-sub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}
.planner-sub-meta strong {
  color: var(--text-secondary);
}

/* Action button group */
.planner-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.planner-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.planner-action-btn.toggle-done {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}
.planner-action-btn.toggle-done:hover {
  background: rgba(16, 185, 129, 0.2);
}
[data-theme="dark"] .planner-action-btn.toggle-done {
  color: #34d399;
}

.planner-action-btn.toggle-reopen {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: var(--border-card);
}
.planner-action-btn.toggle-reopen:hover {
  color: var(--text-primary);
  background: var(--bg-active);
}

.planner-action-btn.whatsapp {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.25);
}
.planner-action-btn.whatsapp:hover {
  background: rgba(34, 197, 94, 0.22);
}
[data-theme="dark"] .planner-action-btn.whatsapp {
  color: #4ade80;
}

.planner-action-btn.delete {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}
.planner-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}
[data-theme="dark"] .planner-action-btn.delete {
  color: #f87171;
}

.planner-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-card);
}
.planner-empty-icon {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
}
.planner-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.planner-empty-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Curriculum Access & Skill Lock Styling
   ========================================================================== */
.skill-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.skill-status-tag.unlocked {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
[data-theme="dark"] .skill-status-tag.unlocked, body:not(.light-mode) .skill-status-tag.unlocked {
  color: #34d399 !important;
}

.skill-status-tag.locked {
  background: rgba(100, 116, 139, 0.12) !important;
  color: #64748b !important;
  border: 1px solid rgba(100, 116, 139, 0.25) !important;
}
[data-theme="dark"] .skill-status-tag.locked, body:not(.light-mode) .skill-status-tag.locked {
  color: #94a3b8 !important;
}

.skill-status-tag.assigned {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
[data-theme="dark"] .skill-status-tag.assigned, body:not(.light-mode) .skill-status-tag.assigned {
  color: #fbbf24 !important;
}

.learn-pill-btn.locked {
  background: var(--bg-hover) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
.learn-pill-btn.locked:hover {
  transform: none !important;
  background: var(--bg-hover) !important;
}

/* Curriculum Access Tree in Teacher Panel (Vibrant & High Contrast) */
.curriculum-cat-box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
}

.curriculum-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
}
.curriculum-cat-header:hover {
  background: var(--bg-hover);
}

.curriculum-subject-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}
.curriculum-subject-badge.maths {
  background: rgba(37, 99, 235, 0.14);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.curriculum-subject-badge.english {
  background: rgba(147, 51, 234, 0.14);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.3);
}
.curriculum-subject-badge.science {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.curriculum-subject-badge.general {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.curriculum-cat-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-primary);
}

.curriculum-cat-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.curriculum-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.curriculum-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-solid);
}

.curriculum-skills-sublist {
  background: var(--bg-surface-solid);
  padding: 0.25rem 0;
}

.curriculum-skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}
.curriculum-skill-item:last-child {
  border-bottom: none;
}
.curriculum-skill-item:hover {
  background: var(--bg-hover);
}
.curriculum-skill-item.is-unlocked {
  background: rgba(16, 185, 129, 0.03);
}

.curriculum-skill-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.curriculum-skill-code {
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--color-primary);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.curriculum-skill-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* =============================================================================
   Student Groups & Cohorts High-Contrast Card Styles
   ============================================================================= */

.student-group-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-group-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.student-group-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

/* Color Theme Badges */
.student-group-card.group-theme-indigo::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.student-group-card.group-theme-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.student-group-card.group-theme-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.student-group-card.group-theme-cyan::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.student-group-card.group-theme-rose::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.student-group-card.group-theme-purple::before { background: linear-gradient(90deg, #a855f7, #c084fc); }

.group-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.group-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.group-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.group-grade-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-hover);
  color: var(--color-primary);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.group-count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .group-count-pill {
  color: #34d399;
}

.group-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.group-icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-card);
}

.group-icon-btn.delete:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.group-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-surface-solid);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.group-members-preview {
  margin-top: 0.25rem;
}

.group-members-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-card);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.group-member-chip.more {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-style: dashed;
}

.member-chip-avatar {
  font-size: 0.9rem;
}

.group-card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.group-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  text-decoration: none;
  white-space: nowrap;
}

.group-action-btn.unlock {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.25);
}
.group-action-btn.unlock:hover {
  background: rgba(99, 102, 241, 0.2);
}

.group-action-btn.zoom {
  background: rgba(0, 113, 227, 0.12);
  color: var(--color-primary);
  border-color: rgba(0, 113, 227, 0.25);
}
.group-action-btn.zoom:hover {
  background: rgba(0, 113, 227, 0.2);
}

.group-action-btn.whatsapp {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .group-action-btn.whatsapp {
  color: #34d399;
}
.group-action-btn.whatsapp:hover {
  background: rgba(16, 185, 129, 0.2);
}

/* Multi-Student Picker Item */
.group-student-picker-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.group-student-picker-item:last-child {
  border-bottom: none;
}
.group-student-picker-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Target Mode Switcher in Curriculum */
.curriculum-target-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.curriculum-target-mode-pill button {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.curriculum-target-mode-pill button.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* =============================================================================
   HORIZONTAL CURRICULUM BAR ON LOGIN STAGE
   ============================================================================= */
.login-curriculum-bar {
  width: 100%;
  max-width: 1240px;
  margin: 1.15rem auto 0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.15rem 1.4rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.curriculum-bar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.curriculum-bar-label {
  font-family: var(--font-headline);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.curriculum-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.curriculum-bar-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  transition: all 0.25s ease;
}

.curriculum-bar-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-2px);
}

.curriculum-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.curriculum-bar-icon {
  font-size: 1.3rem;
}

.curriculum-bar-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
}

.curriculum-bar-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.curriculum-bar-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* =============================================================================
   LOGIN CONTACT FOOTER PILLS
   ============================================================================= */
.login-contact-footer {
  width: 100%;
  max-width: 1240px;
  margin: 0.85rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.contact-pill:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.contact-pill.whatsapp {
  border-color: rgba(37, 211, 102, 0.3);
}

.contact-pill.whatsapp:hover {
  background: rgba(37, 211, 102, 0.18);
  border-color: #25d366;
  color: #25d366;
}

/* =============================================================================
   FEATURED STUDENT BLOG CARDS ON LANDING
   ============================================================================= */
.featured-blog-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.featured-blog-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.featured-blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.featured-blog-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.featured-blog-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.featured-blog-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
}

.featured-blog-excerpt {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.featured-blog-footer .read-btn {
  color: #60a5fa;
  font-weight: 700;
}

/* =============================================================================
   VOCABULARY GAME ENGINE STYLES
   ============================================================================= */
.vocab-game-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.vocab-mode-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.vocab-mode-card:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15);
}

.vocab-mode-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.vocab-mode-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.vocab-mode-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 1.25rem;
}

.vocab-mode-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
}

.vocab-feedback-banner {
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.vocab-feedback-banner.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.vocab-feedback-banner.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.vocab-letter-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 48px;
  font-size: 1.4rem;
  font-weight: 800;
  border-bottom: 3px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 0 4px;
  transition: all 0.2s ease;
}

.vocab-letter-slot.filled {
  border-bottom-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 6px 6px 0 0;
}

.vocab-tile-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.vocab-letter-tile {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vocab-letter-tile:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  transform: scale(1.08);
}

.vocab-letter-tile.used {
  opacity: 0.3;
  pointer-events: none;
  transform: none;
}

.vocab-option-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vocab-option-btn:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(4px);
}

.vocab-option-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

.vocab-option-btn.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

.vocab-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* =============================================================================
   DIGITAL SAT PREP STYLES
   ============================================================================= */
.sat-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.sat-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.sat-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.sat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #030712;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.sat-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
}

/* =============================================================================
   DAILY STUDENT ACTIVITY AUDIT & TIMELINE STREAM STYLES
   ============================================================================= */
.timeline-log-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #00e5ff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-log-row:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(0, 229, 255, 0.35);
  transform: translateX(4px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.timeline-log-row.type-LOGIN {
  border-left-color: #38bdf8;
}
.timeline-log-row.type-PRACTICE {
  border-left-color: #00e5ff;
}
.timeline-log-row.type-ZOOM_JOIN {
  border-left-color: #a855f7;
}
.timeline-log-row.type-HOMEWORK_SUBMIT {
  border-left-color: #f59e0b;
}
.timeline-log-row.type-VOCAB_GAME {
  border-left-color: #10b981;
}
.timeline-log-row.type-PAYMENT_SUBMIT {
  border-left-color: #22c55e;
}
.timeline-log-row.type-BLOG_POST {
  border-left-color: #6366f1;
}

.timeline-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-type-pill.type-LOGIN {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.timeline-type-pill.type-PRACTICE {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.timeline-type-pill.type-ZOOM_JOIN {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.timeline-type-pill.type-HOMEWORK_SUBMIT {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.timeline-type-pill.type-VOCAB_GAME {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.timeline-type-pill.type-PAYMENT_SUBMIT {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.timeline-type-pill.type-BLOG_POST {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.timeline-student-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
}





