:root {
    --primary-color: #4a148c;    /* Violeta oscuro institucional */
    --secondary-color: #7b1fa2;  /* Violeta principal */
    --accent-color: #9c27b0;     /* Violeta claro para acentos */
    --success-color: #27ae60;
    --bg-color: #f3e5f5;         /* Fondo con un tinte lila muy suave */
    --text-color: #333;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.card {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(74, 20, 140, 0.08); /* Sombra con tinte violeta */
    width: 100%;
    max-width: 550px;
    border-top: 6px solid var(--secondary-color);
    box-sizing: border-box;
}

h2 { 
    color: var(--primary-color); 
    text-align: center; 
    margin-top: 0;
    font-weight: 700;
}

.form-group { 
    margin-bottom: 1.2rem; 
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

/* Agregamos textarea aquí para que herede el estilo de los inputs.
   box-sizing: border-box es CLAVE para que el padding no ensanche el cuadro
   más allá de la card.
*/
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdde1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box; 
}

/* Configuración específica para los cuadros de texto largos */
textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

/* Estilo para los Checkbox. 
   Usamos !important para asegurar que el width: 100% de arriba no los estire.
*/
input[type="checkbox"] {
    width: auto !important;
    margin-right: 10px;
    cursor: pointer;
}

.btn-enviar {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    margin-top: 10px;
}

.btn-enviar:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 20, 140, 0.2);
}

.btn-enviar:active { 
    transform: translateY(0); 
}

/* Estilo para la lista de errores */
.errorlist {
    color: #c0392b;
    background: #fdf2f2;
    padding: 10px;
    border-radius: 6px;
    list-style: none;
    font-size: 0.85rem;
    margin: 5px 0;
    border-left: 4px solid #c0392b;
}

/* Ajuste para que los campos de error no muevan todo el diseño */
.form-group .errorlist li {
    margin-bottom: 0;
}
.tarjeta-resumen {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tarjeta-resumen h3 {
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 5px;
    margin-top: 20px;
}

.tarjeta-resumen ul {
    list-style: none;
    padding: 0;
}

.tarjeta-resumen li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.alerta-cud {
    background: #fff3cd;
    padding: 10px;
    border-left: 5px solid #ffc107;
}

.sin-datos {
    color: #666;
    font-style: italic;
}

.btn-primario {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-secundario {
    text-decoration: none;
    color: #6c757d;
    padding: 12px 25px;
}