/* Auth pages: split card with a brand panel and a form panel. Self-contained (no Bootstrap needed). */
:root {
    --brand: #351403;
    --brand-deep: #2a1002;
    --accent: #60bbd0;
    --accent-ink: #1f7f95;
    --paper: #f6f5f4;
    --ink: #1c1411;
    --muted: #6b625e;
    --line: #e3dfdc;
    --danger: #b3261e;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* author display rules must not defeat the hidden attribute */
.auth-body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem); }

/* ---------- Card ---------- */
.auth-card { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(53,20,3,.12), 0 2px 6px rgba(53,20,3,.05); }
.auth-card-wide { max-width: 1040px; }
@media (min-width: 860px) { .auth-card { grid-template-columns: 1fr 1fr; } .auth-card-wide { grid-template-columns: .8fr 1.2fr; } }

/* ---------- Brand panel ---------- */
.auth-aside { position: relative; display: flex; flex-direction: column; gap: 1.5rem; justify-content: space-between; padding: clamp(1.5rem, 4vw, 2.5rem); color: #fff; overflow: hidden;
    background: radial-gradient(520px 320px at 100% 0%, rgba(96,187,208,.30), transparent 62%), linear-gradient(160deg, var(--brand-deep) 0%, var(--brand) 55%, #4a1d06 100%); }
.auth-aside::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
    background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 80% 20%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 80% 20%, #000, transparent 70%); }
.auth-aside > * { position: relative; }
.auth-brand { display: inline-flex; align-items: center; text-decoration: none; align-self: flex-start; }
.auth-wordmark { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.auth-logo-chip { display: inline-block; background: #fff; border-radius: 10px; padding: .4rem .7rem; }
.auth-logo-chip img { display: block; height: 30px; width: auto; max-width: 160px; }
.auth-aside-copy h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 .75rem; max-width: 14ch; }
.auth-aside-copy p { margin: 0; color: rgba(255,255,255,.82); font-size: 1rem; max-width: 26rem; }
.auth-help { color: #fff; text-decoration: none; font-size: .92rem; font-weight: 500; align-self: flex-start; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 1px; }
.auth-help:hover { color: #8fd6e6; border-color: #8fd6e6; }
@media (max-width: 859px) {
    .auth-aside { gap: 1rem; padding: 1.25rem 1.5rem; }
    .auth-aside-copy h2 { font-size: 1.5rem; max-width: none; margin-bottom: .35rem; }
    .auth-aside-copy p { font-size: .92rem; }
    .auth-help { display: none; }
}
@media (min-width: 860px) { .auth-aside { min-height: 520px; } }

/* ---------- Form panel ---------- */
.auth-main { padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; justify-content: center; }
.auth-head { margin-bottom: 1.4rem; }
.auth-eyebrow { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.auth-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: .5rem 0 .4rem; color: var(--brand); }
.auth-head p { margin: 0; color: var(--muted); font-size: .95rem; }

.auth-grid { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .auth-card-wide .auth-grid { grid-template-columns: 1fr 1fr; } }
.auth-field { margin-bottom: 1.05rem; min-width: 0; }
.auth-field label, .auth-label-row label { display: block; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: .4rem; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.auth-label-row label { margin-bottom: .4rem; }
.auth-input { display: block; width: 100%; height: 50px; padding: 0 1rem; font: inherit; font-size: .98rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s, background-color .15s; appearance: none; -webkit-appearance: none; }
.auth-input::placeholder { color: #a39a95; }
.auth-input:hover { border-color: #cfc8c4; }
.auth-input:focus { outline: none; background: #fff; border-color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(96,187,208,.28); }
.auth-input.is-invalid { border-color: var(--danger); background: #fffafa; }
.auth-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(179,38,30,.15); }
.auth-input-readonly { color: var(--muted); cursor: not-allowed; }
.auth-select { padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b625e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.auth-pw { position: relative; }
.auth-pw .auth-input { padding-right: 4.5rem; }
.auth-pw-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-size: .82rem; font-weight: 700; padding: .45rem .6rem; border-radius: 8px; cursor: pointer; }
.auth-pw-toggle:hover { background: rgba(96,187,208,.18); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--accent-ink); }
.auth-hint { margin: .35rem 0 0; font-size: .78rem; color: var(--muted); }
.auth-error { margin: .35rem 0 0; font-size: .82rem; font-weight: 600; color: var(--danger); }
.auth-link-sm { font-size: .8rem; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.auth-link-sm:hover { text-decoration: underline; }
.auth-terms { margin: .25rem 0 1.1rem; font-size: .82rem; color: var(--muted); }
.auth-terms a, .auth-switch a { color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.auth-terms a:hover, .auth-switch a:hover { text-decoration: underline; }

.auth-btn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; height: 54px; margin-top: .4rem; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: background-color .15s, transform .15s, box-shadow .15s; }
.auth-btn:hover { background: #4d2108; box-shadow: 0 8px 20px rgba(53,20,3,.22); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:focus-visible { outline: 3px solid rgba(96,187,208,.7); outline-offset: 2px; }
.auth-btn.is-busy { opacity: .75; cursor: progress; pointer-events: none; }
.auth-btn-link { color: #fff; }
.auth-switch { margin: 1.25rem 0 0; font-size: .9rem; color: var(--muted); }
.auth-back { display: inline-block; align-self: flex-start; margin-top: 1.5rem; font-size: .88rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.auth-back:hover { color: var(--accent-ink); }

.auth-alert { margin: 0 0 1.1rem; padding: .75rem 1rem; border-radius: 10px; font-size: .9rem; font-weight: 500; border: 1px solid; }
.auth-alert-ok { background: #e8f5ee; border-color: #bfe3cd; color: #17582f; }
.auth-alert-bad { background: #fdeeee; border-color: #f3c6c3; color: #8a1d17; }
.auth-note { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; color: var(--muted); font-size: .92rem; margin-bottom: 1.1rem; }
.auth-note p { margin: 0; }

/* honeypot fields (spatie) must never be visible */
.auth-main [style*="display:none"], .auth-main input[name="my_name"] { display: none !important; }

@media (prefers-reduced-motion: reduce) { .auth-input, .auth-btn { transition: none; } }

.auth-hint-inline { font-weight: 500; color: var(--muted); }
.auth-file { height: auto; padding: .7rem 1rem; font-size: .9rem; }
.auth-file::file-selector-button { margin-right: .9rem; border: 0; border-radius: 8px; background: var(--brand); color: #fff; padding: .45rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
.auth-file::file-selector-button:hover { background: #4d2108; }
