:root {
  color-scheme: light;
  --forest-950: #071c1a;
  --forest-900: #0b2926;
  --forest-800: #123c37;
  --forest-700: #18544d;
  --ivory-50: #fbf8f1;
  --ink: #172321;
  --muted: #66726f;
  --line: rgba(18, 60, 55, 0.14);
  --copper: #d8873f;
  --gold: #efc078;
  --danger: #b42318;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ivory-50);
}

button,
input { font: inherit; }

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr);
}

.brand-stage {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #f9f3e8;
  background:
    radial-gradient(circle at 14% 18%, rgba(239, 192, 120, 0.14), transparent 24%),
    linear-gradient(140deg, var(--forest-800), var(--forest-950));
}

.brand-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(135deg, black, transparent 72%);
}

.brand-mark,
.brand-statement { position: relative; z-index: 1; }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark img {
  border-radius: 13px;
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}

.brand-mark p {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
}

.brand-mark span {
  color: rgba(249, 243, 232, .5);
  font-size: 10px;
  letter-spacing: .14em;
}

.brand-statement {
  flex: 1;
  max-width: 650px;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
}

.brand-statement h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(48px, 5.2vw, 72px);
  font-weight: 620;
  line-height: 1.06;
  letter-spacing: -.045em;
}

.brand-copy {
  max-width: 520px;
  margin: 24px 0 0;
  color: rgba(249, 243, 232, .62);
  font-size: 15px;
  line-height: 1.75;
}

.login-panel {
  min-height: 100vh;
  padding: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(216, 135, 63, .09), transparent 23%),
    var(--ivory-50);
}

.login-card {
  width: min(460px, 100%);
  padding: clamp(32px, 4vw, 46px);
  border: 1px solid rgba(18, 60, 55, .12);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 28px 74px rgba(18, 60, 55, .11);
}

.language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin: -12px -12px 22px 0;
}

.language-switch button {
  min-width: 42px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #87918e;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: var(--forest-800);
  border-color: var(--line);
  background: #f6f3ec;
}

.language-switch button:hover {
  color: var(--forest-800);
}

.card-heading .section-kicker { margin-bottom: 12px; color: var(--copper); }
.card-heading h2 { margin: 0; font-size: 31px; letter-spacing: -.03em; }
.card-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

form { margin-top: 30px; }
form > label { display: block; margin-bottom: 18px; }
form > label > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
}
form > label > span em { color: #8b9693; font-size: 11px; font-style: normal; font-weight: 500; }

input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

input:focus {
  border-color: rgba(24, 84, 77, .55);
  box-shadow: 0 0 0 4px rgba(24, 84, 77, .08);
}

.password-field { position: relative; }
.password-field input { padding-right: 68px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  padding: 6px 8px;
  border: 0;
  color: var(--forest-700);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.captcha-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.captcha-field input {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 750;
}

.captcha-refresh {
  position: relative;
  height: 50px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f1e8;
  cursor: pointer;
}

.captcha-refresh img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-refresh span {
  position: absolute;
  right: 7px;
  bottom: 5px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 28, 26, .72);
  font-size: 13px;
  line-height: 1;
}

.captcha-refresh.is-loading span { animation: captcha-spin .65s linear infinite; }
.captcha-refresh:disabled { cursor: wait; opacity: .72; }

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

.login-error {
  margin: -2px 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--danger);
  background: rgba(180, 35, 24, .07);
  font-size: 12px;
  line-height: 1.5;
}

.login-button {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: var(--forest-900);
  box-shadow: 0 15px 30px rgba(11, 41, 38, .18);
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}

.login-button:hover { transform: translateY(-1px); background: var(--forest-800); }
.login-button:disabled { cursor: wait; opacity: .72; transform: none; }
.login-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-button.is-loading svg { animation: login-arrow 1s ease-in-out infinite; }

@keyframes login-arrow {
  0%, 100% { transform: translateX(0); opacity: .45; }
  50% { transform: translateX(4px); opacity: 1; }
}

.session-note {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.lock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d8b69;
  box-shadow: 0 0 0 4px rgba(61, 139, 105, .1);
}

.login-footer {
  width: min(460px, 100%);
  margin: 18px 0 0;
  color: #929c99;
  font-size: 9px;
  letter-spacing: .15em;
  text-align: center;
}

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-stage { min-height: auto; padding: 30px 28px 36px; }
  .brand-statement { min-height: 390px; }
  .brand-statement h1 { font-size: clamp(42px, 10vw, 62px); }
  .login-panel { min-height: auto; padding: 54px 22px 68px; }
}

@media (max-width: 560px) {
  .brand-stage { padding: max(24px, env(safe-area-inset-top)) 20px 28px; }
  .brand-mark span { display: none; }
  .brand-statement { min-height: 340px; }
  .brand-copy { font-size: 13px; }
  .login-panel { padding: 42px 15px calc(58px + env(safe-area-inset-bottom)); }
  .login-card { padding: 28px 20px; border-radius: 20px; }
  .captcha-field { grid-template-columns: minmax(0, 1fr) 136px; }
}
