:root {
    --sidebar-bg: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --sidebar-width: 260px;
    --sidebar-active-bg: rgba(240, 165, 0, 0.15);
    --sidebar-active-border: #f0a500;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --accent-amber: #f0a500;
    --accent-emerald: #0d6832;
    --body-bg: #f0f2f5;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: #333;
    overflow-x: hidden;
}

/* Sidebar Styles */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#sidebar .sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-header .brand-icon {
    font-size: 1.75rem;
    color: var(--accent-amber);
    margin-right: 0.75rem;
}

#sidebar .sidebar-header .brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

#sidebar .sidebar-heading {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-amber);
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 0.5rem;
}

#sidebar .nav {
    flex-grow: 1;
    padding: 0.5rem 1rem;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    border-left: 3px solid transparent;
}

#sidebar .nav-link i {
    width: 1.5rem;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    text-align: center;
}

#sidebar .nav-link:hover {
    color: #fff;
    background-color: var(--sidebar-hover-bg);
}

#sidebar .nav-link.active {
    color: #fff;
    background-color: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active-border);
    font-weight: 600;
}

#sidebar .sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

#sidebar .user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

#sidebar .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-amber);
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 0.75rem;
}

#sidebar .user-details {
    display: flex;
    flex-direction: column;
}

#sidebar .user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

#sidebar .user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Sidebar Scrollbar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}
#sidebar::-webkit-scrollbar-track {
    background: transparent;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Top Navbar Styles */
.top-navbar {
    background-color: #fff;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    z-index: 10;
}

.top-navbar .page-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a2e;
}

/* Main Content Area */
.main-content {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.stat-card {
    border-left: 4px solid var(--accent-amber);
}

.stat-card.emerald {
    border-left-color: var(--accent-emerald);
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card.info {
    border-left-color: #0dcaf0;
}

.stat-card .card-title {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

/* Buttons */
.btn-amber {
    background-color: var(--accent-amber);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
}
.btn-amber:hover {
    background-color: #e59d00;
    color: #1a1a2e;
}

.btn-emerald {
    background-color: var(--accent-emerald);
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-emerald:hover {
    background-color: #0b592b;
    color: #fff;
}

/* Tables */
.table {
    margin-bottom: 0;
}
.table th {
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom-width: 1px;
}
.table td {
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

/* Auth Page */
.auth-page {
    background: var(--sidebar-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon-container {
    width: 64px;
    height: 64px;
    background-color: rgba(240, 165, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.auth-icon {
    font-size: 2rem;
    color: var(--accent-amber);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

/* Utilities */
.text-amber { color: var(--accent-amber) !important; }
.text-emerald { color: var(--accent-emerald) !important; }

/* Responsive */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
        position: fixed;
        z-index: 1040;
    }
    #sidebar.show {
        margin-left: 0;
    }
    #wrapper.toggled #sidebar {
        margin-left: 0;
    }
}

/* Print */
@media print {
    #sidebar, .top-navbar, .btn {
        display: none !important;
    }
    .main-content {
        padding: 0;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
