/* Exclusive to auth/base.html; no dependency on panel or legacy public styles. */
@font-face {
    font-family: Alagard;
    src: url('../font/alagard-font/AlagardSpanish.woff2') format('woff2');
    font-display: swap;
}
:root {
    color-scheme: light;
    --auth-bg: #f6f2ff;
    --auth-paper: #fffefa;
    --auth-ink: #302345;
    --auth-muted: #70617e;
    --auth-purple: #7031c7;
    --auth-line: #d8cbea;
    --auth-soft: #eee4ff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--auth-bg); color: var(--auth-ink); font: 15px/1.6 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:where(a, button, input):focus-visible { outline: 3px solid var(--auth-purple); outline-offset: 4px; }
.skip-link { position: absolute; top: 0; left: 16px; z-index: 2; padding: 12px 20px; background: var(--auth-paper); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.auth-wrap { max-width: 1240px; margin: auto; padding-inline: 32px; }
.auth-header { background: var(--auth-paper); border-bottom: 1px solid var(--auth-line); }
.auth-header .auth-wrap { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font: 28px/1.1 Alagard, monospace; }
.auth-brand img { width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated; }
.auth-home { min-height: 44px; display: flex; align-items: center; color: var(--auth-muted); font-size: 13px; }
.auth-stage { min-height: calc(100dvh - 150px); padding-block: 54px 48px; background: radial-gradient(#7543b51a 1px, transparent 1px); background-size: 16px 16px; }
.auth-layout { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 80px; }
.auth-story { max-width: 450px; padding-block: 20px; min-width: 0; }
.auth-eyebrow { color: var(--auth-purple); font: 11px/1.6 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.auth-eyebrow::before { content: '✦ '; }
h1, h2 { font-family: Alagard, monospace; font-weight: 500; line-height: 1.12; overflow-wrap: anywhere; }
.auth-story h2 { margin: 18px 0 22px; color: var(--auth-purple); font-size: clamp(42px, 4.5vw, 64px); text-shadow: 2px 2px #e2cef9; }
.auth-story > p { max-width: 400px; font-size: 17px; color: var(--auth-muted); }
.auth-benefits { display: grid; gap: 17px; margin-top: 30px; }
.auth-benefits > div { display: flex; align-items: center; gap: 13px; font-size: 13px; }
.auth-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--auth-line); background: var(--auth-paper); box-shadow: 2px 2px #e1d5f0; color: var(--auth-purple); font-size: 19px; }
.auth-mascot { display: flex; align-items: center; gap: 18px; margin-top: 32px; }
.auth-mascot img { width: 74px; height: 90px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(4px 4px #e1d5f0); }
.auth-mascot p { max-width: 220px; font: 19px/1.4 Alagard, monospace; color: var(--auth-purple); }
.auth-card { min-width: 0; background: var(--auth-paper); border: 1px solid #bda1d7; box-shadow: 6px 6px #e1d5f0; border-radius: 4px; }
.auth-card-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 24px; border-bottom: 1px solid var(--auth-line); background: var(--auth-soft); color: var(--auth-purple); font: 10px/1.6 ui-monospace, monospace; letter-spacing: .04em; }
.auth-card-bar span:first-child { letter-spacing: 4px; }
.auth-card-body { padding: 28px 32px 30px; }
h1 { font-size: 38px; color: var(--auth-purple); margin: 0 0 8px; }
.auth-subtitle { font-size: 13px; color: var(--auth-muted); margin: 0 0 24px; }
.auth-fields { display: grid; gap: 17px; }
.auth-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 7px; }
.auth-optional { font-weight: 400; color: var(--auth-muted); }
.auth-input { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #b69bcf; border-radius: 2px; background: #fff; color: var(--auth-ink); font-size: 16px; }
.auth-input[aria-invalid='true'] { border: 2px solid #a52b42; }
.auth-password { position: relative; }
.auth-password:has(.auth-reveal:not([hidden])) input { padding-right: 78px; }
.auth-reveal { position: absolute; top: 2px; bottom: 2px; right: 2px; min-width: 60px; min-height: 44px; padding: 0 9px; border: 0; background: transparent; color: var(--auth-purple); font-size: 11px; }
.auth-feedback { color: var(--auth-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.auth-feedback:empty { display: none; }
.auth-feedback p { margin: 7px 0 0; }
.auth-feedback .auth-field-error { color: #9d243b; }
.auth-button { width: 100%; min-height: 48px; display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 24px; padding: 12px 18px; border: 2px solid #4d168e; border-radius: 2px; background: linear-gradient(#9340e6, #6e22c8); color: #fff; box-shadow: 3px 3px #d4b6f0; font-weight: 700; font-size: 14px; }
.auth-button:hover { filter: brightness(1.08); }
.auth-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px #d4b6f0; }
.auth-switch { border-top: 1px dashed var(--auth-line); padding-top: 20px; margin: 24px 0 0; text-align: center; font-size: 12px; color: var(--auth-muted); }
.auth-switch a { display: inline-block; padding-block: 7px; color: var(--auth-purple); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.auth-recovery { margin: 12px 0 0; text-align: right; font-size: 12px; }
.auth-recovery a { display: inline-flex; align-items: center; min-height: 44px; color: var(--auth-purple); text-decoration: underline; text-underline-offset: 3px; }
.auth-note { color: var(--auth-muted); font-size: 11px; line-height: 1.6; margin: 16px 0 0; }
.auth-antibot { display: none; }
.auth-errors, .auth-message { padding: 14px 16px; margin: 0 0 20px; border: 1px solid var(--auth-line); background: var(--auth-soft); color: var(--auth-purple); font-size: 13px; overflow-wrap: anywhere; }
.auth-errors, .auth-message.error { background: #fff0f2; color: #9d243b; border-color: #e7b7c1; }
.auth-message.success { background: #eaf5e8; color: #24633a; border-color: #bad8b9; }
.auth-errors p { margin: 0; }
.auth-errors ul { margin: 8px 0 0; padding-left: 20px; }
.auth-errors ul:empty { display: none; }
.auth-errors a { text-decoration: underline; text-underline-offset: 3px; }
.auth-footer { padding: 22px 20px; text-align: center; font-size: 11px; color: var(--auth-muted); border-top: 1px solid var(--auth-line); }
@media (max-width: 1000px) {
    .auth-layout { gap: 36px; grid-template-columns: .85fr 1.15fr; }
    .auth-wrap { padding-inline: 24px; }
    .auth-story h2 { font-size: 48px; }
    .auth-card-body { padding: 26px; }
    .auth-pair { gap: 12px; }
}
@media (max-width: 760px) {
    .auth-header .auth-wrap { min-height: 76px; }
    .auth-brand { font-size: 24px; }
    .auth-brand img { width: 34px; height: 34px; }
    .auth-layout { display: flex; flex-direction: column; gap: 22px; align-items: stretch; }
    .auth-story { max-width: none; padding: 0; }
    .auth-story h2 { font-size: 38px; margin: 12px 0; }
    .auth-story > p { font-size: 14px; max-width: none; margin-bottom: 0; }
    .auth-benefits, .auth-mascot { display: none; }
    .auth-stage { padding-block: 30px; }
    .auth-card { width: 100%; }
    .auth-card-body { padding: 26px 22px; }
    .auth-wrap { padding-inline: 20px; }
    .auth-home { font-size: 12px; }
    h1 { font-size: 34px; }
}
@media (max-width: 420px) {
    .auth-pair { grid-template-columns: minmax(0, 1fr); gap: 17px; }
    .auth-card-bar { padding-inline: 18px; font-size: 9px; }
    .auth-brand { font-size: 22px; }
    .auth-header .auth-wrap { gap: 12px; }
    .auth-home { font-size: 11px; }
    .auth-story h2 { font-size: 35px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
