:root {
  --ink: #171717;
  --muted: #6b6b6b;
  --line: #d8d8d8;
  --surface: #fff;
  --accent: #e62117;
  --danger: #b3261e;
  --success: #137333;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #f8f8f8;
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; }

.auth-shell {
  width: min(1120px, 100%);
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .14);
  animation: enter .55s cubic-bezier(.2, .75, .25, 1) both;
}

.brand-panel {
  position: relative;
  min-height: 700px;
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background-color: #26211f;
  background-image: linear-gradient(180deg, rgba(12, 12, 12, .42), rgba(12, 12, 12, .14) 42%, rgba(12, 12, 12, .82)), url("https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1500&q=85");
  background-position: center;
  background-size: cover;
}
.brand-panel::after {
  position: absolute;
  right: -42px;
  bottom: 108px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 32px rgba(255, 255, 255, .035), 0 0 0 64px rgba(255, 255, 255, .025);
  pointer-events: none;
}
.brand-mark, .brand-copy, .brand-foot { position: relative; z-index: 1; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; width: fit-content; font-size: 19px; font-weight: 800; }
.brand-icon {
  position: relative;
  width: 38px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
}
.brand-icon::after {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
  content: "";
}
.brand-copy { max-width: 520px; animation: rise .7s .08s both; }
.eyebrow { margin-bottom: 17px; color: #ffd3cf; font-size: 12px; font-weight: 750; letter-spacing: .12em; }
.brand-copy h1 { max-width: 470px; margin: 0 0 16px; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.15; font-weight: 800; }
.brand-copy p { max-width: 410px; margin: 0; color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.8; }
.brand-foot { color: rgba(255, 255, 255, .68); font-size: 12px; }

.form-panel {
  padding: 38px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
  animation: rise .6s .12s both;
}
.language-row { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.language-select { min-height: 36px; padding: 0 7px; border: 0; color: var(--muted); background: transparent; cursor: pointer; outline-offset: 3px; }
.form-panel h2 { margin: 0 0 8px; font-size: 28px; font-weight: 750; }
.form-desc { margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 7px; color: #333; font-size: 13px; font-weight: 700; }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:hover { border-color: #a0a0a0; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230, 33, 23, .12); }
.field-hint { display: block; margin-top: 5px; color: #777; font-size: 11px; line-height: 1.5; }
.captcha-grid { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; }
.captcha-image { width: 130px; height: 46px; border: 1px solid var(--line); border-radius: 8px; background: #f2f2f2; cursor: pointer; object-fit: cover; }
.captcha-help { margin: 5px 0 0; color: #777; font-size: 11px; text-align: right; }

.submit-button {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 750;
  cursor: pointer;
  transition: background .16s, transform .16s, opacity .16s;
}
.submit-button:hover { transform: translateY(-1px); background: #c8170f; }
.submit-button:focus-visible, .language-select:focus-visible, .form-links a:focus-visible, .captcha-image:focus-visible { outline: 3px solid rgba(230, 33, 23, .34); outline-offset: 3px; }
.submit-button:disabled { opacity: .65; cursor: wait; transform: none; }
.form-message { min-height: 22px; margin: 12px 0 0; font-size: 13px; text-align: center; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.form-links { margin-top: 13px; display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.form-links.split { justify-content: space-between; }
.form-links a { color: #b71912; font-weight: 700; text-decoration: none; }
.form-links a:hover { text-decoration: underline; }
.security-note { margin: 18px 0 0; color: #858585; font-size: 11px; text-align: center; }

@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  body { padding: 18px; }
  .auth-shell { width: min(560px, 100%); min-height: 0; grid-template-columns: 1fr; }
  .brand-panel { min-height: 255px; padding: 27px 30px; gap: 34px; }
  .brand-copy h1 { max-width: 420px; margin: 0 0 9px; font-size: 34px; }
  .brand-copy p { font-size: 13px; }
  .brand-foot { display: none; }
  .form-panel { padding: 28px 32px 34px; }
  .language-row { margin-bottom: 18px; }
}
@media (max-width: 480px) {
  body { padding: 0; background: #fff; }
  .auth-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .brand-panel { min-height: 205px; padding: 23px 22px; gap: 22px; background-position: center 43%; }
  .brand-mark { font-size: 17px; }
  .brand-copy h1 { font-size: 30px; }
  .brand-copy p { max-width: 340px; font-size: 12px; line-height: 1.55; }
  .eyebrow { margin-bottom: 10px; font-size: 10px; }
  .form-panel { padding: 22px 22px 30px; }
  .form-panel h2 { font-size: 25px; }
  .captcha-grid { grid-template-columns: minmax(0, 1fr) 116px; }
  .captcha-image { width: 116px; }
}

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