.admin-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #f6f9f9;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 22px 14px;
    background: #074447;
    color: #dff6f4;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);

    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.admin-sidebar-brand i {
    color: #0da7ac;
    font-size: 16px;
}

.admin-sidebar-label {
    padding: 0 12px;
    margin-bottom: 8px;

    color: #7fc6c1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ========================================
   COLLAPSIBLE NAVIGATION SECTIONS
======================================== */

.admin-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-nav-section {
    margin-bottom: 8px;
    padding: 0;
    list-style: none;
}

/* Section button */
.admin-nav-section-toggle {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 12px;

    border: none;
    border-radius: 9px;

    background: transparent;
    color: #7fc6c1;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    cursor: pointer;
    text-align: left;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.admin-nav-section-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Section title + icon */
.admin-nav-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
}

.admin-nav-section-title i {
    width: 15px;
    text-align: center;
    font-size: 11px;
}

/* Chevron */
.admin-nav-chevron {
    font-size: 10px;

    transition: transform 0.2s ease;
}

/* Rotate arrow when open */
.admin-nav-section.expanded .admin-nav-chevron {
    transform: rotate(180deg);
}

/* Links container */
.admin-nav-section-links {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    list-style: none;
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
    opacity: 0;
}

/* Open section */
.admin-nav-section.expanded .admin-nav-section-links {
    max-height: 300px;
    opacity: 1;
}

/* Individual link */
.admin-nav-section-links li {
    margin-bottom: 3px;
}

.admin-nav-section-links a {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 10px 12px 10px 36px;

    border-radius: 9px;

    color: #cdeceb;

    font-size: 13.8px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.admin-nav-section-links a i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.admin-nav-section-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-nav-section-links a.active {
    background: #0da7ac;
    color: #fff;
}


/* Sidebar Footer */
.admin-sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;

    color: #f3c9c9;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;

    transition: background 0.15s ease;
}

.admin-sidebar-footer a:hover {
    background: rgba(220, 53, 69, 0.15);
}

/* Main Content */
.admin-main {
    flex: 1;
    min-width: 0;
    padding: 28px 32px;
}

/* Logout Modal */
.logout-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.logout-modal.show {
    display: flex;
}

.logout-modal-content {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 16px;

    background: #fff;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);

    animation: logoutModalIn 0.2s ease;
}

.logout-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 55px;
    height: 55px;
    margin: 0 auto 15px;
    border-radius: 50%;

    background: #fff1f1;
    color: #dc3545;
    font-size: 22px;
}

.logout-modal-content h3 {
    margin: 0 0 8px;

    color: #1f2d3d;
    font-size: 21px;
}

.logout-modal-content p {
    margin: 0 0 24px;

    color: #6c757d;
    font-size: 14px;
}

/* Modal Buttons */
.logout-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.logout-cancel,
.logout-confirm {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.logout-cancel {
    background: #e9ecef;
    color: #495057;
}

.logout-cancel:hover {
    background: #dee2e6;
}

.logout-confirm {
    background: #dc3545;
    color: #fff;
}

.logout-confirm:hover {
    background: #bb2d3b;
    color: #fff;
}

/* Modal Animation */
@keyframes logoutModalIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
/* ========================================
   HAMBURGER MENU
======================================== */

.admin-menu-toggle {
    display: none;

    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    margin-bottom: 20px;

    border: none;
    border-radius: 9px;

    background: #074447;
    color: #fff;

    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.admin-menu-toggle:hover {
    background: #0da7ac;
}

.admin-menu-toggle:active {
    transform: scale(0.95);
}


/* ========================================
   SIDEBAR OVERLAY
======================================== */

.admin-sidebar-overlay {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 9998;

    background: rgba(0, 0, 0, 0.45);
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 860px) {

    .admin-shell {
        display: block;
        width: 100%;
        min-height: 100vh;
    }


    /* Hamburger */
    .admin-menu-toggle {
        display: flex;
        font-size: 28px;
    }


    /* Sidebar */
    .admin-sidebar {
        position: fixed;

        top: 0;
        left: 0;

        z-index: 9999;

        width: 250px;
        height: 100vh;

        box-sizing: border-box;

        padding: 22px 14px;

        display: flex;
        flex-direction: column;

        overflow-y: auto;
        overflow-x: hidden;

        transform: translateX(-100%);

        transition: transform 0.25s ease;

        box-shadow: 8px 0 25px rgba(0, 0, 0, 0.15);
    }


    /* Sidebar opened */
    .admin-sidebar.open {
        transform: translateX(0);
    }


    /* Overlay */
    .admin-sidebar-overlay.show {
        display: block;
    }


    /* Restore desktop sidebar layout */
    .admin-sidebar-brand {
        display: flex;
    }

    .admin-sidebar-label {
        display: block;
    }


    /* Navigation */
    .admin-nav {
        display: block;
    }

    .admin-nav li {
        margin-bottom: 3px;
    }

    .admin-nav a {
        padding: 10px 12px;
        white-space: normal;
    }


    /* Footer */
    .admin-sidebar-footer {
        margin-top: auto;

        margin-left: 0;

        padding-top: 16px;
        padding-left: 0;

        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-left: none;
    }


    /* Main content */
    .admin-main {
        width: 100%;
        min-width: 0;

        padding: 20px;
    }


    /* Prevent background scrolling */
    body.sidebar-open {
        overflow: hidden;
    }
}

