/* ==========================================================================
   Text Stack — Compact & Responsive Single Page Web App (SPA)
   Design System: Sleek Glassmorphism, Micro-Badges & Fluid Dynamic Layout
   ========================================================================== */

:root {
  --bg: #090d16;
  --bg-elevated: #0f172a;
  --bg-header: rgba(9, 13, 22, 0.90);
  --bg-card: #111827;
  --bg-card-hover: #1e293b;
  --bg-card-active: rgba(37, 99, 235, 0.12);
  --bg-input: #1e293b;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border: #1f2937;
  --border-subtle: #111827;
  --border-focus: #3b82f6;
  --border-glass: #1f2937;
  --glass-card-bg: #111827;
  --shadow-glass: 0 4px 14px rgba(0, 0, 0, 0.25);
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

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

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 18px -4px rgba(0, 0, 0, 0.4);

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-gurmukhi: 'Noto Sans Gurmukhi', 'Plus Jakarta Sans', sans-serif;

  --header-height: 56px;
  --bottom-nav-height: 58px;
  --content-max-width: 1140px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-card-active: rgba(37, 99, 235, 0.08);
  --bg-input: #f1f5f9;
  --bg-glass: #ffffff;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #2563eb;
  --border-glass: #e2e8f0;
  --glass-card-bg: #ffffff;
  --shadow-glass: 0 4px 12px rgba(15, 23, 42, 0.05);
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 18px -4px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.45;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.gurmukhi {
  font-family: var(--font-gurmukhi) !important;
  line-height: 1.55 !important;
}

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 14px;
}

/* ==========================================================================
   0. AUTH GATE SCREEN (Shown when user is NOT logged in)
   ========================================================================== */
.auth-gate-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.16), transparent 70%), var(--bg);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.auth-gate-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(59, 130, 246, 0.15);
  animation: modalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.auth-gate-brand h2 {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

[data-theme="light"] .auth-gate-brand h2 {
  background: linear-gradient(135deg, #1e293b 40%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-gate-brand p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
  margin-bottom: 18px;
}

.auth-gate-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  gap: 4px;
}

.auth-gate-tab {
  flex: 1;
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-gate-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.auth-gate-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GOOGLE AUTH BUTTON & DIVIDER (Strict Cross-Browser Constraints)
   ========================================================================== */
.auth-divider {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 16px 0 !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: var(--text-muted, #94a3b8) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.auth-divider::before,
.auth-divider::after {
  content: "" !important;
  flex: 1 !important;
  height: 1px !important;
  background: var(--border, rgba(148, 163, 184, 0.22)) !important;
}

[data-theme="light"] .auth-divider::before,
[data-theme="light"] .auth-divider::after {
  background: #E2E8F0 !important;
}

.auth-google-btn {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 12px !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  font-family: inherit !important;
  font-size: 0.94rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .auth-google-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.auth-google-btn:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  background: #334155 !important;
  border-color: #60a5fa !important;
  box-shadow: 0 6px 16px rgba(96, 165, 250, 0.25) !important;
}

[data-theme="light"] .auth-google-btn:hover:not(:disabled) {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
}

.auth-google-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}

.auth-google-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.auth-google-label {
  font-size: 0.94rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px !important;
  display: inline-block !important;
  line-height: 1 !important;
}

/* ==========================================================================
   TOP HEADER (Sticky Bar)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.35);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

[data-theme="light"] .brand-text h1 {
  background: linear-gradient(135deg, #1e293b 40%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-glass);
}

.nav-link.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

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

.streak-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  cursor: pointer;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
}

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

.user-account-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-account-chip:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
}

.user-chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-chip-name {
  font-size: 0.78rem;
  font-weight: 700;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   MAIN VIEW SHELL (Single Page Layout)
   ========================================================================== */
#appMain {
  flex: 1;
  padding: 14px 0 calc(var(--bottom-nav-height) + 16px) 0;
}

.app-view {
  display: none;
  animation: viewFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ==========================================================================
   COMPACT CARDS DESIGN
   ========================================================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  position: relative;
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

/* 1. Compact Greeting Bar */
.greeting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%), var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 12px;
}

.greeting-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
  flex-shrink: 0;
  cursor: pointer;
}

.greeting-text h2 {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.greeting-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.greeting-target {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.target-badge-sm {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.progress-bar-sm {
  width: 70px;
  height: 5px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* 2. Compact Live Daily Challenge Card */
.hero-challenge-card {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(124, 58, 237, 0.18) 100%), var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.28);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.challenge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.challenge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.challenge-subject-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: #fff;
}

.challenge-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.challenge-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.challenge-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.challenge-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.challenge-meta-row strong {
  color: var(--text);
}

.btn-start-challenge-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
  transition: all 0.15s ease;
}

.btn-start-challenge-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5);
}

/* 3. Compact 4-Column Feature Tiles */
.quick-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.feature-tile {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.feature-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: transparent;
}

.feature-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
}

.feature-tile.tile-mock::before { background: var(--accent-purple); }
.feature-tile.tile-speed::before { background: var(--accent-pink); }
.feature-tile.tile-flash::before { background: var(--accent-cyan); }
.feature-tile.tile-battle::before { background: var(--accent-amber); }

.feature-icon-wrapper-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.tile-mock .feature-icon-wrapper-sm { background: rgba(139, 92, 246, 0.15); color: #c084fc; }
.tile-speed .feature-icon-wrapper-sm { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.tile-flash .feature-icon-wrapper-sm { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.tile-battle .feature-icon-wrapper-sm { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.feature-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
}

.feature-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.feature-badge-sm {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  align-self: flex-start;
  margin-top: 2px;
}

.tile-mock .feature-badge-sm { background: rgba(139, 92, 246, 0.15); color: #d8b4fe; }
.tile-speed .feature-badge-sm { background: rgba(236, 72, 153, 0.15); color: #fbcfe8; }
.tile-flash .feature-badge-sm { background: rgba(6, 182, 212, 0.15); color: #a5f3fc; }
.tile-battle .feature-badge-sm { background: rgba(245, 158, 11, 0.15); color: #fef08a; }

/* 4. Section Headers */
.section-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title-compact {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-action-compact {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

/* 5. Rapid Practice Row */
.rapid-practice-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

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

.rapid-card:hover {
  transform: translateY(-1px);
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.rapid-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.rapid-info h4 {
  font-size: 0.82rem;
  font-weight: 700;
}

.rapid-info p {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* 6. Subjects Grid */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.subject-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--glass-card-bg);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.55);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

.subject-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-icon-box-sm {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.subject-icon-box-sm img {
  width: 22px;
  height: 22px;
}

.subject-info {
  flex: 1;
  min-width: 0;
}

.subject-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subject-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.subject-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  color: var(--text-muted);
}

.btn-subject-start-sm {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subject-start-sm:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   QUIZ BATTLE ARENA (1v1 Live Duel & Room Codes)
   ========================================================================== */
.battle-arena-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.1) 100%), var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 14px;
}

.battle-hud-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.player-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-box.rival {
  flex-direction: row-reverse;
  text-align: right;
}

.player-avatar-hud {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.battle-score-pill {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
}

.battle-vs-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   TEST ENGINE & QUESTION UI
   ========================================================================== */
.test-engine-header {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  margin-bottom: 14px;
}

.test-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 800;
  font-family: monospace;
}

.timer-box.timer-warning {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  animation: pulse 1s infinite;
}

.question-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.question-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.q-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.q-bilingual-switch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.q-bilingual-switch-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.question-text-pa {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-gurmukhi);
}

.question-text-en {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.option-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.option-item.selected {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary);
}

.option-item.correct {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: #10b981 !important;
}

.option-item.wrong {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #ef4444 !important;
}

.option-marker {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  flex-shrink: 0;
}

.option-item.selected .option-marker {
  background: var(--primary);
  color: #fff;
}

.option-item.correct .option-marker {
  background: #10b981;
  color: #fff;
}

.option-item.wrong .option-marker {
  background: #ef4444;
  color: #fff;
}

.option-text-group {
  flex: 1;
}

.option-text-pa {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  font-family: var(--font-gurmukhi);
}

.option-text-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.test-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.btn-test-nav {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-test-nav:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.btn-test-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary-action {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-submit-test {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
}

/* ==========================================================================
   CUSTOM MODALS & DIALOGS (Zero Native Browser Alerts/Confirms!)
   ========================================================================== */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.custom-modal-overlay.active {
  display: flex;
}

.custom-dialog-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.dialog-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.dialog-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.dialog-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

.dialog-stat-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.dialog-stat-pill {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  text-align: center;
}

.dialog-stat-pill .num {
  font-size: 1.15rem;
  font-weight: 800;
}

.dialog-stat-pill .lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-btn-cancel {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.dialog-btn-confirm {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.dialog-btn-danger {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: #ef4444;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

/* Auth Modal Tabs */
.auth-tabs-row {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.auth-tab-btn {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.form-group-sm {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  text-align: left;
}

.form-group-sm label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control-sm {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control-sm:focus {
  border-color: var(--border-focus);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 4px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}

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

#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

.toast-container {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  animation: toastSlide 0.2s ease;
}

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

/* ==========================================================================
   ADMIN-PANEL-STYLE SHELL, SIDEBAR DRAWER (HIDE & SHOW) & TOPBAR
   ========================================================================== */
.app-shell-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Backdrop Overlay for Mobile/Tablet Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar Drawer (Admin Panel Style) */
.app-drawer.sidebar {
  width: 268px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 1001;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s ease;
}

/* Mobile & Tablet (< 960px): Off-canvas slide-in drawer */
@media (max-width: 959px) {
  .app-drawer.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    max-width: 85vw;
    transform: translateX(-100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }
  .app-drawer.sidebar.active {
    transform: translateX(0);
  }
}

/* Desktop (>= 960px): Sticky Admin-Panel-style sidebar with Hide & Show support! */
@media (min-width: 960px) {
  .app-drawer.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: translateX(0);
    overflow-y: auto;
    overflow-x: hidden;
  }
  body.sidebar-collapsed .app-drawer.sidebar {
    width: 0 !important;
    min-width: 0 !important;
    border-right-width: 0 !important;
    opacity: 0;
    transform: translateX(-24px);
    pointer-events: none;
    overflow: hidden;
  }
  .drawer-overlay {
    display: none !important;
  }
}

/* Custom thin scrollbar inside Sidebar */
.app-drawer.sidebar::-webkit-scrollbar,
.drawer-nav::-webkit-scrollbar {
  width: 5px;
}
.app-drawer.sidebar::-webkit-scrollbar-thumb,
.drawer-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
}

/* Sidebar Brand Header (Matches Admin Panel .sidebar-brand) */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.sidebar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
  flex-shrink: 0;
}

.sidebar-brand-text {
  min-width: 0;
}

.sidebar-brand-text span {
  display: block;
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: -0.3px;
  line-height: 1.15;
  color: var(--text);
}

.sidebar-brand-text small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  background: rgba(59, 130, 246, 0.18);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

@media (min-width: 960px) {
  .sidebar-collapse-btn {
    display: none !important;
  }
}

.sidebar-collapse-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--primary);
}

/* Learner Summary Card in Sidebar */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 10px 4px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-input) 100%);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-user-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.sidebar-user-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.sidebar-user-card:hover .sidebar-user-arrow {
  transform: translateX(2px);
  color: var(--primary);
}

/* Sidebar Navigation Items (Matches Admin Panel .nav-section & .nav-item) */
.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 12px;
  display: flex;
  flex-direction: column;
}

.nav-section {
  padding: 14px 16px 5px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.nav-item.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  margin: 2px 8px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13.2px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-item.drawer-nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.88;
}

.nav-item.drawer-nav-item:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
}

.nav-item.drawer-nav-item.active {
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-item.drawer-nav-item.active svg {
  opacity: 1;
}

.sidebar-pill-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  letter-spacing: 0.02em;
}

[data-theme="light"] .sidebar-pill-badge {
  color: #2563eb;
}

.nav-item.drawer-nav-item.active .sidebar-pill-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.sidebar-pill-badge.amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.sidebar-pill-badge.purple {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.sidebar-pill-badge.rose {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* ==========================================================================
   ADMIN-PANEL-STYLE TOPBAR (.app-header.topbar)
   ========================================================================== */
.app-header.topbar {
  height: 62px;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 95;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Hide / Show Drawer Button in Topbar */
.topbar-drawer-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

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

.drawer-toggle-text {
  display: none;
}

@media (min-width: 640px) {
  .drawer-toggle-text {
    display: inline;
  }
}

/* Breadcrumb inside Topbar (Matches Admin Panel .breadcrumb) */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
}

.topbar-brand-mini img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.breadcrumb-active {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Topbar Center Search Pill */
.topbar-center {
  flex: 1;
  max-width: 380px;
  display: none;
}

@media (min-width: 768px) {
  .topbar-center {
    display: flex;
  }
}

.topbar-search-pill {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.79rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-search-pill:hover {
  border-color: var(--primary);
  color: var(--text);
  background: var(--bg-card-hover);
}

.topbar-search-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search-kbd {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
}

/* Topbar Right Controls */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-status-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 11.5px;
  font-weight: 700;
  color: #10b981;
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-status-pill:hover {
  background: rgba(16, 185, 129, 0.16);
}

.topbar-status-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

@media (min-width: 1200px) {
  .topbar-status-pill {
    display: inline-flex;
  }
}

.topbar-action-btn {
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.topbar-btn-label {
  display: none;
}

@media (min-width: 1024px) {
  .topbar-btn-label {
    display: inline;
  }
}

/* Admin-Panel-Style User Pill in Topbar (.admin-pill) */
.admin-pill.user-account-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 5px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-pill.user-account-chip:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.admin-pill .user-chip-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.76rem;
}

.admin-meta {
  display: none;
  line-height: 1.15;
  text-align: left;
}

@media (min-width: 540px) {
  .admin-meta {
    display: block;
  }
}

.user-chip-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-role {
  font-size: 10px;
  color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   ADMIN-PANEL-STYLE PLATFORM METRICS GRID (.app-metrics-grid)
   ========================================================================== */
.app-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .app-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.app-metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.app-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.app-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.app-metric-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.app-metric-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.app-metric-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.app-metric-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.app-metric-val {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

.app-metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-metric-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.6;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.app-metric-card:hover .app-metric-arrow {
  transform: translateX(3px);
  opacity: 1;
  color: var(--primary);
}

/* Home Quick Search Bar */
.home-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.home-search-bar:hover {
  border-color: var(--border-focus);
  color: var(--text);
}

.search-kbd {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Interactive User Chips (Matches Mobile App CreateGroupBattlePage Chips!) */
.user-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.user-chip-item:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.user-chip-item.invited {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary);
  border-width: 1.5px;
  font-weight: 700;
  color: var(--text);
}

.user-chip-item.fav:not(.invited) {
  border-color: rgba(245, 158, 11, 0.55);
}

.user-chip-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-chip-star {
  color: #fbbf24;
  font-size: 0.82rem;
  line-height: 1;
}

.user-chip-action {
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.75;
  margin-left: 2px;
}

/* Mobile Bottom Navigation Bar (Matches AppShell) */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-around;
  z-index: 150;
  padding: 0 6px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  transition: all 0.15s ease;
}

.bottom-nav-item .nav-icon {
  font-size: 1.1rem;
  line-height: 1.1;
}

.bottom-nav-item.active {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

/* ==========================================================================
   COMPACT SIZES & RESPONSIVE BREAKPOINTS
   ========================================================================== */
.section-anchor {
  scroll-margin-top: 74px;
  margin-bottom: 16px;
}

.hero-challenge-card {
  padding: 14px 16px !important;
  margin-bottom: 14px !important;
}

.hero-challenge-card .challenge-title {
  font-size: 1.05rem !important;
  margin: 4px 0 2px 0 !important;
}

.hero-challenge-card .challenge-desc {
  font-size: 0.8rem !important;
  margin-bottom: 8px !important;
}

.battle-arena-card {
  padding: 14px 16px !important;
}

#appMain {
  padding: 16px 14px 80px 14px;
  max-width: 1180px;
}

@media (min-width: 960px) {
  .bottom-nav {
    display: none;
  }
  #appMain {
    padding: 22px 24px 42px 24px;
  }
  .quick-features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   SECURE STUDY NOTES & DRM VIEWER STYLES
   Screenshot, screen recording, and copy-paste prevention
   ========================================================================== */

/* Universal anti-copy & anti-select shield */
.secure-content-shield {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

.secure-notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: #38bdf8;
  line-height: 1.4;
}

.security-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.notes-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.notes-filter-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.notes-filter-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

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

/* Note Card */
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.note-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.note-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.note-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.note-title-pa {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  font-family: var(--font-gurmukhi);
}

.note-title-en {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.note-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.note-meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-read-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-read-note:hover {
  opacity: 0.92;
}

/* Secure Viewer Header */
.secure-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: calc(var(--header-height) + 6px);
  z-index: 80;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.mode-toggle-group, .zoom-controls-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-viewer-ctrl {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-viewer-ctrl:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.btn-viewer-ctrl.active {
  background: var(--primary);
  color: #ffffff;
}

/* Secure Viewer Body Container */
.secure-viewer-body {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  min-height: 65vh;
  padding: 16px;
  transition: background-color 0.2s ease;
  overflow: hidden;
}

.secure-viewer-body.mode-default {
  background: #0b1120;
}

.secure-viewer-body.mode-sepia {
  background: #fbf0d9 !important;
}

.secure-viewer-body.mode-sepia .pdf-page-card {
  filter: sepia(0.35) contrast(0.95);
}

.secure-viewer-body.mode-dark {
  background: #020617 !important;
}

.secure-viewer-body.mode-dark .pdf-page-card {
  filter: invert(0.9) hue-rotate(180deg) brightness(0.95);
}

.pdf-pages-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.pdf-pages-wrapper.is-blurred {
  filter: blur(28px) !important;
  opacity: 0.05 !important;
  pointer-events: none !important;
}

.pdf-page-card {
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  max-width: 100%;
}

.pdf-page-card canvas.page-pdf-canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
}

.canvas-glass-trap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  pointer-events: auto;
  background: transparent;
  cursor: default;
}

.page-watermark-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Privacy Shield Overlay */
.privacy-shield-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(10, 15, 29, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInFast 0.15s ease-out;
}

.privacy-shield-card {
  text-align: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  max-width: 480px;
}

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

/* Print Prevention for Protected PDF Notes */
@media print {
  #view-notes-tab, #view-note-viewer, #securePdfViewerContainer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
  }
}

/* ==========================================================================
   Question Diagram & Image Lightbox System (Bilingual & Responsive)
   ========================================================================== */

.question-diagram-wrapper {
  margin: 10px 0 14px 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .question-diagram-wrapper {
  background: rgba(241, 245, 249, 0.6);
  border-color: rgba(203, 213, 225, 0.85);
}

.question-diagram-wrapper:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.diagram-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.74rem;
}

.diagram-tag {
  font-weight: 800;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

.diagram-zoom-hint {
  color: var(--text-muted);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.diagram-img-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-xs);
  padding: 10px;
  overflow: hidden;
  min-height: 100px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.question-diagram-img {
  max-width: 100%;
  max-height: 270px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

@media (min-width: 768px) {
  .question-diagram-img {
    max-height: 330px;
  }
}

.diagram-load-error {
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-radius: var(--radius-xs);
}

/* Lightbox Modal */
.diagram-lightbox-overlay {
  z-index: 100000;
}

.lightbox-dialog-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 880px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  gap: 10px;
}

.lightbox-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lightbox-img-wrapper {
  padding: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  background: #ffffff;
  min-height: 220px;
  max-height: calc(88vh - 100px);
  cursor: zoom-in;
  touch-action: pan-x pan-y;
}

.lightbox-img-wrapper.zoomed {
  cursor: zoom-out;
  align-items: flex-start;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: calc(88vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.22s ease;
  user-select: none;
}

.lightbox-img-wrapper.zoomed img {
  transform: scale(1.85);
  transform-origin: center top;
  max-width: none;
  max-height: none;
}

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

/* Compact Review & Mistake Notebook Diagram Wrappers */
.review-diagram-thumbnail,
.collection-diagram-thumbnail {
  margin: 6px 0 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.review-diagram-thumbnail:hover,
.collection-diagram-thumbnail:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.16);
}

.review-diagram-thumbnail img,
.collection-diagram-thumbnail img {
  max-height: 60px;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.review-diagram-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-diagram-badge {
  font-size: 0.74rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-diagram-hint {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   TEST & PRACTICE CONFIGURATION MODAL (MATCHES MOBILE APP TestConfigurationPage)
   ========================================================================== */
.config-modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.config-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.config-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.config-header-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  flex-shrink: 0;
}

.config-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.config-header-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.config-section {
  margin-bottom: 16px;
}

.config-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.config-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.config-badge-info {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.config-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .config-mode-grid {
    grid-template-columns: 1fr;
  }
}

.config-mode-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  position: relative;
}

.config-mode-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.config-mode-card.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 1px var(--primary);
}

.config-mode-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-mode-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.config-mode-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.config-mode-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.config-mode-card.active .config-mode-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.config-mode-card.active .config-mode-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.config-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.config-chip {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.config-chip:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.config-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.config-toggle-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.config-toggle-box:hover {
  border-color: var(--primary);
}

/* Batch Content Filter Chips */
.batch-filter-chip {
  transition: all 0.15s ease;
  user-select: none;
}
.batch-filter-chip:hover {
  filter: brightness(1.15);
}

/* OMR Bubble Sheet Responsiveness */
#omrSheetBubblesContainer button:hover {
  transform: scale(1.08);
}

/* ============================================================
   🤖 GYAN AI FLOATING ACTION BUTTON (FAB) & CHAT STYLES
============================================================ */
.gyan-ai-fab {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.88rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.gyan-ai-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
  border-color: rgba(255, 255, 255, 0.4);
}
.gyan-ai-fab:active {
  transform: scale(0.96);
}
.gyan-fab-icon {
  font-size: 1.25rem;
  line-height: 1;
  animation: pulse-glow 2.5s infinite ease-in-out;
}
.gyan-fab-label {
  font-weight: 800;
  letter-spacing: -0.2px;
}
.gyan-fab-badge {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  color: #fde047;
  letter-spacing: 0.4px;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 6px #a5b4fc); }
}

@media (max-width: 768px) {
  .gyan-ai-fab {
    bottom: 74px;
    right: 14px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

/* Chat Messages in Gyan AI Modal */
.gyan-msg-bubble {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
  animation: fadeInMsg 0.2s ease-out;
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.gyan-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.gyan-msg-ai {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.gyan-short-trick-box {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ============================================================
   🔊 AUDIO EXPLANATION / TTS STYLES
============================================================ */
.audio-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}
.audio-play-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}
.audio-play-btn.speaking {
  background: #8b5cf6;
  color: #ffffff;
  animation: pulse-audio 1.2s infinite ease-in-out;
}
@keyframes pulse-audio {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ============================================================
   🚩 REPORT QUESTION MODAL CHIPS
============================================================ */
.report-reason-chip {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.15s ease;
}
.report-reason-chip:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}
.report-reason-chip.selected {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fca5a5;
  font-weight: 800;
}

/* ============================================================
   📲 PWA INSTALL BANNER STYLES
============================================================ */
.pwa-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-bottom: 1px solid rgba(129, 140, 248, 0.3);
  color: #ffffff;
  font-size: 0.84rem;
  animation: slideDownBanner 0.3s ease-out;
  position: relative;
  z-index: 100;
}
/* ============================================================
   🎨 IN-TEST VISUALS, SCRATCHPAD, OPTION IMAGES & QR CHIPS (MOBILE PARITY)
============================================================ */

/* In-Test Scratchpad Modal */
.scratchpad-canvas-wrapper {
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}
#scratchpadCanvas {
  display: block;
  touch-action: none;
  cursor: crosshair;
}

/* Option Image Container */
.option-img-container {
  margin: 6px 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.option-img-container:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}
.option-diagram-img {
  max-height: 80px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  padding: 4px;
}
.option-img-zoom-pill {
  font-size: 10px;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Option Elimination (50:50 Strike-Through) */
.option-item.option-eliminated {
  opacity: 0.38 !important;
  text-decoration: line-through !important;
  filter: grayscale(0.8) !important;
  background: rgba(239, 68, 68, 0.06) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.option-item.option-eliminated .option-marker {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}
.btn-strike-option {
  margin-left: auto;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  opacity: 0.6;
}
.btn-strike-option:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Responsive DI Digital Tables */
.di-table-wrapper {
  margin: 14px 0;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.di-table-title {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #60a5fa;
  background: rgba(30, 58, 138, 0.3);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}
.di-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.di-digital-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: center;
}
.di-digital-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  font-weight: 700;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.di-digital-table td {
  padding: 7px 12px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.di-digital-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}
.di-digital-table tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

/* Web QR Plan Switcher Chips */
.web-qr-plan-chip {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.web-qr-plan-chip:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}
.web-qr-plan-chip.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   FULL-PAGE WORKSPACES & IMMERSIVE STUDIOS (ZERO CRAMPED MODALS)
   ========================================================================== */
.full-page-workspace,
#testScratchpadModal.modal-overlay,
#modalOmrSheetWeb.modal-overlay,
#modalGyanAiWeb.modal-overlay,
#modalPaperAArenaWeb.modal-overlay,
#modalBatchContentWeb.modal-overlay,
#modalPunjabPassWeb.modal-overlay,
#modalQrPaymentWeb.modal-overlay,
#modalDistrictPickerWeb.modal-overlay,
#modalWebReferral.modal-overlay,
#customQuizModal.custom-modal-overlay,
#createBattleModal.custom-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: var(--bg-main, #0b1120) !important;
  backdrop-filter: none !important;
  display: none;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 10020 !important;
  padding: 0 !important;
  margin: 0 !important;
}

#customQuizModal.custom-modal-overlay.active,
#createBattleModal.custom-modal-overlay.active {
  display: flex !important;
}

#testScratchpadModal.modal-overlay > .card,
#modalOmrSheetWeb.modal-overlay > .card,
#modalGyanAiWeb.modal-overlay > .card,
#modalPaperAArenaWeb.modal-overlay > .card,
#modalBatchContentWeb.modal-overlay > .card,
#modalPunjabPassWeb.modal-overlay > .card,
#modalQrPaymentWeb.modal-overlay > .card,
#modalDistrictPickerWeb.modal-overlay > .card,
#modalWebReferral.modal-overlay > .card,
#customQuizModal .config-modal-card,
#createBattleModal .custom-dialog-card {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--bg-main, #0b1120) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: none !important;
}

/* Internal full-screen stretch rules */
#scratchpadCanvas {
  width: 100% !important;
  height: 100% !important;
}

.scratchpad-canvas-wrapper {
  flex: 1 !important;
  width: 100% !important;
  height: calc(100vh - 60px) !important;
}

#omrSheetBubblesContainer {
  max-height: none !important;
  flex: 1 !important;
  padding: 16px 20px !important;
}

#paperATestsGridWeb {
  max-height: none !important;
  flex: 1 !important;
  padding: 16px 20px !important;
}

#districtPickerGridWeb {
  max-height: none !important;
  flex: 1 !important;
  padding: 16px 20px !important;
}

#modalWebBatchItemsList {
  max-height: none !important;
  flex: 1 !important;
}

.workspace-header-bar {
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
  z-index: 10;
}

.workspace-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.workspace-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(-1px);
}

.workspace-scroll-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 24px;
}

.workspace-body-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 640px) {
  .workspace-header-bar {
    padding: 10px 14px;
    gap: 8px;
  }
  .workspace-scroll-body {
    padding: 16px 12px;
  }
  .workspace-back-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}

/* ============================================================
   TCS iON / PSSSB STYLE CBT DESKTOP EXAM ENGINE & 2x2 GRID
============================================================ */
.cbt-exam-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: 1380px;
  margin: 0 auto;
  width: 100%;
}

.cbt-main-area {
  flex: 1;
  min-width: 0;
}

/* CBT Question Palette Sidebar on Desktop */
.cbt-palette-sidebar {
  width: 320px;
  min-width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 100px);
}

@media (max-width: 991px) {
  .cbt-palette-sidebar {
    display: none;
  }
  .mobile-palette-btn {
    display: inline-flex !important;
  }
}

@media (min-width: 992px) {
  .mobile-palette-btn {
    display: none !important;
  }
}

.cbt-candidate-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.cbt-candidate-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.cbt-candidate-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
}

.cbt-candidate-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cbt-legend-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-input);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.cbt-legend-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
}

.cbt-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dot-answered {
  background: #22c55e;
}

.dot-not-answered {
  background: #ef4444;
}

.dot-marked {
  background: #a855f7;
}

.dot-not-visited {
  background: #64748b;
}

.cbt-legend-count {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--text);
}

.cbt-palette-grid-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  padding-right: 4px;
}

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

.cbt-palette-btn {
  height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  color: #fff;
}

.cbt-palette-btn.cbt-state-not-visited {
  background: #475569;
  border-color: #64748b;
}

.cbt-palette-btn.cbt-state-not-answered {
  background: #ef4444;
}

.cbt-palette-btn.cbt-state-answered {
  background: #22c55e;
}

.cbt-palette-btn.cbt-state-marked {
  background: #a855f7;
}

.cbt-palette-btn.cbt-state-marked-answered {
  background: #a855f7;
  position: relative;
}

.cbt-palette-btn.cbt-state-marked-answered::after {
  content: '';
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.cbt-palette-btn.cbt-current-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary);
  transform: scale(1.06);
}

.btn-submit-cbt {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-submit-cbt:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* 2x2 Options Grid for Visual Non-Verbal Reasoning */
.options-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.option-item-grid {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.option-item-grid:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.option-item-grid.selected {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 0 1px var(--primary);
}

.option-item-grid.correct {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.12) !important;
}

.option-item-grid.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.option-item-grid.eliminated {
  opacity: 0.42;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.option-grid-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.option-grid-img-wrap {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}

.option-grid-img {
  max-width: 100%;
  max-height: 85px;
  object-fit: contain;
  border-radius: 4px;
}

.option-grid-label {
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 4px;
  font-weight: 600;
}

/* Elimination Mode Strikethrough */
.eliminated-strikethrough-bar {
  position: absolute;
  top: 50%;
  left: 5%;
  width: 90%;
  height: 2px;
  background: #ef4444;
  transform: rotate(-10deg);
  pointer-events: none;
  z-index: 5;
}

.option-item.eliminated {
  opacity: 0.45;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.4);
  position: relative;
}

.eliminated-tag {
  font-size: 0.7rem;
  color: #ef4444;
  font-weight: 700;
  margin-left: auto;
}

.btn-icon.active-elimination {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

/* DI Digital Tables in Web App */
.di-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.di-table-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.di-table-scroll-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.di-table-native {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.di-table-native th {
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}

.di-table-native td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

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

.di-table-footnote {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
}

/* ==========================================================================
   POLISH: Quick Feature Arena Tiles, Badges, Chips & Layout Alignment
   ========================================================================== */
.quick-features-grid .feature-tile {
  min-height: 122px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible !important;
}

.feature-badge-sm {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 2.5px 8px !important;
  border-radius: 4px !important;
  align-self: flex-start !important;
  margin-top: auto !important;
}

.user-chip-item {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (min-width: 960px) {
  .sidebar-collapse-btn {
    display: none !important;
  }
}









