/* =========================================
   MOBILE BOTTOM NAVIGATION
   ========================================= */

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        padding: 0 12px 12px;
        pointer-events: none;
    }

    .mobile-bottom-nav__bar {
        display: flex;
        align-items: flex-end;
        justify-content: space-around;
        background: rgba(36, 66, 130, 0.92);
        backdrop-filter: blur(18px) saturate(1.8);
        -webkit-backdrop-filter: blur(18px) saturate(1.8);
        border-radius: 22px;
        padding: 6px 8px 10px;
        box-shadow:
            0 -4px 30px rgba(36, 66, 130, 0.25),
            0 4px 20px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
        pointer-events: auto;
        position: relative;
    }

    /* --- Nav Item --- */
    .mobile-bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        padding: 6px 2px 2px;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 14px;
        position: relative;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        border: none;
        background: transparent;
    }

    .mobile-bottom-nav__item:active {
        transform: scale(0.9);
    }

    .mobile-bottom-nav__icon {
        font-size: 1.35rem;
        color: rgba(255, 255, 255, 0.6);
        transition: all 0.25s ease;
        line-height: 1;
        margin-bottom: 3px;
    }

    .mobile-bottom-nav__label {
        font-size: 0.5rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.5);
        letter-spacing: 0.03em;
        transition: all 0.25s ease;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mobile-bottom-nav__item--active .mobile-bottom-nav__icon {
        color: #fff;
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
    }

    .mobile-bottom-nav__item--active .mobile-bottom-nav__label {
        color: #fff;
    }

    .mobile-bottom-nav__item--active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 3px;
        background: linear-gradient(90deg, #5ee2a0, #4fcf70);
        border-radius: 0 0 4px 4px;
        animation: indicatorSlide 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes indicatorSlide {
        from {
            width: 0;
            opacity: 0;
        }

        to {
            width: 20px;
            opacity: 1;
        }
    }

    /* --- Center Logo Button --- */
    .mobile-bottom-nav__center {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        flex: 1;
        position: relative;
        padding: 0 2px 2px;
    }

    .mobile-bottom-nav__logo-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(145deg, #244282, #288c26);
        border: 3px solid rgba(255, 255, 255, 0.25);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: absolute;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%);
        box-shadow:
            0 4px 20px rgba(36, 66, 130, 0.45),
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-nav__logo-btn:active {
        transform: translateX(-50%) scale(0.92);
    }

    .mobile-bottom-nav__logo-btn.active {
        transform: translateX(-50%) rotate(45deg);
        border-color: rgba(94, 226, 160, 0.6);
        box-shadow:
            0 4px 25px rgba(94, 226, 160, 0.35),
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .mobile-bottom-nav__logo-btn img {
        width: 36px;
        height: 36px;
        object-fit: contain;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }

    .mobile-bottom-nav__logo-btn.active img {
        transform: rotate(-45deg);
    }

    .mobile-bottom-nav__center-spacer {
        height: 35px;
    }

    .mobile-bottom-nav__center-label {
        font-size: 0.5rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.5);
        letter-spacing: 0.03em;
        text-transform: uppercase;
        margin-top: 2px;
    }

    /* --- Slide Up Menu Panel --- */
    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1045;
        background: linear-gradient(170deg, #1a3260 0%, #1e4f2e 100%);
        border-radius: 24px 24px 0 0;
        padding: 20px 16px 100px;
        max-height: 70vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow:
            0 -8px 40px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .mobile-menu-panel.show {
        transform: translateY(0);
    }

    .mobile-menu-panel__handle {
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 2px;
        margin: 0 auto 16px;
    }

    .mobile-menu-panel__title {
        font-size: 0.7rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.4);
        text-transform: uppercase;
        letter-spacing: 0.12em;
        padding: 0 8px;
        margin-bottom: 10px;
    }

    .mobile-menu-panel__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 4px;
    }

    .mobile-menu-panel__menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 16px 8px 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        cursor: pointer;
        transition: all 0.25s ease;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-panel__menu-item:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.12);
    }

    .mobile-menu-panel__menu-item--active {
        background: rgba(94, 226, 160, 0.12);
        border-color: rgba(94, 226, 160, 0.25);
    }

    .mobile-menu-panel__menu-icon {
        font-size: 1.5rem;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 8px;
    }

    .mobile-menu-panel__menu-item--active .mobile-menu-panel__menu-icon {
        color: #5ee2a0;
    }

    .mobile-menu-panel__menu-label {
        font-size: 0.7rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.65);
        text-align: center;
        line-height: 1.2;
    }

    .mobile-menu-panel__menu-item--active .mobile-menu-panel__menu-label {
        color: #5ee2a0;
    }

    .mobile-menu-panel__section {
        margin-bottom: 18px;
    }

    .mobile-menu-panel__divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.08);
        margin: 12px 4px;
    }

    /* User card in menu panel */
    .mobile-menu-panel__user-card {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 18px;
    }

    .mobile-menu-panel__user-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 2px solid rgba(94, 226, 160, 0.4);
        object-fit: cover;
    }

    .mobile-menu-panel__user-info {
        flex: 1;
        min-width: 0;
    }

    .mobile-menu-panel__user-name {
        font-size: 0.9rem;
        font-weight: 700;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-menu-panel__user-role {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.45);
    }

    .mobile-menu-panel__logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 14px;
        border-radius: 14px;
        background: rgba(239, 68, 68, 0.12);
        border: 1px solid rgba(239, 68, 68, 0.2);
        color: #fca5a5;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.25s ease;
        margin-top: 8px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-panel__logout-btn:active {
        background: rgba(239, 68, 68, 0.25);
        transform: scale(0.98);
    }

    /* Add padding to body so content doesn't hide behind bottom nav */
    body {
        padding-bottom: 88px;
    }
}