/* ============================================ */
/* APP NAVBAR - shared across 4 pages          */
/* Desktop: horizontal links                    */
/* Mobile: hamburger button + slide-down panel */
/* ============================================ */

.app-navbar {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    padding: 4px 10px;
    max-width: 1200px;
    margin: 0 auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
}

.app-navbar-title {
    display: none;
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== DESKTOP (default) ===== */

.app-navbar-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    flex-wrap: nowrap;
}

.app-navbar-list li {
    display: inline-flex;
}

.app-navbar-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: transparent;
    border: 1px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    min-height: 30px;
    -webkit-user-select: none;
    user-select: none;
}

.app-navbar-link:hover {
    background-color: var(--bg-hover);
    color: var(--text);
    border-color: var(--border);
}

.app-navbar-link.active {
    background-color: var(--cursando);
    color: #000;
    border-color: var(--cursando);
    font-weight: 600;
}

.app-navbar-link.active:hover {
    background-color: #4dd8ee;
    color: #000;
}

.app-navbar-toggle {
    display: none;  /* hidden on desktop */
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 5px;
    min-width: 40px;
    min-height: 30px;
    line-height: 1;
    transition: background-color 0.15s;
}

.app-navbar-toggle:hover {
    background-color: var(--bg-hover);
}

.app-navbar-toggle[aria-expanded="true"] {
    background-color: var(--cursando);
    color: #000;
}

/* ===== MOBILE (≤768px) ===== */

@media (max-width: 768px) {
    .app-navbar {
        padding: 3px 6px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .app-navbar-title {
        display: block;
    }

    .app-navbar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-navbar-list {
        display: none;  /* hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 6px 8px;
        background-color: var(--bg-elevated);
        border: 1px solid var(--border);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        z-index: 200;
    }

    .app-navbar-list.open {
        display: flex;
    }

    .app-navbar-list li {
        width: 100%;
    }

    .app-navbar-link {
        width: 100%;
        padding: 8px 12px;
        font-size: 14px !important;
        min-height: 38px !important;
        border-radius: 4px;
        justify-content: flex-start;
    }

    .navbar-online-badge {
        font-size: 10px !important;
        padding: 2px 6px;
        min-height: 22px;
    }
}

/* ===== ONLINE BADGE ===== */

.navbar-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px !important;
    line-height: 1.2 !important;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    white-space: nowrap;
    min-height: 24px;
    font-variant-numeric: tabular-nums;
}


