@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sidebar-bg: #1e1e2f;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --sidebar-width: 260px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f6f9;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- LOGIN PAGE --- */
.login-page {
    background: var(--primary-gradient);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.login-brand-icon {
    background: var(--primary-gradient);
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 28px; margin: 0 auto 15px;
}
.btn-login {
    background: var(--primary-gradient);
    border: none; padding: 12px; border-radius: 10px; font-weight: 600;
}

/* --- LAYOUT STRUCTURE --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    z-index: 1050;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 25px;
    transition: all 0.3s ease;
    min-height: 100vh;
}

/* --- SIDEBAR ITEMS --- */
.sidebar-header {
    padding: 25px;
    background: #161625;
    border-bottom: 1px solid #2c2c44;
    color: white;
}
.sidebar a {
    padding: 15px 25px;
    display: block;
    color: #aeb2b7;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}
.sidebar a:hover, .sidebar a.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left: 4px solid #e14eca;
    padding-left: 21px; /* Compensate border */
}
.sidebar a i { width: 30px; text-align: center; }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 991px) {
    .sidebar {
        left: -100%; /* Hide completely */
        width: 280px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    }
    .sidebar.active {
        left: 0; /* Slide in */
    }
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    /* Dark Overlay for Mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active {
        display: block;
    }
}

/* --- COMPONENTS --- */
.stat-card {
    background: #fff; border-radius: 12px; padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-left: 5px solid;
    margin-bottom: 15px;
}
.stat-card.primary { border-color: #667eea; }
.stat-card.success { border-color: #28a745; }
.stat-card.warning { border-color: #ffc107; }

.navbar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    padding: 10px 15px;
}

/* --- TABLES & FORMS --- */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.table th { background: #f8f9fa; font-weight: 600; border-top: none; }
.profile-pic-small { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }

/* --- PRINT --- */
.print-header { display: none; }
@media print {
    .sidebar, .navbar, .no-print { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    .print-header { display: block !important; text-align: center; margin-bottom: 20px; border-bottom: 2px solid #000; }
}