/* Estilos propios de base.html (antes en línea en la plantilla). */
:root {
    --brand-400: #ff8a58;
    --brand-500: #ff6b35;
    --brand-600: #e34a1a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-500: #64748b;
    --gray-700: #334155;
    --surface: #ffffff;
    --card-shadow: 0 35px 65px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #fff4ed, #f7fafc);
    color: #0f172a;
    min-height: 100vh;
    display: flex;
}

.auth-shell {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 500px);
    gap: 2rem;
    padding: 2.5rem;
}

.auth-panel {
    background: var(--surface);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-panel h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.35rem);
}

.auth-panel p {
    margin: 0;
    color: var(--gray-500);
}

.auth-logo img {
    width: 140px;
}

.auth-visual {
    border-radius: 32px;
    background: url("../img/login-bg.jpg") center center/cover no-repeat;
    position: relative;
    min-height: 460px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: flex-end;
    padding: 2.75rem;
}

.auth-visual__content {
    color: #fff;
    max-width: 420px;
}

.auth-visual__content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 0.65rem;
}

.auth-visual__content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field label {
    font-weight: 600;
    color: var(--gray-700);
}

.form-field input {
    border-radius: 16px;
    border: 1px solid var(--gray-100);
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background: var(--gray-50);
    transition: border .2s ease, box-shadow .2s ease;
}

.auth-panel input[type="text"],
.auth-panel input[type="password"],
.auth-panel input[type="email"],
.auth-panel input[type="number"] {
    border-radius: 16px;
    border: 1px solid var(--gray-100);
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background: var(--gray-50);
    transition: border .2s ease, box-shadow .2s ease;
    width: 100%;
}

.auth-panel input[type="text"]:focus,
.auth-panel input[type="password"]:focus,
.auth-panel input[type="email"]:focus,
.auth-panel input[type="number"]:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    background: #fff;
}

.form-field input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    background: #fff;
}

.form-alert {
    border-radius: 14px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(180, 35, 24, 0.25);
    background: rgba(255, 243, 240, 0.8);
    color: #7c1c11;
    font-size: 0.9rem;
}

.field-error {
    color: #b42318;
    font-size: 0.82rem;
}

.btn-primary {
    border: none;
    background: linear-gradient(120deg, var(--brand-500), var(--brand-400));
    color: #fff;
    border-radius: 999px;
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 18px 35px rgba(227, 74, 26, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(227, 74, 26, 0.35);
}

.btn-outline-secondary {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: var(--gray-700);
    background: rgba(148, 163, 184, 0.1);
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
}

.auth-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.92rem;
}

.auth-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--brand-600);
}

.auth-links a:hover {
    text-decoration: underline;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .auth-visual {
        min-height: 220px;
    }
}

/* Errores del envío sin recargar (parts/form-errors.html). */
.alert {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
}

.alert-danger {
    border: 1px solid #f0a8a8;
    background: #fdecec;
    color: #a32121;
}

.lb-error-list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.lb-error-list li[hidden] {
    display: none;
}

.lb-field__error {
    display: block;
    color: #a32121;
    font-size: 0.85rem;
}

.form-field input[aria-invalid="true"] {
    border-color: #a32121;
}