:root {
  color-scheme: dark;
  --bg: #0d1420;
  --panel: #151f2e;
  --ink: #edf3fa;
  --muted: #a5b4c8;
  --line: #2b394c;
  --accent: #b6ed7c;
  --focus: #b388ff;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.login-page {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  color: var(--accent);
  font-size: 0.8rem;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.15;
}

.description {
  margin: 0 0 24px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-weight: 600;
}

input, button {
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0f1725;
  color: var(--ink);
}

input:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #10180c;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status, .error {
  min-height: 1.5rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.status {
  color: var(--muted);
}

.error {
  color: #ffb4b4;
}

.recovery {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 420px) {
  body {
    padding: 16px 12px;
  }

  .login-card {
    padding: 24px 20px;
  }
}