/* ==========================================================================
   Estilos de Autenticaci贸n (Login & Register)
   ========================================================================== */

/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --background-color: #f4f7f6;
    --container-background: #ffffff;
    --text-color: #333;
    --border-color: #ccc;
    --error-color: #d93025;
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 20px;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    display: grid;
    place-items: center;
    min-height: 100vh;
}

/* --- Contenedor Principal --- */
.auth-container {
    background-color: var(--container-background);
    padding: 2rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* --- Formulario --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem; /* Espacio entre cada elemento del formulario */
}

/* --- Etiquetas e Inputs --- */
label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    gap: 0.5rem; /* Espacio entre el texto de la etiqueta y el input */
}

input {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- Botones y Enlaces --- */
.form-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

button[type='submit'] {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    padding: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button[type='submit']:hover {
    background-color: var(--primary-hover-color);
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    text-align: center;
}

.link:hover {
    text-decoration: underline;
}

/* --- Mensajes de Estado y Error --- */
#msg {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    min-height: 1.2em; /* Evita que el layout salte cuando aparece el mensaje */
}

/* Clase opcional que puedes a帽adir con JavaScript para mostrar errores */
#msg.error {
    color: var(--error-color);
}
