/* Navigation, off-canvas menus, and account controls */
img.navlogo {
    width: 180px;
    max-width: 100%;
    height: auto;
}

.app-navbar {
    min-height: 72px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1030;
}

.app-nav-offcanvas {
    flex-grow: 1;
}

.app-nav-offcanvas .offcanvas-body {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
}

.app-menu-eyebrow {
    color: var(--primary);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.app-nav-offcanvas .offcanvas-header h2 {
    margin: 2px 0 0;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.app-offcanvas-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.app-offcanvas-toggle:hover,
.app-offcanvas-toggle:focus-visible {
    border-color: rgba(15, 118, 110, .45);
    background: #ecfdf5;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .12);
}

.app-offcanvas-brand {
    display: inline-flex;
    align-items: center;
}

.app-offcanvas-brand img {
    width: 150px;
    max-width: 62vw;
    height: 44px;
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 991.98px) {
    .app-nav-offcanvas.offcanvas {
        top: 0 !important;
        bottom: 0 !important;
        display: flex !important;
        width: min(88vw, 360px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        color: var(--text-dark);
        background-color: var(--surface-nav, #fff) !important;
        border-left: 0;
        box-shadow: -24px 0 60px rgba(15, 23, 42, .20);
    }

    .app-nav-offcanvas .offcanvas-header {
        flex: 0 0 auto;
        min-height: 76px;
        padding: 16px 18px;
        border-bottom: 1px solid #e2e8f0;
        background-color: var(--surface-nav, #fff);
    }

    .app-nav-offcanvas .btn-close {
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        border-radius: 12px;
        background-color: #eef8f6;
        background-size: 14px;
        opacity: 1;
    }

    .app-nav-offcanvas .btn-close:focus-visible {
        box-shadow: 0 0 0 4px rgba(20, 184, 166, .15);
    }

    .app-nav-offcanvas .offcanvas-body {
        display: flex !important;
        flex: 1 1 auto !important;
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
        gap: 12px;
        padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        background-color: var(--surface-nav, #fff) !important;
    }

    .app-nav-offcanvas .app-nav-menu {
        display: flex !important;
        flex: 0 0 auto;
        width: 100%;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        gap: 4px;
    }

    .app-nav-offcanvas .app-nav-actions {
        width: 100%;
        margin-top: 0;
        gap: 10px;
    }

    .app-nav-offcanvas .nav-item {
        width: 100%;
    }

    .app-nav-offcanvas .app-nav-link {
        display: flex;
        width: 100%;
        min-height: 46px;
        align-items: center;
        padding: 12px 14px;
        color: var(--text-dark) !important;
        font-weight: 700;
        border-radius: var(--radius-sm);
    }

    .app-nav-offcanvas .app-nav-link:hover,
    .app-nav-offcanvas .app-nav-link.active {
        color: var(--primary) !important;
        background: rgba(20, 184, 166, .11);
    }

    .app-nav-offcanvas .dropdown-menu {
        position: static !important;
        width: 100%;
        margin: 4px 0 8px;
        border: 1px solid #e2e8f0;
        box-shadow: none;
        transform: none !important;
    }

    .app-nav-offcanvas .app-nav-actions {
        display: flex !important;
        flex: 0 0 auto;
        align-items: stretch !important;
        flex-direction: column !important;
        padding-top: 14px;
        border-top: 1px solid #e2e8f0;
    }

    .app-nav-offcanvas .app-nav-actions + .app-nav-actions {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .app-nav-offcanvas .app-icon-button,
    .app-nav-offcanvas .app-user-toggle {
        display: flex;
        width: 100%;
        min-height: 46px;
        justify-content: flex-start;
        border-radius: 12px;
    }

    .app-nav-offcanvas .app-icon-button {
        height: auto;
        padding: 11px 14px !important;
        border: 1px solid #dcebe8;
        color: #0f172a;
        background: #e9f8f5;
        font-size: 1rem;
        font-weight: 650;
        border-radius: 12px;
    }

    .app-nav-offcanvas .app-user-toggle {
        padding: 6px 10px !important;
        border: 1px solid #dcebe8;
        background: #f3faf8;
    }

    .app-nav-offcanvas .app-user-chip {
        min-width: 0;
        width: 100%;
    }

    .app-nav-offcanvas .app-user-copy {
        min-width: 0;
        max-width: none;
    }

    .app-nav-offcanvas .app-user-copy strong,
    .app-nav-offcanvas .app-user-copy small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-nav-offcanvas .notif-menu {
        position: static !important;
        inset: auto !important;
        display: none;
        width: 100%;
        max-width: 100%;
        max-height: none;
        margin: 8px 0 0;
        transform: none !important;
        border-radius: 12px;
        box-shadow: none;
    }

    .app-nav-offcanvas .notif-menu.show {
        display: block;
    }

    .app-nav-offcanvas .app-icon-button .badge {
        top: 50% !important;
        right: 12px;
        left: auto !important;
        transform: translateY(-50%) !important;
    }
}

@media (min-width: 992px) {
    .app-nav-offcanvas.offcanvas-lg {
        position: static;
        display: flex;
        flex-direction: row;
        width: auto;
        height: auto;
        visibility: visible;
        border: 0;
        background: transparent;
        transform: none;
    }

    .app-nav-offcanvas .offcanvas-body {
        flex-direction: row;
    }
}

.app-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
}

.app-nav-menu {
    gap: 6px;
}

.app-nav-link {
    color: #334155;
    font-weight: 650;
    border-radius: 999px;
    padding: 9px 14px !important;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.app-nav-link:hover,
.app-nav-link:focus,
.app-nav-link.active {
    color: #0f766e !important;
    background: rgba(20, 184, 166, .12);
}

.app-nav-link:hover {
    transform: translateY(-1px);
}

.app-admin-menu,
.app-account-menu {
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.app-admin-menu {
    min-width: 235px;
}

.app-mega-menu {
    overflow: hidden;
}

.app-mega-menu .mega-section {
    list-style: none;
}

.app-mega-menu .mega-section.is-empty {
    display: none;
}

.app-mega-menu .dropdown-header {
    color: #64748b;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-mega-menu .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 40px;
    white-space: normal;
    line-height: 1.22;
}

@media (min-width: 992px) {
    .app-mega-menu {
        right: auto !important;
        left: 50% !important;
        width: min(820px, calc(100vw - 48px));
        max-height: min(70vh, 560px);
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        padding: 14px;
        overflow-y: auto;
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 253, 252, .98));
        transform: translateX(-50%) !important;
    }

    .app-mega-menu.show {
        display: grid !important;
    }

    .app-mega-menu .mega-section {
        min-width: 0;
        padding: 8px;
        border: 1px solid rgba(15, 118, 110, .10);
        border-radius: 12px;
        background: rgba(241, 250, 248, .74);
    }

    .app-mega-menu .dropdown-header {
        padding: 2px 4px 8px;
    }

    .app-mega-menu .dropdown-item {
        padding: 9px 10px;
        border-radius: 10px;
        color: #0f172a;
        font-size: .92rem;
        font-weight: 700;
    }
}

.app-admin-menu .dropdown-item,
.app-account-menu .dropdown-item {
    border-radius: 9px;
    padding: 9px 11px;
    font-weight: 550;
}

.app-admin-menu .dropdown-item:hover,
.app-account-menu .dropdown-item:hover {
    color: #0f766e;
    background: rgba(20, 184, 166, .10);
}

.app-nav-actions {
    gap: 10px;
}

.app-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border-radius: 50%;
    color: #334155;
    background: #f1f5f9;
}

.app-icon-button .badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    border: 2px solid #fff;
    font-size: .68rem;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(225, 29, 72, .28);
}

.app-user-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 5px 12px 5px 6px !important;
    color: #0f172a;
    border-radius: 999px;
    background: #f8fafc;
}

.app-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    vertical-align: middle;
}

.app-user-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: .86rem;
    font-weight: 800;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2dd4bf);
}

.app-user-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.app-user-copy {
    display: inline-flex;
    flex-direction: column;
    min-width: 0;
    max-width: 150px;
    line-height: 1.08;
    text-align: left;
}

.app-user-copy strong,
.app-user-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-copy strong {
    color: #0f172a;
    font-size: .88rem;
    font-weight: 800;
}

.app-user-copy small {
    margin-top: 2px;
    color: #64748b;
    font-size: .7rem;
    font-weight: 650;
    text-transform: capitalize;
}

.app-user-toggle.dropdown-toggle::after {
    margin-left: 8px;
    color: #0f766e;
}

@media (max-width: 991.98px) {
    .app-nav-offcanvas .app-mega-menu {
        display: block;
        padding: 8px;
        overflow: visible;
        border-radius: 14px;
        background: #f8fafc;
    }

    .app-nav-offcanvas .app-mega-menu .mega-section {
        padding: 8px 0;
        border-top: 1px solid #e2e8f0;
    }

    .app-nav-offcanvas .app-mega-menu .mega-section:first-child {
        border-top: 0;
    }

    .app-nav-offcanvas .app-mega-menu .mega-section.is-empty {
        display: none;
    }

    .app-nav-offcanvas .app-mega-menu .dropdown-header {
        padding: 4px 8px 6px;
        color: #64748b;
    }

    .app-nav-offcanvas .app-mega-menu .dropdown-item {
        min-height: 44px;
        padding: 10px 12px;
        border-radius: 10px;
        color: #0f172a;
        font-weight: 700;
    }
}
