/* ═══════════════════════════════════════════════════════════════
   FRIENDSHARE — Design System
   Font: Space Grotesk (display) + Inter (body)
   Theme: Modern gradient with purple, blue, and teal accents
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Awesome';
  font-style: normal;
  font-weight: 400;
  src: local('Awesome'), url('../fonts/awesome.woff') format('woff'), url('https://fonts.cdnfonts.com/s/1312/awesome.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Elegant Valentine';
  font-style: normal;
  font-weight: 400;
  src: local('Elegant Valentine'),
       url('../fonts/elegant-valentine.woff') format('woff'),
       url('https://fonts.cdnfonts.com/s/140224/Elegant%20Valentine.woff') format('woff');
  font-display: swap;
}

:root {
  /* Colors - Antique Parchment & Dark Mahogany Palette */
  --primary:    #c99863;  /* Antique Burnished Gold / Amber */
  --secondary:  #b58064;  /* Warm Terracotta / Cognac */
  --accent:     #8b9d88;  /* Antique Sage / Verdigris */
  --highlight:  #dfad70;  /* Warm Candlelight Gold */

  --bg:         #151311;  /* Deep antique parchment espresso */
  --bg-2:       #1e1a17;  /* Warm antique surface */
  --bg-3:       #27211d;  /* Elevated warm antique surface */
  --surface:    #1a1613;  /* Main card surface */
  --surface-2:  #221c18;  /* Secondary surface */
  --border:     rgba(197, 160, 115, 0.16); /* Antique bronze */
  --border-2:   rgba(197, 160, 115, 0.28);

  --text-1:     #f3eae0;  /* Warm parchment ivory */
  --text-2:     #cbbca8;  /* Aged paper sepia */
  --text-3:     #958573;  /* Muted antique dust */

  --red:        #d46376;
  --orange:     #d9824c;
  --yellow:     #dfad70;
  --green:      #8b9d88;
  --cyan:       #829fa2;
  --cyan-light: #a9c5c8;
  --blue:       #7b92a8;
  --purple:     #a68098;

  --violet:     #b58064;
  --violet-2:   #c99863;
  --violet-glow: rgba(201, 152, 99, 0.30);
  --emerald:    #8b9d88;
  --emerald-glow: rgba(139, 157, 136, 0.30);
  --rose:       #d46376;
  --amber:      #dfad70;

  /* Layout */
  --topbar-h:   60px;
  --sidebar-w:  230px;
  --radius:     14px;
  --radius-sm:  8px;
  --radius-lg:  20px;

  /* Glass */
  --glass-bg:   rgba(26, 22, 19, 0.92);
  --glass-blur: blur(24px);
  --glass-border: rgba(197, 160, 115, 0.20);
}

/* Dark Theme (Antique Default) */
[data-theme="dark"] {
  --primary:    #c99863;
  --secondary:  #b58064;
  --accent:     #8b9d88;
  --highlight:  #dfad70;

  --bg:         #151311;
  --bg-2:       #1e1a17;
  --bg-3:       #27211d;
  --surface:    #1a1613;
  --surface-2:  #221c18;

  --border:     rgba(197, 160, 115, 0.16);
  --border-2:   rgba(197, 160, 115, 0.28);

  --text-1:     #f3eae0;
  --text-2:     #cbbca8;
  --text-3:     #958573;

  --violet-glow: rgba(201, 152, 99, 0.30);
  --emerald-glow: rgba(139, 157, 136, 0.25);
  --glass-border: rgba(197, 160, 115, 0.20);
  --glass-bg:     rgba(26, 22, 19, 0.92);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME — ANTIQUE PARCHMENT & VELLUM
   • Aged Tea Parchment: #F5EEDF
   • Vintage Ivory:      #FBF6EC
   • Antique Bronze:     #8B5D33
   • Iron-Gall Ink:      #2A1F16
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  /* Core Accents */
  --primary:      #8b5d33;  /* Aged Leather Bronze */
  --secondary:    #a97142;  /* Warm Cognac Bronze */
  --accent:       #5a735c;  /* Antique Verdigris */
  --highlight:    #b67e45;  /* Warm Burnished Gold */

  /* Canvas & Surfaces (Aged Parchment Vellum) */
  --bg:           #f5eedf;  /* Aged Antique Parchment */
  --bg-2:         #ebe1ce;  /* Warm Vintage Surface */
  --bg-3:         #decab3;  /* Elevated Parchment */
  --surface:      #fbf6ec;  /* Warm Antique Ivory */
  --surface-2:    #f1e7d6;  /* Secondary Surface */

  /* Platinum Silver & Antique Bronze Borders */
  --border:       rgba(138, 105, 66, 0.20);
  --border-2:     rgba(138, 105, 66, 0.38);

  /* Typography (Deep Sepia Iron-Gall Ink) */
  --text-1:       #2a1f16;  /* Deep Antique Sepia Ink */
  --text-2:       #4e3c2c;  /* Warm Sepia */
  --text-3:       #7e6955;  /* Muted Aged Dust */

  /* Palette Accents */
  --red:          #c44b58;
  --yellow:       #c88d30;
  --green:        #5a735c;
  --blue:         #5c768d;
  --cyan:         #6b878a;
  --cyan-light:   #8faab0;
  --purple:       #7f6176;
  --violet:       #8b5d33;
  --rose:         #c44b58;
  --amber:        #c88d30;

  /* Glows & Glassmorphism */
  --violet-glow:  rgba(169, 113, 66, 0.30);
  --emerald-glow: rgba(90, 115, 92, 0.25);
  --glass-border: rgba(138, 105, 66, 0.25);
  --glass-bg:     rgba(245, 238, 223, 0.94);
}

/* Light Theme Antique Parchment Texture & Vignette (No checked grid) */
[data-theme="light"] .bg-grid {
  background-image:
    radial-gradient(ellipse at 50% 18%, rgba(255, 252, 245, 0.8) 0%, transparent 75%),
    radial-gradient(ellipse at center, transparent 45%, rgba(115, 85, 50, 0.15) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='lightPaperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.55 0 0 0 0.25  0 0.45 0 0 0.20  0 0 0.35 0 0.15  0 0 0 0.038 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23lightPaperNoise)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 250px 250px;
  background-repeat: no-repeat, no-repeat, repeat;
}

[data-theme="light"] .glow-1 { background: rgba(200, 160, 110, 0.08); }
[data-theme="light"] .glow-2 { background: rgba(180, 130, 85, 0.06); }
[data-theme="light"] .glow-3 { background: rgba(140, 110, 80, 0.05); }
[data-theme="light"] .glow-dash-1 { background: rgba(200, 160, 110, 0.06); }

[data-theme="light"] .landing-nav,
[data-theme="light"] .topbar {
  background: rgba(245, 238, 223, 0.94);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #8b5d33 0%, #a97142 100%);
  box-shadow: 0 4px 16px rgba(139, 93, 51, 0.30);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 26px rgba(139, 93, 51, 0.45);
}

[data-theme="light"] .btn-ghost {
  color: #192E2F;
  border-color: rgba(57, 95, 96, 0.28);
}

[data-theme="light"] .btn-ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(65, 213, 75, 0.10);
}

[data-theme="light"] .circle-card:hover {
  box-shadow: 0 16px 40px rgba(57, 95, 96, 0.12);
}

[data-theme="light"] .badge-vault {
  background: rgba(57, 95, 96, 0.14);
  color: #395F60;
  border: 1px solid rgba(57, 95, 96, 0.28);
}

[data-theme="light"] .badge-btw {
  background: rgba(65, 213, 75, 0.18);
  color: #186026;
  border: 1px solid rgba(65, 213, 75, 0.40);
}

[data-theme="light"] .nav-item.active {
  background: rgba(65, 213, 75, 0.14);
  color: #186026;
  border: 1px solid rgba(65, 213, 75, 0.32);
}

[data-theme="light"] .hero-pills .pill {
  background: rgba(220, 211, 201, 0.85);
  border: 1px solid rgba(142, 163, 154, 0.5);
  color: #192E2F;
}

[data-theme="light"] .feature-card--accent {
  background: linear-gradient(135deg, rgba(65, 213, 75, 0.10), rgba(156, 210, 228, 0.15));
  border-color: rgba(65, 213, 75, 0.40);
}

/* ═══════════════════════════════════════════════════════════════
   PINK THEME — CYBERPUNK SAKURA / NEON VAPOR
   A cool, atmospheric dark magenta-noir aesthetic with electric
   pink highlights, radiant gradients, and frosted plum glass.
   ═══════════════════════════════════════════════════════════════ */
[data-theme="pink"] {
  /* Core Brand Accents */
  --primary:      #FF2A85;  /* Electric Cyber Neon Pink */
  --secondary:    #B537F2;  /* Vibrant Neon Orchid */
  --accent:       #FF70A6;  /* Radiant Sakura Pink */
  --highlight:    #FFB3D9;  /* Pastel Neon Glow */

  /* Midnight Obsidian Surfaces */
  --bg:           #120917;  /* Deep Midnight Velvet */
  --bg-2:         #1C0E24;  /* Midnight Plum Surface */
  --bg-3:         #281433;  /* Elevated Magenta Surface */
  --surface:      #190C21;  /* Card Surface */
  --surface-2:    #23112E;  /* Secondary Card Surface */

  /* Neon Hairline Borders */
  --border:       rgba(255, 42, 133, 0.18);
  --border-2:     rgba(255, 42, 133, 0.32);

  /* Luminous Rose Typography */
  --text-1:       #FFE8F3;  /* Luminous Rose Quartz */
  --text-2:       #E2B3D0;  /* Soft Lavender Rose */
  --text-3:       #9A728C;  /* Muted Dusky Plum */

  /* Palette Accents */
  --red:          #FF3B70;
  --yellow:       #FFD166;
  --green:        #06D6A0;
  --blue:         #70A6FF;
  --cyan:         #00F5D4;
  --cyan-light:   #80FFE8;
  --purple:       #B537F2;
  --violet:       #FF2A85;
  --rose:         #FF2A85;
  --amber:        #FF9F1C;

  /* Radiant Glows & Frosted Plum Glass */
  --violet-glow:  rgba(255, 42, 133, 0.38); /* Neon Pink Glow */
  --emerald-glow: rgba(181, 55, 242, 0.38); /* Electric Orchid Glow */
  --glass-border: rgba(255, 42, 133, 0.28);
  --glass-bg:     rgba(22, 10, 28, 0.94);
}

/* Pink Theme Antique Rose Parchment & Glows (No checked grid) */
[data-theme="pink"] .bg-grid {
  background-image:
    radial-gradient(ellipse at 50% 20%, rgba(212, 130, 155, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse at center, transparent 40%, rgba(18, 8, 14, 0.65) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='rosePaperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.9 0 0 0 0.1  0 0.7 0 0 0.1  0 0 0.75 0 0.1  0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23rosePaperNoise)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 250px 250px;
  background-repeat: no-repeat, no-repeat, repeat;
}

[data-theme="pink"] .glow-1 { background: rgba(212, 130, 155, 0.09); }
[data-theme="pink"] .glow-2 { background: rgba(185, 105, 130, 0.08); }
[data-theme="pink"] .glow-3 { background: rgba(160, 90, 115, 0.06); }
[data-theme="pink"] .glow-dash-1 { background: rgba(212, 130, 155, 0.08); }

[data-theme="pink"] .landing-nav,
[data-theme="pink"] .topbar {
  background: rgba(22, 10, 28, 0.94);
  border-bottom: 1px solid var(--border);
}

[data-theme="pink"] .btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #FF2A85 0%, #D4145A 50%, #B537F2 100%);
  box-shadow: 0 4px 18px rgba(255, 42, 133, 0.45);
}

[data-theme="pink"] .btn-primary:hover {
  box-shadow: 0 6px 28px rgba(255, 42, 133, 0.65);
}

[data-theme="pink"] .btn-ghost {
  color: #FFE8F3;
  border-color: rgba(255, 42, 133, 0.32);
}

[data-theme="pink"] .btn-ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(255, 42, 133, 0.12);
}

[data-theme="pink"] .circle-card:hover {
  box-shadow: 0 20px 60px rgba(255, 42, 133, 0.22);
}

[data-theme="pink"] .badge-vault {
  background: rgba(255, 42, 133, 0.18);
  color: #FF4D9E;
  border: 1px solid rgba(255, 42, 133, 0.35);
}

[data-theme="pink"] .badge-btw {
  background: rgba(181, 55, 242, 0.18);
  color: #D670FF;
  border: 1px solid rgba(181, 55, 242, 0.35);
}

[data-theme="pink"] .nav-item.active {
  background: rgba(255, 42, 133, 0.14);
  color: #FF2A85;
  border: 1px solid rgba(255, 42, 133, 0.32);
}

[data-theme="pink"] .hero-pills .pill {
  background: rgba(30, 16, 38, 0.85);
  border: 1px solid rgba(255, 42, 133, 0.32);
  color: #FFE8F3;
}

[data-theme="pink"] .feature-card--accent {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.12), rgba(181, 55, 242, 0.12));
  border-color: rgba(255, 42, 133, 0.40);
}

/* Dark theme Antique Parchment & Glows (No checked grid) */
[data-theme="dark"] .bg-grid {
  background-image:
    radial-gradient(ellipse at 50% 18%, rgba(205, 165, 110, 0.10) 0%, transparent 62%),
    radial-gradient(ellipse at 50% 85%, rgba(160, 120, 75, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at center, transparent 40%, rgba(8, 7, 6, 0.65) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoiseDark'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.85 0 0 0 0.15  0 0.78 0 0 0.12  0 0 0.65 0 0.08  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoiseDark)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 100% 100%, 250px 250px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

[data-theme="dark"] .glow-1 { background: rgba(205, 165, 110, 0.08); }
[data-theme="dark"] .glow-2 { background: rgba(181, 128, 100, 0.07); }
[data-theme="dark"] .glow-3 { background: rgba(135, 154, 131, 0.06); }
[data-theme="dark"] .glow-dash-1 { background: rgba(205, 165, 110, 0.07); }

/* Dark theme nav bars */
[data-theme="dark"] .landing-nav {
  background: rgba(21, 19, 17, 0.92);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .topbar {
  background: rgba(26, 22, 19, 0.94);
  border-bottom: 1px solid var(--border);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Typography ──────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.hero-title,
.section-title,
.home-users-title,
.modal-title,
.lockers-shelf-title,
.vault-files-heading,
.panel-header-title,
.ace-title,
.ace-banner-title,
.ace-reader-heading,
.auth-header h2,
.profile-info h2,
.feature-card h3 {
  font-family: 'Elegant Valentine', 'Awesome', 'Great Vibes', cursive, sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* Exception: 'FriendShare' heading/brand logo strictly retains Space Grotesk */
.logo-text,
.nav-logo .logo-text,
.sidebar-logo .logo-text,
.friendshare-heading,
.brand-heading,
.friendshare-title,
h1.friendshare-heading,
h2.friendshare-heading,
span.friendshare-heading {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.5px !important;
}

.gradient-text {
  background: linear-gradient(135deg, #e3b87a 0%, #c99863 50%, #b58064 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Backgrounds (Antique Parchment & Vintage Ambiance) ──────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(ellipse at 50% 18%, rgba(205, 165, 110, 0.10) 0%, transparent 62%),
    radial-gradient(ellipse at 50% 85%, rgba(160, 120, 75, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at center, transparent 40%, rgba(8, 7, 6, 0.65) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoiseBase'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.85 0 0 0 0.15  0 0.78 0 0 0.12  0 0 0.65 0 0.08  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoiseBase)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 100% 100%, 250px 250px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  border-radius: 50%; filter: blur(140px);
  opacity: 0.35;
}
.glow-1 { width: 600px; height: 600px; background: rgba(205, 165, 110, 0.08); top: -200px; left: -200px; }
.glow-2 { width: 450px; height: 450px; background: rgba(181, 128, 100, 0.07); bottom: 0; right: -100px; }
.glow-3 { width: 350px; height: 350px; background: rgba(135, 154, 131, 0.06); top: 40%; left: 60%; }
.glow-dash-1 { width: 800px; height: 800px; background: rgba(205, 165, 110, 0.07); top: -300px; right: -200px; }

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */

.landing-body { background: var(--bg); }

/* Nav */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-image {
  height: 42px;
  width: auto;
  object-fit: contain;
}
.logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; letter-spacing: -0.5px; color: var(--primary); }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link {
  padding: 8px 18px; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.2s; cursor: pointer; border: none; background: none;
}
.nav-link:hover { color: var(--primary); background: rgba(122, 162, 247, 0.08); }

/* Theme Toggle */
.theme-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px;
  color: var(--text-2); font-family: 'Inter', sans-serif; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--glass-border); background: rgba(122, 162, 247, 0.08); }
.theme-toggle-icon { font-size: 16px; }

/* Hero */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 24px 80px;
  gap: 24px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 100px; padding: 6px 16px;
  font-size: 13px; color: var(--text-2); font-weight: 500;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 12px var(--highlight);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.15;
  letter-spacing: 0.5px;
  max-width: 800px;
}
.hero-subtitle {
  font-size: 18px; color: var(--text-3); max-width: 520px;
  line-height: 1.7; font-weight: 400;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.hero-pills {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-top: 8px;
}
.pill {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 14px;
  font-size: 13px; color: var(--text-2); font-weight: 500;
}

/* Features */
.features {
  position: relative; z-index: 1;
  padding: 80px 40px 120px;
  max-width: 1100px; margin: 0 auto;
}
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  transition: all 0.3s;
}
.feature-card:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.feature-card--accent {
  background: linear-gradient(135deg, rgba(122, 162, 247, 0.1), rgba(187, 154, 247, 0.1));
  border-color: var(--glass-border);
}
.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  color: var(--primary);
}
.feature-card--accent .feature-icon {
  color: var(--secondary);
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary); }
.feature-card p { color: var(--text-3); font-size: 14px; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE LOGGED-IN USERS SECTION
   ═══════════════════════════════════════════════════════════════ */
.home-users-section {
  padding: 40px 24px 60px;
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.home-users-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.home-users-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #7aa2f7, #bb9af7, #f7768e);
}
.home-users-header {
  text-align: center;
  margin-bottom: 28px;
}
.home-users-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(122, 162, 247, 0.12);
  color: var(--primary);
  margin-bottom: 12px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ece6a;
  box-shadow: 0 0 8px #9ece6a;
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}
.home-users-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.home-users-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}
.home-users-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.home-users-count-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.home-users-count-tag .count-num {
  background: var(--primary);
  color: #1a1b26;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
}
.home-users-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  width: 260px;
  transition: all 0.2s;
  color: var(--text-3);
}
.home-users-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.15);
  color: var(--primary);
}
.home-users-search-box input {
  background: transparent;
  border: none;
  color: var(--text-1);
  font-size: 13px;
  width: 100%;
  outline: none;
}
.home-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.home-user-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.home-user-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border);
  background: var(--bg-3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.home-user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.home-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7aa2f7, #bb9af7);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(122, 162, 247, 0.3);
}
.home-user-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #9ece6a;
  border: 2px solid var(--bg-2);
}
.home-user-details {
  flex: 1;
  min-width: 0;
}
.home-user-name-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}
.home-user-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-user-status-pill {
  font-size: 10px;
  font-weight: 600;
  color: #9ece6a;
  background: rgba(158, 206, 106, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.home-user-email {
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}
.home-user-footer {
  font-size: 11px;
  color: var(--text-3);
}
.home-user-time {
  display: inline-block;
  background: var(--surface);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.home-users-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #151311; border: none; border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 15px; font-weight: 700;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.2px;
  box-shadow: 0 4px 20px rgba(201, 152, 99, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(201, 152, 99, 0.42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.full { width: 100%; }
.btn-primary.sm { padding: 8px 16px; font-size: 13px; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 12px 24px; font-size: 15px; font-weight: 500;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); background: rgba(122, 162, 247, 0.08); }
.btn-ghost.full { width: 100%; }
.mt-sm { margin-top: 10px; }

.btn-back {
  background: transparent; color: var(--text-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.2s; flex-shrink: 0;
}
.btn-back:hover { color: var(--primary); background: rgba(122, 162, 247, 0.08); }

.btn-icon-clear {
  background: transparent; border: none; color: var(--text-3);
  font-size: 14px; cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-sm); transition: all 0.2s; flex-shrink: 0;
}
.btn-icon-clear:hover { color: var(--rose); background: rgba(247, 118, 142, 0.15); }

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label, .form-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; }

.form-input {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: var(--text-1); font-size: 15px; font-family: 'Inter', sans-serif;
  transition: all 0.2s; outline: none;
}
.form-input:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px var(--violet-glow); }
.form-input::placeholder { color: var(--text-3); }

.form-select {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: var(--text-1); font-size: 15px; font-family: 'Inter', sans-serif;
  transition: all 0.2s; outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238892b0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 44px;
}
.form-select:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px var(--violet-glow); }
.form-select option { background: var(--surface); }

.form-msg {
  font-size: 13px; padding: 0; min-height: 20px;
  transition: all 0.2s;
}
.form-msg.error { color: var(--rose); }
.form-msg.success { color: var(--violet); }

/* ═══════════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(16, 17, 26, 0.78);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-3);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-3); color: var(--primary); }

.modal-title { font-size: 22px; margin-bottom: 6px; color: var(--primary); }
.modal-sub { color: var(--text-3); font-size: 14px; margin-bottom: 24px; }

.modal-dialog { width: 100%; max-width: 520px; }
.modal-dialog.wide { max-width: 760px; }
.modal-dialog.narrow { max-width: 400px; }
.modal-dialog.slide-from-right { animation: slideFromRight 0.3s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes slideFromRight { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Auth Tabs */
.auth-modal { width: 100%; max-width: 420px; }
.auth-tabs {
  display: flex; gap: 4px; background: var(--bg-3);
  border-radius: var(--radius-sm); padding: 4px; margin-bottom: 32px;
}
.auth-tab {
  flex: 1; padding: 10px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-3);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.auth-tab.active { background: var(--surface); color: var(--primary); box-shadow: 0 2px 8px rgba(122, 162, 247, 0.2); }

/* Auth Steps */
.auth-panel { display: none; flex-direction: column; gap: 20px; }
.auth-panel.active { display: flex; }
.auth-step { display: none; flex-direction: column; gap: 20px; }
.auth-step.active { display: flex; animation: slideUp 0.25s ease; }

.auth-header { text-align: center; margin-bottom: 4px; }
.auth-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.auth-header h2 { font-size: 24px; margin-bottom: 6px; color: var(--primary); }
.auth-header p { color: var(--text-3); font-size: 14px; }
.auth-header strong { color: var(--secondary); }

/* OTP */
.otp-container { display: flex; gap: 12px; justify-content: center; }
.otp-input {
  width: 62px; height: 72px; text-align: center;
  font-size: 28px; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-2); border: 2px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text-1);
  outline: none; transition: all 0.2s;
}
.otp-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px var(--violet-glow);
  background: var(--surface);
}
.otp-input.filled { border-color: var(--secondary); color: var(--primary); }

.otp-hint {
  background: rgba(115, 218, 202, 0.14); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 12px; color: var(--text-1);
  display: none; text-align: center;
}
.otp-hint.visible { display: block; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.dashboard-body { overflow: hidden; height: 100vh; }

/* Topbar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }

/* Fixed Bottom-Right Developer Attribution */
.bottom-dev-credit {
  position: fixed;
  bottom: 20px;
  right: 24px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  user-select: none;
  line-height: 1.1;
  transition: all 0.25s ease;
  pointer-events: auto;
}

.bottom-dev-credit:hover {
  border-color: var(--secondary);
  box-shadow: 0 6px 24px rgba(122, 162, 247, 0.22);
  transform: translateY(-2px);
}

.dev-line-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
  animation: devDotPulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes devDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.dev-prefix {
  font-family: 'Awesome', 'Great Vibes', cursive, sans-serif;
  font-size: 19px;
  color: var(--text-2);
  letter-spacing: 0.5px;
  margin-right: 6px; /* explicit gap between developed by and the name */
}

.dev-name {
  font-family: 'Awesome', 'Great Vibes', cursive, sans-serif;
  font-size: 21px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.8px;
}
.mobile-nav-toggle {
  display: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 36px; height: 36px;
  align-items: center; justify-content: center;
  color: var(--text-1); font-size: 18px; cursor: pointer;
  transition: all 0.2s;
}
.mobile-nav-toggle:hover { background: rgba(122, 162, 247, 0.08); border-color: var(--secondary); }
.mobile-nav-toggle:active { transform: scale(0.95); }

.sidebar-header-mobile { display: none; }
.sidebar-backdrop { display: none; }
.mobile-drawer-only { display: none !important; }
.mobile-bottom-nav { display: none; }

.sidebar-logo { display: flex; align-items: center; gap: 8px; }
.sidebar-logo .logo-image {
  height: 38px;
  width: auto;
  object-fit: contain;
}
.sidebar-logo .logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; color: var(--primary); }

.topbar-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 14px;
  color: var(--text-2); font-family: 'Inter', sans-serif; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.topbar-btn:hover { color: var(--primary); border-color: var(--glass-border); background: rgba(122, 162, 247, 0.08); }

.gh-btn .gh-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
}

.friends-badge {
  background: var(--secondary); color: white;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 100px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px;
  cursor: pointer; transition: all 0.2s; position: relative;
}
.user-chip:hover { border-color: var(--glass-border); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: white;
}
.user-name { font-size: 13px; font-weight: 600; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.user-chevron { font-size: 11px; color: var(--text-3); }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); overflow: hidden;
  min-width: 160px;
  display: none; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  z-index: 200;
}
.user-dropdown.open { display: flex; animation: fadeIn 0.15s ease; }
.dropdown-item {
  padding: 12px 16px; background: none; border: none;
  color: var(--text-2); font-family: 'Inter', sans-serif; font-size: 14px;
  text-align: left; cursor: pointer; transition: all 0.15s;
}
.dropdown-item:hover { background: rgba(122, 162, 247, 0.1); color: var(--primary); }
.logout-item:hover { color: var(--rose); }

/* Layout */
.app-layout {
  display: flex; height: 100vh;
  padding-top: var(--topbar-h);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: none; border: none; color: var(--text-2);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--surface-2); color: var(--primary); }
.nav-item.active { background: rgba(122, 162, 247, 0.14); color: var(--primary); border: 1px solid rgba(122, 162, 247, 0.28); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* Main Content */
.main-content {
  flex: 1; overflow-y: auto;
  padding: 32px 36px;
  position: relative; z-index: 1;
}

.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.2s ease; }

.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.section-title { font-size: 28px; margin-bottom: 4px; color: var(--primary); }
.section-sub { color: var(--text-3); font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   CIRCLES GRID
   ═══════════════════════════════════════════════════════════════ */

.circles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.circles-loading {
  grid-column: 1/-1; display: flex; align-items: center;
  justify-content: center; gap: 12px; padding: 60px;
  color: var(--text-3); font-size: 14px;
}

.circle-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden;
}
.circle-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--primary));
}
.circle-card:hover {
  border-color: var(--glass-border);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.circle-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.circle-type-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 100px;
}
.badge-vault { background: rgba(122, 162, 247, 0.2); color: var(--primary); }
.badge-btw { background: rgba(187, 154, 247, 0.2); color: var(--secondary); }

.circle-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(8px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.circle-card-icon svg {
  display: block;
  transition: transform 0.25s ease;
}

.circle-card:hover .circle-card-icon {
  transform: scale(1.08);
  box-shadow: 0 4px 18px var(--card-accent, rgba(187, 154, 247, 0.35));
}

.circle-card:hover .circle-card-icon svg {
  transform: scale(1.05);
}

.circle-card-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--primary); }
.circle-card-desc { color: var(--text-3); font-size: 13px; margin-bottom: 18px; line-height: 1.5; }

.circle-card-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.circle-meta { display: flex; gap: 16px; }
.circle-meta-item {
  display: flex; flex-direction: column; gap: 2px;
}
.meta-val { font-size: 16px; font-weight: 700; color: var(--text-1); }
.meta-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }

.circle-invite {
  font-size: 11px; font-family: 'Inter', monospace;
  color: var(--text-3); background: var(--bg-3);
  border-radius: 6px; padding: 4px 8px;
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 60px; color: var(--text-3);
  grid-column: 1/-1;
}
.empty-state span { font-size: 48px; }
.empty-state p { font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════
   HIGHLIGHTS
   ═══════════════════════════════════════════════════════════════ */

.highlights-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.highlight-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  transition: all 0.2s; cursor: pointer;
}
.highlight-item:hover {
  border-color: var(--primary);
  background: rgba(122, 162, 247, 0.08);
  transform: translateX(3px);
}
.hl-rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 30px; padding: 0 8px;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 700;
  background: var(--bg-3); color: var(--text-2);
  border: 1px solid var(--border);
}
.hl-rank-badge.rank-1 {
  background: rgba(224, 175, 104, 0.16);
  color: var(--yellow);
  border-color: rgba(224, 175, 104, 0.4);
  box-shadow: 0 0 10px rgba(224, 175, 104, 0.15);
}
.hl-rank-badge.rank-2 {
  background: rgba(192, 202, 245, 0.14);
  color: var(--text-1);
  border-color: rgba(192, 202, 245, 0.35);
}
.hl-rank-badge.rank-3 {
  background: rgba(255, 158, 100, 0.15);
  color: var(--orange);
  border-color: rgba(255, 158, 100, 0.35);
}
.hl-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hl-info { flex: 1; min-width: 0; }
.hl-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-meta { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-reads {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 48px;
}
.reads-num { font-size: 20px; font-weight: 700; color: var(--highlight); font-family: 'Space Grotesk', sans-serif; }
.reads-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }

.hl-actions {
  display: flex; align-items: center; gap: 6px; margin-left: 8px; flex-shrink: 0;
}
.hl-actions .btn-file-action {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all 0.2s;
}
.hl-actions .btn-file-action:hover {
  background: rgba(122, 162, 247, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}
.hl-actions .btn-file-action svg {
  width: 13px; height: 13px;
}

/* File Extension Badges */
.file-ext-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  padding: 4px 7px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(122, 162, 247, 0.12);
  color: var(--blue);
  border: 1px solid rgba(122, 162, 247, 0.25);
  line-height: 1;
}
.file-ext-badge.ext-pdf {
  background: rgba(247, 118, 142, 0.15);
  color: var(--red);
  border-color: rgba(247, 118, 142, 0.35);
}
.file-ext-badge.ext-doc, .file-ext-badge.ext-docx {
  background: rgba(122, 162, 247, 0.15);
  color: var(--blue);
  border-color: rgba(122, 162, 247, 0.35);
}
.file-ext-badge.ext-xls, .file-ext-badge.ext-xlsx, .file-ext-badge.ext-csv {
  background: rgba(158, 206, 106, 0.15);
  color: var(--green);
  border-color: rgba(158, 206, 106, 0.35);
}
.file-ext-badge.ext-ppt, .file-ext-badge.ext-pptx {
  background: rgba(255, 158, 100, 0.15);
  color: var(--orange);
  border-color: rgba(255, 158, 100, 0.35);
}
.file-ext-badge.ext-png, .file-ext-badge.ext-jpg, .file-ext-badge.ext-jpeg, .file-ext-badge.ext-webp, .file-ext-badge.ext-svg {
  background: rgba(187, 154, 247, 0.15);
  color: var(--purple);
  border-color: rgba(187, 154, 247, 0.35);
}
.file-ext-badge.ext-zip, .file-ext-badge.ext-rar, .file-ext-badge.ext-7z {
  background: rgba(224, 175, 104, 0.15);
  color: var(--yellow);
  border-color: rgba(224, 175, 104, 0.35);
}
.file-ext-badge.ext-txt, .file-ext-badge.ext-md {
  background: rgba(115, 218, 202, 0.15);
  color: var(--cyan);
  border-color: rgba(115, 218, 202, 0.35);
}
.file-ext-badge.ext-mp3, .file-ext-badge.ext-wav {
  background: rgba(125, 207, 255, 0.15);
  color: var(--cyan-light);
  border-color: rgba(125, 207, 255, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   CONVERTER
   ═══════════════════════════════════════════════════════════════ */

.converter-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  max-width: 680px; display: flex; flex-direction: column; gap: 24px;
}

.converter-dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 48px 32px; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.converter-dropzone:hover, .converter-dropzone.drag-over {
  border-color: var(--secondary); background: rgba(187, 154, 247, 0.08);
}
.dropzone-icon { font-size: 40px; margin-bottom: 12px; }
.dropzone-main { display: block; font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.dropzone-sub { display: block; font-size: 12px; color: var(--text-3); }
.file-input-hidden { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.selected-file-info {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.selected-icon { font-size: 28px; }
.selected-details { flex: 1; }
.selected-name { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; word-break: break-all; }
.selected-size { display: block; font-size: 12px; color: var(--text-3); }

.converter-controls {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
}
.convert-arrow { font-size: 28px; color: var(--text-3); padding-bottom: 4px; flex-shrink: 0; }
.format-selector { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }

.converter-progress {
  display: flex; flex-direction: column; gap: 10px;
}
.progress-bar-wrap {
  height: 4px; background: var(--bg-3); border-radius: 100px; overflow: hidden;
}
.progress-bar-inner {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 100px; width: 0%;
  transition: width 0.3s ease;
  animation: progressAnim 1.5s ease-in-out infinite;
}
@keyframes progressAnim {
  0% { width: 15%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 15%; margin-left: 85%; }
}
#converterProgress span { font-size: 13px; color: var(--text-2); text-align: center; }

.supported-formats-grid {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.sf-group { display: flex; flex-direction: column; gap: 8px; }
.sf-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.sf-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-tag {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 10px; font-size: 12px; color: var(--text-2);
  font-family: 'Inter', monospace; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   CIRCLE DETAIL
   ═══════════════════════════════════════════════════════════════ */

.circle-detail-meta { display: flex; gap: 8px; align-items: center; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2);
}
.meta-chip svg {
  display: block; width: 14px; height: 14px; flex-shrink: 0;
}
.invite-chip { cursor: pointer; transition: all 0.2s; font-family: 'Inter', monospace; }
.invite-chip:hover { border-color: var(--highlight); color: var(--primary); }

/* Leave Circle Button */
.btn-leave-circle {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 12px;
  color: var(--rose); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-leave-circle:hover {
  background: rgba(247, 118, 142, 0.15); border-color: var(--rose);
}

/* Upload Button Header */
.vault-header, .btw-header {
  display: flex; justify-content: flex-end; margin-bottom: 16px;
}
.vault-actions, .btw-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}
.btn-upload {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #1a1b26; border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(122, 162, 247, 0.35);
}
.btn-upload:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(122, 162, 247, 0.5); }
.upload-icon { font-size: 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESTRUCTURED LOCKER LAYOUT — DESKTOP & MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Create Locker Buttons */
.btn-create-locker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px dashed var(--border-2);
  color: var(--text-2); border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.25s ease;
}
.btn-create-locker:hover {
  border-color: var(--primary); color: var(--primary);
  background: rgba(122, 162, 247, 0.08);
  transform: translateY(-1px);
}
.locker-icon { font-size: 15px; font-weight: 700; }

/* Locker Shelf Wrapper */
.lockers-shelf-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}
.lockers-shelf-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(122, 162, 247, 0.5), rgba(187, 154, 247, 0.5), transparent);
}

.lockers-shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.lockers-shelf-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lockers-shelf-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(122, 162, 247, 0.12);
  border: 1px solid rgba(122, 162, 247, 0.25);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lockers-shelf-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 3px 0;
  letter-spacing: -0.3px;
}
.lockers-shelf-desc {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 0;
}
.lockers-shelf-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.locker-count-pill {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.btn-shelf-add {
  background: linear-gradient(135deg, rgba(122, 162, 247, 0.18), rgba(187, 154, 247, 0.18));
  border: 1px solid rgba(122, 162, 247, 0.35);
  color: var(--text-1);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}
.btn-shelf-add:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* Lockers Grid (PC) */
.lockers-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* Redesigned Locker Card */
.locker-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}
.locker-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3.5px;
  background: var(--locker-color, var(--primary));
  opacity: 0.9;
}
.locker-card:hover {
  border-color: var(--locker-color, var(--glass-border));
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(122, 162, 247, 0.1);
  background: var(--bg-3);
}
.locker-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
}
.locker-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.locker-card:hover .locker-card-icon {
  transform: scale(1.06);
}
.locker-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.locker-subject-tag {
  background: rgba(187, 154, 247, 0.15);
  border: 1px solid rgba(187, 154, 247, 0.3);
  color: #bb9af7;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.locker-file-count {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.locker-card-body {
  flex: 1;
  margin-bottom: 14px;
}
.locker-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1.35;
  word-break: break-word;
}
.locker-card-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.locker-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: var(--text-3);
}
.locker-card-author {
  color: var(--text-3);
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.locker-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.2s;
}
.locker-card:hover .locker-card-cta {
  color: var(--locker-color, var(--primary));
  transform: translateX(2px);
}

/* Empty State Card */
.locker-card-empty {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.locker-card-empty:hover {
  border-color: var(--primary);
  background: rgba(122, 162, 247, 0.04);
}
.locker-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(122, 162, 247, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.locker-empty-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
}
.locker-empty-text p {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 0;
  max-width: 420px;
}
.btn-empty-create {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-empty-create:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Vault Files Divider */
.vault-files-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 16px;
}
.vault-files-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

/* Locker View Modal Redesign */
.locker-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}
.locker-view-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.locker-view-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.locker-view-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.btn-delete-locker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(247, 118, 142, 0.1);
  border: 1px solid rgba(247, 118, 142, 0.25);
  color: var(--rose);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 600;
}
.btn-delete-locker:hover {
  background: rgba(247, 118, 142, 0.25);
  border-color: var(--rose);
}
.locker-view-stats-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.locker-stats-badge {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.locker-files {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}

/* Vault Files */
.vault-files { display: flex; flex-direction: column; gap: 10px; max-width: 700px; }
.file-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  transition: all 0.2s;
}
.file-row:hover { background: rgba(122, 162, 247, 0.08); border-color: var(--glass-border); }
.file-row-icon { font-size: 22px; }
.file-row-info { flex: 1; min-width: 0; }
.file-row-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-meta { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-actions {
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.btn-file-action {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.btn-file-action:hover {
  background: rgba(122, 162, 247, 0.1);
  border-color: var(--secondary);
  transform: translateY(-1px);
}
.btn-view:hover { border-color: var(--accent); background: rgba(115, 218, 202, 0.12); color: var(--accent); }
.btn-download:hover { border-color: var(--primary); background: rgba(122, 162, 247, 0.12); color: var(--primary); }
.btn-delete-file {
  background: transparent; border: none; font-size: 16px;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
  opacity: 0.6; transition: all 0.2s;
}
.btn-delete-file:hover { opacity: 1; background: rgba(247, 118, 142, 0.15); color: var(--rose); }

/* BTW Room */
.btw-subjects { display: flex; flex-direction: column; gap: 20px; }
.subject-folder {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.subject-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid transparent;
}
.subject-header:hover { background: rgba(122, 162, 247, 0.08); }
.subject-header.open { border-bottom-color: var(--border); }
.subject-icon { font-size: 20px; }
.subject-name { font-size: 16px; font-weight: 700; flex: 1; }
.subject-count { font-size: 12px; color: var(--text-3); }
.subject-toggle { font-size: 12px; color: var(--text-3); transition: transform 0.2s; }
.subject-header.open .subject-toggle { transform: rotate(90deg); }
.subject-files { display: none; flex-direction: column; gap: 1px; }
.subject-files.open { display: flex; }
.subject-file {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; transition: background 0.15s; cursor: pointer;
}
.subject-file:hover { background: rgba(122, 162, 247, 0.08); }
.sf-file-icon { font-size: 16px; }
.sf-file-name { flex: 1; font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.sf-file-meta { font-size: 12px; color: var(--text-3); flex-shrink: 0; white-space: nowrap; }
.subject-file-actions {
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.subject-file-actions .btn-file-action {
  padding: 4px 8px; font-size: 13px;
}
.btn-delete-subject-file {
  background: transparent; border: none; font-size: 14px;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
  opacity: 0.5; transition: all 0.2s; margin-left: 8px;
}
.btn-delete-subject-file:hover { opacity: 1; background: rgba(247, 118, 142, 0.15); color: var(--rose); }

/* ═══════════════════════════════════════════════════════════════
   FRIENDS PANEL
   ═══════════════════════════════════════════════════════════════ */

.add-friend-row { display: flex; gap: 10px; align-items: flex-end; }
.add-friend-row .form-input { flex: 1; }
.friends-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 400px; overflow-y: auto; }
.friend-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2); border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.friend-item:hover {
  background: rgba(122, 162, 247, 0.08);
  border-color: rgba(122, 162, 247, 0.25);
  transform: translateX(2px);
}
.btn-send-pdf-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 100px;
  background: rgba(122, 162, 247, 0.12);
  border: 1px solid rgba(122, 162, 247, 0.3);
  color: var(--primary); font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.btn-send-pdf-pill:hover {
  background: var(--primary);
  color: #1a1b26;
  box-shadow: 0 2px 8px rgba(122, 162, 247, 0.35);
}
.friend-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: white;
}
.friend-info { flex: 1; }
.friend-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.friend-email { font-size: 12px; color: var(--text-3); }

/* Friend Requests */
.friend-requests-section {
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.requests-title {
  font-size: 14px; font-weight: 700; color: var(--text-2);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.requests-badge {
  background: var(--primary); color: white;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 100px; display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
}
.friend-requests-list { display: flex; flex-direction: column; gap: 8px; }
.friend-request-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2); border-radius: var(--radius-sm);
  padding: 12px 14px; border: 1px solid var(--border);
}
.friend-request-info { flex: 1; }
.friend-request-sender { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.friend-request-email { font-size: 12px; color: var(--text-3); }
.friend-request-actions { display: flex; gap: 6px; }
.btn-request-action {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s;
}
.btn-accept {
  background: linear-gradient(135deg, var(--green), #73daca);
  color: #1a1b26;
  font-weight: 700;
}
.btn-accept:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(158, 206, 106, 0.4); }
.btn-decline {
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-3);
}
.btn-decline:hover { background: rgba(247, 118, 142, 0.15); color: var(--rose); border-color: var(--rose); }

.friends-list-title {
  font-size: 13px; font-weight: 600; color: var(--text-3);
  margin-top: 16px; margin-bottom: 8px; text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Friends Section & Cards Grid */
.friends-action-card {
  padding: 18px 20px;
  margin-bottom: 20px;
}
.friends-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.friend-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s ease;
  cursor: pointer;
}
.friend-card:hover {
  border-color: var(--primary);
  background: rgba(122, 162, 247, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.friend-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.friend-card-details {
  flex: 1;
  min-width: 0;
}
.friend-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-card-email {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.friend-card-footer {
  margin-top: 16px;
}
.friend-card-footer .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Modal Wide & Friend Header */
.modal-dialog.wide {
  max-width: 820px;
  width: 95%;
}
.modal-friend-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.friend-avatar.lg {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 16px;
}
.friend-header-info {
  flex: 1;
}

/* Send Personal PDF Grid & Boxes */
.send-pdf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .send-pdf-grid {
    grid-template-columns: 1fr;
  }
}
.send-pdf-upload-box,
.send-pdf-history-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
}

/* PDF Dropzone */
.pdf-dropzone {
  border: 2px dashed rgba(122, 162, 247, 0.35);
  border-radius: var(--radius-sm);
  padding: 24px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(122, 162, 247, 0.03);
}
.pdf-dropzone:hover,
.pdf-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(122, 162, 247, 0.08);
  transform: translateY(-1px);
}
.pdf-drop-icon {
  color: var(--primary);
  margin-bottom: 8px;
}
.pdf-drop-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.pdf-drop-title .highlight-link {
  color: var(--primary);
  text-decoration: underline;
}
.pdf-drop-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

/* PDF Selected File */
.pdf-selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(122, 162, 247, 0.12);
  border: 1px solid rgba(122, 162, 247, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.pdf-badge {
  background: var(--secondary);
  color: #1a1b26;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.pdf-info {
  flex: 1;
  min-width: 0;
}
.pdf-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-size {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}
.btn-remove-pdf {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-remove-pdf:hover {
  color: var(--rose);
}

/* PDF History & Timeline */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.history-count-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: 100px;
}
.direct-shares-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}
.direct-share-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: all 0.2s;
}
.direct-share-item:hover {
  border-color: rgba(122, 162, 247, 0.4);
  background: rgba(122, 162, 247, 0.04);
}
.direct-share-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.direct-share-file-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.direct-share-icon {
  color: var(--secondary);
  margin-top: 2px;
}
.direct-share-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  word-break: break-word;
  line-height: 1.3;
}
.direct-share-sub {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.share-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.share-pill.sent {
  background: rgba(122, 162, 247, 0.2);
  color: var(--primary);
}
.share-pill.received {
  background: rgba(158, 206, 106, 0.2);
  color: var(--green);
}
.direct-share-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.direct-share-note {
  font-size: 11px;
  color: var(--text-2);
  font-style: italic;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   GUIDE HUB MODAL
   ═══════════════════════════════════════════════════════════════ */

.gh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 8px; }
.gh-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.gh-num {
  display: inline-block; font-family: 'Space Grotesk', sans-serif; font-size: 11px;
  font-weight: 700; color: var(--primary);
  background: rgba(122, 162, 247, 0.18); border-radius: 6px; padding: 3px 8px;
  margin-bottom: 12px; letter-spacing: 1px;
}
.gh-item h4 { font-size: 15px; margin-bottom: 8px; color: var(--primary); }
.gh-item p { font-size: 13px; color: var(--text-3); line-height: 1.6; }
.gh-item code {
  background: var(--bg-3); border-radius: 4px;
  padding: 1px 6px; font-size: 12px;
  color: var(--secondary); font-family: 'Inter', monospace;
}

/* ═══════════════════════════════════════════════════════════════
   MINIMALIST MODALS — Create Circle & Create Locker
   ═══════════════════════════════════════════════════════════════ */

/* Shared Minimalist Dialog */
.minimal-modal {
  max-width: 460px;
  width: 100%;
  padding: 32px 30px 28px;
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border);
  position: relative;
  overflow: hidden;
}

/* Minimalist Modal Header */
.minimal-modal-header {
  margin-bottom: 22px;
}

.minimal-modal-header .modal-title {
  font-family: 'Elegant Valentine', 'Awesome', 'Great Vibes', cursive, sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text-1);
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.minimal-modal-header .modal-sub {
  color: var(--text-3);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.45;
}

/* Minimalist Form Body */
.minimal-modal-body {
  display: flex;
  flex-direction: column;
}

/* Minimalist Form Fields with Generous Spacing */
.minimal-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.minimal-field label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-2);
  display: flex;
  align-items: center;
}

.label-muted {
  text-transform: none;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 5px;
  letter-spacing: normal;
}

.minimal-field .form-input,
.minimal-field .form-select {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  outline: none;
}

.minimal-field .form-input:hover,
.minimal-field .form-select:hover {
  border-color: rgba(122, 162, 247, 0.4);
}

.minimal-field .form-input:focus,
.minimal-field .form-select:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.16);
}

/* Sleek Segmented Control for Circle Type */
.type-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
}

.type-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

.type-segment input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.type-segment:hover {
  color: var(--text-1);
  background: rgba(122, 162, 247, 0.08);
}

.type-segment.active {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.type-segment-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex-shrink: 0;
}

.type-segment-text {
  line-height: 1;
}

/* Action Buttons */
.minimal-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.minimal-modal-actions .btn-ghost {
  min-width: 90px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  background: transparent;
  transition: all 0.2s ease;
}

.minimal-modal-actions .btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text-1);
  border-color: var(--border);
}

.minimal-modal-actions .btn-primary {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Home section new circle button */
.home-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demo-codes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: -6px; }
.demo-label { font-size: 12px; color: var(--text-3); }
.demo-code {
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 6px; padding: 4px 10px;
  font-size: 12px; font-family: 'Inter', monospace; color: var(--primary);
  cursor: pointer; transition: all 0.2s;
}
.demo-code:hover { border-color: var(--primary); background: rgba(122, 162, 247, 0.14); }
.code-input { text-transform: uppercase; letter-spacing: 2px; font-family: 'Inter', monospace; font-size: 18px; }

/* ═══════════════════════════════════════════════════════════════
   UPLOAD MODAL
   ═══════════════════════════════════════════════════════════════ */

.upload-dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--secondary); background: rgba(187, 154, 247, 0.08);
}
.upload-dropzone-icon { font-size: 36px; margin-bottom: 10px; }
.upload-dropzone-main { display: block; font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.upload-dropzone-sub { display: block; font-size: 11px; color: var(--text-3); }

.upload-classification { margin-top: 16px; }
.classification-options { display: flex; gap: 10px; margin-bottom: 16px; }
.classification-option {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg-2); border: 2px solid var(--border-2);
  border-radius: var(--radius); padding: 14px 10px; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.classification-option input[type="radio"] { display: none; }
.classification-option.active { border-color: var(--secondary); background: rgba(187, 154, 247, 0.14); box-shadow: 0 4px 12px rgba(187, 154, 247, 0.2); }
.classify-icon { font-size: 22px; }
.classify-name { font-size: 13px; font-weight: 700; }
.classify-desc { font-size: 11px; color: var(--text-3); }

.subject-selector { margin-top: 12px; }

/* ═══════════════════════════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════════════════════════ */

.profile-card {
  display: flex; gap: 28px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; max-width: 560px;
}
.profile-avatar-lg {
  width: 80px; height: 80px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: white;
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 24px; margin-bottom: 4px; color: var(--primary); }
.profile-email { color: var(--text-3); font-size: 14px; margin-bottom: 20px; }
.profile-stats { display: flex; gap: 24px; }
.pstat { display: flex; flex-direction: column; gap: 4px; }
.pstat-val { font-size: 24px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: var(--secondary); }
.pstat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.6px; }

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: 14px; min-width: 240px; max-width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.success { border-color: rgba(158, 206, 106, 0.4); }
.toast.error { border-color: rgba(247, 118, 142, 0.4); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast.fadeout { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(80px); opacity: 0; } }

/* ─── Spinner ─────────────────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border-2);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════ */

/* Tablet & Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  :root {
    --topbar-h: 56px;
    --bottom-nav-h: 58px;
  }

  /* Prevent automatic zoom on iOS Safari */
  .form-input, .form-select, select, input[type="text"], input[type="email"], input[type="password"] {
    font-size: 16px !important;
  }

  /* Body & Layout */
  .dashboard-body {
    height: 100dvh;
    height: 100vh;
    overflow: hidden;
  }
  body.drawer-locked {
    overflow: hidden !important;
    touch-action: none;
  }

  .app-layout {
    height: 100dvh;
    height: 100vh;
    padding-top: var(--topbar-h);
  }

  /* Main scrollable view */
  .main-content {
    padding: 16px 14px calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ─── Topbar Mobile ─────────────────────────────────────────────────── */
  .topbar {
    height: var(--topbar-h);
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-left {
    gap: 8px;
    flex-shrink: 0;
  }
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar-logo .logo-image {
    height: 32px;
    width: auto;
  }
  .sidebar-logo .logo-text {
    font-size: 15px;
  }
  .topbar-right {
    gap: 6px;
  }
  .topbar-btn {
    padding: 6px 9px;
    height: 34px;
    gap: 0;
  }
  .topbar-btn-text {
    display: none !important;
  }
  .gh-btn .gh-icon {
    font-size: 12px;
  }
  .friends-badge {
    margin-left: 2px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    padding: 0 4px;
  }
  .theme-toggle {
    padding: 6px 9px;
    height: 34px;
  }
  .theme-toggle-text {
    display: none !important;
  }
  .user-chip {
    padding: 3px 6px;
    height: 34px;
    gap: 4px;
  }
  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 10px;
    border-radius: 6px;
  }
  .user-name, .user-chevron {
    display: none !important;
  }
  .user-dropdown {
    right: 0;
    min-width: 150px;
    top: calc(100% + 4px);
  }

  /* ─── Sidebar Mobile Off-Canvas Drawer ──────────────────────────────── */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 17, 26, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    display: flex !important;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 84vw;
    height: 100dvh;
    height: 100vh;
    z-index: 200;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 1, 0.23, 1);
    padding: 16px 12px;
    overflow-y: auto;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }

  .sidebar-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-header-mobile .logo-image {
    height: 32px;
  }
  .sidebar-close-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .sidebar-close-btn:hover {
    color: var(--primary);
    background: rgba(122, 162, 247, 0.1);
  }

  .mobile-drawer-only {
    display: flex !important;
  }
  .drawer-badge {
    margin-left: auto;
  }

  /* ─── Mobile Bottom Navigation ──────────────────────────────────────── */
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 99;
  }
  [data-theme="dark"] .mobile-bottom-nav {
    background: rgba(26, 27, 38, 0.95);
    border-top-color: var(--border);
  }
  [data-theme="light"] .mobile-bottom-nav {
    background: rgba(220, 211, 201, 0.95);
    border-top-color: var(--border);
  }
  [data-theme="pink"] .mobile-bottom-nav {
    background: rgba(22, 10, 28, 0.95);
    border-top-color: var(--border);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-3);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    padding: 4px 0;
    gap: 3px;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item:active {
    transform: scale(0.92);
  }
  .bottom-nav-item.active {
    color: var(--primary);
    font-weight: 700;
  }
  [data-theme="dark"] .bottom-nav-item.active {
    color: var(--highlight);
  }
  .bottom-nav-icon {
    font-size: 18px;
    line-height: 1;
  }
  .bottom-nav-label {
    letter-spacing: 0.2px;
    line-height: 1;
  }

  /* Center Elevated Action Button */
  .bottom-nav-action {
    flex: 0 0 46px;
    height: 46px;
    width: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #1a1b26 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--violet-glow);
    margin-top: -14px;
    border: 3px solid var(--bg-2);
    padding: 0;
    transition: all 0.2s;
  }
  .bottom-nav-action:active {
    transform: scale(0.92);
  }
  .bottom-nav-action-icon {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #1a1b26;
  }

  /* ─── Fixed Bottom Developer Attribution Mobile ──────────────────────── */
  .bottom-dev-credit {
    padding: 3px 12px;
    gap: 7px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .dashboard-body .bottom-dev-credit {
    bottom: calc(var(--bottom-nav-h, 60px) + env(safe-area-inset-bottom, 0px) + 10px);
    right: 12px;
  }
  .landing-body .bottom-dev-credit {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    right: 12px;
  }
  .bottom-dev-credit .dev-line-dot {
    width: 6px;
    height: 6px;
  }
  .bottom-dev-credit .dev-prefix {
    font-size: 15px;
    margin-right: 4px;
  }
  .bottom-dev-credit .dev-name {
    font-size: 16px;
  }

  @media (max-width: 420px) {
    .bottom-dev-credit {
      padding: 2px 10px;
      gap: 5px;
    }
    .bottom-dev-credit .dev-prefix {
      font-size: 14px;
      margin-right: 3px;
    }
    .bottom-dev-credit .dev-name {
      font-size: 15px;
    }
  }

  /* ─── Landing Page Mobile ───────────────────────────────────────────── */
  .landing-nav {
    height: 58px;
    padding: 0 14px;
  }
  .landing-nav .logo-image {
    height: 36px;
  }
  .landing-nav .logo-text {
    font-size: 16px;
  }
  .nav-features {
    display: none !important;
  }
  .nav-signin-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: rgba(122, 162, 247, 0.12);
    border: 1px solid var(--border-2);
  }

  .hero {
    padding: 80px 16px 40px;
    min-height: calc(100vh - 58px);
    gap: 16px;
  }
  .hero-title {
    font-size: clamp(28px, 8vw, 42px);
    letter-spacing: -0.8px;
    line-height: 1.15;
  }
  .hero-subtitle {
    font-size: 14.5px;
    line-height: 1.6;
    max-width: 95%;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    gap: 10px;
    margin: 0 auto;
  }
  .hero-cta .btn-primary, .hero-cta .btn-ghost {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    text-align: center;
  }
  .hero-pills {
    gap: 6px;
    margin-top: 4px;
  }
  .pill {
    font-size: 11.5px;
    padding: 5px 10px;
  }

  .features {
    padding: 36px 16px 60px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .feature-card {
    padding: 20px 16px;
    border-radius: var(--radius);
  }
  .feature-icon {
    font-size: 24px;
    margin-bottom: 8px;
  }
  .feature-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
  }
  .feature-card p {
    font-size: 13.5px;
    line-height: 1.5;
  }

  /* ─── Dashboard Sections & Cards ────────────────────────────────────── */
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
  }
  .section-title {
    font-size: 22px;
  }
  .section-sub {
    font-size: 13px;
  }
  #homeCreateBtn {
    align-self: flex-start;
    padding: 9px 16px;
    font-size: 13px;
  }

  /* Circles Grid */
  .circles-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .circle-card {
    padding: 18px 16px;
    border-radius: var(--radius);
  }
  .circle-card-name {
    font-size: 17px;
    margin-bottom: 4px;
  }
  .circle-card-desc {
    font-size: 12.5px;
    margin-bottom: 14px;
  }
  .circle-card-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Circle Detail */
  .circle-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .meta-chip {
    font-size: 11px;
    padding: 4px 10px;
  }
  .btn-back {
    padding: 7px 12px;
    font-size: 12.5px;
  }
  .btn-leave-circle {
    padding: 5px 10px;
    font-size: 11.5px;
    margin-left: auto;
  }

  .vault-header, .btw-header {
    margin-bottom: 12px;
  }
  .vault-actions, .btw-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .btn-upload, .btn-create-locker {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 12.5px;
  }
  .btn-upload span, .btn-create-locker span {
    white-space: nowrap;
  }

  /* Lockers Shelf & Grid Mobile (<= 768px) */
  .lockers-shelf-wrap {
    padding: 16px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }
  .lockers-shelf-header {
    margin-bottom: 14px;
    gap: 10px;
  }
  .lockers-shelf-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .lockers-shelf-title {
    font-size: 15.5px;
  }
  .lockers-shelf-desc {
    font-size: 11.5px;
  }
  .lockers-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  .locker-card {
    padding: 14px 12px;
    min-height: 145px;
    border-radius: var(--radius-sm);
  }
  .locker-card:active {
    transform: scale(0.98);
  }
  .locker-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .locker-card-icon svg {
    width: 15px;
    height: 15px;
  }
  .locker-card-name {
    font-size: 13.5px;
    margin-bottom: 4px;
  }
  .locker-card-desc {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }
  .locker-file-count, .locker-subject-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
  .locker-view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .locker-view-actions {
    width: 100%;
    gap: 8px;
  }
  .locker-view-actions .btn-upload,
  .locker-view-actions .btn-delete-locker {
    flex: 1;
    justify-content: center;
  }

  /* Files list */
  .vault-files {
    gap: 8px;
  }
  .file-row {
    padding: 10px 12px;
    gap: 10px;
    border-radius: var(--radius-sm);
  }
  .file-row-icon {
    font-size: 20px;
  }
  .file-row-name {
    font-size: 13px;
  }
  .file-row-meta {
    font-size: 11px;
  }
  .file-actions {
    gap: 4px;
  }
  .btn-file-action {
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
  }
  .btn-delete-file {
    padding: 4px 6px;
    font-size: 13px;
  }

  /* BTW Room Subject Folder */
  .subject-folder {
    border-radius: var(--radius-sm);
  }
  .subject-header {
    padding: 12px 14px;
    gap: 8px;
  }
  .subject-name {
    font-size: 14px;
  }
  .subject-count {
    font-size: 11px;
  }
  .subject-file {
    padding: 10px 12px;
    gap: 8px;
  }
  .sf-file-name {
    font-size: 13px;
  }
  .sf-file-meta {
    font-size: 11px;
  }
  .subject-file-actions .btn-file-action {
    padding: 5px 7px;
    font-size: 12px;
  }

  /* Home Users Mobile */
  .home-users-section {
    padding: 24px 14px 40px;
  }
  .home-users-inner {
    padding: 22px 16px;
    border-radius: var(--radius-lg);
  }
  .home-users-title {
    font-size: 22px;
  }
  .home-users-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .home-users-search-box {
    width: 100%;
    box-sizing: border-box;
  }
  .home-users-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* ─── Highlights ────────────────────────────────────────────────────── */
  .highlights-list {
    gap: 10px;
  }
  .highlight-item {
    padding: 12px 14px;
    gap: 10px;
    border-radius: var(--radius-sm);
  }
  .hl-rank {
    font-size: 18px;
    min-width: 22px;
  }
  .hl-icon {
    font-size: 22px;
  }
  .hl-name {
    font-size: 13px;
  }
  .hl-meta {
    font-size: 11px;
  }
  .reads-num {
    font-size: 16px;
  }
  .reads-label {
    font-size: 9px;
  }

  /* ─── Converter ─────────────────────────────────────────────────────── */
  .converter-card {
    padding: 18px 14px;
    border-radius: var(--radius);
    gap: 16px;
  }
  .converter-dropzone {
    padding: 26px 14px;
    border-radius: var(--radius-sm);
  }
  .dropzone-icon {
    font-size: 30px;
    margin-bottom: 6px;
  }
  .dropzone-main {
    font-size: 13.5px;
    margin-bottom: 4px;
  }
  .dropzone-sub {
    font-size: 11px;
  }
  .selected-file-info {
    padding: 10px 12px;
    gap: 10px;
  }
  .selected-icon {
    font-size: 22px;
  }
  .selected-name {
    font-size: 13px;
  }
  .selected-size {
    font-size: 11px;
  }
  .converter-controls {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .convert-arrow {
    display: none;
  }
  .format-selector {
    width: 100%;
    min-width: 0;
  }
  #convertBtn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
  .supported-formats-grid {
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }
  .sf-tags {
    gap: 4px;
  }
  .sf-tag {
    padding: 2px 7px;
    font-size: 11px;
  }

  /* ─── Profile ───────────────────────────────────────────────────────── */
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    gap: 16px;
    border-radius: var(--radius);
  }
  .profile-avatar-lg {
    width: 68px;
    height: 68px;
    font-size: 22px;
    border-radius: 16px;
  }
  .profile-info h2 {
    font-size: 20px;
  }
  .profile-email {
    font-size: 13px;
    margin-bottom: 14px;
  }
  .profile-stats {
    justify-content: center;
    gap: 28px;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .pstat-val {
    font-size: 22px;
  }
  .pstat-label {
    font-size: 10px;
  }

  /* ─── Modals Mobile ─────────────────────────────────────────────────── */
  .modal-overlay {
    padding: 12px;
    align-items: center;
    justify-content: center;
  }
  .glass-card {
    padding: 22px 16px;
    border-radius: 18px;
    max-height: calc(100dvh - 24px);
    width: 100%;
  }
  .modal-title {
    font-size: 19px;
  }
  .modal-sub {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  /* Friends panel */
  #friendsModal .modal-dialog.narrow {
    max-width: 100%;
    width: 100%;
  }
  .add-friend-row {
    gap: 8px;
  }
  .add-friend-row .btn-primary {
    padding: 10px 14px;
    font-size: 13px;
  }
  .friends-list {
    max-height: 250px;
  }

  /* Minimal Modals Responsive (< 768px) */
  .minimal-modal {
    max-width: 94%;
    width: 94%;
    padding: 24px 20px 22px;
    border-radius: 18px;
    max-height: 90vh;
  }
  .minimal-modal-header {
    margin-bottom: 18px;
  }
  .minimal-modal-header .modal-title {
    font-size: 20px;
  }
  .minimal-modal-header .modal-sub {
    font-size: 13px;
  }
  .minimal-field {
    margin-bottom: 16px;
    gap: 6px;
  }
  .minimal-field .form-input,
  .minimal-field .form-select {
    height: 42px;
    font-size: 13.5px;
    padding: 9px 12px;
  }
  .type-segmented {
    gap: 5px;
    padding: 3px;
  }
  .type-segment {
    height: 38px;
    font-size: 13px;
    gap: 6px;
  }
  .minimal-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
  }
  .minimal-modal-actions .btn-primary,
  .minimal-modal-actions .btn-ghost {
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-size: 13.5px;
  }

  /* Upload Modal Options */
  .classification-options {
    flex-direction: row;
    gap: 8px;
  }
  .classification-option {
    padding: 10px 6px;
  }
  .classify-icon {
    font-size: 20px;
  }
  .classify-name {
    font-size: 12px;
  }
  .classify-desc {
    font-size: 10px;
  }
  .upload-dropzone {
    padding: 28px 14px;
  }
  .upload-dropzone-icon {
    font-size: 28px;
    margin-bottom: 6px;
  }

  /* Guide Hub Grid */
  .gh-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 55vh;
    overflow-y: auto;
  }
  .gh-item {
    padding: 14px 12px;
  }
  .gh-item h4 {
    font-size: 14px;
  }
  .gh-item p {
    font-size: 12.5px;
  }

  /* Auth modal */
  .auth-modal {
    max-width: 380px;
    padding: 24px 16px;
  }
  .auth-tabs {
    margin-bottom: 20px;
  }
  .auth-header h2 {
    font-size: 20px;
  }
  .auth-header p {
    font-size: 13px;
  }
  .auth-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }
  .otp-container {
    gap: 8px;
  }
  .otp-input {
    width: clamp(42px, 14vw, 56px);
    height: clamp(52px, 16vw, 64px);
    font-size: clamp(20px, 6vw, 24px);
  }

  /* ─── Toast Container Mobile ────────────────────────────────────────── */
  .toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
    left: 12px;
    right: 12px;
    align-items: center;
    z-index: 300;
  }
  .toast {
    min-width: 0;
    width: 100%;
    max-width: 360px;
    font-size: 13px;
    padding: 11px 14px;
    animation: mobileToastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .toast.fadeout {
    animation: mobileToastOut 0.25s ease forwards;
  }
  @keyframes mobileToastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  @keyframes mobileToastOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
  }
}

/* Small Smartphone Screens (<= 400px) */
@media (max-width: 400px) {
  .sidebar-logo .logo-text {
    display: none;
  }
  .lockers-section {
    grid-template-columns: 1fr;
  }
  /* Minimal Modals Small Screen (<= 400px) */
  .minimal-modal {
    padding: 20px 15px 18px;
    border-radius: 16px;
    max-height: 92vh;
  }
  .minimal-modal-header {
    margin-bottom: 14px;
  }
  .minimal-modal-header .modal-title {
    font-size: 18.5px;
  }
  .minimal-modal-header .modal-sub {
    font-size: 12px;
  }
  .minimal-field {
    margin-bottom: 13px;
    gap: 5px;
  }
  .minimal-field .form-input,
  .minimal-field .form-select {
    height: 40px;
    font-size: 13px;
    padding: 8px 11px;
  }
  .type-segment {
    height: 36px;
    font-size: 12.5px;
    gap: 5px;
  }
  .minimal-modal-actions {
    gap: 8px;
  }
  .minimal-modal-actions .btn-primary,
  .minimal-modal-actions .btn-ghost {
    padding: 9px 10px;
    font-size: 13px;
  }
  .classification-options {
    flex-direction: column;
  }
  .vault-actions, .btw-actions {
    grid-template-columns: 1fr;
  }
  .otp-input {
    width: 44px;
    height: 52px;
    font-size: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ACE BOARD (CBSE CLASS 12 2026-2027) STYLES
   ═══════════════════════════════════════════════════════════════ */

.ace-nav-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(122, 162, 247, 0.16);
  color: #7aa2f7;
  border: 1px solid rgba(122, 162, 247, 0.3);
  margin-left: auto;
}

#section-ace-board {
  display: none;
  padding: 24px 28px 60px;
}

#section-ace-board.active {
  display: block;
}

/* Ace Header */
.ace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ace-header-info {
  flex: 1 1 500px;
}

.ace-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ace-pill-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.ace-pill-badge.primary {
  background: rgba(122, 162, 247, 0.16);
  color: #7aa2f7;
  border: 1px solid rgba(122, 162, 247, 0.32);
}

.ace-pill-badge.secondary {
  background: rgba(187, 154, 247, 0.16);
  color: #bb9af7;
  border: 1px solid rgba(187, 154, 247, 0.32);
}

.ace-pill-badge.outline {
  background: rgba(115, 218, 202, 0.12);
  color: #73daca;
  border: 1px solid rgba(115, 218, 202, 0.28);
}

.ace-title {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 8px;
  font-family: 'Elegant Valentine', 'Awesome', 'Great Vibes', cursive, sans-serif;
}

.ace-title .gradient-text {
  background: linear-gradient(135deg, #7aa2f7, #bb9af7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ace-desc {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}

/* Search bar */
.ace-header-search-wrap {
  position: relative;
  flex: 0 1 380px;
  min-width: 280px;
}

.ace-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.ace-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
}

.ace-search-input-box input {
  width: 100%;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 34px 0 38px;
  font-size: 13.5px;
  color: var(--text-1);
  transition: all 0.2s ease;
}

.ace-search-input-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.18);
  background: var(--bg-2);
}

.ace-search-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.ace-search-results-dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  max-height: 360px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: var(--glass-blur);
}

.ace-search-result-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.ace-search-result-item:last-child {
  border-bottom: none;
}

.ace-search-result-item:hover {
  background: var(--surface-2);
}

.ace-sr-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11.5px;
}

.ace-sr-subj {
  font-weight: 700;
  color: var(--subj-accent, var(--primary));
}

.ace-sr-reason {
  color: var(--text-3);
  font-size: 11px;
}

.ace-sr-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.ace-sr-unit {
  font-size: 11.5px;
  color: var(--text-3);
}

.ace-search-no-results,
.ace-search-item-loading {
  padding: 18px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

/* Subject Navigation Pills */
.ace-subject-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.ace-subject-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: 140px;
  position: relative;
}

.ace-subject-pill:hover {
  background: var(--surface-2);
  border-color: var(--subj-accent, var(--border-2));
}

.ace-subject-pill.active {
  background: var(--surface-2);
  border-color: var(--subj-accent, var(--primary));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.ace-subject-pill.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--subj-accent, var(--primary));
  border-radius: 2px;
}

.ace-subj-code {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--subj-accent, var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ace-subj-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.ace-subj-count {
  font-size: 11px;
  color: var(--text-3);
}

/* Subject Banner */
.ace-banner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--subj-accent, var(--primary));
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 22px;
}

.ace-banner-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ace-tag-code {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--subj-accent, var(--primary));
  background: rgba(122, 162, 247, 0.15);
  border-color: rgba(122, 162, 247, 0.4);
  background: color-mix(in srgb, var(--subj-accent, var(--primary)) 15%, transparent);
  border-color: color-mix(in srgb, var(--subj-accent, var(--primary)) 42%, transparent);
}

.ace-tag-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: 4px;
}

.ace-tag-marks {
  font-size: 11px;
  font-weight: 600;
  background: rgba(158, 206, 106, 0.15);
  color: #9ece6a;
  border: 1px solid rgba(158, 206, 106, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.ace-tag-year {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

.ace-banner-title {
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
  font-family: 'Elegant Valentine', 'Awesome', 'Great Vibes', cursive, sans-serif;
}

.ace-banner-desc {
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0 0 16px;
  line-height: 1.5;
}

.ace-banner-units {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.ace-units-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ace-units-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ace-unit-tag {
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-2);
}

.ace-unit-tag strong {
  color: #fff;
}

.ace-unit-tag em {
  font-style: normal;
  color: var(--primary);
}

/* Chapters Grid */
.ace-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.ace-chapter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ace-chapter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--subj-accent, var(--primary));
  opacity: 0.8;
}

.ace-chapter-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  background: var(--surface-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.ace-ch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ace-ch-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(122, 162, 247, 0.12);
  color: var(--subj-accent, var(--primary));
  padding: 2px 7px;
  border-radius: 4px;
}

.ace-ch-weightage {
  font-size: 11.5px;
  font-weight: 600;
  color: #9ece6a;
}

.ace-ch-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.35;
}

.ace-ch-unit {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}

.ace-ch-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
  flex-grow: 1;
}

.ace-kw-pill {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  padding: 2px 7px;
  border-radius: 4px;
}

.ace-ch-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.ace-curriculum-flag {
  font-size: 11px;
  color: var(--text-3);
}

.ace-btn-open-chapter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.ace-btn-open-chapter:hover {
  background: rgba(122, 162, 247, 0.14);
}

/* Chapter Study Reader View */
.ace-reader-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px 40px;
}

.ace-reader-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.ace-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ace-btn-back:hover {
  background: var(--bg-3);
  border-color: var(--primary);
  color: #fff;
}

.ace-reader-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
}

.ace-reader-crumb-subj {
  font-weight: 600;
  color: var(--primary);
}

.ace-reader-crumb-sep {
  opacity: 0.5;
}

.ace-reader-crumb-ch {
  color: var(--text-2);
}

.ace-reader-weightage-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #9ece6a;
  background: rgba(158, 206, 106, 0.12);
  border: 1px solid rgba(158, 206, 106, 0.28);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

.ace-reader-hero {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.ace-reader-heading {
  font-size: 28px;
  font-weight: 400;
  color: #fff;
  margin: 0 0 6px;
  font-family: 'Elegant Valentine', 'Awesome', 'Great Vibes', cursive, sans-serif;
  letter-spacing: 0.5px;
}

.ace-reader-subheading {
  font-size: 14px;
  color: var(--text-2);
}

/* 4 Tab Nav Bar */
.ace-reader-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ace-tab-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.ace-tab-nav-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.03);
}

.ace-tab-nav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(122, 162, 247, 0.08);
}

.ace-tab-label-short {
  display: none;
}

/* Panels Container */
.ace-tab-panels {
  position: relative;
}

.ace-tab-panel {
  display: none;
  animation: aceFadeIn 0.2s ease-in-out;
}

.ace-tab-panel.active {
  display: block;
}

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

/* Common Part Header */
.ace-part-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.ace-part-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ace-part-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(187, 154, 247, 0.16);
  color: #bb9af7;
  border: 1px solid rgba(187, 154, 247, 0.32);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.ace-part-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.ace-part-desc {
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.45;
}

/* Part 1: Layout with Table of Contents (TOC) */
.ace-part1-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  position: relative;
}

.ace-toc-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.ace-toc-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ace-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ace-toc-link {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ace-toc-link:hover {
  background: rgba(122, 162, 247, 0.12);
  color: #fff;
}

.ace-toc-num {
  display: inline-block;
  background: rgba(122, 162, 247, 0.2);
  color: #7aa2f7;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ace-toc-text {
  flex: 1;
}

.ace-part1-content {
  flex: 1;
  min-width: 0;
}

.ace-sec-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(122, 162, 247, 0.18);
  color: #7aa2f7;
  font-size: 13px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .ace-part1-layout {
    flex-direction: column;
    align-items: stretch;
  }
  .ace-toc-sidebar {
    width: 100%;
    position: static;
    max-height: 260px;
  }
}

/* Part 1: Detailed Notes Styling */
.ace-note-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 18px;
}

.ace-section-heading {
  font-size: 17px;
  font-weight: 700;
  color: #7aa2f7;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
}

.ace-section-body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-1);
}

.ace-section-body strong {
  color: #fff;
  font-weight: 600;
}

.ace-section-body em {
  color: #bb9af7;
  font-style: normal;
}

.ace-ul {
  padding-left: 20px;
  margin: 10px 0;
}

.ace-li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.ace-code-block {
  background: #16161e;
  border: 1px solid rgba(122, 162, 247, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #7dcfff;
  margin: 12px 0;
}

.ace-inline-code {
  background: rgba(122, 162, 247, 0.12);
  color: #7dcfff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.ace-math-block {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--primary);
  padding: 10px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'KaTeX_Math', 'Times New Roman', serif;
  font-size: 15px;
  color: #e0af68;
}

.ace-math-inline {
  color: #e0af68;
  font-family: 'KaTeX_Math', 'Times New Roman', serif;
  font-style: italic;
  padding: 0 2px;
}

/* Part 2: Formula Sheet Styling */
.ace-formula-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
}

.ace-formula-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.ace-formula-table th {
  background: var(--bg-2);
  padding: 12px 16px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid var(--border);
}

.ace-formula-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  line-height: 1.5;
}

.ace-formula-table tr:last-child td {
  border-bottom: none;
}

.ace-formula-table tr:hover td {
  background: var(--surface-2);
}

.ace-f-topic {
  color: #fff;
  width: 25%;
}

.ace-f-code code {
  background: rgba(122, 162, 247, 0.12);
  color: #7dcfff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  display: inline-block;
}

.ace-f-note {
  color: var(--text-2);
}

.ace-constants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ace-const-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ace-const-name {
  font-size: 12px;
  color: var(--text-3);
}

.ace-const-val {
  font-size: 14px;
  font-weight: 600;
  color: #73daca;
  font-family: 'JetBrains Mono', monospace;
}

.ace-subheading-wrap h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}

/* Part 3: PYQ Cards */
.ace-pyqs-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ace-pyq-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.ace-pyq-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ace-pyq-index {
  font-size: 11px;
  font-weight: 700;
  background: var(--primary);
  color: #1a1b26;
  padding: 2px 7px;
  border-radius: 4px;
}

.ace-pyq-year {
  font-size: 12px;
  font-weight: 600;
  color: #bb9af7;
  background: rgba(187, 154, 247, 0.12);
  border: 1px solid rgba(187, 154, 247, 0.28);
  padding: 2px 8px;
  border-radius: 4px;
}

.ace-pyq-marks {
  font-size: 11.5px;
  font-weight: 600;
  color: #9ece6a;
}

.ace-pyq-type {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

.ace-pyq-question {
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
  line-height: 1.55;
  margin-bottom: 16px;
}

.ace-pyq-solution-box {
  background: #16161e;
  border: 1px solid rgba(122, 162, 247, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.ace-sol-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #73daca;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ace-sol-content {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-1);
}

.ace-marking-tip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: #e0af68;
}

.ace-marking-tip svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Part 4: Practice Questions & Answer Key */
.ace-practice-questions-box {
  margin-bottom: 28px;
}

.ace-pq-subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #7aa2f7;
  margin-bottom: 14px;
}

.ace-pq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ace-practice-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.ace-pq-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ace-pq-num {
  font-size: 11px;
  font-weight: 700;
  background: rgba(122, 162, 247, 0.16);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: 4px;
}

.ace-pq-type-tag {
  font-size: 11.5px;
  color: var(--text-3);
}

.ace-pq-marks {
  font-size: 11.5px;
  font-weight: 600;
  color: #9ece6a;
  margin-left: auto;
}

.ace-pq-text {
  font-size: 14.5px;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 12px;
}

.ace-mcq-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.ace-mcq-option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-2);
}

.ace-individual-reveal-btn-wrap {
  margin-top: 10px;
}

.ace-btn-single-reveal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ace-btn-single-reveal:hover {
  background: var(--bg-3);
  color: #fff;
  border-color: var(--primary);
}

.ace-btn-single-reveal.revealed {
  background: rgba(122, 162, 247, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

.ace-single-answer-panel {
  margin-top: 10px;
  background: #16161e;
  border-left: 3px solid #73daca;
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
}

.ace-quick-ans {
  color: #fff;
}

.ace-quick-exp {
  font-size: 12.5px;
  color: var(--text-2);
  margin: 6px 0 0;
}

/* Master Answer Key Toggle at End */
.ace-master-answer-key-section {
  background: var(--bg-2);
  border: 1px solid rgba(187, 154, 247, 0.28);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.ace-answer-key-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ace-ak-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #bb9af7;
  margin: 0 0 4px;
}

.ace-ak-subtitle {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 0;
}

.ace-btn-toggle-all-answers {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(187, 154, 247, 0.16);
  border: 1px solid rgba(187, 154, 247, 0.35);
  color: #bb9af7;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ace-btn-toggle-all-answers:hover {
  background: rgba(187, 154, 247, 0.26);
  color: #fff;
}

.ace-btn-toggle-all-answers.open .ace-ak-icon {
  transform: rotate(180deg);
}

.ace-ak-icon {
  transition: transform 0.2s ease;
}

.ace-master-answers-tray {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ace-ans-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.ace-ans-title {
  font-size: 13px;
  font-weight: 700;
  color: #7aa2f7;
  margin-bottom: 4px;
}

.ace-ans-val {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.ace-ans-expl {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Loading & Empty States */
.ace-grid-loading,
.ace-panel-loading,
.ace-loading-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 14px;
}

.ace-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 14px;
}

.ace-error {
  color: var(--red);
  padding: 20px;
  text-align: center;
  font-size: 13.5px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  #section-ace-board {
    padding: 20px 18px 70px;
  }
  .ace-reader-container {
    padding: 18px 18px 30px;
  }
}

@media (max-width: 768px) {
  .ace-header {
    flex-direction: column;
    gap: 16px;
  }
  .ace-header-info {
    flex: 0 0 auto;
    width: 100%;
  }
  .ace-header-search-wrap {
    flex: 0 0 auto;
    width: 100%;
    min-width: 100%;
  }
  .ace-title {
    font-size: 24px;
  }
  .ace-chapters-grid {
    grid-template-columns: 1fr;
  }
  .ace-reader-heading {
    font-size: 22px;
  }

  /* Sticky, touch-friendly pill tab strip for the 4 Parts */
  .ace-reader-nav-tabs {
    position: sticky;
    top: -16px; /* offsets .main-content padding-top so the strip pins flush */
    z-index: 40;
    gap: 6px;
    margin: 0 0 18px;
    padding: 10px 0;
    background: var(--surface);
    box-shadow: 0 14px 20px -16px rgba(0, 0, 0, 0.75);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .ace-reader-nav-tabs::-webkit-scrollbar {
    height: 0;
  }
  .ace-tab-nav-btn {
    padding: 9px 14px;
    min-height: 40px;
    gap: 6px;
    font-size: 12.5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-2);
    color: var(--text-2);
  }
  .ace-tab-nav-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-2);
  }
  .ace-tab-nav-btn.active {
    background: rgba(122, 162, 247, 0.14);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 14px -6px rgba(122, 162, 247, 0.75);
  }
  .ace-tab-label-full {
    display: none;
  }
  .ace-tab-label-short {
    display: inline;
  }
}

@media (max-width: 480px) {
  #section-ace-board {
    padding: 14px 12px 80px;
  }
  .ace-subject-pill {
    min-width: 120px;
    padding: 8px 12px;
  }
  .ace-subj-name {
    font-size: 13px;
  }
  .ace-banner-card {
    padding: 14px 16px;
  }
  .ace-banner-title {
    font-size: 18px;
  }
  .ace-note-section {
    padding: 14px 16px;
  }
  .ace-section-heading {
    font-size: 15px;
  }
  .ace-pyq-card {
    padding: 14px 16px;
  }
  .ace-practice-card {
    padding: 14px 16px;
  }
  .ace-mcq-options {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ACE BOARD CALLOUT BOXES & KATEX MATH STYLING
   ═══════════════════════════════════════════════════════════════ */

.ace-callout {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0;
  border-left: 4px solid;
  position: relative;
}

.ace-callout-hdr {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.ace-callout-cnt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
}

.ace-co-icon {
  font-size: 14px;
}

/* Centum Strategy Callout */
.ace-callout-centum {
  background: rgba(187, 154, 247, 0.09);
  border-left-color: #bb9af7;
  border-top: 1px solid rgba(187, 154, 247, 0.2);
  border-right: 1px solid rgba(187, 154, 247, 0.2);
  border-bottom: 1px solid rgba(187, 154, 247, 0.2);
}
.ace-callout-centum .ace-callout-hdr {
  color: #bb9af7;
}

/* Common Board Trap Callout */
.ace-callout-trap {
  background: rgba(247, 118, 142, 0.09);
  border-left-color: #f7768e;
  border-top: 1px solid rgba(247, 118, 142, 0.2);
  border-right: 1px solid rgba(247, 118, 142, 0.2);
  border-bottom: 1px solid rgba(247, 118, 142, 0.2);
}
.ace-callout-trap .ace-callout-hdr {
  color: #f7768e;
}

/* NCERT Verbatim Definition Callout */
.ace-callout-def {
  background: rgba(122, 162, 247, 0.09);
  border-left-color: #7aa2f7;
  border-top: 1px solid rgba(122, 162, 247, 0.2);
  border-right: 1px solid rgba(122, 162, 247, 0.2);
  border-bottom: 1px solid rgba(122, 162, 247, 0.2);
}
.ace-callout-def .ace-callout-hdr {
  color: #7aa2f7;
}

/* CBSE Mandatory Derivation Callout */
.ace-callout-deriv {
  background: rgba(158, 206, 106, 0.09);
  border-left-color: #9ece6a;
  border-top: 1px solid rgba(158, 206, 106, 0.2);
  border-right: 1px solid rgba(158, 206, 106, 0.2);
  border-bottom: 1px solid rgba(158, 206, 106, 0.2);
}
.ace-callout-deriv .ace-callout-hdr {
  color: #9ece6a;
}

.ace-sub-h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: #73daca;
  margin: 18px 0 8px;
}

.ace-sub-h5 {
  font-size: 14px;
  font-weight: 600;
  color: #c0caf5;
  margin: 14px 0 6px;
}

/* KaTeX Overrides in Dark Tokyo Night */
.katex {
  font-size: 1.08em;
  color: #f0f4fc;
}

.katex-display {
  margin: 14px 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
}

/* ═══════════════════════════════════════════════════════════════
   ACE BOARD — LIGHT THEME (SLEEK, VISIBLE & ELEGANT)
   Neutralizes the hardcoded Tokyo-Night palette so every Ace Board
   surface reads cleanly on the warm Quill Grey light canvas.
   ═══════════════════════════════════════════════════════════════ */

/* Subject accents: --sa (dark) / --sa-l (light) → --subj-accent */
.ace-subject-pill,
.ace-banner-card,
.ace-chapter-card,
.ace-sr-subj {
  --subj-accent: var(--sa, var(--primary));
}

[data-theme="light"] .ace-subject-pill,
[data-theme="light"] .ace-banner-card,
[data-theme="light"] .ace-chapter-card,
[data-theme="light"] .ace-sr-subj {
  --subj-accent: var(--sa-l, var(--sa, var(--primary)));
}

/* Readable light-mode accent set for Ace Board */
[data-theme="light"] #section-ace-board {
  --ace-ink:    #14282A;  /* headings — replaces pure #fff */
  --ace-blue:   #1F6F6B;  /* deep teal — replaces #7aa2f7 */
  --ace-violet: #6B4FA8;  /* royal violet — replaces #bb9af7 */
  --ace-cyan:   #0E6E7A;  /* teal cyan — replaces #73daca / #7dcfff */
  --ace-green:  #1E7A3A;  /* deep green — replaces #9ece6a */
  --ace-amber:  #8A5A00;  /* dark amber — replaces #e0af68 */
  --ace-red:    #C0392B;  /* trap red — replaces #f7768e */
  --ace-paper:  #FBF8F2;  /* bright reading paper */
  --ace-panel:  rgba(255, 255, 255, 0.55); /* frosted inner card */
}

/* ─── Typography: white text → deep ink ─────────────────────────── */
[data-theme="light"] .ace-title,
[data-theme="light"] .ace-banner-title,
[data-theme="light"] .ace-sr-title,
[data-theme="light"] .ace-subj-name,
[data-theme="light"] .ace-ch-title,
[data-theme="light"] .ace-reader-heading,
[data-theme="light"] .ace-part-title,
[data-theme="light"] .ace-section-body strong,
[data-theme="light"] .ace-formula-table th,
[data-theme="light"] .ace-f-topic,
[data-theme="light"] .ace-subheading-wrap h4,
[data-theme="light"] .ace-pyq-question,
[data-theme="light"] .ace-pq-text,
[data-theme="light"] .ace-quick-ans,
[data-theme="light"] .ace-ans-val,
[data-theme="light"] .ace-unit-tag strong {
  color: var(--ace-ink);
}

[data-theme="light"] .ace-title .gradient-text {
  background: linear-gradient(135deg, #1F6F6B, #6B4FA8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Accent text: washed pastels → deep, high-contrast tones ───── */
[data-theme="light"] .ace-pill-badge.primary {
  background: rgba(31, 111, 107, 0.10);
  color: #1F6F6B;
  border-color: rgba(31, 111, 107, 0.30);
}

[data-theme="light"] .ace-pill-badge.secondary {
  background: rgba(107, 79, 168, 0.10);
  color: #6B4FA8;
  border-color: rgba(107, 79, 168, 0.30);
}

[data-theme="light"] .ace-pill-badge.outline {
  background: rgba(14, 110, 122, 0.08);
  color: #0E6E7A;
  border-color: rgba(14, 110, 122, 0.26);
}

[data-theme="light"] .ace-nav-badge {
  background: rgba(31, 111, 107, 0.10);
  color: #1F6F6B;
  border-color: rgba(31, 111, 107, 0.30);
}

[data-theme="light"] .ace-section-heading,
[data-theme="light"] .ace-pq-subhead,
[data-theme="light"] .ace-ans-title {
  color: var(--ace-blue);
}

[data-theme="light"] .ace-toc-num,
[data-theme="light"] .ace-sec-idx,
[data-theme="light"] .ace-pq-num {
  background: rgba(31, 111, 107, 0.14);
  color: var(--ace-blue);
}

[data-theme="light"] .ace-ch-badge {
  background: rgba(57, 95, 96, 0.07);
}

[data-theme="light"] .ace-section-body em {
  color: var(--ace-violet);
}

[data-theme="light"] .ace-part-badge,
[data-theme="light"] .ace-pyq-year,
[data-theme="light"] .ace-btn-toggle-all-answers {
  background: rgba(107, 79, 168, 0.10);
  border-color: rgba(107, 79, 168, 0.30);
  color: #6B4FA8;
}

[data-theme="light"] .ace-ak-title {
  color: #57408C;
}

[data-theme="light"] .ace-btn-toggle-all-answers:hover {
  background: rgba(107, 79, 168, 0.18);
  color: #57408C;
}

[data-theme="light"] .ace-ch-weightage,
[data-theme="light"] .ace-pyq-marks,
[data-theme="light"] .ace-pq-marks,
[data-theme="light"] .ace-reader-weightage-tag,
[data-theme="light"] .ace-tag-marks {
  color: var(--ace-green);
}

[data-theme="light"] .ace-reader-weightage-tag,
[data-theme="light"] .ace-tag-marks {
  background: rgba(30, 122, 58, 0.10);
  border-color: rgba(30, 122, 58, 0.28);
}

[data-theme="light"] .ace-inline-code,
[data-theme="light"] .ace-f-code code,
[data-theme="light"] .ace-code-block,
[data-theme="light"] .ace-const-val,
[data-theme="light"] .ace-sol-badge,
[data-theme="light"] .ace-sub-h4 {
  color: var(--ace-cyan);
}

[data-theme="light"] .ace-inline-code,
[data-theme="light"] .ace-f-code code {
  background: rgba(14, 110, 122, 0.10);
}

[data-theme="light"] .ace-math-block,
[data-theme="light"] .ace-math-inline,
[data-theme="light"] .ace-marking-tip {
  color: var(--ace-amber);
}

[data-theme="light"] .ace-sub-h5 {
  color: var(--text-1);
}

/* ─── Code & solution panels: dark slabs → soft paper washes ────── */
[data-theme="light"] .ace-code-block {
  background: #F2EEE6;
  border-color: rgba(31, 111, 107, 0.25);
}

[data-theme="light"] .ace-math-block {
  background: rgba(138, 90, 0, 0.07);
  border-left-color: var(--ace-amber);
}

[data-theme="light"] .ace-pyq-solution-box {
  background: rgba(31, 111, 107, 0.055);
  border-color: rgba(31, 111, 107, 0.22);
}

[data-theme="light"] .ace-single-answer-panel {
  background: rgba(14, 110, 122, 0.07);
  border-left-color: var(--ace-cyan);
}

[data-theme="light"] .ace-pyq-index {
  background: var(--primary);
  color: #ffffff;
}

[data-theme="light"] .ace-marking-tip {
  border-top-color: rgba(138, 90, 0, 0.20);
}

/* ─── Cards & surfaces: elevate on warm paper ───────────────────── */
[data-theme="light"] .ace-reader-container {
  background: var(--ace-paper);
  border-color: rgba(57, 95, 96, 0.18);
  box-shadow: 0 24px 60px -40px rgba(25, 46, 47, 0.55);
}

[data-theme="light"] .ace-banner-card,
[data-theme="light"] .ace-subject-pill,
[data-theme="light"] .ace-chapter-card {
  background: var(--ace-paper);
  border-color: rgba(57, 95, 96, 0.16);
}

[data-theme="light"] .ace-banner-card {
  box-shadow: 0 14px 34px -28px rgba(25, 46, 47, 0.50);
}

[data-theme="light"] .ace-chapter-card:hover {
  background: #FFFDF8;
  border-color: rgba(57, 95, 96, 0.30);
}

[data-theme="light"] .ace-subject-pill:hover {
  background: #F5F1E8;
}

[data-theme="light"] .ace-reader-nav-tabs {
  background: var(--ace-paper);
  box-shadow: 0 14px 20px -16px rgba(25, 46, 47, 0.45);
}

[data-theme="light"] .ace-note-section,
[data-theme="light"] .ace-toc-sidebar,
[data-theme="light"] .ace-pyq-card,
[data-theme="light"] .ace-practice-card,
[data-theme="light"] .ace-const-card,
[data-theme="light"] .ace-master-answer-key-section {
  background: var(--ace-panel);
  border-color: rgba(57, 95, 96, 0.14);
}

[data-theme="light"] .ace-master-answer-key-section {
  border-color: rgba(107, 79, 168, 0.28);
}

[data-theme="light"] .ace-ans-card {
  background: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .ace-chapter-card {
  box-shadow: 0 8px 22px -20px rgba(25, 46, 47, 0.45);
}

[data-theme="light"] .ace-chapter-card:hover {
  box-shadow: 0 16px 32px -20px rgba(25, 46, 47, 0.45);
}

[data-theme="light"] .ace-subject-pill.active {
  box-shadow: 0 8px 20px -12px rgba(25, 46, 47, 0.35);
}

[data-theme="light"] .ace-search-input-box input {
  background: var(--ace-paper);
}

[data-theme="light"] .ace-search-input-box input:focus {
  box-shadow: 0 0 0 3px rgba(57, 95, 96, 0.18);
}

[data-theme="light"] .ace-search-results-dropdown {
  background: var(--ace-paper);
  box-shadow: 0 24px 50px -28px rgba(25, 46, 47, 0.40);
}

[data-theme="light"] .ace-formula-table th {
  background: rgba(31, 111, 107, 0.06);
}

[data-theme="light"] .ace-formula-table td {
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .ace-formula-table tr:hover td {
  background: rgba(57, 95, 96, 0.06);
}

[data-theme="light"] .ace-toc-title {
  border-bottom-color: rgba(57, 95, 96, 0.14);
}

[data-theme="light"] .ace-kw-pill {
  background: rgba(57, 95, 96, 0.05);
  border-color: rgba(57, 95, 96, 0.14);
  color: var(--text-2);
}

[data-theme="light"] .ace-tag-badge {
  background: rgba(57, 95, 96, 0.07);
  color: var(--text-2);
}

/* ─── Hover & tab states ────────────────────────────────────────── */
[data-theme="light"] .ace-tab-nav-btn {
  color: var(--text-2);
}

[data-theme="light"] .ace-tab-nav-btn:hover {
  background: rgba(57, 95, 96, 0.06);
  color: var(--text-1);
}

[data-theme="light"] .ace-tab-nav-btn.active {
  background: rgba(31, 111, 107, 0.12);
  color: var(--primary);
  box-shadow: 0 4px 14px -6px rgba(31, 111, 107, 0.50);
}

[data-theme="light"] .ace-btn-back:hover,
[data-theme="light"] .ace-toc-link:hover,
[data-theme="light"] .ace-btn-single-reveal:hover {
  color: var(--ace-blue);
}

[data-theme="light"] .ace-btn-open-chapter:hover {
  background: rgba(31, 111, 107, 0.10);
}

/* ─── Callout boxes: neon tints → refined editorial washes ──────── */
[data-theme="light"] .ace-callout-centum {
  background: rgba(107, 79, 168, 0.07);
  border-color: rgba(107, 79, 168, 0.24);
  border-left-color: #6B4FA8;
}
[data-theme="light"] .ace-callout-centum .ace-callout-hdr {
  color: #57408C;
}

[data-theme="light"] .ace-callout-trap {
  background: rgba(192, 57, 43, 0.07);
  border-color: rgba(192, 57, 43, 0.24);
  border-left-color: #C0392B;
}
[data-theme="light"] .ace-callout-trap .ace-callout-hdr {
  color: #A82F26;
}

[data-theme="light"] .ace-callout-def {
  background: rgba(31, 111, 107, 0.07);
  border-color: rgba(31, 111, 107, 0.24);
  border-left-color: #1F6F6B;
}
[data-theme="light"] .ace-callout-def .ace-callout-hdr {
  color: #1A5E5B;
}

[data-theme="light"] .ace-callout-deriv {
  background: rgba(30, 122, 58, 0.08);
  border-color: rgba(30, 122, 58, 0.24);
  border-left-color: #1E7A3A;
}
[data-theme="light"] .ace-callout-deriv .ace-callout-hdr {
  color: #186331;
}

/* ─── KaTeX math in light mode ──────────────────────────────────── */
[data-theme="light"] .katex {
  color: var(--text-1);
}
