/* Admin + Student portal mobile sidebar */
.panel-mobile-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.panel-mobile-topbar.guest-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

body.has-guest-topbar {
    padding-top: 58px;
}

.panel-mobile-title {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    flex-shrink: 0;
}

.panel-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.panel-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.panel-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.panel-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.panel-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 32, 39, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1040;
}

.panel-guest-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #0f2027 0%, #1a3644 100%);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    overflow-y: auto;
}

.panel-guest-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}

.panel-guest-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.panel-guest-nav {
    list-style: none;
    margin: 0;
    padding: 10px 0 20px;
}

.panel-guest-nav a {
    display: block;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-guest-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

body.panel-menu-open {
    overflow: hidden;
}

body.panel-menu-open .panel-mobile-overlay {
    opacity: 1;
    visibility: visible;
}

body.panel-menu-open .panel-sidebar {
    transform: translateX(0);
}

body.panel-guest-open .panel-mobile-overlay {
    opacity: 1;
    visibility: visible;
}

body.panel-guest-open .panel-guest-drawer {
    transform: translateX(0);
}

@media (max-width: 767.98px) {
    .panel-mobile-topbar,
    .panel-mobile-overlay,
    .panel-guest-drawer {
        display: flex;
    }

    .panel-mobile-overlay {
        display: block;
    }

    .panel-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: min(300px, 88vw) !important;
        max-width: 88vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .content {
        padding: 16px !important;
        width: 100%;
    }

    .student-dashboard-header {
        padding-left: 0 !important;
    }
}
