:root {
  color-scheme: dark;
  --stable-bg: #050505;
  --stable-panel: #111315;
  --stable-field: #1a1d20;
  --stable-line: #34383d;
  --stable-text: #f4f6f8;
  --stable-muted: #9ca3ab;
  --stable-accent: #28df63;
  --stable-accent-hover: #45ee7a;
  --stable-error: #ff8a80;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stable-bg);
  color: var(--stable-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.stable-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.stable-login {
  position: relative;
  width: min(100%, 420px);
  padding: 40px 36px 34px;
  border: 1px solid var(--stable-line);
  border-radius: 8px;
  background: var(--stable-panel);
}

.back-link {
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--stable-muted);
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--stable-text);
}

.stable-brand {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border: 2px solid var(--stable-accent);
  border-radius: 8px;
  color: var(--stable-accent);
  font-size: 26px;
  font-weight: 900;
}

.stable-name {
  margin: 0 0 6px;
  color: var(--stable-accent);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0;
}

.stable-copy {
  margin: 10px 0 0;
  color: var(--stable-muted);
  line-height: 1.6;
}

.stable-form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--stable-muted);
  font-size: 14px;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--stable-line);
  border-radius: 6px;
  outline: none;
  background: var(--stable-field);
  color: var(--stable-text);
}

input:focus {
  border-color: var(--stable-accent);
  box-shadow: 0 0 0 3px rgba(40, 223, 99, 0.15);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: var(--stable-accent);
  color: #031008;
  cursor: pointer;
  font-weight: 900;
}

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

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

.stable-message {
  min-height: 24px;
  margin: 0;
  color: var(--stable-error);
  line-height: 1.5;
}

.stable-message.is-success {
  color: var(--stable-accent);
}

@media (max-width: 520px) {
  .stable-shell {
    padding: 0;
  }

  .stable-login {
    min-height: 100vh;
    padding: 72px 24px 28px;
    border: 0;
  }
}
