/* ============================================================
   HEADER / NAVBAR  — agregar a main.css o como archivo aparte
   ============================================================ */

/* ── Barra principal ──────────────────────────────────────── */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* ── Brand (logo + nombre) ────────────────────────────────── */
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-square {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--kr-blue-industrial, #2c5fa1);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.brand-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

/* ── Nav links ────────────────────────────────────────────── */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a4a6a;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(44, 95, 161, 0.08);
    color: var(--kr-blue-industrial, #2c5fa1);
}

.nav-link.active {
    background: rgba(44, 95, 161, 0.1);
    color: var(--kr-blue-industrial, #2c5fa1);
}

/* ── Acciones (logout) ────────────────────────────────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logout-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.logout-link:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.2);
}

.logout-link i {
    font-size: 0.8rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
        gap: 16px;
    }

    .brand-name {
        display: none;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}