
/* ============================================================ */
/* MOBILE ICON BUTTONS (bell + hamburger in top bar)            */
/* ============================================================ */
.mobile-icon-btn {
    background: none;
    border: none;
    color: inherit;
    padding: 4px 6px !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-icon-btn:hover {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745 !important;
}

.navbar-toggler {
    color: #333;
    line-height: 1;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

/* ============================================================ */
/* MOBILE MENU MODAL - uses dvh (dynamic viewport height)       */
/* ============================================================ */
.mobile-menu-content {
    height: 100dvh;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
}

.mobile-menu-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================ */
/* MOBILE NOTIFICATION DROPDOWN - Centered on screen            */
/* ============================================================ */
@media (max-width: 991.98px) {
    .notification-dropdown-mobile {
        position: fixed !important;
        top: 70px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        margin: 0 !important;
        max-width: calc(100vw - 30px) !important;
        z-index: 99999 !important;
    }

    .mobile-notification-wrapper {
        position: static !important;
    }
}

@media (max-width: 400px) {
    .notification-dropdown-mobile {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
    }
}

/* ============================================================ */
/* MOBILE MENU GRID � new grouped layout                        */
/* ============================================================ */
#mobileMenuGrid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0 10px;
}

/* Solo (no-children) item � full-width list row */
.mobile-solo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

    .mobile-solo-item:hover {
        background: #fff;
        border-color: #28a745;
        color: #333;
    }

.mobile-solo-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

    .mobile-solo-icon i {
        font-size: 18px;
        color: #28a745;
    }

.mobile-solo-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.mobile-solo-arrow {
    font-size: 16px;
    color: #adb5bd;
}

/* Group card (parent with children) */
.mobile-group-card {
    border-radius: 12px;
    border: 1px solid transparent;
    overflow: hidden;
    background: #f8f9fa;
    transition: border-color 0.2s ease;
}

.mobile-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
}

.mobile-group-header-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mobile-group-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .mobile-group-icon i {
        font-size: 25px;
        color: #28a745;
    }

.mobile-group-title {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
}

.mobile-group-chevron {
    font-size: 13px;
    color: #adb5bd;
    transform: rotate(180deg);
    transition: transform 0.25s ease;
}

/* Children grid inside accordion */
.mobile-group-children {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 10px 10px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-child-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 10px 6px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

    .mobile-child-item:hover {
        border-color: #28a745;
        box-shadow: 0 4px 12px rgba(40,167,69,.15);
        transform: translateY(-1px);
    }

.mobile-child-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

    .mobile-child-icon i {
        font-size: 17px;
        color: #28a745;
    }

.mobile-child-label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #2c3e50;
    line-height: 1.3;
}

/* Responsive: 2 columns on very small screens */
@media (max-width: 400px) {
    .mobile-group-children {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================ */
/* DESKTOP NAVBAR                                               */
/* ============================================================ */
#mainNavbar .dropdown-menu {
    height: fit-content;
    min-width: 250px;
    overflow-y: auto;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 8px;
    margin-top: 8px !important;
}

#mainNavbar .dropdown-item {
    font-size: 14px;
    padding: 0.7rem 1.5rem !important;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

    #mainNavbar .dropdown-item:hover {
        background-color: #f8f9fa !important;
        border-left-color: #28a745 !important;
        padding-left: 2rem !important;
        color: #28a745 !important;
    }

    #mainNavbar .dropdown-item.active {
        border-left-color: #28a745;
        background-color: rgba(40, 167, 69, 0.05);
        color: #28a745 !important;
        font-weight: 600;
    }

@media (min-width: 992px) {
    .navbar-nav .dropdown-menu {
        position: absolute;
    }

        .navbar-nav .dropdown-menu[data-bs-popper] {
            top: 100%;
            left: 0;
            margin-top: 0.125rem;
        }

    .nav-item:last-child .dropdown-menu,
    .nav-item:nth-last-child(2) .dropdown-menu {
        left: auto !important;
        right: 0 !important;
    }
}

#mainNavbar .nav-link {
    transition: all 0.2s ease;
    border-radius: 20px;
    padding: 0.5rem 1rem !important;
}

    #mainNavbar .nav-link:hover {
        background-color: rgba(40, 167, 69, 0.1);
        color: #28a745 !important;
    }

.navbar-nav {
    gap: 1.5rem;
}

.dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

/* ============================================================ */
/* NOTIFICATION DROPDOWN                                        */
/* ============================================================ */
.notification-dropdown .dropdown-item {
    white-space: normal;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

    .notification-dropdown .dropdown-item:last-child {
        border-bottom: none;
    }

    .notification-dropdown .dropdown-item:hover {
        background-color: #f8f9fa;
    }

.notification-unread {
    background-color: #e7f3ff;
}

.notification-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.notification-header {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.notification-body-preview {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 3em;
    line-height: 1.5em;
}

/* ============================================================ */
/* MODALS                                                       */
/* ============================================================ */
.modal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 99998 !important;
}

.modal-fullscreen-md-down {
    margin: 0 !important;
}

/* ============================================================ */
/* RESPONSIVE                                                   */
/* ============================================================ */
@media (max-width: 991.98px) {
    #mobileMenuGrid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mobile-user-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .modal-fullscreen-md-down {
        width: 100vw;
        max-width: none;
    }
}

@media (max-width: 400px) {
    #mobileMenuGrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-user-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}
