/* ==========================================================================
   ARUN E-BOOK SAAS — DUAL-THEME LUXURY DESIGN SYSTEM
   Dark & Light Modes with Smooth Navbar Switcher,
   Realistic 3D Books, Glassmorphism & High-Density Dashboard Typography.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Default / Dark Theme Tokens */
:root, [data-theme="dark"] {
  --theme-mode: dark;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Surfaces & Backgrounds */
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-strong: rgba(255, 255, 255, 0.08);
  --navbar-bg: rgba(9, 13, 22, 0.85);
  --trust-bg: rgba(15, 23, 42, 0.65);
  --modal-bg: rgba(15, 23, 42, 0.95);
  --ticket-bg: rgba(15, 23, 42, 0.88);
  --input-bg: rgba(255, 255, 255, 0.05);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --heading-color: #ffffff;

  /* Brand & Accents */
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  /* Shadows */
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --card-hover-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55), 0 0 24px rgba(99, 102, 241, 0.15);
  --book-3d-shadow: -4px 4px 12px rgba(0, 0, 0, 0.45), 12px 16px 28px -4px rgba(0, 0, 0, 0.65);

  /* Ambient light glow */
  --ambient-glow-1: rgba(99, 102, 241, 0.15);
  --ambient-glow-2: rgba(6, 182, 212, 0.12);

  /* Typography Scales */
  --text-3xs: 0.625rem;  /* 10px */
  --text-2xs: 0.6875rem; /* 11px */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.8125rem;  /* 13px */
  --text-base: 0.875rem; /* 14px */
  --text-md: 0.9375rem;  /* 15px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.375rem;   /* 22px */
  --text-2xl: 1.75rem;   /* 28px */
}

/* Light Theme Tokens */
[data-theme="light"] {
  --theme-mode: light;

  /* Surfaces & Backgrounds */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(15, 23, 42, 0.02);
  --bg-glass-strong: rgba(15, 23, 42, 0.05);
  --navbar-bg: rgba(255, 255, 255, 0.88);
  --trust-bg: #ffffff;
  --modal-bg: #ffffff;
  --ticket-bg: #ffffff;
  --input-bg: #ffffff;

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: rgba(99, 102, 241, 0.6);

  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --heading-color: #0f172a;

  /* Shadows */
  --card-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  --card-hover-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.15);
  --book-3d-shadow: -3px 4px 10px rgba(15, 23, 42, 0.15), 10px 14px 24px -4px rgba(15, 23, 42, 0.22);

  /* Ambient light glow */
  --ambient-glow-1: rgba(99, 102, 241, 0.08);
  --ambient-glow-2: rgba(6, 182, 212, 0.06);
}

/* Base Body & Atmospheric Background */
html, body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  letter-spacing: -0.015em;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Atmospheric Ambient Glow Spheres */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--ambient-glow-1) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-ambient 12s ease-in-out infinite alternate;
  transition: background 0.3s ease;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--ambient-glow-2) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-ambient-alt 14s ease-in-out infinite alternate;
  transition: background 0.3s ease;
}

@keyframes pulse-ambient {
  0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  100% { transform: translate(40px, 30px) scale(1.15); opacity: 1; }
}
@keyframes pulse-ambient-alt {
  0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(-30px, -20px) scale(1.1); opacity: 0.95; }
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: color 0.2s ease;
}

.gradient-text-vibrant {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text-vibrant {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   THEME TOGGLE BUTTON (SLICK HEADER PILL)
   ========================================================================== */

.theme-toggle-btn {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.3rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  font-size: 0.85rem;
}

.theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.theme-toggle-btn .sun-icon {
  display: none;
  color: #f59e0b;
}

.theme-toggle-btn .moon-icon {
  display: inline-block;
  color: #c7d2fe;
}

/* Light mode state: show sun, hide moon */
[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: inline-block;
}

[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: none;
}

[data-theme="light"] .theme-toggle-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* ==========================================================================
   GLASSMORPHISM NAVBAR
   ========================================================================== */

.saas-navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1040;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand-logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.brand-live-pill {
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* ==========================================================================
   HERO & TRUST METRICS
   ========================================================================== */

.hero-wrapper {
  position: relative;
  padding: 3rem 0 2rem;
  z-index: 1;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #6366f1;
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .hero-pill-badge {
  color: #c7d2fe;
}

.hero-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.trust-bar {
  background: var(--trust-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.trust-item {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Search Bar */
.search-glow-container {
  position: relative;
  max-width: 320px;
}

.search-glow-container input {
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: 0.45rem 0.85rem 0.45rem 2.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-glow-container input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
  color: var(--text-primary);
  outline: none;
}

.search-glow-container input::placeholder {
  color: var(--text-muted);
}

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

/* Filter Pills */
.filter-pill {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   REALISTIC 3D E-BOOK COMPONENT (LIGHT & DARK ACCENTS)
   ========================================================================== */

.book-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.25rem;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-shadow: var(--card-shadow);
}

.book-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
}

.book-3d-wrapper {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0.5rem 1.5rem;
}

.book-3d {
  width: 190px;
  height: 245px;
  position: relative;
  border-radius: 4px 10px 10px 4px;
  transform: rotateY(-12deg) rotateX(4deg);
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--book-3d-shadow);
  cursor: pointer;
}

.book-card:hover .book-3d {
  transform: rotateY(-3deg) rotateX(1deg) translateY(-4px) scale(1.04);
}

.book-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px 10px 10px 4px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #ffffff;
  z-index: 2;
}

.book-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, 
    rgba(0, 0, 0, 0.45) 0%, 
    rgba(255, 255, 255, 0.2) 25%, 
    rgba(0, 0, 0, 0.15) 50%, 
    rgba(255, 255, 255, 0.1) 75%, 
    transparent 100%);
  pointer-events: none;
}

.book-cover::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.book-pages-edge {
  position: absolute;
  top: 4px;
  right: -8px;
  bottom: 4px;
  width: 10px;
  background: repeating-linear-gradient(
    90deg,
    #e2e8f0 0px,
    #cbd5e1 1px,
    #f8fafc 2px,
    #94a3b8 3px
  );
  border-radius: 0 4px 4px 0;
  transform: rotateY(90deg);
  transform-origin: right center;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.book-title-3d {
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.book-author-3d {
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.book-category-badge {
  font-size: var(--text-3xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: inline-block;
}

.book-tagline-text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0.5rem 0 0.85rem;
  min-height: 36px;
}

.book-specs-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-3xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
  margin-bottom: 0.85rem;
}

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

.price-tag-value {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--heading-color);
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-tag-label {
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */

.btn-shimmer-buy {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-shimmer-buy::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(30deg);
  transition: 0.6s;
}

.btn-shimmer-buy:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
  transform: translateY(-2px);
}

.btn-shimmer-buy:hover::after {
  left: 120%;
}

.btn-glass-preview {
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-glass-preview:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-saas-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

.btn-saas-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.btn-saas-primary:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   MODALS & FORM CONTROLS
   ========================================================================== */

.modal-content.dark-glass-modal {
  background: var(--modal-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  color: var(--text-primary);
  box-shadow: var(--card-hover-shadow);
}

.modal-header.dark-glass-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem;
}

[data-theme="light"] .btn-close-white {
  filter: none;
}

.form-control-dark {
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.form-control-dark:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
  color: var(--text-primary);
  outline: none;
}

.form-control-dark::placeholder {
  color: var(--text-muted);
}

.gateway-radio-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.gateway-radio-card:hover {
  background: var(--bg-glass-strong);
  border-color: var(--primary);
}

.gateway-radio-card.active-gateway {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   SUCCESS TICKET & ADMIN CONSOLE
   ========================================================================== */

.receipt-ticket {
  background: var(--ticket-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.receipt-ticket::before,
.receipt-ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-main);
  z-index: 5;
  transition: background 0.3s ease;
}

.receipt-ticket::before { left: -12px; }
.receipt-ticket::after { right: -12px; }

.btn-hero-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: var(--text-base);
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
  transition: all 0.25s ease;
  animation: pulse-download 2.4s infinite;
}

@keyframes pulse-download {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 32px rgba(16, 185, 129, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
}

.btn-hero-download:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px) scale(1.03);
}

/* Admin Dashboard Elements */
.admin-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: var(--card-shadow);
}

.admin-stat-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

.admin-table-container {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.admin-table {
  color: var(--text-primary);
  font-size: var(--text-xs);
  margin-bottom: 0;
}

.admin-table th {
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
  font-size: var(--text-3xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
}

.admin-table td {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: var(--bg-glass-strong);
}

/* ==========================================================================
   DEMO READER & TABLE OF CONTENTS COMPONENT
   ========================================================================== */

.demo-reader-container {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.5rem;
  line-height: 1.65;
}

.demo-sample-banner {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: var(--text-2xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.demo-quote-box {
  background: var(--bg-glass);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-style: italic;
  font-size: var(--text-xs);
  color: var(--text-primary);
}

.demo-code-box {
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  overflow-x: auto;
  margin: 0.85rem 0;
}

[data-theme="light"] .demo-code-box {
  background: #1e293b;
  color: #38bdf8;
}

.demo-toc-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.demo-toc-item:hover {
  background: var(--bg-glass-strong);
  border-color: var(--primary);
  transform: translateX(3px);
}

.demo-end-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1.5rem;
  text-align: center;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}
