/* =====================================================
   Portal Navigation — persona-aware tab bar
   Sits below the main header for authenticated users.
   Uses the same design tokens as the onboarding module.
   ===================================================== */

/* Degraded state warning */
.portal-nav-degraded {
    background: #FEF3C7;
    color: #92400E;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    border-bottom: 1px solid #FDE68A;
    font-family: 'Inter', sans-serif;
}
.portal-nav-degraded i { margin-right: 6px; }

.portal-nav {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.portal-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    gap: 16px;
}

/* ===== Tabs ===== */
.portal-nav__tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.portal-nav__tabs::-webkit-scrollbar { display: none; }

.portal-nav__tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6B7280;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}
.portal-nav__tab:hover {
    color: #4F46E5;
    background: #F9FAFB;
    text-decoration: none;
}
.portal-nav__tab--active {
    color: #4F46E5;
    border-bottom-color: #4F46E5;
    font-weight: 600;
}
.portal-nav__tab i {
    font-size: 0.9rem;
}

/* ===== Badges ===== */
.portal-nav__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}
.portal-nav__badge--primary {
    background: #4F46E5;
    color: white;
}
.portal-nav__badge--warning {
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.6rem;
}
.portal-nav__badge--info {
    background: #DBEAFE;
    color: #1E40AF;
    font-size: 0.6rem;
}
.portal-nav__badge--danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* ===== User info (right side) ===== */
.portal-nav__user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.portal-nav__user-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
}
.portal-nav__user-name i {
    font-size: 1.1rem;
    color: #9CA3AF;
}
.portal-nav__signout {
    font-size: 0.78rem;
    color: #EF4444;
    text-decoration: none;
    font-weight: 500;
}
.portal-nav__signout:hover {
    color: #DC2626;
    text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .portal-nav__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .portal-nav__tabs {
        width: 100%;
        padding: 0 8px;
    }
    .portal-nav__tab {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    .portal-nav__tab span {
        display: none; /* icons only on mobile */
    }
    .portal-nav__tab i {
        font-size: 1.1rem;
    }
    .portal-nav__user {
        display: none; /* user info in main header already */
    }
}

@media (max-width: 480px) {
    .portal-nav__tab {
        padding: 10px 10px;
    }
}
