/* ==========================================================================
   StenoMaster — Professional Stenographer Platform CSS Design System
   ========================================================================== */

/* Font loaded via HTML <head> for zero-render-blocking speed */

/* ==========================================================================
   Original Hindi Stenography Fonts (@font-face)
   ========================================================================== */
@font-face {
  font-family: 'Kruti Dev 010';
  src: url('/assets/fonts/Kruti_Dev_010.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Devlys 010';
  src: url('/assets/fonts/Devlys_010.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mangal';
  src: url('/assets/fonts/Mangal.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mangal';
  src: url('/assets/fonts/Mangal_Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

hindi-root {
  display: inline !important;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
}

:root {
  /* Color Palette - Light Theme */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-on-accent: #ffffff;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;
  --primary-border: #bfdbfe;

  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-green-subtle: #ecfdf5;
  --accent-red: #ef4444;
  --accent-red-subtle: #fef2f2;
  --accent-amber: #f59e0b;
  --accent-amber-subtle: #fffbeb;
  --accent-purple: #8b5cf6;
  --accent-purple-subtle: #f5f3ff;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-hindi: 'Mukta', 'Noto Sans Devanagari', -apple-system, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --sidebar-width: 260px;
  --header-height: 68px;
  --bottom-nav-height: 64px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-surface: #131b2e;
  --bg-elevated: #1a243d;
  --bg-subtle: #1e293b;
  --border-subtle: #243048;
  --border-strong: #334155;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-subtle: rgba(59, 130, 246, 0.15);
  --primary-border: #1e3a8a;

  --accent-green: #34d399;
  --accent-green-subtle: rgba(52, 211, 153, 0.15);
  --accent-red: #f87171;
  --accent-red-subtle: rgba(248, 113, 113, 0.15);
  --accent-amber: #fbbf24;
  --accent-amber-subtle: rgba(251, 191, 36, 0.15);
  --accent-purple: #a78bfa;
  --accent-purple-subtle: rgba(167, 139, 250, 0.15);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hindi-text {
  font-family: var(--font-hindi);
}

/* Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

/* Slide-Out Navigation Drawer Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Slide-Out Sidebar Drawer */
.sidebar {
  width: 290px;
  max-width: 86vw;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  overflow-y: auto;
}

.sidebar.open {
  transform: translateX(0) !important;
}

.sidebar-header {
  height: 62px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 2;
}

.sidebar-close-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-close-btn:hover {
  background-color: var(--accent-red-subtle);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.sidebar-role-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  margin: 12px 14px 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-role-badge.student-badge {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.sidebar-role-badge.admin-badge {
  background: var(--accent-red-subtle);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.sidebar-user-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 4px 14px 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.sidebar-user-preview .sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-user-preview.admin-preview .sidebar-avatar {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.sidebar-user-details {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.05);
}

.area-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  background-color: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  letter-spacing: 0.02em;
}

.area-indicator-badge.admin-badge {
  background-color: var(--accent-red-subtle);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.sidebar-nav {
  flex: 1;
  padding: 10px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
}

.nav-item-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 10px 6px;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 12px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

/* Main Content Area — Full width on normal screens, no huge 260px blank margin */
.main-wrapper {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Compact Laptop-First Top Header */
/* Compact Laptop-First Top Header */
.top-header {
  height: 64px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 3-Dot Navigation Menu Button */
.three-dot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.three-dot-btn:hover {
  background-color: var(--border-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
}

.three-dot-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.three-dots-icon {
  user-select: none;
  line-height: 1;
  transform: translateY(-1px);
}

.header-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.header-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.header-brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.header-view-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.mobile-menu-btn {
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-amber-subtle);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

[data-theme="dark"] .streak-badge {
  color: #fcd34d;
}

.theme-toggle-btn, .notif-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover, .notif-btn:hover {
  background-color: var(--border-subtle);
  color: var(--text-main);
}

.lang-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  height: 38px;
  padding: 0 11px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all var(--transition-fast);
}

.lang-toggle-btn:hover {
  background-color: var(--border-subtle);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .lang-toggle-btn {
    height: 32px;
    padding: 0 8px;
    font-size: 0.72rem;
  }
}

.notif-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-red);
  border-radius: 50%;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  padding: 4px 14px 4px 5px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.user-profile-btn:hover {
  background-color: var(--border-subtle);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.header-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.25;
}

.header-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.header-user-role.role-student {
  color: var(--primary);
}

.header-user-role.role-admin {
  color: #ef4444;
}

[data-theme="dark"] .header-user-role.role-student {
  color: #60a5fa;
}

/* Page Content View Containers — Optimized for 1366x768, 1440x900, 1536x864, 1920x1080 */
.page-view {
  display: none;
  padding: 18px 24px;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

.page-view.active {
  display: block;
  animation: pageViewEnter 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageViewEnter {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Common Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Dashboard Today's Target Card - Compact Laptop Fit */
.daily-target-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.daily-target-card::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.daily-target-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.daily-target-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.target-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
}

.target-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.target-item {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.target-item-label {
  font-size: 0.72rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.target-item-val {
  font-size: 1.18rem;
  font-weight: 700;
  margin-top: 2px;
}

.target-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 8px;
}

.target-progress-fill {
  height: 100%;
  background-color: #34d399;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Stats Quick Bar - Compact Laptop Fit */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-icon-blue { background: var(--primary-subtle); color: var(--primary); }
.stat-icon-green { background: var(--accent-green-subtle); color: var(--accent-green); }
.stat-icon-amber { background: var(--accent-amber-subtle); color: var(--accent-amber); }
.stat-icon-purple { background: var(--accent-purple-subtle); color: var(--accent-purple); }

.stat-info-title {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-info-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

/* Category Filter Tabs */
.category-filter-bar {
  display: none !important;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.cat-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-pill.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Passage / Class Cards Grid — 3 to 4 Cards per row on laptops */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.class-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.class-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.class-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.class-badge-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-hindi { background-color: #fee2e2; color: #b91c1c; }
.badge-english { background-color: #e0f2fe; color: #0369a1; }
.badge-easy { background-color: var(--accent-green-subtle); color: var(--accent-green); }
.badge-medium { background-color: var(--accent-amber-subtle); color: #b45309; }
.badge-hard { background-color: var(--accent-red-subtle); color: var(--accent-red); }

.bookmark-toggle-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
}

.bookmark-toggle-btn.active {
  color: var(--accent-gold);
}

.class-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.class-category {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.class-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 18px;
  text-align: center;
}

.class-stat-item .stat-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.class-stat-item .stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.class-card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.btn-start-practice {
  flex: 1;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color var(--transition-fast);
}

.btn-start-practice:hover {
  background-color: var(--primary-hover);
}

/* ==========================================================================
   Practice Workspace & Audio Player
   ========================================================================== */
.practice-container {
  max-width: 1100px;
  margin: 0 auto;
}

.practice-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.back-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Professional Audio Player Box - Compact Laptop Fit */
.audio-player-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.audio-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.audio-passage-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.audio-passage-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.audio-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audio-btn:hover {
  background-color: var(--border-subtle);
}

.audio-btn-seek {
  width: 40px;
  height: 40px;
  font-size: 0.85rem;
  font-weight: 600;
}

.audio-btn-play {
  width: 56px;
  height: 56px;
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.audio-btn-play:hover {
  background-color: var(--primary-hover);
}

/* Timeline scrubber */
.audio-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.audio-time-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.scrubber-track {
  flex: 1;
  height: 6px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
}

.scrubber-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  width: 0%;
  position: relative;
}

.scrubber-handle {
  width: 14px;
  height: 14px;
  background-color: #ffffff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  position: absolute;
  right: -7px;
  top: -4px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* Secondary Audio Controls (Speed, Volume, Synthesis status) */
.audio-subcontrols {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.speed-selector-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.speed-selector-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.speed-chip {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}

.speed-chip.active {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.volume-control-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 85px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   WPM Speeder Controller (40 to 120 WPM — 1 Clean Line of Buttons)
   ========================================================================== */
.wpm-speeder-card {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wpm-speeder-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wpm-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.wpm-speed-icon {
  font-size: 1.05rem;
}

.wpm-val-badge {
  background: var(--primary, #2563eb);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  letter-spacing: 0.3px;
}

.wpm-mult-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.wpm-chips-row {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  width: 100%;
}

.wpm-chip {
  padding: 7px 2px;
  border-radius: 8px;
  background: var(--bg-surface, #fff);
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  user-select: none;
  text-align: center;
}

.wpm-chip .chip-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.wpm-chip .chip-unit {
  font-size: 0.64rem;
  font-weight: 700;
  opacity: 0.75;
  text-transform: uppercase;
}

.wpm-chip:hover {
  background: var(--primary-subtle, #eff6ff);
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
  transform: translateY(-1px);
}

.wpm-chip:hover .chip-num {
  color: var(--primary, #2563eb);
}

.wpm-chip.active {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.wpm-chip.active .chip-num,
.wpm-chip.active .chip-unit {
  color: #fff !important;
  opacity: 1;
}

@media (max-width: 640px) {
  .wpm-chips-row {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .wpm-chip {
    flex: 0 0 52px;
    min-width: 52px;
  }
}

.audio-volume-bar.audio-volume-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.wpm-help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* Typing Editor Box - Compact Laptop Fit */
.typing-editor-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.editor-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.editor-toolbar-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-toolbar-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   Typing Timer Slider Control (40 Min / 30 Min / OFF)
   ========================================================================== */
.typing-timer-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.colorful-timer-slider {
  display: inline-flex;
  align-items: center;
  position: relative;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 30px;
  padding: 3px;
  gap: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .colorful-timer-slider {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.timer-slider-pill {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 4px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  line-height: 1.2;
}

.timer-slider-pill:hover:not(.active-40):not(.active-30):not(.active-off) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .timer-slider-pill:hover:not(.active-40):not(.active-30):not(.active-off) {
  background: rgba(255, 255, 255, 0.1);
}

/* 40 Min: Colorful Vibrant Purple/Indigo Gradient with glow */
.timer-slider-pill.active-40 {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.45) !important;
  transform: scale(1.02);
}

/* 30 Min: Colorful Vibrant Cyan/Emerald Ocean Gradient with glow */
.timer-slider-pill.active-30 {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.45) !important;
  transform: scale(1.02);
}

/* OFF: Minimal Clean Neutral Pill */
.timer-slider-pill.active-off {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid var(--border-subtle) !important;
}

.timer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  opacity: 0.9;
  animation: timerDotPulse 2s infinite ease-in-out;
}

@keyframes timerDotPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Pulsing 1-minute danger alert for the timer pill */
.stat-pill.timer-one-minute-alert {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid #ef4444 !important;
  animation: timerDangerPulse 1s infinite alternate;
}

@keyframes timerDangerPulse {
  from { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  to { box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
}

.typing-mode-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.select-typing-mode {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.editor-live-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stat-pill {
  background-color: var(--bg-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
}

.stat-pill strong {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 16px;
  text-align: right;
  color: var(--text-main);
}

.typing-textarea {
  width: 100%;
  min-height: 180px;
  max-height: 250px;
  height: 25vh;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 1.12rem;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}

.typing-textarea::placeholder {
  font-family: var(--font-hindi), 'Mukta', 'Noto Sans Devanagari', -apple-system, sans-serif !important;
  font-size: 1.05rem;
  color: var(--text-muted, #94a3b8);
  letter-spacing: normal;
  line-height: 1.6;
}

.typing-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Typing Mode Font Family Rules */
.typing-textarea.font-krutidev {
  font-family: 'Kruti Dev 010', 'Devlys 010', sans-serif !important;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  line-height: 1.8;
}

.typing-textarea.font-mangal,
.typing-textarea.font-inscript,
.typing-textarea.font-remington {
  font-family: 'Mangal', 'Mukta', 'Noto Sans Devanagari', -apple-system, sans-serif !important;
  font-size: 1.25rem;
  line-height: 1.8;
}

/* Font Size Modifiers */
.typing-textarea.fs-sm { font-size: 1.05rem !important; }
.typing-textarea.fs-md { font-size: 1.25rem !important; }
.typing-textarea.fs-lg { font-size: 1.5rem !important; }
.typing-textarea.fs-xl { font-size: 1.8rem !important; }

/* Editor Toolbar Extra Controls */
.editor-controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.font-size-btn-group {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.font-size-btn {
  background: var(--bg-surface);
  border: none;
  border-right: 1px solid var(--border-subtle);
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
  min-width: 28px;
  text-align: center;
}

.font-size-btn:last-child {
  border-right: none;
}

.font-size-btn:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.font-size-btn.active {
  background: var(--primary);
  color: #fff;
}

.editor-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.draft-indicator {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-primary {
  background-color: var(--primary);
  border: none;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

/* ==========================================================================
   Result Report Card & Error Diagnostics
   ========================================================================== */
.result-header-banner {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.result-header-left h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.result-header-left p {
  opacity: 0.9;
  font-size: 0.92rem;
  margin-top: 4px;
}

/* Main Result Score Cards */
.result-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.metric-card-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.metric-card.highlight {
  border-color: var(--primary-border);
  background-color: var(--primary-subtle);
}

.metric-card.highlight .metric-card-value {
  color: var(--primary);
}

/* Error Breakdown Pills */
.error-breakdown-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.error-breakdown-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.error-pills-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.error-pill {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-wrong { background-color: var(--accent-red-subtle); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.2); }
.pill-missing { background-color: var(--accent-amber-subtle); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.2); }
.pill-extra { background-color: var(--accent-purple-subtle); color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.pill-matra { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pill-spelling { background-color: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }

/* Side-by-Side Comparison Container */
.comparison-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.comparison-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.dot-correct { background-color: #34d399; }
.dot-wrong { background-color: #f87171; }
.dot-missing { background-color: #fbbf24; }
.dot-extra { background-color: #a78bfa; }

.token-stream-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 1.15rem;
  line-height: 2.2;
  font-family: var(--font-hindi);
  max-height: 420px;
  overflow-y: auto;
}

/* Individual Token Styles (TypingBaba / Testbook Paragraph Flow) */
.eval-token {
  display: inline-block;
  padding: 1px 4px;
  margin: 1px 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  font-size: 1.05rem;
  line-height: 1.8;
}

.eval-token:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Correct Words: Crisp Emerald Green */
.eval-token-correct {
  color: #047857;
  background-color: transparent;
  border-bottom: 2px solid transparent;
}

[data-theme="dark"] .eval-token-correct {
  color: #34d399;
}

/* Wrong Words: Distinct Red Highlight */
.eval-token-wrong {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #f87171;
  text-decoration: underline wavy #dc2626;
  font-weight: 500;
}

[data-theme="dark"] .eval-token-wrong {
  background-color: rgba(185, 28, 28, 0.25);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

/* Missing Words: Soft Warm Amber Underline / Dimmed Flow */
.eval-token-missing {
  background-color: #fef3c7;
  color: #b45309;
  border-bottom: 2px dashed #d97706;
  opacity: 0.85;
}

[data-theme="dark"] .eval-token-missing {
  background-color: rgba(217, 119, 6, 0.2);
  color: #fde68a;
  border-bottom: 2px dashed #f59e0b;
}

/* Extra / Unwanted Words: Strike-through Purple/Gray */
.eval-token-extra {
  background-color: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #c084fc;
  text-decoration: line-through;
}

[data-theme="dark"] .eval-token-extra {
  background-color: rgba(107, 33, 168, 0.25);
  color: #d8b4fe;
  border: 1px solid #a855f7;
}

/* Interactive Token Details Modal / Popover */
.token-popover {
  position: fixed;
  z-index: 100;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  max-width: 320px;
  display: none;
}

.popover-header {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.popover-field {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.popover-field strong {
  color: var(--text-secondary);
}

/* Error Table */
.error-table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.table-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.table-responsive, .data-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background-color: var(--bg-subtle);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-strong);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.data-table tr:hover td {
  background-color: var(--bg-subtle);
}

/* Weak Area Analysis */
.weak-areas-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.weak-area-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.weak-area-item {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 4px solid var(--primary);
}

.weak-area-item.severity-High {
  border-left-color: var(--accent-red);
}

.weak-area-item.severity-Medium {
  border-left-color: var(--accent-amber);
}

.weak-area-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.weak-area-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.weak-area-severity {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.severity-High .weak-area-severity { background-color: var(--accent-red-subtle); color: var(--accent-red); }
.severity-Medium .weak-area-severity { background-color: var(--accent-amber-subtle); color: #b45309; }
.severity-Low .weak-area-severity { background-color: var(--accent-green-subtle); color: var(--accent-green); }

.weak-area-rec {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   Progress, Charts & History
   ========================================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.chart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.chart-canvas-wrap {
  width: 100%;
  height: 240px;
  position: relative;
}

/* Achievements Badges */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.badge-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.badge-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Leaderboard
   ========================================================================== */
.leaderboard-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.rank-medal {
  font-size: 1.25rem;
  font-weight: 700;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 999999 !important;
  display: none;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"],
.modal-overlay[style*="display: block"],
.modal-overlay[style*="display:block"] {
  display: flex !important;
  pointer-events: auto !important;
}

.modal-overlay > * {
  pointer-events: auto !important;
}

.modal-card {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  max-width: 620px;
  width: 100%;
  padding: 26px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5) !important;
  position: relative !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  z-index: 1000000 !important;
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--primary); }

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  z-index: 1050;
  grid-template-columns: repeat(5, 1fr);
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.05);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  gap: 4px;
  cursor: pointer;
}

.mobile-nav-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-btn span:first-child {
  font-size: 1.25rem;
}

/* ==========================================================================
   Phase 2: Auth Gateway Screen (Full-Screen Immersive Canvas & Floating Card)
   ========================================================================== */
.auth-gateway-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 4vw;
  box-sizing: border-box;
  overflow-y: auto;
  transition: background 0.3s ease;
}

/* Theme 1: Yellow (Default) Background */
.auth-gateway-overlay[data-auth-theme="yellow"],
.auth-gateway-overlay:not([data-auth-theme]) {
  background-color: #F4DEC7;
  background-image: radial-gradient(circle at 10% 20%, #fffbf5 0%, #f7e6d2 50%, #f2d7bc 100%);
}

/* Theme 2: Blue Background */
.auth-gateway-overlay[data-auth-theme="blue"] {
  background-color: #e2eefb;
  background-image: radial-gradient(circle at 10% 20%, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
}

/* Theme 3: Dark Background */
.auth-gateway-overlay[data-auth-theme="dark"] {
  background-color: #0f172a;
  background-image: radial-gradient(circle at 10% 20%, #1e293b 0%, #0f172a 70%, #020617 100%);
}

/* Close Icon Button */
.auth-close-icon-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  z-index: 2050;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transition: all 0.2s;
}
.auth-close-icon-btn:hover {
  background: #ffffff;
  transform: scale(1.08);
}

/* Gateway Wide Layout */
.auth-gateway-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: auto;
  min-height: 90vh;
  position: relative;
  box-sizing: border-box;
}

/* LEFT: Floating Login Card */
.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: 28px;
  padding: 32px 30px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  box-sizing: border-box;
  text-align: left;
  transition: all 0.3s ease;
}

/* RIGHT: Full Hero Artwork Canvas */
.auth-hero-canvas {
  flex: 1;
  height: 90vh;
  max-height: 840px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: 3vw;
  max-width: calc(100vw - 520px);
  box-sizing: border-box;
}

.auth-hero-img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: all 0.3s ease;
}

.auth-gateway-overlay[data-auth-theme="yellow"] .auth-hero-img,
.auth-gateway-overlay:not([data-auth-theme]) .auth-hero-img {
  mix-blend-mode: multiply;
}

.auth-gateway-overlay[data-auth-theme="blue"] .auth-hero-img {
  mix-blend-mode: multiply;
  filter: hue-rotate(-15deg) saturate(1.05);
}

.auth-gateway-overlay[data-auth-theme="dark"] .auth-hero-img {
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Corner Floating Pills */
.hero-corner-tag {
  position: absolute;
  top: 15px;
  right: 25px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 8px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.hero-bottom-tag {
  position: absolute;
  bottom: 15px;
  right: 25px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 8px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

/* Top bar, Brand pill, Segmented control */
.auth-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  width: fit-content;
}

.auth-segmented-control {
  display: flex;
  position: relative;
  border-radius: 9999px;
  padding: 3px;
  width: fit-content;
  user-select: none;
}

.auth-slider-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.auth-slider-indicator.slide-right {
  transform: translateX(100%);
}

.auth-segment-btn {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 9999px;
  transition: color 0.2s ease;
}

/* ==========================================================================
   THEME 1: Warm Champagne & Terracotta (Default)
   ========================================================================== */
.auth-card[data-auth-theme="yellow"],
.auth-card:not([data-auth-theme]) {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 25px 60px -15px rgba(120, 53, 15, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.15);
}
.auth-card[data-auth-theme="yellow"] .auth-brand-pill,
.auth-card:not([data-auth-theme]) .auth-brand-pill {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #92400e;
}
.auth-card[data-auth-theme="yellow"] .auth-segmented-control,
.auth-card:not([data-auth-theme]) .auth-segmented-control {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
}
.auth-card[data-auth-theme="yellow"] .form-input,
.auth-card:not([data-auth-theme]) .form-input {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 9999px;
  color: #1e293b;
}
.auth-card[data-auth-theme="yellow"] .form-input:focus,
.auth-card:not([data-auth-theme]) .form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.auth-card[data-auth-theme="yellow"] .btn-primary.auth-submit-btn,
.auth-card:not([data-auth-theme]) .btn-primary.auth-submit-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  box-shadow: 0 8px 20px -4px rgba(217, 119, 6, 0.45);
}
.auth-gateway-overlay[data-auth-theme="yellow"] .hero-corner-tag,
.auth-gateway-overlay:not([data-auth-theme]) .hero-corner-tag {
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.auth-gateway-overlay[data-auth-theme="yellow"] .hero-bottom-tag,
.auth-gateway-overlay:not([data-auth-theme]) .hero-bottom-tag {
  color: #78350f;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   THEME 2: Royal Sapphire & Ice Blue
   ========================================================================== */
.auth-card[data-auth-theme="blue"] {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.auth-card[data-auth-theme="blue"] .auth-brand-pill {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}
.auth-card[data-auth-theme="blue"] .auth-segmented-control {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
}
.auth-card[data-auth-theme="blue"] .form-input {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  color: #0f172a;
}
.auth-card[data-auth-theme="blue"] .form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.auth-card[data-auth-theme="blue"] .btn-primary.auth-submit-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45);
}
.auth-gateway-overlay[data-auth-theme="blue"] .hero-corner-tag {
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
.auth-gateway-overlay[data-auth-theme="blue"] .hero-bottom-tag {
  color: #1e3a8a;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   THEME 3: Midnight Slate & Gold Luxury
   ========================================================================== */
.auth-card[data-auth-theme="dark"] {
  background: #1e293b;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.2);
}
.auth-card[data-auth-theme="dark"] .auth-brand-pill {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #fbbf24;
}
.auth-card[data-auth-theme="dark"] .auth-segmented-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.auth-card[data-auth-theme="dark"] .auth-segment-btn {
  color: #94a3b8;
}
.auth-card[data-auth-theme="dark"] .auth-segment-btn.active {
  color: #0f172a;
}
.auth-card[data-auth-theme="dark"] .auth-slider-indicator {
  background: #ffffff;
}
.auth-card[data-auth-theme="dark"] #authModalMainTitle {
  color: #f8fafc;
}
.auth-card[data-auth-theme="dark"] #authModalSubTitle {
  color: #94a3b8;
}
.auth-card[data-auth-theme="dark"] .form-label {
  color: #cbd5e1;
}
.auth-card[data-auth-theme="dark"] .form-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  color: #f8fafc;
}
.auth-card[data-auth-theme="dark"] .form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
.auth-card[data-auth-theme="dark"] .btn-primary.auth-submit-btn {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #0f172a;
  border: none;
  border-radius: 9999px;
  box-shadow: 0 8px 20px -4px rgba(212, 175, 55, 0.45);
}
.auth-card[data-auth-theme="dark"] .auth-close-icon-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.auth-gateway-overlay[data-auth-theme="dark"] .hero-corner-tag {
  background: rgba(15, 23, 42, 0.9);
  color: #fbbf24;
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.auth-gateway-overlay[data-auth-theme="dark"] .hero-bottom-tag {
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Responsive Media Queries (Mobile Viewport: Picture 2 Experience) */
@media (max-width: 1024px), (orientation: portrait) {
  .auth-gateway-overlay {
    padding: 0 !important;
    margin: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    height: auto !important;
    min-height: 100vh !important;
  }

  .auth-gateway-overlay[data-auth-theme="yellow"],
  .auth-gateway-overlay:not([data-auth-theme]) {
    background-color: #f5e0cb !important;
    background-image: none !important;
  }

  .auth-gateway-layout {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 1. TOP HERO BANNER (Picture 2 - Clean Header with Prominent Art, Zero Void) */
  .auth-hero-canvas {
    display: flex !important;
    order: 1 !important; /* Positions hero on top of card */
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important; /* CRITICAL: Prevent 50% flex-grow peach void */
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 16px 16px 6px 16px !important;
    position: relative !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  .hero-corner-tag {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 auto 6px auto !important;
    padding: 4px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    z-index: 5 !important;
    display: inline-flex !important;
  }

  .auth-hero-img {
    width: auto !important;
    max-width: 90% !important;
    height: 160px !important;
    max-height: 175px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    mix-blend-mode: multiply !important;
  }

  .hero-bottom-tag {
    display: none !important;
  }

  /* 2. MAIN LOGIN CARD BELOW HERO (Picture 2) */
  .auth-card {
    order: 2 !important; /* Positions card below hero */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 28px 28px 0 0 !important; /* Rounded top corners matching Picture 2 */
    padding: 16px 18px 24px 18px !important;
    background: #ffffff !important;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.05) !important;
    flex: 1 0 auto !important;
    box-sizing: border-box !important;
    border-bottom: none !important;
  }

  .auth-gateway-overlay[data-auth-theme="dark"] .auth-card {
    background: #1e293b !important;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.4) !important;
  }

  /* Top Bar & Segmented Switch on Mobile */
  .auth-top-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
  }

  .auth-heading-box {
    margin-bottom: 8px !important;
  }

  #authModalMainTitle {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    margin: 0 0 2px 0 !important;
    letter-spacing: -0.3px !important;
  }

  #authModalSubTitle {
    font-size: 0.74rem !important;
    margin: 0 !important;
  }

  #googleAuthSection {
    margin-bottom: 8px !important;
  }

  .google-auth-btn {
    padding: 7px 12px !important;
    font-size: 1rem !important;
    min-height: 44px;
    border-radius: 10px !important;
  }

  .auth-divider {
    margin: 6px 0 !important;
  }

  .auth-card .form-group {
    margin-bottom: 7px !important;
  }

  .auth-card .form-label {
    font-size: 0.76rem !important;
    margin-bottom: 2px !important;
  }

  .auth-card .form-input {
    padding: 8px 12px 8px 34px !important;
    font-size: 1rem !important;
    min-height: 44px;
    border-radius: 10px !important;
  }

  .auth-card .input-icon {
    left: 10px !important;
    font-size: 0.86rem !important;
  }

  .btn-primary.auth-submit-btn {
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
  }

  .auth-footer-link {
    margin-top: 8px !important;
    font-size: 0.76rem !important;
  }

  /* Close Icon on Mobile */
  .auth-close-icon-btn {
    top: 8px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    z-index: 50 !important;
  }

  /* Mobile Trust Badges inside card (Picture 2) */
  .auth-card-trust-badges {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px dashed var(--border-subtle, #e2e8f0) !important;
    width: 100% !important;
  }

  .auth-trust-chip {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 5px 6px !important;
    background: rgba(245, 158, 11, 0.08) !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: #92400e !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }

  .auth-gateway-overlay[data-auth-theme="dark"] .auth-trust-chip {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fde68a !important;
  }
}

/* Hide mobile trust badges on desktop */
@media (min-width: 1025px) and (orientation: landscape) {
  html:not(.is-mobile-device) .auth-card-trust-badges {
    display: none !important;
  }
}
/* Explicit Mobile Class Enforcement for Auth Gateway */
html.is-mobile-device .auth-gateway-overlay {
  padding: 0 !important;
  margin: 0 !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  height: auto !important;
  min-height: 100vh !important;
}
html.is-mobile-device .auth-gateway-overlay[data-auth-theme="yellow"],
html.is-mobile-device .auth-gateway-overlay:not([data-auth-theme]) {
  background-color: #f5e0cb !important;
  background-image: none !important;
}
html.is-mobile-device .auth-gateway-layout {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}
html.is-mobile-device .auth-hero-canvas {
  display: flex !important;
  order: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: unset !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 16px 16px 6px 16px !important;
  position: relative !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}
html.is-mobile-device .hero-corner-tag {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 auto 6px auto !important;
  padding: 4px 14px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  z-index: 5 !important;
  display: inline-flex !important;
}
html.is-mobile-device .auth-hero-img {
  width: auto !important;
  max-width: 90% !important;
  height: 160px !important;
  max-height: 175px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  mix-blend-mode: multiply !important;
}
html.is-mobile-device .hero-bottom-tag {
  display: none !important;
}
html.is-mobile-device .auth-card {
  order: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 28px 28px 0 0 !important;
  padding: 16px 18px 24px 18px !important;
  background: #ffffff !important;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.05) !important;
  flex: 1 0 auto !important;
  box-sizing: border-box !important;
  border-bottom: none !important;
}
html.is-mobile-device .auth-card-trust-badges {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px dashed var(--border-subtle, #e2e8f0) !important;
  width: 100% !important;
}


.auth-header {
  margin-bottom: 24px;
}

.auth-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin-bottom: 12px;
  border: 2px solid var(--border-subtle);
}

.auth-brand-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-brand-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Modern Sliding Segmented Control */
.auth-segmented-control {
  position: relative;
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 24px;
  user-select: none;
}

.auth-slider-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.auth-slider-indicator.slide-right {
  transform: translateX(100%);
}

.auth-segment-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-segment-btn.active {
  color: var(--primary);
}

#tabAdminBtn.active {
  color: var(--accent-red);
}

.auth-panels-wrapper {
  position: relative;
}

.auth-panel {
  text-align: left;
  animation: authFadeIn 0.25s ease-out;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-panel-badge.student-badge {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.auth-panel-badge.admin-badge {
  background: var(--accent-red-subtle);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon .form-input {
  padding-left: 38px;
}

.auth-link {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-inline-error {
  background: var(--accent-red-subtle);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 8px;
}

.auth-submit-btn.admin-btn {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  border: none;
}

.auth-submit-btn.admin-btn:hover {
  background: linear-gradient(135deg, #991b1b, #b91c1c);
}

.auth-footer-link {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-footer-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

.auth-security-notice {
  margin-top: 18px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Phase 2: Empty States & Intentional Placeholders
   ========================================================================== */
.empty-state-card {
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  margin: 16px 0;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.85;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 18px auto;
  line-height: 1.5;
}

.empty-state-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

/* ==========================================================================
   Phase 2: Practice Class Cards & CTA
   ========================================================================== */
.class-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.class-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.class-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.start-practice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.start-practice-btn:hover {
  background: var(--primary-hover);
  transform: translateX(2px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 230px;
  }
}

@media (max-width: 1024px), (orientation: portrait) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
    padding-bottom: var(--bottom-nav-height);
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .top-header {
    padding: 0 16px;
  }

  .page-view {
    padding: 16px;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .classes-grid {
    grid-template-columns: 1fr;
  }
}

/* Enforce on mobile devices regardless of reported width */
html.is-mobile-device .sidebar {
  transform: translateX(-100%);
}
html.is-mobile-device .sidebar.open {
  transform: translateX(0);
}
html.is-mobile-device .main-wrapper {
  margin-left: 0 !important;
  padding-bottom: var(--bottom-nav-height) !important;
}
html.is-mobile-device .mobile-menu-btn {
  display: block !important;
}
html.is-mobile-device .mobile-bottom-nav {
  display: grid !important;
}
html.is-mobile-device .top-header {
  padding: 0 10px !important;
}
html.is-mobile-device .page-view {
  padding: 12px 10px !important;
}
html.is-mobile-device .charts-grid,
html.is-mobile-device .classes-grid {
  grid-template-columns: 1fr !important;
}

/* ==========================================================================
   Phase 3: Compact Horizontal Metrics Dashboard & Badges
   ========================================================================== */
.horizontal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.h-stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 114px;
}

.h-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.08);
}

.h-stat-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.h-stat-icon {
  font-size: 1.35rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  flex-shrink: 0;
}

.h-stat-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.h-stat-tag {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-flame { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.tag-target { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.tag-zap { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.tag-check { background: rgba(16, 185, 129, 0.12); color: #059669; }
.tag-book { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.tag-star { background: rgba(234, 179, 8, 0.14); color: #b45309; }
.tag-rocket { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.tag-clock { background: rgba(20, 184, 166, 0.12); color: #0d9488; }

.h-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 2px;
  white-space: nowrap;
}

.h-stat-sub {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-stat-micro {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-stat-bar-wrap {
  width: 100%;
  height: 5px;
  background: var(--bg-surface-alt, #f1f5f9);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 5px;
}

.h-stat-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.fill-target { background: linear-gradient(90deg, #3b82f6, #06b6d4); }

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Specific icon accent backgrounds */
.icon-flame { background: rgba(239, 68, 68, 0.1); }
.icon-target { background: rgba(59, 130, 246, 0.1); }
.icon-zap { background: rgba(245, 158, 11, 0.1); }
.icon-check { background: rgba(16, 185, 129, 0.1); }
.icon-book { background: rgba(139, 92, 246, 0.1); }
.icon-star { background: rgba(234, 179, 8, 0.1); }
.icon-rocket { background: rgba(236, 72, 153, 0.1); }
.icon-clock { background: rgba(20, 184, 166, 0.1); }

/* ==========================================================================
   Phase 3: Student Auth Sub-Segmented Tabs
   ========================================================================== */
.student-sub-segmented {
  display: flex;
  background: var(--bg-surface-alt, #f1f5f9);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.student-sub-seg-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.student-sub-seg-btn.active {
  background: var(--bg-surface, #ffffff);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Phase 3: Pro Badges & Student ID Pills
   ========================================================================== */
.badge-pro {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff !important;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.badge-free {
  background: var(--bg-surface-alt, #e2e8f0);
  color: var(--text-muted) !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
}

.student-id-badge {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Desktop Hiding Rules (Option 3 Mobile Elements Hidden Strictly on Desktop PC Monitors) */
@media (min-width: 1025px) and (orientation: landscape) {
  html:not(.is-mobile-device) .hide-desktop,
  html:not(.is-mobile-device) .mobile-sub-toolbar,
  html:not(.is-mobile-device) .stats-carousel-header,
  html:not(.is-mobile-device) .carousel-nav-btn,
  html:not(.is-mobile-device) .stats-carousel-dots,
  html:not(.is-mobile-device) .mobile-bottom-nav,
  html:not(.is-mobile-device) .mobile-menu-btn,
  html:not(.is-mobile-device) .auth-card-trust-badges {
    display: none !important;
  }

  html:not(.is-mobile-device) .sidebar {
    transform: translateX(-100%);
  }

  html:not(.is-mobile-device) .sidebar.open {
    transform: translateX(0) !important;
  }

  html:not(.is-mobile-device) .main-wrapper {
    margin-left: 0 !important;
    padding-bottom: 30px !important;
  }
}

/* Mobile Sub-Toolbar (Row 2 - Option 3) */
.mobile-sub-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface, #ffffff);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sub-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle, #cbd5e1);
  background: var(--bg-subtle, #f8fafc);
  color: var(--text-main, #334155);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sub-tool-btn:hover {
  background: var(--border-subtle, #e2e8f0);
}

.sub-tool-logout {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #dc2626 !important;
}

/* ==========================================================================
   Responsive Breakpoints: Option 3 Stats Carousel for Mobile (< 960px)
   ========================================================================== */
@media (max-width: 1200px) and (min-width: 961px) {
  .horizontal-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .h-stat-card {
    padding: 10px 12px;
  }
}

@media (max-width: 1024px), (orientation: portrait) {
  .stats-carousel-section {
    margin-bottom: 20px;
    width: 100%;
  }

  .stats-carousel-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 4px;
  }

  .stats-carousel-title {
    font-size: 1.18rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    margin: 0 !important;
    letter-spacing: -0.2px;
  }

  .stats-carousel-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 4px;
  }

  .carousel-nav-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: var(--bg-surface, #ffffff) !important;
    border: 1.5px solid var(--border-subtle, #cbd5e1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--text-secondary, #475569) !important;
    cursor: pointer !important;
    z-index: 5 !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    position: relative !important;
  }

  .carousel-nav-btn::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
  }

  .hide-mobile {
    display: none !important;
  }

  /* Mobile Top Header: Touch-friendly, Clean & 320px Responsive */
  .top-header #langToggleBtn,
  .top-header #themeToggleBtn,
  .top-header .header-logout-btn,
  .top-header .user-profile-btn,
  .top-header #pwaInstallBtn,
  .top-header .mobile-menu-btn,
  .top-header .streak-badge {
    display: none !important;
  }

  .top-header {
    padding: 0 10px !important;
    height: 56px !important;
    min-height: 56px !important;
    gap: 8px !important;
    justify-content: space-between !important;
  }

  .top-header .header-left {
    gap: 8px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .top-header .header-brand-link {
    gap: 6px !important;
    min-width: 0 !important;
  }

  .top-header .header-brand-logo {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }

  .top-header .header-brand-name {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .top-header .three-dot-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
  }

  .top-header .header-right {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .plan-validity-pill {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    max-width: 120px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  @media (max-width: 360px) {
    .top-header .header-brand-name {
      font-size: 0.95rem !important;
    }
    .plan-validity-pill {
      max-width: 85px !important;
      font-size: 0.70rem !important;
      padding: 3px 6px !important;
    }
  }

  /* Mobile Sub-Toolbar: Generous Touch Buttons */
  .mobile-sub-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 10px 14px !important;
    background: var(--bg-surface, #ffffff) !important;
    border-bottom: 1px solid var(--border-subtle, #e2e8f0) !important;
  }

  .sub-tool-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 7px 15px !important;
    border-radius: 9999px !important;
    border: 1.5px solid var(--border-subtle, #cbd5e1) !important;
    background: var(--bg-subtle, #f8fafc) !important;
    color: var(--text-main, #334155) !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    min-height: 36px !important;
  }

  .sub-tool-btn span {
    font-size: 0.88rem !important;
  }

  /* Horizontal Snap Scrolling for Stats Grid: Exactly 4 Cards Fill Screen */
  .horizontal-stats-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    gap: 8px !important;
    padding: 4px 2px 8px 2px !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    margin-bottom: 4px !important;
  }

  .horizontal-stats-grid::-webkit-scrollbar {
    display: none !important;
  }

  /* Option 3 Large Stat Card (Big Emoji, Large Bold Number, Clear Title) */
  .h-stat-card {
    flex: 0 0 calc((100% - 24px) / 4) !important;
    min-width: 82px !important;
    max-width: none !important;
    height: 76px !important;
    min-height: 76px !important;
    max-height: 76px !important;
    padding: 7px 4px !important;
    border-radius: 14px !important;
    background: var(--bg-surface, #ffffff) !important;
    border: 1.5px solid var(--border-subtle, #e2e8f0) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    display: grid !important;
    grid-template-columns: 24px 1fr !important;
    grid-template-rows: 24px 1fr !important;
    justify-content: center !important;
    align-content: center !important;
    align-items: center !important;
    column-gap: 3px !important;
    row-gap: 2px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .h-stat-card .h-stat-top {
    display: contents !important;
  }

  .h-stat-card .h-stat-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    font-size: 1.25rem !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  .h-stat-card .h-stat-val {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    color: var(--text-main, #0f172a) !important;
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .h-stat-card .h-stat-meta {
    grid-column: 1 / span 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    text-align: center !important;
    overflow: hidden !important;
    margin-top: 2px !important;
    padding: 0 !important;
  }

  .h-stat-card .h-stat-meta .h-stat-label,
  .h-stat-card .h-stat-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    line-height: 1.2 !important;
    text-transform: none !important;
  }

  /* Hide verbose desktop sub-items */
  .h-stat-card .h-stat-tag,
  .h-stat-card .h-stat-sub,
  .h-stat-card .h-stat-micro,
  .h-stat-card .h-stat-bar-wrap {
    display: none !important;
  }

  /* Carousel Indicator Dots */
  .stats-carousel-dots {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 6px !important;
    margin-bottom: 16px !important;
  }

  .carousel-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #cbd5e1 !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
  }

  .carousel-dot.active {
    width: 22px !important;
    border-radius: 9999px !important;
    background: var(--primary, #0284c7) !important;
  }

  /* Option 3 Active Plan Banner */
  #dashboardActivePlanBanner {
    background: #ecfdf5 !important;
    border: 1.5px solid #a7f3d0 !important;
    border-radius: 16px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
  }

  #dashboardActivePlanBanner #planBannerTitle {
    font-size: 0.98rem !important;
    color: #065f46 !important;
    font-weight: 800 !important;
  }

  #dashboardActivePlanBanner #planBannerTag {
    background: #059669 !important;
    color: #ffffff !important;
    font-size: 0.70rem !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
  }

  #dashboardActivePlanBanner #planBannerSubtitle {
    font-size: 0.78rem !important;
    color: #047857 !important;
    line-height: 1.35 !important;
    margin-top: 2px !important;
  }

  #dashboardActivePlanBanner #planBannerActionBtn {
    padding: 9px 16px !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
  }

  /* Option 3 Practice Classes Header */
  .page-view .section-header .section-title {
    font-size: 1.22rem !important;
    font-weight: 800 !important;
  }

  .page-view .section-header .btn-secondary {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    padding: 7px 14px !important;
    border-radius: 10px !important;
  }

  /* Mobile Bottom Navigation: Larger Touch Targets & Icons */
  .mobile-bottom-nav {
    height: 64px !important;
    padding: 4px 0 !important;
  }

  .mobile-nav-btn {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    gap: 3px !important;
  }

  .mobile-nav-btn svg,
  .mobile-nav-btn img {
    width: 24px !important;
    height: 24px !important;
  }

  /* Mobile Footer: Single column stacked layout */
  .footer-container {
    padding: 20px 16px !important;
  }

  .footer-top-row {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .footer-brand-title {
    font-size: 1.25rem !important;
  }

  .footer-tagline {
    font-size: 0.84rem !important;
    line-height: 1.5 !important;
  }

  .footer-bottom-row {
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
    padding-top: 14px !important;
  }
}

/* Guarantee Option 3 Mobile Elements on all mobile devices - Large Touch-Friendly Mobile UI */
html.is-mobile-device .hide-mobile { display: none !important; }
html.is-mobile-device .hide-desktop { display: flex !important; }
html.is-mobile-device .mobile-sub-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 8px 12px 10px 12px !important;
}
html.is-mobile-device .sub-tool-btn {
  padding: 8px 16px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  min-height: 38px !important;
  border-radius: 9999px !important;
  gap: 6px !important;
}
html.is-mobile-device .stats-carousel-section { margin-bottom: 20px; width: 100%; }
html.is-mobile-device .stats-carousel-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}
html.is-mobile-device .stats-carousel-title {
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
  letter-spacing: -0.2px;
}
html.is-mobile-device .stats-carousel-container {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 6px !important;
}
html.is-mobile-device .carousel-nav-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  background: var(--bg-surface, #ffffff) !important;
  border: 1.5px solid var(--border-subtle, #cbd5e1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: var(--text-secondary, #475569) !important;
  cursor: pointer !important;
  z-index: 5 !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  position: relative !important;
}
html.is-mobile-device .carousel-nav-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}
html.is-mobile-device .top-header #langToggleBtn,
html.is-mobile-device .top-header #themeToggleBtn,
html.is-mobile-device .top-header .header-logout-btn,
html.is-mobile-device .top-header .user-profile-btn,
html.is-mobile-device .top-header #pwaInstallBtn,
html.is-mobile-device .top-header .mobile-menu-btn,
html.is-mobile-device .top-header .streak-badge { display: none !important; }
html.is-mobile-device .top-header {
  padding: 0 10px !important;
  height: 56px !important;
  min-height: 56px !important;
  justify-content: space-between !important;
}
html.is-mobile-device .top-header .brand-name-text,
html.is-mobile-device .top-header .header-brand-name {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}
html.is-mobile-device .top-header .header-brand-logo {
  width: 28px !important;
  height: 28px !important;
}
html.is-mobile-device .plan-validity-pill {
  padding: 4px 10px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  max-width: 130px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}
html.is-mobile-device .horizontal-stats-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  gap: 8px !important;
  padding: 4px 2px 8px 2px !important;
  width: 100% !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  margin-bottom: 4px !important;
}
html.is-mobile-device .h-stat-card {
  flex: 0 0 calc((100% - 24px) / 4) !important;
  min-width: 78px !important;
  max-width: none !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding: 8px 4px !important;
  border-radius: 14px !important;
  background: var(--bg-surface, #ffffff) !important;
  border: 1.5px solid var(--border-subtle, #e2e8f0) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  display: grid !important;
  grid-template-columns: 24px 1fr !important;
  grid-template-rows: 26px 1fr !important;
  justify-content: center !important;
  align-content: center !important;
  align-items: center !important;
  column-gap: 3px !important;
  row-gap: 2px !important;
  scroll-snap-align: start !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
html.is-mobile-device .h-stat-card .h-stat-top { display: contents !important; }
html.is-mobile-device .h-stat-card .h-stat-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  font-size: 1.25rem !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html.is-mobile-device .h-stat-card .h-stat-val {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--text-main, #0f172a) !important;
  margin: 0 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
html.is-mobile-device .h-stat-card .h-stat-meta {
  grid-column: 1 / span 2 !important;
  grid-row: 2 !important;
  width: 100% !important;
  text-align: center !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
html.is-mobile-device .h-stat-card .h-stat-meta .h-stat-label,
html.is-mobile-device .h-stat-card .h-stat-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--text-muted, #64748b) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}
html.is-mobile-device .h-stat-card .h-stat-tag,
html.is-mobile-device .h-stat-card .h-stat-sub,
html.is-mobile-device .h-stat-card .h-stat-micro,
html.is-mobile-device .h-stat-card .h-stat-bar-wrap { display: none !important; }
html.is-mobile-device .stats-carousel-dots {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 6px !important;
  margin-bottom: 16px !important;
}
html.is-mobile-device .carousel-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #cbd5e1 !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
}
html.is-mobile-device .carousel-dot.active {
  width: 22px !important;
  border-radius: 9999px !important;
  background: var(--primary, #0284c7) !important;
}
html.is-mobile-device #dashboardActivePlanBanner {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  border-radius: 16px !important;
  padding: 14px 18px !important;
  margin-bottom: 16px !important;
}
html.is-mobile-device #dashboardActivePlanBanner #planBannerTitle {
  font-size: 1.02rem !important;
  color: #065f46 !important;
  font-weight: 800 !important;
}
html.is-mobile-device #dashboardActivePlanBanner #planBannerTag {
  background: #059669 !important;
  color: #ffffff !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
}
html.is-mobile-device #dashboardActivePlanBanner #planBannerSubtitle {
  font-size: 0.82rem !important;
  color: #047857 !important;
  line-height: 1.35 !important;
}
html.is-mobile-device #dashboardActivePlanBanner button {
  width: 100% !important;
  padding: 12px 18px !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  justify-content: center !important;
}
html.is-mobile-device .platform-global-footer {
  padding: 24px 16px 84px 16px !important;
}
html.is-mobile-device .footer-top-row {
  grid-template-columns: 1fr !important;
  gap: 24px !important;
}
html.is-mobile-device .footer-bottom-row {
  flex-direction: column !important;
  gap: 12px !important;
  text-align: center !important;
}


/* ==========================================================================
   Steno Dictation Pre-Roll Countdown Animation (5 to 1) & Timer Pulse
   ========================================================================== */
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.countdown-overlay.active {
  opacity: 1;
}

.countdown-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.92);
  cursor: pointer;
}

.countdown-card {
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 30px 28px 24px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  max-width: 400px;
  width: 90%;
  z-index: 10;
  animation: modalScaleIn 0.2s ease-out;
}

.countdown-glow-ambient {
  display: none;
}

@keyframes modalScaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.countdown-badge-wrapper {
  width: 170px;
  height: 170px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.countdown-ripple-ring {
  display: none;
}

.countdown-ripple-ring.ring-2 {
  animation-delay: 0.45s;
}

.countdown-ripple-ring.ring-3 {
  animation-delay: 0.9s;
}

@keyframes ringRipple {
  0% { transform: scale(0.88); opacity: 0.95; border-color: rgba(255, 255, 255, 0.65); }
  100% { transform: scale(1.9); opacity: 0; border-color: rgba(255, 255, 255, 0); }
}

.countdown-number-badge {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5.6rem;
  font-weight: 900;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 5;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Radiant, vibrant color palettes per countdown number */
.countdown-number-badge.count-5 {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.85), inset 0 2px 8px rgba(255, 255, 255, 0.7);
}

.countdown-number-badge.count-4 {
  background: linear-gradient(135deg, #0284c7, #06b6d4, #38bdf8);
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.85), inset 0 2px 8px rgba(255, 255, 255, 0.7);
}

.countdown-number-badge.count-3 {
  background: linear-gradient(135deg, #059669, #10b981, #34d399);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.85), inset 0 2px 8px rgba(255, 255, 255, 0.7);
}

.countdown-number-badge.count-2 {
  background: linear-gradient(135deg, #d97706, #f59e0b, #fb923c);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.85), inset 0 2px 8px rgba(255, 255, 255, 0.7);
}

.countdown-number-badge.count-1 {
  background: linear-gradient(135deg, #e11d48, #ef4444, #fb7185);
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.85), inset 0 2px 8px rgba(255, 255, 255, 0.7);
}

.countdown-number-badge.count-go {
  background: linear-gradient(135deg, #10b981, #eab308, #f59e0b);
  box-shadow: 0 0 65px rgba(234, 179, 8, 0.95), inset 0 2px 10px rgba(255, 255, 255, 0.85);
  font-size: 2.2rem;
  width: 160px;
  border-radius: 40px;
  letter-spacing: 0.08em;
  font-weight: 900;
}

@keyframes countPop {
  0% { transform: scale(0.35) rotate(-6deg); opacity: 0; filter: blur(6px); }
  55% { transform: scale(1.22) rotate(3deg); opacity: 1; filter: blur(0px); }
  80% { transform: scale(0.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.countdown-title {
  font-size: 1.38rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  font-family: var(--font-hindi);
  position: relative;
  z-index: 2;
  letter-spacing: 0.01em;
}

.countdown-subtitle {
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 26px;
  font-family: var(--font-hindi);
  position: relative;
  z-index: 2;
  font-weight: 500;
}

.countdown-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.countdown-btn-skip {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.countdown-btn-skip:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.countdown-btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 16px;
  transition: color 0.2s ease;
}

.countdown-btn-cancel:hover {
  color: #f87171;
}

/* Typing timer pulsing badge when student starts typing */
.stat-pill.timer-active {
  background: rgba(37, 99, 235, 0.12) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.35);
  animation: timerPillPulse 2s infinite ease-in-out;
  transform: none !important;
}

@keyframes timerPillPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

/* ==========================================================================
   Single-Device Active Login Eviction Modal (Security Alert)
   ========================================================================== */
.concurrent-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.concurrent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.concurrent-card {
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 25px 60px -15px rgba(220, 38, 38, 0.35), 0 0 45px rgba(0, 0, 0, 0.45);
  border-radius: 20px;
  max-width: 530px;
  width: 100%;
  padding: 32px 28px;
  animation: concurrentCardPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes concurrentCardPop {
  0% { transform: scale(0.92) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.concurrent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.concurrent-icon-badge {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

.shield-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  border: 2px solid rgba(239, 68, 68, 0.7);
  animation: shieldPulseRing 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

@keyframes shieldPulseRing {
  0% { transform: scale(0.95); opacity: 0.9; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.security-tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.concurrent-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
  font-family: var(--font-hindi);
}

.concurrent-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  font-family: var(--font-hindi);
}

.concurrent-details-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.concurrent-details-box .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.concurrent-details-box .detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.concurrent-details-box .detail-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-family: var(--font-hindi);
}

.concurrent-details-box .detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.concurrent-details-box .detail-value.ip-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-weight: 700;
  font-size: 0.9rem;
}

.concurrent-policy-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(245, 158, 11, 0.09);
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
  margin-bottom: 24px;
  font-family: var(--font-hindi);
}

.concurrent-policy-note .policy-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.concurrent-relogin-btn {
  width: 100%;
  padding: 13px 22px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   Plan Validity Top Bar Badge
   ========================================================================== */
.plan-validity-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: var(--text-primary);
}

.plan-validity-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.plan-validity-pill.is-pro {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(16, 185, 129, 0.14));
  border-color: rgba(245, 158, 11, 0.5);
  color: #b45309;
}

.plan-validity-pill.is-free {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary);
}

.plan-validity-pill.is-admin {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

/* ==========================================================================
   Colourful Rainbow Gradient Glow Ring on Profile Avatar (When Pro Active)
   ========================================================================== */
.user-avatar.pro-rainbow-ring {
  position: relative;
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px var(--bg-surface, #ffffff),
              0 0 0 4.5px #f59e0b,
              0 0 16px rgba(236, 72, 153, 0.7) !important;
  animation: avatarRainbowGlow 3.2s linear infinite !important;
}

@keyframes avatarRainbowGlow {
  0% {
    box-shadow: 0 0 0 2px var(--bg-surface, #ffffff),
                0 0 0 4.5px #f59e0b,
                0 0 18px rgba(245, 158, 11, 0.75);
  }
  25% {
    box-shadow: 0 0 0 2px var(--bg-surface, #ffffff),
                0 0 0 4.5px #ec4899,
                0 0 18px rgba(236, 72, 153, 0.85);
  }
  50% {
    box-shadow: 0 0 0 2px var(--bg-surface, #ffffff),
                0 0 0 4.5px #8b5cf6,
                0 0 18px rgba(139, 92, 246, 0.85);
  }
  75% {
    box-shadow: 0 0 0 2px var(--bg-surface, #ffffff),
                0 0 0 4.5px #10b981,
                0 0 18px rgba(16, 185, 129, 0.8);
  }
  100% {
    box-shadow: 0 0 0 2px var(--bg-surface, #ffffff),
                0 0 0 4.5px #f59e0b,
                0 0 18px rgba(245, 158, 11, 0.75);
  }
}

/* ==========================================================================
   Locked Passage Card Styling (Freemium Paywall)
   ========================================================================== */
.class-card.locked-card {
  position: relative;
  border: 1px dashed rgba(245, 158, 11, 0.45);
  background: var(--bg-surface);
  transition: all 0.25s ease;
}

.class-card.locked-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.badge-free-tier {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  font-weight: 700;
}

.badge-locked-tier {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  font-weight: 700;
}

.start-practice-btn.btn-locked {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

.start-practice-btn.btn-locked:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Multi-Tier Subscription Plans & Subscriber Management Styles
   ========================================================================== */
.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.sub-plan-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px 18px;
  position: relative;
  cursor: pointer;
  transition: all 0.22s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sub-plan-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.sub-plan-card.selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.03);
  box-shadow: 0 0 0 2px var(--primary), 0 12px 28px rgba(37, 99, 235, 0.16);
}

.sub-plan-card-tag {
  position: absolute;
  top: -11px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.sub-plan-card-tag.tag-popular {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.sub-plan-card-tag.tag-best {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.sub-plan-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.sub-plan-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sub-plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.sub-plan-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.sub-plan-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sub-plan-savings-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.sub-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sub-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.sub-plan-features li::before {
  content: "✓";
  color: #10b981;
  font-weight: 900;
  flex-shrink: 0;
}

.sub-select-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.sub-plan-card.selected .sub-select-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Admin Subscribers Filter Toolbar */
.subscribers-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.sub-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-filter-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.sub-filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sub-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
}

.sub-status-badge.active-pro {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.sub-status-badge.expired {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sub-status-badge.free {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* Low Validity Expiry Alert Banner */
.expiring-soon-banner {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-left: 5px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

/* ==========================================================================
   Global Platform Footer (RBI & Payment Gateway Compliance)
   ========================================================================== */
.platform-global-footer {
  margin-top: 48px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px 24px 24px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 36px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .footer-top-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 440px;
}

.footer-payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secure-pay-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-col-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-contact-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-contact-item a:hover {
  text-decoration: underline;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-bottom-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* Legal Policy Modals Content Formatting */
.policy-modal-body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  padding-right: 4px;
}

.policy-modal-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-modal-body p {
  margin-bottom: 12px;
}

.policy-highlight-card {
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 0.85rem;
}

/* ==========================================================================
   Clean Streamlined Subscription & Inline Policy Styles
   ========================================================================== */
.clean-sub-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 4px;
}

.clean-checkout-card {
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.clean-checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.clean-checkout-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.clean-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.clean-checkout-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.clean-pay-btn {
  width: 100%;
  max-width: 520px;
  padding: 16px 24px;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.clean-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

.clean-pay-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Inline Policy Accordions inside Subscription */
.sub-policies-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.sub-policies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

.sub-policy-accordion {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-subtle);
  transition: all 0.2s ease;
}

.sub-policy-summary {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  color: var(--text-main);
  transition: background 0.15s ease;
}

.sub-policy-summary:hover {
  background: var(--bg-card-hover);
}

.sub-policy-content {
  padding: 16px 18px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}





/* =============================================================
   EXAM RULES PAGE — परीक्षा नियम
   ============================================================= */

.rules-tab-bar { display:flex; gap:8px; margin-bottom:20px; border-bottom:2px solid var(--border-subtle); }
.rules-tab-btn { padding:10px 20px; font-size:0.9rem; font-weight:700; font-family:inherit; border:none; border-bottom:3px solid transparent; background:transparent; color:var(--text-secondary); cursor:pointer; border-radius:var(--radius-sm) var(--radius-sm) 0 0; transition:all 0.2s; margin-bottom:-2px; }
.rules-tab-btn:hover { color:var(--primary); background:var(--primary-subtle); }
.rules-tab-btn.active { color:var(--primary); border-bottom-color:var(--primary); background:var(--primary-subtle); }

.rules-alert { padding:12px 16px; border-radius:var(--radius-md); font-size:0.88rem; margin-bottom:16px; border-left:4px solid; line-height:1.5; }
.rules-alert-blue { background:#eff6ff; border-color:#3b82f6; color:#1e40af; }

.rules-card { background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:var(--radius-lg); margin-bottom:12px; overflow:hidden; box-shadow:var(--shadow-sm); }
.rules-card-header { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; cursor:pointer; font-weight:700; font-size:0.95rem; background:var(--bg-subtle); transition:background 0.15s; user-select:none; border-bottom:1px solid var(--border-subtle); }
.rules-card-header:hover { background:var(--primary-subtle); color:var(--primary); }
.rules-card-header.rules-card-red { background:#fff1f2; color:#be123c; border-bottom-color:#fecdd3; }
.rules-card-header.rules-card-red:hover { background:#ffe4e6; }
.rules-card-header.rules-card-orange { background:#fff7ed; color:#c2410c; border-bottom-color:#fed7aa; }
.rules-card-header.rules-card-orange:hover { background:#ffedd5; }
.rules-card-header.rules-card-green { background:#f0fdf4; color:#15803d; border-bottom-color:#bbf7d0; }
.rules-card-header.rules-card-green:hover { background:#dcfce7; }
.rules-arrow { font-size:1.1rem; }

.rules-card-body { padding:16px 18px; font-size:0.9rem; color:var(--text-secondary); line-height:1.7; background:var(--bg-surface); }
.rules-subhead { font-weight:600; color:var(--text-primary); margin-bottom:10px; font-size:0.88rem; }
.rules-list { padding-left:20px; margin:0; }
.rules-list li { margin-bottom:8px; line-height:1.65; }

.rules-highlight-box { background:#fffbeb; border:1px solid #fcd34d; border-left:4px solid #f59e0b; border-radius:var(--radius-md); padding:12px 14px; margin-top:14px; font-size:0.88rem; color:#78350f; line-height:1.6; }
.rules-highlight-box.rules-highlight-green { background:#f0fdf4; border-color:#86efac; border-left-color:#16a34a; color:#14532d; }
.rules-special-box { background:var(--bg-subtle); border:1px solid var(--border-subtle); border-radius:var(--radius-md); padding:12px 14px; margin-top:12px; font-size:0.86rem; line-height:1.65; }

.rules-table-wrap { overflow-x:auto; border-radius:var(--radius-md); border:1px solid var(--border-subtle); }
.rules-table { width:100%; border-collapse:collapse; font-size:0.87rem; }
.rules-table th { background:var(--bg-subtle); font-weight:700; padding:10px 14px; text-align:left; border-bottom:2px solid var(--border); color:var(--text-primary); white-space:nowrap; }
.rules-table td { padding:9px 14px; border-bottom:1px solid var(--border-subtle); color:var(--text-secondary); vertical-align:middle; }
.rules-table tbody tr:last-child td { border-bottom:none; }
.rules-table tbody tr:hover { background:var(--primary-subtle); }

.rules-section-panel { animation:fadeInRules 0.2s ease; }
@keyframes fadeInRules { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ==========================================================================
   Admin Modern Left-Tabbed Workspace & Decluttered Overview Layout
   ========================================================================== */
.admin-workspace-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  min-height: calc(100vh - 120px);
  margin-top: 10px;
}

.admin-left-tabs {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  position: sticky;
  top: 75px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.admin-left-tabs-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 14px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.admin-panel-shield {
  font-size: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  padding: 6px 8px;
  border-radius: 10px;
  line-height: 1;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.admin-tab-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
}

.admin-nav-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.admin-nav-tab.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.08));
  color: #ef4444;
  font-weight: 700;
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.admin-tab-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.admin-tab-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.admin-tab-title {
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-tab-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-workspace-content {
  flex: 1;
  min-width: 0;
}

.admin-sub-panel {
  display: none;
  animation: adminPanelFade 0.22s ease-out forwards;
}

.admin-sub-panel.active {
  display: block;
}

@keyframes adminPanelFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overview Panel Specific Styling: Airy, Clean, Modern */
.admin-overview-hero {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.06), rgba(99, 102, 241, 0.06));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: inherit;
}

.admin-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.admin-action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.admin-system-health-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

/* Mobile & Tablet Responsiveness for Admin Tabs */
@media (max-width: 960px) {
  .admin-workspace-layout {
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  .admin-left-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: static;
    padding: 8px 10px;
    box-sizing: border-box;
  }
  .admin-left-tabs-header {
    display: none;
  }
  .admin-tab-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }
  .admin-nav-tab {
    flex-shrink: 0;
    width: auto;
    padding: 8px 14px;
  }
  .admin-tab-sub {
    display: none;
  }
  .admin-workspace-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden;
  }
}

/* ========================================================================= */
/* Phase 5: Master Reference Passage & Steno Shorthand Notes Display Styles */
/* ========================================================================= */
.result-steno-notes-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg, 12px);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(67, 56, 202, 0.06);
}

.result-steno-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.steno-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.steno-preview-banner {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
}

.steno-preview-banner:hover {
  background: #f1f5f9;
  border-color: #6366f1;
}

.steno-preview-hover-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.76rem;
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.result-master-passage-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
}

.result-master-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.result-font-toggle-group {
  display: inline-flex;
  background: var(--bg-subtle, #f1f5f9);
  padding: 3px;
  border-radius: 6px;
  gap: 4px;
}

.result-font-toggle-group .btn-sm {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.result-font-toggle-group .btn-sm.active {
  background: var(--bg-card, #ffffff);
  color: var(--primary, #6366f1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-master-passage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  transition: grid-template-columns 0.3s ease;
}

.result-passage-box-wrap {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-subtle, #f8fafc);
}

.result-box-tag {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.result-passage-text-content {
  padding: 16px 18px;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-main, #1e293b);
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-card, #ffffff);
}

/* ==========================================================================
   Sleek Browser Native-Style Top Loading Progress Bar (YouTube/GitHub/NProgress)
   ========================================================================== */
.top-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 40%, #6366f1 75%, #a855f7 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.85), 0 0 5px rgba(2, 132, 199, 0.6);
  z-index: 99999999;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: width 0.22s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.3s ease;
}

.top-loading-bar.is-loading {
  opacity: 1;
}

.top-loading-bar.is-done {
  width: 100% !important;
  opacity: 0;
  transition: width 0.16s ease, opacity 0.35s ease 0.12s;
}

.top-loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 14px #38bdf8, 0 0 8px #6366f1;
  opacity: 0.9;
  animation: topBarPulseGlow 1s ease-in-out infinite alternate;
}

@keyframes topBarPulseGlow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ==========================================================================
   Google Translate & Browser Translator Protection
   Preserves official passage, student typing, and word matching tokens in Hindi
   ========================================================================== */
.notranslate,
[translate="no"],
.token-stream-box,
.eval-token,
.result-passage-text-content,
.typing-textarea {
  /* Ensure browser translators honor notranslate container boundaries */
  -webkit-transform: translateZ(0);
}

/* Hardware Accelerated 60 FPS Elements */
html {
  scroll-behavior: smooth;
}

.class-card,
.stat-card,
.h-stat-card,
.wpm-chip,
.btn-primary,
.btn-secondary {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.app-footer {
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

/* PWA App Install Button */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.15s ease;
  user-select: none;
}

.pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
}


/* ==========================================================================
   Self Practice & Visual Keyboard Map Components (v6.8)
   ========================================================================== */

/* Self Practice Layout */
.self-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.self-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.self-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.self-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.self-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.self-dropzone:hover {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.05);
}

/* Visual Keyboard Map Styles */
.v-keyboard-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.v-keyboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.v-layout-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.v-tab-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.v-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.v-keyboard-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v-shift-toggle {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.v-shift-toggle.active {
  background: #f59e0b;
  color: #fff;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.v-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
}

.v-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.82rem;
  color: var(--text-main);
  width: 170px;
}

.v-clear-search {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Keyboard Board & Keys */
.v-keyboard-board {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #e2e8f0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow-x: auto;
}

.v-key-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.v-key {
  position: relative;
  height: 52px;
  min-width: 44px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
  padding: 2px 4px;
  flex: 1;
}

.v-key:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 3.5px 0 rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.v-key:active {
  transform: translateY(1.5px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.v-key.v-key-home {
  box-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.18), 0 0 0 1.5px rgba(15, 23, 42, 0.25);
}

.v-key-bump {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  opacity: 0.75;
}

.v-key.v-key-matched {
  outline: 3px solid #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.9) !important;
  transform: scale(1.08) !important;
  z-index: 10;
}

.v-eng-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.55);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  pointer-events: none;
}

.v-chars-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  line-height: 1;
}

.v-shift-char {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 2px;
  opacity: 0.75;
  transition: all 0.15s ease;
}

.v-norm-char {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  transition: all 0.15s ease;
}

/* Shift active state enhancements */
.v-key.v-shift-on .v-shift-char.v-active {
  opacity: 1;
  font-weight: 900;
  font-size: 1.18rem;
  color: #000000;
  transform: scale(1.12);
}

.v-key.v-shift-on .v-norm-char {
  opacity: 0.45;
  transform: scale(0.88);
}

.v-key:not(.v-shift-on) .v-norm-char.v-active {
  opacity: 1;
  font-weight: 800;
  font-size: 1.14rem;
  color: #000000;
}

.v-key:not(.v-shift-on) .v-shift-char {
  opacity: 0.7;
  font-size: 0.92rem;
}

/* Key Widths */
.v-key.wide-backspace { min-width: 78px; flex: 1.8; }
.v-key.wide-tab { min-width: 62px; flex: 1.4; }
.v-key.wide-caps { min-width: 70px; flex: 1.6; }
.v-key.wide-enter { min-width: 80px; flex: 1.9; }
.v-key.wide-shift-l { min-width: 88px; flex: 2.1; }
.v-key.wide-shift-r { min-width: 88px; flex: 2.1; }
.v-key.wide-space { min-width: 260px; max-width: 480px; flex: 8; background: #ffffff !important; }
.v-key.wide-pipe { min-width: 52px; flex: 1.2; }

.v-key.v-key-special {
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 0 #94a3b8;
}

/* Finger Zone Colors matching reference image (Apple layout) */
.v-key.finger-1 { background: #fca34d; color: #0f172a; } /* Orange - Pinky L */
.v-key.finger-2 { background: #fde047; color: #0f172a; } /* Yellow - Ring L */
.v-key.finger-3 { background: #a3e635; color: #0f172a; } /* Lime - Middle L */
.v-key.finger-4 { background: #2dd4bf; color: #0f172a; } /* Teal - Index L */
.v-key.finger-5 { background: #60a5fa; color: #0f172a; } /* Sky Blue - Index R */
.v-key.finger-6 { background: #a78bfa; color: #0f172a; } /* Purple - Middle R */
.v-key.finger-7 { background: #f472b6; color: #0f172a; } /* Pink - Ring R */
.v-key.finger-8 { background: #fb7185; color: #0f172a; } /* Coral - Pinky R */

/* Finger Legend */
.v-finger-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
}
.legend-dot.finger-1 { background: #fca34d; }
.legend-dot.finger-2 { background: #fde047; }
.legend-dot.finger-3 { background: #a3e635; }
.legend-dot.finger-4 { background: #2dd4bf; }
.legend-dot.finger-5 { background: #60a5fa; }
.legend-dot.finger-6 { background: #a78bfa; }
.legend-dot.finger-7 { background: #f472b6; }
.legend-dot.finger-8 { background: #fb7185; }

/* Alt Codes Grid */
.alt-codes-container {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.alt-codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.alt-code-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.alt-code-card:hover {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.08);
  transform: translateY(-1px);
}

.alt-char {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 28px;
  text-align: center;
}

.alt-info {
  display: flex;
  flex-direction: column;
}

.alt-code-badge {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-main);
}

.alt-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}


/* ==========================================================================
   Gaming Style Rewards & Achievements Modal
   ========================================================================== */
.rewards-game-modal {
  max-width: 820px;
  width: 95vw;
  background: var(--bg-surface, #ffffff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.rewards-game-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 28%, #312e81 60%, #4c1d95 100%);
  padding: 22px 24px 18px 24px;
  color: #ffffff;
  position: relative;
  border-bottom: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 25px rgba(49, 46, 129, 0.3);
}

.rewards-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.rewards-game-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0 0 4px 0;
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rewards-game-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: #c7d2fe;
}

.rewards-game-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.rewards-game-close:hover {
  background: rgba(239, 68, 68, 0.8);
  transform: scale(1.08);
}

.rewards-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
}

.rewards-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2px;
}

.rewards-stat-pill-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.rewards-stat-pill-val {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
}

.rewards-pill-points {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.rewards-pill-badges {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.rewards-pill-streak {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

.rewards-pill-tier {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 2px;
  text-transform: uppercase;
}

.rewards-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.rewards-table-wrapper {
  margin-bottom: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface);
}

.rewards-rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.rewards-rules-table th {
  background: var(--bg-surface-alt, #f8fafc);
  color: var(--text-main);
  padding: 10px 14px;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.rewards-rules-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.rewards-rules-table tr:last-child td {
  border-bottom: none;
}

.pts-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.84rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.rewards-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.badge-achievement-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-surface-alt, #f8fafc);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.badge-achievement-card.unlocked {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(59, 130, 246, 0.06));
  border-color: rgba(16, 185, 129, 0.4);
}

.badge-achievement-card:hover {
  transform: translateY(-2px);
}

.badge-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.badge-achievement-card.unlocked .badge-icon-box {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.badge-info-box {
  flex: 1;
  min-width: 0;
}

.badge-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.badge-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.badge-status-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.tag-unlocked {
  background: #10b981;
  color: #fff;
}

.tag-locked {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.badge-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
}

@media (max-width: 700px) {
  .rewards-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .rewards-badges-grid {
    grid-template-columns: 1fr;
  }
}


/* 60 FPS Hardware Acceleration & Zero Typing Latency */
.typing-textarea {
  contain: layout style;
}

.class-card,
.rules-section-panel,
.stat-card,
.badge-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 160px;
}


/* 4-Tier Subscription Plans - All 4 in 1 Line */
.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

@media (max-width: 992px) {
  .subscription-plans-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
}

@media (max-width: 540px) {
  .subscription-plans-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

.sub-plan-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px 14px 18px 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.22s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sub-plan-card:hover {
  border-color: var(--primary) !important;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18) !important;
}

.sub-buy-now-btn {
  width: 100%;
  padding: 11px 8px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  margin-top: 12px;
}

.sub-buy-now-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.sub-plan-card:hover .sub-buy-now-btn {
  filter: brightness(1.08);
}

.qr-plan-chip {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.qr-plan-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.qr-plan-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}


/* ==========================================================================
   Founder & Mentor Profile Page Styles
   ========================================================================== */
.founder-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 30px;
}

.founder-hero-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.founder-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #d97706, #10b981);
}

.founder-photo-wrap {
  flex-shrink: 0;
  position: relative;
  text-align: center;
}

.founder-photo {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-surface);
  box-shadow: 0 0 0 3px #d97706, 0 8px 20px rgba(0, 0, 0, 0.12);
  background: var(--bg-subtle);
  display: block;
}

.founder-verified-badge {
  position: absolute;
  bottom: 4px;
  right: 8px;
  background: #2563eb;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.founder-meta {
  flex: 1;
}

.founder-badge-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(245, 158, 11, 0.12));
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.founder-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.founder-title {
  font-size: 0.94rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 14px;
}

.founder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.founder-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.founder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.founder-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.founder-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-subtle);
  padding-bottom: 12px;
}

.founder-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.founder-text {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.founder-quote-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(99, 102, 241, 0.05));
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  font-size: 0.96rem;
  font-style: italic;
  color: var(--text-main);
  line-height: 1.7;
  margin: 16px 0;
}

.founder-vision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .founder-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
  .founder-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }
  .founder-chips {
    justify-content: center;
  }
  .founder-actions {
    justify-content: center;
  }
  .founder-vision-grid {
    grid-template-columns: 1fr;
  }
}

.founder-vision-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.founder-vision-item h4 {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.founder-vision-item p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.founder-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.founder-social-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.founder-social-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.founder-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Active Plan Status Banner (Horizontal, Slim, Stylish Translucent)
   ========================================================================== */
.sub-active-bar {
  width: 100%;
  margin: 0 0 16px 0;
  border-radius: 12px;
  padding: 8px 16px;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.sub-active-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.sub-active-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.sub-active-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

/* Green Active State */
.sub-active-bar.bar-active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.06) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.38);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.08);
  color: #065f46;
}

body.dark-mode .sub-active-bar.bar-active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.18) 0%, rgba(5, 150, 105, 0.10) 100%);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  box-shadow: 0 2px 14px rgba(16, 185, 129, 0.15);
}

.sub-active-bar.bar-active .sub-active-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .sub-active-bar.bar-active .sub-active-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.sub-active-bar.bar-active .sub-active-highlight {
  font-weight: 700;
  color: #065f46;
}

body.dark-mode .sub-active-bar.bar-active .sub-active-highlight {
  color: #ecfdf5;
}

.sub-active-bar.bar-active .sub-active-days-chip {
  background: #10b981;
  color: #ffffff;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.sub-active-bar.bar-active .sub-active-exp-text {
  font-size: 0.82rem;
  color: #047857;
  font-weight: 500;
}

body.dark-mode .sub-active-bar.bar-active .sub-active-exp-text {
  color: #6ee7b7;
}

/* Red Inactive State */
.sub-active-bar.bar-inactive {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.10) 0%, rgba(220, 38, 38, 0.05) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.08);
  color: #991b1b;
}

body.dark-mode .sub-active-bar.bar-inactive {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.18) 0%, rgba(220, 38, 38, 0.10) 100%);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  box-shadow: 0 2px 14px rgba(239, 68, 68, 0.15);
}

.sub-active-bar.bar-inactive .sub-active-lead {
  font-weight: 800;
  color: #991b1b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .sub-active-bar.bar-inactive .sub-active-lead {
  color: #fee2e2;
}

.sub-active-bar.bar-inactive .sub-active-desc {
  color: #b91c1c;
  font-size: 0.85rem;
}

body.dark-mode .sub-active-bar.bar-inactive .sub-active-desc {
  color: #fca5a5;
}

.sub-active-bar.bar-inactive .sub-active-pill-inactive {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .sub-active-bar.bar-inactive .sub-active-pill-inactive {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

/* Pulsing Green Dot */
.sub-active-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: subPulseGreen 2s infinite;
}

@keyframes subPulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 640px) {
  .sub-active-bar {
    padding: 8px 12px;
  }
  .sub-active-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .sub-active-bar-left, .sub-active-bar-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Official Exam Error Formula & Weak Words Bank Styles
   ========================================================================== */
.exam-verdict-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.exam-verdict-banner.banner-pass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.06) 100%);
  border: 2px solid #10b981;
  color: #065f46;
}

body.dark-mode .exam-verdict-banner.banner-pass {
  color: #a7f3d0;
  border-color: #34d399;
}

.exam-verdict-banner.banner-warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.06) 100%);
  border: 2px solid #f59e0b;
  color: #92400e;
}

body.dark-mode .exam-verdict-banner.banner-warn {
  color: #fde68a;
  border-color: #fbbf24;
}

.exam-verdict-banner.banner-fail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.06) 100%);
  border: 2px solid #ef4444;
  color: #991b1b;
}

body.dark-mode .exam-verdict-banner.banner-fail {
  color: #fca5a5;
  border-color: #f87171;
}

/* Mistake Formula Card */
.mistake-formula-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.formula-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-subtle);
  padding-bottom: 14px;
}

.formula-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.formula-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.formula-final-badge {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.formula-boxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.formula-box {
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s;
}

.formula-box.box-full-mistake {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.09) 0%, rgba(220, 38, 38, 0.03) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
}

body.dark-mode .formula-box.box-full-mistake {
  border-color: rgba(248, 113, 113, 0.4);
}

.formula-box.box-half-mistake {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(217, 119, 6, 0.03) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
}

body.dark-mode .formula-box.box-half-mistake {
  border-color: rgba(251, 191, 36, 0.4);
}

.f-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.f-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.f-badge-full {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

body.dark-mode .f-badge-full {
  color: #fca5a5;
}

.f-badge-half {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

body.dark-mode .f-badge-half {
  color: #fde68a;
}

.f-deduction {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.f-total-count {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.f-calc {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.f-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  padding: 10px 14px;
}

body.dark-mode .f-breakdown-list {
  background: rgba(0, 0, 0, 0.25);
}

.f-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.f-item strong {
  color: var(--text-main);
}

.formula-equation-bar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.92rem;
  text-align: center;
}

.eq-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.eq-chip.eq-result {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

body.dark-mode .eq-chip.eq-result {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.eq-divider {
  margin: 0 8px;
  color: var(--border-strong);
}

/* Weak Words Bank Card */
.weak-words-bank-card {
  background: var(--bg-surface);
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.05);
}

.ww-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ww-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

body.dark-mode .ww-tag {
  color: #a5b4fc;
}

.ww-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.ww-subtitle {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 0;
}

.btn-copy-weak-words {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  transition: all 0.2s;
}

.btn-copy-weak-words:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.weak-words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.weak-word-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}

.weak-word-card:hover {
  transform: translateY(-2px);
  border-color: #818cf8;
}

.ww-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ww-target-word {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-hindi);
}

.ww-error-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

body.dark-mode .ww-error-chip {
  color: #fca5a5;
}

.ww-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ww-input-row {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ww-student-val {
  font-weight: 700;
  color: var(--accent-red);
  font-family: var(--font-hindi);
}

.ww-tip-row {
  font-size: 0.8rem;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}

body.dark-mode .ww-tip-row {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.18);
}

.ww-empty-box {
  text-align: center;
  padding: 30px;
  font-size: 1rem;
  color: var(--accent-green);
  font-weight: 700;
  background: var(--bg-subtle);
  border-radius: 12px;
}

/* ==========================================================================
   Curated Practice Library: Filter Pills & Category Bars
   ========================================================================== */
.classes-curated-filter-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.curated-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.curated-filter-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
  min-width: 140px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.curated-pills-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.curated-pill {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.curated-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.curated-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.curated-pill.pill-khand.active {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-color: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.curated-pill.pill-editorial.active {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #047857;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.curated-pill.pill-court.active {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #b45309;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

.curated-pill.pill-reporter.active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #b91c1c;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

@media (max-width: 768px) {
  .curated-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .curated-filter-label {
    min-width: 100%;
  }
}

/* ==========================================================================
   Strict Exam Hall Mode Styles
   ========================================================================== */
@keyframes alertPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-exam-active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.timer-one-minute-alert {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #ef4444 !important;
  font-weight: 800 !important;
  animation: alertPulse 1.2s infinite !important;
}

/* Elevated Category Series Cards Styling */
.category-series-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}
.category-series-card:hover {
  transform: translateY(-3px) scale(1.002) !important;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}
@media (max-width: 1024px), (orientation: portrait) {
  .category-series-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 18px 18px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    border: 1.5px solid #d1fae5 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .category-series-card .cat-left-section,
  .category-series-card > div:nth-child(2) {
    min-width: 0 !important;
    width: 100% !important;
    flex: none !important;
    gap: 14px !important;
    display: flex !important;
    align-items: center !important;
  }
  .category-series-card .cat-left-section h4 {
    font-size: 1.22rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
  }
  .category-series-card .cat-middle-specs {
    border-left: none !important;
    border-right: none !important;
    border-top: 1px dashed var(--border-subtle, #e2e8f0) !important;
    border-bottom: none !important;
    padding: 10px 0 4px 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    flex: none !important;
    gap: 8px !important;
  }
  .category-series-card .cat-middle-specs span {
    font-size: 0.82rem !important;
    padding: 5px 12px !important;
    border-radius: 9999px !important;
  }
  .category-series-card .cat-action-section,
  .category-series-card > div:last-child {
    justify-content: stretch !important;
    width: 100% !important;
    flex: none !important;
    margin-top: 4px !important;
  }
  .category-series-card .cat-action-section > div,
  .category-series-card > div:last-child > div {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
    justify-content: stretch !important;
  }
  .category-series-card .cat-action-section button,
  .category-series-card > div:last-child button {
    flex: 1 !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 13px 20px !important;
    border-radius: 14px !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
  }
}


/* ==========================================================================
   UNIVERSAL BACK NAVIGATION BUTTONS (HEADER + IN-PAGE)
   ========================================================================== */
.header-back-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  height: 36px;
  border-radius: 9999px;
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--primary, #0284c7);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  margin-right: 6px;
  user-select: none;
  flex-shrink: 0;
}

.header-back-btn:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: #0284c7;
  transform: translateX(-2px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.18);
}

.header-back-btn .back-arrow {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 640px) {
  .header-back-btn .back-text {
    display: none;
  }
  .header-back-btn {
    padding: 0;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
}

.view-back-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--text-secondary, #475569);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.view-back-strip-btn:hover {
  background: var(--bg-subtle, #f8fafc);
  border-color: var(--primary, #0284c7);
  color: var(--primary, #0284c7);
  transform: translateX(-2px);
}

.view-back-strip-btn .back-icon {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

/* Ensure active page-views are always strictly visible */
.page-view.active {
  display: block !important;
}


/* ==========================================================================
   Section: Saved Custom Classes Playlist (2 Boxes per Line, 3D Transparent Design)
   ========================================================================== */
.my-saved-classes-section {
  margin-top: 28px;
  padding: 24px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 20px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  display: block !important;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="dark"] .my-saved-classes-section {
  background: var(--bg-surface, #131b2e);
  border-color: var(--border-subtle, #243048);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

.custom-playlist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px;
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .custom-playlist-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

/* 3D Box with Glowing Colourful Gradient Border & Transparent Interior */
.saved-playlist-card-3d {
  position: relative;
  border-radius: 20px;
  padding: 2.5px; /* Creates the outer glowing gradient border */
  box-sizing: border-box;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  display: flex;
  flex-direction: column;
}

/* 4 Distinct Vibrant Colour Themes */
.saved-playlist-card-3d.playlist-theme-purple {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  box-shadow: 0 10px 25px -4px rgba(99, 102, 241, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.saved-playlist-card-3d.playlist-theme-purple:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 22px 35px -6px rgba(99, 102, 241, 0.38), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

.saved-playlist-card-3d.playlist-theme-emerald {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #3b82f6 100%);
  box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.saved-playlist-card-3d.playlist-theme-emerald:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 22px 35px -6px rgba(16, 185, 129, 0.38), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

.saved-playlist-card-3d.playlist-theme-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 50%, #f59e0b 100%);
  box-shadow: 0 10px 25px -4px rgba(244, 63, 94, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.saved-playlist-card-3d.playlist-theme-rose:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 22px 35px -6px rgba(244, 63, 94, 0.38), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

.saved-playlist-card-3d.playlist-theme-blue {
  background: linear-gradient(135deg, #0284c7 0%, #3b82f6 50%, #8b5cf6 100%);
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.saved-playlist-card-3d.playlist-theme-blue:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 22px 35px -6px rgba(2, 132, 199, 0.38), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

/* Frosted Transparent Glass Interior */
.saved-playlist-inner {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 17.5px;
  padding: 18px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .saved-playlist-inner {
  background: rgba(19, 27, 46, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .playlist-card-icon-wrap {
  background: rgba(30, 41, 59, 0.9) !important;
}


/* ===================================================================
   MY PROFILE: 3D HERO HEADER & COLOURFUL TRANSPARENT BOXES
   =================================================================== */

/* 1. Ultra-Premium 3D Hero Header Card */
.profile-hero-card-3d {
  position: relative;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 30%, #ec4899 65%, #f59e0b 100%);
  box-shadow: 0 16px 36px -6px rgba(99, 102, 241, 0.28), 0 6px 16px -2px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-hero-card-3d:hover {
  box-shadow: 0 24px 45px -8px rgba(99, 102, 241, 0.38), 0 10px 22px -3px rgba(0, 0, 0, 0.08);
}

.profile-hero-inner {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 21px;
  padding: 24px 26px;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] .profile-hero-inner {
  background: rgba(15, 23, 42, 0.85);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
}

.profile-hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-hero-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-hero-avatar {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  box-shadow: 0 8px 20px -3px rgba(99, 102, 241, 0.45);
}

.profile-hero-name {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main, #0f172a);
  line-height: 1.25;
}

.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}
[data-theme="dark"] .profile-verified-badge {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}

.profile-hero-sub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.profile-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #4f46e5;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}
[data-theme="dark"] .profile-id-chip {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.profile-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 0.15s;
}
.profile-copy-btn:hover {
  transform: scale(1.25);
}

.profile-meta-separator {
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
}

.btn-profile-logout {
  padding: 8px 18px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-profile-logout:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

/* 4 Glowing Transparent Stat Highlight Pills */
.profile-hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.profile-stat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.profile-stat-pill:hover {
  transform: translateY(-4px);
}

.profile-stat-pill.pill-gold {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.profile-stat-pill.pill-gold:hover {
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}
.profile-stat-pill.pill-gold .profile-stat-value {
  color: #d97706;
}
[data-theme="dark"] .profile-stat-pill.pill-gold .profile-stat-value {
  color: #fbbf24;
}

.profile-stat-pill.pill-purple {
  background: rgba(147, 51, 234, 0.08);
  border: 1px solid rgba(147, 51, 234, 0.3);
}
.profile-stat-pill.pill-purple:hover {
  background: rgba(147, 51, 234, 0.14);
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.25);
}
.profile-stat-pill.pill-purple .profile-stat-value {
  color: #7e22ce;
}
[data-theme="dark"] .profile-stat-pill.pill-purple .profile-stat-value {
  color: #c084fc;
}

.profile-stat-pill.pill-emerald {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.profile-stat-pill.pill-emerald:hover {
  background: rgba(16, 185, 129, 0.14);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}
.profile-stat-pill.pill-emerald .profile-stat-value {
  color: #059669;
}
[data-theme="dark"] .profile-stat-pill.pill-emerald .profile-stat-value {
  color: #34d399;
}

.profile-stat-pill.pill-cyan {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.profile-stat-pill.pill-cyan:hover {
  background: rgba(6, 182, 212, 0.14);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.25);
}
.profile-stat-pill.pill-cyan .profile-stat-value {
  color: #0891b2;
}
[data-theme="dark"] .profile-stat-pill.pill-cyan .profile-stat-value {
  color: #22d3ee;
}

.profile-stat-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.profile-stat-content {
  flex: 1;
  min-width: 0;
}

.profile-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-stat-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #475569);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-stat-arrow {
  font-size: 0.95rem;
  color: var(--text-muted, #94a3b8);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.profile-stat-pill:hover .profile-stat-arrow {
  transform: translateX(3px);
  color: var(--primary, #6366f1);
}

/* 2. Responsive 2-Column Grid of 3D Transparent Boxes */
.profile-boxes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

/* 3D Box Base */
.profile-3d-box {
  position: relative;
  border-radius: 22px;
  padding: 2.5px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-3d-box:hover {
  transform: translateY(-6px) scale(1.01);
}

/* 4 Colour Themes */
.profile-3d-box.profile-theme-blue {
  background: linear-gradient(135deg, #0284c7 0%, #3b82f6 50%, #8b5cf6 100%);
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.24), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.profile-3d-box.profile-theme-blue:hover {
  box-shadow: 0 22px 35px -6px rgba(2, 132, 199, 0.4), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

.profile-3d-box.profile-theme-emerald {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #0284c7 100%);
  box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.24), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.profile-3d-box.profile-theme-emerald:hover {
  box-shadow: 0 22px 35px -6px rgba(16, 185, 129, 0.4), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

.profile-3d-box.profile-theme-purple {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 10px 25px -4px rgba(99, 102, 241, 0.24), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.profile-3d-box.profile-theme-purple:hover {
  box-shadow: 0 22px 35px -6px rgba(99, 102, 241, 0.4), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

.profile-3d-box.profile-theme-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 50%, #f59e0b 100%);
  box-shadow: 0 10px 25px -4px rgba(244, 63, 94, 0.24), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.profile-3d-box.profile-theme-rose:hover {
  box-shadow: 0 22px 35px -6px rgba(244, 63, 94, 0.4), 0 12px 18px -4px rgba(0, 0, 0, 0.08);
}

/* Inner Glass Container */
.profile-3d-inner {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 19.5px;
  padding: 22px 24px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.75);
}
[data-theme="dark"] .profile-3d-inner {
  background: rgba(19, 27, 46, 0.85);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

/* Box Headers */
.profile-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-subtle, rgba(226, 232, 240, 0.8));
}
.profile-box-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.profile-box-icon-wrap.icon-blue {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}
.profile-box-icon-wrap.icon-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.profile-box-icon-wrap.icon-purple {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}
.profile-box-icon-wrap.icon-rose {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

.profile-box-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  letter-spacing: -0.2px;
}
.profile-box-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
}

/* Info List (Box 1) */
.profile-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(2, 132, 199, 0.04);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(2, 132, 199, 0.12);
  flex-wrap: wrap;
}
[data-theme="dark"] .profile-info-item {
  background: rgba(2, 132, 199, 0.08);
}
.profile-info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}
.profile-info-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}
.profile-info-val-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-highlight-code {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.5px;
}
.btn-micro-copy {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-micro-copy:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Subscription Details (Box 2) */
.profile-sub-details-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-countdown-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
}
[data-theme="dark"] .profile-countdown-badge {
  color: #fbbf24;
}
.profile-sub-name-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.18);
  padding: 12px 14px;
  border-radius: 14px;
}
.profile-features-checklist {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-secondary, #475569);
  padding-left: 4px;
}
.feat-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.feat-check-item span:first-child {
  color: #10b981;
  font-weight: 900;
}

/* Performance Grid (Box 4) */
.profile-perf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.profile-perf-tile {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.15);
  padding: 12px;
  border-radius: 14px;
  text-align: center;
}
.profile-perf-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #e11d48;
}
[data-theme="dark"] .profile-perf-num {
  color: #fb7185;
}
.profile-perf-lbl {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  margin-top: 2px;
}

/* Action Buttons inside 3D boxes */
.profile-box-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle, rgba(226, 232, 240, 0.8));
}
.btn-box-action {
  width: 100%;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.btn-box-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.btn-box-action.btn-blue {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-box-action.btn-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-box-action.btn-purple {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-box-action.btn-rose {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

/* Responsive Breakpoints for Mobile */
@media (max-width: 900px) {
  .profile-hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .profile-boxes-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .profile-hero-inner {
    padding: 18px 16px;
  }
  .profile-hero-stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .profile-hero-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-hero-actions {
    width: 100%;
  }
  .btn-profile-logout {
    width: 100%;
    justify-content: center;
  }
}


.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  opacity: 0.65;
  transition: opacity 0.2s, transform 0.15s;
  line-height: 1;
}
.btn-toggle-pwd:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}


/* ===================================================================
   DUAL-WALLET: GOLD COINS (1 COIN = ₹1) & 10% CASH COMMISSION SYSTEM
   =================================================================== */

.wallet-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

/* 3D Gold Coins Wallet Card */
.wallet-card-gold-3d {
  position: relative;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 35%, #d97706 70%, #fef08a 100%);
  box-shadow: 0 16px 36px -6px rgba(245, 158, 11, 0.32), 0 6px 16px -2px rgba(0, 0, 0, 0.06);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.wallet-card-gold-3d:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px -8px rgba(245, 158, 11, 0.44), 0 10px 22px -3px rgba(0, 0, 0, 0.1);
}

/* 3D Cash Commission Wallet Card */
.wallet-card-cash-3d {
  position: relative;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 40%, #059669 75%, #a7f3d0 100%);
  box-shadow: 0 16px 36px -6px rgba(16, 185, 129, 0.32), 0 6px 16px -2px rgba(0, 0, 0, 0.06);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.wallet-card-cash-3d:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px -8px rgba(16, 185, 129, 0.44), 0 10px 22px -3px rgba(0, 0, 0, 0.1);
}

.wallet-card-inner {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 21px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 290px;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .wallet-card-inner {
  background: rgba(15, 23, 42, 0.88);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

.wallet-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.wallet-badge-gold {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
[data-theme="dark"] .wallet-badge-gold {
  background: rgba(245, 158, 11, 0.25);
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.5);
}
.wallet-badge-cash {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
[data-theme="dark"] .wallet-badge-cash {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.5);
}

.wallet-stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 6px 0;
  font-family: 'Inter', system-ui, sans-serif;
}
.wallet-stat-gold {
  background: linear-gradient(135deg, #d97706, #b45309);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .wallet-stat-gold {
  background: linear-gradient(135deg, #fbbf24, #fef08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wallet-stat-cash {
  background: linear-gradient(135deg, #059669, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .wallet-stat-cash {
  background: linear-gradient(135deg, #34d399, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wallet-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary, #475569);
  margin-bottom: 8px;
}
[data-theme="dark"] .wallet-perk-item {
  color: #cbd5e1;
}

.btn-wallet-action {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 14px;
}
.btn-wallet-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.btn-wallet-gold:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.45);
}
.btn-wallet-cash {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.btn-wallet-cash:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.45);
}

/* History Tabs within Wallet */
.wallet-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-subtle, #e2e8f0);
  margin-bottom: 16px;
  overflow-x: auto;
}
.wallet-tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}
.wallet-tab-btn.active {
  color: var(--primary, #2563eb);
  border-bottom-color: var(--primary, #2563eb);
}

/* ==========================================================================
   Mobile & OTG Physical Keyboard Studio Enhancements
   ========================================================================== */

/* OTG Physical Keyboard Active State */
#toggleOtgModeBtn.active {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

#practiceFullscreenBtn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* When OTG Mode is active on mobile devices, give maximum vertical height to textarea */
@media (max-width: 900px) {
  .otg-mode-active .typing-textarea {
    min-height: 48vh;
    height: 58vh;
    max-height: 75vh;
  }
}

/* Compact Mobile Audio Player Strip & Speed Toggle Button */
.btn-speed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  padding: 4px 10px;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(37, 99, 235, 0.08));
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  color: #0284c7;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.08);
  user-select: none;
}

.btn-speed-toggle:hover {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

.btn-speed-toggle .speed-toggle-icon {
  font-size: 0.88rem;
  line-height: 1;
}

.btn-speed-toggle .speed-toggle-arrow {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
  opacity: 0.85;
}

.btn-speed-toggle.speed-open {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
  border-color: rgba(16, 185, 129, 0.4);
  color: #059669;
}

.btn-speed-toggle.speed-open:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: #10b981;
}

.audio-player-card.audio-player-compact {
  padding: 10px 14px;
  margin-bottom: 10px;
}

.audio-player-card.audio-player-compact .wpm-speeder-card {
  display: none !important;
}

.audio-player-card.audio-player-compact .audio-title-bar {
  margin-bottom: 6px;
}

.audio-player-card.audio-player-compact .audio-controls-row {
  margin: 6px 0;
}

.audio-player-card.audio-player-compact .audio-progress-wrap {
  margin-top: 4px;
}

/* Mobile Practice View Responsiveness (<= 768px) */
@media (max-width: 768px) {
  .practice-container {
    padding: 8px 10px;
  }

  .practice-header-bar {
    gap: 6px;
    padding: 6px 10px;
    flex-wrap: wrap;
  }

  .practice-header-bar .back-btn {
    font-size: 0.78rem;
    padding: 4px 8px;
  }

  .editor-toolbar {
    gap: 8px;
    margin-bottom: 10px;
  }

  .editor-toolbar-row-top {
    gap: 8px;
  }

  .editor-toolbar-row-bottom {
    gap: 8px;
    padding-top: 8px;
  }

  .editor-controls-row {
    flex-wrap: wrap;
    gap: 5px;
  }

  .editor-live-stats {
    gap: 5px;
  }

  .stat-pill {
    padding: 4px 8px;
    font-size: 0.78rem;
    min-height: 26px;
  }

  .typing-textarea {
    min-height: 220px;
    height: 36vh;
    padding: 12px 14px;
    font-size: 1.15rem;
  }
}

/* Mobile Landscape Optimization (Phone placed on horizontal stand for OTG typing) */
@media (max-height: 520px) and (orientation: landscape) {
  .app-header {
    display: none !important;
  }

  .practice-container {
    padding: 4px 8px;
    max-width: 100%;
  }

  .practice-header-bar {
    padding: 3px 6px;
    margin-bottom: 4px;
    gap: 4px;
  }

  .practice-header-bar .badge {
    display: none;
  }

  .audio-player-card {
    padding: 6px 10px;
    margin-bottom: 6px;
  }

  .audio-player-card .wpm-speeder-card {
    display: none !important;
  }

  .audio-player-card .audio-title-bar {
    margin-bottom: 4px;
  }

  .audio-player-card .audio-controls-row {
    margin: 4px 0;
  }

  .editor-toolbar {
    margin-bottom: 4px;
    gap: 4px;
  }

  .editor-toolbar-row-bottom {
    padding-top: 4px;
  }

  .typing-textarea {
    min-height: 180px;
    height: calc(100vh - 125px) !important;
    height: calc(100dvh - 125px) !important;
    max-height: none !important;
    font-size: 1.2rem;
    padding: 10px 14px;
    line-height: 1.6;
  }

  .editor-footer-actions {
    padding-top: 6px;
    margin-top: 6px;
  }
}

/* Fullscreen Immersive Mode */
:fullscreen .app-header,
:-webkit-full-screen .app-header {
  display: none !important;
}

:fullscreen .practice-container,
:-webkit-full-screen .practice-container {
  max-width: 100%;
  padding: 10px 18px;
}

:fullscreen .typing-textarea,
:-webkit-full-screen .typing-textarea {
  min-height: 45vh;
  height: 55vh;
}

/* ==========================================================================
   3D Transparent Multi-Color Class Cards & Mini Result Badges
   ========================================================================== */
.category-passage-card-3d {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.category-passage-card-3d:hover {
  transform: translateY(-3px);
}

.category-passage-card-3d:active {
  transform: translateY(-1px);
}

/* 3D Mini Result Badges */
.class-mini-result-box {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 14px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  min-width: 140px;
}

.class-mini-result-box:hover {
  transform: scale(1.02);
}

.class-mini-result-box.result-pass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.08) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-bottom: 3.5px solid #059669;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.class-mini-result-box.result-fail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(220, 38, 38, 0.08) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  border-bottom: 3.5px solid #dc2626;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.result-badge-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.result-pass .result-badge-head {
  color: #065f46;
}

.result-fail .result-badge-head {
  color: #991b1b;
}

[data-theme="dark"] .result-pass .result-badge-head {
  color: #34d399;
}

[data-theme="dark"] .result-fail .result-badge-head {
  color: #f87171;
}

.result-badge-icon {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.result-pass .result-badge-icon {
  background: #10b981;
}

.result-fail .result-badge-icon {
  background: #ef4444;
}

.result-badge-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.result-pass .result-badge-stats {
  color: #047857;
}

.result-fail .result-badge-stats {
  color: #b91c1c;
}

[data-theme="dark"] .result-pass .result-badge-stats {
  color: #6ee7b7;
}

[data-theme="dark"] .result-fail .result-badge-stats {
  color: #fca5a5;
}

@media (max-width: 640px) {
  .category-passage-card-3d {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
  }
  .category-passage-card-3d > .card-actions-wrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .category-passage-card-3d > .card-actions-wrapper .class-mini-result-box {
    flex: 1;
    min-width: 0;
  }
}



/* Mobile Category Series Cards for html.is-mobile-device - Bold, Touch-Friendly */
html.is-mobile-device .category-series-card {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 18px 16px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1.5px solid #d1fae5 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
}
html.is-mobile-device .category-series-card > div:first-child,
html.is-mobile-device .category-series-card .cat-left-section { min-width: 0 !important; }
html.is-mobile-device .category-series-card .cat-left-section h4 {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  margin-bottom: 6px !important;
}
html.is-mobile-device .category-series-card .cat-left-section p {
  font-size: 0.90rem !important;
}
html.is-mobile-device .category-series-card > div:nth-child(2),
html.is-mobile-device .category-series-card .cat-middle-specs {
  border-left: none !important;
  border-right: none !important;
  border-top: 1px dashed var(--border-subtle, #e2e8f0) !important;
  border-bottom: none !important;
  padding: 10px 0 6px 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  flex: none !important;
  gap: 8px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}
html.is-mobile-device .category-series-card .cat-middle-specs span {
  font-size: 0.82rem !important;
  padding: 6px 12px !important;
  border-radius: 9999px !important;
}
html.is-mobile-device .category-series-card > div:last-child,
html.is-mobile-device .category-series-card .cat-action-section {
  justify-content: stretch !important;
  width: 100% !important;
  margin-top: 6px !important;
}
html.is-mobile-device .category-series-card > div:last-child > div,
html.is-mobile-device .category-series-card .cat-action-section > div {
  display: flex !important;
  width: 100% !important;
  gap: 10px !important;
  justify-content: stretch !important;
}
html.is-mobile-device .category-series-card > div:last-child button,
html.is-mobile-device .category-series-card .cat-action-section button {
  flex: 1 !important;
  width: 100% !important;
  justify-content: center !important;
  padding: 14px 20px !important;
  border-radius: 14px !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
}


/* Desktop defaults for Category Series Cards */
.cat-left-section {
  min-width: 280px;
  flex: 1.2;
}
.cat-middle-specs {
  min-width: 240px;
  flex: 1.4;
  padding: 0 14px;
  border-left: 1px dashed var(--border);
  border-right: 1px dashed var(--border);
}
.cat-action-section {
  flex-shrink: 0;
}


/* Automatic Zoom/Scale Compensation for Mobile Devices in Wide/Desktop Site Mode */
html.is-mobile-device.mobile-wide-viewport {
  font-size: 18px !important; /* Scale base font by 112.5% */
}
html.is-mobile-device.mobile-wide-viewport .top-header {
  height: 68px !important;
  padding: 0 16px !important;
}
html.is-mobile-device.mobile-wide-viewport .top-header .brand-name-text {
  font-size: 1.35rem !important;
}
html.is-mobile-device.mobile-wide-viewport .sub-tool-btn {
  font-size: 0.98rem !important;
  padding: 9px 18px !important;
}
html.is-mobile-device.mobile-wide-viewport #dashboardActivePlanBanner {
  padding: 16px 22px !important;
}
html.is-mobile-device.mobile-wide-viewport #dashboardActivePlanBanner #planBannerTitle {
  font-size: 1.15rem !important;
}
html.is-mobile-device.mobile-wide-viewport .stats-carousel-title {
  font-size: 1.3rem !important;
}
html.is-mobile-device.mobile-wide-viewport .h-stat-card {
  flex: 0 0 calc((100% - 32px) / 4) !important;
  height: 90px !important;
  min-height: 90px !important;
  max-height: 90px !important;
  padding: 10px 6px !important;
  grid-template-columns: 28px 1fr !important;
  grid-template-rows: 28px 1fr !important;
}
html.is-mobile-device.mobile-wide-viewport .h-stat-card .h-stat-icon {
  font-size: 1.5rem !important;
}
html.is-mobile-device.mobile-wide-viewport .h-stat-card .h-stat-val {
  font-size: 1.25rem !important;
}
html.is-mobile-device.mobile-wide-viewport .h-stat-card .h-stat-label {
  font-size: 0.85rem !important;
}
html.is-mobile-device.mobile-wide-viewport .category-series-card {
  padding: 22px 24px !important;
}
html.is-mobile-device.mobile-wide-viewport .category-series-card .cat-left-section h4 {
  font-size: 1.35rem !important;
}
html.is-mobile-device.mobile-wide-viewport .category-series-card button {
  font-size: 1.15rem !important;
  padding: 16px 24px !important;
}
html.is-mobile-device.mobile-wide-viewport .mobile-bottom-nav {
  height: 72px !important;
}
html.is-mobile-device.mobile-wide-viewport .mobile-nav-btn {
  font-size: 0.88rem !important;
}

/* ==========================================================================
   SCREENSHOT-BASED MOBILE UX ENHANCEMENTS (Sections B, C, D, E, F, G)
   ========================================================================== */

/* --- SECTION B: Mobile Practice History Cards --- */
@media (max-width: 640px) {
  .desktop-history-card-wrap {
    display: none !important;
  }
  .mobile-history-cards-container {
    display: flex !important;
  }
}

.mobile-history-card {
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-history-card:active {
  transform: scale(0.99);
}

.mhc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  padding-bottom: 6px;
}

.mhc-badge {
  font-size: 0.70rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.mhc-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main, #0f172a);
  word-break: break-word;
}

.mhc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-subtle, #f8fafc);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #e2e8f0);
}

@media (max-width: 360px) {
  .mhc-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.mhc-metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mhc-metric-label {
  font-size: 0.68rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  margin-bottom: 2px;
}

.mhc-metric-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.mhc-metric-val.wpm-val {
  color: var(--primary, #0284c7);
}

.mhc-metric-val.acc-val {
  color: var(--accent-green, #10b981);
}

.mhc-metric-val.err-val {
  color: var(--accent-red, #ef4444);
}

.mhc-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.mhc-action-btn {
  flex: 1;
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  text-align: center;
  white-space: nowrap;
}

/* --- SECTION C: Compact Class Cards & Swipeable Filter Carousel --- */
@media (max-width: 640px) {
  /* Swipeable filter row without breaking page width */
  #view-category-detail div:has(> .cat-filter-btn) {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
    margin-bottom: 12px !important;
  }
  #view-category-detail div:has(> .cat-filter-btn)::-webkit-scrollbar {
    display: none;
  }
  .cat-filter-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 6px 14px !important;
    font-size: 0.82rem !important;
    border-radius: 20px !important;
  }

  /* Compact Passage Cards */
  .category-passage-card {
    padding: 12px 14px !important;
    gap: 10px !important;
    border-radius: 14px !important;
  }
  .category-passage-card .class-title {
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
  }
  .category-passage-card .card-actions-wrapper {
    width: 100% !important;
    justify-content: stretch !important;
    margin-top: 4px !important;
  }
  .category-passage-card .card-actions-wrapper button {
    width: 100% !important;
    padding: 9px 16px !important;
    font-size: 0.88rem !important;
    min-height: 42px !important;
    border-radius: 12px !important;
    text-align: center !important;
  }
}

/* --- SECTION D: Compact Dictation Player & Typing Controls --- */
@media (max-width: 640px) {
  .audio-player-card {
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    border-radius: 14px !important;
  }
  .audio-player-card .audio-title-bar {
    margin-bottom: 6px !important;
  }
  .audio-player-card #practicePassageTitle {
    font-size: 0.98rem !important;
    line-height: 1.35 !important;
  }

  /* Horizontally scrollable WPM presets with selected item visible */
  .wpm-speeder-card {
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
  }
  .wpm-speeder-top {
    margin-bottom: 6px !important;
  }
  .wpm-chips-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding-bottom: 2px !important;
  }
  .wpm-chips-row::-webkit-scrollbar {
    display: none;
  }
  .wpm-chip {
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    min-width: 54px !important;
  }

  /* Centered prominent play button flanked by -5s / +5s */
  .audio-controls-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 6px 0 !important;
  }
  .audio-btn-play {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 1.35rem !important;
    border-radius: 50% !important;
  }
  .audio-btn-seek {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    font-size: 0.85rem !important;
  }
  .volume-control-wrap {
    margin-left: 0 !important;
    flex: 1 !important;
    max-width: 110px !important;
  }
  .volume-slider {
    width: 100% !important;
  }

  /* Responsive compact editor toolbar */
  .editor-toolbar-row-top {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .exam-rule-group, .typing-timer-group, .typing-mode-group {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* Typing Textarea maximum room */
  .typing-editor-card {
    padding: 10px 12px !important;
  }
  .editor-footer-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .editor-footer-actions > div {
    width: 100% !important;
  }
  .editor-footer-actions button {
    flex: 1 !important;
    min-height: 44px !important;
  }
}

/* --- SECTION E: Fixed Bottom Navigation & Insets --- */
.mobile-bottom-nav {
  padding-bottom: max(6px, env(safe-area-inset-bottom)) !important;
  z-index: 100 !important;
}

@media (max-width: 640px) {
  .main-wrapper {
    padding-bottom: calc(var(--bottom-nav-height, 65px) + 24px) !important;
  }
  .page-view {
    padding-bottom: calc(var(--bottom-nav-height, 65px) + 24px) !important;
  }
  /* In full-screen or exam mode on practice page, hide bottom nav to avoid interference */
  body.fullscreen-active .mobile-bottom-nav,
  body.exam-mode-active .mobile-bottom-nav,
  #view-practice.active:has(.typing-textarea:focus) ~ .mobile-bottom-nav {
    display: none !important;
  }
}

/* --- SECTION F: Dashboard & Active Plan Card --- */
@media (max-width: 640px) {
  .active-plan-card {
    padding: 14px 16px !important;
    border-radius: 14px !important;
  }
  .stats-carousel-container {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .horizontal-stats-grid {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .horizontal-stats-grid::-webkit-scrollbar {
    display: none;
  }
}

/* --- SECTION H: NATIVE MOBILE APP DESIGN THEME (MATCHING MOCKUP) --- */
@media (min-width: 641px) {
  #mobileStudentGreetingCard {
    display: none !important;
  }
}

@media (max-width: 640px) {
  /* 0. Student Greeting Card on Mobile */
  #mobileStudentGreetingCard {
    display: flex !important;
  }

  /* 1. Dashboard Active Plan Card: Green clean modern style */
  #dashboardActivePlanBanner {
    background: #ecfdf5 !important;
    border: 1.5px solid #a7f3d0 !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  #dashboardActivePlanBanner #planBannerTag {
    background: #10b981 !important;
    color: #ffffff !important;
    font-size: 0.70rem !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
  }
  #dashboardActivePlanBanner #planBannerTitle {
    color: #065f46 !important;
    font-size: 1.05rem !important;
  }
  #dashboardActivePlanBanner #planBannerActionBtn {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-size: 0.80rem !important;
    font-weight: 700 !important;
    padding: 7px 14px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
  }

  /* 2. Dashboard 4 Stats in 2x2 Grid on Mobile (Matching Mockup: Streak, Daily Target, Accuracy, Rewards) */
  .stats-carousel-section .stats-carousel-header {
    display: none !important;
  }
  .stats-carousel-section .carousel-nav-btn,
  .stats-carousel-section .stats-carousel-dots {
    display: none !important;
  }
  .horizontal-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .h-stat-card {
    min-width: 0 !important;
    width: 100% !important;
    border-radius: 16px !important;
    padding: 14px !important;
    background: var(--bg-card, #ffffff) !important;
    border: 1px solid var(--border-subtle, #e2e8f0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }
  /* Show only 4 primary mockup cards on mobile home view, hide extra secondary ones */
  .h-stat-card:nth-child(n+5) {
    display: none !important;
  }
  .h-stat-card .h-stat-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 6px !important;
  }
  .h-stat-card .h-stat-icon {
    font-size: 1.4rem !important;
  }
  .h-stat-card .h-stat-label {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
  }
  .h-stat-card .h-stat-tag,
  .h-stat-card .h-stat-sub,
  .h-stat-card .h-stat-micro {
    display: none !important;
  }
  .h-stat-card .h-stat-val {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--text-main, #0f172a) !important;
    margin-top: 4px !important;
  }

  /* 3. Modern Floating Pill Bottom Navigation (Matching Mockup) */
  .mobile-bottom-nav {
    height: 64px !important;
    z-index: 1050 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05) !important;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom)) 10px !important;
  }
  .mobile-nav-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    font-size: 0.70rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
  }
  .mobile-nav-btn span:first-child {
    font-size: 1.25rem !important;
  }
  .mobile-nav-btn.active {
    color: #0284c7 !important;
    font-weight: 800 !important;
  }
}

/* ==========================================================================
   PWA MOBILE APP DOWNLOAD POPUP & INSTALLATION GUIDE MODAL
   ========================================================================== */
.mobile-pwa-popup {
  position: fixed;
  bottom: calc(var(--bottom-nav-height, 64px) + 12px + env(safe-area-inset-bottom));
  left: 12px;
  right: 12px;
  max-width: 440px;
  margin: 0 auto;
  z-index: 99999;
  background: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 12px 36px -4px rgba(2, 132, 199, 0.35), 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(180%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

@media (min-width: 769px) {
  .mobile-pwa-popup {
    bottom: 24px;
    right: 24px;
    left: auto;
    max-width: 380px;
  }
}

.mobile-pwa-popup.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-pwa-popup-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-pwa-popup-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mobile-pwa-app-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.3);
  border: 1.5px solid #bae6fd;
}

.mobile-pwa-app-info {
  flex: 1;
  min-width: 0;
}

.mobile-pwa-app-title {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.mobile-pwa-app-title strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.pwa-verified-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.mobile-pwa-app-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.mobile-pwa-popup-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-pwa-download {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff !important;
  border: none;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.4);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pwa-download:active {
  transform: scale(0.96);
}

.btn-pwa-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 0.95rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.btn-pwa-close:active {
  background: #e2e8f0;
}

/* Sidebar Highlight for Download App */
.pwa-sidebar-highlight {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(37, 99, 235, 0.12)) !important;
  border: 1px solid #bae6fd !important;
  border-radius: 12px !important;
  margin-bottom: 6px !important;
}

.pwa-sidebar-highlight .nav-item-icon {
  font-size: 1.15rem !important;
}

/* Modal Guide for Chrome and Safari installation */
.pwa-guide-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pwa-guide-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.pwa-guide-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 22px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  text-align: center;
  animation: pwaCardSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaCardSlide {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.pwa-step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  margin-top: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.pwa-step-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: #0284c7;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   StenoMaster v16 — Mobile UX Defect Fix & Complete UI Polish Rules
   ========================================================================== */

/* 1. Continue Practice Card */
.continue-practice-card {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.continue-practice-card:active {
  transform: scale(0.985);
}

/* 2. Mobile 2-Column Primary Statistics Grid & Secondary Toggle */
@media (max-width: 640px) {
  /* When on mobile devices, display the 4 primary stats in a clean 2-column grid */
  html.is-mobile-device .horizontal-stats-grid,
  .horizontal-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    padding: 0 !important;
  }

  html.is-mobile-device .h-stat-card,
  .h-stat-card {
    flex: unset !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 82px !important;
    max-height: none !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    border: 1.5px solid var(--border-subtle, #e2e8f0) !important;
    background: var(--bg-surface, #ffffff) !important;
  }

  /* Keep cards 5 through 8 collapsible/cleanly spaced */
  .horizontal-stats-grid > .h-stat-card:nth-child(n+5) {
    display: flex !important;
  }

  /* Hide horizontal carousel arrows & dots since 2x2 grid is fully readable */
  .carousel-nav-btn,
  .stats-carousel-dots {
    display: none !important;
  }
}

/* 3. Mobile Header: Prevent 320px clipping and optimize subscription badge */
@media (max-width: 360px) {
  .top-header {
    padding: 0 6px !important;
    gap: 4px !important;
  }
  .top-header .header-brand-logo {
    width: 24px !important;
    height: 24px !important;
  }
  .top-header .header-brand-name {
    font-size: 0.90rem !important;
    letter-spacing: -0.3px !important;
  }
  .plan-validity-pill {
    max-width: 76px !important;
    padding: 2px 5px !important;
    font-size: 0.68rem !important;
  }
  .plan-validity-pill .validity-text {
    display: none !important;
  }
  .plan-validity-pill::after {
    content: " प्रो";
    font-size: 0.68rem;
    font-weight: 800;
  }
}

/* 4. Install App Banner: Compact non-blocking positioning */
@media (max-width: 640px) {
  .mobile-pwa-popup {
    bottom: calc(var(--bottom-nav-height, 64px) + 8px + env(safe-area-inset-bottom)) !important;
    padding: 8px 12px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25) !important;
    max-height: 58px !important;
  }
  .mobile-pwa-app-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
  }
  .mobile-pwa-app-title strong {
    font-size: 0.85rem !important;
  }
  .mobile-pwa-app-desc {
    display: none !important;
  }
  .btn-pwa-download {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
  }
  .btn-pwa-close {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.85rem !important;
  }
}

/* 5. Typing Editor Space & Virtual Keyboard Safety */
@media (max-width: 640px) {
  .typing-textarea {
    min-height: 260px !important;
    height: 42vh !important;
  }
  .typing-editor-card {
    margin-bottom: 24px !important;
  }
}

/* 6. Settings & Profile Touch Rows */
.profile-info-item,
.form-group input,
.form-group select {
  min-height: 44px;
}

/* Collapsible Detailed Error Table Accordion */
.error-table-accordion {
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.error-table-accordion summary {
  list-style: none;
}
.error-table-accordion summary::-webkit-details-marker {
  display: none;
}
.error-table-accordion summary:hover {
  color: var(--primary);
}
.error-table-accordion[open] summary {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════════════════
   GLOBAL 1-CLICK FREE CAMPAIGN & BULK MULTI-SELECT STYLES
   ══════════════════════════════════════════════════════════════════════════ */

/* Student Golden Campaign Banner */
.global-campaign-banner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 10px 18px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  position: relative;
  z-index: 9999;
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideDownBanner 0.4s ease-out;
}

/* 7 Dynamic Festival Themes */
.global-campaign-banner.campaign-theme-diwali {
  background: linear-gradient(135deg, #b45309, #d97706, #92400e) !important;
  box-shadow: 0 4px 20px rgba(180, 83, 9, 0.5) !important;
  border-bottom: 2px solid #fde68a !important;
}

.global-campaign-banner.campaign-theme-tricolor {
  background: linear-gradient(90deg, #ff9933 0%, #ffffff 48%, #ffffff 52%, #138808 100%) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 20px rgba(19, 136, 8, 0.35) !important;
  border-bottom: 2px solid #000080 !important;
}
.global-campaign-banner.campaign-theme-tricolor .campaign-banner-text strong {
  color: #000080 !important;
}
.global-campaign-banner.campaign-theme-tricolor .campaign-sub-note {
  color: #1e293b !important;
}
.global-campaign-banner.campaign-theme-tricolor .campaign-banner-close {
  color: #0f172a !important;
}

.global-campaign-banner.campaign-theme-holi {
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #06b6d4) !important;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.45) !important;
}

.global-campaign-banner.campaign-theme-newyear {
  background: linear-gradient(135deg, #1e1b4b, #4f46e5, #d97706) !important;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.5) !important;
  border-bottom: 1.5px solid #fbbf24 !important;
}

.global-campaign-banner.campaign-theme-fire {
  background: linear-gradient(135deg, #b91c1c, #dc2626, #f97316) !important;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5) !important;
}

.global-campaign-banner.campaign-theme-emerald {
  background: linear-gradient(135deg, #047857, #059669, #10b981) !important;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.45) !important;
}

.global-campaign-banner.campaign-theme-gold {
  background: linear-gradient(135deg, #d97706, #f59e0b, #b45309) !important;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.45) !important;
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.campaign-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.campaign-sparkle {
  font-size: 1.3rem;
  animation: pulseSparkle 1.8s infinite;
}

@keyframes pulseSparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.campaign-banner-text {
  flex: 1;
  line-height: 1.4;
}

.campaign-sub-note {
  margin-left: 8px;
  opacity: 0.92;
  font-size: 0.82rem;
  font-weight: 400;
}

.campaign-banner-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.campaign-banner-close:hover {
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
}

/* Admin Floating Bulk Action Dock */
.bulk-action-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9998;
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 90vw;
}

.bulk-action-dock.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bulk-dock-content {
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 50px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.45), 0 0 0 1.5px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bulk-dock-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-dock-badge {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.bulk-dock-sub {
  font-size: 0.8rem;
  color: #94a3b8;
}

.bulk-dock-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-bulk-pro {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  transition: all 0.2s;
}

.btn-bulk-pro:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.5);
}

.btn-bulk-category {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
}

.btn-bulk-category:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.btn-bulk-clear {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border: none;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-bulk-clear:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* Selected row highlight in subscribers table */
#adminSubscribersTable tbody tr.row-selected {
  background: rgba(79, 70, 229, 0.08) !important;
}

@media (max-width: 640px) {
  .bulk-dock-content {
    border-radius: 16px;
    padding: 10px 14px;
    gap: 10px;
  }
  .bulk-dock-sub {
    display: none;
  }
  .btn-bulk-pro,
  .btn-bulk-category {
    padding: 6px 11px;
    font-size: 0.76rem;
  }
}

/* =========================================================================
   TELEGRAM & WHATSAPP STYLE ALL-STUDENTS GROUP CHAT
   ========================================================================= */

/* Full Screen Edge-to-Edge Desktop Layout for Telegram Group Chat */
body.view-active-community,
body:has(#view-community.active) {
  overflow: hidden !important;
}

body.view-active-community .platform-global-footer,
body:has(#view-community.active) .platform-global-footer {
  display: none !important;
}

body.view-active-community .main-wrapper,
body:has(#view-community.active) .main-wrapper {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100% !important;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  overflow: hidden !important;
}

#view-community {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1 !important;
  min-height: 0 !important;
  display: none;
}

#view-community.active {
  display: flex !important;
  flex-direction: column !important;
}

.tg-chat-app-wrapper {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  flex: 1 !important;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
}

.tg-chat-card {
  background: #efeae2;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  min-height: 0;
  height: 100%;
  width: 100%;
}

/* 1. Header Bar */
.tg-chat-header {
  background: linear-gradient(135deg, #0b493f 0%, #128c7e 100%);
  color: #ffffff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.tg-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.tg-group-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.tg-group-info {
  flex: 1;
  min-width: 0;
}

.tg-group-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-group-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-free-badge {
  background: #25d366;
  color: #064e3b;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.tg-group-subtitle {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  display: flex;
  align-items: center;
}

.tg-live-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.85);
  margin-right: 5px;
  flex-shrink: 0;
  animation: tgLivePulse 2s infinite ease-in-out;
}

@keyframes tgLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.tg-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-hdr-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-hdr-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* 2. Pinned Announcement Bar */
.tg-pinned-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  z-index: 5;
  flex-shrink: 0;
  cursor: pointer;
}

.tg-pinned-indicator {
  width: 3.5px;
  height: 28px;
  background: #0284c7;
  border-radius: 2px;
  flex-shrink: 0;
}

.tg-pinned-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tg-pinned-content {
  flex: 1;
  min-width: 0;
}

.tg-pinned-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0284c7;
}

.tg-pinned-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475569;
  font-size: 0.8rem;
}

.tg-pinned-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}

.tg-pinned-close:hover {
  color: #ef4444;
}

/* 3. Category Filter Pills */
.tg-category-pills {
  background: #ffffff;
  padding: 7px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  scrollbar-width: thin;
}

.tg-cat-btn {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 14px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  transition: all 0.2s;
}

.tg-cat-btn:hover {
  background: #e2e8f0;
}

.tg-cat-btn.active {
  background: #128c7e;
  color: #ffffff;
  border-color: #128c7e;
  box-shadow: 0 2px 6px rgba(18, 140, 126, 0.25);
}

/* 4. Search Drawer */
.tg-search-drawer {
  background: #f1f5f9;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.tg-search-drawer input {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  outline: none;
}

.tg-search-submit {
  background: #0284c7;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.tg-search-cancel {
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 12px;
  cursor: pointer;
}

/* 5. Messages Viewport (WhatsApp Doodle Wallpaper Pattern) */
.tg-messages-viewport {
  flex: 1;
  padding: 14px 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #e5ddd5;
  background-image: 
    radial-gradient(#d6cdc3 15%, transparent 16%),
    radial-gradient(#d6cdc3 15%, transparent 16%);
  background-size: 36px 36px;
  background-position: 0 0, 18px 18px;
  scroll-behavior: smooth;
}

.tg-messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

/* Date Divider Pill */
.tg-date-pill {
  align-self: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #555555;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  margin: 6px 0 8px 0;
}

/* Message Rows */
.tg-msg-row {
  display: flex;
  gap: 8px;
  max-width: 82%;
  position: relative;
  animation: tgFadeIn 0.2s ease-out;
}

@keyframes tgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tg-msg-row.incoming {
  align-self: flex-start;
}

.tg-msg-row.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Sender Small Avatar */
.tg-sender-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.tg-msg-bubble {
  background: #ffffff;
  border-radius: 12px;
  padding: 7px 11px 5px 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  position: relative;
  min-width: 150px;
  max-width: 100%;
}

.incoming .tg-msg-bubble {
  border-top-left-radius: 2px;
}

.outgoing .tg-msg-bubble {
  background: #d9fdd3;
  border-top-right-radius: 2px;
}

/* Pinned Highlight */
.tg-msg-bubble.is-pinned-post {
  border: 1.5px solid #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* Bubble Header (Sender & Tag) */
.tg-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
  font-size: 0.76rem;
}

.tg-sender-name {
  font-weight: 700;
  font-size: 0.78rem;
}

.sender-color-0 { color: #d97706; }
.sender-color-1 { color: #2563eb; }
.sender-color-2 { color: #059669; }
.sender-color-3 { color: #7c3aed; }
.sender-color-4 { color: #db2777; }
.sender-color-5 { color: #0284c7; }
.sender-color-6 { color: #dc2626; }

.tg-meta-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tg-role-chip {
  font-size: 0.62rem;
  background: #f1f5f9;
  color: #64748b;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.tg-role-chip.admin {
  background: #fee2e2;
  color: #b91c1c;
}

.tg-role-chip.pro {
  background: #fef3c7;
  color: #b45309;
}

.tg-tag-chip {
  font-size: 0.62rem;
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

/* Telegram / WhatsApp Quote Box */
.tg-msg-quote {
  background: rgba(0, 0, 0, 0.04);
  border-left: 3.5px solid #128c7e;
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.tg-msg-quote:hover {
  background: rgba(0, 0, 0, 0.08);
}

.tg-quote-author {
  font-weight: 700;
  color: #128c7e;
}

.tg-quote-text {
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Telegram Style Photo Message Bubble */
.tg-photo-bubble-wrap {
  position: relative;
  margin: 4px 0 6px 0;
  border-radius: 12px;
  overflow: hidden;
  max-width: 320px;
  width: 100%;
  cursor: pointer;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.tg-msg-photo-img {
  width: 100%;
  max-height: 260px;
  min-height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  background: #f1f5f9;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tg-photo-bubble-wrap:hover .tg-msg-photo-img {
  transform: scale(1.02);
}

.tg-photo-overlay-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.tg-photo-bubble-wrap:hover .tg-photo-overlay-badge {
  opacity: 1;
  background: rgba(0, 0, 0, 0.85);
}

/* Text Content */
.tg-msg-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #111827;
  word-break: break-word;
}

/* Bubble Footer */
.tg-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.68rem;
  color: #667781;
}

.tg-ticks {
  color: #53bdeb;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.tg-ticks.pending {
  color: #94a3b8;
  font-size: 0.7rem;
  opacity: 0.85;
}

.tg-ticks.delivered {
  color: #53bdeb;
}

.tg-solved-badge {
  color: #10b981;
  font-weight: 700;
}

/* Bubble Action Buttons */
.tg-bubble-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.tg-action-icon {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.65;
  border-radius: 4px;
  transition: opacity 0.15s, background-color 0.15s;
}

.tg-action-icon:hover {
  opacity: 1;
  background: rgba(0,0,0,0.06);
}

.tg-action-icon.tg-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  opacity: 1;
}

.tg-category-pills,
#communityTagsFilter {
  display: none !important;
}

/* Bubble Floating Reaction Badge */
.tg-msg-reaction {
  position: absolute;
  bottom: -8px;
  right: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1px 6px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.15s;
}

.tg-msg-reaction:hover {
  transform: scale(1.1);
}

.tg-msg-reaction.liked {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* 6. Floating Scroll to Bottom Button */
.tg-scroll-bottom-btn {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #54656f;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  z-index: 20;
  transition: all 0.2s;
}

.tg-scroll-bottom-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.3);
}

/* 7. Replying To Banner */
.tg-replying-banner {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.04);
}

.tg-reply-bar-indicator {
  width: 3.5px;
  height: 28px;
  background: #128c7e;
  border-radius: 2px;
}

.tg-reply-preview-text {
  flex: 1;
  min-width: 0;
}

.tg-reply-to-author {
  font-size: 0.74rem;
  font-weight: 700;
  color: #128c7e;
}

.tg-reply-to-snippet {
  font-size: 0.74rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-reply-cancel-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}

.tg-reply-cancel-btn:hover {
  color: #ef4444;
}

/* 8. Image Preview Dock */
.tg-image-preview-dock {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tg-preview-thumb-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.tg-preview-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tg-remove-preview-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tg-preview-meta {
  flex: 1;
}

.tg-preview-meta span {
  display: block;
}

#commImagePreviewName {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}

.tg-preview-hint {
  font-size: 0.7rem;
  color: #10b981;
}

/* 9. Quick WhatsApp Emoji Strip */
.tg-quick-emojis-bar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tg-emoji-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.tg-emoji-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tg-emoji-chips button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  transition: transform 0.15s;
}

.tg-emoji-chips button:hover {
  transform: scale(1.3);
}

/* 10. Bottom Input Dock */
.tg-bottom-dock {
  background: #f0f2f5;
  padding: 8px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
}

.tg-dock-icon-btn {
  background: none;
  border: none;
  color: #54656f;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s;
}

.tg-dock-icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111b21;
}

.tg-attach-btn {
  color: #0284c7;
}

.tg-camera-btn {
  color: #128c7e;
}

.tg-input-wrapper {
  flex: 1;
  background: #ffffff;
  border-radius: 20px;
  padding: 4px 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  min-height: 40px;
  max-height: 100px;
}

.tg-chat-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 0.9rem;
  color: #1e293b;
  background: transparent;
  line-height: 1.4;
  max-height: 90px;
}

.tg-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.tg-send-btn:hover {
  transform: scale(1.05);
}

.tg-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Image Zoom Modal */
.comm-zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.comm-zoom-modal-dialog {
  background: #1e293b;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.comm-zoom-modal-header {
  padding: 12px 18px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comm-zoom-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.comm-zoom-download-btn {
  background: #0284c7;
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
}

.comm-zoom-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.comm-zoom-modal-body {
  padding: 16px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.comm-zoom-modal-body img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  /* In Community view, hide secondary toolbar, campaign banner & PWA popup so chat gets 100% clean height */
  body:has(#view-community:not([style*="display: none"]):not([style*="display:none"])) #globalCampaignStudentBanner,
  body.view-active-community #globalCampaignStudentBanner,
  body:has(#view-community:not([style*="display: none"]):not([style*="display:none"])) .global-campaign-banner,
  body.view-active-community .global-campaign-banner {
    display: none !important;
  }
  body:has(#view-community:not([style*="display: none"]):not([style*="display:none"])) #mobileSubToolbar,
  body.view-active-community #mobileSubToolbar {
    display: none !important;
  }
  body:has(#view-community:not([style*="display: none"]):not([style*="display:none"])) .mobile-pwa-popup,
  body.view-active-community .mobile-pwa-popup {
    display: none !important;
  }
  body.view-active-community .main-wrapper,
  body:has(#view-community.active) .main-wrapper {
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    /* Main wrapper occupies full viewport minus bottom navigation bar (64px) */
    height: calc(100vh - 64px) !important;
    height: calc(100dvh - 64px) !important;
    max-height: calc(100vh - 64px) !important;
    max-height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.view-active-community #view-community,
  body:has(#view-community.active) #view-community,
  #view-community.active {
    padding: 0 !important;
    margin: 0 !important;
    /* View occupies full main-wrapper height minus the top-header (56px) */
    height: calc(100% - 56px) !important;
    max-height: calc(100% - 56px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .tg-chat-app-wrapper {
    min-height: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    max-width: 100%;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .tg-chat-card {
    border-radius: 0;
    box-shadow: none;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .tg-chat-header {
    padding: 8px 10px;
    gap: 8px;
  }
  .tg-back-btn {
    display: inline-flex !important;
  }
  .tg-avatar-wrap {
    width: 36px;
    height: 36px;
  }
  .tg-group-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .tg-group-name {
    font-size: 0.88rem;
  }
  .tg-group-subtitle {
    font-size: 0.68rem;
  }
  .tg-msg-row {
    max-width: 92%;
  }
  .tg-bottom-dock {
    padding: 6px 8px;
    gap: 6px;
    background: #f0f2f5;
  }
  .tg-dock-icon-btn {
    padding: 5px;
    font-size: 18px;
  }
  .tg-send-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

.tg-back-btn {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.tg-back-btn:hover,
.tg-back-btn:active {
  background: rgba(255, 255, 255, 0.28);
}



/* StenoMaster AI Shorthand Dictionary & Mistakes Modal */
.steno-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.steno-outline-modal-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.som-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: rgba(99, 102, 241, 0.04);
}

.som-close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.som-close-btn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text-main, #0f172a);
}

.som-body {
  padding: 18px;
}

.som-outline-box {
  background: var(--bg-subtle, #f8fafc);
  border: 2px dashed rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.som-stroke-view {
  width: 160px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steno-stroke-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

.som-guide-line {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.som-pos-badge {
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  padding: 2px 8px;
  border-radius: 12px;
}

.som-info-card {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.som-info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.som-label {
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.som-val {
  color: var(--text-muted, #475569);
  line-height: 1.4;
}

.som-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  background: var(--bg-subtle, #f8fafc);
}

.btn-view-steno-outline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}
.btn-view-steno-outline:hover {
  background: #4f46e5;
  color: #ffffff;
}

.btn-save-mistakes-bank, .btn-practice-mistakes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save-mistakes-bank {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.btn-save-mistakes-bank:hover {
  background: #d97706;
  color: #fff;
}

.btn-practice-mistakes {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-practice-mistakes:hover {
  background: #059669;
  color: #fff;
}

/* ====================================================================
   STENOSHALA-STYLE PREMIUM UI — StenoMaster v16.9
   New classes for Hero Result Card, Metrics Grid, Breakdown Bar,
   Filter Tabs, Dark Audio Ribbon, Exam Header
   ==================================================================== */

/* --- SM Hero Qualification Card --- */
.sm-hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 32px 28px 28px;
  margin-bottom: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}
.sm-hero-card.hero-pass {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #047857 100%);
  border: 2px solid rgba(52,211,153,0.3);
}
.sm-hero-card.hero-fail {
  background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 60%, #991b1b 100%);
  border: 2px solid rgba(252,165,165,0.3);
}
.sm-hero-card.hero-warn {
  background: linear-gradient(135deg, #451a03 0%, #78350f 60%, #92400e 100%);
  border: 2px solid rgba(251,191,36,0.3);
}
.sm-hero-ring-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sm-status-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sm-status-ring-inner {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
.sm-ring-pct {
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.sm-ring-label {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}
.sm-hero-verdict {
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}
.sm-hero-body {
  flex: 1;
  min-width: 0;
}
.sm-hero-exam-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 10px;
}
.sm-hero-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 6px;
}
.sm-hero-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.72);
  margin: 0 0 16px;
  line-height: 1.5;
}
.sm-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sm-btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.sm-btn-retry:hover { background: rgba(255,255,255,0.25); }

/* --- SM Metrics Grid (4 cards) --- */
.sm-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.sm-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top-width: 3px;
  border-radius: var(--radius-lg);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.sm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sm-card-accent-blue  { border-top-color: #2563eb; }
.sm-card-accent-emerald { border-top-color: #10b981; }
.sm-card-accent-rose  { border-top-color: #ef4444; }
.sm-card-accent-amber { border-top-color: #f59e0b; }
.sm-card-accent-purple { border-top-color: #8b5cf6; }
.sm-card-accent-sky   { border-top-color: #0ea5e9; }
.sm-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.sm-stat-value {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
}
.sm-stat-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 2px;
}
.sm-stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- SM Breakdown Bar --- */
.sm-breakdown-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.sm-breakdown-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.sm-breakdown-bar {
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  overflow: hidden;
  display: flex;
  margin-bottom: 14px;
}
.sm-seg-full    { background: #ef4444; transition: width 0.6s ease; }
.sm-seg-half    { background: #f59e0b; transition: width 0.6s ease; }
.sm-seg-punct   { background: #8b5cf6; transition: width 0.6s ease; }
.sm-seg-correct { background: #10b981; transition: width 0.6s ease; }
.sm-breakdown-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.sm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.sm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.sm-dot-full    { background: #ef4444; }
.sm-dot-half    { background: #f59e0b; }
.sm-dot-punct   { background: #8b5cf6; }
.sm-dot-correct { background: #10b981; }

/* --- SM Comparison Filter Tabs --- */
.sm-comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.sm-comp-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.sm-comp-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.sm-tab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sm-comp-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.sm-comp-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
}
.sm-comp-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.sm-comp-tab.tab-mistakes.active { background: #ef4444; border-color: #ef4444; }
.sm-comp-tab.tab-punct.active    { background: #8b5cf6; border-color: #8b5cf6; }
.sm-comp-tab.tab-missing.active  { background: #f59e0b; border-color: #f59e0b; }

/* Token stream filter — hide tokens based on active tab */
.sm-token-hide { display: none !important; }

/* --- SM Dark Audio Ribbon --- */
.audio-player-card.sm-audio-ribbon {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  color: #f1f5f9;
}
.audio-player-card.sm-audio-ribbon .audio-passage-info h3,
.audio-player-card.sm-audio-ribbon .audio-passage-info p {
  color: #f1f5f9 !important;
}
.audio-player-card.sm-audio-ribbon .audio-passage-info p {
  color: #94a3b8 !important;
}
.audio-player-card.sm-audio-ribbon .wpm-speeder-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.audio-player-card.sm-audio-ribbon .wpm-label,
.audio-player-card.sm-audio-ribbon .wpm-speed-icon {
  color: #94a3b8 !important;
}
.audio-player-card.sm-audio-ribbon .wpm-val-badge {
  background: #2563eb;
  color: #fff;
}
.audio-player-card.sm-audio-ribbon .wpm-chip {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #cbd5e1;
}
.audio-player-card.sm-audio-ribbon .wpm-chip.active,
.audio-player-card.sm-audio-ribbon .wpm-chip:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.audio-player-card.sm-audio-ribbon .audio-btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #e2e8f0;
}
.audio-player-card.sm-audio-ribbon .audio-btn-play {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 0 12px rgba(37,99,235,0.4);
}
.audio-player-card.sm-audio-ribbon .audio-btn:hover {
  background: rgba(255,255,255,0.15);
}
.audio-player-card.sm-audio-ribbon .audio-btn-play:hover {
  background: #1d4ed8;
}
.audio-player-card.sm-audio-ribbon .scrubber-track {
  background: rgba(255,255,255,0.12);
}
.audio-player-card.sm-audio-ribbon .scrubber-fill {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.audio-player-card.sm-audio-ribbon .audio-time-label {
  color: #94a3b8;
}
.audio-player-card.sm-audio-ribbon .btn-speed-toggle {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: #cbd5e1 !important;
}
.audio-player-card.sm-audio-ribbon .volume-slider {
  accent-color: #2563eb;
}

/* Dark theme — audio ribbon stays dark regardless */
[data-theme="dark"] .audio-player-card.sm-audio-ribbon {
  background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
  border-color: #1e293b;
}

/* --- SM Exam Info Bar (typing screen top) --- */
.sm-exam-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}
.sm-exam-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sm-badge-exam  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.sm-badge-speed { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sm-badge-font  { background: #fdf4ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.sm-badge-timer { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

[data-theme="dark"] .sm-badge-exam  { background: rgba(37,99,235,0.15); color: #93c5fd; border-color: rgba(37,99,235,0.3); }
[data-theme="dark"] .sm-badge-speed { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.25); }
[data-theme="dark"] .sm-badge-font  { background: rgba(139,92,246,0.12); color: #c4b5fd; border-color: rgba(139,92,246,0.25); }
[data-theme="dark"] .sm-badge-timer { background: rgba(245,158,11,0.12); color: #fcd34d; border-color: rgba(245,158,11,0.25); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .sm-hero-card { flex-direction: column; align-items: flex-start; gap: 20px; padding: 22px 18px; }
  .sm-status-ring { width: 96px; height: 96px; }
  .sm-status-ring-inner { width: 72px; height: 72px; }
  .sm-ring-pct { font-size: 1.25rem; }
  .sm-hero-title { font-size: 1.25rem; }
  .sm-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sm-stat-value { font-size: 1.5rem; }
  .sm-tab-bar { gap: 4px; }
  .sm-comp-tab { padding: 5px 10px; font-size: 0.72rem; }
}

/* ====================================================================
   END STENOSHALA-STYLE PREMIUM UI
   ==================================================================== */

/* --- Stenoshala-Style Typing Toolbar & Live Stats Polish --- */
.typing-editor-card {
  border-radius: 18px !important;
  border: 1.5px solid var(--border-subtle) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
  background: var(--bg-surface) !important;
}

.editor-toolbar {
  background: var(--bg-subtle) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 12px 18px !important;
}

.editor-live-stats {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.editor-live-stats .stat-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-surface) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
}

#liveTimerText {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  color: #dc2626 !important;
  letter-spacing: -0.5px !important;
}

#liveWordCount {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  color: #16a34a !important;
}

#liveCharCount {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 700 !important;
}

/* Submit button Stenoshala emerald styling */
#submitPracticeBtn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  border-radius: 12px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#submitPracticeBtn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
  filter: brightness(1.05) !important;
}

/* Typing Mode selector modern pill style */
.select-typing-mode {
  border-radius: 10px !important;
  padding: 6px 12px !important;
  border: 1.5px solid var(--border-subtle) !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* Typing textarea font & spacing */
.typing-textarea {
  font-family: 'Noto Sans Devanagari', 'Mangal', sans-serif !important;
  line-height: 2.1 !important;
  color: var(--text-main) !important;
  padding: 18px 20px !important;
  border: none !important;
}

.typing-textarea.font-krutidev {
  font-family: 'Kruti Dev 010', -apple-system, sans-serif !important;
  letter-spacing: 0.5px !important;
  line-height: 2.2 !important;
}

/* Token Popover glassmorphic upgrade */
.token-popover {
  border-radius: 14px !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18) !important;
  backdrop-filter: blur(12px) !important;
}

/* --- Punctuation Mode Toggle Chips --- */
.punct-chip-btn {
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.punct-chip-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}
.punct-chip-btn.active#punctModeOffBtn {
  background: #10b981 !important;
  color: #fff !important;
  border-color: #10b981 !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3) !important;
}
.punct-chip-btn.active#punctModeHalfBtn {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #f59e0b !important;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3) !important;
}
.punct-chip-btn.active#punctModeFullBtn {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3) !important;
}

/* Distinct punctuation token styling (so comma omission is not marked as completely wrong red word) */
.eval-token-punct {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1.5px solid #f59e0b !important;
  text-decoration: underline dotted #d97706 !important;
  font-weight: 600 !important;
}
[data-theme="dark"] .eval-token-punct {
  background-color: rgba(245, 158, 11, 0.22) !important;
  color: #fcd34d !important;
  border: 1.5px solid #f59e0b !important;
}


/* ==========================================================================
   Stenoshala Sapphire Luxe Theme (Demo 2 Selection - Modern EdTech Polish)
   ========================================================================== */
:root {
  --bg-primary: #f0f4f9;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-subtle: #ebf3ff;
  --border-subtle: #dbe4ef;
  --border-strong: #cbd5e1;
  --text-main: #0a1128;
  --text-secondary: #334155;
  --text-muted: #5a6e85;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-subtle: #ebf3ff;
  --primary-border: #bfdbfe;
  --primary-gradient: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  --shadow-card: 0 8px 24px -4px rgba(30, 64, 175, 0.08), 0 2px 6px -1px rgba(0,0,0,0.03);
  --shadow-hover: 0 14px 30px -6px rgba(37, 99, 235, 0.18);
}

body {
  background-color: #f0f4f9 !important;
  color: #0a1128 !important;
}

/* Primary Button - Sapphire Gradient */
.btn-primary {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35) !important;
}

/* Top Header */
.top-header {
  height: 68px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid #dbe4ef !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}
.top-header .header-brand-logo {
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}
.top-header .header-brand-name {
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  color: #0a1128 !important;
  letter-spacing: -0.3px !important;
}
.top-header .three-dot-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0a1128 !important;
}
.top-header .three-dot-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
}
.plan-validity-pill {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1e40af !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-weight: 800 !important;
  font-size: 0.80rem !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
}
.plan-validity-pill:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}
.streak-badge {
  background: #fff7ed !important;
  border: 1px solid #fed7aa !important;
  color: #c2410c !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-weight: 800 !important;
  font-size: 0.80rem !important;
}
.top-header #langToggleBtn,
.top-header #themeToggleBtn,
.top-header .notif-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  padding: 7px 12px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
  transition: all 0.2s !important;
}
.top-header #langToggleBtn:hover,
.top-header #themeToggleBtn:hover,
.top-header .notif-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}
.top-header .user-profile-btn {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 24px !important;
  padding: 4px 14px 4px 4px !important;
}
.top-header .user-avatar {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}
.top-header .header-logout-btn {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  transition: all 0.2s !important;
}
.top-header .header-logout-btn:hover {
  background: #fecaca !important;
  border-color: #f87171 !important;
}

/* Active Plan Banner */
#dashboardActivePlanBanner {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
  border: 1.5px solid #bfdbfe !important;
  border-radius: 16px !important;
  padding: 16px 24px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 8px 24px -4px rgba(30, 64, 175, 0.08), 0 2px 6px -1px rgba(0,0,0,0.03) !important;
}
#dashboardActivePlanBanner #planBannerTitle {
  font-size: 1.10rem !important;
  color: #0a1128 !important;
  font-weight: 800 !important;
}
#dashboardActivePlanBanner #planBannerTag {
  background: #10b981 !important;
  color: #ffffff !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px !important;
}
#dashboardActivePlanBanner #planBannerSubtitle {
  font-size: 0.82rem !important;
  color: #5a6e85 !important;
  margin-top: 2px !important;
}
#dashboardActivePlanBanner #planBannerActionBtn {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 10px 20px !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
  transition: all 0.2s !important;
}
#dashboardActivePlanBanner #planBannerActionBtn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.38) !important;
}

/* Continue Practice Card */
.continue-practice-card {
  background: linear-gradient(125deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 18px !important;
  padding: 18px 24px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 12px 28px -6px rgba(30, 58, 138, 0.35) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.continue-practice-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 32px -6px rgba(30, 58, 138, 0.42) !important;
}
.continue-practice-card .btn-continue-go {
  background: #ffffff !important;
  color: #1e3a8a !important;
  border: none !important;
  padding: 10px 22px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.2s !important;
}
.continue-practice-card .btn-continue-go:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
}

/* 8 Stats Cards */
.h-stat-card {
  background: #ffffff !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 14px !important;
  padding: 18px !important;
  box-shadow: 0 8px 24px -4px rgba(30, 64, 175, 0.08), 0 2px 6px -1px rgba(0,0,0,0.03) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.h-stat-card:hover {
  border-color: #93c5fd !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 30px -6px rgba(37, 99, 235, 0.18) !important;
}
.h-stat-card .h-stat-val {
  color: #0a1128 !important;
  font-weight: 800 !important;
}
.h-stat-card .h-stat-label {
  color: #5a6e85 !important;
  font-weight: 700 !important;
}

/* Category Series Cards */
.category-series-card {
  background: #ffffff !important;
  border: 1.5px solid #dbe4ef !important;
  border-radius: 18px !important;
  padding: 20px 24px !important;
  box-shadow: 0 8px 24px -4px rgba(30, 64, 175, 0.08), 0 2px 6px -1px rgba(0,0,0,0.03) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.category-series-card:hover {
  border-color: #3b82f6 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 30px -6px rgba(37, 99, 235, 0.18) !important;
}
.category-series-card .cat-left-section h4 {
  color: #0a1128 !important;
  font-weight: 800 !important;
}
.category-series-card .cat-middle-specs span {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 700 !important;
}
.category-series-card button.btn-primary,
.category-series-card .cat-action-section button {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
}

/* Mobile Category Series Cards */
html.is-mobile-device .category-series-card {
  border: 1.5px solid #dbe4ef !important;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.07) !important;
}
html.is-mobile-device #dashboardActivePlanBanner {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
  border: 1.5px solid #bfdbfe !important;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.07) !important;
}
html.is-mobile-device #dashboardActivePlanBanner #planBannerTitle {
  color: #0a1128 !important;
}
html.is-mobile-device #dashboardActivePlanBanner #planBannerActionBtn {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
}


/* ==========================================================================
   Stenoshala Sidebar Design & Colorful Transparent Hover Highlighting
   ========================================================================== */
.sidebar {
  width: 280px !important;
  background: #ffffff !important;
  border-right: 1px solid #dbe4ef !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08) !important;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, sans-serif !important;
}

.sidebar-header {
  height: 68px !important;
  padding: 0 18px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sidebar-header .brand-name-text {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0a1128 !important;
  letter-spacing: -0.3px !important;
}

.sidebar-close-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}
.sidebar-close-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Sidebar Navigation Scrollbar */
.sidebar-nav {
  flex: 1 !important;
  padding: 14px 12px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent !important;
}
.sidebar-nav::-webkit-scrollbar {
  width: 5px !important;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent !important;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35) !important;
  border-radius: 10px !important;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.5) !important;
}

/* Nav Item Styling */
.nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  color: #334155 !important;
  font-size: 0.90rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  position: relative !important;
  border: 1px solid transparent !important;
  margin-bottom: 2px !important;
}

.nav-item-title {
  flex: 1 !important;
  min-width: 0 !important;
  color: #334155 !important;
  font-weight: 600 !important;
  transition: color 0.2s !important;
}

/* Circular Pastel Icon Bubble (Stenoshala Style) */
.nav-item-icon-bubble {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Colorful Transparent Hover Highlighting */
.nav-item:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08) !important;
}
.nav-item:hover .nav-item-title {
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}
.nav-item:hover .nav-item-icon-bubble {
  transform: scale(1.1) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Active State Highlighting */
.nav-item.active {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #1d4ed8 !important;
  font-weight: 800 !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1) !important;
}
.nav-item.active .nav-item-title {
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}
.nav-item.active::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 8px !important;
  bottom: 8px !important;
  width: 4px !important;
  background: #2563eb !important;
  border-radius: 0 4px 4px 0 !important;
}
.nav-item.active .nav-item-icon-bubble {
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2) !important;
}

/* Right-Aligned Badges (56% OFF, NEW, APP) */
.nav-badge-pill {
  margin-left: auto !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}
.nav-badge-pill.badge-discount {
  background: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3) !important;
}
.nav-badge-pill.badge-new {
  background: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3) !important;
}
.nav-badge-pill.badge-app {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* Sidebar Footer & User Profile Preview */
.sidebar-footer {
  padding: 14px 14px !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #fafbfc !important;
}
.sidebar-user-preview {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  margin-bottom: 8px !important;
}
.sidebar-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
}
.sidebar-user-name {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #0a1128 !important;
}
.sidebar-user-role {
  font-size: 0.72rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}
.sidebar-logout-btn-item {
  width: 100% !important;
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  border-radius: 10px !important;
  color: #b91c1c !important;
  padding: 8px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  transition: all 0.2s !important;
}
.sidebar-logout-btn-item:hover {
  background: #fecaca !important;
  border-color: #f87171 !important;
  transform: translateY(-1px) !important;
}

/* Modal Overlay Styling for Auth Gateway */
.auth-gateway-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 4vw;
  box-sizing: border-box;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: opacity 0.25s ease;
}

.header-guest-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.header-guest-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

eft: 12px;
  }
}


/* ==========================================================================
   Stenoshala-Style Slim & Compact Hero Poster Carousel
   ========================================================================== */
#dashboardActivePlanBanner,
#planBannerAction,
#planBannerActionBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.dashboard-poster-carousel {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 20px -3px rgba(37, 99, 235, 0.07), 0 2px 5px rgba(0, 0, 0, 0.02);
  background: #ffffff;
}

.poster-slides-container {
  position: relative;
  width: 100%;
  height: 250px;
  min-height: 250px;
}

.poster-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 1;
}

.poster-slide.active {
  position: absolute;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

/* Integrated Sleek Offer Ribbon / Pill */
.poster-offer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254, 242, 242, 0.96);
  border: 1px solid rgba(254, 202, 202, 0.9);
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 0.74rem;
  color: #991b1b;
  cursor: pointer;
  margin-bottom: 6px;
  align-self: flex-start;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.06);
}

.poster-offer-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.12);
  background: #ffffff;
}

.offer-pill-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.offer-pill-text {
  font-weight: 600;
}

.offer-pill-arrow {
  color: #dc2626;
  font-weight: 800;
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}

.poster-offer-pill:hover .offer-pill-arrow {
  transform: translateX(3px);
}

/* Left Content - Slim & Compact */
.poster-content-left {
  flex: 1.25;
  padding: 14px 24px 10px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.poster-headline {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.22;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin-bottom: 5px;
}

.poster-gold-line {
  width: 30px;
  height: 3px;
  background: #f59e0b;
  border-radius: 3px;
  margin-bottom: 7px;
}

.poster-feature-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
  max-width: 480px;
}

.poster-feature-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 234, 254, 0.85);
  border-radius: 10px;
  padding: 4px 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.04);
  transition: transform 0.15s ease;
}

.poster-feature-pill:hover {
  transform: translateX(2px);
}

.poster-feature-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.80rem;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.15);
}

.poster-feature-text {
  font-size: 0.76rem;
  color: #334155;
  line-height: 1.3;
  font-weight: 500;
}

.poster-feature-text strong {
  color: #0f172a;
  font-weight: 800;
}

.poster-laurel-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.2px solid #fde68a;
  border-radius: 8px;
  padding: 3px 10px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.10);
  align-self: flex-start;
}

.laurel-shield {
  width: 20px;
  height: 20px;
  background: #f59e0b;
  color: #ffffff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.70rem;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

.laurel-text {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
}

/* Right Visual Side */
.poster-visual-right {
  flex: 0.95;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.poster-bg-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 15%, black 45%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 15%, black 45%);
  z-index: 1;
}

.floating-card-top {
  position: absolute;
  top: 10px;
  left: 14px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 4;
  backdrop-filter: blur(8px);
}

.floating-card-bottom {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 4;
  backdrop-filter: blur(8px);
}

/* Dots inside poster at the bottom */
.poster-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 4px 0 5px 0;
  background: #ffffff;
  border-top: 1px solid #f8fafc;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-dot.active {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: #2563eb;
}

/* Mobile responsive */
@media (max-width: 992px) {
  .poster-slides-container {
    height: auto;
    min-height: 240px;
  }
  .poster-slide {
    flex-direction: column-reverse;
  }
  .poster-slide.active {
    position: relative;
  }
  .poster-visual-right {
    height: 130px;
    flex: none;
    width: 100%;
  }
  .poster-bg-photo {
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  }
  .poster-content-left {
    padding: 12px 14px;
    flex: none;
  }
  .poster-headline {
    font-size: 1.15rem;
  }
}






/* ==========================================================================
   Full-Window Stenoshala Pricing Plans Layout & Compact Cards
   ========================================================================== */
.clean-sub-container {
  max-width: 1480px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 16px 20px 40px 20px !important;
  box-sizing: border-box !important;
}

.plans-top-hero-banner {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 22px -4px rgba(37, 99, 235, 0.10);
  background: #ffffff;
}

.plans-top-hero-banner img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.plans-trust-pills {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 20px;
  background: rgba(239, 246, 255, 0.85);
  border: 1px solid #bfdbfe;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
  margin-bottom: 14px;
}

.trust-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e40af;
}

.trust-pill-item .check-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
}

/* 4 Full-Width Columns */
.subscription-plans-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 14px 0 24px 0 !important;
  align-items: stretch !important;
}

@media (max-width: 1100px) {
  .subscription-plans-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
}

@media (max-width: 580px) {
  .subscription-plans-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Individual Card - Compact, Sleek, Short */
.sub-plan-card.stenoshala-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px 16px 18px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible !important;
}

.sub-plan-card.stenoshala-card:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.14);
}

.sub-plan-card.stenoshala-card.card-popular {
  border: 2px solid #3b82f6 !important;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%) !important;
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.12) !important;
}

.sub-plan-card.stenoshala-card.card-best {
  border: 2px solid #f59e0b !important;
  background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%) !important;
  box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.14) !important;
}

.plan-top-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
  z-index: 2;
}

.badge-popular {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
}

.badge-best {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.badge-starter {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
}

.badge-saver {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
}

.plan-card-header {
  margin-bottom: 10px;
}

.plan-icon-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.plan-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.plan-name-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.plan-desc-text {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.3;
  margin-bottom: 8px;
}

.plan-discount-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.plan-price-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}

.plan-price-strike {
  font-size: 0.98rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.plan-price-amount {
  font-size: 1.95rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.5px;
}

.plan-price-period {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.plan-rate-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.plan-validity-pill {
  font-size: 0.70rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 5px;
}

.plan-monthly-pill {
  font-size: 0.70rem;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  padding: 2px 7px;
  border-radius: 5px;
}

.plan-card-divider {
  height: 1px;
  background: #f1f5f9;
  margin-bottom: 10px;
}

/* Crisp & Short Bullet Points */
.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.74rem;
  color: #334155;
  line-height: 1.30;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
}

.plan-feature-item strong {
  color: #0f172a;
  font-weight: 700;
}

.feature-check-icon {
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-buy-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.plan-buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.32);
}

.plan-buy-btn.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
  color: #ffffff;
}

.plan-buy-btn.btn-gold:hover {
  box-shadow: 0 5px 14px rgba(245, 158, 11, 0.4);
}


/* Mobile touch active visual feedback */
.mobile-nav-btn:active,
.sub-tool-btn:active,
.btn-continue-go:active,
.category-series-card:active {
  transform: scale(0.96) !important;
  opacity: 0.88 !important;
  transition: transform 0.08s ease, opacity 0.08s ease !important;
}


/* Mobile student greeting card: strictly controlled by auth state */
.mobile-student-greeting-card {
  display: none !important;
}
.mobile-student-greeting-card.logged-in {
  display: flex !important;
}
@media (min-width: 769px) {
  .mobile-student-greeting-card,
  .mobile-student-greeting-card.logged-in {
    display: none !important;
  }
}


/* Ensure Testbook mobile elements are strictly hidden on desktop */
.mobile-category-chips-bar,
.mobile-quick-circles-row {
  display: none !important;
}

/* ==========================================================================
   TESTBOOK-STYLE CLEAN MOBILE APP UI (Strictly Mobile View: <=768px)
   Does NOT affect desktop/PC view in any way!
   ========================================================================== */
@media (max-width: 768px), (max-device-width: 768px) {
  /* Ensure mobile elements display properly in mobile viewport */
  .mobile-category-chips-bar {
    display: block !important;
  }
  .mobile-quick-circles-row {
    display: grid !important;
  }
  /* 1. Header Clean-up - ZERO OVERLAP, NATIVE APP PRECISION */
  html.is-mobile-device .top-header,
  .top-header {
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 10px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  html.is-mobile-device .top-header .header-left,
  .top-header .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }

  html.is-mobile-device .top-header .three-dot-btn,
  .top-header .three-dot-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    color: #1e293b !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
  }

  html.is-mobile-device .top-header .header-brand-link,
  .top-header .header-brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }

  html.is-mobile-device .top-header .header-brand-logo,
  .top-header .header-brand-logo {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  html.is-mobile-device .top-header .header-brand-name,
  .top-header .header-brand-name {
    font-size: 0.95rem !important;
    font-weight: 850 !important;
    color: #0f172a !important;
    letter-spacing: -0.3px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }

  html.is-mobile-device .top-header .header-right,
  .top-header .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
  }

  /* Right: Plan Validity Badge */
  .top-header .plan-validity-pill {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    border-radius: 14px !important;
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Right: Notification Bell Button */
  .top-header .notif-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    color: #475569 !important;
    flex-shrink: 0 !important;
    position: relative !important;
  }

  /* Right: Compact Guest Login Button */
  .top-header .header-guest-login-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
    border-radius: 16px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25) !important;
  }

  /* Right: Compact User Profile Button */
  .top-header .user-profile-btn {
    display: inline-flex !important;
    align-items: center !important;
    padding: 2px !important;
    border-radius: 50% !important;
    border: 1.5px solid #2563eb !important;
    background: transparent !important;
    flex-shrink: 0 !important;
  }

  .top-header .user-avatar {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 0.8rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  /* Hide bloated/redundant header items on mobile */
  .top-header .streak-badge,
  .top-header .lang-toggle-btn,
  .top-header .theme-toggle-btn,
  .top-header #pwaInstallBtn,
  .top-header .header-admin-btn,
  .top-header .header-logout-btn,
  .mobile-sub-toolbar,
  #mobileSubToolbar {
    display: none !important;
  }

  /* Extra narrow screens: keep logo + brand + bell + login clean */
  @media (max-width: 350px) {
    .top-header .plan-validity-pill {
      display: none !important;
    }
  }

  /* 2. Testbook Horizontal Category Chips Bar */
  .mobile-category-chips-bar {
    background: #ffffff !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: sticky !important;
    top: 54px !important;
    z-index: 990 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  }

  .mobile-chips-scroll {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 2px 0 !important;
  }

  .mobile-chips-scroll::-webkit-scrollbar {
    display: none !important;
  }

  .mobile-chip {
    flex: 0 0 auto !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    padding: 6px 14px !important;
    border-radius: 9999px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
  }

  .mobile-chip:active {
    transform: scale(0.95) !important;
  }

  .mobile-chip.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
  }

  /* 3. Testbook 5 Quick Action Circles Grid */
  .mobile-quick-circles-row {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px !important;
    margin: 12px 0 16px 0 !important;
    padding: 0 2px !important;
  }

  .mobile-circle-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-circle-icon-box {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    position: relative !important;
    margin-bottom: 5px !important;
    transition: transform 0.12s ease !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04) !important;
  }

  .mobile-circle-item:active .mobile-circle-icon-box {
    transform: scale(0.90) !important;
  }

  .circle-classes {
    background: #eff6ff !important;
    border: 1.5px solid #bfdbfe !important;
  }

  .circle-typing {
    background: #faf5ff !important;
    border: 1.5px solid #e9d5ff !important;
  }

  .circle-rules {
    background: #fff1f2 !important;
    border: 1.5px solid #fecdd3 !important;
  }

  .circle-rankers {
    background: #fffbeb !important;
    border: 1.5px solid #fde68a !important;
  }

  .circle-pass {
    background: #ecfdf5 !important;
    border: 1.5px solid #a7f3d0 !important;
  }

  .circle-badge-tag {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    font-size: 0.52rem !important;
    font-weight: 900 !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
  }

  .badge-free {
    background: #10b981 !important;
    color: #ffffff !important;
  }

  .badge-new {
    background: #db2777 !important;
    color: #ffffff !important;
  }

  .badge-hot {
    background: #f59e0b !important;
    color: #ffffff !important;
  }

  .badge-discount {
    background: #ef4444 !important;
    color: #ffffff !important;
  }

  .mobile-circle-label {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  /* 4. Streamlined Hero Poster for Mobile */
  .dashboard-poster-carousel {
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
  }

  .poster-headline {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
    margin: 4px 0 8px 0 !important;
  }

  .poster-feature-list {
    display: none !important; /* Hide cluttered text list on mobile */
  }

  .poster-laurel-badge {
    margin-top: 4px !important;
    padding: 3px 8px !important;
  }

  /* 5. Sleek Continue Practice Card */
  .continue-practice-card {
    border-radius: 14px !important;
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15) !important;
  }

  .btn-continue-go {
    padding: 7px 14px !important;
    font-size: 0.80rem !important;
    border-radius: 8px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
  }

  /* 6. Refined Clean Category Series Cards on Mobile */
  .category-series-card {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03) !important;
    background: #ffffff !important;
  }

  .cat-left-section {
    gap: 12px !important;
  }

  .cat-left-section > div:first-child {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 12px !important;
    font-size: 1.5rem !important;
  }

  .category-series-card .cat-left-section h4 {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
  }

  .cat-middle-specs {
    display: none !important; /* Hide heavy text specs on mobile for clean look */
  }

  .cat-action-section button {
    padding: 9px 16px !important;
    font-size: 0.86rem !important;
    border-radius: 10px !important;
  }

  /* 7. Bottom Navigation Bar */
  .mobile-bottom-nav {
    height: 60px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.04) !important;
  }

  .mobile-nav-btn {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    gap: 2px !important;
    color: #64748b !important;
  }

  .mobile-nav-btn.active {
    color: #2563eb !important;
  }

  .page-view {
    padding: 10px 12px 80px 12px !important;
  }
}


/* ==========================================================================
   MOBILE SECTION AUDIT & OVERLAP ELIMINATION FIXES
   ========================================================================== */
@media (max-width: 768px), (max-device-width: 768px) {
  /* Subpage Header Back Button Clean-up */
  .header-back-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 1.15rem !important;
    color: #1e293b !important;
    flex-shrink: 0 !important;
  }

  .header-back-btn[style*="display: none"],
  .header-back-btn[style*="display:none"] {
    display: none !important;
  }
  
  .header-back-btn .back-text {
    display: none !important;
  }

  .header-view-badge,
  #activeViewBadge {
    display: none !important;
  }

  /* When on subpages and back button is visible, hide three-dot button so left side is compact */
  .top-header:has(.header-back-btn:not([style*="display: none"]):not([style*="display:none"])) .three-dot-btn {
    display: none !important;
  }

  /* Sidebar Drawer z-index and height */
  .sidebar {
    z-index: 2100 !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 290px !important;
    max-width: 82vw !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
    padding-top: 10px !important;
  }

  .sidebar-overlay {
    z-index: 2099 !important;
  }

  /* PWA Install Popup: ensure it NEVER sits on top of modals or sidebar */
  .mobile-pwa-popup {
    z-index: 950 !important;
  }

  /* Hide PWA popup when modals or sidebar are open */
  body:has(.modal-overlay.active) .mobile-pwa-popup,
  body:has(.sidebar.open) .mobile-pwa-popup,
  .modal-overlay.active ~ .mobile-pwa-popup,
  .sidebar.open ~ .mobile-pwa-popup {
    display: none !important;
  }

  /* Category series card buy button styling (Solid Green with white text) */
  .category-series-card .cat-action-section button.btn-secondary,
  .category-series-card button.btn-secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
    font-weight: 800 !important;
  }

  .category-series-card .cat-action-section button.btn-primary,
  .category-series-card button.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    font-weight: 800 !important;
  }

  /* Sufficient bottom padding so bottom nav & floating elements never overlap content */
  .page-view {
    padding-bottom: 115px !important;
  }
}


@media (max-width: 768px), (max-device-width: 768px) {
  .three-dot-btn.hide-mobile,
  .header-left:has(.header-back-btn:not([style*="display: none"]):not([style*="display:none"])) .three-dot-btn {
    display: none !important;
  }
}


/* ==========================================================================
   MOBILE SYSTEMATIC UI: SINGLE BACK BUTTON, PREMIUM HAMBURGER, LINE-BY-LINE CLASSES
   STRICTLY FOR MOBILE VIEW (<=768px) - ZERO IMPACT ON PC/DESKTOP VIEW!
   ========================================================================== */
@media (max-width: 768px), (max-device-width: 768px) {
  /* 1. SINGLE BACK BUTTON ONLY: Hide all duplicate secondary back buttons */
  .view-top-back-wrap,
  .view-back-strip-btn,
  #view-category-detail .back-btn,
  .practice-header-bar .back-btn,
  .tg-back-btn {
    display: none !important;
  }

  /* 2. PREMIUM HAMBURGER BUTTON STYLING */
  .three-dot-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 9px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1e293b !important;
    padding: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  }

  .three-dot-btn svg {
    stroke: #1e293b !important;
  }

  /* 3. CATEGORY DETAIL HEADER STREAMLINING */
  #view-category-detail {
    padding: 10px 12px 100px 12px !important;
  }

  #catDetailTitle {
    font-size: 1.15rem !important;
    font-weight: 850 !important;
    color: #0f172a !important;
    gap: 6px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #catDetailSub {
    font-size: 0.74rem !important;
    color: #64748b !important;
    margin-top: 2px !important;
    line-height: 1.4 !important;
  }

  #catDetailAccessBadge {
    width: 100% !important;
    margin-top: 6px !important;
  }

  #catDetailAccessBadge > div {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  #catDetailAccessBadge .badge {
    font-size: 0.72rem !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  #catDetailAccessBadge button {
    flex: 1 !important;
    font-size: 0.76rem !important;
    padding: 6px 12px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }

  .cat-filter-btn {
    padding: 5px 12px !important;
    font-size: 0.74rem !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
  }

  /* 4. CLASS ITEMS: LINE-BY-LINE SYSTEMATIC CLEAN MOBILE ROW */
  #catDetailPassagesList {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .category-passage-card,
  .category-passage-card-3d {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 11px 13px !important;
    border-radius: 12px !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }

  /* Left Column: Title & Clean Metadata Row */
  .category-passage-card > div:first-child {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  /* Title Row */
  .category-passage-card .class-title {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
  }

  /* Free Demo tag */
  .category-passage-card .badge-success {
    font-size: 0.60rem !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  /* Metadata row (⚡ 80 WPM • 📝 400 शब्द • ⏱️ 5 मिनट) */
  .category-passage-card > div:first-child > div:nth-child(2) {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 0.70rem !important;
    color: #64748b !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .category-passage-card > div:first-child > div:nth-child(2) span {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 0.70rem !important;
  }

  .category-passage-card > div:first-child > div:nth-child(2) span:not(:last-child)::after {
    content: "•";
    margin-left: 5px;
    color: #cbd5e1;
  }

  /* Hide repetitive redundant font subtitle on mobile for clean look */
  .category-passage-card > div:first-child > div:nth-child(3) {
    display: none !important;
  }

  /* Right Action Section: Compact Button */
  .category-passage-card .card-actions-wrapper {
    width: auto !important;
    flex-shrink: 0 !important;
    margin-top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  /* Action Buttons: Sleek, compact pill */
  .category-passage-card .card-actions-wrapper button {
    width: auto !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 16px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
  }

  /* Free Demo / Accessible Button */
  .category-passage-card .card-actions-wrapper button.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
    border: none !important;
  }

  /* Locked Button: Sleek clean pill */
  .category-passage-card .card-actions-wrapper button.btn-secondary {
    background: #f8fafc !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  }

  /* User attempt score badge */
  .category-passage-card .class-mini-result-box {
    padding: 2px 6px !important;
    border-radius: 6px !important;
    font-size: 0.65rem !important;
    white-space: nowrap !important;
  }
}

/* ==========================================================================
   DEMO 3: TWO-STEP SEPARATED DICTATION & TYPING FLOW (MOBILE ONLY)
   Desktop (>768px): 100% unaffected, hidden
   ========================================================================== */

/* Desktop defaults: Hide mobile-only 2-step elements */
.mobile-dictation-hero,
.mobile-start-typing-wrap,
.mobile-mini-audio-bar {
  display: none !important;
}

@media (max-width: 768px), (max-device-width: 768px) {
  /* Step 1 (Dictation Mode - Default): Show audio studio, hide typing editor */
  #view-practice:not([data-mobile-step="typing"]) .mobile-dictation-hero {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 10px 4px 6px 4px !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .mobile-start-typing-wrap {
    display: block !important;
    margin-top: 14px !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .mobile-mini-audio-bar {
    display: none !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .typing-editor-card {
    display: none !important;
  }

  #view-practice:not([data-mobile-step="typing"]) #practiceExamAlertBanner {
    display: none !important;
  }

  /* Audio Player Card in Step 1: Clean, focused Dictation Studio (Demo 3) */
  #view-practice:not([data-mobile-step="typing"]) .audio-player-card {
    background: linear-gradient(150deg, #091224 0%, #152238 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    border-radius: 20px !important;
    padding: 18px 14px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* Circular Speed Gauge */
  .mobile-gauge-circle {
    width: 86px !important;
    height: 86px !important;
    min-width: 86px !important;
    border-radius: 50% !important;
    background: #060b17 !important;
    border: 3.5px solid #0284c7 !important;
    box-shadow: 0 0 18px rgba(2, 132, 199, 0.35) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
  }

  .mobile-gauge-val {
    font-size: 1.7rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    color: #38bdf8 !important;
  }

  .mobile-gauge-lbl {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.5px !important;
    margin-top: 2px !important;
  }

  .mobile-gauge-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .mobile-gauge-tag {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #38bdf8 !important;
  }

  .mobile-gauge-subtext {
    font-size: 0.76rem !important;
    color: #cbd5e1 !important;
    line-height: 1.4 !important;
  }

  /* Speed Chips in Step 1 */
  #view-practice:not([data-mobile-step="typing"]) .wpm-chips-row {
    display: flex !important;
    gap: 5px !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .wpm-chip {
    flex: 1 !important;
    min-width: 48px !important;
    padding: 7px 0 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e1 !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-align: center !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .wpm-chip.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4) !important;
  }

  /* Audio Seek & Play Button */
  #view-practice:not([data-mobile-step="typing"]) .audio-controls-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin: 8px 0 !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .audio-btn-seek {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
  }

  #view-practice:not([data-mobile-step="typing"]) .audio-btn-play {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    border-radius: 50% !important;
    background: #0284c7 !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.4rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5) !important;
  }

  /* Big Start Typing CTA Button */
  .btn-start-typing-mobile {
    width: 100% !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.45) !important;
    cursor: pointer !important;
    transition: transform 0.15s ease !important;
  }

  .btn-start-typing-mobile:active {
    transform: scale(0.98) !important;
  }

  .typing-btn-arrow {
    font-size: 1.25rem !important;
  }

  /* =========================================================================
     STEP 2: TYPING EXAMINATION MODE (Activated when button pressed)
     ========================================================================= */
  #view-practice[data-mobile-step="typing"] .audio-player-card {
    display: none !important;
  }

  #view-practice[data-mobile-step="typing"] .mobile-mini-audio-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    padding: 7px 12px !important;
    margin-bottom: 8px !important;
    color: #fff !important;
  }

  .mini-audio-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .mini-play-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    background: #0284c7 !important;
    border: none !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .mini-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  .mini-title {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .mini-time {
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
  }

  .mini-audio-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .mini-speed-badge {
    background: rgba(2, 132, 199, 0.25) !important;
    border: 1px solid #38bdf8 !important;
    color: #38bdf8 !important;
    padding: 2px 7px !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
  }

  .btn-back-to-audio {
    background: #1e293b !important;
    border: 1px solid #475569 !important;
    color: #cbd5e1 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  /* Step 2 Typing Editor Card Layout */
  #view-practice[data-mobile-step="typing"] .typing-editor-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 10px !important;
    border: 1px solid #e2e8f0 !important;
  }

  /* Clean Settings Ribbons for Step 2 */
  #view-practice[data-mobile-step="typing"] .editor-toolbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 6px !important;
  }

  #view-practice[data-mobile-step="typing"] .editor-toolbar-row-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding-bottom: 2px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #view-practice[data-mobile-step="typing"] .editor-toolbar-row-top::-webkit-scrollbar {
    display: none !important;
  }

  #view-practice[data-mobile-step="typing"] .editor-controls-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 5px !important;
    padding-bottom: 2px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #view-practice[data-mobile-step="typing"] .editor-controls-row::-webkit-scrollbar {
    display: none !important;
  }

  #view-practice[data-mobile-step="typing"] .editor-live-stats {
    display: flex !important;
    justify-content: space-between !important;
    background: #0f172a !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    margin: 4px 0 !important;
  }

  #view-practice[data-mobile-step="typing"] .stat-pill {
    color: #fff !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
  }

  #view-practice[data-mobile-step="typing"] .stat-pill strong {
    color: #38bdf8 !important;
    font-size: 0.88rem !important;
  }

  #view-practice[data-mobile-step="typing"] .stat-pill:last-child strong {
    color: #f87171 !important;
    font-size: 0.95rem !important;
  }

  /* Full Screen Typing Area */
  #view-practice[data-mobile-step="typing"] .typing-textarea {
    width: 100% !important;
    min-height: 280px !important;
    height: calc(100vh - 280px) !important;
    height: calc(100dvh - 280px) !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-size: 1.15rem !important;
    line-height: 1.65 !important;
  }
}


/* ==========================================================================
   MOBILE SCREEN COMPACT & SLEEK REFINEMENT (<=768px)
   Eliminates oversized fonts, giant emojis, bloated banners & tall plan cards.
   Gives a native, tight, compact EdTech app feel (Testbook / Unacademy style).
   ========================================================================== */
@media (max-width: 768px), (max-device-width: 768px) {

  /* 1. Global Mobile Root & Viewport Sizing */
  body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  /* 2. DASHBOARD: Sleek Compact Hero Carousel */
  .dashboard-poster-carousel {
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
  }
  .poster-slides-container {
    height: 135px !important;
    min-height: 135px !important;
  }
  .poster-slide {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }
  .poster-content-left {
    flex: 1 !important;
    padding: 10px 12px !important;
    justify-content: center !important;
    max-width: 65% !important;
  }
  .poster-offer-pill {
    padding: 2px 7px !important;
    font-size: 0.64rem !important;
    margin-bottom: 3px !important;
    gap: 4px !important;
  }
  .offer-pill-badge {
    font-size: 0.55rem !important;
    padding: 1px 4px !important;
  }
  .poster-headline {
    font-size: 0.88rem !important;
    line-height: 1.22 !important;
    margin: 2px 0 4px 0 !important;
    font-weight: 800 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .poster-gold-line {
    width: 22px !important;
    height: 2px !important;
    margin-bottom: 4px !important;
  }
  .poster-feature-list {
    display: none !important;
  }
  .poster-laurel-badge {
    padding: 2px 6px !important;
    margin-top: 2px !important;
    gap: 4px !important;
  }
  .laurel-shield {
    width: 15px !important;
    height: 15px !important;
    font-size: 0.58rem !important;
  }
  .laurel-text {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
  }
  .poster-visual-right {
    flex: 0 0 35% !important;
    height: 100% !important;
    width: 35% !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .poster-bg-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    mask-image: linear-gradient(to right, transparent 0%, black 25%) !important;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%) !important;
  }
  .floating-card-top,
  .floating-card-bottom {
    display: none !important; /* Hide oversized cards floating over image on mobile */
  }
  .poster-carousel-dots {
    padding: 3px 0 4px 0 !important;
  }
  .carousel-dot {
    width: 5px !important;
    height: 5px !important;
  }
  .carousel-dot.active {
    width: 14px !important;
  }

  /* 3. DASHBOARD: Compact 5 Quick Action Circles */
  .mobile-quick-circles-row {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4px !important;
    margin: 8px 0 12px 0 !important;
    padding: 0 !important;
  }
  .mobile-circle-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 1.05rem !important;
    margin-bottom: 4px !important;
  }
  .circle-badge-tag {
    font-size: 0.46rem !important;
    padding: 1px 3px !important;
    top: -4px !important;
    right: -4px !important;
  }
  .mobile-circle-label {
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
  }

  /* 4. DASHBOARD: Compact Continue Practice Card */
  .continue-practice-card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
  }
  .continue-practice-card h4 {
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
  }
  .continue-practice-card p {
    font-size: 0.70rem !important;
  }
  .btn-continue-go {
    padding: 5px 12px !important;
    font-size: 0.74rem !important;
    border-radius: 7px !important;
  }

  /* 5. DASHBOARD: Compact Category Series Cards */
  .category-series-card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    gap: 8px !important;
  }
  .cat-left-section {
    gap: 8px !important;
  }
  .cat-left-section > div:first-child {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 9px !important;
    font-size: 1.15rem !important;
  }
  .category-series-card .cat-left-section h4 {
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
  }
  .category-series-card .cat-left-section p {
    font-size: 0.70rem !important;
  }
  .cat-action-section button {
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    border-radius: 8px !important;
  }

  /* 6. DASHBOARD: Compact Stats Cards */
  .horizontal-stats-grid {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .h-stat-card {
    min-height: 56px !important;
    height: 56px !important;
    padding: 5px 4px !important;
    border-radius: 10px !important;
  }
  .h-stat-card .h-stat-icon {
    font-size: 1rem !important;
  }
  .h-stat-card .h-stat-val {
    font-size: 0.92rem !important;
  }
  .h-stat-card .h-stat-label {
    font-size: 0.62rem !important;
  }

  /* ========================================================================
     PLANS & PRICING PAGE (/plans) COMPACT MOBILE OPTIMIZATION
     ======================================================================== */
  .clean-sub-container {
    padding: 8px 10px 30px 10px !important;
  }

  /* Slim Header Banner */
  .plans-top-hero-banner {
    border-radius: 10px !important;
    margin-bottom: 10px !important;
  }
  .plans-top-hero-banner img {
    max-height: 105px !important;
  }

  /* Header Title & Subtitle */
  .clean-sub-container .section-title {
    font-size: 1.12rem !important;
    margin-bottom: 2px !important;
  }
  .clean-sub-container .section-subtitle {
    font-size: 0.74rem !important;
    margin-bottom: 6px !important;
  }

  /* Trust Pills */
  .plans-trust-pills {
    padding: 4px 10px !important;
    gap: 4px 8px !important;
    margin-bottom: 8px !important;
    border-radius: 20px !important;
  }
  .trust-pill-item {
    font-size: 0.68rem !important;
    gap: 4px !important;
  }
  .trust-pill-item .check-circle {
    width: 13px !important;
    height: 13px !important;
    font-size: 0.52rem !important;
  }

  /* Status Bar */
  .sub-active-bar {
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 10px !important;
  }
  .sub-active-lead {
    font-size: 0.76rem !important;
  }
  .sub-active-desc {
    display: none !important;
  }
  .sub-active-pill-inactive {
    font-size: 0.68rem !important;
    padding: 2px 7px !important;
  }

  /* Gold Coins Bar */
  #subGoldCoinsBanner {
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 10px !important;
    gap: 6px !important;
  }
  #subGoldCoinsBanner span[style*="font-size:1.8rem"],
  #subGoldCoinsBanner span[style*="font-size: 1.8rem"] {
    font-size: 1.15rem !important;
  }
  #subGoldCoinsBanner div[style*="font-size:0.95rem"] {
    font-size: 0.78rem !important;
  }
  #subGoldCoinsBanner div[style*="font-size:0.78rem"] {
    display: none !important;
  }
  #subGoldCoinsBanner button {
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
  }

  /* Sub Mode Tabs */
  .sub-mode-tabs {
    margin-bottom: 10px !important;
    padding: 3px !important;
    gap: 4px !important;
    border-radius: 10px !important;
  }
  .sub-mode-tabs button {
    padding: 7px 6px !important;
    font-size: 0.74rem !important;
    border-radius: 7px !important;
    gap: 4px !important;
  }

  /* Promo Code Card */
  #promoCodeCard {
    padding: 8px 10px !important;
    margin-bottom: 10px !important;
    border-radius: 10px !important;
    gap: 6px !important;
  }
  #promoCodeCard span[style*="font-size:1.8rem"],
  #promoCodeCard span[style*="font-size: 1.8rem"] {
    font-size: 1.1rem !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
  }
  #promoCodeCard div[style*="font-size:0.95rem"] {
    font-size: 0.78rem !important;
  }
  #promoCodeCard div[style*="font-size:0.74rem"] {
    display: none !important;
  }
  #promoCodeCard input {
    padding: 5px 8px !important;
    font-size: 0.76rem !important;
    width: 110px !important;
  }
  #promoCodeCard button {
    padding: 5px 10px !important;
    font-size: 0.74rem !important;
  }

  /* Subscription Plans Grid */
  .subscription-plans-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 8px 0 16px 0 !important;
  }

  /* Compact Sleek Plan Card */
  .sub-plan-card.stenoshala-card {
    padding: 12px 12px 10px 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  }
  .plan-top-badge {
    top: -9px !important;
    font-size: 0.58rem !important;
    padding: 1px 7px !important;
    border-radius: 10px !important;
  }
  .plan-card-header {
    margin-bottom: 4px !important;
  }
  .plan-icon-title {
    gap: 6px !important;
    margin-bottom: 2px !important;
  }
  .plan-icon-box {
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    font-size: 0.92rem !important;
  }
  .plan-name-text {
    font-size: 0.90rem !important;
    line-height: 1.2 !important;
  }
  .plan-desc-text {
    font-size: 0.68rem !important;
    margin-bottom: 4px !important;
  }
  .plan-discount-pill {
    font-size: 0.60rem !important;
    padding: 1px 5px !important;
    margin-bottom: 2px !important;
  }
  .plan-price-block {
    gap: 4px !important;
    margin-bottom: 2px !important;
  }
  .plan-price-strike {
    font-size: 0.80rem !important;
  }
  .plan-price-amount {
    font-size: 1.40rem !important;
    letter-spacing: -0.3px !important;
  }
  .plan-price-period {
    font-size: 0.70rem !important;
  }
  .plan-rate-meta {
    gap: 4px !important;
    margin-bottom: 6px !important;
  }
  .plan-validity-pill,
  .plan-monthly-pill {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
  }
  .plan-card-divider {
    margin-bottom: 6px !important;
  }

  /* Compact Bullet Features: Show top 4, hide 5-8 on mobile to avoid endless scrolling */
  .plan-features-list {
    margin: 0 0 10px 0 !important;
    gap: 4px !important;
  }
  .plan-features-list .plan-feature-item:nth-child(n+5) {
    display: none !important;
  }
  .plan-feature-item {
    font-size: 0.68rem !important;
    gap: 5px !important;
    line-height: 1.22 !important;
  }
  .feature-check-icon {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    font-size: 0.50rem !important;
  }

  /* Compact Buy Now Button */
  .plan-buy-btn {
    padding: 8px 12px !important;
    font-size: 0.80rem !important;
    border-radius: 8px !important;
    min-height: 36px !important;
    height: 36px !important;
  }
}


/* === STENOMASTER_MOBILE_REDESIGN_V23 === */
@media (min-width: 768px) {
  .mobile-dashboard-section,
  .mobile-classes-top-bar,
  .mobile-bottom-nav,
  .hide-desktop {
    display: none !important;
  }
}

@media (max-width: 767px), (max-device-width: 767px) {
  /* Hide redundant mobile elements replaced by mobile-dashboard-section */
  #view-home > .mobile-student-greeting-card,
  #view-home > .mobile-quick-circles-row,
  #view-home > .continue-practice-card,
  #view-home > .stats-carousel-section,
  #view-home > .dashboard-poster-carousel {
    display: none !important;
  }

  /* 1. Mobile Dashboard Section */
  .mobile-dashboard-section {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    padding: 12px 14px 24px 14px;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* 1A. Personalized Welcome Card */
  .mobile-welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
  }
  .mwc-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
  }
  .mwc-avatar-ring {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  }
  .mwc-text-group {
    flex: 1;
    min-width: 0;
  }
  .mwc-greeting {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mwc-greeting span {
    color: #2563eb;
  }
  .mwc-sub {
    margin: 2px 0 0 0;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.25;
  }
  .mwc-badge {
    padding: 4px 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #92400e;
    white-space: nowrap;
  }

  /* 1B. Featured Continue Practice Card */
  .mobile-continue-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 16px;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease;
  }
  .mobile-continue-card:active {
    transform: scale(0.98);
  }
  .mobile-continue-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
    pointer-events: none;
  }
  .mcc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .mcc-badge {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #60a5fa;
    text-transform: uppercase;
  }
  .mcc-wpm-pill {
    padding: 2px 8px;
    background: rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #93c5fd;
  }
  .mcc-title {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
  }
  .mcc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 12px;
  }
  .mcc-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  }

  /* 1C. Student Performance 2x2 Grid */
  .mobile-perf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 6px;
  }
  .mobile-perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .perf-metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
  }
  .perf-metric-card:active {
    transform: scale(0.97);
  }
  .perf-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .perf-icon {
    font-size: 1.1rem;
  }
  .perf-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
  }
  .perf-metric-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
  }
  .perf-metric-val small {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
  }
  .perf-metric-sub {
    font-size: 0.66rem;
    color: #94a3b8;
  }

  /* 1D. Practice Categories (2x2 Clean Mobile Tiles) */
  .mobile-categories-2x2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .mobile-cat-tile {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
  }
  .mobile-cat-tile:active {
    transform: scale(0.97);
  }
  .cat-tile-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }
  .cat-tile-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
  }
  .cat-tile-desc {
    font-size: 0.66rem;
    color: #64748b;
    line-height: 1.25;
    flex: 1;
  }
  .cat-tile-arrow {
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
  }

  /* 2. Mobile Classes Top Bar */
  .mobile-classes-top-bar {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px 6px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
  }
  .mobile-classes-search-wrap {
    position: relative;
    width: 100%;
  }
  .mobile-classes-search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #94a3b8;
    pointer-events: none;
  }
  .mobile-classes-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px 9px 34px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.82rem;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease;
  }
  .mobile-classes-search-input:focus {
    border-color: #2563eb;
    background: #ffffff;
  }
  .mobile-lang-tabs-row {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
  }
  .mobile-lang-tab-btn {
    flex: 1;
    padding: 7px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .mobile-lang-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  }
  .mobile-speed-chips-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-speed-chips-scroll::-webkit-scrollbar {
    display: none;
  }
  .mobile-speed-chip {
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .mobile-speed-chip.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
  }

  /* 3. Fixed Bottom Navigation Bar (5 Standard Tabs) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 56px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    z-index: 9999 !important;
    padding: 0 4px env(safe-area-inset-bottom, 0px) 4px !important;
    align-items: center !important;
    justify-content: space-around !important;
  }
  .mobile-bottom-nav .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: transparent;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
  }
  .mobile-bottom-nav .mobile-nav-btn .mbn-icon {
    font-size: 1.15rem;
    line-height: 1.1;
    margin-bottom: 2px;
  }
  .mobile-bottom-nav .mobile-nav-btn .mbn-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: -0.2px;
  }
  .mobile-bottom-nav .mobile-nav-btn.active {
    color: #2563eb !important;
  }
  .mobile-bottom-nav .mobile-nav-btn.active .mbn-label {
    font-weight: 800;
  }

  /* Bottom nav auto-hide during typing test */
  body.typing-active .mobile-bottom-nav,
  .mobile-bottom-nav.typing-active {
    display: none !important;
  }

  /* Add bottom padding to scrollable page views to prevent bottom bar overlap */
  .page-view {
    padding-bottom: 72px !important;
  }
}
