.app-navbar {
    position: sticky;
    top: 0;
    z-index: 10000;
    min-height: 74px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
    font-family: var(--font-main, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    min-width: 0;
}

.dashboard-body .app-navbar {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) auto;
    width: 100%;
}

.dashboard-body .nav-center {
    justify-content: center;
    gap: clamp(18px, 2vw, 34px);
}

.nav-left .nav-logo {
    font-size: 22px;
    font-weight: 800;
    color: #12243c;
    letter-spacing: -0.04em;
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-link::before {
    content: "";
    width: 28px;
    height: 28px;
    display: inline-block;
    border-radius: 8px;
    background: #f7fbfd url("/img/finanzicons/flaticon-4523532.png") center / 21px 21px no-repeat;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: #42556a;
    text-decoration: none;
    position: relative;
    padding: 6px 0;
    transition: 0.22s ease;
}

.nav-admin-link[hidden] {
    display: none !important;
}

.nav-link:hover {
    color: #0f172a;
    transform: translateY(-1px);
}

.nav-group {
    position: relative;
    padding-bottom: 18px;
    margin-bottom: -18px;
}

.nav-group::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 18px;
}

.nav-summary {
    gap: 8px;
    cursor: pointer;
}

.nav-summary:hover {
    transform: none;
}

.nav-summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.nav-group:hover .nav-summary::after,
.nav-group:focus-within .nav-summary::after {
    transform: rotate(225deg);
    margin-top: 2px;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 240px;
    padding: 10px;
    display: grid;
    gap: 4px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #42556a;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-dropdown-link:hover {
    background: #eef5fb;
    color: #12243c;
}

.nav-link.active {
    color: #0f766e;
    font-weight: 700;
}

.nav-link:not(.nav-summary).active::after,
.nav-link:not(.nav-summary):hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6 0%, #10b981 100%);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.22);
    padding: 7px 11px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 400;
    color: #12243c;
    line-height: 1.2;
    box-shadow: none;
    white-space: normal;
}

.logout-btn:hover {
    color: #12243c;
    background: rgba(255,255,255,0.65);
}

@media (max-width: 1100px) {
    .app-navbar,
    .dashboard-body .app-navbar {
        display: flex;
        flex-wrap: wrap;
        padding: 12px 18px;
        height: auto;
        min-height: 0;
    }

    .nav-center,
    .dashboard-body .nav-center {
        order: 3;
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
        gap: 14px;
        padding-bottom: 4px;
    }

    .nav-group,
    .nav-center > .nav-link {
        width: 100%;
    }

    .nav-center > .nav-link {
        padding: 10px 0;
    }

    .nav-dropdown {
        position: static;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        margin-top: 10px;
        box-shadow: none;
        border-radius: 14px;
        background: rgba(248, 251, 253, 0.95);
    }
}

@media (max-width: 720px) {
    .app-navbar,
    .dashboard-body .app-navbar {
        padding: 12px 14px;
    }

    .nav-left,
    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .nav-right {
        justify-content: flex-end;
    }

    .nav-center {
        gap: 10px;
    }
}
