/* Targeto - Mobile-First Student Dashboard Styles (Light Theme & Mobile App Native UX) */

:root {
  --bg-main: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --border-card: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.05);

  --primary-teal: #005f60;
  --primary-teal-hover: #004d40;
  --primary-teal-light: #e6f4f4;
  --primary-teal-glow: rgba(0, 95, 96, 0.12);

  --accent-mint: #00c996;
  --accent-mint-hover: #00b386;
  --accent-mint-light: #e6f9f3;
  --accent-cyan: #0d9488;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.12);

  --sidebar-width: 250px;
  --sidebar-collapsed-width: 76px;
  --topbar-height: 68px;
  --radius-card: 18px;
  --radius-pill: 9999px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  position: relative;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

body {
  display: flex;
}

/* App Layout Container */
.app-container {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 990;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* --- Collapsible Light Sidebar & Mobile Drawer --- */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  overflow: hidden;
}

.sidebar-brand img {
  height: 34px;
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-teal);
  letter-spacing: -0.03em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.brand-accent {
  color: var(--accent-mint);
}

.sidebar.collapsed .sidebar-brand-name {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.toggle-sidebar-btn {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-sidebar-btn:hover {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border-color: rgba(0, 95, 96, 0.3);
}

/* Nav Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

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

.nav-item.active {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  font-weight: 700;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.nav-item.active .nav-icon {
  color: var(--primary-teal);
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  display: none;
}

/* Sidebar User Footer */
.sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  max-width: 38px;
  max-height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--accent-mint) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 95, 96, 0.25);
  overflow: hidden !important;
  position: relative;
}

.user-details {
  overflow: hidden;
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .user-details {
  display: none;
}

/* --- Main Content Area --- */
.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar.collapsed ~ .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* Topbar Header */
.topbar {
  height: var(--topbar-height);
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Menu Hamburger Button */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: #f8fafc;
  color: var(--primary-teal);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: var(--primary-teal-light);
  border-color: var(--primary-teal);
}

.mobile-logo {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-teal);
}

.mobile-logo img {
  height: 26px;
}

.topbar-page-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

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

/* Stream Dropdown Selector */
.stream-dropdown-container {
  position: relative;
}

.stream-select-btn {
  background: var(--primary-teal-light);
  border: 1px solid rgba(0, 95, 96, 0.25);
  color: var(--primary-teal);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.stream-select-btn:hover {
  background: rgba(0, 95, 96, 0.12);
  border-color: var(--primary-teal);
}

.stream-select-btn.admin-btn {
  background: #fdf4ff;
  border-color: #f0abfc;
  color: #a855f7;
  text-decoration: none;
}

.stream-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stream-dropdown-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.stream-option-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stream-option-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.stream-option-btn.active {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  font-weight: 700;
}

/* Header Stat Pills */
.header-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  white-space: nowrap;
}

.streak-pill {
  color: #ea580c;
  background: #fff7ed;
  border-color: #ffedd5;
}

.xp-pill {
  color: var(--primary-teal);
  background: var(--primary-teal-light);
  border-color: rgba(0, 95, 96, 0.2);
}

/* Topbar Notification Icon Button */
.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: #ffffff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.topbar-icon-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
}

/* Sign Out Top Button */
.topbar-logout-btn {
  background: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.topbar-logout-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* --- Main Dashboard View Content --- */
.dashboard-content {
  padding: 24px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Views */
.dashboard-view {
  display: none;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(12px);
}

.dashboard-view.active {
  display: flex;
  animation: viewFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* --- Banner Hero Card --- */
.stream-banner-card {
  background: linear-gradient(135deg, #005f60 0%, #008f80 50%, #00b496 100%);
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 95, 96, 0.25);
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.stream-banner-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.banner-text {
  max-width: 60%;
  z-index: 2;
}

.banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-text h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.banner-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.banner-streak-box {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.streak-flame-icon {
  font-size: 26px;
}

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

.streak-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.streak-count {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Light Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.card:not(.student-id-card) {
  animation: cardSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-view.active .card:not(.student-id-card):nth-child(1) { animation-delay: 0.04s; }
.dashboard-view.active .card:not(.student-id-card):nth-child(2) { animation-delay: 0.1s; }
.dashboard-view.active .card:not(.student-id-card):nth-child(3) { animation-delay: 0.16s; }
.dashboard-view.active .card:not(.student-id-card):nth-child(4) { animation-delay: 0.22s; }
.dashboard-view.active .card:not(.student-id-card):nth-child(5) { animation-delay: 0.28s; }

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

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.card-subtitle-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary-teal);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.card-title-text {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.progress-badge-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-mint-light);
  color: var(--accent-mint);
  border: 1px solid rgba(0, 201, 150, 0.3);
}

.section-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Progress Container */
.progress-container {
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.progress-hint {
  color: var(--accent-mint);
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-teal) 0%, var(--accent-mint) 100%);
  border-radius: var(--radius-pill);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Task List Items */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dash-task-item {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.dash-task-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 95, 96, 0.3);
  box-shadow: var(--shadow-md);
}

.dash-task-item.completed {
  background: #f8fafc;
  border-color: var(--border-card);
}

.dash-task-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  transition: padding 0.2s ease, align-items 0.2s ease;
}

.dash-task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: #ffffff;
  transition: all 0.2s ease;
  margin-top: 0;
}

.dash-task-item.completed .dash-task-checkbox {
  background: var(--accent-mint);
  border-color: var(--accent-mint);
}

.dash-task-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.dash-task-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.dash-task-item.completed .dash-task-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.dash-task-item.expanded .dash-task-header {
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: 8px;
}

.dash-task-item.expanded .dash-task-checkbox {
  margin-top: 2px;
}

.dash-task-item.expanded .dash-task-content {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.dash-task-item.expanded .dash-task-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.45;
}

.dash-task-expand-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.2s ease;
  flex-shrink: 0;
}

.dash-task-item:hover .dash-task-expand-btn {
  color: var(--primary-teal);
}

.dash-task-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-task-item.expanded .dash-task-chevron {
  transform: rotate(180deg);
}

.dash-task-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-main);
  border-top: 0px solid transparent;
}

.dash-task-item.expanded .dash-task-details {
  grid-template-rows: 1fr;
  border-top: 1px solid var(--border-card);
}

.dash-task-details-inner {
  overflow: hidden;
  padding: 0 16px;
  transition: padding 0.3s ease;
}

.dash-task-item.expanded .dash-task-details-inner {
  padding: 12px 16px 14px;
}

.dash-task-subject {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.sub-physics { background: #e0f2fe; color: #0284c7; }
.sub-chemistry { background: #f3e8ff; color: #9333ea; }
.sub-biology, .sub-botany { background: #dcfce7; color: #15803d; }
.sub-zoology { background: #e0f2fe; color: #0284c7; }
.sub-maths { background: #fef3c7; color: #b45309; }
.sub-science { background: #ccfbf1; color: #0f766e; }
.sub-sst { background: #fee2e2; color: #b91c1c; }
.sub-english { background: #e0e7ff; color: #4338ca; }

.dash-task-meta-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
}

.dash-task-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
}

/* Task Start & Action Buttons */
.dash-task-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-card);
  flex-wrap: wrap;
}

.dash-task-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-teal);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 95, 96, 0.2);
}

.dash-task-start-btn:hover {
  background: #004d4e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 95, 96, 0.3);
}

.dash-task-start-btn.running {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 2px 8px rgba(16, 185, 129, 0.35);
  animation: pulseTaskFocusBtn 2s infinite ease-in-out;
}

@keyframes pulseTaskFocusBtn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4), 0 2px 8px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0), 0 3px 12px rgba(16, 185, 129, 0.45); }
}

.dash-task-mark-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-task-mark-btn:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  background: var(--primary-teal-light);
}

/* In-Progress Task Card & Status Badges */
.dash-task-item.in-progress {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 1px var(--primary-teal), 0 4px 14px rgba(0, 95, 96, 0.12);
  background: linear-gradient(to right, rgba(0, 95, 96, 0.03), #ffffff);
}

[data-theme="dark"] .dash-task-item.in-progress {
  background: linear-gradient(to right, rgba(20, 184, 166, 0.08), var(--bg-card));
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 1px var(--primary-teal), 0 4px 16px rgba(0, 0, 0, 0.35);
}

.dash-task-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 5px;
}

.dash-task-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: dotBlink 1.4s infinite ease-in-out;
}

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

.dash-task-paused-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 5px;
}

[data-theme="dark"] .dash-task-paused-pill {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

/* Side Widgets Column */
.side-widgets-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Focus Timer Box */
.timer-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.timer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-teal);
  letter-spacing: 0.06em;
  background: var(--primary-teal-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* Circular Timer Progress Ring in Card */
.timer-ring-container {
  position: relative;
  width: 155px;
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}

.timer-svg {
  width: 155px;
  height: 155px;
  transform: rotate(-90deg);
}

.timer-svg-bg {
  fill: none;
  stroke: rgba(0, 95, 96, 0.08);
  stroke-width: 8;
}

.timer-svg-progress {
  fill: none;
  stroke: var(--primary-teal);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

.timer-center-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  text-align: center;
}

.timer-display {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-family);
  color: var(--primary-teal);
  letter-spacing: -0.03em;
  line-height: 1;
}

.timer-sub-status {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Duration Presets */
.timer-preset-pills {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.timer-preset-pill {
  flex: 1;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timer-preset-pill.active,
.timer-preset-pill:hover {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border-color: var(--primary-teal);
}

/* Custom Duration Range Slider Box */
.custom-slider-box {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  animation: expandSlider 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.slider-label-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.slider-val-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-teal);
  background: var(--primary-teal-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.custom-range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-teal);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 95, 96, 0.4);
  transition: transform 0.15s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.timer-controls {
  display: flex;
  gap: 8px;
  width: 100%;
}

.timer-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timer-btn.primary {
  background: var(--primary-teal);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
}

.timer-btn.primary:hover {
  background: var(--primary-teal-hover);
  transform: translateY(-1px);
}

.timer-btn.secondary {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.timer-btn.secondary:hover {
  background: #f1f5f9;
}

/* Fullscreen Focus Mode Trigger Button */
.focus-mode-trigger-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-teal) 0%, #008763 100%);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 95, 96, 0.3);
  transition: all 0.25 ease;
}

.focus-mode-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 95, 96, 0.4);
}

/* ==========================================================================
   FULLSCREEN ZEN FOCUS MODE OVERLAY
   ========================================================================== */

/* ==========================================================================
   FULLSCREEN ZEN FOCUS MODE OVERLAY
   ========================================================================== */

.fullscreen-focus-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
  color: #f8fafc;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeInFocus 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInFocus {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.focus-mode-container {
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
}

.focus-mode-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  flex-shrink: 0;
}

.focus-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.focus-brand img {
  height: 32px;
}

.exit-focus-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exit-focus-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
}

.focus-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  flex: 1;
  align-items: flex-start;
}

.focus-timer-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.focus-ring-box {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.focus-ring-box svg {
  transform: rotate(-90deg);
}

.focus-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.focus-ring-progress {
  fill: none;
  stroke: #34d399;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
  filter: drop-shadow(0 0 12px rgba(52, 211, 153, 0.6));
}

.focus-time-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.focus-session-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #34d399;
  margin-bottom: 4px;
}

.focus-time-countdown {
  font-size: 56px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.04em;
  line-height: 1;
}

.focus-status-badge {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 8px;
}

.focus-controls-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.focus-ctrl-btn {
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.focus-ctrl-btn.primary {
  background: #34d399;
  color: #0f172a;
  border: none;
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
}

.focus-ctrl-btn.primary:hover {
  background: #10b981;
  transform: translateY(-2px);
}

.focus-ctrl-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.focus-ctrl-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ambient-sound-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.ambient-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

.ambient-btn-group {
  display: flex;
  gap: 6px;
}

.ambient-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ambient-btn.active,
.ambient-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Right Task Panel in Focus Mode */
.focus-tasks-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.focus-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.focus-tasks-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.focus-task-count {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
}

.focus-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Responsive Focus Mode Media Query for Mobile */
@media (max-width: 850px) {
  .focus-mode-container {
    padding: 16px 12px;
    height: auto;
  }

  .focus-mode-topbar {
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

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

  .focus-ring-box {
    width: 220px;
    height: 220px;
  }

  .focus-ring-box svg {
    width: 100%;
    height: 100%;
  }

  .focus-time-countdown {
    font-size: 44px;
  }

  .focus-controls-bar {
    gap: 8px;
  }

  .focus-ctrl-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .focus-tasks-panel {
    padding: 16px;
    margin-bottom: 24px;
  }
}


.timer-btn.secondary {
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

/* Revision Card */
.revision-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.revision-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  font-size: 12px;
}

.revision-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.physics-dot { background: #0284c7; }
.chemistry-dot { background: #9333ea; }

/* --- Pill Filter Bar (Mobile Scrollable) --- */
.pill-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pill-filter-bar::-webkit-scrollbar {
  display: none;
}

.pill-filter {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.pill-filter.active {
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
  box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
}

/* Subject Cards Grid */
.subject-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.subject-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.subject-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.physics-bg { background: #e0f2fe; color: #0284c7; }
.chemistry-bg { background: #f3e8ff; color: #9333ea; }
.biology-bg { background: #dcfce7; color: #15803d; }

.subject-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.physics-text { color: #0284c7; }
.chemistry-text { color: #9333ea; }
.biology-text { color: #15803d; }

.subject-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.subject-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.subject-progress {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}

.sub-progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
}

.physics-bar { background: #0284c7; }
.chemistry-bar { background: #9333ea; }
.biology-bar { background: #15803d; }

.subject-action-btn {
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: #f8fafc;
  color: var(--primary-teal);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Revision Scheduler & PYQ Grid */
.revision-schedule-grid,
.pyq-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.revision-schedule-box,
.pyq-item-card {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.schedule-badge,
.pyq-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.day-3 { background: #e0f2fe; color: #0284c7; }
.day-7 { background: #f3e8ff; color: #9333ea; }
.pyq-badge { background: #dcfce7; color: #15803d; }

.revision-schedule-box h4,
.pyq-item-card h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.revision-schedule-box p,
.pyq-meta-info {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.revision-start-btn,
.pyq-start-btn {
  margin-top: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: var(--primary-teal);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Settings View Role Application */
.role-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.role-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.edu-btn {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border: 1px solid rgba(0, 95, 96, 0.3);
}

.admin-btn {
  background: #fdf4ff;
  color: #a855f7;
  border: 1px solid #f0abfc;
}

.app-tracker-divider {
  border-top: 1px solid var(--border-card);
  padding-top: 18px;
}

.app-tracker-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-align-gap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.refresh-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 4px 10px;
  color: var(--primary-teal);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

/* Additional Subject Option Pills */
.additional-options-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.additional-subject-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-main);
  border: 1.5px dashed var(--border-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CLASS TESTS & DEDICATED STUDY THREADS
   ========================================================================== */
.create-class-test-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border: 1.5px dashed rgba(0, 95, 96, 0.35);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.create-class-test-btn:hover {
  background: var(--primary-teal);
  color: #ffffff;
  border-style: solid;
  border-color: var(--primary-teal);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
}

.thread-switcher-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 4px;
}

.thread-switcher-container::-webkit-scrollbar {
  display: none;
}

.thread-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.thread-tab-pill:hover {
  border-color: var(--primary-teal);
  color: var(--text-main);
}

.thread-tab-pill.active {
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
  box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
}

.thread-tab-pill .thread-badge-count {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.thread-tab-pill:not(.active) .thread-badge-count {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
}

.thread-delete-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: none;
  cursor: pointer;
  margin-left: 2px;
  transition: all 0.15s ease;
}

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

.class-test-chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
}

.class-test-chapter-item:hover {
  border-color: var(--primary-teal);
  transform: translateY(-1px);
}

.class-test-chapter-item.selected {
  background: var(--primary-teal-light);
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

.class-test-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-teal);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.class-test-chap-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.class-test-chap-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.class-test-subject-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 95, 96, 0.1);
  color: var(--primary-teal);
  flex-shrink: 0;
  text-transform: uppercase;
}

.active-test-card-item {
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.active-test-card-item:hover {
  border-color: var(--primary-teal);
  box-shadow: 0 4px 12px rgba(0, 95, 96, 0.08);
}

.active-test-card-item.is-active-thread {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.additional-subject-pill:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.additional-subject-pill.selected {
  background: var(--primary-teal-light);
  border: 1.5px solid var(--primary-teal);
  color: var(--primary-teal);
  box-shadow: 0 2px 8px var(--primary-teal-glow);
}

/* Filter Pill Buttons & Action Buttons in Modals */
.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill-btn:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.filter-pill-btn.active {
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
  box-shadow: 0 2px 8px rgba(0, 95, 96, 0.2);
}

.action-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-sm:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  background: var(--primary-teal-light);
}

/* Banner Hero Unified 3 Pills (Streak, Rank, XP) */
.banner-stats-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.banner-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  min-height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  box-sizing: border-box;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.banner-stat-pill.clickable {
  cursor: pointer;
  outline: none;
}

.banner-stat-pill.clickable:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.banner-pill-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-pill-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.banner-pill-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.banner-pill-value {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.banner-pill-chevron {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, color 0.2s ease;
}

.banner-stat-pill.clickable:hover .banner-pill-chevron {
  transform: translateX(3px);
  color: #ffffff;
}

body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* Modals System */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  animation: modalBackdropIn 0.25s ease forwards;
}

.modal-overlay.closing {
  animation: modalBackdropOut 0.2s ease forwards;
}

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

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

.stream-modal-card {
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: auto;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  position: relative;
  animation: modalCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-overlay.closing .stream-modal-card {
  animation: modalCardOut 0.2s ease forwards;
}

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

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

.stream-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stream-modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Modal Close Icon Button */
.modal-close-icon-btn {
  position: sticky;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 100;
  margin-top: -4px;
  margin-right: -4px;
  margin-bottom: -34px;
}

.modal-close-icon-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
  transform: scale(1.05);
}

[data-theme="dark"] .modal-close-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .modal-close-icon-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

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

.stream-card-option {
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 2px solid var(--border-card);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.stream-card-option.selected {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.stream-card-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-main);
}

.stream-card-subs {
  font-size: 11px;
  color: var(--text-muted);
}

.confirm-stream-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--primary-teal);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea, input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

[data-theme="dark"] option {
  background: #0f172a !important;
  color: #f8fafc !important;
}

textarea, .form-textarea {
  resize: vertical !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.form-feedback {
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 14px;
}

/* --- Hanging Lanyard & Swinging Physical Student ID Card --- */
#view-profile {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 40px;
  min-height: calc(100vh - 120px);
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#view-profile.active {
  display: flex;
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Pendulum Swing Container */
.id-lanyard-assembly {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  z-index: 10;
  width: 100%;
  max-width: 580px;
  box-sizing: border-box;
  will-change: transform;
}

.id-lanyard-assembly.swinging {
  animation: idCardSwing 1.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes idCardSwing {
  0% {
    transform: translateY(-160px) rotate(-18deg) scale(0.92);
    opacity: 0;
  }
  40% {
    transform: translateY(16px) rotate(12deg) scale(1.02);
    opacity: 1;
  }
  62% {
    transform: translateY(-8px) rotate(-7deg);
  }
  80% {
    transform: translateY(4px) rotate(3deg);
  }
  92% {
    transform: translateY(-1px) rotate(-1deg);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

/* Lanyard Straps */
.lanyard-strap-left,
.lanyard-strap-right {
  width: 22px;
  height: 70px;
  background: linear-gradient(180deg, var(--primary-teal) 0%, var(--primary-teal-hover) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: absolute;
  top: -65px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lanyard-strap-left {
  left: calc(50% - 22px);
  transform: rotate(-9deg);
  border-radius: 6px 0 0 0;
}

.lanyard-strap-right {
  right: calc(50% - 22px);
  transform: rotate(9deg);
  border-radius: 0 6px 0 0;
}

.lanyard-text {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  transform: rotate(-90deg);
  text-transform: uppercase;
}

/* Metal Clip Hook & Swivel */
.lanyard-metal-clip {
  width: 30px;
  height: 28px;
  position: absolute;
  top: -12px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metal-ring {
  width: 22px;
  height: 16px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.metal-swivel {
  width: 12px;
  height: 12px;
  background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%);
  border-radius: 3px;
  margin-top: -3px;
}

/* Physical Punch Hole Slot */
.id-punch-slot {
  width: 34px;
  height: 9px;
  border-radius: 8px;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.4);
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

/* Premium Light Student ID Card Container */
.student-id-card {
  width: 100%;
  max-width: 580px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.12);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

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

.id-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.id-brand-logo {
  height: 24px;
}

.id-brand-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-teal);
  letter-spacing: 0.05em;
}

.id-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.id-hologram-chip {
  background: linear-gradient(135deg, #fef08a 0%, #a7f3d0 100%);
  color: #065f46;
  font-size: 9px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.id-chip-tag {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.id-card-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.id-photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.id-photo-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  background: var(--primary-teal-light);
  border: 2px solid var(--primary-teal);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.id-avatar-placeholder {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-teal);
}

.add-pic-bubble {
  background: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--primary-teal);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.id-info-details {
  flex: 1;
}

.id-student-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.id-student-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.status-dot-active {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
}

.id-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.id-field-item {
  display: flex;
  flex-direction: column;
}

.id-field-item.full-width {
  grid-column: span 2;
}

.id-field-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.id-field-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.id-field-value.highlight {
  color: var(--primary-teal);
}

.id-field-value.code-font {
  font-family: monospace;
}

.id-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-card);
  padding-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.id-barcode {
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.barcode-subtext {
  font-size: 8px;
  font-weight: 800;
  color: var(--text-light);
}

.edit-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   MOBILE NATIVE BOTTOM NAVIGATION BAR (User Reference Design)
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid var(--border-card);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  z-index: 900;
  padding: 0 8px;
  align-items: center;
  justify-content: space-around;
  box-sizing: border-box;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 76px;
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-item.active {
  color: var(--primary-teal);
  font-weight: 800;
}

.mobile-nav-item.active .mobile-nav-icon {
  background: var(--accent-mint);
  color: #0f172a;
  box-shadow: 0 3px 12px rgba(0, 201, 150, 0.4);
}

/* ==========================================================================
   MOBILE RESPONSIVE MEDIA QUERIES (Zero Horizontal Scroll Guarantee)
   ========================================================================== */

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

  .banner-text {
    max-width: 100%;
  }

  .stream-banner-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  /* Show Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
  }

  /* Off-canvas Slide-over Sidebar Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(32px, calc(20px + env(safe-area-inset-bottom, 24px))) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: 270px;
  }

  .sidebar.collapsed .sidebar-brand-name,
  .sidebar.collapsed .nav-text,
  .sidebar.collapsed .user-details {
    opacity: 1 !important;
    display: block !important;
  }

  /* Main Wrapper Zero Margin on Mobile */
  .main-wrapper,
  .sidebar.collapsed ~ .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Topbar Mobile Layout */
  .topbar {
    padding: 0 12px;
    height: 60px;
  }

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

  .mobile-logo {
    display: flex;
  }

  .topbar-page-title {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .stream-select-btn {
    padding: 5px 10px;
    font-size: 11px;
    max-width: 115px;
  }

  .stream-select-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-stat-pill {
    display: none; /* Hide heavy pills on small topbar */
  }

  .topbar-logout-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* Dashboard Main Content Mobile Spacing */
  .dashboard-content {
    padding: 14px 12px 80px 12px; /* 80px bottom space for fixed bottom nav bar */
  }

  .stream-banner-card {
    border-radius: 16px;
    padding: 18px 14px;
  }

  .banner-text h2 {
    font-size: 19px;
  }

  .banner-text p {
    font-size: 12px;
  }

  .banner-streak-box {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .card-title-text {
    font-size: 15px;
  }

  .dash-task-item {
    gap: 10px;
  }

  /* Hide bulky inline sidebar cards on mobile stream */
  .timer-box,
  .calendar-widget-card {
    display: none !important;
  }

/* Mobile & Compact Study Planner Calendar Container */
.mobile-calendar-card-container {
  display: none !important;
  margin-bottom: 14px;
}

@media (max-width: 991px) {
  .mobile-calendar-card-container {
    display: block !important;
  }
}

@media (min-width: 992px) {
  .mobile-calendar-card-container {
    display: none !important;
  }
}

.mobile-calendar-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Mobile & Compact Deep Focus Timer Container */
.mobile-timer-card-container {
  display: none !important;
  margin-bottom: 16px;
  width: 100%;
}

@media (max-width: 991px) {
  .mobile-timer-card-container {
    display: block !important;
  }
}

@media (min-width: 992px) {
  .mobile-timer-card-container {
    display: none !important;
  }
}

.mobile-timer-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.mobile-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--primary-teal);
  letter-spacing: 0.06em;
  background: var(--primary-teal-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.mobile-timer-fs-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-timer-fs-btn:hover {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border-color: var(--primary-teal);
}

.mobile-timer-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-timer-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-timer-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.mobile-timer-svg-bg {
  fill: none;
  stroke: rgba(0, 95, 96, 0.08);
  stroke-width: 7;
}

[data-theme="dark"] .mobile-timer-svg-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.mobile-timer-svg-progress {
  fill: none;
  stroke: var(--primary-teal);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

[data-theme="dark"] .mobile-timer-svg-progress {
  stroke: var(--accent-mint);
}

.mobile-timer-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mobile-timer-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-teal);
  letter-spacing: -0.02em;
}

[data-theme="dark"] .mobile-timer-num {
  color: var(--text-main);
}

.mobile-timer-status {
  font-size: 8px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.mobile-timer-controls-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-timer-presets {
  display: flex;
  gap: 4px;
  width: 100%;
}

.mobile-timer-presets .mobile-pill {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-pill);
}

.mobile-timer-btns {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mobile-start-btn {
  flex: 2;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mobile-reset-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

  /* Mobile Floating Widgets Bar (Timer & Calendar FABs) */
  .mobile-floating-widgets-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    position: fixed;
    right: 16px;
    bottom: 84px;
    z-index: 850;
    pointer-events: auto;
  }

  .fab-widget-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }

  [data-theme="light"] .fab-widget-btn {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  }

  .fab-widget-btn:active {
    transform: scale(0.93);
  }

  .fab-widget-btn.timer-fab {
    border-color: var(--primary-teal);
  }

  .fab-widget-btn.timer-fab.running {
    background: linear-gradient(135deg, #005f60 0%, #00c996 100%);
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(0, 201, 150, 0.55);
    animation: fabGlowPulse 2s infinite;
  }

  .fab-widget-btn.calendar-fab {
    border-color: #f59e0b;
  }

  .timer-display {
    font-size: 36px;
  }

  /* Student ID Card Mobile View */
  #view-profile {
    padding-top: 30px;
    padding-bottom: 90px;
  }

  .student-id-card {
    padding: 16px 12px;
  }

  .id-card-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .id-student-name-row {
    justify-content: center;
  }

  .id-fields-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .id-field-item.full-width {
    grid-column: span 1;
  }

  .id-card-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .lanyard-strap-left,
  .lanyard-strap-right {
    height: 55px;
    top: -50px;
  }
}

/* --- Theme Toggle & Sidebar Bottom Actions --- */
.sidebar-bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.theme-toggle-btn:hover {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border-color: rgba(0, 95, 96, 0.3);
}

.sidebar.collapsed .theme-label-text {
  display: none;
}

.sidebar-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Settings Action Group Buttons */
.settings-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.settings-action-btn:hover {
  background: var(--primary-teal-light);
  border-color: var(--primary-teal);
}

.settings-action-btn.danger {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #ef4444;
}

.settings-action-btn.danger:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

/* ==========================================================================
   DARK THEME OVERRIDES ([data-theme="dark"])
   ========================================================================== */

[data-theme="dark"] {
  --bg-main: #0b1329;
  --bg-surface: #0f172a;
  --bg-card: #0f172a;
  --border-card: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --primary-teal: #14b8a6;
  --primary-teal-hover: #2dd4bf;
  --primary-teal-light: rgba(20, 184, 166, 0.18);
  --primary-teal-glow: rgba(20, 184, 166, 0.25);

  --accent-mint: #34d399;
  --accent-mint-light: rgba(52, 211, 153, 0.18);
  
  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .topbar,
[data-theme="dark"] .mobile-bottom-nav,
[data-theme="dark"] .stream-modal-card {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .dash-task-item,
[data-theme="dark"] .revision-schedule-box,
[data-theme="dark"] .pyq-item-card,
[data-theme="dark"] .subject-card,
[data-theme="dark"] .student-id-card,
[data-theme="dark"] .revision-item,
[data-theme="dark"] .stream-card-option,
[data-theme="dark"] .theme-toggle-btn,
[data-theme="dark"] .settings-action-btn,
[data-theme="dark"] .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

[data-theme="dark"] .settings-action-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

[data-theme="dark"] .settings-action-btn:hover {
  background: rgba(20, 184, 166, 0.18);
  border-color: #14b8a6;
}

[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="dark"] .mobile-nav-item.active .mobile-nav-icon {
  background: #14b8a6;
  color: #0f172a;
}

/* ==========================================================================
   GLOBAL MICRO-ANIMATIONS & TRANSITIONS
   ========================================================================== */

/* Focus Mode Exit Animation */
.fullscreen-focus-overlay.closing {
  animation: fadeOutFocus 0.25s ease forwards;
}

@keyframes fadeOutFocus {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.97); }
}

/* Button Press / Tap Feedback */
button, .nav-item, .mobile-nav-item, .stream-filter-btn,
.timer-preset-pill, .settings-action-btn, .stream-card-option,
.dash-task-item, .pyq-start-btn, .revision-start-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

button:active, .nav-item:active, .mobile-nav-item:active,
.stream-filter-btn:active, .timer-preset-pill:active,
.settings-action-btn:active, .stream-card-option:active {
  transform: scale(0.96);
}

/* Nav Item Active Transition */
.nav-item.active {
  transition: background 0.25s ease, color 0.25s ease;
}

/* Stream / Subject Cards Hover Lift */
.stream-card-option,
.subject-card,
.pyq-item-card,
.revision-schedule-box {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
}

.stream-card-option:hover,
.subject-card:hover,
.pyq-item-card:hover,
.revision-schedule-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Task Items — completion animation */
.dash-task-item {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.dash-task-item.completed {
  opacity: 0.7;
}

/* Progress Bar Smooth Fill */
.progress-fill,
.xp-progress-fill {
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stream Filter Pill Active */
.stream-filter-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stream-filter-btn.active {
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Settings Action Buttons */
.settings-action-btn {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              border-color 0.2s ease;
}

.settings-action-btn:hover {
  transform: translateY(-2px);
}

/* Sidebar overlay fade-in/out */
.sidebar-overlay {
  transition: opacity 0.3s ease;
}

/* Mobile bottom nav icon scale on active */
.mobile-nav-icon {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              color 0.2s ease;
}

.mobile-nav-item.active .mobile-nav-icon {
  transform: scale(1.1);
}

/* Timer Preset Pill transitions */
.timer-preset-pill {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timer-preset-pill.active {
  transition: background 0.25s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Dropdown menu appearance */
.dropdown-menu {
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ==========================================================================
   SHIMMER SKELETON LOADING SYSTEM
   ========================================================================== */

.skeleton-task-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  width: 100%;
  box-sizing: border-box;
}

.skeleton-box {
  background: #e2e8f0;
}

.skeleton-pulse {
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite linear;
}

[data-theme="dark"] .skeleton-box {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .skeleton-pulse {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.05) 100%);
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Sidebar Logout Button */
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s ease;
}

.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

[data-theme="dark"] .sidebar-logout-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Accessibility: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   STUDY PLANNER CALENDAR WIDGET & EXAM COUNTDOWN STYLES
   ========================================================================== */
.calendar-widget-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calendar-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exam-countdown-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-teal-light);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 95, 96, 0.15);
}

.countdown-fire-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-days-count {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-teal);
  line-height: 1.1;
}

.countdown-subtext {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cal-header-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-header-btn:hover {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border-color: var(--primary-teal);
}

.cal-header-btn.icon-only {
  padding: 6px;
}

.calendar-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-main);
  border-radius: 10px;
  border: 1px solid var(--border-card);
}

.cal-month-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.cal-nav-arrow {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cal-nav-arrow:hover {
  background: var(--border-card);
  color: var(--text-main);
}

.calendar-week-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.cal-day-cell:hover:not(.empty-day) {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
}

.cal-day-cell.empty-day {
  cursor: default;
}

.cal-day-cell.today {
  background: var(--primary-teal);
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 95, 96, 0.3);
}

.cal-day-cell.exam-day {
  background: #fef3c7;
  color: #d97706;
  border: 1.5px solid #fcd34d;
  font-weight: 800;
}

.cal-day-cell.other-month {
  color: var(--text-light);
  opacity: 0.4;
}

.expanded-grid .cal-day-cell {
  min-height: 44px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
}

/* ==========================================================================
   FULL-SCREEN EXAMINATION ENGINE
   ========================================================================== */
.test-exam-fullscreen-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 99999;
  background: var(--bg-main);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInFocus 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exam-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

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

.exam-brand-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-header-divider {
  width: 1px;
  height: 28px;
  background: var(--border-card);
}

.exam-badge-pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--primary-teal-light);
  color: var(--primary-teal);
}

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

.exam-timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--primary-teal);
}

.exam-submit-header-btn {
  background: var(--primary-teal);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exam-submit-header-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.exam-close-icon-btn {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exam-close-icon-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

.exam-viewport-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.exam-question-area {
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  overflow-y: auto;
  position: relative;
}

.exam-progress-bar-container {
  margin-bottom: 24px;
}

.exam-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.exam-progress-track {
  height: 8px;
  background: var(--border-card);
  border-radius: 9999px;
  overflow: hidden;
}

.exam-progress-fill {
  height: 100%;
  background: var(--primary-teal);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.exam-q-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exam-q-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.exam-q-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 20px;
}

.exam-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-main);
  border: 2px solid var(--border-card);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.exam-option-card:hover {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.exam-option-card.selected {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  font-weight: 700;
}

.exam-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.exam-option-card.selected .exam-option-letter {
  background: var(--primary-teal);
  color: #ffffff;
}

.exam-nav-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.exam-nav-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.exam-nav-btn.primary {
  background: var(--primary-teal);
  color: #ffffff;
  border: none;
}

.exam-nav-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.exam-nav-btn.secondary:hover {
  background: var(--bg-main);
}

.exam-palette-sidebar {
  background: var(--bg-card);
  border-left: 1px solid var(--border-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

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

.exam-palette-legend {
  display: flex;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.answered { background: var(--primary-teal); }
.legend-dot.unvisited { background: var(--border-card); }
.legend-dot.review { background: #f59e0b; }

.exam-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.palette-btn {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.palette-btn.current {
  outline: 2px solid var(--primary-teal);
  outline-offset: 1px;
}

.palette-btn.answered {
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
}

.palette-btn.review {
  background: #fef3c7;
  color: #d97706;
  border-color: #fcd34d;
}

.exam-summary-box {
  margin-top: auto;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-weight: 600;
}

.exam-result-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.exam-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* Mobile Question Palette Drawer Toggle Button */
.exam-palette-toggle-btn {
  display: none;
  align-items: center;
  gap: 5px;
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border: 1px solid rgba(0, 95, 96, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-palette-close-btn {
  display: none;
}

.exam-palette-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99998 !important;
}

.exam-palette-backdrop.active {
  display: block;
}

@media (max-width: 850px) {
  .exam-header-bar {
    padding: 10px 14px;
    gap: 8px;
  }

  .exam-brand-title-text,
  .exam-header-divider,
  .exam-title-sub {
    display: none !important;
  }

  .exam-submit-header-btn {
    display: inline-flex !important;
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    align-items: center;
    background: var(--primary-teal);
    color: #ffffff;
  }

  .exam-header-left {
    gap: 6px;
    min-width: 0;
  }

  .exam-title-wrap {
    min-width: 0;
    overflow: hidden;
  }

  #runner-test-title {
    font-size: 13px !important;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 105px;
  }

  .exam-header-right {
    gap: 6px;
  }

  .exam-palette-toggle-btn {
    display: inline-flex;
    padding: 5px 8px;
    font-size: 11px;
  }

  .exam-timer-box {
    padding: 5px 8px;
    font-size: 12px;
  }

  .exam-viewport-layout {
    grid-template-columns: 1fr;
  }

  .exam-question-area {
    padding: 14px 12px;
  }

  /* Slide-Over Full-Height Drawer on Mobile (Zero Top Gap) */
  .exam-palette-sidebar {
    position: fixed;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 310px;
    max-width: 88vw;
    background: var(--bg-card);
    border-left: 1px solid var(--border-card);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    z-index: 99999 !important;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .exam-palette-sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-palette-close-btn {
    display: flex;
  }
}

@media (max-width: 600px) {
  .exam-nav-footer {
    display: grid !important;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 8px;
    padding: 12px 10px calc(28px + env(safe-area-inset-bottom, 24px)) 10px !important;
    background: var(--bg-card);
    border-top: 1px solid var(--border-card);
    position: sticky;
    bottom: 0;
    z-index: 100;
    margin-top: 14px;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
  }

  .exam-nav-btn {
    padding: 12px 4px !important;
    font-size: 12px !important;
    font-weight: 800;
    justify-content: center !important;
    text-align: center;
    white-space: nowrap;
    width: 100%;
    border-radius: 10px !important;
  }
}

/* Question Bank & PYQ Filter Pills & Tabs */
.class-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.class-tab-pill {
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.class-tab-pill:hover {
  background: var(--bg-card);
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

.class-tab-pill.active {
  background: var(--primary-teal-light);
  border-color: var(--primary-teal);
  color: var(--primary-teal);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 95, 96, 0.12);
}

.chapter-thumbnail-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subject-chapter-accordion-card:hover .chapter-thumbnail-card {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Student Leaderboard Filter Pill Tabs */
.leaderboard-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.leaderboard-tab-btn.active {
  background: var(--primary-teal) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(0, 95, 96, 0.3);
}

.leaderboard-tab-btn.active svg {
  stroke: #ffffff !important;
}

.class-tab-pill.gold-active {
  background: #fef3c7;
  border-color: #d97706;
  color: #b45309;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

/* Student Leaderboard & Rival Overtake Widget Styles */
.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.leaderboard-table tr {
  transition: background 0.15s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(0, 95, 96, 0.03);
}

.leaderboard-row-highlight {
  background: var(--primary-teal-light) !important;
  border-left: 4px solid var(--primary-teal);
  font-weight: 700;
}

.rank-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  font-weight: 900;
  font-size: 13.5px;
  line-height: 1;
  flex-shrink: 0;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
  color: #b45309;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
  border: 1.5px solid #f59e0b;
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  color: #475569;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
  border: 1.5px solid #94a3b8;
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #ffedd5 0%, #fdba74 100%);
  color: #c2410c;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
  border: 1.5px solid #fb923c;
}

.rank-badge.rank-other {
  background: var(--bg-main);
  border: 1.5px solid var(--border-card);
  color: var(--text-muted);
  font-size: 12px;
}

.lb-tied-tag {
  font-size: 8px;
  opacity: 0.85;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: block;
  margin-top: 1px;
}

/* Leaderboard Avatar Styles (Never squished or distorted) */
.lb-avatar-img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.lb-avatar-placeholder {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--accent-mint) 100%);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 2px solid var(--border-card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.leaderboard-table .targeto-badges-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

.leaderboard-table .badge-icon-32 {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  vertical-align: middle;
}

.leaderboard-table .badge-extra-counter {
  font-size: 9.5px;
  padding: 1px 4px;
  border-radius: 4px;
}

.lb-you-badge {
  font-size: 9px;
  font-weight: 800;
  background: var(--primary-teal);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  display: inline-block;
  flex-shrink: 0;
}

.lb-xp-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.lb-xp-text {
  font-size: 14px;
  font-weight: 900;
  color: var(--primary-teal);
  letter-spacing: -0.01em;
}

.lb-xp-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lb-student-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lb-student-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-student-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.lb-streak-tag {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--text-muted);
}

.lb-mobile-tier {
  display: none;
}

/* Clickable Student Chip & Public Profile Trigger Styles */
.clickable-student-chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  min-width: 0;
}

.clickable-student-chip:hover {
  background: var(--primary-teal-light);
  transform: translateX(3px);
}

.clickable-student-chip .student-name-text {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.2s ease;
  font-weight: 700;
  font-size: 13.5px;
}

.clickable-student-chip:hover .student-name-text {
  text-decoration-color: var(--primary-teal);
  color: var(--primary-teal);
}

.profile-hint-pill {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary-teal);
  background: var(--bg-surface);
  border: 1px solid rgba(0, 95, 96, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  opacity: 0.65;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.clickable-student-chip:hover .profile-hint-pill {
  opacity: 1;
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
}

/* =========================================================
   Mobile Leaderboard Adaptive Card Engine (Max-Width 768px)
   ========================================================= */
@media (max-width: 768px) {
  .leaderboard-table thead {
    display: none !important;
  }

  .leaderboard-table,
  .leaderboard-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .leaderboard-table tr {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-card) !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .leaderboard-table tr:active {
    transform: scale(0.985);
  }

  .leaderboard-table tr.leaderboard-row-highlight {
    background: var(--primary-teal-light) !important;
    border: 1.5px solid var(--primary-teal) !important;
    box-shadow: 0 4px 14px rgba(0, 95, 96, 0.18) !important;
  }

  .leaderboard-table td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  /* 1. Rank Badge Column */
  .leaderboard-table td.lb-col-rank {
    flex-shrink: 0 !important;
    width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 2. Hide Redundant Standalone Columns on Mobile */
  .leaderboard-table td.lb-col-level,
  .leaderboard-table td.lb-col-stream {
    display: none !important;
  }

  /* 3. Student Column (Flexible middle) */
  .leaderboard-table td.lb-col-student {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .clickable-student-chip {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  .clickable-student-chip:hover {
    transform: none !important;
    background: transparent !important;
  }

  .lb-avatar-img,
  .lb-avatar-placeholder {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .lb-student-info {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .lb-student-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .lb-student-name-row .student-name-text {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 120px !important;
  }

  .lb-student-sub-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .lb-mobile-tier {
    display: inline-block !important;
    font-size: 9px !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .lb-streak-tag {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  .lb-desktop-hint {
    display: none !important;
  }

  /* 4. XP Column (Aligned Right) */
  .leaderboard-table td.lb-col-xp {
    flex-shrink: 0 !important;
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .lb-xp-text {
    font-size: 13.5px !important;
    font-weight: 900 !important;
  }

  .lb-xp-sub {
    font-size: 9px !important;
  }
}

/* Modal Backdrop Overlay & Card Engine */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

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

.stream-modal-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  position: relative;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  margin: auto;
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close-icon-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-icon-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* --- SUBJECTS PANEL & SYLLABUS ACCORDION ENGINE --- */
.subjects-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.subject-card-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.subject-card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-teal);
}

.subject-card-item.active {
  border-color: var(--primary-teal);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--primary-teal-light) 100%);
}

.subject-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.subject-icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.subject-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.subject-card-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

.subject-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-main);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.subject-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-teal) 0%, var(--accent-mint) 100%);
  transition: width 0.4s ease;
}

/* Chapter Accordion Cards */
.subject-chapter-accordion-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.subject-chapter-accordion-card:hover {
  border-color: var(--primary-teal);
}

.subject-chapter-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: var(--bg-surface);
  transition: background 0.2s ease;
}

.subject-chapter-header:hover {
  background: var(--bg-main);
}

.chapter-chevron-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.subject-chapter-accordion-card.open .chapter-chevron-btn {
  transform: rotate(180deg);
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
}

.subject-chapter-body {
  display: none;
  padding: 0 20px 20px 20px;
  border-top: 1px dashed var(--border-card);
  background: var(--bg-main);
}

.subject-chapter-accordion-card.open .subject-chapter-body {
  display: block;
}

/* Topic / Chunk Cards */
.subject-topic-chunk-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.subject-topic-chunk-card.completed {
  border-color: #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, var(--bg-surface) 100%);
}

.chunk-claim-xp-btn {
  background: linear-gradient(135deg, var(--primary-teal) 0%, #007c7d 100%);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 95, 96, 0.2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chunk-claim-xp-btn .xp-pill-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.chunk-claim-xp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 95, 96, 0.35);
}

.chunk-claim-xp-btn:hover .xp-pill-badge {
  background: rgba(255, 255, 255, 0.32);
}

.complete-entire-chapter-btn {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.complete-entire-chapter-btn .xp-pill-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
}

.complete-entire-chapter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.uncomplete-entire-chapter-btn {
  background: var(--bg-main);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.uncomplete-entire-chapter-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

.recalculate-schedule-btn {
  background: var(--primary-teal-light);
  color: var(--primary-teal);
  border: 1px solid rgba(0, 95, 96, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.recalculate-schedule-btn:hover {
  background: var(--primary-teal);
  color: #ffffff;
  transform: translateY(-1px);
}

.chunk-claimed-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* XP Reward Pop-Up Floating Animation */
@keyframes floatXpReward {
  0% { opacity: 0; transform: translateY(10px) scale(0.8); }
  20% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  80% { opacity: 1; transform: translateY(-40px) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.9); }
}

.xp-reward-toast-pop {
  position: fixed;
  top: 90px;
  right: 30px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  animation: floatXpReward 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Prominent Trigger Button for "Already studied this? Click here to add" */
.pk-trigger-btn-prominent {
  background: linear-gradient(135deg, var(--primary-teal) 0%, #00888a 100%);
  color: #ffffff !important;
  border: 1.5px solid var(--primary-teal);
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 95, 96, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.pk-trigger-btn-prominent:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 95, 96, 0.35);
  background: linear-gradient(135deg, #007577 0%, #009ea1 100%);
}

/* --- PRIOR KNOWLEDGE BACKFILL MODAL RESPONSIVE ENGINE --- */
.prior-modal-card {
  max-width: 860px;
  width: 95%;
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 20px 24px;
  border: 1px solid var(--border-card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .prior-modal-card {
    padding: 16px;
    border-radius: 16px;
    max-height: 92vh;
  }
}

.pk-modal-chapter-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  min-height: auto;
  box-sizing: border-box;
}

/* Subject Tabs Scroll Indicator Wrapper */
.pk-tabs-scroll-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.pk-tabs-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-surface));
  pointer-events: none;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.pk-tabs-scroll-wrapper.scrolled-end::after {
  opacity: 0;
}

.pk-tabs-scroll-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.pk-tabs-scroll-inner::-webkit-scrollbar {
  display: none;
}

/* Loading Skeleton for Backfill Modal */
.pk-loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.pk-skeleton-card {
  background: var(--bg-main);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pk-shimmer 1.4s ease infinite;
}

.pk-skeleton-bar {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--border-card) 25%, var(--bg-surface) 50%, var(--border-card) 75%);
  background-size: 200% 100%;
  animation: pk-shimmer 1.4s ease infinite;
}

.pk-skeleton-bar.short { width: 45%; }
.pk-skeleton-bar.medium { width: 70%; }
.pk-skeleton-bar.long { width: 90%; }
.pk-skeleton-bar.tiny { width: 25%; height: 10px; }

@keyframes pk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pk-modal-chapter-card.all-selected {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.pk-chapter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pk-chapter-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 3px 0;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}

.pk-chapter-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.pk-select-btn {
  background: var(--bg-surface);
  color: var(--primary-teal);
  border: 1.5px solid var(--primary-teal);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.pk-select-btn.selected {
  background: var(--primary-teal);
  color: #ffffff;
  border-color: var(--primary-teal);
}

.pk-chapter-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.pk-topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}

.pk-topic-row:hover {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);
}

.pk-topic-row.selected {
  border-color: var(--primary-teal);
  background: rgba(0, 95, 96, 0.08);
}

/* ==========================================================================
   ADMIN & SUPERADMIN STREAK SIMULATOR STYLES
   ========================================================================== */
.admin-streak-simulator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.96) 100%);
  border: 1.5px solid #334155;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  color: #f8fafc;
}

.sim-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f59e0b;
  color: #0f172a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sim-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sim-label strong {
  font-size: 14px;
  color: #f8fafc;
}

.sim-date-sub {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.sim-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.sim-btn:hover {
  transform: translateY(-2px);
}

.sim-btn:active {
  transform: scale(0.96);
}

.sim-btn-primary {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}
.sim-btn-primary:hover {
  background: #0369a1;
}

.sim-btn-success {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.sim-btn-success:hover {
  background: #059669;
}

.sim-btn-reset {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.sim-btn-reset:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* --- Announcement Modal & Rendered Markdown Styles --- */
.announcement-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.announcement-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  color: var(--text-main);
  max-width: 580px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}

.announcement-badge-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--accent-purple-light);
  color: var(--accent-purple);
  border: 1px solid var(--accent-purple-border);
  display: inline-block;
}

/* Rendered Markdown Typography & Images */
.md-h1 { font-size: 20px; font-weight: 800; margin: 12px 0 8px; color: var(--text-main); line-height: 1.3; }
.md-h2 { font-size: 17px; font-weight: 800; margin: 10px 0 6px; color: var(--text-main); line-height: 1.3; }
.md-h3 { font-size: 15px; font-weight: 700; margin: 8px 0 4px; color: var(--text-main); line-height: 1.3; }
.md-p { font-size: 14px; line-height: 1.6; margin-bottom: 10px; color: var(--text-body); }
.md-link { color: var(--primary-teal); font-weight: 700; text-decoration: underline; word-break: break-all; }
.md-link:hover { color: var(--accent-mint); }
.md-blockquote { border-left: 4px solid var(--primary-teal); padding-left: 12px; margin: 10px 0; color: var(--text-muted); font-style: italic; background: var(--primary-teal-light); padding-top: 6px; padding-bottom: 6px; border-radius: 0 8px 8px 0; }
.md-code-block { background: #0f172a; color: #f8fafc; padding: 12px 14px; border-radius: 10px; font-family: monospace; font-size: 12px; overflow-x: auto; margin: 10px 0; }
.md-inline-code { background: rgba(0, 95, 96, 0.1); color: var(--primary-teal); padding: 2px 6px; border-radius: 5px; font-family: monospace; font-size: 12px; font-weight: 700; }
.md-ul, .md-ol { padding-left: 20px; margin: 8px 0 12px; color: var(--text-body); font-size: 14px; }
.md-li, .md-oli { margin-bottom: 4px; line-height: 1.5; }

.md-image-wrapper {
  margin: 14px 0;
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-main);
  border: 1px solid var(--border-card);
}
.md-image {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}
.md-image-caption {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px;
  font-style: italic;
  background: rgba(0, 0, 0, 0.02);
}

/* --- STUDENT FEEDBACK & BUG REPORT MODAL STYLES --- */
.fb-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body);
  background: var(--bg-main);
  border: 1.5px solid var(--border-card);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.fb-type-chip:hover {
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

.fb-type-chip.active {
  background: var(--primary-teal);
  color: #ffffff !important;
  border-color: var(--primary-teal);
  box-shadow: 0 3px 10px rgba(0, 95, 96, 0.25);
}

.fb-upload-dropzone {
  border: 1.5px dashed var(--border-card);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  background: var(--bg-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  color: var(--primary-teal);
}

.fb-upload-dropzone:hover {
  border-color: var(--primary-teal);
  background: var(--primary-teal-light);

/* --- Targeto Badges System Styling --- */
.targeto-badges-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  margin-left: 6px;
}

.badge-icon-32 {
  width: 32px;
  height: 32px;
  object-fit: contain;
  cursor: pointer;
  vertical-align: middle;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}

.badge-icon-32:hover {
  transform: scale(1.2) translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.badge-extra-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.badge-extra-counter:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-main);
}

/* Micro-card Hover Popover */
.badge-microcard-popover {
  position: fixed;
  z-index: 100000;
  width: 240px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: badgePopoverSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .badge-microcard-popover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

@keyframes badgePopoverSlide {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.badge-microcard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.badge-microcard-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.badge-microcard-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.badge-microcard-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 3px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-microcard-tag.badge-tag-special {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.badge-microcard-tag.badge-tag-milestone {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.3);
}

.badge-microcard-tag.badge-tag-heritage {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.3);
}

.badge-microcard-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.badge-microcard-footer {
  font-size: 11px;
  font-weight: 600;
  color: #a1a1aa;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  margin-top: 6px;
}

/* Badges Showcase Grid */
.badges-showcase-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 16px !important;
  padding: 12px 0 !important;
  width: 100% !important;
}

.badge-showcase-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 16px 12px !important;
  background: var(--bg-main) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 14px !important;
  transition: all 0.22s ease !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.badge-showcase-card.unlocked {
  background: var(--bg-surface) !important;
  border-color: rgba(0, 95, 96, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.badge-showcase-card.unlocked:hover {
  transform: translateY(-3px) !important;
  border-color: var(--primary-teal) !important;
  box-shadow: 0 8px 24px rgba(0, 95, 96, 0.2) !important;
}

.badge-showcase-card.locked {
  opacity: 0.55 !important;
  filter: grayscale(0.8) !important;
}

.badge-card-icon-wrap {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-card-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.badge-lock-overlay {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #18181b;
  color: #a1a1aa;
  border-radius: 50%;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3f3f46;
}

.badge-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.badge-card-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Badge Unlock Toast Celebration Modal */
.badge-unlock-toast-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: backdropFadeIn 0.3s ease;
}

.badge-unlock-toast-content {
  position: relative;
  width: 90%;
  max-width: 380px;
  padding: 36px 28px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: badgePopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-unlock-glow {
  position: absolute;
  top: 20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
  animation: pulseGlow 2s infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0.9; }
}

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

.badge-unlock-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
  animation: badgeBounce 0.6s ease;
}

@keyframes badgeBounce {
  0% { transform: scale(0.3) rotate(-20deg); }
  50% { transform: scale(1.2) rotate(10deg); }
  70% { transform: scale(0.9) rotate(-5deg); }
  100% { transform: scale(1) rotate(0); }
}

.badge-unlock-subtitle {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #facc15;
  margin-bottom: 6px;
}

.badge-unlock-name {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.badge-unlock-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 24px;
}

.badge-unlock-btn {
  width: 100%;
  padding: 12px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
  transition: transform 0.2s ease;
}

.badge-unlock-btn:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   TARGETO PRO & PRICING EXPERIENCE STYLING
   ========================================================================== */

/* Golden Pro Name Typography System */
.pro-user-name {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 35%, #d97706 70%, #fbbf24 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900 !important;
  letter-spacing: -0.01em;
  filter: drop-shadow(0 0 1px rgba(245, 158, 11, 0.95)) drop-shadow(0 1px 4px rgba(217, 119, 6, 0.45));
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pro-user-badge-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

/* Sidebar Pro Nav Item */
.nav-item.pro-nav-item {
  position: relative;
  transition: all 0.25s ease;
}

.nav-item.pro-nav-item:hover,
.nav-item.pro-nav-item.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.22));
  color: #d97706;
}

.nav-item.pro-nav-item .pro-sidebar-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}

/* Pricing Page Hero & Layout */
.pricing-hero-container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 36px auto;
  padding-top: 12px;
}

.pricing-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25));
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  color: #d97706;
  padding: 5px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pricing-main-heading {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 10px 0;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.pricing-subheading {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Billing Toggle Tabs */
.pricing-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  padding: 4px;
  border-radius: 9999px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.pricing-toggle-tab {
  padding: 8px 20px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pricing-toggle-tab.active {
  background: var(--primary-teal);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 95, 96, 0.3);
}

.pricing-toggle-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

/* Plan Cards Grid */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  max-width: 920px;
  margin: 0 auto 48px auto;
  align-items: stretch;
}

@media (max-width: 820px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-plan-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pricing-plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pricing-plan-card.pro-card-featured {
  border: 2px solid #f59e0b;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.04) 100%);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.18);
}

.pricing-popular-banner {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 9999px;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.plan-price-num {
  font-size: 40px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan-price-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 4px;
}

.plan-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 32px 0;
  font-size: 13.5px;
  color: var(--text-main);
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.plan-feature-icon-yes {
  color: #10b981;
  font-weight: 900;
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.plan-feature-icon-no {
  color: var(--text-muted);
  opacity: 0.45;
  font-weight: 800;
  font-size: 13px;
  margin-top: 1px;
  flex-shrink: 0;
}

.pricing-action-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pricing-action-btn.btn-free {
  background: var(--bg-main);
  color: var(--text-muted);
  border: 1.5px solid var(--border-card);
  cursor: default;
}

.pricing-action-btn.btn-pro {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35);
}

.pricing-action-btn.btn-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.45);
}

/* Feature Comparison Table Section */
.pricing-table-section {
  max-width: 920px;
  margin: 0 auto 48px auto;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.pricing-table-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
  text-align: center;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-card);
}

.matrix-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-card);
}

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

/* Trust Bar */
.pricing-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 920px;
  margin: 0 auto 48px auto;
  padding: 18px 24px;
  background: var(--bg-subtle);
  border-radius: 14px;
  border: 1px solid var(--border-card);
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Pricing FAQ Accordion */
.pricing-faq-section {
  max-width: 780px;
  margin: 0 auto 48px auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  background: transparent;
  border: none;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-answer {
  padding: 0 20px 16px 20px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* --- Targeto Google AdSense Dynamic Slot Card Styles (Free Users Only) --- */
.targeto-ad-slot-card {
  background: var(--bg-card);
  border: 1.5px dashed var(--border-card);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 20px 0;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ad-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.ad-remove-pro-link {
  color: var(--primary-teal);
  text-decoration: none;
  font-weight: 800;
  font-size: 11px;
  transition: opacity 0.2s ease;
}

.ad-remove-pro-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.ad-slot-content {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  overflow: hidden;
}





