@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Rajdhani:wght@500;700&display=swap');

/* --- GLOBAL VARIABLES --- */
:root {
    --bg-dark: #0b0f19;
    --card-bg: rgba(20, 25, 40, 0.85);
    --primary: #00f2ea;  /* Cyan */
    --secondary: #7000ff; /* Purple */
    --text: #ffffff;
    --text-muted: #a0a6b5;
    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
    --accent-glow: 0 0 15px rgba(0, 242, 234, 0.6);
}

/* --- RESET & BASIC SETUP --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- NEURAL BACKGROUND CANVAS --- */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%);
}

/* --- LAYOUT STRUCTURE --- */
.wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* --- SIDEBAR (Desktop Default) --- */
.sidebar {
    width: 260px;
    background: rgba(11, 15, 25, 0.95);
    border-right: 1px solid rgba(255,255,255,0.1);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    padding-top: 20px;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.sidebar h2 {
    text-align: center;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 30px;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li a {
    display: block;
    padding: 12px 25px;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: 0.3s;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 500;
}

.sidebar li a:hover, 
.sidebar li a.active {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 242, 234, 0.4);
}

.sidebar li a i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: 260px; /* Same as sidebar width */
    width: calc(100% - 260px);
    padding: 25px;
    transition: 0.3s;
}

/* Top Header Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-menu-btn {
    display: none; /* Hidden on desktop */
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    margin-right: 15px;
}

/* --- DASHBOARD STATS & CARDS --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--accent-glow);
}

.stat-box i {
    color: var(--primary);
    margin-bottom: 15px;
    opacity: 0.8;
}

.stat-box h3 {
    font-size: 2rem;
    margin: 10px 0;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
}

.stat-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- GENERAL UI ELEMENTS --- */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

h2, h3 {
    font-family: 'Rajdhani', sans-serif;
    color: var(--primary);
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
    color: #fff;
    border-radius: 5px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.2);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: #fff;
    border-radius: 50px;
    padding: 12px 30px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 242, 234, 0.6);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

table th {
    background: rgba(255,255,255,0.05);
    color: var(--primary);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
}

table tr:hover {
    background: rgba(255,255,255,0.02);
}

/* --- MOBILE SPECIFIC ELEMENTS --- */

/* Mobile Footer Menu */
.mobile-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0b0f19;
    border-top: 1px solid #333;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 2000;
}

.mobile-footer a {
    color: var(--text-muted);
    text-align: center;
    text-decoration: none;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-footer a i {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* --- RESPONSIVE MEDIA QUERIES (Mobile Slide Logic) --- */
@media (max-width: 768px) {
    /* 1. Hide Sidebar off-screen by default */
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        height: 100%;
        top: 0;
        left: 0;
        position: fixed;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        /* Critical: Use z-index higher than overlay */
        z-index: 1001; 
    }
    
    /* 2. Slide it in when active */
    .sidebar.active {
        transform: translateX(0);
    }

    /* 3. Adjust Main Content */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        padding-bottom: 80px; /* Space for mobile footer */
    }

    /* 4. Show Mobile Elements */
    .mobile-footer { display: flex; }
    .user-menu-btn { display: block !important; }
    
    /* 5. Adjust Typography */
    .hero-content h1 { font-size: 2.5rem; }
    .stat-box h3 { font-size: 1.8rem; }
}

/* Scrollbar Customization */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0b0f19; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }