:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #d0d5dd;
  --accent: #111827;
  --danger: #b42318;
  --ok: #027a48;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

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

.auth-panel {
  width: min(100%, 430px);
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

h1 {
  margin: 24px 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

p {
  margin: 0 0 22px;
  color: var(--muted);
}

form,
label {
  display: grid;
  gap: 12px;
}

label {
  gap: 6px;
}

label span {
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: 0;
}

input:focus {
  border-color: #98a2b3;
  box-shadow: 0 0 0 4px rgba(16, 24, 40, 0.07);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-weight: 780;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.status-text {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.status-text.error {
  color: var(--danger);
}

.status-text.ok {
  color: var(--ok);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.auth-links a {
  color: #344054;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 520px) {
  .auth-panel {
    padding: 20px;
  }

  .code-row {
    grid-template-columns: 1fr;
  }
}
