:root {
  color-scheme: light;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --ink: #12141c;
  --ink-soft: #5f6474;
  --ink-faint: #8b90a0;
  --line: rgba(18, 20, 28, .09);
  --line-strong: rgba(18, 20, 28, .16);
  --accent: #4b5bf0;
  --accent-hover: #3f4edb;
  --accent-text: #3d4bd8;
  --accent-soft: rgba(75, 91, 240, .10);
  --success: #0f9d6b;
  --danger: #d93a3a;
  --radius: 24px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(84, 99, 255, .10), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(255, 138, 61, .07), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -34px rgba(16, 24, 40, .35), 0 2px 10px rgba(16, 24, 40, .05);
  padding: 30px;
  animation: rise .45s var(--spring);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.brand-sub { display: block; font-size: 12px; color: var(--ink-faint); }
h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.sub { margin: 0 0 22px; color: var(--ink-soft); font-size: 14px; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin: 0 0 7px; }
.field { margin-bottom: 16px; }
input {
  width: 100%;
  height: 46px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s;
}
input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
input::placeholder { color: var(--ink-faint); }
.btn {
  width: 100%;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .12s var(--ease), background .16s var(--ease), opacity .16s;
  box-shadow: 0 8px 20px -10px rgba(75, 91, 240, .65);
}
.btn:hover:not(:disabled) { background: var(--accent-hover); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost {
  background: var(--surface-2);
  color: var(--ink-soft);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.actions { margin-top: 20px; }
.links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.msg {
  display: none;
  margin: 14px 0 0;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.msg.show { display: block; }
.msg.error { background: rgba(217, 58, 58, .08); color: #b02a2a; }
.msg.ok { background: rgba(15, 157, 107, .09); color: #0a7a53; }
.fine { margin: 20px 0 0; color: var(--ink-faint); font-size: 11.5px; text-align: center; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
