/* ==========================================================================
   eRAsolar Suite - Barra de Navegación Unificada & Suite Switcher
   Diseño Premium: Simetría, Dark Glassmorphism, Micro-interacciones & Cero Solapamiento
   ========================================================================== */

.era-suite-nav-container {
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 40;
}

.era-suite-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(253, 184, 19, 0.08);
    border-radius: 16px;
    padding: 0.6rem 1rem;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* Brand Section in Nav */
.era-suite-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    text-decoration: none;
}

.era-suite-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.era-suite-brand-text {
    display: flex;
    flex-direction: column;
}

.era-suite-title {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.era-suite-title small {
    background: #fdb813;
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.era-suite-sub {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Links & Pills Wrapper */
.era-suite-links {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0;
}

.era-suite-links::-webkit-scrollbar {
    display: none;
}

/* Base Pill Button */
.era-suite-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.era-suite-pill svg,
.era-suite-pill i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.era-suite-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.era-suite-pill:hover svg,
.era-suite-pill:hover i {
    transform: scale(1.1);
}

/* Active Module State */
.era-suite-pill.active {
    background: linear-gradient(135deg, #fdb813, #f59e0b) !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border-color: #fdb813 !important;
    box-shadow: 0 4px 14px rgba(253, 184, 19, 0.35), 0 0 0 1px rgba(253, 184, 19, 0.5) !important;
}

.era-suite-pill.active svg,
.era-suite-pill.active i {
    color: #0f172a !important;
}

/* Backup Special Pill */
.era-suite-pill.backup-pill {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.3);
}

.era-suite-pill.backup-pill:hover {
    background: rgba(14, 165, 233, 0.22);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.25);
}

/* Portal Special Pill */
.era-suite-pill.portal-pill {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.era-suite-pill.portal-pill:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.4);
}

/* Separator divider */
.era-suite-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 0.2rem;
    flex-shrink: 0;
}

/* Admin Special Pill */
.era-suite-pill.admin-pill {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
}

.era-suite-pill.admin-pill:hover {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* User Session Wrapper in Nav */
.era-suite-user-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.era-suite-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.55rem 0.25rem 0.35rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.era-suite-user-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
}

.era-suite-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.era-suite-user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.era-suite-user-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.era-suite-role-badge {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid transparent;
    display: inline-block;
}

.era-suite-logout-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.era-suite-logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.1);
}

.era-suite-logout-btn svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   OPCIÓN A: RIEL DESLIZABLE DE BURBUJAS TÁCTILES (Mobile Responsive Suite Rail)
   Garantiza que los módulos ocupen una sola fila horizontal limpia sin saltos de línea.
   ========================================================================== */
@media (max-width: 900px) {
    .era-suite-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.5rem 0.65rem;
        background: rgba(15, 23, 42, 0.95);
        border-radius: 14px;
        box-sizing: border-box;
    }

    .era-suite-brand {
        justify-content: space-between;
        width: 100%;
    }

    /* Riel horizontal deslizante para pulgar (cero wrapping) */
    .era-suite-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 0.4rem !important;
        padding: 0.2rem 0.15rem 0.35rem 0.15rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .era-suite-links::-webkit-scrollbar {
        display: none !important;
    }

    /* Burbujas Táctiles Compactas */
    .era-suite-pill {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        padding: 0.32rem 0.68rem !important;
        border-radius: 9999px !important;
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        height: 32px !important;
        box-sizing: border-box !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        color: #cbd5e1 !important;
        text-decoration: none !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .era-suite-pill i,
    .era-suite-pill svg {
        width: 13px !important;
        height: 13px !important;
        flex-shrink: 0 !important;
    }

    /* Burbuja Activa Destacada en Dorado SUNERA */
    .era-suite-pill.active {
        background: linear-gradient(135deg, #fdb813, #f59e0b) !important;
        color: #0f172a !important;
        font-weight: 800 !important;
        border-color: #fdb813 !important;
        box-shadow: 0 2px 10px rgba(253, 184, 19, 0.4) !important;
    }

    .era-suite-pill.active i,
    .era-suite-pill.active svg {
        color: #0f172a !important;
    }

    .era-suite-divider {
        display: none !important;
    }

    .era-suite-user-wrapper {
        justify-content: flex-end;
        width: 100%;
    }
}


