/* CyberCore Design System (patched: sidebar-safe nav + dashboard-friendly layering) */

/* CyberCore Design System */

:root {
    --cyber-blue: #00d9ff;
    --cyber-purple: #c800ff;
    --cyber-pink: #ff00e5;
    --cyber-dark: #0a0e1a;
    --cyber-darker: #050810;
    --cyber-card: #1a1f2e;
    --cyber-white: #ffffff;
    --cyber-gray: #8892b0;
    --cyber-success: #00ff88;
    --cyber-warning: #ffaa00;
    --cyber-danger: #ff4444;
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--cyber-darker);
    color: var(--cyber-white);
    overflow-x: hidden;
}

/* Animated Background */
.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(200, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 0, 229, 0.1) 0%, transparent 40%);
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}



/* Layering helpers (so UI stays clickable above background) */
.cyber-bg, .cyber-grid { pointer-events: none; }
body > .cyber-bg, body > .cyber-grid { z-index: 0; }
main, .main-content, header, footer, .sidebar, .modal { position: relative; z-index: 1; }

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 8, 16, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: var(--cyber-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyber-blue), var(--cyber-purple));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--cyber-blue);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-display);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-purple));
    color: var(--cyber-white);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.6);
}

.btn-secondary {
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--cyber-blue);
    color: var(--cyber-blue);
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, #00ff88, #00d9ff);
    color: var(--cyber-darker);
}

.btn-warning {
    background: linear-gradient(135deg, #ffaa00, #ff6b00);
    color: var(--cyber-darker);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4444, #c800ff);
    color: var(--cyber-white);
}

/* Cards */
.card {
    background: rgba(26, 31, 46, 0.6);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyber-blue), var(--cyber-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--cyber-blue);
    box-shadow: 0 10px 40px rgba(0, 217, 255, 0.3);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.badge-primary {
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-purple));
}

.badge-success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--cyber-success);
    border: 1px solid var(--cyber-success);
}

.badge-warning {
    background: rgba(255, 170, 0, 0.2);
    color: var(--cyber-warning);
    border: 1px solid var(--cyber-warning);
}

.badge-danger {
    background: rgba(255, 68, 68, 0.2);
    color: var(--cyber-danger);
    border: 1px solid var(--cyber-danger);
}

.badge-info {
    background: rgba(0, 217, 255, 0.2);
    color: var(--cyber-blue);
    border: 1px solid var(--cyber-blue);
}

/* Forms */
input, select, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(26, 31, 46, 0.6);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    color: var(--cyber-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--cyber-blue);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 217, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 217, 255, 0.8); }
}

/* Footer */
footer {
    padding: 3rem 2rem;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--cyber-gray);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cyber-blue);
}

.footer-copy {
    color: var(--cyber-gray);
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .logo-img {
        height: 40px;
    }
}


/* Sidebar-safe nav overrides (prevents the global `nav{position:fixed...}` from breaking dashboard sidebars) */
.sidebar nav,
aside.sidebar nav {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: 0 !important;
}

.sidebar nav .nav-container,
aside.sidebar nav .nav-container {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

.sidebar nav .nav-links,
aside.sidebar nav .nav-links {
  display: block !important;
  gap: 0 !important;
  list-style: none !important;
}



/* Allow pages to override body background in page-specific CSS */
body { background: var(--cyber-darker); }

