/* Reseteo básico imprescindible para los tamaños */
* {
    box-sizing: border-box;
}

/* Fondo general */
body {
    background-color: #f9e4ce;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #333;
}

/* Contenedor central */
.contenedor-formulario-registro {
    background-color: #fff;
    border-radius: 15px;
    padding: 40px 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
}

/* Título */
h1 {
    font-size: 32px;
    font-weight: 700;
    color: #5a4633;
    margin-bottom: 30px;
    margin-top: 0;
}

/* Labels */
label {
    display: block;
    margin: 12px 0 5px;
    font-weight: 600;
    text-align: left;
    color: #5a4633;
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%; /* Corregido al 100% gracias al box-sizing */
    padding: 12px 15px;
    border: 1px solid #5a4633;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    box-shadow: 0 0 5px rgba(90, 70, 51, 0.2);
    transition: all 0.3s ease;
}

input:focus {
    border-color: #7b5e44;
    box-shadow: 0 0 8px rgba(90, 70, 51, 0.4);
}

/* Botón */
.boton-enviar-registro {
    width: 100%;
    padding: 12px;
    background-color: #5a4633;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 20px; /* Margen inferior para separar el texto */
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
}

.boton-enviar-registro:hover {
    background-color: #7b5e44;
}

/* --- ESTILOS PARA EL TEXTO DE LOGIN --- */
.enlace-ir-login {
    display: block; /* Convertido en bloque para que respete el espaciado vertical */
    margin-top: 15px;
    font-size: 14.5px;
    color: #5a4633;
}

.enlace-ir-login a {
    color: #5a4633;
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.enlace-ir-login a:hover {
    color: #7b5e44;
}

/* --- ESTILOS PARA VALIDACIÓN DE FORMULARIOS --- */
.input-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.input-error:focus {
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.4) !important;
    border-color: #dc3545 !important;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: -12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.char-counter {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    margin-top: -10px;
    margin-bottom: 10px;
}

.char-counter.warning {
    color: #ff9800;
    font-weight: 600;
}

.char-count {
    font-weight: 500;
}