/* Reset básico y tipografía general del sistema */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: transparent;
    color: var(--input-texto);
    line-height: 1.5;
    min-height: 100vh;
}

/* Contenedor centrado, usado por pantallas como el login */
.contenedor-centrado {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Tarjeta blanca contenedora de formularios */
.tarjeta {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
}

/* Campos de formulario */
.campo {
    margin-bottom: 1rem;
}

.campo label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.campo input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.campo input:focus {
    outline: none;
    border-color: #4b0082;
}

/* Botón principal */
.btn-principal {
    width: 100%;
    padding: 0.7rem;
    background-color: #4b0082;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-principal:hover {
    background-color: #3a0068;
}

/* Mensajes de error */
.error {
    background-color: #fdecea;
    color: #a02622;
    padding: 0.7rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Indicador de carga de HTMX: oculto por defecto, visible durante la petición */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request.htmx-indicator {
    display: inline;
}

/* Oculta contenido visualmente pero lo mantiene accesible
   para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}