/* BPSC TRE 4.0 Computer Teacher Portal Stylesheet */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-hover: #2d3b55;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-primary: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --border-color: #334155;
  --border-light: #475569;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
}

/* Light Mode Overrides */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

/* Light Theme Component Specific Overrides */
body.light-theme .dashboard-hero-card {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

body.light-theme .teacher-cadre-ribbon {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(99, 102, 241, 0.08));
  border-color: rgba(2, 132, 199, 0.25);
}

body.light-theme .locked-paywall-banner {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-color: rgba(245, 158, 11, 0.6);
}

body.light-theme .success-receipt-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .receipt-row {
  border-bottom: 1px solid #e2e8f0;
}

body.light-theme .verified-candidate-pass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.08));
  border-color: rgba(16, 185, 129, 0.35);
}

body.light-theme .code-block,
body.light-theme pre {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light-theme .modal-overlay,
body.light-theme .modal-backdrop {
  background: rgba(15, 23, 42, 0.45);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header & Navigation */
header.app-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-img {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  background: #ffffff;
  transition: transform 0.2s;
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.brand-title h1 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Dashboard Hero Card */
.dashboard-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
}

.hero-logo-img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  border: 2px solid rgba(56, 189, 248, 0.4);
  background: #ffffff;
  flex-shrink: 0;
}

.hero-content {
  flex: 1;
}

.hero-motto {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-amber);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .dashboard-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  .hero-logo-img {
    width: 80px;
    height: 80px;
  }
}

.brand-title span.badge-advt {
  display: inline-block;
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  margin-top: 0.2rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-box {
  position: relative;
  width: 260px;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.85rem 0.5rem 2.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
  pointer-events: none;
}

.btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  transition: all 0.2s;
}

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

/* Tab Navigation Bar */
.nav-tabs-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.nav-tabs-bar::-webkit-scrollbar {
  height: 4px;
}

.nav-tabs-bar::-webkit-scrollbar-track {
  background: transparent;
}

.nav-tabs-bar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.nav-tabs-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.nav-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.02);
}

.nav-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Main Content Area */
main.main-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  width: 100%;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

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

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

/* Section Header Styles */
.section-intro {
  margin-bottom: 1.5rem;
}

.section-intro h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

/* Quick Stats Ribbon */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, border-color 0.2s;
}

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

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

.stat-icon.primary { background: rgba(56, 189, 248, 0.15); color: var(--accent-primary); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-icon.rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.stat-content h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-content .stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-content .stat-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Alerts and Notices */
.alert-box {
  background-color: rgba(56, 189, 248, 0.1);
  border-left: 4px solid var(--accent-primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.75rem;
  font-size: 0.92rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.alert-box.warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-left-color: var(--accent-amber);
}

.alert-box.critical {
  background-color: rgba(244, 63, 94, 0.1);
  border-left-color: var(--accent-rose);
}

/* Tier Badges */
.badge-tier {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-tier.tier-1 {
  background-color: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.badge-tier.tier-2 {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-tier.tier-3 {
  background-color: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Relevance Badges */
.badge-critical { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-high { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-medium { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-low { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.4); }
.badge-skip { background: rgba(100, 116, 139, 0.2); color: #64748b; border: 1px dashed rgba(100, 116, 139, 0.4); text-decoration: line-through; }

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Weightage Blueprint Bars */
.blueprint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tier-block {
  margin-bottom: 1.5rem;
}

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

.tier-title {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topic-row {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s;
}

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

.topic-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topic-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.topic-ncert-badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.topic-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: right;
}

.topic-questions {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.topic-priority {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Accordion / Unit Detail Cards */
.unit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.2s;
}

.unit-card.completed {
  border-left: 4px solid var(--accent-emerald);
}

.unit-header {
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background-color: var(--bg-secondary);
  user-select: none;
}

.unit-header:hover {
  background-color: var(--bg-hover);
}

.unit-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.unit-number {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.unit-title-group h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.unit-title-group .unit-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

.unit-header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.accordion-arrow {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}

.unit-card.open .accordion-arrow {
  transform: rotate(180deg);
}

.unit-body {
  display: none;
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.unit-card.open .unit-body {
  display: block;
}

.chapter-block {
  margin-bottom: 1.25rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.chapter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topic-list {
  list-style: none;
}

.topic-item {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
  line-height: 1.5;
}

.topic-item::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--accent-primary);
  font-weight: bold;
}

/* NCERT Library Grid */
.ncert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.ncert-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}

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

.ncert-card-top {
  margin-bottom: 1rem;
}

.ncert-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ncert-file-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
}

.ncert-chapter-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ncert-focus-box {
  background-color: rgba(56, 189, 248, 0.08);
  border-left: 3px solid var(--accent-primary);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.75rem;
}

.ncert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.btn-open-pdf {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white;
  border: none;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-open-pdf:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  transform: translateY(-1px);
}

/* 8-Week Study Plan Tracker */
.week-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.week-header {
  padding: 1.15rem 1.5rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.week-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.week-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.week-progress-badge {
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  color: var(--accent-primary);
}

.milestones-list {
  list-style: none;
  padding: 0.5rem 0;
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s;
}

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

.milestone-item:hover {
  background-color: var(--bg-hover);
}

.milestone-checkbox {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-emerald);
}

.milestone-content {
  flex: 1;
}

.milestone-day {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-primary);
  margin-bottom: 0.15rem;
}

.milestone-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.45;
}

.milestone-item.checked .milestone-text {
  text-decoration: line-through;
  color: var(--text-dim);
}

/* Cheat Sheet Cards */
.cheatsheet-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.cheatsheet-header {
  padding: 1.15rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.cheatsheet-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.cheatsheet-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.cheatsheet-body {
  padding: 1.5rem;
}

.subcard {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}

.subcard-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.65rem;
}

pre.code-block {
  background-color: #0b1120;
  border: 1px solid #1e293b;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  overflow-x: auto;
  color: #38bdf8;
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.code-explanation {
  font-size: 0.84rem;
  color: var(--text-muted);
  border-left: 2px solid var(--accent-secondary);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
}

/* Clean Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-bottom: 0.75rem;
}

.data-table th, .data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  font-weight: 700;
}

.data-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Quiz Engine Styles */
.quiz-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-config-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-tertiary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quiz-meta-tag {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quiz-question-box {
  margin-bottom: 1.5rem;
}

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

.quiz-question-num {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.quiz-question-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 1.25rem;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.quiz-option-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: all 0.15s;
}

.quiz-option-btn:hover:not(:disabled) {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
}

.quiz-option-btn.selected {
  border-color: var(--accent-primary);
  background-color: rgba(56, 189, 248, 0.15);
}

.quiz-option-btn.correct {
  border-color: var(--accent-emerald) !important;
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #34d399;
}

.quiz-option-btn.wrong {
  border-color: var(--accent-rose) !important;
  background-color: rgba(244, 63, 94, 0.2) !important;
  color: #fb7185;
}

.option-prefix {
  font-weight: 700;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.quiz-explanation-box {
  background-color: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
}

/* Modal Styling */
.modal-overlay,
.modal-backdrop,
#quiz-score-modal,
#paywall-checkout-modal,
#payment-success-modal,
#restore-access-modal,
#admin-analytics-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.25rem;
}

.modal-overlay.open,
.modal-backdrop.open,
#quiz-score-modal.open,
#paywall-checkout-modal.open,
#payment-success-modal.open,
#restore-access-modal.open,
#admin-analytics-modal.open {
  display: flex !important;
}

.modal-content,
.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-close-modal {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-light);
  transform: rotate(90deg);
}

/* Footer */
footer.app-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 820px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }
  .brand-section {
    width: 100%;
    justify-content: flex-start;
  }
  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  .search-box {
    width: 100%;
    order: 2;
  }
  .header-actions .btn-restore-nav {
    flex: 1;
    order: 1;
    justify-content: center;
  }
  .header-actions #btn-toggle-theme,
  .header-actions button[title*="Print"] {
    order: 1;
  }
  .teacher-cadre-ribbon {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
    gap: 0.75rem;
  }
  .cadre-badge-group {
    justify-content: flex-start;
  }
  .teacher-cadre-ribbon > div:last-child {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .teacher-cadre-ribbon button {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    text-align: center;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .ncert-grid {
    grid-template-columns: 1fr;
  }
  .topic-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .topic-stats {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  .modal-content,
  .modal-card {
    padding: 1.25rem;
    max-height: 92vh;
  }
}

@media (max-width: 480px) {
  .brand-title h1 {
    font-size: 1rem;
  }
  .brand-logo-img {
    width: 38px;
    height: 38px;
  }
  .hero-content h2 {
    font-size: 1.2rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .teacher-cadre-ribbon > div:last-child {
    flex-direction: column;
  }
  .teacher-cadre-ribbon button {
    width: 100%;
  }
}

/* ============================================================= */
/* 👨‍🏫 DEDICATED COMPUTER TEACHER & RAZORPAY ₹9 PAYWALL STYLES */
/* ============================================================= */

/* Teacher Cadre Context Banner */
.teacher-cadre-ribbon {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cadre-badge-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cadre-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cadre-badge.highlight {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* Pedagogy & Exam Frequency Tags */
.pedagogy-box {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--accent-secondary);
  padding: 0.65rem 0.95rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.tre-freq-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Free vs Locked Badges */
.badge-free-preview {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-locked-unit {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Locked Unit Frosted Glass Effect */
.locked-unit-wrapper {
  position: relative;
  overflow: hidden;
}

.locked-blur-preview {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  opacity: 0.4;
  max-height: 180px;
  overflow: hidden;
}

.locked-paywall-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.95));
  border: 2px dashed rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.btn-unlock-course {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border: none;
  padding: 0.65rem 1.45rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.2s;
}

.btn-unlock-course:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Paywall Modal Specifics */
.price-tag-ribbon {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.current-price {
  font-size: 2.75rem;
  font-weight: 900;
  color: #34d399;
  line-height: 1;
}

.original-price {
  font-size: 1.25rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.discount-badge {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.paywall-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  text-align: left;
}

.paywall-features-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-razorpay-pay {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white;
  border: none;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s;
}

.btn-razorpay-pay:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  transform: translateY(-2px);
}

/* Candidate Verified Digital Pass */
.verified-candidate-pass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.candidate-pass-badge {
  background: #10b981;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Restore Access Button & Badges */
.btn-restore-nav {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-restore-nav:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--accent-primary);
}

/* Payment Success & Receipt Styling */
.success-receipt-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
  text-align: left;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

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

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

.receipt-val {
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-copy-id {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
}

.btn-copy-id:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.btn-copy-id.copied {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.6);
  color: #34d399;
}

.success-check-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid #10b981;
  color: #34d399;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem auto;
}
