:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --panel: #151820;
  --line: #2b3038;
  --text: #eef3ef;
  --muted: #98a4b3;
  --cyan: #38d5ff;
  --amber: #ffb84d;
  --red: #ff5c6a;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(56, 213, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(129, 240, 154, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  width: min(100% - 32px, 420px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.login-panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: rgba(21, 24, 32, 0.94);
  box-shadow: var(--shadow);
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(56, 213, 255, 0.5);
  border-radius: 7px;
  background: rgba(56, 213, 255, 0.08);
  color: var(--cyan);
  font-weight: 800;
}

.brand-logo-shell {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-line strong,
.brand-line span {
  display: block;
}

.brand-line span,
.field span,
.message {
  color: var(--muted);
}

h1 {
  margin: 0 0 22px;
  font-size: 24px;
  line-height: 1.25;
}

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

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

.field span {
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #0f1117;
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(56, 213, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(56, 213, 255, 0.12);
}

.message {
  min-height: 22px;
  line-height: 1.6;
}

.message.error {
  color: var(--red);
}

.message.pending {
  color: var(--amber);
}

button.primary {
  min-height: 44px;
  border: 1px solid rgba(56, 213, 255, 0.62);
  border-radius: 7px;
  background: rgba(56, 213, 255, 0.14);
  color: var(--text);
}

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

@media (max-width: 480px) {
  .login-shell {
    width: min(100% - 24px, 420px);
  }

  .login-panel {
    padding: 22px;
  }
}
