/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #cc1d1d 0%, #910e0e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Contenedor principal (Tarjeta) */
.registro-container {
    background: #141414;
    width: 100%;
    max-width: 450px; /* Ancho máximo para PC */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 1.8rem;
}

/* Estilos de alertas PHP */
.alerta {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
}
.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.exito { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* Estilos del formulario */
.form-group {
    margin-bottom: 15px;
}

.register-logo {
    display: block;       /* Permite aplicar márgenes */
    max-width: 100px;     /* Ajusta este valor para cambiar el tamaño máximo */
    height: auto;         /* Mantiene la proporción de la imagen */
    margin: 0 auto 1rem;  /* Centra la imagen horizontalmente y da espacio abajo */
}


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

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    height: 48px; /* Forzamos una altura fija igual para todos */
    appearance: none; /* Quita el estilo 3D nativo de iOS/Android */
    -webkit-appearance: none; /* Para Safari/Chrome en móvil */
    background-color: #fff; /* Asegura fondo blanco */
}

input:focus {
    border-color: #ff0000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

/* Botón */
button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #df1818, #d11919);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    margin-top: 10px;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: scale(0.98);
}

/* Texto pequeño (login link, etc) */
.footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #ffffff;
}

.footer-text a {
    color: #d61111;
    text-decoration: none;
    font-weight: bold;
}

/* =========================================
   ESTILOS SELECTOR FECHA TRIPLE (Registro)
   ========================================= */
.fecha-grid-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 12px;
}

.select-group {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s;
}

.select-group:focus-within {
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.select-group label {
    font-size: 0.75rem !important;
    color: #666 !important;
    margin-bottom: 2px !important;
    text-transform: none !important;
}

.select-group select {
    border: none;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    outline: none;
    cursor: pointer;
    appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") no-repeat right center;
    padding-right: 20px;
}

/* Media Queries para Móvil */
@media (max-width: 480px) {
    .registro-container {
        padding: 20px;
    }
    h2 { font-size: 1.5rem; }
    input { padding: 10px; }

    .fecha-grid-container {
        gap: 5px;
        grid-template-columns: 0.8fr 1.4fr 1fr;
    }
    .select-group { padding: 8px 5px; }
    .select-group label { font-size: 0.65rem !important; }
    .select-group select {
        font-size: 0.9rem;
        padding-right: 12px;
        background-size: 10px;
        letter-spacing: -0.5px;
        text-overflow: ellipsis;
    }
    #select-anio { font-size: 0.8rem !important; }
}