/* The hub's sign-in and set-password pages: public (served signed out), so self-contained - the dashboard's look
   (shell.css tokens, the FM badge) without its stylesheets. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e10; --surface: #15171a; --surface-2: #1c1f23; --border: #2a2e35; --text: #eef0f3; --muted: #8a93a0;
  --brand: #ff7a3d; --bad: #ff5c5c; --good: #3ddc84; --glow: rgb(255 122 61 / .16);
  --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 24px 60px rgb(0 0 0 / .45);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f6f7f9; --border: #e1e4e9; --text: #0f1419; --muted: #6b7480;
  --brand: #e8622c; --bad: #d23c3c; --good: #109a4c; --glow: rgb(232 98 44 / .12);
  --shadow: 0 1px 2px rgb(15 20 25 / .05), 0 18px 48px rgb(15 20 25 / .10);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: grid; place-items: center; padding: 24px 16px;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text);
  background: radial-gradient(1100px 520px at 50% -10%, var(--glow), transparent 70%), var(--bg);
}
.card {
  width: min(400px, 100%); padding: 32px 28px 26px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; flex: none;
  font-weight: 800; font-size: 15px; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--brand), #ffb347);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 40%, transparent);
}
.brand b { display: block; font-size: 17px; line-height: 1.15; }
.brand small { color: var(--muted); font-size: 12.5px; }
h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.lede { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.field { position: relative; }
input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field input { padding-right: 64px; }
.peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer;
}
.peek:hover, .peek:focus-visible { color: var(--text); background: var(--border); outline: none; }
button.go {
  height: 46px; margin-top: 4px; border: 0; border-radius: 11px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #ffb347));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 30%, transparent); transition: filter .15s, transform .05s;
}
button.go:hover { filter: brightness(1.06); }
button.go:active { transform: translateY(1px); }
button.go:disabled { opacity: .6; cursor: progress; }
button.go:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.msg { min-height: 20px; margin: 0; font-size: 13.5px; color: var(--bad); }
.msg.ok { color: var(--good); }
.foot { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; text-align: center; }
.foot a, .done a { color: var(--brand); font-weight: 600; text-decoration: none; }
.foot a:hover, .done a:hover { text-decoration: underline; }
.hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.done { text-align: center; padding: 8px 0 4px; }
.done .tick {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); font-size: 26px; font-weight: 800;
}
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
