:root {
  --ink: #173b56;
  --ink-soft: #647783;
  --gold: #c4934f;
  --line: rgba(45,78,99,.15);
  --font: "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #17365b url('/static/blue-gold-watercolor-v2.png') center / cover fixed no-repeat;
  font-family: var(--font);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: none; }

.login-shell {
  width: min(1180px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(390px,.72fr);
  gap: clamp(54px, 8vw, 118px);
  align-items: center;
  padding: 54px 0;
}

.login-intro {
  min-height: 610px;
  display: flex;
  flex-direction: column;
  color: #fffaf0;
  text-shadow: 0 2px 18px rgba(5,21,45,.52);
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand > span { color: #f1c875; font-size: 21px; text-shadow: 0 2px 12px rgba(3,18,41,.72); }
.login-brand strong { color: #fffdf4; font-size: 46px; font-weight: 700; letter-spacing: .12em; text-shadow: 0 3px 18px rgba(3,18,41,.82); }
.login-brand small { margin-left: -2px; color: #fff5d8; font-size: 16px; font-weight: 700; letter-spacing: .08em; text-shadow: 0 2px 12px rgba(3,18,41,.86); }
.intro-copy { margin: auto 0; }
.intro-copy > p { margin: 0 0 22px; color: rgba(255,237,194,.86); font-size: 12px; letter-spacing: .28em; }
.intro-copy h1 { margin: 0; font-size: clamp(42px, 5vw, 66px); font-weight: 600; letter-spacing: .035em; line-height: 1.42; }
.intro-copy > span { display: block; margin-top: 27px; color: rgba(255,252,243,.78); font-size: 16px; letter-spacing: .12em; }

.login-card {
  overflow: hidden;
  padding: 46px 44px 32px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  background: rgba(255,253,248,.93);
  box-shadow: 0 34px 80px rgba(4,22,46,.32), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(22px);
}
.login-card header { position: relative; margin-bottom: 36px; }
.card-star { position: absolute; right: 0; top: 0; color: var(--gold); font-size: 22px; }
.login-card header p { margin: 0 0 15px; color: #927044; font-size: 10px; letter-spacing: .26em; }
.login-card h2 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: .06em; }
.login-card form > label { display: block; margin: 20px 0 9px; color: #385468; font-size: 14px; font-weight: 700; }
.login-field {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(247,249,246,.78);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-field:focus-within { border-color: rgba(49,95,127,.46); background: #fffefa; box-shadow: 0 0 0 4px rgba(49,95,127,.07); }
.login-field input { min-width: 0; flex: 1; height: 50px; border: 0; outline: 0; color: #233f52; background: transparent; font-size: 15px; }
.login-field input::placeholder { color: #a2abb0; }
.password-toggle { padding: 6px; border: 0; color: #69808e; background: transparent; font-size: 12px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 17px 1px 26px; }
.login-options label { display: flex; align-items: center; gap: 6px; color: #788991; font-size: 12px; cursor: pointer; }
.login-options input { accent-color: #315f7f; }
.login-options button, .forgot-link { border: 0; color: #8a6b43; background: transparent; font-size: 12px; text-decoration: none; }
.forgot-link:hover { color: #68491f; text-decoration: underline; text-underline-offset: 4px; }
.login-submit {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 13px;
  color: #fffdf8;
  background: linear-gradient(115deg, #244f70, #47768a);
  box-shadow: 0 14px 28px rgba(26,71,101,.23), inset 0 1px 0 rgba(255,255,255,.18);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: transform .2s ease, box-shadow .2s ease;
}
.login-submit span { margin-left: 8px; color: #f0ce89; font-size: 18px; }
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 17px 32px rgba(26,71,101,.28); }
.login-card footer { margin-top: 27px; padding-top: 22px; border-top: 1px solid rgba(45,78,99,.1); color: #7e8c94; font-size: 14px; line-height: 1.7; text-align: center; }
.login-card footer a { margin-left: 7px; color: #9a713e; font-weight: 700; text-decoration: none; }
.login-card footer a:hover { color: #6f4d25; text-decoration: underline; text-underline-offset: 4px; }
.register-card header { margin-bottom: 28px; }
.register-card { padding-top: 34px; padding-bottom: 25px; }
.register-card form > label { margin-top: 15px; }
.register-card .login-options { justify-content: flex-start; margin-bottom: 24px; }
.register-message { display: none; margin: -10px 0 16px; padding: 10px 12px; border-radius: 9px; color: #8a4d47; background: rgba(167,76,65,.08); font-size: 12px; line-height: 1.6; }
.register-message.show { display: block; }
.register-message.success-message { color: #2d695b; background: rgba(67,137,117,.1); }
.forgot-card header { margin-bottom: 26px; }
.forgot-card .reset-help { margin: -3px 0 21px; color: #71838d; font-size: 14px; line-height: 1.8; }
.forgot-card .reset-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 20px; }
.forgot-card .reset-actions .login-submit { min-width: 128px; }
.forgot-card .code-button { padding: 0 17px; border: 1px solid rgba(36,79,112,.22); border-radius: 13px; color: #315f7f; background: rgba(255,255,255,.68); font-weight: 700; }
.forgot-card .code-button:disabled { cursor: wait; opacity: .58; }
.reset-success { display: none; padding: 15px 17px; border-radius: 12px; color: #2d695b; background: rgba(67,137,117,.1); font-size: 14px; line-height: 1.7; }
.reset-success.show { display: block; }
.human-check { min-height: 52px; display: grid; grid-template-columns: minmax(105px, 1fr) 82px auto; align-items: center; gap: 8px; padding: 7px 9px 7px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(247,249,246,.78); }
.human-check strong { color: #315f7f; font-size: 16px; letter-spacing: .08em; white-space: nowrap; }
.human-check input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid rgba(45,78,99,.14); border-radius: 9px; color: #233f52; background: rgba(255,255,255,.72); text-align: center; outline: 0; }
.human-check button { height: 36px; padding: 0 9px; border: 0; color: #8a6b43; background: transparent; font-size: 12px; white-space: nowrap; }

@media (max-width: 820px) {
  .login-shell { width: min(100% - 34px, 520px); grid-template-columns: 1fr; gap: 30px; padding: 28px 0 42px; }
  .login-intro { min-height: 220px; }
  .intro-copy { margin: 36px 0 0; }
  .intro-copy h1 { font-size: 38px; }
  .intro-copy > span { display: none; }
  .login-card { padding: 36px 28px 28px; border-radius: 23px; }
}

@media (max-width: 430px) {
  .login-shell { width: min(100% - 24px, 390px); }
  .login-brand strong { font-size: 36px; }
  .intro-copy h1 { font-size: 31px; }
  .login-card { padding-inline: 22px; }
}
