/* Estilo principal del formulario */

main.contenido {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
}

main h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}


/* Contenedor del formulario en 2 columnas */

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}


/* Cada grupo de entrada */

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #34495e;
}

input[type="text"],
input[type="number"],
select {
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    border-color: #3498db;
    outline: none;
}


/* Botón centrado */

.form-group:nth-last-child(1) {
    grid-column: span 2;
    display: flex;
    justify-content: center;
}

.btn {
    background-color: #27ae60;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #219150;
}


/* Estilo para mensajes de error */

.error {
    background-color: #ffe6e6;
    border-left: 4px solid #e74c3c;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    color: #c0392b;
    max-width: 800px;
    margin: auto;
    margin-top: 1rem;
}


/* Estilo para el enlace de volver */

.volver-enlace {
    display: inline-block;
    text-align: center;
    margin: 1rem auto;
    padding: 0.5rem 1.5rem;
    background-color: #ecf0f1;
    border-radius: 8px;
    color: #2c3e50;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    max-width: 800px;
    display: block;
}

.volver-enlace:hover {
    background-color: #dcdde1;
    color: #2980b9;
}


/* Responsive para pantallas pequeñas */

@media (max-width: 768px) {
    form {
        grid-template-columns: 1fr;
    }
    .form-group:nth-last-child(1) {
        justify-content: center;
    }
}