/**
 * Dashboard VoiceBot v4.0
 * Header CSS - Profesional
 */

/* ========================================
   HEADER BASE
   ======================================== */
.header {
    background: var(--gradient-header);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    max-width: 100%;
}

/* ========================================
   LOGOS
   ======================================== */
.header-logos {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.logo-ilumno {
    height: 32px;
    width: auto;
}

/* ========================================
   TÍTULO
   ======================================== */
.header-title {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.header-title h1 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-title h1 span {
    color: var(--color-ilumno);
}

.header-subtitle {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    margin: 0;
}

.v2-badge {
    font-size: var(--font-size-xs);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: var(--border-radius-full);
    margin-left: var(--space-xs);
    font-weight: 600;
}

/* ========================================
   CONTROLES
   ======================================== */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Control Pill (Label + Select en línea) */
.control-pill {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
}

.control-pill label {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.control-pill select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    cursor: pointer;
    min-width: 100px;
    transition: all var(--transition-fast);
}

.control-pill select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.control-pill select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.control-pill select option {
    background: var(--surface-card);
    color: var(--text-primary);
}

/* ========================================
   BOTÓN MENÚ MÓVIL (en header)
   ======================================== */
.header .mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gradient-accent);
    border-radius: var(--border-radius);
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.header .mobile-menu-btn:hover {
    opacity: 0.9;
}

.header .mobile-menu-btn svg {
    width: 22px;
    height: 22px;
}

/* ========================================
   BOTÓN FILTROS (MÓVIL)
   ======================================== */
.btn-filters-mobile {
    display: none;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-filters-mobile:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-filters-mobile svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   BOTÓN REFRESH
   ======================================== */
.btn-refresh {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.btn-refresh svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1100px) {
    .header-title {
        display: none;
    }
    
    .header-content {
        gap: var(--space-md);
    }
}

/* ========================================
   RESPONSIVE - MÓVIL
   ======================================== */
@media (max-width: 768px) {
    .header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .header-content {
        gap: var(--space-sm);
    }
    
    /* Mostrar botón hamburguesa */
    .header .mobile-menu-btn {
        display: flex;
        order: 1;
    }
    
    /* Logo visible */
    .header-logos {
        order: 2;
        flex: 1;
    }
    
    .header-logos .logo-ilumno {
        height: 28px;
    }
    
    /* Título oculto */
    .header-title {
        display: none;
    }
    
    /* Controles a la derecha */
    .header-controls {
        order: 3;
        gap: var(--space-sm);
    }
    
    /* Ocultar selectores desktop */
    .control-pill.desktop-only {
        display: none !important;
    }
    
    /* Mostrar botón filtros */
    .btn-filters-mobile {
        display: flex;
    }
    
    /* Botón refresh */
    .btn-refresh {
        width: 36px;
        height: 36px;
    }
    
    .btn-refresh svg {
        width: 18px;
        height: 18px;
    }
}