:root {
  color-scheme: dark;
  --bg: #090a0d;
  --surface: #11141a;
  --line: #282d37;
  --text: #f5f3ee;
  --muted: #8d95a3;
  --accent: #87a0ff;
  --good: #65cfa8;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(111, 142, 255, 0.13), transparent 38%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.login-card {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 20, 26, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  padding: clamp(28px, 7vw, 44px);
}

.login-brand {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(111, 142, 255, 0.38);
  border-radius: 13px;
  background: #16203c;
  color: #b6c2ff;
  font-family: Bahnschrift, "Arial Narrow", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.login-overline {
  margin: 28px 0 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
  font-size: clamp(38px, 10vw, 54px);
  font-weight: 610;
  letter-spacing: -0.045em;
  line-height: 1;
}

.login-lead {
  max-width: 320px;
  margin: 16px 0 30px;
  color: #cbd0d8;
  font-size: 14px;
  line-height: 1.55;
}

form { display: grid; gap: 9px; }

label {
  margin-top: 5px;
  color: #cbd0d8;
  font-size: 12px;
  font-weight: 620;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #0c0e12;
  padding: 0 14px;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
  border-color: rgba(135, 160, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(111, 142, 255, 0.11);
}

.login-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: #f19999;
  font-size: 12px;
}

button {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: #758ff2;
  color: #080a0f;
  font-weight: 720;
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease;
}

button:hover { filter: brightness(1.07); }
button:active { transform: translateY(1px); }
button:disabled { cursor: wait; filter: saturate(0.4); }

button:focus-visible,
input:focus-visible { outline: 2px solid #b6c2ff; outline-offset: 3px; }

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.login-note span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(101, 207, 168, 0.1);
}

@media (max-width: 480px) {
  .login-shell { place-items: end center; padding-inline: 12px; }
  .login-card { border-radius: 22px; padding: 28px 24px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
