/* --- RESET Y BASE --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: "Poppins", sans-serif; 
}

/* CORRECCIÓN: Permitir scroll si es necesario y altura automática */
html, body {
    width: 100%;
    height: auto !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    /* ELIMINADO: overflow: hidden; */
    overflow-y: auto; /* Seguridad: Si el iframe no crece, permite bajar */
    background-color: #f4f6f9; 
}

.container { 
    width: 100%; 
    max-width: 1500px; 
    margin: 0 auto; 
    
    /* Padding interno para que el contenido no toque los bordes */
    padding: 20px; 
    padding-bottom: 80px; 
    
    /* Forzamos que el contenedor encierre todo el contenido flotante */
    display: block; 
    overflow: visible;
}










/* --- CARDS --- */
.card { 
    background-color: #fff; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    padding: 20px; 
    margin-bottom: 25px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

h2 { 
    font-size: 1.2rem; 
    margin-bottom: 20px; 
    font-weight: 700; 
    color: #000; 
}



/* --- BANNER INFORMATIVO (Icono animado y centrado) --- */
.info-banner {
    background-color: #1a3b8e;
    color: white;
    font-size: 15px;          /* Tamaño base del texto */
    padding: 12px 20px;       /* Un poco más de espacio interno */
    border-radius: 6px;
    
    width: 60%;               /* Aumenté un poco el ancho para que el texto quepa mejor */
    margin: 0 auto 15px auto; /* Centrado en la pantalla */
    
    font-weight: 700;         /* Negrilla */
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    
    /* ALINEACIÓN PERFECTA */
    display: flex;            /* Usamos Flexbox */
    align-items: center;      /* Centrado vertical */
    justify-content: center;  /* Centrado horizontal del contenido */
    gap: 15px;                /* Espacio entre el icono y el texto */
    text-align: center;       /* Asegura que el texto multilinea se centre */
}

/* ESTILO DEL ICONO (Doble tamaño y animación) */
.info-banner i {
    font-size: 2.5em;         /* 2.5 veces el tamaño del texto (aprox 25px) */
    display: block;
    animation: agitar-icono 1.5s infinite ease-in-out; /* Animación continua */
}

/* DEFINICIÓN DE LA ANIMACIÓN (Movimiento tipo "vibración") */
@keyframes agitar-icono {
    0% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(-15deg) scale(1.1); }
    30% { transform: rotate(15deg) scale(1.1); }
    45% { transform: rotate(-10deg) scale(1.1); }
    60% { transform: rotate(10deg) scale(1.1); }
    75% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(0deg) scale(1); }
}








/* --- FORMULARIOS --- */
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: #444; }
select, input[type="text"], input[type="time"], textarea { 
    width: 100%; 
    padding: 8px 10px; 
    border: 1px solid #ced4da; 
    border-radius: 4px; 
    font-size: 0.95rem; 
    color: #495057; 
    background-color: #fff; 
}
select:focus, input:focus, textarea:focus { 
    outline: none; 
    border-color: #80bdff; 
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); 
}
textarea { resize: vertical; }

/* --- LAYOUT GRID --- */
.form-row { display: flex; gap: 20px; margin-bottom: 15px; }
.col-half { flex: 1; }
.col-30 { flex: 0 0 30%; }
.col-rest { flex: 1; }
.search-row { display: flex; gap: 10px; align-items: flex-start; }
.flex-grow { flex-grow: 1; }
.mt-20 { margin-top: 20px; }

/* --- AUTOCOMPLETADO --- */
.search-wrapper { position: relative; width: 100%; }
.suggestions-list { 
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    background: white; 
    border: 1px solid #ced4da; 
    border-top: none; 
    border-radius: 0 0 4px 4px; 
    max-height: 200px; 
    overflow-y: auto; 
    z-index: 999; 
    list-style: none; 
    display: none; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}
.suggestions-list li { padding: 10px; cursor: pointer; font-size: 0.9rem; border-bottom: 1px solid #f1f1f1; }
.suggestions-list li:last-child { border-bottom: none; }
.suggestions-list li:hover { background-color: #f8f9fa; color: #1a3b8e; font-weight: 600; }

/* --- TIEMPO --- */
.time-group { display: flex; align-items: center; gap: 5px; }
.time-group select { flex: 1; text-align: center; }
.time-separator { font-weight: bold; color: #444; margin: 0 2px; }

/* --- BOTONES --- */
.button-group-right { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.btn { padding: 8px 16px; border: none; border-radius: 4px; font-size: 0.9rem; font-weight: 600; cursor: pointer; color: white; transition: background-color 0.2s; }
.btn-grey { background-color: #6c757d; } .btn-grey:hover { background-color: #5a6268; }
.btn-blue { background-color: #1a3b8e; } .btn-blue:hover { background-color: #132e72; }
.btn-green { background-color: #0f9d58; } .btn-green:hover { background-color: #0b7c45; }
.btn-orange { background-color: #f59e0b; color: white; } .btn-orange:hover { background-color: #d97706; }
.btn-red-small { background-color: #dc3545; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.btn-red-small:hover { background-color: #c82333; }

/* --- BOTONES DE ACCIÓN INFERIOR --- */
.footer-actions { text-align: center; margin-top: 30px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.btn-red-pdf { background-color: #d32f2f; color: white; font-size: 1.1rem; padding: 12px 24px; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-red-pdf:hover { background-color: #b71c1c; }
.btn-yellow { background-color: #fbc02d; color: #333; font-size: 1.1rem; padding: 12px 24px; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-yellow:hover { background-color: #f9a825; }
.btn-cyan { background-color: #17a2b8; color: white; font-size: 1.1rem; padding: 12px 24px; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border: none; border-radius: 4px; cursor: pointer; }
.btn-cyan:hover { background-color: #138496; }

/* --- TABLAS --- */
.table-container { width: 100%; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; overflow-x: auto; }
.custom-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.custom-table thead { background-color: #1a3b8e; color: white; }
.custom-table th { padding: 10px; font-size: 0.85rem; text-align: center; text-transform: uppercase; font-weight: 700; }
.custom-table td { padding: 20px; text-align: center; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.empty-message { color: #6c757d; font-style: normal; }
.w-large { width: 35%; } .w-small { width: 10%; }
.hidden-col { display: none; }

/* --- POPUP --- */
.popup-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; backdrop-filter: blur(2px); }
.popup-content { background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); text-align: center; max-width: 400px; width: 90%; animation: fadeIn 0.3s ease-out; }
.popup-message { font-size: 1.1rem; margin-bottom: 20px; color: #333; font-weight: 500; }
.popup-icon { font-size: 2rem; margin-bottom: 15px; display: block; }
.btn-popup-close { background-color: #1a3b8e; color: white; border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 768px) { .form-row { flex-direction: column; gap: 10px; } .col-30, .col-rest, .col-half { width: 100%; flex: none; } .button-group-right { flex-direction: column; } .btn { width: 100%; margin-bottom: 5px; } .footer-actions { flex-direction: column; } }