:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --border: #d8dbe0;
  --accent: #3b5bdb;
  --accent-hover: #31489f;
  --danger: #c92a2a;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.08);
}

h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 550;
}

input {
  height: 46px;
  margin-bottom: 16px;
  padding: 0 12px;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.18);
}

button {
  height: 46px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.error {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--danger);
  background: rgba(201, 42, 42, 0.08);
  border: 1px solid rgba(201, 42, 42, 0.24);
  border-radius: 8px;
}

.error[hidden] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #191c22;
    --text: #e8eaed;
    --muted: #9aa1ab;
    --border: #2c313a;
    --accent: #5c7cfa;
    --accent-hover: #7089fb;
    --danger: #ff8787;
  }
}
