/* Relais sign-in pages (login, 2FA, password reset, first account). The same
   tokens as the app (static/app/src/styles.css). */
@font-face { font-family: "Bricolage Grotesque Variable"; font-weight: 200 800; font-display: swap; src: url("bricolage-grotesque.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans Variable"; font-weight: 400 700; font-display: swap; src: url("instrument-sans.woff2") format("woff2"); }

:root {
  --bg: #F1F2EF; --surface: #FFFFFF; --line: #DFE2DB; --fg: #14171A; --muted: #5A6068;
  --brand: #FFC629; --brand-ink: #14171A; --bad: #B3261E; --bad-soft: #FBE7E5; --ok: #17784A; --ok-soft: #E2F3E9; --focus: #2350C8;
  --shadow: 0 1px 2px rgba(20, 23, 26, .06), 0 8px 24px rgba(20, 23, 26, .06);
  --f-display: "Bricolage Grotesque Variable", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans Variable", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1012; --surface: #171A1D; --line: #2B3035; --fg: #ECEEEA; --muted: #A0A7AE;
    --bad: #FF8A80; --bad-soft: #3D1A18; --ok: #5BCB91; --ok-soft: #15301F; --focus: #8AA8FF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body);
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh;
  padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px));
}

.auth { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; align-self: center; }
.auth-logo span { font: 700 26px/1 var(--f-display); letter-spacing: -0.02em; }
.auth-logo img { max-height: 40px; max-width: 200px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
h1 { font: 700 26px/1.15 var(--f-display); letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.lead { margin: -8px 0 0; color: var(--muted); }

form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
input[type="text"], input[type="email"], input[type="password"] {
  font: inherit; color: inherit; background: var(--surface); width: 100%;
  border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; min-height: 44px;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input.code { font-size: 22px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px;
  font: 600 15px/1 var(--f-body); border-radius: 8px; border: 1px solid var(--fg); background: var(--fg); color: var(--surface);
  cursor: pointer; text-decoration: none; padding: 0 16px;
}
.btn:hover { filter: brightness(1.15); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-outline:hover { border-color: var(--fg); filter: none; }
.btn img { width: 20px; height: 20px; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.error { margin: 0; padding: 10px 12px; border-radius: 7px; background: var(--bad-soft); color: var(--bad); font-size: 14px; }
.notice { margin: 0; padding: 10px 12px; border-radius: 7px; background: var(--ok-soft); color: var(--ok); }
a { color: inherit; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin: 0; }
