:root {
  --bg: #0b0b0d;
  --surface: #141418;
  --surface-2: #1b1b21;
  --border: #272730;
  --text: #ececf1;
  --muted: #8b8b97;
  --accent: #6ea8fe;
  --bad: #ff6b6b;
  --ok: #5fd68a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(110, 168, 254, .12), transparent 60%),
    radial-gradient(700px 420px at 100% 110%, rgba(110, 168, 254, .07), transparent 60%),
    var(--bg);
}
.box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: block; text-align: center; }
.brand img { width: 220px; max-width: 70%; height: auto; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 24px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
h1 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=password] {
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; width: 100%;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus { border-color: var(--accent); }
.pw { position: relative; }
.pw input { padding-right: 70px; }
.pw button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 8px; border-radius: 6px;
}
.pw button:hover { color: var(--text); background: var(--surface-2); }
.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 400; color: var(--text); font-size: 14px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 9px; padding: 11px 16px;
  border: 1px solid var(--accent); background: var(--accent); color: #0b0b0d;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { background: transparent; color: var(--bad); border-color: #5a2a2a; }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 9px; }
.msg.error { color: var(--bad); background: rgba(255, 107, 107, .08); border: 1px solid #4a2626; }
.msg.ok { color: var(--ok); background: rgba(95, 214, 138, .08); border: 1px solid #1f4a30; }
.msg.info { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot { text-align: center; }
.sep { height: 1px; background: var(--border); border: 0; margin: 4px 0; }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; }
[hidden] { display: none !important; }
