body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

.container {
    width: 100%;
    max-width: 800px;
    background: #fff;
    padding: 20px 40px 40px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
}

h1#report-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
}

h2 {
    font-size: 1.3rem;
    color: #34495e;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 10px;
    margin-top: 25px;
    margin-bottom: 20px;
}

.config-section {
    margin-bottom: 25px;
}

.date-selectors {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.date-selectors > div {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="date"],
input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
}

.select-all {
    margin-bottom: 10px;
}

.host-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    border: none; /* Quitamos el borde de la lista original */
    padding: 10px 0;
    max-height: none; /* Quitamos la altura máxima y el scroll */
    overflow-y: visible;
}

/* 2. Damos estilo de "tarjeta" a cada .host-item */
.host-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0; /* Quitamos el padding para que la etiqueta lo controle todo */
    text-align: center;
    transition: all 0.2s ease-in-out;
    background-color: #fdfdfd;
    position: relative;
    border-bottom: 1px solid #ddd; /* Anulamos el borde inferior original si existiera */
}

/* 3. La etiqueta <label> ahora es el elemento clickeable principal */
.host-item label {
    display: block;
    width: 100%;
    height: 100%;
    padding: 20px 15px; /* Damos padding a la etiqueta para que llene la tarjeta */
    cursor: pointer;
    font-weight: 500;
    color: #34495e;
    box-sizing: border-box; /* Asegura que el padding no desborde la tarjeta */
}

/* 4. Ocultamos el checkbox original de forma visual pero funcional */
.host-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 5. Efecto visual al pasar el mouse por encima de la tarjeta */
.host-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* 6. ESTE ES EL TRUCO: Cambiamos el estilo del .host-item cuando el checkbox dentro de él está marcado */
.host-item:has(input[type="checkbox"]:checked) {
    border-color: #3498db;
    background-color: #eaf4fc;
    border-width: 2px;
}

/* Opcional: hacemos la letra de la etiqueta más gruesa cuando está seleccionada */
.host-item input[type="checkbox"]:checked + label {
    font-weight: bold;
}
.actions {
    text-align: center;
    margin-top: 40px;
}

#generate-report-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

#generate-report-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#generate-report-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.actions a {
    display: block;
    margin-top: 15px;
    color: #3498db;
    text-decoration: none;
}
.actions a:hover {
    text-decoration: underline;
}

#progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#progress-box {
    position: relative;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

#close-progress-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 2.5rem;
    color: #999;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#close-progress-btn:hover {
    color: #333;
}


/* Añade estas reglas al final de tu bloque <style> en dashboard.html */

/* Hacer que el título parezca un botón */
#group-problems-title {
    cursor: pointer;
    user-select: none; /* Evita que el texto se seleccione al hacer clic */
}

/* Estilo para la flecha indicadora */
.toggle-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

/* Contenedor de problemas: oculto por defecto */
#group-problems-container {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.35s ease-out, padding 0.35s ease-out;
}

/* Estilos para el estado expandido */
#group-problems-section.is-expanded #group-problems-container {
    max-height: 300px; /* La misma altura que teníamos antes */
    padding-top: 15px;
    padding-bottom: 15px;
    overflow-y: auto;
}

#group-problems-section.is-expanded .toggle-arrow {
    transform: rotate(90deg); /* La flecha apunta hacia abajo */
}