:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
    --sidebar-width: 250px;
    --bg-gradient: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
    overflow-x: hidden;
}

/* Auth Pages */
body.auth-page {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-auth {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
.auth-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- DASHBOARD LAYOUT --- */

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-gradient);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar .sidebar-brand {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar ul.nav {
    padding: 1rem 0.5rem;
}

.sidebar .nav-item {
    margin-bottom: 0.5rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
}

.sidebar .nav-link i {
    width: 30px; /* Fixed width for icon alignment */
    text-align: center;
    margin-right: 0.5rem;
}

/* Main Content Wrapper */
.main-content {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 70px;
    background: white;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
    z-index: 900;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Stat Cards (InfoBox) */
.card-dashboard {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
    transition: transform 0.2s ease;
    background: white;
    margin-bottom: 1.5rem;
}

.card-dashboard:hover {
    transform: translateY(-5px);
}

.card-dashboard.border-left-primary { border-left: 0.25rem solid var(--primary-color); }
.card-dashboard.border-left-success { border-left: 0.25rem solid var(--success-color); }
.card-dashboard.border-left-info { border-left: 0.25rem solid var(--info-color); }
.card-dashboard.border-left-warning { border-left: 0.25rem solid var(--warning-color); }

.text-xs {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05rem;
}

.text-gray-300 {
    color: #dddfeb!important;
}

.card-body-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    .main-content {
        margin-left: 0;
    }
    /* Class to show sidebar on mobile */
    .sidebar.show {
        margin-left: 0;
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}