/* =========================================================
   NAVEGACIÓN MODERNA SUPERIOR - PROJECTHUB ADMIN
   Topbar limpio: Logo, Buscador Spotlight, Notificaciones, Usuario y Logout
   ========================================================= */
.navbar-gp {
    background-color: rgba(15, 42, 66, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text-light);
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(15, 42, 66, 0.15);
    width: 100%;
}

.nav-container-gp {
    width: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* 1. Izquierda: Toggle & Identidad */
.nav-left-section {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.btn-sidebar-toggle {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-size: 1.35rem;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--dorado-institucional);
    transform: scale(1.04);
}

.nav-brand-gp {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #FFFFFF;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-brand-logo {
    height: 32px;
    width: auto;
    max-width: 155px;
    object-fit: contain;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.25s var(--ease-spring);
}

.nav-brand-gp:hover .nav-brand-logo {
    transform: scale(1.06);
}

.nav-brand-title {
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

.nav-badge-portal {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    background: rgba(217, 177, 90, 0.18);
    border: 1px solid rgba(217, 177, 90, 0.35);
    border-radius: var(--radius-pill);
    color: var(--dorado-institucional);
    letter-spacing: 0.06em;
}

/* 2. Centro: Command Bar / Buscador Amplio */
.nav-center-section {
    flex: 1;
    max-width: 520px;
    margin: 0 1rem;
}

.nav-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.1rem;
    cursor: pointer;
    color: #CBD5E1;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.nav-search-bar:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(217, 177, 90, 0.5);
    color: #FFFFFF;
    box-shadow: 0 0 16px rgba(217, 177, 90, 0.15);
}

.nav-search-icon {
    font-size: 1.2rem;
    color: var(--azul-claro);
    flex-shrink: 0;
}

.nav-search-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94A3B8;
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-search-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav-search-shortcut kbd {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
    font-family: monospace;
    color: #E2E8F0;
}

/* 3. Derecha: Notificaciones, Usuario & Logout */
.nav-right-section {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-shrink: 0;
}

.nav-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
}

/* Notificaciones Bell */
.nav-notifications-wrapper {
    position: relative;
}

.btn-nav-bell {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    position: relative;
    transition: all 0.2s ease;
}

.btn-nav-bell:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--dorado-institucional);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0F2A42;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Dropdown de Notificaciones */
.notifications-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 69, 113, 0.15);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(15, 69, 113, 0.16);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.notif-dropdown-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--azul-institucional);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-mark-read {
    background: transparent;
    border: none;
    color: var(--azul-vivo);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.btn-mark-read:hover {
    background: rgba(23, 105, 168, 0.08);
}

.notif-dropdown-body {
    overflow-y: auto;
    max-height: 350px;
    display: flex;
    flex-direction: column;
}

.notif-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #94A3B8;
    font-size: 0.82rem;
}

.notif-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    text-decoration: none;
    display: block;
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: #F8FAFC;
}

.notif-item.unread {
    background: rgba(23, 105, 168, 0.05);
    border-left: 3px solid var(--azul-vivo);
}

.notif-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.notif-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--azul-institucional);
}

.notif-item-time {
    font-size: 0.68rem;
    color: #94A3B8;
}

.notif-item-msg {
    font-size: 0.76rem;
    color: #475569;
    margin: 0;
    line-height: 1.35;
}

/* Menú de Usuario */
.nav-user-gp {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #FFFFFF;
}

.user-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azul-institucional) 0%, var(--azul-vivo) 100%);
    border: 2px solid rgba(217, 177, 90, 0.4);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name-gp {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-gp {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dorado-institucional);
}

.btn-logout-gp {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #CBD5E1;
    font-size: 1.2rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-logout-gp:hover {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* =========================================================
   MODAL SPOTLIGHT GLOBAL (CTRL + K)
   ========================================================= */
.spotlight-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 42, 66, 0.65);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.spotlight-modal-container {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(23, 105, 168, 0.18);
    overflow: hidden;
    animation: spotlightPop 0.2s ease-out;
}

@keyframes spotlightPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.spotlight-input-wrap {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #E2E8F0;
    gap: 0.75rem;
}

.spotlight-input-wrap i {
    font-size: 1.4rem;
    color: var(--azul-vivo);
}

.spotlight-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1E293B;
    font-family: inherit;
}

.spotlight-esc-pill {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
    font-family: monospace;
    color: #64748B;
}

.spotlight-results-wrap {
    max-height: 360px;
    overflow-y: auto;
    padding: 0.75rem;
}

.spotlight-group-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94A3B8;
    padding: 0.35rem 0.75rem;
    display: block;
}

.spotlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.spotlight-item i {
    font-size: 1.2rem;
    color: var(--azul-vivo);
}

.spotlight-item:hover, .spotlight-item.focused {
    background: #F0F6FC;
    color: var(--azul-institucional);
}

/* =========================================================
   RESPONSIVE TOPBAR
   ========================================================= */
@media (max-width: 992px) {
    .nav-search-text {
        display: none;
    }
    .nav-search-bar {
        padding: 0.45rem 0.75rem;
        justify-content: center;
    }
    .nav-search-shortcut {
        display: none;
    }
    .nav-center-section {
        max-width: 60px;
        margin: 0 0.5rem;
    }
}

@media (max-width: 768px) {
    .user-info-text {
        display: none;
    }
    .nav-divider {
        display: none;
    }
    .nav-badge-portal {
        display: none;
    }
    .nav-container-gp {
        padding: 0 1rem;
    }
}
