/* ==========================================================================
   NIEdge Unified Premium Design System Stylesheet (theme.css)
   ========================================================================== */

:root {
  /* Light Theme Tokens */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;

  --card-bg: #ffffff;
  --card-hover-bg: #f8f9fa;

  --text-primary: #212121;
  --text-secondary: #495057;
  --text-muted: #6c757d;

  --border-primary: #dee2e6;
  --border-secondary: #e9ecef;

  --accent-primary: #FFC107;
  --accent-hover: #FF8F00;
  --accent-light: #FFF9C4;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 25px rgba(255, 193, 7, 0.15);
  --shadow-lg: 0 15px 35px rgba(255, 193, 7, 0.2);

  /* Legacy Backward-Compatibility Mapping */
  --white: var(--card-bg);
  --light-color: var(--bg-secondary);
  --dark-color: var(--text-primary);
  --gray: var(--text-muted);
  --primary-color: var(--accent-primary);
  --primary-dark: var(--accent-hover);
  --primary-light: var(--accent-light);
  --shadow-light: var(--shadow-sm);
  --shadow-medium: var(--shadow-md);
  --shadow-heavy: var(--shadow-lg);
}

html[data-theme="dark"], [data-theme="dark"] {
  /* Premium NIEdge Dark Tokens */
  --bg-primary: #0f1115;
  --bg-secondary: #131722;
  --bg-tertiary: #171b26;

  --card-bg: #1b2130;
  --card-hover-bg: #20283a;

  --text-primary: #f5f7fb;
  --text-secondary: #c2c9d6;
  --text-muted: #8b95a7;

  --border-primary: #2d374d;
  --border-secondary: #20283a;

  --accent-primary: #f59e0b;
  --accent-hover: #ffb020;
  --accent-light: #ffc247;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.5);

  /* Legacy Backward-Compatibility Mapping */
  --white: var(--card-bg);
  --light-color: var(--bg-secondary);
  --dark-color: var(--text-primary);
  --gray: var(--text-muted);
  --primary-color: var(--accent-primary);
  --primary-dark: var(--accent-hover);
  --primary-light: var(--accent-light);
  --shadow-light: var(--shadow-sm);
  --shadow-medium: var(--shadow-md);
  --shadow-heavy: var(--shadow-lg);
}

/* ==========================================================================
   Global Base Overrides
   ========================================================================== */

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Base Form Overrides */
input, select, textarea {
  background-color: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.15);
}

/* Global Modal & Card Settings */
.modal-content, .popup-card, .card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
}

/* Cross-Browser Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Firefox compatibility */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-primary) var(--bg-primary);
}

/* ==========================================================================
   Micro-Transitions for Theme Switching
   ========================================================================== */
body, header, nav, div, section, a, button, input, select, textarea, span, p, h1, h2, h3, h4, h5, h6, .card, .dash-card, .btn, .stat-mini, .comp-chip {
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reduced Motion Compatibility */
@media (prefers-reduced-motion: reduce) {
  body, header, nav, div, section, a, button, input, select, textarea, span, p, h1, h2, h3, h4, h5, h6, .card, .dash-card, .btn, .stat-mini, .comp-chip {
    transition: none !important;
  }
}

/* ==========================================================================
   Premium Theme Toggle Pill Styles
   ========================================================================== */

.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.theme-toggle-pill {
  position: relative;
  display: flex;
  width: 140px;
  height: 34px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 17px;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.theme-toggle-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 68px;
  height: 30px;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.theme-toggle-pill.dark-active .theme-toggle-thumb {
  transform: translate3d(68px, 0, 0);
  background-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.theme-toggle-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 100%;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 2;
  transition: color 0.2s ease;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.theme-toggle-pill:not(.dark-active) .light-opt {
  color: var(--accent-hover);
}

.theme-toggle-pill.dark-active .dark-opt {
  color: #0f1115; /* High contrast on orange background */
}

.theme-toggle-pill:hover .theme-toggle-option {
  color: var(--text-primary);
}

/* Accessibility focus state */
.theme-toggle-pill:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Adjustments for Mobile Nav Menu */
@media (max-width: 768px) {
  .theme-toggle-wrapper {
    margin-left: 0;
    margin-top: 25px;
    width: 90%;
    justify-content: center;
  }
  
  .theme-toggle-pill {
    width: 180px;
    height: 40px;
    border-radius: 20px;
  }

  .theme-toggle-thumb {
    width: 88px;
    height: 36px;
    border-radius: 18px;
  }

  .theme-toggle-pill.dark-active .theme-toggle-thumb {
    transform: translate3d(88px, 0, 0);
  }

  .theme-toggle-option {
    width: 90px;
    font-size: 12px;
  }
}

/* ==========================================================================
   Ecosystem-Wide Premium Dark Mode Overrides
   ========================================================================== */

/* 1. Global & Base Overrides */
html[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

html[data-theme="dark"] {
  scrollbar-color: var(--border-primary) var(--bg-primary);
}

/* 2. Navbar & Navigation Overrides */
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .header-nav,
html[data-theme="dark"] .top-navigation {
  background: rgba(15, 17, 21, 0.95) !important;
  border-bottom: 1px solid var(--border-primary) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(20px) !important;
}

html[data-theme="dark"] .nav-links,
html[data-theme="dark"] .nav__links,
html[data-theme="dark"] .nav-menu {
  background: transparent;
}

/* Mobile dropdown menus under hamburger */
@media (max-width: 768px) {
  html[data-theme="dark"] .nav-links,
  html[data-theme="dark"] .nav__links,
  html[data-theme="dark"] .nav-menu {
    background: rgba(19, 23, 34, 0.98) !important;
    border-top: 1px solid var(--border-primary);
  }
}

/* Dropdown menus (Desktop & Mobile) */
html[data-theme="dark"] .dropdown-menu {
  background: rgba(27, 33, 48, 0.98) !important;
  border: 1px solid var(--border-primary) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

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

html[data-theme="dark"] .dropdown-item:hover {
  background: var(--card-hover-bg) !important;
  color: var(--accent-primary) !important;
}

/* Hamburger menu button lines */
html[data-theme="dark"] .hamburger .line,
html[data-theme="dark"] .nav__toggle-line,
html[data-theme="dark"] .toggle-bar {
  background: var(--gradient-1) !important;
}

/* Logo & Brand text */
html[data-theme="dark"] .logo,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .brand-logo {
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .hero {
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.12) 0%, #0f1115 100%) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .hero-title {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .hero-subtitle {
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .hero .btn {
  background: var(--accent-primary) !important;
  color: #0f1115 !important;
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .hero .btn:hover {
  background: transparent !important;
  color: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .hero .float-item {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .float-item {
  background: rgba(27, 33, 48, 0.6) !important;
  border: 1px solid var(--border-primary) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .btn {
  background: var(--card-bg) !important;
  color: var(--accent-primary) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .btn:hover {
  color: #0f1115 !important;
  border-color: transparent !important;
}

/* 4. NIEdge ONE Portal Overrides */
html[data-theme="dark"] .glass-panel {
  background: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .glass-panel:hover {
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .welcome-banner {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.25) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .welcome-info h2 {
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .dash-card {
  background: var(--card-bg) !important;
  border-color: var(--border-secondary) !important;
}

html[data-theme="dark"] .dash-card:hover {
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .dash-card-icon {
  background: rgba(245, 158, 11, 0.1) !important;
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .dash-stat {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .action-tile {
  background: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .action-tile:hover {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .results-table th,
html[data-theme="dark"] .results-table td {
  border-bottom: 1.5px solid var(--border-primary) !important;
}

html[data-theme="dark"] .results-table th {
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .results-table td {
  color: var(--text-secondary) !important;
}

/* Sem accordions */
html[data-theme="dark"] .sem-accordion {
  background: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .sem-accordion-header:hover {
  background: rgba(245, 158, 11, 0.05) !important;
}

/* Grade badges with custom dark colors for contrast */
html[data-theme="dark"] .grade-S { background: rgba(16, 185, 129, 0.2) !important; color: #34d399 !important; }
html[data-theme="dark"] .grade-A { background: rgba(59, 130, 246, 0.2) !important; color: #60a5fa !important; }
html[data-theme="dark"] .grade-B { background: rgba(139, 92, 246, 0.2) !important; color: #a78bfa !important; }
html[data-theme="dark"] .grade-C { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; }
html[data-theme="dark"] .grade-D { background: rgba(249, 115, 22, 0.2) !important; color: #fb923c !important; }
html[data-theme="dark"] .grade-E { background: rgba(156, 163, 175, 0.2) !important; color: #d1d5db !important; }
html[data-theme="dark"] .grade-F { background: rgba(239, 68, 68, 0.2) !important; color: #f87171 !important; }

/* Calccards & badges */
html[data-theme="dark"] .calc-card {
  background: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .calc-card:hover {
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .calc-card-header {
  border-bottom-color: var(--border-primary) !important;
}

html[data-theme="dark"] .course-code-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--accent-light) !important;
}

html[data-theme="dark"] .profile-badge-row .welcome-badge.badge-alt {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--accent-light) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

/* Sync panels in NIEdge ONE */
html[data-theme="dark"] .sync-stage {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .stage-icon {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .sync-timeout-bar,
html[data-theme="dark"] .sync-partial-banner {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="dark"] .sync-timeout-bar p,
html[data-theme="dark"] .sync-partial-banner {
  color: var(--accent-light) !important;
}

html[data-theme="dark"] .gp-target-row.target-impossible {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

/* NIEdge ONE CIE Page Overrides */
html[data-theme="dark"] .sem-panel-title {
  border-bottom-color: var(--border-primary) !important;
}

html[data-theme="dark"] .stat-mini {
  background: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .stat-mini .value {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .comp-chip.pending {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
}

/* Mobile CIE card overrides in dark mode */
@media (max-width: 900px) {
  html[data-theme="dark"] .cie-row {
    background: var(--card-bg) !important;
    border-color: var(--border-primary) !important;
    box-shadow: var(--shadow-sm) !important;
  }
  
  html[data-theme="dark"] .cie-row:hover {
    background: var(--card-hover-bg) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.05) !important;
  }
  
  html[data-theme="dark"] .cie-row td:nth-child(4),
  html[data-theme="dark"] .cie-row td:nth-child(5) {
    border-top: 1px dashed var(--border-primary) !important;
  }
}

/* Status badges contrast overrides in dark mode */
html[data-theme="dark"] .badge-eligible {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}

html[data-theme="dark"] .badge-at-risk {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="dark"] .badge-not-eligible {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* 5. AJ Programs Overrides */
html[data-theme="dark"] .module-nav {
  background: rgba(27, 33, 48, 0.9) !important;
  border: 1px solid var(--border-primary) !important;
}

html[data-theme="dark"] .module-nav-btn {
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .module-nav-btn .nav-btn-desc {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .module-nav-btn:hover {
  color: var(--accent-primary) !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

html[data-theme="dark"] .module-nav-btn:hover .nav-btn-desc {
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .module-nav-btn.active {
  color: #111111 !important;
  background: var(--gradient-1) !important;
}

html[data-theme="dark"] .module-nav-btn.active .nav-btn-desc {
  color: rgba(17, 17, 17, 0.85) !important;
}

html[data-theme="dark"] .program-stats {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .info-section {
  border-color: var(--border-secondary) !important;
}

html[data-theme="dark"] .info-title {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .program-desc,
html[data-theme="dark"] .program-explanation {
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .program-difficulty.Medium {
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .program-card {
  background: var(--card-bg) !important;
}

html[data-theme="dark"] .program-card:hover {
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .btn-copy-code {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .btn-copy-code:hover {
  background: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .drawer-content {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .drawer-header {
  border-bottom-color: var(--border-primary) !important;
}

html[data-theme="dark"] .drawer-title {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .btn-close-drawer {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .btn-close-drawer:hover {
  background: var(--border-primary) !important;
}

html[data-theme="dark"] .drawer-drag-bar {
  background: var(--border-primary) !important;
}

html[data-theme="dark"] .module-select-box {
  background: rgba(27, 33, 48, 0.9) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-sm) !important;
}

html[data-theme="dark"] .module-select-box option {
  background-color: #1b2130 !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .module-select-box:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.05) !important;
}

html[data-theme="dark"] .select-arrow {
  color: var(--text-secondary) !important;
}

/* 6. Skills & Practice Level Overrides */
html[data-theme="dark"] .language-card {
  background: var(--card-bg) !important;
}

html[data-theme="dark"] .language-card:hover {
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .search-box {
  background: var(--card-bg) !important;
  border-color: var(--border-secondary) !important;
}

html[data-theme="dark"] .search-box:hover {
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .search-box:focus-within {
  border-color: var(--accent-primary) !important;
}

html[data-theme="dark"] .search-field {
  background: transparent !important;
  color: var(--text-primary) !important;
  border: none !important;
}

html[data-theme="dark"] .px-mini-jumps a {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .px-mini-jumps a:hover {
  background: var(--card-hover-bg) !important;
}

html[data-theme="dark"] .stage-progress-card {
  background: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
}

/* General inputs & overrides for all pages */
html[data-theme="dark"] input, 
html[data-theme="dark"] select, 
html[data-theme="dark"] textarea {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-primary) !important;
}

html[data-theme="dark"] input::placeholder, 
html[data-theme="dark"] textarea::placeholder {
  color: var(--text-muted) !important;
}

/* ==========================================================================
   7. Button Contrast & Hover Fixes
   ========================================================================== */

/* Primary CTA and back buttons that override hover background to var(--white) (dark in dark mode) */
html[data-theme="dark"] .niedge-one-btn,
html[data-theme="dark"] .back-btn,
html[data-theme="dark"] .academics-btn,
html[data-theme="dark"] .skills-btn {
  background: var(--accent-primary) !important;
  color: #0f1115 !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .niedge-one-btn:hover,
html[data-theme="dark"] .back-btn:hover,
html[data-theme="dark"] .academics-btn:hover,
html[data-theme="dark"] .skills-btn:hover {
  background: var(--bg-primary) !important;
  color: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25) !important;
}

/* Disable the sliding pseudo-element background (which becomes dark) */
html[data-theme="dark"] .niedge-one-btn::before,
html[data-theme="dark"] .back-btn::before,
html[data-theme="dark"] .academics-btn::before,
html[data-theme="dark"] .skills-btn::before {
  display: none !important;
}

/* Primary buttons in NIEdge ONE (they have gold backgrounds in both normal and hover states) */
html[data-theme="dark"] .btn-primary {
  background: var(--accent-primary) !important;
  color: #0f1115 !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .btn-primary:hover {
  background: var(--accent-hover) !important;
  color: #0f1115 !important;
}

/* Secondary outline buttons (avoiding low-contrast gold-on-light-gold text) */
html[data-theme="dark"] .btn-secondary {
  background: transparent !important;
  border: 1.5px solid var(--accent-primary) !important;
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(245, 158, 11, 0.1) !important;
  color: var(--accent-light) !important;
  border-color: var(--accent-light) !important;
}

/* Logout button (outlines in red) */
html[data-theme="dark"] .btn-logout {
  background: transparent !important;
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}

html[data-theme="dark"] .btn-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border-color: #ef4444 !important;
}

/* Events buttons */
html[data-theme="dark"] .featured-event-btn {
  background: var(--accent-primary) !important;
  color: #0f1115 !important;
}

html[data-theme="dark"] .featured-event-btn:hover {
  background: var(--bg-primary) !important;
  color: var(--accent-primary) !important;
  border: 2px solid var(--accent-primary) !important;
}

html[data-theme="dark"] .calendar-nav-btn,
html[data-theme="dark"] .calendar-close-btn {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .calendar-nav-btn:hover,
html[data-theme="dark"] .calendar-close-btn:hover {
  background: var(--accent-primary) !important;
  color: #0f1115 !important;
}

html[data-theme="dark"] .mobile-calendar-btn {
  color: #0f1115 !important;
}

/* ==========================================================================
   8. Form Page form.html Dark Mode Fixes
   ========================================================================== */
html[data-theme="dark"] {
  --primary: #f59e0b;
  --primary-dark: #ffb020;
  --secondary: #a0aec0;
  --light: #171b26;
  --accent: #ff6b6b;
}

html[data-theme="dark"] body {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .form-container {
  background: var(--card-bg) !important;
  box-shadow: var(--shadow-lg) !important;
}

html[data-theme="dark"] .form-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-primary) !important;
}

html[data-theme="dark"] .form-control {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

html[data-theme="dark"] .form-control:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15) !important;
}

/* ==========================================================================
   Dark Mode Beta Experience Styles
   ========================================================================== */

/* BETA Version Badge */
.theme-toggle-beta-badge {
  display: inline-block;
  background-color: #f59e0b;
  color: #111111;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px;
  letter-spacing: 0.5px;
  margin-left: 8px;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

@media (max-width: 768px) {
  .theme-toggle-beta-badge {
    margin-left: 10px;
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* Premium Beta Modal Dialog */
.niedge-beta-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.niedge-beta-modal-overlay.active {
  opacity: 1;
}

.niedge-beta-modal {
  width: 460px;
  max-width: 90vw;
  background-color: #ffffff;
  color: #212121;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 28px;
  box-sizing: border-box;
  transform: scale(0.9) translate3d(0, 20px, 0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
  overflow: hidden;
}

.niedge-beta-modal-overlay.active .niedge-beta-modal {
  transform: scale(1) translate3d(0, 0, 0);
}

/* Dark Theme Modal Overrides */
html[data-theme="dark"] .niedge-beta-modal,
.niedge-beta-modal.dark-theme {
  background-color: #1b2130;
  color: #f5f7fb;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.niedge-beta-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.niedge-beta-modal-body {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.niedge-beta-modal-body p {
  margin: 0 0 12px 0;
}

.niedge-beta-modal-body p:last-child {
  margin-bottom: 0;
}

.niedge-beta-modal-body a {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
  border-bottom: 1px dashed #f59e0b;
}

.niedge-beta-modal-body a:hover {
  color: #ffb020;
  border-bottom-style: solid;
}

.niedge-beta-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.niedge-beta-modal-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  outline: none;
}

.niedge-beta-modal-btn:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

/* Primary Button (Continue) */
.niedge-beta-modal-btn.primary {
  background-color: #f59e0b;
  color: #111111;
}

.niedge-beta-modal-btn.primary:hover {
  background-color: #ffb020;
}

.niedge-beta-modal-btn.primary:active {
  transform: scale(0.98);
}

/* Secondary Button (Don't show again) */
.niedge-beta-modal-btn.secondary {
  background-color: #f1f3f5;
  color: #495057;
  border-color: #dee2e6;
}

.niedge-beta-modal-btn.secondary:hover {
  background-color: #e9ecef;
  color: #212121;
}

html[data-theme="dark"] .niedge-beta-modal-btn.secondary,
.niedge-beta-modal.dark-theme .niedge-beta-modal-btn.secondary {
  background-color: #131722;
  color: #c2c9d6;
  border-color: #2d374d;
}

html[data-theme="dark"] .niedge-beta-modal-btn.secondary:hover,
.niedge-beta-modal.dark-theme .niedge-beta-modal-btn.secondary:hover {
  background-color: #171b26;
  color: #f5f7fb;
  border-color: #3b4866;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .niedge-beta-modal {
    padding: 24px;
    border-radius: 16px;
  }
  
  .niedge-beta-modal-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .niedge-beta-modal-body {
    font-size: 13.5px;
    margin-bottom: 20px;
  }

  .niedge-beta-modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .niedge-beta-modal-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
}

/* ==========================================================================
   Mobile Navigation Scroll Lock & Click Prevention Styles
   ========================================================================== */

body.menu-open {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    pointer-events: none !important; /* Disable all clicks/taps on background content */
}

/* Re-enable pointer events for the navbar and mobile links */
body.menu-open .navbar,
body.menu-open .header-nav,
body.menu-open .nav-links,
body.menu-open .nav-menu,
body.menu-open .nav__links,
body.menu-open .hamburger {
    pointer-events: auto !important;
}

/* Mobile Navigation panel scroll momentum scroll */
@media (max-width: 768px) {
    .nav-links, .nav-menu, .nav__links {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Dark Mode Override for About Us Skill Tags */
[data-theme="dark"] .skill-tag {
    color: #0f1115 !important;
    font-weight: 600;
}

/* Dark Mode Overrides for Landing Page Feature Card Icons */
html[data-theme="dark"] .niedge-one-card-icon {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--accent-primary) !important;
}

html[data-theme="dark"] .niedge-one-feature-card:hover .niedge-one-card-icon {
  background: var(--accent-primary) !important;
  color: #0f1115 !important;
}
