body {
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background-color: #f4f6f9; /* subtle gray background */
}

/* Sidebar Layout */
#wrapper {
    display: flex;
    transition: all 0.3s ease;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: 250px;
    margin-left: -250px; /* Hidden by default on mobile */
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Show when toggled on mobile */
#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

#sidebar-wrapper .list-group-item {
    border: none;
    padding: 1rem 1.5rem;
    color: #a0aec0 !important;
    transition: all 0.2s ease-in-out;
    position: relative;
}

#sidebar-wrapper .list-group-item:hover,
#sidebar-wrapper .list-group-item:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    padding-left: 2rem;
}

#sidebar-wrapper .list-group-item i {
    width: 25px;
    text-align: center;
}

/* Content Area */
#page-content-wrapper {
    width: 100%;
    min-width: 100vw;
    transition: all 0.3s ease;
    background-color: #f4f6f9;
}

@media (min-width: 768px) {
    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }
}

/* Dashboard Cards */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}

/* Tables */
.table {
    vertical-align: middle;
}
.table th {
    font-weight: 600;
    color: #4a5568;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

/* Floating Labels Forms */
.form-floating > label {
    color: #718096;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #3182ce;
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] body {
    background-color: #121212 !important;
}

[data-bs-theme="dark"] #page-content-wrapper {
    background-color: #121212 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e1e1e !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2b2b2b !important;
}

[data-bs-theme="dark"] .table th {
    background-color: #2b2b2b !important;
    color: #e2e8f0;
    border-bottom: 2px solid #4a5568;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #2b2b2b;
}

[data-bs-theme="dark"] .form-control, 
[data-bs-theme="dark"] .form-select {
    background-color: #2b2b2b;
    border-color: #4a5568;
    color: #fff;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .navbar {
    background-color: #1e1e1e !important;
    border-bottom: 1px solid #2b2b2b !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2b2b2b;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #3f3f3f;
    color: #fff;
}
