body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f6f6f6;
    font-family: 'Arial', sans-serif;
}

.input {
    display: flex;
    flex-direction: column;
    width: 300px;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
}

.titulo-form {
    margin: 0 0 14px 0;
    font-size: 18px;
    color: #333;
    text-align: center;
}

.Nombre, .Apellido, .FechaNacimiento, .NombreUsuario {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.Nombre:focus, .Apellido:focus,
.FechaNacimiento:focus, .NombreUsuario:focus {
    outline: none;
    border-color: #007BFF;
}

.NombreUsuario.valido   { border-color: #4CAF50; }
.NombreUsuario.invalido { border-color: #d32f2f; }

.campo-hint {
    font-size: 11px;
    margin-top: -8px;
    margin-bottom: 8px;
    min-height: 14px;
    color: #888;
}

/* ── Contenedor de contraseñas ── */
.PasswordContainer {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.Password, .ConfirmPassword {
    width: 48%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.Password:focus, .ConfirmPassword:focus {
    outline: none;
    border-color: #007BFF;
}

.ConfirmPassword.coincide    { border-color: #4CAF50; }
.ConfirmPassword.no-coincide { border-color: #d32f2f; }

/* ── Barra de fortaleza ── */
.strength-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.strength-bar {
    flex: 1;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s, background-color 0.3s;
}

.strength-label {
    font-size: 11px;
    min-width: 55px;
    color: #555;
    font-weight: bold;
}

/* ── Hints y errores ── */
.password-hint {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    min-height: 14px;
}

.error-msg {
    font-size: 12px;
    color: #d32f2f;
    min-height: 16px;
    margin-bottom: 6px;
    text-align: center;
    display: none;
}

.error-msg.visible {
    display: block;
}

/* ── Botón Registrar ── */
.Registrar {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #8C8C8C;
    color: #fff;
    cursor: not-allowed;
    font-weight: bold;
    font-size: 15px;
    transition: background-color 0.3s;
    margin-top: 4px;
}

.Registrar.activo {
    background-color: #4CAF50;
    cursor: pointer;
}

.Registrar.activo:hover {
    background-color: #388E3C;
}

/* ── Botón Volver ── */
.Volver {
    display: flex;
    align-items: center;
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.Volver img {
    margin-right: 5px;
}

.Volver:hover {
    background-color: #0056b3;
}

/* ── Responsive: reserva espacio para el botón flotante "Volver" ─────────── */
@media (max-width: 640px) {
    body {
        align-items: flex-start;
        padding: 24px 16px 84px;
    }

    .Volver {
        right: 16px;
        bottom: 16px;
    }
}

/* ── Cambio 5: sugerencias de nombre de usuario disponibles ── */
.usuario-sugerencias {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 4px 0 6px;
}
.sug-label { font-size: 12px; color: #888; }
.sug-chip {
    padding: 4px 10px;
    border: 1px solid #c7d2fb;
    border-radius: 999px;
    background: #eef2ff;
    color: #3B5BDB;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}
.sug-chip:hover { background: #dde4ff; border-color: #3B5BDB; }
