/* ==========================================================================
   BlackHatCommando Academy - Core Modern Design System (style.css)
   Clean, Editorial, High-Trust Corporate Light Theme by Default
   User-Toggled Modern Dark Mode
   ========================================================================== */

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

/* ==========================================================================
   1. Theme Variables - Light Theme (Default)
   ========================================================================== */
:root {
  /* Color Palette - Clean Corporate Slate & Vibrant Royal Blue */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.95);
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-surface: #eff6ff;
  --primary-border: #bfdbfe;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  
  --secondary: #0d9488;
  --secondary-hover: #0f766e;
  --secondary-surface: #f0fdfa;
  --secondary-border: #99f6e4;
  --secondary-glow: rgba(13, 148, 136, 0.15);
  --secondary-gradient: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  
  --accent: #6366f1;
  --accent-surface: #eef2ff;
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-glow: rgba(37, 99, 235, 0.25);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --success: #16a34a;
  --success-surface: #f0fdf4;
  --warning: #d97706;
  --warning-surface: #fffbeb;
  --danger: #dc2626;
  --danger-surface: #fef2f2;
  --info: #0284c7;
  --info-surface: #f0f9ff;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.07), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. Dark Theme (Triggered by data-theme="dark" on <html> or <body>)
   ========================================================================== */
[data-theme="dark"],
body.dark-theme {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #151e32;
  --bg-card-hover: #1b253e;
  --bg-glass: rgba(17, 24, 39, 0.92);
  
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-surface: rgba(56, 189, 248, 0.12);
  --primary-border: rgba(56, 189, 248, 0.28);
  --primary-glow: rgba(56, 189, 248, 0.25);
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  
  --secondary: #2dd4bf;
  --secondary-hover: #14b8a6;
  --secondary-surface: rgba(45, 212, 191, 0.12);
  --secondary-border: rgba(45, 212, 191, 0.28);
  --secondary-glow: rgba(45, 212, 191, 0.25);
  --secondary-gradient: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
  
  --accent: #818cf8;
  --accent-surface: rgba(129, 140, 248, 0.12);
  --accent-glow: rgba(129, 140, 248, 0.25);
  
  --border-color: #1e293b;
  --border-hover: #334155;
  --border-glow: rgba(56, 189, 248, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
}

/* ==========================================================================
   3. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 600; }

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gradient-text-teal {
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Container - Widened to reduce left/right empty margins on desktop */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 1600px) {
  .container {
    max-width: 1560px;
    padding: 0 1.5rem;
  }
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
}

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

.btn-secondary {
  background: var(--secondary);
  color: #ffffff !important;
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-surface);
}

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

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-surface);
}

/* ==========================================================================
   5. Cards & Clean Containers
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
}

.card-hover:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   6. Public Navigation Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: var(--transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  flex-wrap: nowrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
  min-width: 0;
  flex-shrink: 0;
}

.nav-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Courses Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
  transition: var(--transition);
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--primary);
  font-weight: 600;
}

.nav-dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 2px;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Invisible bridge so mouse does not leave hover tunnel */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

/* Open dropdown on hover, focus, or JS .open toggle */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: var(--primary-surface);
}

.dropdown-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover .dropdown-item-icon {
  background: #2563eb;
  color: #ffffff;
}

.dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.dropdown-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-surface);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  color: var(--primary);
  background: var(--primary-surface);
}

/* ==========================================================================
   Mobile Drawer & Public Side Panel Redesign
   ========================================================================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 88%;
  max-width: 350px;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  z-index: 1200;
  padding: 1.25rem 1.15rem 1.75rem 1.15rem;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.16);
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1.25rem;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}

.drawer-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.06em;
  margin: 1rem 0 0.5rem 0.25rem;
}

.drawer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.18s ease;
  position: relative;
}

.drawer-nav-link:hover {
  background: #f1f5f9;
  color: #2563eb;
  transform: translateX(3px);
}

.drawer-nav-link.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  border-left: 3px solid #2563eb;
}

.drawer-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.drawer-nav-link:hover .drawer-nav-icon {
  transform: scale(1.1);
}

.drawer-subnav-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  padding: 0.4rem;
  margin: 0.35rem 0;
}

.drawer-footer-actions {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-hotline-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-hotline-pill:hover {
  background: #dcfce7;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   7. Badges & Status Tags
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
}

.badge-primary { background: var(--primary-surface); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-secondary { background: var(--secondary-surface); color: var(--secondary); border: 1px solid var(--secondary-border); }
.badge-warning { background: var(--warning-surface); color: var(--warning); border: 1px solid rgba(217, 119, 6, 0.25); }
.badge-success { background: var(--success-surface); color: var(--success); border: 1px solid rgba(22, 163, 74, 0.25); }
.badge-danger { background: var(--danger-surface); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.25); }
.badge-live { background: var(--danger-surface); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.3); }

/* ==========================================================================
   8. Grid Layouts
   ========================================================================== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ==========================================================================
   9. Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-surface);
}

select.form-control {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

/* ==========================================================================
   10. Alerts & Toasts
   ========================================================================== */
.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid transparent;
}

.alert-error { background: var(--danger-surface); border-color: rgba(220, 38, 38, 0.2); color: var(--danger); }
.alert-success { background: var(--success-surface); border-color: rgba(22, 163, 74, 0.2); color: var(--success); }
.alert-info { background: var(--info-surface); border-color: rgba(2, 132, 199, 0.2); color: var(--info); }
.alert-warning { background: var(--warning-surface); border-color: rgba(217, 119, 6, 0.2); color: var(--warning); }

/* ==========================================================================
   11. Modern Enterprise Footer (Desktop & Mobile Optimized)
   ========================================================================== */
.footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  color: var(--text-muted);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand-title {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  margin-bottom: 1rem;
}

.footer-brand-logo {
  width: 36px;
  height: 36px;
}

.footer-brand-desc {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 340px;
}

.footer-social-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.footer-social-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  width: fit-content;
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.footer-heading {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
}

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

.footer-links-list li a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.footer-links-list li a:hover {
  color: #2563eb;
  transform: translateX(3px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.footer-contact-item i {
  color: #2563eb;
  font-size: 0.95rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-item a:hover {
  color: #2563eb;
}

/* Footer Bottom Bar */
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-bottom-badges {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.footer-cert-badge-sep,
.footer-legal-sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.footer-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-legal-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: #2563eb;
}

.footer-inquiry-btn {
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   12. Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
  .nav-links { display: none; }
  .btn-desk { display: none; }
  .menu-toggle { display: flex; }
  .footer {
    padding: 3rem 0 2rem 0;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 640px) {
  .btn-portal-text { display: none; }
  .btn-portal {
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
  }
  .footer {
    padding: 2.25rem 0 1.5rem 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
  }
  .footer-col-brand {
    text-align: left;
    align-items: flex-start;
  }
  .footer-brand-title {
    justify-content: flex-start;
    margin-bottom: 0.75rem;
  }
  .footer-brand-desc {
    max-width: 100%;
    font-size: 0.86rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }
  .footer-social-row {
    justify-content: flex-start;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }
  .footer-social-btn {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  .footer-heading {
    text-align: left;
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.45rem;
  }
  .footer-heading::after {
    left: 0;
    transform: none;
    width: 28px;
  }
  .footer-links-list {
    align-items: flex-start;
    gap: 0.5rem;
  }
  .footer-links-list li a {
    padding: 4px 0;
    justify-content: flex-start;
    font-size: 0.88rem;
  }
  .footer-contact-item {
    justify-content: flex-start;
    text-align: left;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
  }
  .footer-contact-item i {
    font-size: 0.9rem;
    margin-top: 2px;
  }
  .footer-inquiry-btn {
    width: 100%;
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding-top: 1.25rem;
  }
  .footer-bottom-badges {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }
  .footer-cert-badge-sep {
    display: none;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Responsive Stack & Layout Helpers for Mobile & Tablet
   ========================================================================== */
.stack-mobile,
.stack-tablet {
  display: grid;
  transition: var(--transition);
}

@media (max-width: 992px) {
  .stack-tablet,
  .stack-mobile {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .stack-tablet > div,
  .stack-mobile > div {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 2.25rem 2rem;
  }
}

@media (max-width: 768px) {
  .form-control,
  .field-input {
    font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
    min-height: 44px;
  }
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .auth-card-container {
    padding: 2rem 1rem 3.5rem 1rem !important;
  }
  .auth-card {
    padding: 1.75rem 1.25rem !important;
    border-radius: var(--radius-md) !important;
  }
  .profile-subgrid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .auth-card-container {
    padding: 1.5rem 0.75rem 2.5rem 0.75rem !important;
  }
  .auth-card {
    padding: 1.5rem 1rem !important;
  }
  .card {
    padding: 1.25rem !important;
  }
}


/* ==========================================================================
   TOPBAR NOTIFICATION BELL & DROPDOWN COMPONENT STYLES
   ========================================================================== */
.topbar-notif-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.topbar-notif-trigger {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-notif-trigger:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-surface);
  transform: translateY(-1px);
}

.topbar-notif-trigger.has-unread {
  color: var(--text-main);
}

.topbar-notif-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 9999px;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  display: none;
  animation: pulseNotif 2.5s infinite;
}

.topbar-notif-badge.visible {
  display: inline-block;
}

@keyframes pulseNotif {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notif-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 2rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  animation: notifFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-notif-dropdown.open .notif-dropdown-menu {
  display: flex;
}

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

.notif-menu-header {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.notif-badge-pill {
  background: rgba(14, 165, 233, 0.15);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.notif-mark-all-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.notif-mark-all-link:hover {
  color: var(--primary);
  background: var(--primary-surface);
}

.notif-filter-tabs {
  display: flex;
  padding: 0.4rem 0.85rem;
  gap: 0.4rem;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
}

.notif-tab {
  background: none;
  border: none;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-tab:hover {
  color: var(--text-main);
}

.notif-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.notif-items-container {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

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

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

.notif-item.unread {
  background: rgba(14, 165, 233, 0.04);
}

[data-theme="dark"] .notif-item.unread {
  background: rgba(14, 165, 233, 0.08);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-top: 2px;
}

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

.notif-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.notif-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  box-shadow: 0 0 6px var(--primary);
}

.notif-item-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.notif-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
}

.notif-item-time {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.notif-item-tag {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.notif-empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.notif-empty-icon {
  font-size: 2rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.notif-empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.notif-empty-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 240px;
}

.notif-menu-footer {
  padding: 0.75rem 1.15rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.notif-view-all-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.notif-view-all-link:hover {
  text-decoration: underline;
  gap: 0.6rem;
}

/* ==========================================================================
   Global Top Head Loading Bar & Smart Slow-Network UX Capsule
   ========================================================================== */
#commando-top-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 50%, #0d9488 100%);
  z-index: 9999999;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 0 0 5px rgba(37, 99, 235, 0.5);
  transition: width 0.22s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.25s ease;
}

#commando-top-loader::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  box-shadow: 0 0 12px #38bdf8, 0 0 6px #2563eb;
  opacity: 0.95;
  pointer-events: none;
}

#commando-loader-status {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 9999px;
  padding: 7px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: #0f172a;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  z-index: 9999998;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

[data-theme="dark"] #commando-loader-status,
body.dark-theme #commando-loader-status {
  background: rgba(17, 24, 39, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #f8fafc;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.55);
}

#commando-loader-status.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.commando-loader-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: commandoSpin 0.65s linear infinite;
  flex-shrink: 0;
}
[data-theme="dark"] .commando-loader-spinner,
body.dark-theme .commando-loader-spinner {
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
}

@keyframes commandoSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.commando-loader-pulse {
  animation: commandoPulse 1.4s infinite ease-in-out;
}
@keyframes commandoPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}


