/* ==========================================================
   CyberHub.tech - Unified LMS Core Stylesheet
   Dark Cyberpunk High-Tech Aesthetic (Blue/Cyan/Neon)
   ========================================================== */

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

:root {
  --bg-0: #050816;
  --bg-1: #0A0F1F;
  --bg-2: #0F172A;
  --panel: rgba(15, 23, 42, 0.7);
  --panel-card: rgba(17, 24, 39, 0.85);
  --panel-glass: rgba(10, 15, 31, 0.65);
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(0, 212, 255, 0.35);
  --blue: #00D4FF;
  --cyan: #6EE7FF;
  --purple: #8B5CF6;
  --red: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --dim: #64748B;
  --disp: 'Space Grotesk', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --body: 'Inter', -apple-system, sans-serif;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
}
::selection { background: var(--blue); color: var(--bg-0); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Layout Wrappers */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (min-width: 993px) and (max-width: 1280px) { .wrap { padding: 0 24px; } }
@media (max-width: 768px) { .wrap { padding: 0 18px; } }
@media (max-width: 480px) { .wrap { padding: 0 14px; } }

/* Shared Header / Navigation - Ultra-Clean Premium Cybersecurity Command Style */
header.lms-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 68px;
  display: flex; align-items: center;
  background: rgba(4, 7, 18, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
header.lms-nav::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 255, 0.18) 25%, rgba(0, 255, 198, 0.25) 50%, rgba(0, 212, 255, 0.18) 75%, transparent 100%);
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
header.lms-nav.scrolled {
  height: 62px;
  background: rgba(3, 6, 16, 0.96);
  border-bottom-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.85), 0 0 16px rgba(0, 212, 255, 0.05);
}
header.lms-nav.scrolled::after {
  opacity: 0.8;
}
.lms-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px 0 18px;
  gap: 14px;
}
.lms-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #FFFFFF;
  font-family: var(--disp); font-size: 18px; font-weight: 700; letter-spacing: -0.015em;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.lms-brand:hover {
  transform: translateY(-0.5px);
}
.lms-brand .accent {
  color: var(--blue);
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.5);
}
.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18) 0%, rgba(4, 8, 20, 0.9) 100%);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.4), inset 0 0 8px rgba(0, 212, 255, 0.2);
  border: 1.5px solid rgba(0, 212, 255, 0.45);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.lms-brand:hover .brand-logo-img,
.brand-logo-img:hover {
  transform: scale(1.06) rotate(1.5deg);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.75), inset 0 0 10px rgba(0, 255, 198, 0.3);
  border-color: var(--cyan);
}
.brand-logo-img-lg {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  border: 1.5px solid rgba(0, 212, 255, 0.4);
}
.brand-logo-img-sm {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
}
.lms-brand-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--cyan); background: rgba(0, 255, 198, 0.08);
  border: 1px solid rgba(0, 255, 198, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 198, 0.12);
  padding: 2.5px 8px; border-radius: 6px; text-transform: uppercase;
}
.lms-brand-badge::before {
  content: '';
  display: inline-block;
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: liveBadgePulse 2s ease-in-out infinite;
}
@keyframes liveBadgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}
.lms-nav-links {
  display: flex; align-items: center; gap: 3px;
  background: rgba(10, 16, 32, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.25);
  padding: 3px 5px; border-radius: 28px;
  margin-right: auto; margin-left: 12px;
}
.lms-nav-links a {
  font-size: 12.5px; font-weight: 500; color: #94A3B8; letter-spacing: 0.01em;
  padding: 6px 10px; border-radius: 18px;
  text-decoration: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.lms-nav-links a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}
.lms-nav-links a.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 600;
}
.lms-nav-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.lms-nav-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  border-radius: 8px;
  font-size: 12.5px;
  padding: 6px 13px;
  backdrop-filter: blur(8px);
}
.lms-nav-actions .btn-ghost:hover {
  background: rgba(0, 212, 255, 0.09);
  border-color: rgba(0, 212, 255, 0.4);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}
.lms-nav-actions .btn-signout {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5 !important;
}
.lms-nav-actions .btn-signout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FFFFFF !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

/* ==========================================================
   TRYHACKME-STYLE STUDENT PROFILE & ACCOUNT DROPDOWN
   ========================================================== */
.profile-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.profile-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 10px;
  padding: 5px 12px 5px 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-dropdown-trigger:hover,
.profile-dropdown-trigger[aria-expanded="true"] {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.22);
  color: #FFFFFF;
}

.profile-xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #FCD34D;
  background: rgba(252, 211, 77, 0.12);
  border: 1px solid rgba(252, 211, 77, 0.28);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.profile-avatar-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(0, 212, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--cyan);
  flex-shrink: 0;
}

.profile-name-label {
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-caret {
  font-size: 9px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.profile-dropdown-trigger[aria-expanded="true"] .profile-caret {
  transform: rotate(180deg);
  color: var(--cyan);
}

/* Animated Dropdown Menu */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: rgba(8, 12, 28, 0.96);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 212, 255, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.18s;
  pointer-events: none;
}

.profile-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.profile-dropdown-userinfo {
  padding: 10px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.profile-dropdown-name {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-email {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.profile-dropdown-item:hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyan);
  padding-left: 20px;
}

.profile-dropdown-item.text-danger {
  color: #F87171;
}

.profile-dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #FCA5A5;
}

@media (max-width: 640px) {
  .profile-name-label { display: none; }
}

@media (max-width: 420px) {
  .profile-dropdown-trigger { padding: 4px 8px 4px 4px; gap: 6px; }
  .profile-xp-pill { padding: 2px 5px; font-size: 10.5px; }
  .profile-avatar-icon { width: 22px; height: 22px; font-size: 11px; }
  .profile-dropdown-menu { right: -10px; min-width: 210px; }
}

/* ==========================================================
   RESPONSIVE NAVIGATION & HAMBURGER SYSTEM
   ========================================================== */

/* Small Laptop Navigation Tuning (1024px to 1280px) */
@media (min-width: 993px) and (max-width: 1280px) {
  .lms-nav-inner { padding: 0 16px 0 14px; gap: 8px; }
  .lms-brand { font-size: 16px; gap: 8px; }
  .brand-logo-img { width: 32px; height: 32px; }
  .lms-brand-badge { display: none; }
  .lms-nav-links { gap: 2px; padding: 3px 4px; }
  .lms-nav-links a { padding: 5px 8px; font-size: 11.5px; gap: 4px; }
  .lms-nav-actions { gap: 6px; }
  .lms-nav-actions .btn { padding: 6px 10px; font-size: 11.5px; }
}

/* Hamburger Toggle Button */
.lms-mobile-toggle {
  display: none;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 9px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}
.lms-mobile-toggle:hover {
  border-color: var(--blue);
  background: rgba(0, 212, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
}
.lms-mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.25s ease;
}
.lms-mobile-toggle.active {
  border-color: var(--blue);
  background: rgba(0, 212, 255, 0.18);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.45);
}
.lms-mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--blue);
}
.lms-mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.lms-mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--blue);
}

/* Mobile Slide-Down Drawer */
.lms-mobile-drawer {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(4, 8, 20, 0.98);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-bottom: 1.5px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 212, 255, 0.12);
  padding: 20px 24px 28px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.lms-mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.lms-mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lms-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}
.lms-mobile-link:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.35);
  color: var(--cyan);
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--cyan);
}
.lms-mobile-link.active {
  background: rgba(0, 212, 255, 0.16);
  border-color: var(--blue);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2), inset 3px 0 0 var(--cyan);
}
.lms-mobile-drawer-actions {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Mobile Nav Backdrop */
.lms-nav-backdrop {
  position: fixed;
  inset: 0;
  top: 68px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lms-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Tablet & Mobile Nav Media Query */
@media (max-width: 992px) {
  .lms-nav-inner { padding: 0 16px 0 14px; }
  .lms-nav-links { display: none !important; }
  .lms-mobile-toggle { display: flex !important; }
  .lms-mobile-drawer { display: flex; }
  .lms-brand-badge { display: none; }
  .lms-nav-actions .btn-ghost:not(.btn-signout) { display: none; }
}

@media (max-width: 640px) {
  .profile-name-label { max-width: 75px; }
}

@media (max-width: 480px) {
  .lms-nav-inner { padding: 0 12px 0 10px; }
  .lms-brand span:not(.accent) { font-size: 15px; }
  .brand-logo-img { width: 30px; height: 30px; }
  .lms-mobile-drawer { padding: 16px 16px 24px; }
  .lms-nav-actions { gap: 6px; }
  .btn-signout span:last-child { display: none; }
  .btn-signout { padding: 6px 9px !important; }
  .profile-name-label { display: none; }
  .profile-dropdown-trigger { padding: 4px 8px 4px 6px; gap: 6px; }
  .profile-xp-pill { font-size: 11px; padding: 2px 6px; }
}

/* ==========================================================
   GLOBAL NEON SKY-BLUE BUTTON DESIGN SYSTEM
   Professional Cybersecurity Dark Neon Standard
   ========================================================== */

/* Base Button Properties (Unified for .btn, .admin-btn, and form submits) */
.btn,
.admin-btn,
button:not([class]),
input[type="submit"]:not([class]),
button[type="submit"]:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  vertical-align: middle;
  position: relative;
  outline: none;
}

/* 1. PRIMARY ACTION BUTTON - NEON SKY-BLUE */
.btn-primary,
.admin-btn-primary,
.nav-cta-premium,
.btn-register,
.tw-cta,
button[type="submit"]:not(.btn-ghost):not(.btn-danger):not(.admin-btn-secondary):not(.admin-btn-danger):not(.admin-btn-ghost):not(.modal-close):not(.mobile-sidebar-toggle):not(.lms-mobile-toggle):not(.nav-mobile-toggle):not(.badge) {
  background: linear-gradient(135deg, #00D4FF 0%, #38BDF8 100%) !important;
  color: #030816 !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.38), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  text-shadow: none !important;
}

/* Primary Button Hover State */
.btn-primary:hover,
.admin-btn-primary:hover,
.nav-cta-premium:hover,
.btn-register:hover,
.tw-cta:hover,
button[type="submit"]:not(.btn-ghost):not(.btn-danger):not(.admin-btn-secondary):not(.admin-btn-danger):not(.admin-btn-ghost):not(.modal-close):not(.mobile-sidebar-toggle):not(.lms-mobile-toggle):not(.nav-mobile-toggle):not(.badge):hover {
  background: linear-gradient(135deg, #38BDF8 0%, #00F0FF 100%) !important;
  color: #000000 !important;
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.7), 0 0 45px rgba(0, 212, 255, 0.3) !important;
  transform: translateY(-1.5px) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Primary Button Active / Pressed State */
.btn-primary:active,
.admin-btn-primary:active,
.nav-cta-premium:active,
.btn-register:active,
.tw-cta:active,
button[type="submit"]:not(.btn-ghost):not(.btn-danger):not(.admin-btn-secondary):not(.admin-btn-danger):not(.admin-btn-ghost):not(.modal-close):not(.mobile-sidebar-toggle):not(.lms-mobile-toggle):not(.nav-mobile-toggle):not(.badge):active {
  transform: translateY(1px) scale(0.99) !important;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.45) !important;
}

/* Primary Button Focus State */
.btn-primary:focus-visible,
.admin-btn-primary:focus-visible,
.nav-cta-premium:focus-visible,
.btn-register:focus-visible,
.tw-cta:focus-visible,
button[type="submit"]:focus-visible {
  outline: 2px solid #00D4FF !important;
  outline-offset: 3px !important;
}

/* Primary Button Disabled State */
.btn-primary:disabled,
.btn-primary.disabled,
.admin-btn-primary:disabled,
.admin-btn-primary.disabled,
button[type="submit"]:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
  background: rgba(0, 212, 255, 0.35) !important;
  color: rgba(3, 8, 22, 0.7) !important;
}

/* 2. SECONDARY / GHOST / CANCEL BUTTONS - DARK CYBERSECURITY THEME */
.btn-ghost,
.admin-btn-secondary,
.admin-btn-ghost {
  background: rgba(10, 20, 42, 0.6) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(0, 212, 255, 0.28) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.btn-ghost:hover,
.admin-btn-secondary:hover,
.admin-btn-ghost:hover {
  background: rgba(0, 212, 255, 0.1) !important;
  border-color: #00D4FF !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3) !important;
  transform: translateY(-1.5px) !important;
}

.btn-ghost:active,
.admin-btn-secondary:active,
.admin-btn-ghost:active {
  transform: translateY(1px) !important;
  box-shadow: none !important;
}

/* 3. DESTRUCTIVE / DANGER BUTTONS (DELETE, REVOKE) */
.btn-danger,
.admin-btn-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #FCA5A5 !important;
  font-weight: 600 !important;
}

.btn-danger:hover,
.admin-btn-danger:hover {
  background: #EF4444 !important;
  border-color: #DC2626 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
  transform: translateY(-1.5px) !important;
}

.btn-danger:active,
.admin-btn-danger:active {
  transform: translateY(1px) !important;
}

/* 4. SUCCESS BUTTONS */
.btn-success,
.admin-btn-success {
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #86EFAC !important;
  font-weight: 600 !important;
}

.btn-success:hover,
.admin-btn-success:hover {
  background: #22C55E !important;
  border-color: #16A34A !important;
  color: #030816 !important;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6) !important;
  transform: translateY(-1.5px) !important;
}

/* 5. BUTTON SIZES */
.btn-sm,
.admin-btn-sm {
  padding: 6px 14px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  gap: 6px !important;
}

.btn-lg {
  padding: 14px 28px !important;
  font-size: 15px !important;
  border-radius: 10px !important;
}

/* 6. SIGNOUT BUTTON */
.btn-signout,
.admin-sidebar-logout-btn,
.admin-topbar-logout,
.nav-signout-btn {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #FCA5A5 !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.btn-signout:hover,
.admin-sidebar-logout-btn:hover,
.admin-topbar-logout:hover,
.nav-signout-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #EF4444 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Status Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
.badge-free { background: rgba(34,197,94,0.12); color: #4ADE80; border: 1px solid rgba(34,197,94,0.25); }
.badge-paid { background: rgba(0,212,255,0.12); color: var(--cyan); border: 1px solid rgba(0,212,255,0.25); }
.badge-published { background: rgba(34,197,94,0.15); color: #86EFAC; border: 1px solid rgba(34,197,94,0.3); }
.badge-draft { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
.badge-archived { background: rgba(148,163,184,0.15); color: var(--muted); border: 1px solid var(--line); }

/* ==========================================================
   GLOBAL FORM CONTROLS & INPUT SYSTEM (DARK CYBERSECURITY NEON)
   Unified across Public, Student Portal, and Admin Portal
   ========================================================== */

:root {
  --input-bg: #070D1E;
  --input-bg-focus: #091228;
  --input-border: rgba(0, 212, 255, 0.28);
  --input-border-hover: rgba(0, 212, 255, 0.55);
  --input-border-focus: #00D4FF;
  --input-glow: 0 0 0 3px rgba(0, 212, 255, 0.18), 0 0 16px rgba(0, 212, 255, 0.28);
  --input-placeholder: rgba(148, 163, 184, 0.55);
  --input-radius: 8px;
  color-scheme: dark;
}

.form-group { margin-bottom: 20px; }

.form-label,
label.admin-label {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Master Selector for All Text Inputs, Textareas, and Dropdowns */
.form-control,
.admin-input,
.admin-search-input,
.filter-input,
.search-input,
input[type="text"]:not(#termInput),
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--input-radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 14px;
  line-height: 1.4;
  box-sizing: border-box;
  color-scheme: dark;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Hover State */
.form-control:hover,
.admin-input:hover,
.admin-search-input:hover,
.filter-input:hover,
.search-input:hover,
input[type="text"]:not(#termInput):hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="datetime-local"]:hover,
textarea:hover,
select:hover {
  border-color: var(--input-border-hover);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.12);
}

/* Focus & Active State (Neon Glow) */
.form-control:focus,
.admin-input:focus,
.admin-search-input:focus,
.filter-input:focus,
.search-input:focus,
input[type="text"]:not(#termInput):focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
  outline: none;
  background-color: var(--input-bg-focus);
  border-color: var(--input-border-focus);
  box-shadow: var(--input-glow);
  color: #FFFFFF;
}

/* Placeholder Styling */
::placeholder {
  color: var(--input-placeholder) !important;
  opacity: 1;
}
::-webkit-input-placeholder {
  color: var(--input-placeholder) !important;
}
::-moz-placeholder {
  color: var(--input-placeholder) !important;
}
:-ms-input-placeholder {
  color: var(--input-placeholder) !important;
}

/* Disabled & Read-Only States */
.form-control:disabled,
.admin-input:disabled,
.admin-search-input:disabled,
input:disabled,
textarea:disabled,
select:disabled,
.form-control[readonly],
.admin-input[readonly],
input[readonly],
textarea[readonly] {
  background-color: rgba(15, 23, 42, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(148, 163, 184, 0.45) !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* Error State */
.is-invalid,
.has-error .form-control,
.has-error .admin-input,
.has-error input,
.has-error select,
.has-error textarea {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 0 15px rgba(239, 68, 68, 0.3) !important;
}

/* Success State */
.is-valid,
.has-success .form-control,
.has-success .admin-input,
.has-success input,
.has-success select,
.has-success textarea {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), 0 0 15px rgba(34, 197, 94, 0.3) !important;
}

/* Textarea Normalization */
textarea,
textarea.form-control,
textarea.admin-input {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

/* Select Dropdown Styling (Dark + Custom Neon Chevron) */
select,
select.form-control,
select.admin-input,
select.admin-search-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300D4FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px;
  padding-right: 38px;
  cursor: pointer;
}

/* Native Option Background Reset */
select option,
select optgroup {
  background-color: #070D1E;
  color: #F8FAFC;
  padding: 10px 14px;
}

/* Checkboxes & Radio Controls */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--blue);
  cursor: pointer;
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.25));
}

/* File Upload Controls */
input[type="file"] {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--muted);
}
input[type="file"]::file-selector-button {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--cyan);
  border-radius: 6px;
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}
input[type="file"]::file-selector-button:hover {
  background: rgba(0, 212, 255, 0.25);
  border-color: var(--blue);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
  color: #FFFFFF;
}

/* Date/Time Picker Calendar Icon Tint */
::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(100%) saturate(400%) hue-rotate(150deg) brightness(1.2);
  cursor: pointer;
}

/* Search Cancel Button Tint */
::-webkit-search-cancel-button {
  filter: invert(0.8) sepia(100%) saturate(400%) hue-rotate(150deg);
  cursor: pointer;
}

/* Range Slider Controls */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(15, 23, 42, 0.8);
  height: 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
  cursor: pointer;
  border: 2px solid #050816;
}

/* Cards & Panels */
.lms-card {
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.lms-card:hover {
  border-color: var(--line-bright);
  box-shadow: 0 10px 30px -10px rgba(0,212,255,0.25);
}

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(3, 5, 13, 0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 18px; width: 100%; max-width: 620px;
  padding: 32px; position: relative; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}
.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; font-size: 20px; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--text); }

/* Table Component */
.table-responsive { width: 100%; overflow-x: auto; }
.lms-table {
  width: 100%; border-collapse: collapse; text-align: left;
  font-size: 13.5px;
}
.lms-table th {
  padding: 12px 16px; font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.25);
}
.lms-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.lms-table tr:hover td { background: rgba(0, 212, 255, 0.03); }

/* Video Player Anti-Piracy Watermark */
.video-stage-container {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 12px; overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}
.video-stage-container iframe, .video-stage-container video {
  width: 100%; height: 100%; border: none; display: block;
}
.video-watermark-overlay {
  position: absolute; z-index: 20; pointer-events: none;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: rgba(255, 255, 255, 0.22); text-shadow: 0 0 4px rgba(0,0,0,0.8);
  transition: all 1.2s ease;
  user-select: none;
}

/* Quiz Assessment Box */
.quiz-container {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px; margin-top: 20px;
}
.quiz-q-title {
  font-family: var(--disp); font-size: 16px; font-weight: 600; margin-bottom: 16px;
}
.quiz-option {
  display: block; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 10px; cursor: pointer;
  transition: all 0.2s ease; background: rgba(0,0,0,0.2);
}
.quiz-option:hover { border-color: var(--blue); background: rgba(0,212,255,0.05); }
.quiz-option.selected { border-color: var(--blue); background: rgba(0,212,255,0.12); }
.quiz-option.correct { border-color: var(--success); background: rgba(34,197,94,0.15); color: #86EFAC; }
.quiz-option.wrong { border-color: var(--red); background: rgba(239,68,68,0.15); color: #FCA5A5; }

/* Gamification Badges & XP */
.xp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FCD34D; font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
.streak-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5; font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}

/* Toast Notifications */
#toastContainer {
  position: fixed; bottom: 24px; right: 24px; z-index: 10000;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto; padding: 12px 20px; border-radius: 10px;
  font-size: 13.5px; font-family: var(--mono); color: #fff;
  background: var(--bg-1); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  transform: translateX(100%); animation: slideInToast 0.3s forwards ease;
}
@keyframes slideInToast { to { transform: translateX(0); } }
.toast.success { border-color: var(--success); background: rgba(10,25,20,0.95); color: #86EFAC; }
.toast.error { border-color: var(--red); background: rgba(30,10,15,0.95); color: #FCA5A5; }

/* ==========================================================
   COMPREHENSIVE RESPONSIVE SYSTEM (Mobile 320px - 1920px+)
   ========================================================== */

/* Strict Desktop Navigation Enforcement (>= 993px) */
@media (min-width: 993px) {
  .lms-mobile-toggle { display: none !important; }
  .lms-mobile-drawer { display: none !important; }
  .lms-nav-backdrop { display: none !important; }
}

/* Responsive Table & Data Wrappers */
.table-responsive,
.admin-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  max-width: 100%;
}
.table-responsive table,
.admin-table-wrapper table {
  min-width: 580px;
}

/* Media, Embeds, and Code Word-Break */
img, video, iframe, canvas, svg {
  max-width: 100%;
}
code, pre {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Responsive Grid Overrides for Tablets & Mobile */
@media (max-width: 900px) {
  [style*="minmax(460px"],
  [style*="minmax(480px"],
  [style*="minmax(440px"] {
    grid-template-columns: 1fr !important;
  }
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .lms-grid,
  .stat-grid,
  .ctf-card-grid,
  .lab-card-grid,
  .jobs-grid,
  .courses-grid,
  .portal-grid,
  [style*="minmax(460px"],
  [style*="minmax(480px"],
  [style*="minmax(440px"],
  [style*="minmax(340px"],
  [style*="minmax(320px"],
  [style*="minmax(280px"] {
    grid-template-columns: 1fr !important;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }

  /* Modals on Mobile Viewports */
  .modal-overlay {
    padding: 12px !important;
  }
  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 16px !important;
    max-height: 92vh !important;
    border-radius: 14px !important;
  }
  .modal-close {
    top: 12px !important;
    right: 12px !important;
  }
  .modal-box [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile Authentication Pages */
@media (max-width: 480px) {
  .auth-screen {
    padding: 16px 12px !important;
  }
  .auth-card {
    padding: 24px 18px !important;
    border-radius: 16px !important;
  }
}

/* Extra Compact Devices (320px to 375px) */
@media (max-width: 375px) {
  .btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }
  .lms-brand span:not(.accent) {
    font-size: 14px !important;
  }
  .lms-mobile-toggle {
    width: 34px !important;
    height: 34px !important;
  }
}

