/* --- Estilos Generales --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
}

.main-container {
    max-width: 900px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.header {
    text-align: center;
    margin-bottom: 10px;
}

h1 {
    color: #1c3d5a;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.5em;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.back-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover {
    text-decoration: underline;
}

/* --- Selector de Fechas --- */
.date-selectors {
    display: flex;
    gap: 30px;
}
.date-input {
    flex: 1;
}
.date-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.date-input input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
}

/* --- Grilla de Clientes (Estilo de la imagen) --- */
.select-all-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.host-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

/* Ocultamos el checkbox original */
.host-item input[type="checkbox"] {
    display: none; 
}

/* Estilo del label para que parezca un botón */
.host-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.host-item label:hover {
    border-color: #007bff;
    color: #007bff;
}

/* Estilo para cuando el checkbox está seleccionado */
.host-item input[type="checkbox"]:checked + label {
    background-color: #e3f2fd;
    border-color: #007bff;
    color: #0056b3;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* --- Botón de Acción --- */
.actions {
    margin-top: 10px;
    text-align: center;
}
#generate-report-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
#generate-report-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}
#generate-report-btn:not(:disabled):hover {
    background-color: #218838;
}

/* --- Overlay de Progreso (con spinner) --- */
#progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.progress-box {
    background-color: white;
    padding: 30px 40px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#progress-text {
    font-size: 1.2em;
    color: #333;
}