body.layout-fixed {
    padding-top: 56px;
}

.wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    min-width: 250px;
    background: #343a40;
    transition: margin-left 0.3s ease, width 0.3s ease;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    align-self: flex-start;
    z-index: 2;
}

.sidebar-nav {
    padding-top: .5rem;
}

.content-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, .7);
    padding: .6rem 1rem;
    border-radius: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .15);
}

.sidebar .nav-link.disabled {
    opacity: .5;
    pointer-events: none;
}

.sidebar .nav-link .fa-chevron-down {
    transition: transform 0.2s;
    font-size: .7rem;
    margin-left: auto;
}

.sidebar .nav-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar .collapse .nav-link {
    padding-left: 2.5rem;
    font-size: .9rem;
}

.sidebar .collapse .collapse .nav-link {
    padding-left: 3.5rem;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
    background: #f4f4f4;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1029;
}

body.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

/* ========== BRAND COLORS ========== */
:root {
    --brand-dark: #2D2926;
    --brand-gold: #F1B434;
}

.bg-brand-dark {
    background-color: #2D2926 !important;
}

.bg-brand-gold {
    background-color: #F1B434 !important;
}

.text-brand-dark {
    color: #2D2926 !important;
}

.text-brand-gold {
    color: #F1B434 !important;
}

.border-brand-dark {
    border-color: #2D2926 !important;
}

.border-brand-gold {
    border-color: #F1B434 !important;
}

.btn-brand {
    color: #fff;
    background-color: #F1B434;
    border-color: #F1B434;
}

.btn-brand:hover {
    color: #fff;
    background-color: #2D2926;
    border-color: #2D2926;
}

.btn-brand:focus,
.btn-brand.focus {
    color: #fff;
    background-color: #2D2926;
    border-color: #2D2926;
    box-shadow: 0 0 0 0.2rem rgba(241, 180, 52, 0.5);
}

.btn-brand.disabled,
.btn-brand:disabled {
    color: #fff;
    background-color: #c8932a;
    border-color: #c8932a;
}

.btn-brand:not(:disabled):not(.disabled):active,
.btn-brand:not(:disabled):not(.disabled).active,
.show > .btn-brand.dropdown-toggle {
    color: #fff;
    background-color: #2D2926;
    border-color: #2D2926;
}

.btn-brand:not(:disabled):not(.disabled):active:focus,
.btn-brand:not(:disabled):not(.disabled).active:focus,
.show > .btn-brand.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(241, 180, 52, 0.5);
}

.btn-outline-brand {
    color: #F1B434;
    border-color: #F1B434;
    background: transparent;
}

.btn-outline-brand:hover {
    color: #fff;
    background-color: #F1B434;
    border-color: #F1B434;
}

.btn-outline-brand:focus,
.btn-outline-brand.focus {
    box-shadow: 0 0 0 0.2rem rgba(241, 180, 52, 0.5);
}

.btn-outline-brand.disabled,
.btn-outline-brand:disabled {
    color: #c8932a;
    border-color: #c8932a;
}

.btn-outline-brand:not(:disabled):not(.disabled):active,
.btn-outline-brand:not(:disabled):not(.disabled).active,
.show > .btn-outline-brand.dropdown-toggle {
    color: #fff;
    background-color: #F1B434;
    border-color: #F1B434;
}

.btn-outline-brand:not(:disabled):not(.disabled):active:focus,
.btn-outline-brand:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-brand.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(241, 180, 52, 0.5);
}

/* ========== LOGIN PAGE ========== */
body.login-page {
    background: linear-gradient(135deg, #2D2926 0%, #1a1a18 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        z-index: 1030;
        margin-left: -250px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.sidebar-show .sidebar {
        margin-left: 0;
    }

    body.sidebar-show .sidebar-overlay {
        display: block;
    }

    body.sidebar-collapsed .sidebar {
        margin-left: -250px;
        width: 250px;
        min-width: 250px;
        overflow: hidden;
    }

    .main-content {
        padding: 1rem;
    }
}
