/* cloudflare_app/public/styles.css */
/* Modern Minimalist & Soothing Design System for ProsnoBank */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'SolaimanLipi';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/SolaimanLipi-Normal.woff2') format('woff2');
  unicode-range: U+0980-09FF, U+0000-007F;
}

@font-face {
  font-family: 'SolaimanLipi';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/SolaimanLipi-Bold.woff2') format('woff2');
  unicode-range: U+0980-09FF, U+0000-007F;
}

:root {
  /* Soothing, Modern Light Palette */
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-active: #eff6ff;

  --border-subtle: #f1f5f9;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  --primary: #1e3a8a;
  --primary-light: #eff6ff;
  --primary-hover: #1e40af;
  --accent: #0284c7;
  --accent-light: #e0f2fe;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);

  --font-sans: 'SolaimanLipi', 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-bangla: 'SolaimanLipi', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Dark Mode Palette */
body.dark-mode {
  --bg-app: #090d16;
  --bg-card: #111827;
  --bg-subtle: #1f2937;
  --bg-hover: #1e293b;
  --bg-active: #172554;

  --border-subtle: #1f2937;
  --border-default: #374151;
  --border-strong: #4b5563;
  --border-focus: #60a5fa;

  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;

  --primary-light: #1e293b;
  --accent-light: #0c4a6e;
  --success-light: #064e3b;
  --warning-light: #78350f;
  --danger-light: #7f1d1d;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Minimal Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

/* Navbar */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-xs);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.logo-badge {
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-info h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.live-count-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--success-light);
  color: var(--success);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.live-count-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

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

/* Tools Dropdown Menu */
.tools-dropdown {
  position: relative;
  display: inline-block;
}

.tools-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 1000;
  padding: 6px 0;
}

.tools-dropdown-menu.open {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

.tools-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
  font-weight: 500;
}

.tools-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

@media (max-width: 900px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Button Component System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: #0369a1;
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border-default);
}
.btn-outline:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* App Container */
.app-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  flex: 1;
}

/* Filter Sidebar */
.filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 72px;
  height: fit-content;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  box-shadow: var(--shadow-xs);
}

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

.sidebar-header h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-reset {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.btn-reset:hover {
  background: var(--accent-light);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Segmented Control (Pill switch) */
.segmented-control {
  display: flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.segment-item {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.segment-item.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Form Controls */
.form-select, .form-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus, .form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Suggestion Tier Cards */
.tier-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tier-pill:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.tier-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

body.dark-mode .tier-pill.active {
  color: #60a5fa;
  border-color: #3b82f6;
}

.tier-count {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}
body.dark-mode .tier-count {
  background: rgba(255, 255, 255, 0.1);
}

/* Toggle Switch */
.switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.switch-input {
  appearance: none;
  width: 36px;
  height: 20px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.switch-input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch-input:checked {
  background: var(--primary);
}

.switch-input:checked::after {
  transform: translateX(16px);
}

/* Feed Section */
.feed-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Feed Toolbar */
.feed-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.search-bar-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

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

.search-input-wrapper input {
  padding-left: 36px;
}

.filter-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.active-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
}

.filter-chip-remove {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
}
.filter-chip-remove:hover {
  color: var(--danger);
}

/* Question Cards */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.question-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

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

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-id {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.badge-class {
  background: #e0e7ff;
  color: #3730a3;
}
body.dark-mode .badge-class {
  background: #1e1b4b;
  color: #c7d2fe;
}

.badge-subject {
  background: #ecfdf5;
  color: #065f46;
}
body.dark-mode .badge-subject {
  background: #064e3b;
  color: #a7f3d0;
}

.badge-type {
  background: #f1f5f9;
  color: #475569;
}
body.dark-mode .badge-type {
  background: #1f2937;
  color: #cbd5e1;
}

.badge-tier-super {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}
body.dark-mode .badge-tier-super {
  background: #7f1d1d;
  color: #fecaca;
}

.badge-tier-high {
  background: #fef3c7;
  color: #92400e;
}
body.dark-mode .badge-tier-high {
  background: #78350f;
  color: #fde68a;
}

.source-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.source-pill {
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Question Stem */
.question-stem {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-line;
}

.question-diagram {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.question-diagram img {
  width: auto;
  max-width: 100%;
  max-height: min(360px, 55vh);
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: #fff;
  padding: 6px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-diagram img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .question-diagram img {
    max-height: 280px;
    width: auto;
    max-width: 100%;
  }
}

/* MCQ Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

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

.option-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  user-select: none;
}

.option-cell:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.option-cell.selected-correct {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #15803d;
  font-weight: 600;
}
body.dark-mode .option-cell.selected-correct {
  background: #064e3b;
  border-color: #10b981;
  color: #a7f3d0;
}

.option-cell.selected-wrong {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}
body.dark-mode .option-cell.selected-wrong {
  background: #7f1d1d;
  border-color: #f87171;
  color: #fecaca;
}

/* CQ Sub-questions */
.cq-subparts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.cq-part {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.6;
}

.cq-key {
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
}
body.dark-mode .cq-key {
  color: #60a5fa;
}

.cq-marks {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
}

/* Card Actions */
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  gap: 10px;
  flex-wrap: wrap;
}

.card-actions-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.explanation-drawer {
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  display: none;
  margin-top: 4px;
}

.explanation-drawer.open {
  display: block;
}

/* Floating Exam Paper Tray (Bottom Bar) */
.paper-tray-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13.5px;
  font-weight: 600;
}

.paper-tray-bar.visible {
  transform: translateX(-50%) translateY(0);
}

.tray-btn-generate {
  background: #fff;
  color: var(--primary);
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.15s ease;
}
.tray-btn-generate:hover {
  background: #f1f5f9;
}

/* Shimmer Loading Skeleton */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border-default) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-subtle);
}

/* Lightbox for Diagrams */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  cursor: zoom-in;
}
.lightbox-overlay img.zoomed {
  transform: scale(1.6);
  cursor: zoom-out;
}

/* Responsive */
@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  .filter-sidebar {
    position: static;
    max-height: none;
  }
  .nav-links-menu {
    display: none;
  }
}

/* ==========================================================================
   View Router & Navigation Tabs Architecture
   ========================================================================== */

.page-view {
  width: 100%;
  animation: fadeInView 0.25s ease-in-out;
}

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

.nav-links-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-tab-link:hover {
  color: var(--accent);
  background: var(--bg-subtle);
}

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

.nav-tab-app {
  color: #0284c7 !important;
  background: #e0f2fe;
}
.nav-tab-app:hover {
  background: #bae6fd;
}

/* ==========================================================================
   Production Landing Page Styling
   ========================================================================== */

.landing-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Section */
.landing-hero {
  padding: 70px 0 50px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: radial-gradient(ellipse at top, #f0f9ff 0%, #f8fafc 70%);
  border-bottom: 1px solid var(--border-default);
}

body.dark-mode .landing-hero {
  background: radial-gradient(ellipse at top, #0f172a 0%, #090d16 70%);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #bae6fd;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}

body.dark-mode .hero-pill-badge {
  background: #0c4a6e;
  color: #7dd3fc;
  border-color: #0284c7;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  max-width: 900px;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .hero-title .text-gradient {
  background: linear-gradient(135deg, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 780px;
  margin-bottom: 32px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-hero-primary {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7, #1e3a8a);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-hero-secondary {
  padding: 12px 28px;
  font-size: 15.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-feature-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-feature-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Live Stats Grid */
.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 40px 0;
}

@media (max-width: 768px) {
  .landing-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title {
    font-size: 28px;
  }
}

.landing-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

body.dark-mode .stat-number {
  color: #38bdf8;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Sections */
.landing-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-default);
}

.section-head {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 40px auto;
}

.section-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Mini Exam Paper Teaser Card */
.teaser-paper-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.teaser-paper-card {
  background: #ffffff;
  color: #000000;
  font-family: 'SolaimanLipi', serif;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 32px 36px;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

.teaser-paper-header {
  text-align: center;
  border-bottom: 1.5px solid #000;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.teaser-inst-title {
  font-size: 20px;
  font-weight: 700;
}

.teaser-exam-sub {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
}

.teaser-meta-grid {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 6px;
  border-top: 1px dashed #64748b;
  padding-top: 6px;
}

.teaser-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  font-size: 13.5px;
  position: relative;
}

.teaser-columns::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #cbd5e1;
}

.teaser-q-item {
  margin-bottom: 12px;
}

.teaser-q-stem {
  font-weight: 700;
  margin-bottom: 4px;
}

.teaser-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 12px;
  padding-left: 8px;
}

.teaser-omr-row {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
}

.teaser-action-overlay {
  text-align: center;
  margin-top: 24px;
}

/* Comparison Table */
.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.comparison-table th {
  padding: 16px 20px;
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-default);
}

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-secondary);
}

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

.comparison-table th.col-pb, .comparison-table td.col-pb {
  background: rgba(2, 132, 199, 0.04);
  font-weight: 600;
  color: #0369a1;
  border-left: 2px solid #bae6fd;
  border-right: 2px solid #bae6fd;
}

body.dark-mode .comparison-table th.col-pb, body.dark-mode .comparison-table td.col-pb {
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  border-color: #0369a1;
}

/* Education Boards Grid */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .boards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.board-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.board-badge-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.board-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.board-card-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-quote {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.author-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.author-role {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Bottom CTA Banner */
.landing-cta-banner {
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  margin: 50px 0;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.25);
}

.cta-banner-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-banner-sub {
  font-size: 16px;
  color: #cbd5e1;
  max-width: 650px;
  margin: 0 auto 28px auto;
  line-height: 1.6;
}

/* Footer */
.landing-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-default);
  padding: 30px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}


/* ==========================================================================
   EPROSHNOBANK PARITY DESIGN SYSTEM & MASTER WORKSPACE SHELL
   ========================================================================== */

:root {
  --epb-slate-900: #0f172a;
  --epb-slate-800: #1e293b;
  --epb-slate-700: #334155;
  --epb-slate-600: #475569;
  --epb-slate-500: #64748b;
  --epb-slate-400: #94a3b8;
  --epb-slate-300: #cbd5e1;
  --epb-slate-200: #e2e8f0;
  --epb-slate-100: #f1f5f9;
  --epb-slate-50:  #f8fafc;
  --epb-primary:    #2563eb;
  --epb-primary-hover: #1d4ed8;
  --epb-accent:     #0284c7;
  --epb-success:    #059669;
  --epb-warning:    #d97706;
  --epb-danger:     #dc2626;
  --epb-sidebar-w:  260px;
  --epb-sidebar-mini-w: 72px;
  --epb-topbar-h:   60px;
}

/* Master App Shell */
.epb-app-shell {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* 1. Deep Slate Sidebar */
.epb-sidebar {
  width: var(--epb-sidebar-w);
  background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.epb-sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: var(--epb-topbar-h);
}

.epb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.epb-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.epb-brand-text {
  display: flex;
  flex-direction: column;
}

.epb-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.epb-brand-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Sidebar Institute Badge */
.epb-institute-box {
  margin: 14px 12px 6px 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.epb-inst-avatar {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.epb-inst-info {
  overflow: hidden;
  line-height: 1.2;
}

.epb-inst-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epb-inst-eiin {
  font-size: 11px;
  color: #64748b;
}

/* Sidebar Nav Menu */
.epb-nav-menu {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.epb-nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 10px 6px 10px;
}

.epb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.epb-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.epb-nav-item.active {
  background: #334155;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.epb-nav-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.epb-nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

/* Sidebar Footer */
.epb-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.epb-db-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #94a3b8;
}

.epb-db-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* 2. Main Work Stage */
.epb-main-stage {
  margin-left: var(--epb-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Topbar */
.epb-topbar {
  height: var(--epb-topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-xs);
}

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

.epb-btn-menu {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  display: none;
  padding: 6px;
  border-radius: 6px;
}

.epb-view-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.epb-live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(2, 132, 199, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.epb-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 3. Stage Views Container */
.epb-stage-content {
  padding: 24px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.epb-view-pane {
  display: none;
}

.epb-view-pane.active {
  display: block;
  animation: viewFadeIn 0.2s ease;
}

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

/* 4. Teacher Dashboard Styling */
.epb-dash-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.18);
  position: relative;
  overflow: hidden;
}

.epb-dash-hero::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.epb-dash-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.epb-dash-sub {
  font-size: 14.5px;
  color: #cbd5e1;
  max-width: 600px;
  line-height: 1.5;
}

/* KPI Cards Grid */
.epb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.epb-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.epb-kpi-icon.blue   { background: #eff6ff; color: #2563eb; }
.epb-kpi-icon.purple { background: #faf5ff; color: #9333ea; }
.epb-kpi-icon.emerald{ background: #ecfdf5; color: #059669; }
.epb-kpi-icon.amber  { background: #fffbeb; color: #d97706; }

.epb-kpi-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.epb-kpi-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hero Action Tiles */
.epb-actions-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.epb-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.epb-action-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
}

.epb-action-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}

.epb-action-tile-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.epb-action-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.epb-action-tile-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.epb-action-tile-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.epb-action-tile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 10px;
}

/* 5. Question Bank Explorer Enhancements */
.epb-qbank-tier-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.epb-qbank-tier-tab {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.epb-qbank-tier-tab:hover {
  color: var(--text-primary);
}

.epb-qbank-tier-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Subject Grid */
.epb-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.epb-subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}

.epb-subject-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.epb-subject-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.epb-subject-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.epb-subject-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.epb-subject-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Question Type Filter Bar */
.epb-filter-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.epb-type-pills {
  display: flex;
  gap: 8px;
}

.epb-type-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--border-default);
  background: var(--bg-app);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.epb-type-pill:hover {
  border-color: var(--accent);
}

.epb-type-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* 6. Creative Question (CQ) Card Layout */
.epb-cq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease;
}

.epb-cq-card:hover {
  border-color: var(--border-strong);
}

.epb-cq-card.selected {
  border-color: #10b981;
  background: #f0fdf4;
}

.epb-cq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.epb-cq-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.epb-badge-type {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  text-transform: uppercase;
}

.epb-badge-board {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1e40af;
}

.epb-cq-stimulus {
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
}

body.dark-mode .epb-cq-stimulus {
  background: #1e293b;
}

.epb-cq-sub-questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.epb-cq-sub-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.epb-cq-sub-label {
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

.epb-cq-sub-text {
  flex: 1;
}

.epb-cq-sub-marks {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.epb-cq-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-default);
}

/* 7. Sticky Bottom Cart Bar */
.epb-sticky-cart {
  position: fixed;
  bottom: 0;
  left: var(--epb-sidebar-w);
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid #334155;
  color: #ffffff;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.epb-sticky-cart.active {
  transform: translateY(0);
}

.epb-cart-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.epb-cart-count {
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
}

.epb-cart-breakdown {
  font-size: 12.5px;
  color: #94a3b8;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .epb-sidebar {
    transform: translateX(-100%);
  }
  .epb-sidebar.open {
    transform: translateX(0);
  }
  .epb-main-stage {
    margin-left: 0;
  }
  .epb-btn-menu {
    display: block;
  }
  .epb-sticky-cart {
    left: 0;
    padding: 12px 16px;
  }
}

/* ==========================================================================
   8. Print & Export Studio Modal & NCTB 2-Column Print Engine
   ========================================================================== */
.print-studio-box {
  width: 96vw;
  max-width: 1240px;
  height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.print-studio-header {
  background: #0f172a;
  color: #ffffff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  flex-shrink: 0;
}

.print-studio-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.print-studio-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.print-studio-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.print-studio-meta {
  font-size: 12.5px;
  color: #94a3b8;
}

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

/* Studio Toolbar */
.print-studio-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.studio-set-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-toolbar-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.studio-set-pills {
  display: flex;
  gap: 4px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
}

.studio-set-pill {
  border: none;
  background: transparent;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-set-pill:hover {
  color: #0f172a;
}

.studio-set-pill.active {
  background: #1e3a8a;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.studio-mode-selector {
  display: flex;
  gap: 6px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
}

.studio-mode-pill {
  border: none;
  background: transparent;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-mode-pill.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.studio-options-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: #334155;
}

.studio-opt-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Studio Preview Canvas */
.print-studio-stage {
  flex: 1;
  overflow-y: auto;
  background: #475569;
  padding: 32px 16px;
  display: flex;
  justify-content: center;
}

.print-studio-paper-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  padding: 10mm 12mm;
  position: relative;
  font-family: 'SolaimanLipi', 'Hind Siliguri', serif;
  color: #000000;
  box-sizing: border-box;
  overflow: visible;
  transition: border 0.15s ease;
}

/* Studio Density Profiles */
.print-studio-paper-sheet.density-compact {
  padding: 8mm 11mm;
}
.print-studio-paper-sheet.density-compact .studio-paper-header {
  margin-bottom: 6px;
  padding-bottom: 4px;
}
.print-studio-paper-sheet.density-compact .studio-inst-title {
  font-size: 19px;
  line-height: 1.15;
}
.print-studio-paper-sheet.density-compact .studio-exam-sub {
  font-size: 13.5px;
  margin-top: 2px;
}
.print-studio-paper-sheet.density-compact .studio-meta-grid {
  font-size: 12px;
  padding-top: 3px;
  margin-top: 4px;
}
.print-studio-paper-sheet.density-compact .studio-instruction-banner {
  font-size: 11px;
  margin: 4px 0 6px 0;
  padding: 2px 5px;
}
.print-studio-paper-sheet.density-compact .studio-section-banner {
  font-size: 12px;
  margin-bottom: 5px;
  padding: 1px 0;
}
.print-studio-paper-sheet.density-compact .studio-q-item {
  font-size: 11.5px;
  line-height: 1.32;
  margin-bottom: 4.5px;
}
.print-studio-paper-sheet.density-compact .studio-opts-grid {
  font-size: 11px;
  gap: 1px 6px;
  margin-top: 2px;
  padding-left: 14px;
}
.print-studio-paper-sheet.density-compact .studio-columns.two-col {
  column-gap: 16px;
}
.print-studio-paper-sheet.density-compact .studio-signature-strip {
  margin-top: 20px;
  padding-top: 8px;
}

.print-studio-paper-sheet.density-standard {
  padding: 10mm 13mm;
}
.print-studio-paper-sheet.density-standard .studio-q-item {
  font-size: 12.5px;
  line-height: 1.38;
  margin-bottom: 7px;
}

.print-studio-paper-sheet.density-relaxed {
  padding: 14mm 16mm;
}
.print-studio-paper-sheet.density-relaxed .studio-q-item {
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.print-studio-paper-sheet.border-none {
  border: none;
}
.print-studio-paper-sheet.border-single {
  border: 2px solid #000000;
}
.print-studio-paper-sheet.border-double {
  border: 4px double #000000;
}
.print-studio-paper-sheet.border-ornamental {
  border: 3.5px double #0f172a;
  outline: 1.5px dashed #475569;
  outline-offset: -6px;
}

.studio-signature-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 40px;
  padding-top: 14px;
  page-break-inside: avoid;
}
.studio-sig-item {
  text-align: center;
  min-width: 140px;
}
.studio-sig-line {
  border-top: 1.2px dashed #000000;
  margin-bottom: 5px;
  width: 100%;
}
.studio-sig-label {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

/* Centered Translucent Watermark */
.studio-watermark-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 3.8rem;
  font-weight: 800;
  color: #000000;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'SolaimanLipi', sans-serif;
}

/* Paper Header Typography & Moveable Modular Components */
.studio-paper-header {
  position: relative;
  z-index: 2;
  border-bottom: 2px solid #000000;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

/* Split Header (Official Mainstream Layout) */
.studio-paper-header.layout-split .studio-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.studio-paper-header.layout-split .studio-header-left {
  flex: 0 0 auto;
  text-align: left;
  min-width: 75px;
}
.studio-paper-header.layout-split .studio-header-center {
  flex: 1;
  text-align: center;
}
.studio-paper-header.layout-split .studio-header-right {
  flex: 0 0 auto;
  text-align: right;
  min-width: 75px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* Centered Header Layout */
.studio-paper-header.layout-center {
  text-align: center;
}
.studio-paper-header.layout-center .studio-header-top-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

/* Minimalist Compact Layout */
.studio-paper-header.layout-compact {
  padding-bottom: 4px;
  margin-bottom: 6px;
  text-align: center;
}
.studio-paper-header.layout-compact .studio-inst-title {
  font-size: 18px;
}
.studio-paper-header.layout-compact .studio-exam-sub {
  font-size: 13px;
}
.studio-paper-header.layout-compact .studio-meta-grid {
  font-size: 11.5px;
  padding-top: 2px;
  margin-top: 3px;
}

/* Inline Editable Fields */
.studio-editable {
  outline: none;
  cursor: text;
  border-radius: 3px;
  transition: all 0.15s ease;
  display: inline-block;
}
.studio-editable:hover {
  background: rgba(2, 132, 199, 0.08);
  box-shadow: 0 0 0 1px #38bdf8;
}
.studio-editable:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px #0284c7;
}

/* Moveable Block Hover Handle */
.studio-header-block {
  position: relative;
  transition: background 0.15s ease, outline 0.15s ease;
}
.studio-header-block:hover {
  background: rgba(241, 245, 249, 0.65);
  outline: 1px dashed #cbd5e1;
}
.studio-header-block.dragging {
  opacity: 0.35;
  outline: 2px dashed #0284c7;
}
.studio-header-block.drag-over {
  border-top: 2px solid #0284c7;
  background: rgba(2, 132, 199, 0.08);
}
.studio-drag-handle {
  cursor: grab;
  color: #94a3b8;
  padding: 0 4px;
  font-size: 11px;
  user-select: none;
}
.studio-drag-handle:active {
  cursor: grabbing;
}
.studio-paper-header.layout-split .studio-header-top-row.flipped {
  flex-direction: row-reverse;
}
.studio-block-move-tools {
  position: absolute;
  top: -14px;
  right: 0;
  display: none;
  background: #0f172a;
  border-radius: 4px;
  padding: 1px 5px;
  gap: 3px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.studio-header-block:hover > .studio-block-move-tools {
  display: inline-flex;
  align-items: center;
}
.studio-block-move-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
}
.studio-block-move-btn:hover {
  background: #334155;
  color: #38bdf8;
}

/* Question manipulation tools */
.studio-q-item, .studio-cq-item {
  position: relative;
  transition: background 0.15s ease;
}
.studio-q-item:hover, .studio-cq-item:hover {
  background: rgba(248, 250, 252, 0.85);
}
.studio-q-tools {
  position: absolute;
  top: -8px;
  right: 0;
  display: none;
  background: #0f172a;
  border-radius: 4px;
  padding: 2px 6px;
  gap: 4px;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.studio-q-item:hover .studio-q-tools,
.studio-cq-item:hover .studio-q-tools {
  display: inline-flex;
}
.studio-q-tool-btn {
  background: transparent;
  border: none;
  color: #f8fafc;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.studio-q-tool-btn:hover {
  background: #334155;
  color: #38bdf8;
}
.studio-q-tool-swap:hover {
  color: #34d399 !important;
}
.studio-q-tool-del:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* Student Fill-in Info Strip */
.studio-student-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  border: 1px dashed #475569;
  border-radius: 4px;
  padding: 3px 8px;
  margin-top: 5px;
  background: #fafafa;
}

/* Official Examiner Marks Box */
.studio-marks-box {
  display: inline-block;
}
.studio-marks-table {
  border-collapse: collapse;
  font-size: 11px;
  text-align: center;
}
.studio-marks-table th,
.studio-marks-table td {
  border: 1px solid #000000;
  padding: 1px 5px;
  min-width: 26px;
}
.studio-marks-table th {
  background: #f1f5f9;
  font-weight: 700;
}
.studio-marks-table td {
  height: 14px;
}

/* Secondary Customizer Sub-bar in Print Studio */
.studio-header-designer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 16px;
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  font-size: 12px;
  color: #1e293b;
}
.studio-header-designer-bar label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

@media print {
  .studio-block-move-tools,
  .studio-q-tools,
  .studio-drag-handle,
  .studio-header-designer-bar,
  .studio-header-blocks-panel {
    display: none !important;
  }
  .studio-editable:hover,
  .studio-editable:focus,
  .studio-header-block:hover,
  .studio-q-item:hover,
  .studio-cq-item:hover {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .studio-student-strip {
    background: transparent !important;
    border-color: #000000 !important;
  }
}

.studio-inst-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.studio-exam-sub {
  font-size: 15px;
  font-weight: 700;
  margin-top: 3px;
}

.studio-meta-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  border-top: 1px solid #cbd5e1;
  padding-top: 4px;
}

.studio-set-badge {
  border: 1.5px solid #000000;
  padding: 1px 10px;
  font-weight: 800;
  font-size: 14px;
}

.studio-instruction-banner {
  font-size: 12px;
  font-style: italic;
  margin: 6px 0 10px 0;
  padding: 3px 6px;
  background: #f8fafc;
  border-left: 3px solid #1e3a8a;
  position: relative;
  z-index: 2;
}

/* 2-Column NCTB Grid */
.studio-columns {
  position: relative;
  z-index: 2;
}

.studio-columns.two-col {
  column-count: 2;
  column-gap: 22px;
  column-rule: 1px dashed #cbd5e1;
}

.studio-columns.one-col {
  column-count: 1;
}

.studio-section-banner {
  font-size: 13px;
  font-weight: 800;
  padding: 3px 0;
  margin-bottom: 8px;
  border-bottom: 1.5px solid #000000;
  break-after: avoid;
  page-break-after: avoid;
}

/* Question Items */
.studio-q-item {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.45;
  position: relative;
}

.studio-q-stem {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.studio-q-num {
  font-weight: 700;
  flex-shrink: 0;
}

.studio-q-text {
  flex: 1;
  unicode-bidi: isolate;
}

.studio-q-board {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

/* MCQ Options 2x2 Grid */
.studio-opts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  margin-top: 3px;
  padding-left: 18px;
  font-size: 12.5px;
}

.studio-opt {
  display: flex;
  gap: 4px;
  unicode-bidi: isolate;
}

.studio-opt-key {
  font-weight: 700;
}

/* CQ Stimulus & 4 Sub-questions */
.studio-cq-item {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 14px;
  font-size: 13px;
}

.studio-cq-stimulus {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 6px 10px;
  margin: 4px 0 6px 18px;
  font-style: italic;
  font-size: 12.5px;
}

.studio-cq-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-left: 18px;
  margin-bottom: 3px;
}

.studio-cq-mark {
  font-weight: 700;
  font-size: 12px;
  color: #1e3a8a;
  border: 1px solid #cbd5e1;
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 6px;
}

/* Embedded OMR Sheet at bottom */
.studio-embedded-omr {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1.5px solid #000000;
  break-inside: avoid;
  page-break-inside: avoid;
}

.studio-omr-title {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.studio-omr-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px 12px;
  font-size: 11px;
}

.studio-omr-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.studio-omr-bubble {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
}

/* Master Answer Key Table */
.studio-answer-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 12px 0;
}

.studio-answer-matrix-table th,
.studio-answer-matrix-table td {
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  text-align: center;
}

.studio-answer-matrix-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

/* Clean @media print rules */
@media print {
  @page {
    size: A4 portrait;
    margin: 0 !important; /* Eliminates browser URL, date, and 1/1 credit text */
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > *:not(#printStudioModal) {
    display: none !important;
  }

  #printStudioModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
  }

  .print-studio-box {
    display: block !important;
    position: static !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-studio-header,
  .print-studio-toolbar,
  .navbar,
  .epb-sidebar,
  .epb-topbar,
  .epb-sticky-cart,
  .modal-overlay:not(#printStudioModal) {
    display: none !important;
  }

  .print-studio-stage {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
  }

  .print-studio-paper-sheet {
    display: block !important;
    position: relative !important;
    box-shadow: none !important;
    padding: 10mm 12mm !important;
    width: 100% !important;
    max-width: 210mm !important;
    margin: 0 auto !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    page-break-after: auto;
    break-after: auto;
  }

  .print-studio-paper-sheet.density-compact {
    padding: 8mm 11mm !important;
  }
  .print-studio-paper-sheet.density-standard {
    padding: 10mm 13mm !important;
  }
  .print-studio-paper-sheet.density-relaxed {
    padding: 13mm 15mm !important;
  }

  .print-studio-paper-sheet.border-none {
    border: none !important;
  }
  .print-studio-paper-sheet.border-single {
    border: 2px solid #000 !important;
  }
  .print-studio-paper-sheet.border-double {
    border: 4px double #000 !important;
  }
  .print-studio-paper-sheet.border-ornamental {
    border: 3px double #000 !important;
    outline: 1.5px dashed #475569 !important;
    outline-offset: -5px !important;
  }

  .studio-columns {
    column-fill: auto !important;
    overflow: visible !important;
  }

  .studio-q-item,
  .studio-cq-item,
  .studio-sig-item,
  .studio-signature-strip,
  .studio-section-banner,
  .studio-paper-header,
  .studio-embedded-omr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

/* =============================================================================
   Toast Notification System
   ============================================================================= */
.pb-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.pb-toast {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: pbToastSlideUp 0.25s ease-out;
  border-left: 4px solid #10b981;
  max-width: 360px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pb-toast.toast-info {
  border-left-color: #0284c7;
}

.pb-toast.toast-error {
  border-left-color: #ef4444;
}

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

/* =============================================================================
   Difficulty Badges & Polish
   ============================================================================= */
.epb-badge-diff {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.epb-diff-easy {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.epb-diff-medium {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

.epb-diff-hard {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* =============================================================================
   Diagram Wrapping & Styling
   ============================================================================= */
.epb-diagram-wrap {
  text-align: center;
  margin: 12px 0;
}

.epb-diagram-wrap img {
  max-height: 220px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  padding: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.epb-diagram-wrap img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.studio-q-diagram,
.studio-cq-diagram {
  text-align: center;
  margin: 6px 0;
}

.studio-q-diagram img,
.studio-cq-diagram img {
  border-radius: 4px;
  max-width: 90%;
  background: #ffffff;
}

/* =============================================================================
   Chapter & Syllabus Selection Badges
   ============================================================================= */
.epb-chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.epb-chapter-pill:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
}

.epb-chapter-pill.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 700;
}

.epb-chapter-pill input[type="checkbox"] {
  accent-color: #2563eb;
  cursor: pointer;
}

.studio-syllabus-badge {
  font-size: 12px;
  color: #475569;
  font-style: italic;
  margin-top: 3px;
  text-align: center;
}

