/* =========================================================
       GLOBAL
    ========================================================= */

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        font-family: Arial, Helvetica, sans-serif;

        background: #F5EEDC;

        color: #111111;

        min-height: 100vh;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    a {
        text-decoration: none;
    }

    button,
    input,
    select,
    textarea {
        font-family: inherit;
    }


    /* =========================================================
       ADMIN LAYOUT
    ========================================================= */

    .admin-layout {
        display: flex;
        min-height: 100vh;
    }


    /* =========================================================
       SIDEBAR
    ========================================================= */

    .admin-sidebar {

        position: fixed;

        top: 0;
        left: 0;

        width: 240px;
        height: 100vh;

        background: #FFFFFF;

        color: #111111;

        display: flex;
        flex-direction: column;

        z-index: 1100;

        overflow-y: auto;

        border-right: 1px solid #E7DFCF;

        transition: transform 0.3s ease;

        scrollbar-width: thin;
        scrollbar-color: #D8D0C1 transparent;
    }

    .admin-sidebar::-webkit-scrollbar {
        width: 5px;
    }

    .admin-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .admin-sidebar::-webkit-scrollbar-thumb {
        background: #D8D0C1;
        border-radius: 10px;
    }


    /* =========================================================
       SIDEBAR BRAND
    ========================================================= */

    .sidebar-brand {

        min-height: 88px;

        display: flex;
        align-items: center;

        padding: 20px 20px;

        border-bottom: 1px solid #EEE8DB;
    }

    .sidebar-brand a {

        display: flex;

        align-items: center;

        gap: 12px;

        color: #111111;
    }

    .sidebar-brand img {

        width: 42px;
        height: 42px;

        object-fit: contain;

        border-radius: 50%;

        flex-shrink: 0;
    }

    .sidebar-brand-text {

        color: #111111;

        font-size: 21px;

        font-weight: 700;

        line-height: 1.05;

        letter-spacing: 0.2px;
    }

    .sidebar-brand-text span {

        display: block;

        color: #B08C21;
    }


    /* =========================================================
       SIDEBAR NAVIGATION
    ========================================================= */

    .sidebar-nav {

        flex: 1;

        padding: 22px 12px;
    }

    .nav-section-title {

        padding: 0 12px;

        margin-bottom: 9px;

        color: #8A8A8A;

        font-size: 10px;

        font-weight: 700;

        text-transform: uppercase;

        letter-spacing: 1.4px;
    }

    .nav-link {

        display: flex;

        align-items: center;

        gap: 12px;

        width: 100%;

        padding: 11px 13px;

        margin-bottom: 4px;

        border-radius: 7px;

        color: #555555;

        font-size: 14px;

        font-weight: 500;

        transition:
            background 0.2s ease,
            color 0.2s ease,
            transform 0.2s ease;
    }

    .nav-link .nav-icon {

        width: 18px;

        flex-shrink: 0;

        text-align: center;
    }

    .nav-link i {

        font-size: 15px;

        color: #777777;

        transition: color 0.2s ease;
    }

    .nav-link:hover {

        background: #F3F0E8;

        color: #111111;

        transform: translateX(2px);
    }

    .nav-link:hover i {

        color: #3F6044;
    }

    .nav-link.active {

        background: #3F6044;

        color: #FFFFFF;

        font-weight: 600;
    }

    .nav-link.active i {

        color: #FFFFFF;
    }


    /* =========================================================
       SIDEBAR USER
    ========================================================= */

    .sidebar-user {

        padding: 15px 14px;

        border-top: 1px solid #EEE8DB;

        background: #FFFFFF;
    }

    .sidebar-user-info {

        display: flex;

        align-items: center;

        gap: 10px;

        padding: 8px 8px 13px;
    }

    .user-avatar {

        width: 34px;
        height: 34px;

        display: flex;

        align-items: center;
        justify-content: center;

        flex-shrink: 0;

        border-radius: 50%;

        background: #3F6044;

        color: #FFFFFF;

        font-size: 13px;

        font-weight: 700;
    }

    .user-details {

        min-width: 0;
    }

    .user-name {

        color: #111111;

        font-size: 13px;

        font-weight: 600;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;
    }

    .user-role {

        margin-top: 3px;

        color: #888888;

        font-size: 10px;

        text-transform: uppercase;

        letter-spacing: 0.8px;
    }

    .logout-link {

        display: flex;

        align-items: center;

        gap: 10px;

        padding: 10px;

        width: 100%;
        border: 0;
        background: transparent;
        text-align: left;
        cursor: pointer;
        font: inherit;

        border-radius: 7px;

        color: #666666;

        font-size: 13px;

        transition:
            background 0.2s ease,
            color 0.2s ease;
    }

    .logout-link:hover {

        background: #F3F0E8;

        color: #111111;
    }

    .logout-link i {

        width: 18px;

        text-align: center;
    }


    /* =========================================================
       SIDEBAR OVERLAY
    ========================================================= */

    .sidebar-overlay {

        display: none;

        position: fixed;

        inset: 0;

        background: rgba(0, 0, 0, 0.35);

        z-index: 1050;

        opacity: 0;

        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {

        display: block;

        opacity: 1;
    }


    /* =========================================================
       MAIN CONTENT
    ========================================================= */

    .admin-main {

        margin-left: 240px;

        width: calc(100% - 240px);

        min-height: 100vh;

        background: #F5EEDC;
    }


    /* =========================================================
       TOPBAR
    ========================================================= */

    .admin-topbar {

        height: 72px;

        display: flex;

        align-items: center;

        justify-content: space-between;

        gap: 15px;

        padding: 0 30px;

        background: #FFFFFF;

        border-bottom: 1px solid #E7DFCF;

        position: sticky;

        top: 0;

        z-index: 900;
    }

    .topbar-left {

        display: flex;

        align-items: center;

        gap: 12px;

        min-width: 0;
    }

    .topbar-title-area {

        min-width: 0;
    }

    .topbar-title {

        color: #111111;

        font-size: 20px;

        font-weight: 700;
    }

    .topbar-subtitle {

        color: #555555;

        font-size: 12px;

        margin-top: 3px;
    }

    .topbar-actions {

        display: flex;

        align-items: center;

        gap: 10px;
    }


    /* =========================================================
       MOBILE MENU BUTTON
    ========================================================= */

    .mobile-menu-button {

        display: none;

        width: 40px;
        height: 40px;

        align-items: center;
        justify-content: center;

        flex-shrink: 0;

        border: 1px solid #DDD6C8;

        border-radius: 7px;

        background: #FFFFFF;

        color: #111111;

        cursor: pointer;

        font-size: 17px;

        transition:
            background 0.2s ease,
            border-color 0.2s ease,
            color 0.2s ease;
    }

    .mobile-menu-button:hover {

        background: #F3F0E8;

        border-color: #CFC6B5;

        color: #3F6044;
    }


    /* =========================================================
       PAGE CONTENT
    ========================================================= */

    .admin-content {

        padding: 30px;
    }


    /* =========================================================
       PAGE HEADER
    ========================================================= */

    .page-header {

        margin-bottom: 26px;
    }

    .page-heading {

        color: #111111;

        font-size: 28px;

        font-weight: 700;

        margin-bottom: 6px;
    }

    .page-description {

        color: #555555;

        font-size: 14px;

        line-height: 1.6;
    }


    /* =========================================================
       CARDS
    ========================================================= */

    .card {

        background: #FFFFFF;

        border: 1px solid #E7DFCF;

        border-radius: 10px;

        box-shadow:
            0 3px 12px rgba(17, 17, 17, 0.04);
    }

    .card-header {

        padding: 20px 22px;

        border-bottom: 1px solid #EEE8DB;
    }

    .card-title {

        color: #111111;

        font-size: 16px;

        font-weight: 700;
    }

    .card-description {

        margin-top: 4px;

        color: #666666;

        font-size: 12px;

        line-height: 1.5;
    }

    .card-body {

        padding: 22px;
    }


    /* =========================================================
       BUTTONS
    ========================================================= */

    .btn {

        display: inline-flex;

        align-items: center;

        justify-content: center;

        gap: 8px;

        padding: 10px 16px;

        border: none;

        border-radius: 7px;

        font-size: 13px;

        font-weight: 600;

        cursor: pointer;

        transition:
            background 0.2s ease,
            transform 0.2s ease,
            box-shadow 0.2s ease;
    }

    .btn-primary {

        background: #3F6044;

        color: #FFFFFF;
    }

    .btn-primary:hover {

        background: #324D37;

        transform: translateY(-1px);

        box-shadow:
            0 4px 10px rgba(63, 96, 68, 0.18);
    }

    .btn-gold {

        background: #B08C21;

        color: #FFFFFF;
    }

    .btn-gold:hover {

        background: #98771A;
    }


    /* =========================================================
       FORMS
    ========================================================= */

    .form-group {

        margin-bottom: 18px;
    }

    .form-label {

        display: block;

        margin-bottom: 7px;

        color: #111111;

        font-size: 13px;

        font-weight: 600;
    }

    .form-control,
    .form-select {

        width: 100%;

        padding: 11px 13px;

        background: #FFFFFF;

        border: 1px solid #DCD4C4;

        border-radius: 7px;

        color: #111111;

        font-family: inherit;

        font-size: 13px;

        outline: none;

        transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease;
    }

    .form-control:focus,
    .form-select:focus {

        border-color: #3F6044;

        box-shadow:
            0 0 0 3px rgba(63, 96, 68, 0.10);
    }


    /* =========================================================
       TABLES
    ========================================================= */

    .table-container {

        width: 100%;

        overflow-x: auto;
    }

    table {

        width: 100%;

        border-collapse: collapse;

        background: #FFFFFF;
    }

    th {

        padding: 13px 15px;

        background: #F8F5EE;

        border-bottom: 1px solid #E7DFCF;

        color: #333333;

        font-size: 11px;

        font-weight: 700;

        text-align: left;

        text-transform: uppercase;

        letter-spacing: 0.5px;
    }

    td {

        padding: 14px 15px;

        border-bottom: 1px solid #EEE8DB;

        color: #333333;

        font-size: 13px;
    }

    tbody tr:hover {

        background: #FCFAF5;
    }


    /* =========================================================
       BADGES
    ========================================================= */

    .badge {

        display: inline-flex;

        align-items: center;

        padding: 5px 9px;

        border-radius: 20px;

        font-size: 11px;

        font-weight: 600;
    }

    .badge-success {

        background: #E5F0E7;

        color: #315C39;
    }

    .badge-warning {

        background: #F7EFD5;

        color: #80651A;
    }

    .badge-danger {

        background: #F5E1DE;

        color: #8A3F35;
    }

    .badge-neutral {

        background: #ECEAE4;

        color: #555555;
    }


    /* =========================================================
       ALERTS
    ========================================================= */

    .alert {

        padding: 12px 15px;

        margin-bottom: 18px;

        border-radius: 7px;

        font-size: 13px;
    }

    .alert-success {

        background: #E5F0E7;

        color: #315C39;

        border: 1px solid #CFE1D2;
    }

    .alert-danger {

        background: #F5E1DE;

        color: #8A3F35;

        border: 1px solid #E8C9C4;
    }

    .alert-warning {

        background: #F7EFD5;

        color: #80651A;

        border: 1px solid #E9DDB8;
    }


    /* =========================================================
       FLASH MESSAGES
    ========================================================= */

    .flash-container {

        margin-bottom: 20px;
    }

    .flash-message {

        padding: 12px 15px;

        margin-bottom: 8px;

        border-radius: 7px;

        font-size: 13px;
    }

    .flash-message.success {

        background: #E5F0E7;

        color: #315C39;

        border: 1px solid #CFE1D2;
    }

    .flash-message.error,
    .flash-message.danger {

        background: #F5E1DE;

        color: #8A3F35;

        border: 1px solid #E8C9C4;
    }

    .flash-message.warning {

        background: #F7EFD5;

        color: #80651A;

        border: 1px solid #E9DDB8;
    }

    .flash-message.info {

        background: #E7EEF4;

        color: #3E5D75;

        border: 1px solid #D0DDE7;
    }


    /* =========================================================
       TABLET
    ========================================================= */

    @media (max-width: 1000px) {

        .admin-sidebar {

            width: 220px;
        }

        .admin-main {

            margin-left: 220px;

            width: calc(100% - 220px);
        }

        .admin-content {

            padding: 24px;
        }

        .admin-topbar {

            padding: 0 24px;
        }
    }


    /* =========================================================
       MOBILE
    ========================================================= */

    @media (max-width: 700px) {

        /* ---------------------------------------------
           SIDEBAR BECOMES A DRAWER
        --------------------------------------------- */

        .admin-sidebar {

            width: 275px;

            transform: translateX(-100%);

            box-shadow:
                8px 0 30px rgba(0, 0, 0, 0.15);
        }

        .admin-sidebar.mobile-open {

            transform: translateX(0);
        }


        /* ---------------------------------------------
           MAIN BECOMES FULL WIDTH
        --------------------------------------------- */

        .admin-main {

            margin-left: 0;

            width: 100%;
        }


        /* ---------------------------------------------
           MOBILE MENU BUTTON
        --------------------------------------------- */

        .mobile-menu-button {

            display: flex;
        }


        /* ---------------------------------------------
           TOPBAR
        --------------------------------------------- */

        .admin-topbar {

            height: 64px;

            padding: 0 15px;
        }

        .topbar-title {

            font-size: 17px;

            white-space: nowrap;

            overflow: hidden;

            text-overflow: ellipsis;
        }

        .topbar-subtitle {

            font-size: 11px;

            white-space: nowrap;

            overflow: hidden;

            text-overflow: ellipsis;
        }


        /* ---------------------------------------------
           CONTENT
        --------------------------------------------- */

        .admin-content {

            padding: 18px 15px;
        }

        .page-heading {

            font-size: 23px;
        }
    }


    /* =========================================================
       SMALL PHONES
    ========================================================= */

    @media (max-width: 480px) {

        .admin-sidebar {

            width: 285px;
        }

        .admin-content {

            padding: 14px 12px;
        }

        .admin-topbar {

            padding: 0 12px;
        }

        .topbar-title {

            font-size: 16px;
        }

        .topbar-subtitle {

            font-size: 10px;
        }

        .page-heading {

            font-size: 21px;
        }

        .card-body {

            padding: 16px;
        }
    }
