:root {
  --bg: #f3f0e8;
  --ink: #17201a;
  --muted: #657067;
  --line: #d8d0c2;
  --panel: #fffdf8;
  --deep: #18362f;
  --accent: #b9613d;
  --gold: #c79743;
  --danger: #a7352b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(24, 54, 47, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(24, 54, 47, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 30px 30px;
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 92px);
  padding: clamp(24px, 6vw, 78px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
}

.intro > p {
  max-width: 680px;
  color: #3d473f;
  font-size: 18px;
  line-height: 1.9;
}

.notice,
.card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.notice {
  max-width: 760px;
  margin-top: 30px;
  padding: 22px;
}

.notice p,
.sms-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.card {
  padding: 30px;
  box-shadow: 0 22px 60px rgba(31, 41, 35, 0.13);
}

.card h2 {
  margin-bottom: 22px;
  font-size: 28px;
}

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

form {
  gap: 16px;
}

label {
  color: var(--muted);
  font-size: 14px;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 13px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(47, 111, 85, 0.22);
  border-color: var(--deep);
}

.sms-copy {
  padding: 14px;
  border-left: 3px solid var(--gold);
  background: rgba(199, 151, 67, 0.1);
}

.sms-copy p {
  margin: 6px 0 0;
  font-size: 13px;
}

.checkbox-line {
  grid-template-columns: 18px 1fr;
  align-items: start;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

button {
  min-height: 44px;
  border: 1px solid var(--deep);
  background: var(--deep);
  color: var(--panel);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.secondary-button,
.captcha-image {
  background: var(--panel);
  color: var(--deep);
}

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

.captcha-image {
  min-height: 46px;
  padding: 0;
  overflow: hidden;
}

.captcha-image img {
  display: block;
  width: 120px;
  height: 44px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

dialog {
  width: min(520px, calc(100vw - 34px));
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 24px;
}

dialog::backdrop {
  background: rgba(23, 32, 26, 0.52);
}

dialog p {
  color: var(--muted);
  line-height: 1.8;
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 20px clamp(24px, 6vw, 78px);
  border-top: 4px solid var(--gold);
  background: var(--deep);
  color: rgba(255, 253, 248, 0.82);
  font-size: 14px;
}

.public-footer div {
  display: grid;
  gap: 4px;
}

.public-footer p {
  margin: 0;
}

.public-footer strong,
.public-footer a {
  color: var(--panel);
}

.public-footer a {
  margin: 0 12px;
  text-decoration: none;
}

.public-footer a:hover {
  text-decoration: underline;
}

.public-footer span {
  color: rgba(255, 253, 248, 0.7);
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .captcha-row {
    grid-template-columns: 1fr;
  }

  .captcha-image,
  .captcha-image img {
    width: 100%;
  }
}
