:root {
  --auth-ink: #101114;
  --auth-blue: #2375ff;
  --auth-blue-dark: #0d5ee8;
  --auth-text: #17191e;
  --auth-muted: #667085;
  --auth-line: #dfe3e8;
  --auth-soft: #f5f7fa;
  --auth-error: #d92d20;
  --auth-success: #087f5b;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--auth-text);
  background: #fff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; }
.hidden { display: none !important; }

.auth-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr); }
.auth-showcase {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 34px 42px 38px;
  background-color: var(--auth-ink);
  color: #fff;
}
.auth-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.auth-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: #fff; text-decoration: none; font-size: 15px; font-weight: 800; }
.auth-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--auth-blue); color: #fff; font-size: 12px; }
.auth-showcase-copy { position: relative; z-index: 1; max-width: 520px; margin: auto 0 34px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #aeb6c4; font-size: 13px; font-weight: 700; }
.auth-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #20b486; box-shadow: 0 0 0 5px rgba(32,180,134,.12); }
.auth-showcase h1 { max-width: 500px; margin: 0; font-size: 42px; line-height: 1.22; font-weight: 750; letter-spacing: 0; }
.auth-showcase-copy > p:last-child { max-width: 470px; margin: 16px 0 0; color: #aeb6c4; font-size: 15px; line-height: 1.75; }
.auth-art-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: 118px 118px; gap: 9px; }
.auth-art-grid figure { position: relative; min-width: 0; min-height: 0; overflow: hidden; margin: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: #24272e; }
.auth-art-grid figure:first-child { grid-row: 1 / 3; }
.auth-art-grid img { width: 100%; height: 100%; display: block; object-fit: cover; }
.auth-art-grid figcaption { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; border-radius: 6px; background: rgba(16,17,20,.74); color: #fff; font-size: 10px; }

.auth-main { position: relative; min-width: 0; display: grid; place-items: center; padding: 66px 42px; background: #fff; }
.auth-home-link { position: absolute; top: 30px; right: 34px; color: var(--auth-muted); text-decoration: none; font-size: 13px; font-weight: 650; }
.auth-home-link:hover { color: var(--auth-text); }
.auth-form-wrap { width: min(100%, 430px); }
.auth-card { width: 100%; }
.auth-eyebrow { margin: 0 0 7px; color: var(--auth-blue); font-size: 12px; font-weight: 800; }
.auth-card h2 { margin: 0; color: var(--auth-text); font-size: 30px; line-height: 1.25; font-weight: 750; }
.auth-intro { margin: 10px 0 28px; color: var(--auth-muted); font-size: 14px; line-height: 1.7; }
.auth-form { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > span { color: #344054; font-size: 13px; font-weight: 700; }
.auth-field small { color: var(--auth-muted); font-size: 11px; font-weight: 500; }
.auth-input-wrap { position: relative; }
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input:not([type]) {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--auth-text);
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-field input::placeholder { color: #98a2b3; }
.auth-field input:hover { border-color: #b6bec9; }
.auth-field input:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(35,117,255,.12); }
.auth-input-wrap input { padding-right: 62px; }
.password-toggle { position: absolute; top: 4px; right: 5px; height: 40px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--auth-muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.password-toggle:hover { background: var(--auth-soft); color: var(--auth-text); }
.auth-submit { width: 100%; min-height: 48px; margin-top: 2px; border: 0; border-radius: 8px; background: var(--auth-blue); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.auth-submit:hover { background: var(--auth-blue-dark); transform: translateY(-1px); }
.auth-submit:focus-visible, .password-toggle:focus-visible, .auth-switch a:focus-visible, .auth-home-link:focus-visible { outline: 3px solid rgba(35,117,255,.28); outline-offset: 2px; }
.auth-submit.btn-loading { opacity: .7; pointer-events: none; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--auth-muted); font-size: 13px; }
.auth-row a, .auth-switch a { color: var(--auth-blue); text-decoration: none; font-weight: 700; }
.auth-row a:hover, .auth-switch a:hover { text-decoration: underline; }
.auth-switch { margin: 24px 0 0; color: var(--auth-muted); text-align: center; font-size: 13px; }

.auth-check { display: flex; align-items: flex-start; gap: 9px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
.auth-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--auth-blue); flex: 0 0 auto; }
.auth-check a { color: var(--auth-blue); text-decoration: none; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: #98a2b3; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #eaecf0; }
.auth-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.auth-social a { min-height: 42px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--auth-line); border-radius: 8px; color: #475467; text-decoration: none; font-size: 13px; font-weight: 700; }
.auth-social a:hover { border-color: #b8c0ca; background: var(--auth-soft); }

.msg-box { margin: 0 0 18px; padding: 11px 13px; border: 1px solid; border-radius: 8px; font-size: 13px; line-height: 1.55; }
.msg-error { border-color: #fecdca; background: #fef3f2; color: var(--auth-error); }
.msg-success { border-color: #abefc6; background: #ecfdf3; color: var(--auth-success); }
.msg-info { border-color: #b2ccff; background: #eff4ff; color: #175cd3; }
.captcha-passed { background: #20b486 !important; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-main { min-height: 100svh; padding: 78px 28px 42px; }
  .auth-home-link { top: 24px; right: 24px; }
}

@media (max-width: 480px) {
  .auth-main { padding: 70px 20px 34px; align-items: start; }
  .auth-form-wrap { max-width: none; }
  .auth-card h2 { font-size: 27px; }
  .auth-intro { margin-bottom: 24px; }
  .auth-field input[type="text"],
  .auth-field input[type="email"],
  .auth-field input[type="password"],
  .auth-field input:not([type]) { font-size: 16px; }
  .auth-social { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
