/* ============================================================
   FIXED HEADER - Diseño consistente para todo el sistema ERP
   ============================================================ */

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    color: white;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: var(--z-modal);
}

.fixed-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    color: white;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.company-badge {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 280px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00d9ff;
    color: #00d9ff;
}

/* Ajuste del body para compensar el fixed header */
body {
    padding-top: 80px;
}

/* ===== MOBILE-FIRST Responsive ===== */
/* Base móvil (< 576px) */
.fixed-header {
    padding: 0.5rem 0.75rem;
    flex-wrap: nowrap;
    gap: 0.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-modal);
}

.fixed-header h1 {
    font-size: 0.9rem;
    white-space: nowrap;
}

.company-badge {
    position: static;
    transform: none;
    max-width: 100px;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.user-section {
    gap: 0.5rem;
}

.user-info {
    display: none;
}

.btn-logout {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
}

body {
    padding-top: 50px;
}

/* Small (>= 640px) */
@media (min-width: 640px) {
    .fixed-header {
        padding: 0.75rem 1rem;
    }

    .fixed-header h1 {
        font-size: 1rem;
    }

    .company-badge {
        max-width: 120px;
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .btn-logout {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    body {
        padding-top: 60px;
    }
}

/* Medium (>= 768px) */
@media (min-width: 768px) {
    .fixed-header {
        padding: 1rem 2rem;
        position: sticky;
    }

    .fixed-header h1 {
        font-size: 1.5rem;
    }

    .company-badge {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: none;
        font-size: 0.875rem;
        padding: 0.5rem 1.5rem;
    }

    .user-section {
        gap: 1rem;
    }

    .user-info {
        display: flex;
    }

    .btn-logout {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    body {
        padding-top: 80px;
    }
}
