:root {
  color-scheme: dark;
  --background: #151718;
  --surface: #202324;
  --surface-strong: #272a2b;
  --border: rgba(255, 255, 255, 0.13);
  --text: #f5f6f6;
  --secondary: rgba(245, 246, 246, 0.58);
  --accent: #34e0a1;
  --danger: #ff565d;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(52, 224, 161, 0.09), transparent 40%),
    var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.card {
  width: min(100%, 500px);
  padding: 44px 42px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  background: rgba(29, 31, 32, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  text-align: center;
}

.logo {
  display: block;
  width: 210px;
  max-width: 64%;
  height: auto;
  margin: 0 auto 42px;
}

.state-block h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.state-block > p {
  margin: 11px 0 0;
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.65;
}

form {
  margin-top: 32px;
  text-align: left;
}

label {
  display: block;
  margin: 17px 2px 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder { color: rgba(255, 255, 255, 0.27); }

input:hover { background: #2b2e2f; }

input:focus {
  border-color: rgba(52, 224, 161, 0.72);
  box-shadow: 0 0 0 3px rgba(52, 224, 161, 0.13);
}

button {
  width: 100%;
  height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #07140f;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 150ms ease, transform 100ms ease, opacity 150ms ease;
}

button:hover:not(:disabled) { filter: brightness(1.06); }
button:active:not(:disabled) { transform: scale(0.992); }
button:disabled { background: rgba(255, 255, 255, 0.11); color: rgba(255, 255, 255, 0.3); cursor: default; }

.message {
  min-height: 21px;
  margin: 12px 2px 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
}

.spinner {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 22px;
  border-radius: 50%;
  font-size: 25px;
  font-weight: 700;
}

.status-icon.success { background: rgba(52, 224, 161, 0.14); color: var(--accent); }
.status-icon.error { background: rgba(255, 86, 93, 0.13); color: var(--danger); }

[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .page-shell { padding: 0; place-items: stretch; }
  .card { min-height: 100vh; padding: 48px 24px; border: 0; border-radius: 0; box-shadow: none; }
  .logo { margin-bottom: 48px; }
}
