    :root { --bg: #F3F4F6; --card: #FFFFFF; --text: #111827; --muted: #6B7280; --line: #D1D5DB; --err: #B91C1C; --ok: #047857; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B0F14; --card: #151B23; --text: #F3F4F6; --muted: #9CA3AF; --line: #374151; --err: #F87171; --ok: #34D399; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { background: var(--brand); color: var(--on-brand); padding: calc(24px + env(safe-area-inset-top)) 20px 64px; text-align: center; }
header img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; display: block; margin: 0 auto 8px; }
header h1 { margin: 0; font-size: 1.3rem; }
main { max-width: 420px; margin: -40px auto 0; padding: 0 16px 32px; }
.card { background: var(--card); border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06); }
h2 { margin: 0 0 4px; font-size: 1.1rem; }
p.sub { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
input { width: 100%; font: inherit; font-size: 1.1rem; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: inherit; }
button.primary { width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 12px; font: inherit; font-weight: 650; background: var(--brand); color: var(--on-brand); cursor: pointer; }
button.primary:disabled { opacity: .6; cursor: default; }
button.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: .85rem; margin-top: 12px; cursor: pointer; padding: 0; }
.msg { min-height: 1.2em; margin: 12px 0 0; font-size: .9rem; color: var(--err); }

/* Outlined fields: the label sits in the box and floats onto the border when focused or filled. */
.field { position: relative; margin-top: 18px; }
.field input { padding: 15px 14px; }
.field label { position: absolute; left: 12px; top: 15px; margin: 0; padding: 0 4px; font-size: 1.1rem; line-height: 1.2; color: var(--muted); background: var(--card); pointer-events: none; transform-origin: left top; transition: transform .12s ease, color .12s ease; }
.field input::placeholder { color: transparent; }
.field input:focus::placeholder { color: var(--muted); }
.field input:focus + label, .field input:not(:placeholder-shown) + label, .field input:-webkit-autofill + label { transform: translateY(-24px) scale(.78); }
/* Focus uses the normal text color (white in dark mode), never the brand color: a blue brand on a dark card is unreadable. */
.field input:focus + label { color: var(--text); }
.field input:focus { outline: none; border-color: var(--text); }
[hidden] { display: none !important; }
  
.msg.ok { color: var(--ok); }
a.textlink { color: var(--muted); font-size: .9rem; }
.row-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
p.hint { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
