/* DTA-RAMS configurable top navigation — self-contained, no Bootstrap JS. */
.rams-topnav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-image: linear-gradient(90deg, rgb(5, 39, 103) 0%, #3a0647 100%);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.rams-topnav-inner {
    display: flex;
    align-items: center;
    gap: .2rem;
    padding: 0 1rem;
    min-height: 3.25rem;
    flex-wrap: wrap;
}

.rams-brand {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    margin-right: 1rem;
    white-space: nowrap;
}

.rams-brand-accent { color: #6c9bd1; }

/* ── nav items ── */
.rams-nav { display: flex; flex: 1 1 auto; }

.rams-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: .1rem;
}

.rams-nav-item { position: relative; }

.rams-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .8rem;
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    border-radius: 5px;
    font-size: .92rem;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: none;
}

.rams-nav-link:hover,
.rams-nav-grouplabel:hover,
.rams-nav-grouplabel:focus {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.rams-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .22);
    font-weight: 600;
}

.rams-caret { font-size: .7em; opacity: .8; }

/* ── dropdown groups ── */
.rams-nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    padding: .35rem;
    list-style: none;
    margin: .2rem 0 0;
    z-index: 1040;
}

.rams-nav-group:hover .rams-nav-dropdown,
.rams-nav-group:focus-within .rams-nav-dropdown { display: block; }

.rams-nav-sublink {
    display: block;
    padding: .45rem .6rem;
    color: #243b53;
    text-decoration: none;
    border-radius: 4px;
    font-size: .9rem;
    white-space: nowrap;
}

.rams-nav-sublink:hover { background: #eef2f7; color: #052767; }
.rams-nav-sublink.active { background: #e1ecf7; color: #052767; font-weight: 600; }

/* ── right-hand controls ── */
.rams-topnav-right {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: auto;
}

.rams-version {
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    font-size: .8rem;
    white-space: nowrap;
}

.rams-version:hover { color: #fff; text-decoration: underline; }

.rams-user {
    color: rgba(255, 255, 255, .85);
    font-size: .85rem;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rams-signout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .5);
    color: #fff;
    border-radius: 5px;
    padding: .25rem .6rem;
    font-size: .82rem;
    cursor: pointer;
    white-space: nowrap;
}

.rams-signout:hover { background: rgba(255, 255, 255, .15); }

/* ── mobile: CSS-only burger ── */
.rams-nav-toggle,
.rams-burger { display: none; }

@media (max-width: 800px) {
    .rams-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 2.4rem;
        height: 2.2rem;
        margin-left: auto;
        cursor: pointer;
        order: 1;
    }

    .rams-burger span {
        display: block;
        height: 2px;
        width: 1.4rem;
        background: #fff;
        border-radius: 2px;
    }

    .rams-nav {
        order: 3;
        flex-basis: 100%;
        display: none;
    }

    .rams-topnav-right {
        order: 2;
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        gap: .6rem;
        padding: .15rem 0 .5rem;
        display: none;
    }

    .rams-nav-toggle:checked ~ .rams-nav { display: flex; }
    .rams-nav-toggle:checked ~ .rams-topnav-right { display: flex; }

    .rams-nav-list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-bottom: .35rem;
    }

    .rams-nav-link { display: block; }

    .rams-nav-dropdown {
        display: block;          /* always expanded inline on mobile */
        position: static;
        background: rgba(255, 255, 255, .08);
        box-shadow: none;
        margin: 0 0 .25rem .75rem;
        padding: .15rem;
        min-width: 0;
    }

    .rams-nav-sublink { color: rgba(255, 255, 255, .82); }
    .rams-nav-sublink:hover { color: #fff; background: rgba(255, 255, 255, .12); }
    .rams-nav-sublink.active { color: #fff; background: rgba(255, 255, 255, .18); }
}
