@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --sidebar-bg: #1e3a8a; /* Deep Blue for Modern Look */
    --sidebar-text: #ffffff;
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
}

body, html {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f5f9;
    overflow: hidden; /* Prevent body scroll */
}

/* --- WRAPPER (Full Screen) --- */
#wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* --- SIDEBAR --- */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s;
    height: 100vh;
    overflow-y: auto;
    z-index: 1030; /* Higher than navbar for mobile overlay */
    position: fixed; /* Fixed position for mobile slide out */
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #152d6b; /* Slightly darker header */
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #f6c23e;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar ul.components { padding: 10px 0; }
#sidebar ul li a {
    padding: 15px 20px;
    font-size: 1.0em;
    display: block;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: 0.3s;
    border-left: 4px solid transparent;
    font-weight: 500;
    opacity: 0.9;
}
#sidebar ul li a:hover {
    background: #152d6b;
    border-left: 4px solid var(--secondary-color);
    opacity: 1;
}

/* Active State Styles */
.active-link { 
    background: #152d6b;
    border-left: 4px solid var(--secondary-color) !important; 
    color: #fff !important; 
    font-weight: 700;
    opacity: 1;
}
.active-parent { 
    color: #fff !important; 
    background: #152d6b;
    font-weight: 700;
}
.active-sub { 
    color: #fff !important; 
    font-weight: 600;
    background: #254a9e !important; 
}
#sidebar ul li ul li a {
    font-size: 0.9em;
    padding: 10px 20px 10px 50px;
    background: #254a9e;
    color: rgba(255,255,255,0.8);
}
#sidebar ul li ul li a:hover {
    background: #2d55b0;
    border-left: 4px solid var(--secondary-color);
}


/* --- CONTENT AREA (Right Side) --- */
#content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 250px; /* Space for fixed sidebar */
    transition: all 0.3s;
}

/* HEADER (Fixed Top) */
.navbar {
    flex-shrink: 0; 
    z-index: 999;
}

/* MAIN SCROLLABLE AREA */
#main-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f4f5f9;
}

/* Custom Scrollbar */
#main-scroll::-webkit-scrollbar { width: 8px; }
#main-scroll::-webkit-scrollbar-track { background: #e0e0e0; }
#main-scroll::-webkit-scrollbar-thumb { background: #b0b0b0; border-radius: 4px; }
#main-scroll::-webkit-scrollbar-thumb:hover { background: #909090; }

/* Mobile Responsive */
@media (max-width: 992px) {
    /* Tablet/Mobile View: Hide sidebar by default, move content to full width */
    #sidebar { margin-left: -250px; }
    #sidebar.active { margin-left: 0; }
    #content { margin-left: 0; }
    
    /* Overlay for content when sidebar is open */
    .overlay {
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 1020;
        display: none;
    }
    .overlay.active { display: block; }
}

/* Login Page Style */
.login-container {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-login {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}