:root {
  --bg: #f4f0e7;
  --surface: #fffdf8;
  --green: #125440;
  --green-deep: #0b3c2f;
  --green-soft: #e3f0e9;
  --green-line: #b9d3c6;
  --amber: #e5a43c;
  --amber-soft: #fbf0d9;
  --ink: #17211d;
  --muted: #66736d;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --radius-xl: 30px;
  --radius-lg: 20px;
  --shadow: 0 24px 70px rgba(9, 42, 33, 0.22);
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  font-size: 18px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1000px 700px at 8% 15%, rgba(60, 143, 112, 0.35), transparent 60%),
    radial-gradient(900px 650px at 92% 90%, rgba(229, 164, 60, 0.16), transparent 55%),
    linear-gradient(135deg, #0a372b 0%, #125440 52%, #0d4637 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 25% 35%, #000 0%, transparent 68%);
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--amber);
  color: #2a1c04;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 16px; }

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 64px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  align-items: center;
  gap: clamp(36px, 5vw, 88px);
}

.login-brand {
  color: #f4f0e7;
  max-width: 620px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.brand-kicker {
  margin: 0 0 4px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #a9d7c2;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.brand-tagline {
  margin: 8px 0 0;
  color: #c9e3d7;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-message {
  margin-top: 56px;
  padding-left: 20px;
  border-left: 3px solid rgba(229, 164, 60, 0.8);
  color: #c9e3d7;
  font-size: 1.02rem;
  line-height: 1.85;
}

.brand-message p { margin: 0; }

.brand-lead {
  color: #fffdf8;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1.35 !important;
  letter-spacing: -0.03em;
  margin-bottom: 10px !important;
}

.brand-points {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.brand-points li {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #e6f0ea;
  font-size: 0.93rem;
  line-height: 1.5;
}

.brand-points span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(201, 227, 215, 0.3);
  border-radius: 12px;
  color: #a9d7c2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-note {
  margin: 56px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 227, 215, 0.16);
  color: #9fc5b3;
  font-size: 0.72rem;
  line-height: 1.7;
}

.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.card-top { margin-bottom: 28px; }

.lock-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-line);
}

.lock-icon svg { width: 26px; height: 26px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.card-top h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.card-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

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

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

.field label {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1.5px solid #d8d2c5;
  border-radius: 15px;
  background: #fffefa;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder { color: #9aa49f; }

.field input:hover { border-color: #b9b1a1; }

.field input:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 84, 64, 0.12);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 84px; }

.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 62px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.toggle-password:hover { background: #d4e8dd; }

.toggle-password:focus-visible,
.remember input:focus-visible,
.login-submit:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.caps-hint { color: #8a5a00; font-weight: 700; }

.remember {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #38443f;
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.login-error {
  padding: 13px 15px;
  border: 1px solid #f0b8b3;
  border-radius: 13px;
  background: var(--danger-soft);
  color: #8f1c13;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.6;
}

.login-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #176b52, #0f4637);
  color: #fffdf8;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(15, 70, 55, 0.24);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.login-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.login-submit:active { transform: translateY(0); box-shadow: 0 8px 18px rgba(15, 70, 55, 0.22); }
.login-submit:disabled { cursor: wait; filter: saturate(0.7); transform: none; }

.submit-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.login-submit.is-busy .submit-spinner { display: inline-block; }
.login-submit.is-busy .submit-label { opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }

.privacy-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}

.privacy-line svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--green);
}

.card-foot {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed #ded8ca;
  color: #4c5853;
  font-size: 0.76rem;
  line-height: 1.7;
}

.card-foot p { margin: 0; }

.card-foot .muted {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
}

.card-foot code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1ece0;
  font-size: 0.9em;
  word-break: break-all;
}

.noscript {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: #fff4e2;
  color: #5b3900;
  font-size: 0.9rem;
  text-align: center;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .login-shell {
    width: min(620px, calc(100% - 40px));
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0 44px;
  }

  .login-brand { max-width: none; }

  .brand-message { margin-top: 30px; }

  .brand-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
  }

  .brand-points li {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(201, 227, 215, 0.18);
    border-radius: 14px;
    font-size: 0.76rem;
  }

  .brand-note { margin-top: 26px; }
}

@media (max-width: 560px) {
  :root { font-size: 17px; }

  .login-shell {
    width: calc(100% - 24px);
    padding: 18px 0 30px;
    gap: 18px;
  }

  .brand-lockup { gap: 13px; }
  .brand-logo { width: 50px; height: 50px; border-radius: 14px; }
  .brand-kicker { font-size: 0.56rem; }
  .brand-lockup h1 { font-size: 1.85rem; }
  .brand-tagline { margin-top: 5px; font-size: 0.76rem; }

  .brand-message {
    margin-top: 20px;
    padding-left: 14px;
  }

  .brand-lead { font-size: 1.22rem; }
  .brand-message p:not(.brand-lead) { font-size: 0.84rem; line-height: 1.65; }

  .brand-points { display: none; }

  .brand-note { display: none; }

  .login-card {
    border-radius: 24px;
    padding: 24px 20px;
  }

  .card-top { margin-bottom: 22px; }
  .lock-icon { width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px; }
  .lock-icon svg { width: 22px; height: 22px; }

  .card-top h2 { font-size: 1.55rem; }
  .card-sub { font-size: 0.8rem; }
  .login-form { gap: 17px; }
  .field input { height: 54px; border-radius: 13px; }
  .login-submit { min-height: 56px; border-radius: 14px; }
  .card-foot { margin-top: 20px; padding-top: 16px; }
  .card-foot .muted { display: none; }
}

@media (max-height: 760px) and (min-width: 981px) {
  .login-shell { padding: 24px 0; }
  .brand-message { margin-top: 30px; }
  .brand-points { margin-top: 28px; gap: 11px; }
  .brand-note { margin-top: 28px; }
  .login-card { padding: 30px 34px; }
  .card-top { margin-bottom: 20px; }
  .login-form { gap: 15px; }
  .field input { height: 52px; }
  .login-submit { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
