:root {
    color-scheme: light;
    font-family: Arial, "Liberation Sans", Arimo, Helvetica, sans-serif;
    color: #334155;
    background: var(--offwhite);
    font-synthesis: none;
    /* The site-wide off-white the dashboard uses too (--offwhite in dashboard.css): the page, the
       card and its fields all sit on it, and the card is set apart by its border. */
    --offwhite: #ffffff;
    --brand: #2563eb;
    --brand-dark: #1e40af;
    --brand-hover: #1d4ed8;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; place-items: center; padding: 32px 16px; background: var(--offwhite); }
a { color: var(--brand); text-underline-offset: 4px; }
a:hover { color: var(--brand-dark); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card:focus { outline: none; }
.keyboard-hint { margin: 20px 0 0; color: #94a3b8; text-align: center; font-size: 11px; line-height: 1.8; }
kbd { font: inherit; font-weight: 600; padding: 2px 4px; border: 1px solid #cbd5e1; border-radius: 4px; background: var(--offwhite); }
.shell { width: 100%; max-width: 448px; }
.card { width: 100%; background: var(--offwhite); border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 32px; }
.brand-row { margin-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #0f172a; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.brand:hover { color: #0f172a; }
/* The company logo, the same file the dashboard header uses (Caddy serves /images/ from
   frontend/). Only its height is set, so the width follows the file's own proportions. */
.brand-logo { display: block; width: auto; height: 44px; max-width: 100%; object-fit: contain; }
.eyebrow { font-size: 11px; letter-spacing: 1.5px; font-weight: 700; line-height: 1.6; text-transform: uppercase; color: #64748b; margin: 0 0 6px; }
h1, h2 { font-size: 28px; letter-spacing: -.6px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.subtitle { color: #64748b; font-size: 14px; line-height: 1.6; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
label { display: block; font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 8px; }
input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: var(--offwhite); color: #1e293b; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
input[aria-invalid="true"] { border-color: #dc2626; }
input::placeholder { color: #94a3b8; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 68px; }
.toggle { position: absolute; right: 4px; top: 4px; min-width: 56px; height: 40px; border: 0; background: transparent; color: #475569; font-size: 12px; font-weight: 600; border-radius: 6px; }
.toggle:hover { color: #0f172a; }
.otp { font-size: 22px; font-weight: 600; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.otp::placeholder { letter-spacing: 8px; font-weight: 400; }
.resend { margin-top: 12px; }
.secondary { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 44px; padding: 10px 20px; color: #334155; background: var(--offwhite); border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.secondary:hover:not(:disabled) { background: #f1f5f9; color: #0f172a; border-color: #94a3b8; }
.secondary:disabled { color: #94a3b8; background: var(--offwhite); cursor: not-allowed; }
form[data-validate] .hint[data-countdown] { margin: -4px 0 16px; font-variant-numeric: tabular-nums; }
.field-error { display: block; color: #b91c1c; font-size: 12px; margin-top: 5px; line-height: 1.5; }
.field-error:empty { display: none; }
.primary { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 20px; color: white; background: var(--brand); border: 1px solid var(--brand); border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.primary:active { background: var(--brand-dark); border-color: var(--brand-dark); }
.footnote { color: #64748b; text-align: center; font-size: 12px; line-height: 1.7; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.message { padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.6; margin-bottom: 20px; overflow-wrap: anywhere; }
.error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.success { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.hint { font-size: 12px; line-height: 1.6; color: #64748b; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* One corner radius for every button, overriding module and state-specific shapes. */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    border-radius: 4px !important;
}
input[type="file"]::file-selector-button {
    border-radius: 4px !important;
}

/* Clearly mark keyboard focus without changing the button's fill or text. */
button:focus-visible,
input:is([type="button"], [type="submit"], [type="reset"]):focus-visible {
    outline: 3px solid var(--brand-dark);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #fff, inset 0 0 0 1px var(--brand-dark);
}
