:root {
  --paper: #f3ede2;
  --paper-deep: #e9dfcf;
  --ink: #2a2622;
  --ink-soft: #6f655a;
  --line: #d9cbb6;
  --seal: #9b2c20;
  --seal-deep: #7e2118;
  --card: #fffdf8;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.login-body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px 20px;
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(155, 44, 32, 0.07), transparent 38%),
    radial-gradient(circle at 82% 88%, rgba(120, 92, 50, 0.10), transparent 42%),
    repeating-linear-gradient(0deg, rgba(120, 92, 50, 0.035) 0 1px, transparent 1px 4px),
    var(--paper);
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 38px 34px 30px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 45px -22px rgba(60, 42, 20, 0.45);
  text-align: center;
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(155, 44, 32, 0.13);
  border-radius: 12px;
  pointer-events: none;
}

.seal {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--seal), var(--seal-deep));
  color: #fff8ee;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 6px 14px -6px rgba(126, 33, 24, 0.7);
}

h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  font-weight: 600;
}

.sub {
  margin: 10px 0 26px;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
}

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

.code-input {
  width: 100%;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefb;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.code-input::placeholder {
  color: #b7a893;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.code-input:focus {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(155, 44, 32, 0.12);
}

.enter {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--seal-deep);
  border-radius: 10px;
  background: var(--seal);
  color: #fff8ee;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  cursor: pointer;
  transition: background 0.15s, transform 0.06s;
}

.enter:hover { background: var(--seal-deep); }
.enter:active { transform: translateY(1px); }

.alert {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid #e2b4aa;
  border-radius: 9px;
  background: #fdf1ee;
  color: #8a2318;
  font-size: 14px;
  line-height: 1.5;
}

.hint {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.login-foot {
  margin-top: 22px;
  color: #8a7c6a;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .login-card { padding: 30px 22px 24px; border-radius: 14px; }
  h1 { font-size: 26px; }
  .code-input { font-size: 14px; }
}
