/* Shared navigation menu */

#netadm-nav {
    position: relative;
    margin-bottom: 24px;
}

/* Group buttons bar */

.nb {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.nb > .nb-btn {
    flex: 1 1 0;
    justify-content: center;
}


.nb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.nb-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--btn-secondary-hover);
}

.nb-btn--open {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--btn-secondary-hover);
}

.nb-btn--active {
    color: var(--text);
    border-color: var(--accent);
    background: var(--btn-secondary-hover);
}

a.nb-btn {
    text-decoration: none;
}

.nb-arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
    opacity: 0.6;
}

.nb-btn--open .nb-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Dropdown panel */

.np {
    display: none;          /* hidden by default */
    order: 999;             /* desktop: always below all buttons in flex-wrap */
    width: 100%;
    margin-top: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}

.np--open {
    display: grid;
    animation: np-in 0.15s ease;
}

/* Subgroup header inside dropdown panel */
.np-section {
    grid-column: 1 / -1;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 10px 6px 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}
.np-section:first-child { padding-top: 2px; }

@keyframes np-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Nav cards */

.nc {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text);
    cursor: default;
    transition: border-color 0.15s, background 0.15s;
}

a.nc {
    cursor: pointer;
}

a.nc:hover {
    border-color: var(--accent);
    background: var(--btn-secondary-hover);
}

.nc--active {
    border-color: var(--accent);
    background: var(--btn-secondary-hover);
}

.nc--soon {
    opacity: 0.4;
}

.nc-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
}

.nc-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nc-desc {
    font-size: 11px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    /* Accordion: buttons stack vertically, panel opens inline below its button */
    .nb {
        flex-direction: column;
        gap: 4px;
    }
    .nb-btn {
        width: 100%;
        justify-content: space-between;
    }
    .nb-btn--link {
        justify-content: space-between;
    }
    .nb-btn--link::after {
        content: '';
        width: 9px;
        flex-shrink: 0;
    }
    .nb-btn--current {
        display: none;
    }
    .np {
        order: unset;       /* natural DOM order → panel right after its button */
        margin-top: 0;
        border-radius: 0 0 var(--radius) var(--radius);
        grid-template-columns: 1fr;  /* single column */
    }
    .nc-desc {
        display: none;
    }
    .nc {
        align-items: center;
    }
}

/* ── Copyright footer ── */
.copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--copyright, #9aa0c0);
    padding-top: 4px;
}
.copyright a {
    color: var(--copyright, #9aa0c0);
    text-decoration: none;
}
.copyright a:hover {
    color: var(--text);
}
