/* ========================================================
   EduCore - Modern Responsive CSS Design System
   Zero build tool required - Pure CSS with variables
   ======================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --secondary: #0ea5e9;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-alt: #f1f5f9;
  
  /* Glassmorphism Design Tokens */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-hover: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-subtle: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
  --glass-blur: blur(16px);
  --glass-navbar-bg: rgba(255, 255, 255, 0.82);
  --glass-dropdown-bg: rgba(255, 255, 255, 0.94);
  
  --text-main: #0f172a;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-color: #e2e8f0;
  --border-focus: #818cf8;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================= Containers & Layout ================= */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 760px;
}

.container-wide {
  max-width: 1440px;
}

main.main-content {
  flex: 1 0 auto;
}

/* ================= Navigation Bar & Top Progress Bar ================= */
.nav-scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #059669 0%, #10b981 35%, #0d9488 70%, #d97706 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  z-index: 1002;
  transition: width 0.1s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.navbar {
  background: var(--glass-navbar-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-bottom-color: rgba(5, 150, 105, 0.25);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled .nav-container {
  height: 62px;
}

/* ================= Brand Logo & Presentation ================= */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.nav-brand:hover {
  transform: translateY(-1px);
}

.brand-logo-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.16), rgba(13, 148, 136, 0.16));
  border: 1px solid rgba(5, 150, 105, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.nav-brand:hover .brand-logo-wrapper {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.35);
}

.brand-logo-icon {
  font-size: 1.55rem;
  animation: logoBreathe 3.5s ease-in-out infinite;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

@keyframes logoBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.brand-logo-aura {
  position: absolute;
  inset: -3px;
  border-radius: 15px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-brand:hover .brand-logo-aura {
  opacity: 1;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-main-title {
  font-weight: 900;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #0d9488 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
  transition: background-position 0.6s ease;
}

.nav-brand:hover .brand-main-title {
  background-position: right center;
}

.brand-badge-pill {
  font-size: 0.58rem;
  color: #d97706;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ================= Desktop Navigation Menu ================= */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-color);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 999px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
  left: 20%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(5, 150, 105, 0.08);
}

/* Pro Pass Shimmering CTA Link */
.nav-link-pro {
  position: relative;
  overflow: hidden;
  color: #059669 !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(217, 119, 6, 0.12));
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: 999px !important;
  padding: 0.45rem 0.95rem !important;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-link-pro::after {
  display: none !important;
}

.nav-link-pro:hover {
  background: linear-gradient(135deg, #059669, #0d9488) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

.nav-link-pro::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  animation: proShimmer 4s infinite ease-in-out;
}

@keyframes proShimmer {
  0%, 70% { left: -100%; }
  100% { left: 160%; }
}

.nav-link-app {
  color: #047857 !important;
  font-weight: 700 !important;
}

/* ================= Streamlined Nav Dropdowns ================= */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-color);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-toggle:hover,
.nav-dropdown.active .nav-dropdown-toggle,
.nav-dropdown:hover .nav-dropdown-toggle {
  color: #059669;
  background: rgba(5, 150, 105, 0.08);
}

.nav-dropdown-arrow {
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  line-height: 1;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.active .nav-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.nav-pill-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.15);
  color: #059669;
  letter-spacing: 0.3px;
  line-height: 1;
  text-transform: uppercase;
}

.nav-pill-badge.hot {
  background: rgba(220, 38, 38, 0.14);
  color: #dc2626;
  animation: hotBadgePulse 2s infinite ease-in-out;
}

@keyframes hotBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0); }
}

.nav-pill-badge.live {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-pill-badge.live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
  animation: liveDotPulse 1.2s infinite;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

/* Dropdown Menu Box */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  background: var(--glass-dropdown-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  padding: 0.6rem;
  display: none;
  z-index: 1000;
  transform-origin: top left;
}

/* Invisible hover bridge */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown-menu.show {
  display: block;
  animation: menuDropSpring 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menuDropSpring {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(4px) scale(1);
  }
}

/* ================= Presentable Mega-Menu Dropdowns ================= */
.nav-dropdown-menu.nav-dropdown-mega {
  min-width: 620px;
  max-width: 92vw;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.nav-dropdown:hover .nav-dropdown-menu.nav-dropdown-mega,
.nav-dropdown:focus-within .nav-dropdown-menu.nav-dropdown-mega,
.nav-dropdown-menu.nav-dropdown-mega.show {
  display: grid !important;
  animation: menuDropSpring 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-mega-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-mega-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-mega-bottom-banner {
  grid-column: 1 / -1;
  margin-top: 0.45rem;
  padding: 0.65rem 0.95rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(5,150,105,0.08) 0%, rgba(13,148,136,0.04) 100%);
  border: 1px solid rgba(5,150,105,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.nav-dropdown-header-tag {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.4rem 0.75rem 0.25rem;
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-dropdown-item:hover {
  background: rgba(5, 150, 105, 0.08);
  transform: translateX(4px);
}

.nav-dropdown-item:hover .nav-dropdown-item-title {
  color: #059669;
}

.nav-dropdown-item:hover .nav-dropdown-icon {
  transform: scale(1.18) rotate(4deg);
}

.nav-dropdown-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-top: 2px;
}

.nav-dropdown-item-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
  transition: color 0.15s ease;
}

.nav-dropdown-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
  margin-top: 2px;
  line-height: 1.3;
}

/* ================= Header Actions & Quick Search ================= */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.live-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.live-search-icon {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
  font-size: 0.85rem;
  opacity: 0.65;
}

.live-search-input {
  width: 170px;
  padding: 0.45rem 2.6rem 0.45rem 2.1rem;
  font-size: 0.85rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.live-search-input:focus {
  width: 250px;
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

.search-kbd-hint {
  position: absolute;
  right: 8px;
  padding: 0.15rem 0.35rem;
  font-size: 0.62rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  pointer-events: none;
  transition: opacity 0.2s ease;
  line-height: 1.2;
}

.live-search-input:focus + .search-kbd-hint {
  opacity: 0;
}

/* Theme Switcher 360 Spin */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: rotate(30deg) scale(1.08);
  background: var(--bg-hover);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.25);
}

.theme-toggle-btn.spinning {
  animation: themeSpin 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes themeSpin {
  0% { transform: rotate(0deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Notification Bell Animation */
.notif-bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  color: var(--text-color);
  position: relative;
  transition: all 0.2s ease;
}

.notif-bell-btn:hover {
  background: var(--bg-hover);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.2);
}

.notif-bell-btn:hover .notif-bell-icon {
  animation: bellJiggle 0.6s ease;
}

@keyframes bellJiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(8deg); }
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: notifPulse 2.5s infinite;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Animated Morphing Mobile Hamburger */
.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-toggle-btn:hover {
  background: var(--bg-hover);
}

.mobile-toggle-btn .hamburger-bar {
  width: 20px;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 999px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, width 0.2s ease;
}

.mobile-toggle-btn.is-active .bar-1 {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle-btn.is-active .bar-2 {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle-btn.is-active .bar-3 {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 992px) {
  .mobile-toggle-btn {
    display: flex;
  }
  .nav-menu {
    display: none;
  }
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.role-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.role-admin { background: #fee2e2; color: #b91c1c; }
.role-instructor { background: #fef3c7; color: #b45309; }
.role-student { background: #dbeafe; color: #1d4ed8; }

.mobile-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.25;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff !important;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-main) !important;
}
.btn-secondary:hover {
  background-color: var(--bg-alt);
  border-color: var(--border-focus);
}

.btn-success {
  background-color: var(--success);
  color: #fff !important;
}
.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--danger);
  color: #fff !important;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ================= Alerts & Notifications ================= */
.alert-container {
  margin-top: 1.25rem;
}
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.alert-success {
  background-color: var(--success-light);
  border-color: #a7f3d0;
  color: #065f46;
}
.alert-error, .alert-danger {
  background-color: var(--danger-light);
  border-color: #fecaca;
  color: #991b1b;
}
.alert-info {
  background-color: var(--primary-light);
  border-color: #c7d2fe;
  color: #3730a3;
}
.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* ================= Cards ================= */
.card, .glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover, .glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px 0 rgba(31, 38, 135, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body {
  padding: 1.5rem;
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ================= Forms ================= */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ================= Badges ================= */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-neutral { background: var(--bg-alt); color: var(--text-muted); }

/* ================= Hero Section ================= */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
}
.hero-content {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero-tag {
  display: inline-block;
  background: #e0e7ff;
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -1.5px;
  color: #1e1b4b;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  line-height: 1.6;
}
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ================= Grids ================= */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Course Card */
.course-card {
  display: flex;
  flex-direction: column;
}
.course-thumbnail {
  aspect-ratio: 16 / 9;
  background: linear-gradient(45deg, #1e1b4b, #312e81);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.course-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-thumbnail-placeholder {
  font-size: 3rem;
}
.course-level-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}
.course-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.course-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.course-instructor {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.course-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.course-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}
.course-rating {
  font-size: 0.875rem;
  color: #f59e0b;
  font-weight: 700;
}

/* ================= Classroom Player ================= */
.classroom-wrapper {
  display: flex;
  height: calc(100vh - 70px);
  overflow: hidden;
  background: #0f172a;
}
.classroom-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0f172a;
  color: #f8fafc;
}
.player-container {
  aspect-ratio: 16 / 9;
  max-height: 60vh;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-container iframe, .player-container video {
  width: 100%;
  height: 100%;
  border: none;
}
.lesson-content-body {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  color: #cbd5e1;
}
.lesson-content-body h1, .lesson-content-body h2, .lesson-content-body h3 {
  color: #f8fafc;
  margin-bottom: 1rem;
}
.lesson-content-body pre {
  background: #1e293b;
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1rem 0;
  color: #38bdf8;
}

.classroom-sidebar {
  width: 380px;
  background: #1e293b;
  border-left: 1px solid #334155;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.classroom-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid #334155;
}
.curriculum-module-title {
  padding: 0.75rem 1.25rem;
  background: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lesson-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #334155;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.lesson-item:hover {
  background: #334155;
  color: #fff;
}
.lesson-item.active {
  background: rgba(79, 70, 229, 0.25);
  border-left: 4px solid var(--primary);
  color: #818cf8;
  font-weight: 600;
}
.lesson-check {
  font-size: 1.1rem;
  color: #64748b;
}
.lesson-check.completed {
  color: var(--success);
}

/* ================= Admin & Dashboard Layout ================= */
.dashboard-wrapper {
  display: flex;
  min-height: calc(100vh - 70px);
}
.sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.dashboard-content {
  flex: 1;
  padding: 2rem;
  background: var(--bg-main);
  overflow-y: auto;
}

/* ================= Tables ================= */
.table-responsive {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th, .table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.table tr:hover td {
  background: #f8fafc;
}

/* ================= Progress Bar ================= */
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background-color: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ================= Refined Presentable Footer ================= */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  position: relative;
  padding: 4rem 0 2.25rem;
  margin-top: auto;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.4), rgba(217, 119, 6, 0.35), transparent);
}

.footer-col-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link-item a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.12rem 0;
}

.footer-link-item a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.35rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
  margin-top: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= Responsive Queries ================= */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .classroom-wrapper { flex-direction: column; height: auto; }
  .classroom-sidebar { width: 100%; height: 400px; }
  .dashboard-wrapper { flex-direction: column; }
  .sidebar {
    display: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  h1 { font-size: 1.85rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .mobile-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { display: flex; }
}


/* =========================================================
   Test Series Exam Engine & Quick Notes 3D Flashcard System
   ========================================================= */

.exam-timer {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.palette-btn {
  user-select: none;
  -webkit-user-select: none;
}

/* 3D Flashcard flip transition */
.flashcard-scene {
  perspective: 1200px;
}

.flashcard-flipper {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard-flipper.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flashcard-back {
  transform: rotateY(180deg);
}

/* Bookmark animation */
.bookmark-btn {
  transition: transform 0.15s ease;
}
.bookmark-btn:hover {
  transform: scale(1.2);
}


/* =========================================================
   Universal Glassmorphism & Dark / Light Theme System
   ========================================================= */

:root[data-theme="dark"],
html[data-theme="dark"],
html.dark-mode,
body.dark-mode {
  --bg-main: #0b0f19;
  --bg-body: #0b0f19;
  --bg-surface: #131b2e;
  --bg-card: #131b2e;
  --bg-alt: #1a233a;
  --bg-hover: #1e2945;
  --glass-bg: rgba(19, 27, 46, 0.78);
  --glass-bg-hover: rgba(26, 35, 58, 0.9);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-subtle: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --glass-blur: blur(20px);
  --glass-navbar-bg: rgba(11, 15, 25, 0.88);
  --glass-dropdown-bg: rgba(19, 27, 46, 0.96);
  --border: #1e293b;
  --border-color: #27354f;
  --text-main: #f1f5f9;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  color-scheme: dark;
}

/* ========================================================
   ULTRA-LOW LUMINANCE NIGHT-READING MODES (Hospital Duty)
   Amber OLED (#fbbf24 on #000000) & Red OLED (#f87171 on #000000)
   Specifically tuned for dark-room hospital duty study sessions
   without melatonin disruption or glare.
   ======================================================== */
:root[data-theme="amber-oled"],
html[data-theme="amber-oled"] {
  --bg-main: #000000;
  --bg-body: #000000;
  --bg-surface: #0a0800;
  --bg-card: #0a0800;
  --bg-alt: #140f00;
  --bg-hover: #1f1700;
  --glass-bg: rgba(10, 8, 0, 0.95);
  --glass-bg-hover: rgba(22, 17, 0, 0.98);
  --glass-border: rgba(245, 158, 11, 0.28);
  --glass-border-subtle: rgba(245, 158, 11, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9);
  --glass-blur: blur(10px);
  --glass-navbar-bg: rgba(0, 0, 0, 0.98);
  --glass-dropdown-bg: rgba(10, 8, 0, 0.98);
  --border: #291d00;
  --border-color: #3b2a00;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --text-main: #fde68a;
  --text-color: #fde68a;
  --text-muted: #b45309;
  --text-light: #92400e;
  color-scheme: dark;
}

:root[data-theme="red-oled"],
html[data-theme="red-oled"] {
  --bg-main: #000000;
  --bg-body: #000000;
  --bg-surface: #0a0000;
  --bg-card: #0a0000;
  --bg-alt: #160202;
  --bg-hover: #240202;
  --glass-bg: rgba(10, 0, 0, 0.95);
  --glass-bg-hover: rgba(24, 0, 0, 0.98);
  --glass-border: rgba(239, 68, 68, 0.28);
  --glass-border-subtle: rgba(239, 68, 68, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9);
  --glass-blur: blur(10px);
  --glass-navbar-bg: rgba(0, 0, 0, 0.98);
  --glass-dropdown-bg: rgba(10, 0, 0, 0.98);
  --border: #280000;
  --border-color: #3d0505;
  --primary: #ef4444;
  --primary-hover: #dc2626;
  --text-main: #fecaca;
  --text-color: #fecaca;
  --text-muted: #b91c1c;
  --text-light: #991b1b;
  color-scheme: dark;
}

html[data-theme="amber-oled"] body,
html[data-theme="red-oled"] body {
  background-color: #000000 !important;
  background-image: none !important;
  color: var(--text-color) !important;
}

html[data-theme="amber-oled"] .card,
html[data-theme="amber-oled"] .glass-card,
html[data-theme="amber-oled"] .sidebar,
html[data-theme="amber-oled"] .navbar,
html[data-theme="amber-oled"] .mobile-bottom-nav,
html[data-theme="amber-oled"] .mobile-drawer,
html[data-theme="red-oled"] .card,
html[data-theme="red-oled"] .glass-card,
html[data-theme="red-oled"] .sidebar,
html[data-theme="red-oled"] .navbar,
html[data-theme="red-oled"] .mobile-bottom-nav,
html[data-theme="red-oled"] .mobile-drawer {
  background: var(--bg-card) !important;
  color: var(--text-color) !important;
  border-color: var(--glass-border) !important;
}

html[data-theme="amber-oled"] .nav-dropdown-menu,
html[data-theme="amber-oled"] .user-dropdown-menu,
html[data-theme="amber-oled"] .drawer-group,
html[data-theme="red-oled"] .nav-dropdown-menu,
html[data-theme="red-oled"] .user-dropdown-menu,
html[data-theme="red-oled"] .drawer-group {
  background: var(--bg-card) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-color) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="amber-oled"] .nav-dropdown-item:hover,
html[data-theme="amber-oled"] .drawer-link:hover,
html[data-theme="amber-oled"] .drawer-group-toggle:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

html[data-theme="red-oled"] .nav-dropdown-item:hover,
html[data-theme="red-oled"] .drawer-link:hover,
html[data-theme="red-oled"] .drawer-group-toggle:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

body.dark-mode,
html[data-theme="dark"] body {
  background-color: var(--bg-main) !important;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(5, 150, 105, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(14, 165, 233, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 50%) !important;
  background-attachment: fixed;
  color: var(--text-color) !important;
}

body.dark-mode .card,
html[data-theme="dark"] .card,
body.dark-mode .glass-card,
html[data-theme="dark"] .glass-card,
body.dark-mode .sidebar,
html[data-theme="dark"] .sidebar,
body.dark-mode .card-header,
html[data-theme="dark"] .card-header,
body.dark-mode .modal-dialog,
html[data-theme="dark"] .modal-dialog {
  background: var(--glass-bg) !important;
  color: var(--text-color) !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--glass-shadow);
}

body.dark-mode .navbar,
html[data-theme="dark"] .navbar {
  background: var(--glass-navbar-bg) !important;
  border-color: var(--glass-border) !important;
}

body.dark-mode .mobile-bottom-nav,
html[data-theme="dark"] .mobile-bottom-nav {
  background: var(--glass-navbar-bg) !important;
  border-color: var(--glass-border) !important;
}

body.dark-mode .mobile-drawer,
html[data-theme="dark"] .mobile-drawer {
  background: var(--glass-dropdown-bg) !important;
  border-color: var(--glass-border) !important;
}

body.dark-mode .nav-dropdown-menu,
html[data-theme="dark"] .nav-dropdown-menu {
  background: var(--glass-dropdown-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

body.dark-mode .nav-dropdown-item,
html[data-theme="dark"] .nav-dropdown-item {
  color: var(--text-color) !important;
}

body.dark-mode .footer,
html[data-theme="dark"] .footer {
  background: rgba(11, 15, 25, 0.92) !important;
  border-color: var(--glass-border) !important;
}

body.dark-mode .form-control,
html[data-theme="dark"] .form-control,
body.dark-mode select,
html[data-theme="dark"] select,
body.dark-mode input[type="text"],
html[data-theme="dark"] input[type="text"],
body.dark-mode input[type="number"],
html[data-theme="dark"] input[type="number"] {
  background-color: rgba(19, 27, 46, 0.85) !important;
  color: var(--text-color) !important;
  border-color: #27354f !important;
}

body.dark-mode .form-control:focus,
html[data-theme="dark"] .form-control:focus {
  border-color: #059669 !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25) !important;
}

body.dark-mode .table th,
html[data-theme="dark"] .table th {
  background: var(--bg-alt) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .table td,
html[data-theme="dark"] .table td,
body.dark-mode tr,
html[data-theme="dark"] tr {
  border-color: var(--border-color) !important;
}

body.dark-mode .table tr:hover td,
html[data-theme="dark"] .table tr:hover td {
  background: var(--bg-hover) !important;
}

body.dark-mode .filter-pill,
html[data-theme="dark"] .filter-pill,
body.dark-mode .preset-pill,
html[data-theme="dark"] .preset-pill {
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

body.dark-mode .filter-pill.active,
html[data-theme="dark"] .filter-pill.active {
  background: #059669 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
}

body.dark-mode .tab-btn,
html[data-theme="dark"] .tab-btn,
body.dark-mode .ritu-btn,
html[data-theme="dark"] .ritu-btn {
  background: var(--bg-surface) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .tab-btn.active,
html[data-theme="dark"] .tab-btn.active,
body.dark-mode .ritu-btn.active,
html[data-theme="dark"] .ritu-btn.active {
  color: #10b981 !important;
  border-color: #059669 !important;
}

body.dark-mode .ritu-btn.active,
html[data-theme="dark"] .ritu-btn.active {
  background: #059669 !important;
  color: #ffffff !important;
}

body.dark-mode .live-search-input,
html[data-theme="dark"] .live-search-input {
  background: rgba(19, 27, 46, 0.9) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .live-search-dropdown,
html[data-theme="dark"] .live-search-dropdown {
  background: var(--glass-dropdown-bg) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .theme-toggle-btn,
html[data-theme="dark"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #fbbf24 !important;
}

/* Live Search Dropdown */
.live-search-wrapper {
  position: relative;
  display: inline-block;
}

.live-search-input {
  padding: 0.45rem 1rem 0.45rem 2rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-size: 0.88rem;
  width: 190px;
  color: var(--text-color);
  transition: width 0.25s ease, border-color 0.2s ease;
}

.live-search-input:focus {
  width: 270px;
  outline: none;
  border-color: var(--primary);
}

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

.live-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1000;
  max-height: 380px;
  overflow-y: auto;
}

.live-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-color);
  transition: background 0.15s ease;
}

.live-search-item:hover {
  background: #f1f5f9;
}
body.dark-mode .live-search-item:hover {
  background: #1e293b;
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.theme-toggle-btn:hover {
  background: var(--bg-surface);
}

/* =========================================================
   Glassmorphic Splash Screen (Mobile PWA & App Launch)
   ========================================================= */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.94) 0%, rgba(3, 7, 18, 0.98) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
  user-select: none;
  pointer-events: none;
}
@media (min-width: 769px) {
  .splash-screen, #app-splash-screen {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
@keyframes splashAutoDismiss {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  visibility: hidden;
}
.splash-card {
  max-width: 440px;
  width: 100%;
  padding: 2.75rem 2rem;
  text-align: center;
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.25);
  position: relative;
  overflow: hidden;
}
.splash-logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.splash-logo-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: splashPulse 2s infinite alternate;
  z-index: 0;
}
.splash-icon {
  font-size: 3.5rem;
  position: relative;
  z-index: 1;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5));
}
.splash-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.splash-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
}
.splash-loader-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  position: relative;
}
.splash-loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
  animation: splashProgress 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.splash-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.splash-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
@keyframes splashPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 0.9; }
}
@keyframes splashProgress {
  0% { width: 0%; }
  60% { width: 75%; }
  100% { width: 100%; }
}

/* =========================================================
   Mobile Bottom App Navigation Bar (Native Mobile Experience)
   ========================================================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  background: var(--glass-navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  z-index: 9990;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .nav-menu {
    display: none !important;
  }
  .live-search-input {
    width: 125px;
  }
  .live-search-input:focus {
    width: 165px;
  }
}
@media (max-width: 480px) {
  .live-search-wrapper {
    display: none;
  }
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  gap: 3px;
  flex: 1;
  height: 100%;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}
.bottom-nav-item:active {
  transform: scale(0.92);
}
.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--primary);
}
.bottom-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-2px);
}
.bottom-nav-indicator {
  position: absolute;
  top: 4px;
  width: 18px;
  height: 3px;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--primary);
}

/* =========================================================
   Mobile Off-Canvas Glass Drawer
   ========================================================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: var(--glass-dropdown-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-drawer.open {
  right: 0;
}
.drawer-header {
  padding: 1.25rem 1.25rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.drawer-close-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  font-size: 1.35rem;
  transition: transform 0.25s ease, background 0.2s ease;
}
.drawer-close-btn:hover {
  transform: rotate(90deg);
  background: var(--bg-hover);
}
.drawer-body {
  flex: 1;
  padding: 1rem 0.85rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Accordion Group Container */
.drawer-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.drawer-group {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.drawer-group.open {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.drawer-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-color);
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}
.drawer-group-toggle:hover {
  background: rgba(5, 150, 105, 0.06);
  color: var(--primary);
}
.drawer-group-toggle .toggle-arrow {
  font-size: 0.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
}
.drawer-group.open .drawer-group-toggle .toggle-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}
.drawer-group-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 0 0.4rem;
}
.drawer-group.open .drawer-group-content {
  max-height: 900px;
  opacity: 1;
  padding: 0.25rem 0.4rem 0.65rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  position: relative;
}
.drawer-link:hover, .drawer-link.active {
  background: rgba(5, 150, 105, 0.1);
  color: var(--primary);
  transform: translateX(4px);
}
body.dark-mode .drawer-link:hover, body.dark-mode .drawer-link.active {
  background: rgba(5, 150, 105, 0.18);
  color: #10b981;
}

/* Staggered Cascade Animation when opening drawer */
@keyframes drawerItemCascade {
  0% {
    opacity: 0;
    transform: translateX(18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
.mobile-drawer.open .drawer-link {
  animation: drawerItemCascade 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--delay, 0) * 0.022s);
}

/* =========================================================
   Glassmorphic User Profile Dropdown Menu
   ========================================================= */
.user-dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.user-avatar-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}
.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background: var(--glass-dropdown-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2), 0 0 20px rgba(99, 102, 241, 0.1);
  padding: 0.65rem;
  display: none;
  z-index: 10000;
  transform-origin: top right;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.user-dropdown-menu.show {
  display: block;
}
@keyframes dropdownFade {
  from { opacity: 0; transform: scale(0.95) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.user-dropdown-header {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.4rem;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.user-dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
body.dark-mode .user-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

/* =========================================================
   Floating Scroll to Top
   ========================================================= */
.scroll-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9980;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
  border-color: var(--primary);
}

/* =========================================================
   GDPR Glassmorphic Cookie Consent Banner
   ========================================================= */
.cookie-consent-bar {
  position: fixed;
  bottom: 24px;
  left: 20px;
  right: 20px;
  max-width: 960px;
  margin: 0 auto;
  z-index: 9995;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.5rem;
  animation: slideUpCookie 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.cookie-consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-consent-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 280px;
}

.cookie-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.cookie-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-consent-bar {
    bottom: 80px; /* Stay clearly above the mobile bottom nav bar */
    left: 12px;
    right: 12px;
    padding: 1rem;
  }
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

/* =========================================================
   In-App Notification Bell & Dropdown System
   ========================================================= */
.notif-bell-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  position: relative;
  transition: all 0.2s ease;
}

.notif-bell-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: scale(1.05);
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
  animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.notif-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--glass-dropdown-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  animation: notifDrop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes notifDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-header {
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(99, 102, 241, 0.04);
}

.notif-mark-all-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.notif-mark-all-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.notif-list {
  overflow-y: auto;
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

.notif-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-color);
  transition: background 0.15s ease;
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-hover);
}

.notif-item.unread {
  background: rgba(99, 102, 241, 0.05);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}

.notif-item-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-color);
}

.notif-item-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.notif-item-time {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
}

@media (max-width: 480px) {
  .notif-dropdown-menu {
    width: 310px;
    right: -60px;
  }
}

/* ========================================================
   Mobile App Smart Banner
   ======================================================== */
.mobile-app-banner {
  display: none;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  padding: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 999;
}

@media (max-width: 768px) {
  .mobile-app-banner {
    display: flex;
  }
}

.mobile-app-banner-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.mobile-app-icon {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-app-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-app-text strong {
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-app-text small {
  font-size: 0.7rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-app-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-app-get {
  background: #4f46e5;
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-app-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}






/* ========================================================
   🌿 EDUCORE GLASSMORPHISM 2.0 & MODULAR UI DESIGN SYSTEM
   Ultra-modern frosted glass layering, specular highlights,
   modular platform suites, Universal Command Palette (Ctrl+K),
   and Floating Smart Quick Access Glass Dock.
   ======================================================== */

/* --- 1. Ambient Lighting & Depth Glows --- */
.ambient-glow-container {
  position: relative;
  overflow: hidden;
}

.ambient-glow,
.ambient-glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.6;
  z-index: 0;
  transform: translateZ(0);
}

.ambient-glow-emerald {
  background: radial-gradient(circle, rgba(5, 150, 105, 0.28) 0%, rgba(16, 185, 129, 0.05) 70%, transparent 100%);
}

.ambient-glow-indigo {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.28) 0%, rgba(99, 102, 241, 0.05) 70%, transparent 100%);
}

.ambient-glow-amber {
  background: radial-gradient(circle, rgba(217, 119, 6, 0.22) 0%, rgba(245, 158, 11, 0.05) 70%, transparent 100%);
}

/* --- 2. Advanced Frosted Glass Surfaces --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 30px -5px rgba(0, 0, 0, 0.05),
    0 2px 8px -2px rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 1;
}

.glass-card-interactive {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 24px -4px rgba(31, 38, 135, 0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.glass-card-interactive:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.8),
    0 18px 40px -8px rgba(31, 38, 135, 0.12),
    0 0 20px 0 rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.4);
}

.glass-card-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  opacity: 0.6;
}

/* Glass Pills & Chips */
.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.03);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

.glass-pill:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.glass-pill.active {
  background: #059669;
  color: #ffffff !important;
  border-color: #047857;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

/* Modular KPI Stat Cards */
.glass-kpi-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.glass-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* --- 3. Modular Platform Suite Tab Switcher --- */
.modular-suite-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  max-width: 960px;
  margin: 0 auto 2.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.modular-suite-nav::-webkit-scrollbar {
  display: none;
}

.modular-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modular-tab-btn:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.4);
}

.modular-tab-btn.active {
  background: #059669;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

/* --- 4. Universal Command Palette (Ctrl+K / ⌘K) --- */
.cmd-palette-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem 1rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cmd-palette-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cmd-palette-dialog {
  width: 100%;
  max-width: 660px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
    0 24px 60px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transform: translateY(-15px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.cmd-palette-backdrop.active .cmd-palette-dialog {
  transform: translateY(0) scale(1);
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.85rem;
  position: relative;
}

.cmd-palette-icon {
  font-size: 1.35rem;
  line-height: 1;
  color: #059669;
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
  font-family: inherit;
}

.cmd-palette-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.cmd-palette-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.cmd-palette-results {
  padding: 0.75rem;
  overflow-y: auto;
  max-height: 52vh;
}

.cmd-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.cmd-item:hover, .cmd-item.selected {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  transform: translateX(3px);
}

.cmd-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.cmd-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.cmd-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.cmd-item-tag {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
}

.cmd-palette-footer {
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cmd-keys-hint {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cmd-key-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- 5. Floating Smart Quick Access Glass Dock --- */
.smart-glass-dock {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 9999px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 36px -4px rgba(0, 0, 0, 0.15),
    0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.dock-item-btn:hover {
  transform: translateY(-4px) scale(1.15);
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.dock-item-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dock-item-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dock-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 0.15rem;
}

.dock-trigger-primary {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.dock-trigger-primary:hover {
  transform: translateY(-4px) scale(1.18);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.5);
}

/* Hide floating dock on small screens where bottom nav is active */
@media (max-width: 768px) {
  .smart-glass-dock {
    bottom: 4.8rem;
    right: 1rem;
    padding: 0.35rem 0.45rem;
  }
  .dock-item-btn {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
}

/* --- 6. Dark & OLED Mode Support for Glassmorphism 2.0 --- */
body.dark-mode .glass-panel,
html[data-theme="dark"] .glass-panel,
body.dark-mode .glass-card-interactive,
html[data-theme="dark"] .glass-card-interactive,
body.dark-mode .cmd-palette-dialog,
html[data-theme="dark"] .cmd-palette-dialog,
body.dark-mode .smart-glass-dock,
html[data-theme="dark"] .smart-glass-dock,
body.dark-mode .glass-kpi-card,
html[data-theme="dark"] .glass-kpi-card {
  background: rgba(15, 23, 42, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 12px 40px -8px rgba(0, 0, 0, 0.4) !important;
  color: #f1f5f9 !important;
}

body.dark-mode .glass-card-interactive:hover,
html[data-theme="dark"] .glass-card-interactive:hover {
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25),
    0 20px 48px -8px rgba(0, 0, 0, 0.6),
    0 0 24px 0 rgba(16, 185, 129, 0.18) !important;
}

body.dark-mode .cmd-item:hover,
html[data-theme="dark"] .cmd-item:hover,
body.dark-mode .cmd-item.selected,
html[data-theme="dark"] .cmd-item.selected {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
}

body.dark-mode .cmd-item-icon,
html[data-theme="dark"] .cmd-item-icon {
  background: rgba(255, 255, 255, 0.06) !important;
}

body.dark-mode .modular-suite-nav,
html[data-theme="dark"] .modular-suite-nav {
  background: rgba(0, 0, 0, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .modular-tab-btn:hover,
html[data-theme="dark"] .modular-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* Amber OLED */
html[data-theme="amber-oled"] .glass-panel,
html[data-theme="amber-oled"] .glass-card-interactive,
html[data-theme="amber-oled"] .cmd-palette-dialog,
html[data-theme="amber-oled"] .smart-glass-dock,
html[data-theme="amber-oled"] .glass-kpi-card {
  background: #000000 !important;
  border-color: #78350f !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9) !important;
}

html[data-theme="amber-oled"] .modular-tab-btn.active {
  background: #d97706 !important;
  color: #000000 !important;
}

/* Red OLED */
html[data-theme="red-oled"] .glass-panel,
html[data-theme="red-oled"] .glass-card-interactive,
html[data-theme="red-oled"] .cmd-palette-dialog,
html[data-theme="red-oled"] .smart-glass-dock,
html[data-theme="red-oled"] .glass-kpi-card {
  background: #000000 !important;
  border-color: #7f1d1d !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9) !important;
}

html[data-theme="red-oled"] .modular-tab-btn.active {
  background: #dc2626 !important;
  color: #000000 !important;
}
