/* --- Global Variables --- */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-light: #f8f9fa;
    --sidebar-width: 250px;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* --- Login Page Styles --- */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    background: #fff;
}

.login-card h3 {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
}

.form-control {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    border-color: var(--accent-color);
}

.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: #1a252f;
    transform: translateY(-2px);
    color: #fff;
}

.brand-logo {
    color: var(--accent-color);
    font-weight: bold;
}

/* --- Layout & Sidebar Styling --- */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--primary-color);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.945, 0.020, 0.270, 0.665);
    min-height: 100vh;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #1a252f;
    text-align: center;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 15px 25px;
    font-size: 1.1em;
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    transition: 0.3s;
}

#sidebar ul li a:hover {
    color: #fff;
    background: #34495e;
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--accent-color);
}

#content {
    width: 100%;
    padding: 20px;
    background: #f1f2f6;
    transition: all 0.3s;
}

.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* --- Mobile Responsive Features --- */

/* Sidebar Toggle Button for Navbar */
#sidebarCollapse {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    display: none; /* Desktop मा लुक्ने */
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(var(--sidebar-width) * -1); /* मोबाइलमा साइडबार बाहिर पठाउने */
        position: fixed;
        z-index: 1050;
        height: 100%;
    }

    #sidebar.open {
        margin-left: 0; /* Active हुँदा भित्र आउने */
    }

    #sidebarCollapse {
        display: block; /* मोबाइलमा मात्र बटन देखाउने */
    }

    #content {
        padding: 15px;
    }

    .navbar-text {
        font-size: 0.9rem;
    }

    /* Stack Stat Cards */
    .row > .col-md-3 {
        margin-bottom: 20px;
    }

    /* Table Responsiveness */
    .table-responsive {
        border: 0;
    }
}

/* Scrollbar Styling for Sidebar */
#sidebar::-webkit-scrollbar {
    width: 5px;
}
#sidebar::-webkit-scrollbar-thumb {
    background: #34495e;
}