/* 
 * madjuoFinX Sci-Fi CSS Framework
 * Theme: Blue & Orange Futuristic Design
 * Author: madjuoFinX Development Team
 */

/* Import Futuristic Fonts - OPTIMIZED (2 fonts only) */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== ROOT VARIABLES - SCI-FI COLOR PALETTE ===== */
:root {
  /* Primary Colors - Enhanced for WCAG AA Contrast */
  --neon-blue: #00BFFF;
  --neon-blue-text: #33CFFF; /* Lighter for better contrast on dark bg */
  --cyber-orange: #FF8C00;
  --cyber-orange-text: #FFB347; /* Lighter for text - 4.5:1 contrast ratio */
  --dark-space-grey: #0E1117;
  --silver-white: #E6E8EB;
  
  /* Tertiary Colors - Extended Palette */
  --neon-purple: #9D4EDD;
  --neon-cyan: #00FFF5;
  --neon-magenta: #FF006E;
  --chart-blue: #00BFFF;
  --chart-orange: #FF8C00;
  --chart-purple: #9D4EDD;
  --chart-cyan: #00FFF5;
  --chart-magenta: #FF006E;
  
  /* Gradient Colors */
  --gradient-glow-start: #0E1117;
  --gradient-glow-end: #10253E;
  --blue-gradient-start: #00BFFF;
  --blue-gradient-end: #0080FF;
  --orange-gradient-start: #FF8C00;
  --orange-gradient-end: #FFB347;
  
  /* Secondary Colors */
  --deep-space-blue: #0A1628;
  --electric-blue: #1E90FF;
  --neon-cyan: #00FFFF;
  --warm-orange: #FF7F50;
  --dark-orange: #CC7000;
  
  /* Neutral Colors */
  --space-black: #000000;
  --cosmic-grey: #2C3E50;
  --light-silver: #F8F9FA;
  --medium-grey: #6C757D;
  --border-glow: rgba(0, 191, 255, 0.3);
  
  /* Text Opacity - Improved for readability (WCAG AA) */
  --text-white-primary: rgba(255, 255, 255, 1);
  --text-white-secondary: rgba(255, 255, 255, 0.85); /* Was 0.5 - now 4.5:1 contrast */
  --text-white-tertiary: rgba(255, 255, 255, 0.7);   /* Was 0.25 - now readable */
  --text-white-disabled: rgba(255, 255, 255, 0.4);
  
  /* Focus Indicators */
  --focus-ring-color: #00BFFF;
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;
  
  /* Glow Effects — reduced intensity */
  --blue-glow: 0 0 12px rgba(0, 191, 255, 0.18);
  --orange-glow: 0 0 12px rgba(255, 140, 0, 0.18);
  --subtle-glow: 0 0 8px rgba(0, 191, 255, 0.08);
  --intense-glow: 0 0 20px rgba(0, 191, 255, 0.25);
  
  /* Typography - OPTIMIZED (2 fonts only) */
  --font-heading: 'Orbitron', sans-serif;
  --font-content: 'Inter', sans-serif;
  --font-data: 'Inter', monospace;
  --font-navigation: 'Orbitron', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-round: 50%;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===== GLOBAL RESET AND BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Force dark mode on all browsers including mobile Chrome/Safari */
html, body {
  color-scheme: dark !important;
  -webkit-color-scheme: dark !important;
}

body {
  font-family: var(--font-content);
  background: linear-gradient(135deg, var(--gradient-glow-start) 0%, var(--gradient-glow-end) 100%) !important;
  color: var(--silver-white) !important;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Elegant Sci-Fi Background Pattern - Performance Optimized */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    /* Subtle diagonal scanlines */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 191, 255, 0.02) 2px,
      rgba(0, 191, 255, 0.02) 4px
    ),
    /* Hexagonal grid pattern - vertical */
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 86px,
      rgba(0, 191, 255, 0.03) 86px,
      rgba(0, 191, 255, 0.03) 87px
    ),
    /* Hexagonal grid pattern - diagonal 1 */
    repeating-linear-gradient(
      60deg,
      transparent,
      transparent 86px,
      rgba(0, 191, 255, 0.025) 86px,
      rgba(0, 191, 255, 0.025) 87px
    ),
    /* Hexagonal grid pattern - diagonal 2 */
    repeating-linear-gradient(
      120deg,
      transparent,
      transparent 86px,
      rgba(0, 191, 255, 0.025) 86px,
      rgba(0, 191, 255, 0.025) 87px
    ),
    /* Ambient glow top-left (blue) */
    radial-gradient(
      ellipse at 20% 20%,
      rgba(0, 191, 255, 0.08) 0%,
      transparent 50%
    ),
    /* Ambient glow bottom-right (orange) */
    radial-gradient(
      ellipse at 80% 80%,
      rgba(255, 140, 0, 0.06) 0%,
      transparent 50%
    ),
    /* Subtle center highlight */
    radial-gradient(
      circle at 50% 50%,
      rgba(0, 191, 255, 0.03) 0%,
      transparent 60%
    );
  background-size: 
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    800px 800px,
    800px 800px,
    1200px 1200px;
  background-position: 
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    center center;
  animation: elegantBackgroundPulse 15s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
}

@keyframes elegantBackgroundPulse {
  0%, 100% { 
    opacity: 0.8;
    transform: scale(1);
  }
  50% { 
    opacity: 0.9;
    transform: scale(1.02);
  }
}

/* ===== TYPOGRAPHY SYSTEM - MOBILE FIRST ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile First Typography - Start with mobile sizes */
h1 {
  font-size: 1.5rem; /* 24px mobile */
  color: var(--neon-blue);
  text-shadow: var(--blue-glow);
}

h2 {
  font-size: 1.25rem; /* 20px mobile */
  color: var(--electric-blue);
}

h3 {
  font-size: 1.125rem; /* 18px mobile */
  color: var(--silver-white);
}

h4 {
  font-size: 1rem; /* 16px mobile */
  color: var(--silver-white);
}

h5, h6 {
  font-size: 0.875rem; /* 14px mobile */
  color: var(--medium-grey);
}

/* Tablet Typography */
@media (min-width: 768px) {
  h1 {
    font-size: 2rem; /* 32px tablet */
  }

  h2 {
    font-size: 1.5rem; /* 24px tablet */
  }

  h3 {
    font-size: 1.25rem; /* 20px tablet */
  }

  h4 {
    font-size: 1.125rem; /* 18px tablet */
  }

  h5, h6 {
    font-size: 1rem; /* 16px tablet */
  }
}

/* Desktop Typography */
@media (min-width: 1024px) {
  h1 {
    font-size: 2.5rem; /* 40px desktop */
  }

  h2 {
    font-size: 2rem; /* 32px desktop */
  }

  h3 {
    font-size: 1.5rem; /* 24px desktop */
  }

  h4 {
    font-size: 1.25rem; /* 20px desktop */
  }

  h5, h6 {
    font-size: 1rem; /* 16px desktop */
  }
}

p {
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.text-glow {
  text-shadow: var(--blue-glow);
}

.text-orange-glow {
  color: var(--cyber-orange);
  text-shadow: var(--orange-glow);
}

.text-data {
  font-family: var(--font-data);
  font-weight: 500;
  color: var(--neon-cyan);
}

/* ===== UTILITY CLASSES ===== */
.neon-blue { color: var(--neon-blue); }
.cyber-orange { color: var(--cyber-orange); }
.silver-white { color: var(--silver-white); }
.electric-blue { color: var(--electric-blue); }

.bg-dark-space { background-color: var(--dark-space-grey); }
.bg-deep-space { background-color: var(--deep-space-blue); }
.bg-cosmic { background-color: var(--cosmic-grey); }

.glow-blue { box-shadow: var(--blue-glow); }
.glow-orange { box-shadow: var(--orange-glow); }
.glow-subtle { box-shadow: var(--subtle-glow); }

/* ===== GLASS MORPHISM EFFECTS ===== */
.glass {
  background: rgba(14, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 191, 255, 0.2);
  border-radius: var(--radius-md);
}

.glass-intense {
  background: rgba(14, 17, 23, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 191, 255, 0.4);
  box-shadow: var(--subtle-glow);
}

/* ===== BUTTON SYSTEM - MOBILE FIRST ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem; /* 10px 16px mobile */
  font-family: var(--font-navigation);
  font-weight: 600;
  font-size: 0.75rem; /* 12px mobile */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  outline: none;
}

/* Tablet Buttons */
@media (min-width: 768px) {
  .btn {
    padding: 0.75rem 1.25rem; /* 12px 20px tablet */
    font-size: 0.875rem; /* 14px tablet */
    border-radius: var(--radius-md);
  }
}

/* Desktop Buttons */
@media (min-width: 1024px) {
  .btn {
    padding: var(--space-sm) var(--space-lg); /* 8px 24px desktop */
    font-size: 0.9rem; /* 14.4px desktop */
  }
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Primary Button - Neon Blue */
.btn-primary {
  background: linear-gradient(135deg, var(--blue-gradient-start), var(--blue-gradient-end));
  color: white;
  border: 1px solid var(--neon-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--blue-glow);
  background: linear-gradient(135deg, var(--electric-blue), var(--neon-blue));
}

/* Secondary Button - Cyber Orange */
.btn-secondary {
  background: linear-gradient(135deg, var(--orange-gradient-start), var(--orange-gradient-end));
  color: white;
  border: 1px solid var(--cyber-orange);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--orange-glow);
  background: linear-gradient(135deg, var(--cyber-orange), var(--warm-orange));
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--neon-blue);
  border: 2px solid var(--neon-blue);
}

.btn-ghost:hover {
  background: rgba(0, 191, 255, 0.1);
  box-shadow: var(--subtle-glow);
  color: white;
}

/* Large Button */
.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
}

/* Small Button */
.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
}

/* ===== CARD SYSTEM - MOBILE FIRST ===== */
.card {
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 191, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 0.875rem; /* 14px mobile */
  margin-bottom: 1rem; /* 16px mobile */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  
  /* Performance: CSS Containment */
  contain: layout style paint;
}

/* Tablet Cards */
@media (min-width: 768px) {
  .card {
    padding: 1.25rem; /* 20px tablet */
    margin-bottom: 1.25rem; /* 20px tablet */
    border-radius: var(--radius-lg);
  }
}

/* Desktop Cards */
@media (min-width: 1024px) {
  .card {
    padding: var(--space-lg); /* 24px desktop */
    margin-bottom: var(--space-lg); /* 24px desktop */
  }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  transition: left 0.5s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--subtle-glow);
  border-color: rgba(0, 191, 255, 0.4);
}

.card:hover::before {
  left: 100%;
}

.card-header {
  border-bottom: 1px solid rgba(0, 191, 255, 0.2);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--neon-blue);
  margin-bottom: var(--space-sm);
}

.card-body {
  color: var(--silver-white);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-navigation);
  font-weight: 600;
  color: var(--silver-white);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-content);
  font-size: 1rem;
  color: var(--silver-white);
  background: rgba(14, 17, 23, 0.8);
  border: 2px solid rgba(0, 191, 255, 0.3);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--neon-blue);
  box-shadow: var(--subtle-glow);
  background: rgba(14, 17, 23, 0.9);
}

.form-control::placeholder {
  color: var(--medium-grey);
}

/* ===== NAVIGATION STYLES ===== */
.navbar {
  background: rgba(14, 17, 23, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 191, 255, 0.2);
  padding: var(--space-md) 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--neon-blue);
  text-decoration: none;
  text-shadow: var(--blue-glow);
}

.nav-link {
  font-family: var(--font-navigation);
  font-weight: 600;
  color: var(--silver-white);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-blue);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--neon-blue);
  background: rgba(0, 191, 255, 0.1);
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link.active {
  color: var(--neon-blue);
  background: rgba(0, 191, 255, 0.15);
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  width: 280px;
  height: calc(100vh - 70px);
  background: rgba(14, 17, 23, 0.95);
  backdrop-filter: blur(15px);
  border-right: 1px solid rgba(0, 191, 255, 0.2);
  padding: var(--space-lg);
  overflow-y: auto;
  z-index: var(--z-sticky);
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.sidebar-hidden {
  transform: translateX(-100%);
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--silver-white);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-blue), transparent);
  transition: width 0.3s ease;
}

.sidebar-item:hover {
  background: rgba(0, 191, 255, 0.1);
  color: var(--neon-blue);
  transform: translateX(5px);
}

.sidebar-item:hover::before {
  width: 4px;
}

.sidebar-item.active {
  background: rgba(0, 191, 255, 0.15);
  color: var(--neon-blue);
  box-shadow: var(--subtle-glow);
}

.sidebar-item.active::before {
  width: 4px;
}

.sidebar-icon {
  width: 24px;
  height: 24px;
  margin-right: var(--space-md);
  transition: all 0.3s ease;
}

.sidebar-item:hover .sidebar-icon {
  filter: drop-shadow(0 0 5px var(--neon-blue));
  transform: scale(1.1);
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  margin-left: 280px;
  margin-top: 70px;
  padding: var(--space-xl);
  min-height: calc(100vh - 70px);
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-hidden {
  margin-left: 0;
}

/* ===== MODAL SYSTEM ===== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  /* Performance: CSS Containment */
  contain: layout style paint;
}

.modal-content {
  background: rgba(14, 17, 23, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 191, 255, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--blue-glow);
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px rgba(0, 191, 255, 0.5); }
  50% { box-shadow: 0 0 20px rgba(0, 191, 255, 0.8); }
  100% { box-shadow: 0 0 5px rgba(0, 191, 255, 0.5); }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Animation Classes */
.pulse { animation: pulse 2s infinite; }
.glow-animation { animation: glow 2s infinite; }
.slide-in-right { animation: slideInRight 0.5s ease-out; }
.slide-in-left { animation: slideInLeft 0.5s ease-out; }
.fade-in-up { animation: fadeInUp 0.6s ease-out; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .main-content {
    padding: var(--space-md);
  }
  
  .card {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
    margin-bottom: var(--space-sm);
  }
  
  .modal-dialog {
    margin: var(--space-md);
    max-width: calc(100vw - 2rem);
  }
}

/* ===== LOADING STATES ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 191, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--neon-blue);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 17, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 191, 255, 0.3);
  border-top: 4px solid var(--neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }

/* ===== MOBILE-FIRST DASHBOARD IMPROVEMENTS ===== */

/* Base mobile styles for stats cards */
.stat-icon {
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-data {
    line-height: 1.2;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

/* Mobile dashboard cards spacing */
.dashboard-card {
    margin-bottom: 0.75rem;
}

/* Tablet improvements (768px+) */
@media (min-width: 768px) {
    .stat-icon {
        min-width: 40px;
    }
    
    .text-data {
        font-size: 1.125rem !important;
    }
    
    .form-label {
        font-size: 0.8rem !important;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    /* Card padding improvements */
    .card-body.p-2 {
        padding: 1rem !important;
    }
}

/* Desktop improvements (1024px+) */
@media (min-width: 1024px) {
    .stat-icon {
        min-width: 48px;
    }
    
    .stat-icon i {
        font-size: 1.5rem !important;
    }
    
    .text-data {
        font-size: 1.25rem !important;
    }
    
    .form-label {
        font-size: 0.9rem !important;
    }
    
    .dashboard-card {
        margin-bottom: 1.25rem;
    }
    
    /* Enhanced desktop card padding */
    .card-body.p-2 {
        padding: 1.5rem !important;
    }
}/* Sci-Fi Animated Background with Connected Particles */
.sci-fi-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a0a0a 0%, #000000 100%);
    z-index: -10;
    overflow: hidden;
}

.sci-fi-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Background Grid Pattern */
.sci-fi-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 150, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 150, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 0 0;
    animation: grid-move 20s linear infinite;
    opacity: 0.3;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Ambient Lighting Effects */
.sci-fi-background::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 150, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: ambient-pulse 8s ease-in-out infinite alternate;
}

@keyframes ambient-pulse {
    0% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Particle System CSS (fallback) */
.particle-system {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #00d4ff;
    border-radius: 50%;
    box-shadow: 0 0 6px #00d4ff, 0 0 12px #00d4ff;
    animation: particle-float 15s infinite linear;
}

.particle.orange {
    background: #ff6b35;
    box-shadow: 0 0 6px #ff6b35, 0 0 12px #ff6b35;
}

.particle:nth-child(odd) {
    animation-duration: 20s;
    animation-delay: -5s;
}

.particle:nth-child(3n) {
    animation-duration: 18s;
    animation-delay: -8s;
}

.particle:nth-child(4n) {
    animation-duration: 22s;
    animation-delay: -12s;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Scan Line Effect */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    animation: scan-line-move 6s linear infinite;
    opacity: 0.6;
}

@keyframes scan-line-move {
    0% {
        top: -2px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Energy Waves */
.energy-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: energy-wave-expand 4s ease-out infinite;
}

.energy-wave:nth-child(2) {
    animation-delay: 1s;
}

.energy-wave:nth-child(3) {
    animation-delay: 2s;
}

@keyframes energy-wave-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        border-width: 2px;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        border-width: 0;
    }
}

/* Corner Accents */
.corner-accent {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #00d4ff, #ff6b35) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: subtract;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
}

.corner-accent.top-left {
    top: 20px;
    left: 20px;
    border-top: 2px solid #00d4ff;
    border-left: 2px solid #00d4ff;
    animation: corner-glow 3s ease-in-out infinite alternate;
}

.corner-accent.top-right {
    top: 20px;
    right: 20px;
    border-top: 2px solid #00d4ff;
    border-right: 2px solid #00d4ff;
    animation: corner-glow 3s ease-in-out infinite alternate-reverse;
}

.corner-accent.bottom-left {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px solid #ff6b35;
    border-left: 2px solid #ff6b35;
    animation: corner-glow 3s ease-in-out infinite alternate;
}

.corner-accent.bottom-right {
    bottom: 20px;
    right: 20px;
    border-bottom: 2px solid #ff6b35;
    border-right: 2px solid #ff6b35;
    animation: corner-glow 3s ease-in-out infinite alternate-reverse;
}

@keyframes corner-glow {
    0% {
        opacity: 0.3;
        filter: drop-shadow(0 0 5px currentColor);
    }
    100% {
        opacity: 0.8;
        filter: drop-shadow(0 0 15px currentColor);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sci-fi-background::before {
        background-size: 30px 30px;
        /* Performance: Disable animation on mobile */
        animation: none;
    }
    
    .sci-fi-background::after {
        /* Performance: Disable ambient pulse on mobile */
        animation: none;
        opacity: 0.2;
    }
    
    .corner-accent {
        width: 60px;
        height: 60px;
        /* Performance: Disable corner glow on mobile */
        animation: none;
        opacity: 0.5;
    }
    
    .particle {
        width: 2px;
        height: 2px;
    }
    
    /* Performance: Reduce particle count on mobile */
    .particle:nth-child(n+6) {
        display: none;
    }
}

/* Performance optimizations - only for actively animated elements */
.sci-fi-background .particle:not(.static),
.sci-fi-background .grid-line:not(.static),
.sci-fi-background .floating-element:not(.static) {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* Static elements don't need will-change */
.sci-fi-background .static {
    will-change: auto;
}

/* Performance: Limit particle rendering on lower-end devices */
@media (max-width: 768px) {
    .particle-system {
        display: none; /* Hide on mobile for performance */
    }
    
    .scan-line,
    .energy-wave {
        display: none; /* Disable heavy effects on mobile */
    }
}

/* Reduce animations on lower-end devices */
@media (prefers-reduced-motion: reduce) {
    .sci-fi-background * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        will-change: auto !important;
    }
}/* ======================================== */
/* FUTURISTIC SCI-FI BUTTON SYSTEM v2.0   */
/* ======================================== */

.sci-fi-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px; /* Mobile first - smaller padding */
    border: none;
    border-radius: 6px;
    font-family: var(--font-navigation);
    font-weight: 600;
    font-size: 12px; /* Mobile first - smaller font */
    text-transform: uppercase;
    letter-spacing: 1px; /* Mobile first - less letter spacing */
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9); /* Default text color - brighter */
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
    
    /* Performance: CSS Containment */
    contain: layout style;
    
    /* Metallic base texture */
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Primary Neon Blue Button */
.sci-fi-btn.btn-neon-blue {
    color: #ffffff;
    border: 1px solid #00d4ff;
    background: linear-gradient(145deg, #001a2e 0%, #002844 50%, #00141f 100%);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(0, 212, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.sci-fi-btn.btn-neon-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.4) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
    z-index: -1;
}

.sci-fi-btn.btn-neon-blue:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: #33ddff;
    background: linear-gradient(145deg, #002a3e 0%, #003854 50%, #00242f 100%);
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.5),
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(0, 212, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.sci-fi-btn.btn-neon-blue:hover::before {
    left: 100%;
}

.sci-fi-btn.btn-neon-blue:active {
    transform: translateY(0);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Secondary Neon Orange Button */
.sci-fi-btn.btn-neon-orange {
    color: #ffffff;
    border: 1px solid #ff6b35;
    background: linear-gradient(145deg, #2e1a00 0%, #442800 50%, #1f1400 100%);
    box-shadow: 
        0 0 20px rgba(255, 107, 53, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 107, 53, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.sci-fi-btn.btn-neon-orange::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 107, 53, 0.4) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
    z-index: -1;
}

.sci-fi-btn.btn-neon-orange:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: #ff8855;
    background: linear-gradient(145deg, #3e2a00 0%, #543800 50%, #2f2400 100%);
    box-shadow: 
        0 0 30px rgba(255, 107, 53, 0.5),
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 107, 53, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.sci-fi-btn.btn-neon-orange:hover::before {
    left: 100%;
}

.sci-fi-btn.btn-neon-orange:active {
    transform: translateY(0);
    box-shadow: 
        0 0 20px rgba(255, 107, 53, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Button Sizes */
.sci-fi-btn.btn-sm {
    padding: 10px 20px;
    font-size: 12px;
    letter-spacing: 1px;
}

.sci-fi-btn.btn-lg {
    padding: 18px 36px;
    font-size: 16px;
    letter-spacing: 2px;
}

.sci-fi-btn.btn-xl {
    padding: 22px 44px;
    font-size: 18px;
    letter-spacing: 2.5px;
}

/* Button with Icon */
.sci-fi-btn .btn-icon {
    margin-right: 8px;
    font-size: 1.1em;
    filter: drop-shadow(0 0 3px currentColor);
}

.sci-fi-btn .btn-icon.icon-right {
    margin-right: 0;
    margin-left: 8px;
}

/* Loading State */
.sci-fi-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.sci-fi-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: sci-fi-btn-spin 1s linear infinite;
}

@keyframes sci-fi-btn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disabled State */
.sci-fi-btn:disabled,
.sci-fi-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Button Group */
.sci-fi-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.sci-fi-btn-group .sci-fi-btn {
    margin: 0;
}

/* Mobile First Responsive Design */
/* Tablet sizes */
@media (min-width: 768px) {
    .sci-fi-btn {
        padding: 12px 20px;
        font-size: 13px;
        letter-spacing: 1.2px;
        border-radius: 7px;
    }
    
    .sci-fi-btn.btn-sm {
        padding: 8px 16px;
        font-size: 11px;
    }
    
    .sci-fi-btn.btn-lg {
        padding: 16px 28px;
        font-size: 15px;
    }
    
    .sci-fi-btn.btn-xl {
        padding: 20px 36px;
        font-size: 17px;
    }
}

/* Desktop sizes */
@media (min-width: 1024px) {
    .sci-fi-btn {
        padding: 14px 28px;
        font-size: 14px;
        letter-spacing: 1.5px;
        border-radius: 8px;
    }
    
    .sci-fi-btn.btn-sm {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .sci-fi-btn.btn-lg {
        padding: 18px 36px;
        font-size: 16px;
    }
    
    .sci-fi-btn.btn-xl {
        padding: 22px 44px;
        font-size: 18px;
        letter-spacing: 2.5px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .sci-fi-btn {
        padding: 8px 12px;
        font-size: 11px;
        letter-spacing: 0.8px;
    }
    
    .sci-fi-btn-group {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .sci-fi-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .sci-fi-btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .sci-fi-btn-group .sci-fi-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .sci-fi-btn-group .sci-fi-btn:last-child {
        margin-bottom: 0;
    }
}

/* Special Effect Classes */
.sci-fi-btn.pulse {
    animation: sci-fi-pulse 2s infinite;
}

@keyframes sci-fi-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 212, 255, 0.3),
            0 4px 15px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 212, 255, 0.6),
            0 4px 15px rgba(0, 0, 0, 0.4);
    }
}

.sci-fi-btn.btn-neon-orange.pulse {
    animation: sci-fi-pulse-orange 2s infinite;
}

@keyframes sci-fi-pulse-orange {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 107, 53, 0.3),
            0 4px 15px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(255, 107, 53, 0.6),
            0 4px 15px rgba(0, 0, 0, 0.4);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sci-fi-btn {
        border-width: 2px;
    }
    
    .sci-fi-btn.btn-neon-blue {
        color: #ffffff;
        background: #001122;
        border-color: #00d4ff;
    }
    
    .sci-fi-btn.btn-neon-orange {
        color: #ffffff;
        background: #221100;
        border-color: #ff6b35;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sci-fi-btn {
        transition: none;
    }
    
    .sci-fi-btn::before {
        transition: none;
    }
    
    .sci-fi-btn.pulse {
        animation: none;
    }
    
    .sci-fi-btn:hover {
        transform: none;
    }
}

/* ========================================
 * MODAL FIX - CONSISTENT MODAL STYLING
 * ========================================
 * Solusi FINAL untuk blur modal
 * 
 * ROOT CAUSE:
 * - Inline filter:brightness() styles BLOCK all other CSS
 * - backdrop-filter cascade dari parent elements
 * 
 * SOLUTION:
 * - Force remove ALL filters (inline will be removed by JS)
 * - Use BRIGHT colors instead of filters
 * - Prevent backdrop-filter cascade
 */

/* ========================================
   STEP 1: REMOVE ALL FILTERS
   ======================================== */
.modal *,
.modal *[style],
.modal [style*="filter"] {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ========================================
   STEP 2: BACKDROP BLUR (Background Only)
   ======================================== */
.modal-backdrop {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    z-index: 1050 !important;
}

/* ========================================
   STEP 3: MODAL ISOLATION
   ======================================== */
.modal {
    isolation: isolate !important;
    z-index: 1055 !important;
}

.modal-dialog {
    isolation: isolate !important;
}

.modal-content {
    isolation: isolate !important;
    transform: translateZ(0) !important;
}

/* ========================================
   CRITICAL FIX: REMOVE ALL FILTERS
   The inline filter:brightness() styles are causing blur
   We remove them and use BRIGHTER base colors instead
   ======================================== */
.modal *,
.modal *[style*="filter:"] {
    filter: none !important;
    -webkit-filter: none !important;
}

/* Modal Background - SCI-FI DARK MODE */
.modal-content {
    background: #070c18 !important;
    border: 1px solid rgba(0, 200, 255, 0.35) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 200, 255, 0.12) !important;
}

.modal-body {
    background: transparent !important;
}

/* Modal Header - SCI-FI DARK */
.modal-header {
    background: rgba(0, 200, 255, 0.05) !important;
    border-bottom: 1px solid rgba(0, 200, 255, 0.2) !important;
}

.modal-title {
    color: #00C8FF !important;
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.3) !important;
    font-weight: 700 !important;
}

/* Close Button - BRIGHTER */
.modal .btn-close,
.modal .btn-close-white {
    opacity: 1 !important;
}

/* Alert in Modal - BRIGHTER COLORS */
.modal .alert-info {
    background: rgba(0,191,255,0.35) !important; /* More opaque */
    border-color: #00BFFF !important;
    color: #FFFFFF !important;
}

/* Cards in Modal - BRIGHTER */
.modal .cyber-card {
    background: rgba(42, 53, 85, 0.8) !important; /* More opaque */
}

.modal .cyber-card-header {
    background: rgba(0,191,255,0.3) !important; /* More opaque */
}

/* Icons - BRIGHTER COLORS */
.modal i {
    opacity: 1 !important;
}

/* Text Elements - PURE WHITE */
.modal h5,
.modal h6,
.modal strong,
.modal p,
.modal span,
.modal div,
.modal td,
.modal th,
.modal small {
    color: #FFFFFF !important;
}

/* Tables - BRIGHTER BACKGROUNDS */
.modal thead {
    background: rgba(0,191,255,0.35) !important; /* More opaque */
}

.modal .table-dark {
    --bs-table-bg: rgba(42, 53, 85, 0.5) !important;
}

/* Badges - FULL OPACITY */
.modal .badge {
    opacity: 1 !important;
}

/* Footer - Clean Transparent Defaults */
.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Progress Bars - ENHANCED GLOW */
.modal .progress {
    background: rgba(255,255,255,0.3) !important; /* Brighter background */
}

.modal .progress-bar {
    box-shadow: 0 0 20px currentColor !important; /* Stronger glow */
}

/* ========================================
   PREVENT BACKDROP-FILTER CASCADE
   ======================================== */
/* Remove backdrop-filter from elements that might interfere */
body:has(.modal.show) .demo-banner-sticky {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:has(.modal.show) .cyber-card::before {
    animation: none !important;
}

/* ========================================
   MOBILE OPTIMIZATION
   ======================================== */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
    }
    
    /* Slightly reduce brightness on mobile for battery */
    .modal * {
        filter: brightness(1.1) !important;
    }
    
    .modal-title,
    .modal th,
    .modal strong {
        filter: brightness(1.2) !important;
    }
}

/* ========================================
   LANDSCAPE MOBILE FIX
   ======================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .modal-dialog {
        margin: 0.5rem auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem !important;
    }
}

/* ========================================
   ACCESSIBILITY: REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   ACCESSIBILITY: FOCUS INDICATORS
   ======================================== */
/* Visible focus for keyboard navigation */
*:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.25);
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced focus for buttons */
button:focus-visible,
.btn:focus-visible,
.sci-fi-btn:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.4), var(--blue-glow);
    z-index: 10;
}

/* Enhanced focus for form inputs */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: 0;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--neon-blue);
    color: var(--space-black);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    top: 0;
}

/* ========================================
   ACCESSIBILITY: SCREEN READER ONLY
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ========================================
   ACCESSIBILITY: TOUCH TARGETS (Min 44x44px)
   ======================================== */
.btn,
.sci-fi-btn,
button,
.hud-icon-btn,
a.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
}

.btn-sm,
.sci-fi-btn.btn-sm {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 1rem;
}

/* Icon-only buttons need explicit sizing */
.hud-icon-btn,
.tutorial-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   ACCESSIBILITY: IMPROVED TEXT CLASSES
   ======================================== */
.text-white-50 {
    color: var(--text-white-secondary) !important; /* Improved from 0.5 to 0.85 opacity */
}

.text-white-25 {
    color: var(--text-white-tertiary) !important; /* Improved from 0.25 to 0.7 opacity */
}

.text-neon-blue {
    color: var(--neon-blue-text) !important; /* Use lighter variant for text */
}

.text-neon-orange,
.text-cyber-orange {
    color: var(--cyber-orange-text) !important; /* Use lighter variant for text */
}