:root {
  color-scheme: light;
  --ink: #111f35;
  --muted: #566781;
  --blue: #0765ed;
  --blue-hover: #0052cf;
  --line: #d7e1ee;
  --error: #b52b3c;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eef4fb; }
body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: #eef4fb;
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: #0765ed; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, input { transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
svg { display: block; flex: 0 0 auto; }
[hidden] { display: none !important; }

.scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: url("/assets/auth-wafer-v1.png") center center / cover no-repeat;
}
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(243,248,255,.28), transparent 24%, transparent 84%, rgba(242,247,253,.94));
}

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px clamp(28px, 4vw, 72px) 12px; }
.identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brandmark { width: 45px; height: 56px; }
.brand-copy { display: flex; flex-direction: column; gap: 4px; }
.brand-title { font-size: clamp(23px, 2.1vw, 34px); font-weight: 700; line-height: 1.3; letter-spacing: .05em; }
.brand-subtitle { color: #5b6c85; font-size: clamp(11px, 1.12vw, 17px); line-height: 1.5; }
.locale { display: flex; align-items: center; gap: 9px; align-self: flex-start; padding-top: 7px; font-size: 14px; white-space: nowrap; }
.locale svg { width: 20px; height: 20px; }
.auth-shell { flex: 1; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 492px); align-items: center; gap: 40px; padding: 44px clamp(28px, 4vw, 72px) 56px; }
.auth-panel { grid-column: 2; width: 100%; padding: clamp(32px, 3.1vw, 50px); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 20px 64px rgba(57,87,125,.11); animation: panel-enter .55s cubic-bezier(.16,1,.3,1) both; }
.auth-copy { margin-bottom: 34px; }
.auth-copy h1 { margin: 0 0 17px; font-size: 34px; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.auth-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.email-domain { white-space: nowrap; }
form { display: grid; gap: 10px; }
label { font-size: 14px; font-weight: 500; color: #283b56; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 17px; top: 50%; width: 21px; height: 21px; color: #71839c; transform: translateY(-50%); pointer-events: none; }
input { display: block; width: 100%; height: 54px; padding: 12px 16px 12px 49px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: #fff; color: var(--ink); caret-color: var(--blue); font-size: 15px; }
input::placeholder { color: #65758d; opacity: 1; }
input:hover { border-color: #9cb9dc; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,101,237,.1); }
input[aria-invalid="true"] { border-color: var(--error); }
input:disabled { background: #f6f8fc; color: #65758d; }
#code { font-variant-numeric: tabular-nums; letter-spacing: .18em; }
#code::placeholder { letter-spacing: normal; }
.primary { position: relative; width: 100%; min-height: 54px; margin-top: 7px; padding: 14px 20px; border: 0; border-radius: 6px; color: #fff; background: var(--blue); font-size: 16px; font-weight: 600; letter-spacing: .06em; }
.primary:hover:not(:disabled) { background: var(--blue-hover); }
.primary:active:not(:disabled) { background: #0045b2; }
.primary:disabled { cursor: wait; opacity: .65; }
button:focus-visible { outline: 3px solid #6aa7ff; outline-offset: 4px; }
.field-error, .field-hint, .delivery-message, .status { margin: 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.field-error { min-height: 21px; color: var(--error); }
.field-hint, .delivery-message, .status { color: var(--muted); }
.delivery-message { margin-bottom: 10px; }
.status { margin-top: 18px; }
.status:empty { display: none; }
.secondary-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.text-action { min-height: 44px; padding: 9px 0; border: 0; background: transparent; color: #075acb; font-size: 13px; text-underline-offset: 4px; }
.text-action:hover:not(:disabled) { text-decoration: underline; }
.text-action:disabled { color: #67778f; cursor: default; }
.panel-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 32px; padding-top: 23px; border-top: 1px solid #e8eef6; color: #5d6e86; font-size: 12px; }
.panel-footer svg { width: 15px; height: 15px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(28px, 4vw, 72px) 25px; color: #53657e; font-size: 12px; }
@keyframes panel-enter { from { transform: translateY(10px); } to { transform: translateY(0); } }
@media (min-width: 1800px) { .auth-shell { grid-template-columns: minmax(0, 1fr) 510px; padding-right: 7vw; } }
@media (max-width: 1000px) {
  .site-header { padding-top: 26px; }
  .identity { gap: 12px; }
  .brandmark { width: 35px; height: 45px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
  .auth-panel { padding: 36px; }
  .scene { background-position: 40% center; }
}
@media (max-width: 760px) {
  .site-header { padding: 25px 22px 12px; }
  .brand-title { font-size: 22px; }
  .brand-subtitle { max-width: 260px; font-size: 10px; }
  .brandmark { width: 31px; height: 40px; }
  .locale { display: none; }
  .scene { background-position: 28% top; background-size: auto 650px; opacity: .5; }
  .scene::after { background: linear-gradient(180deg, rgba(241,246,253,.2), rgba(241,246,253,.4) 38%, #eef4fb 78%); }
  .auth-shell { display: flex; align-items: center; justify-content: center; padding: 50px 20px 38px; }
  .auth-panel { max-width: 460px; padding: 34px 28px 28px; box-shadow: 0 16px 44px rgba(39,68,107,.13); }
  .auth-copy h1 { font-size: 30px; }
  .auth-copy { margin-bottom: 28px; }
  .site-footer { padding: 15px 22px 22px; font-size: 10px; gap: 12px; }
}
@media (max-width: 380px) {
  .brand-title { font-size: 20px; }
  .brand-subtitle { font-size: 9px; }
  .auth-shell { padding-inline: 14px; }
  .auth-panel { padding-inline: 23px; }
  .site-footer { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
