/*
 * Admin sign-in pages (login, forgot password, reset password). Standalone:
 * they do not load the admin stylesheet. Colors and fonts come from tokens.css.
 *
 * Layout: a navy brand panel beside the form on wide screens; on small screens
 * the panel shrinks to a logo bar above the form. The 1fr row keeps the page
 * full height when a tool (Herd, a browser extension) injects an element into body.
 */
.auth { min-height: 100vh; margin: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: 1fr; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
.auth :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Brand panel ---------- */
.auth-brand { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 4.5vw, 3.5rem); background: var(--ink); color: var(--bg); }
/* Speech-bubble shapes, echoing the logo. */
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; z-index: -1; }
.auth-brand::before { right: clamp(2rem, 6vw, 4.5rem); top: clamp(2rem, 6vw, 4.5rem); width: 4.5rem; height: 4.5rem; border-radius: 1.4rem 1.4rem 1.4rem 0; background: var(--pop); }
.auth-brand::after { right: -7rem; bottom: -8rem; width: 26rem; height: 26rem; border-radius: 6rem 6rem 6rem 0; background: color-mix(in srgb, var(--accent) 55%, transparent); transform: rotate(-10deg); }
.auth-logo { display: inline-flex; align-items: center; gap: .7rem; align-self: flex-start; color: inherit; text-decoration: none; font: 600 1.05rem var(--display); letter-spacing: -0.01em; }
.auth-logo:hover { color: inherit; }
.auth-logo img { display: block; height: 36px; width: auto; }
.auth-brand :focus-visible { outline-color: var(--pop); }
/* Auto margins centre the pitch and push the footer lines to the bottom together; padding keeps the old 3rem gap. */
.auth-pitch { max-width: 26rem; margin-block: auto; padding-block: 3rem; }
.auth-pitch h2 { margin: 0 0 1rem; color: inherit; font: 800 clamp(1.9rem, 3.4vw, 2.9rem)/1.05 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.auth-pitch h2 em { font-style: normal; color: var(--pop); }
.auth-pitch p { margin: 0 0 1.75rem; color: color-mix(in srgb, var(--bg) 78%, var(--ink)); font-size: 1.05rem; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.auth-points li { display: flex; align-items: flex-start; gap: .7rem; font-weight: 500; }
.auth-points li::before { content: ''; flex: none; width: 1.35rem; height: 1.35rem; margin-top: .1rem; border-radius: 50%; background: var(--pop) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%230b1f33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / .85rem no-repeat; }
.auth-foot { margin: 0; font-size: .8125rem; color: color-mix(in srgb, var(--bg) 60%, var(--ink)); }
.auth-foot + .auth-foot { margin-top: .35rem; }
.auth-foot a { color: inherit; font-weight: 600; text-decoration: none; }
.auth-foot a:hover { color: var(--bg); text-decoration: underline; }

/* ---------- Form side ---------- */
.auth-main { display: grid; place-items: center; padding: 2.5rem 1.25rem; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 2.5rem 2.25rem; box-shadow: 0 1px 2px rgba(11, 31, 51, .04), 0 18px 40px rgba(11, 31, 51, .08); }
.auth-kicker { display: block; margin-bottom: .6rem; font: 700 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.auth-title { margin: 0 0 .5rem; font: 700 clamp(1.5rem, 3vw, 1.85rem)/1.15 var(--display); letter-spacing: -0.03em; }
.auth-sub { margin: 0 0 1.75rem; color: var(--muted); }
.auth-field { margin-bottom: 1.1rem; }
.auth-pass { position: relative; }
.auth-pass .form-control { padding-right: 4.5rem; }
.auth-toggle { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); border: 0; background: none; border-radius: 8px; padding: .35rem .55rem; color: var(--accent); font: 700 .8125rem var(--body); cursor: pointer; }
.auth-toggle:hover { background: var(--bubble); }
.auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 1.25rem 0 1.5rem; font-size: .9rem; }
.auth-row .form-check { margin: 0; }
.auth .form-check-input { border: 1.5px solid var(--line); }
.auth .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.auth .form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .18); }
.auth-card a { color: var(--accent); font-weight: 600; text-decoration: none; text-underline-offset: 3px; }
.auth-card a:hover { text-decoration: underline; }
.auth-submit { width: 100%; margin-top: .4rem; }
.auth-alt { margin: 1.5rem 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-alert { margin-bottom: 1.25rem; border: 1.5px solid; border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; font-weight: 500; }
.auth-alert ul { margin: 0; padding-left: 1.1rem; }
.auth-alert.is-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--surface)); }
.auth-alert.is-ok { color: var(--good); background: color-mix(in srgb, var(--good) 8%, var(--surface)); border-color: color-mix(in srgb, var(--good) 30%, var(--surface)); }

/* ---------- Small screens: the panel becomes a logo bar ---------- */
@media (max-width: 991.98px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-brand { padding: 1rem 1.25rem; gap: 0; }
  .auth-brand::before { right: 1.25rem; top: 50%; width: 1.6rem; height: 1.6rem; border-radius: .5rem .5rem .5rem 0; transform: translateY(-50%); }
  .auth-brand::after, .auth-pitch, .auth-foot { display: none; }
  .auth-logo img { height: 30px; }
  .auth-main { place-items: start center; padding: 1.75rem 1rem 2.5rem; }
}
@media (max-width: 575.98px) {
  .auth-card { padding: 1.75rem 1.25rem; }
}
