:root {
  --ink: #16211c;
  --muted: #68736d;
  --paper: #f5f2e9;
  --surface: #fffdf8;
  --line: #d6d0c2;
  --teal: #116466;
  --teal-dark: #0d4748;
  --copper: #c66a2b;
  --danger: #9c3733;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, input { font: inherit; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(350px, .92fr) minmax(500px, 1.08fr); }
.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(34px, 5vw, 74px);
  color: #edf6f0;
  background:
    radial-gradient(circle at 20% 17%, rgba(104, 204, 189, .2), transparent 27%),
    radial-gradient(circle at 92% 82%, rgba(198, 106, 43, .22), transparent 32%),
    linear-gradient(145deg, #13231c 0%, #163c37 56%, #174c4b 100%);
}
.brand-panel::before, .brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(170, 218, 207, .16);
  border-radius: 50%;
}
.brand-panel::before { width: 560px; height: 560px; left: -300px; bottom: -260px; }
.brand-panel::after { width: 360px; height: 360px; right: -180px; top: -110px; }
.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(187, 233, 222, .34);
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .16);
  backdrop-filter: blur(8px);
}
.brand-mark svg { width: 35px; fill: none; stroke: #8bd7ce; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.brand-mark circle { fill: #d58a54; stroke: #d58a54; }
.eyebrow { margin: 0 0 10px; color: var(--copper); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.brand-panel .eyebrow { color: #85d2c7; }
h1 { max-width: 620px; margin: 0; font-size: clamp(42px, 5.8vw, 76px); font-weight: 690; letter-spacing: -.055em; line-height: 1.08; }
.brand-copy { max-width: 560px; margin: 24px 0 0; color: #bed1ca; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.85; }
.trust-note { display: flex; align-items: flex-start; gap: 10px; max-width: 540px; color: #b8cbc4; font-size: 12px; line-height: 1.65; }
.trust-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #70c9a0; box-shadow: 0 0 0 5px rgba(112, 201, 160, .12); }
.form-panel { display: grid; min-height: 100vh; place-items: center; padding: clamp(28px, 6vw, 80px); background: radial-gradient(circle at 82% 16%, rgba(198, 106, 43, .08), transparent 25%), var(--paper); }
.form-card { width: min(100%, 440px); }
.form-heading h2 { margin: 0 0 8px; font-size: clamp(31px, 4vw, 43px); letter-spacing: -.045em; }
.form-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.7; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 34px 0 26px; border-bottom: 1px solid var(--line); }
.mode-tabs a { position: relative; padding: 11px; color: var(--muted); font-size: 14px; font-weight: 750; text-align: center; text-decoration: none; }
.mode-tabs a[aria-selected="true"] { color: var(--teal); }
.mode-tabs a[aria-selected="true"]::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #34423b; font-size: 13px; font-weight: 720; }
input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s;
}
input:focus { border-color: #5b9c96; box-shadow: 0 0 0 4px rgba(17, 100, 102, .1); }
input::placeholder { color: #9ca39f; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 62px; }
.password-field button { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); border: 0; padding: 8px; color: var(--teal); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.form-message { min-height: 20px; margin: -3px 0; color: var(--danger); font-size: 12px; line-height: 1.6; }
.form-message.success { color: var(--teal); }
.primary { display: flex; min-height: 52px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; color: white; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); font-weight: 780; cursor: pointer; box-shadow: 0 12px 24px rgba(17, 100, 102, .18); transition: transform .18s, box-shadow .18s, opacity .18s; }
.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(17, 100, 102, .23); }
.primary:focus-visible { outline: 3px solid rgba(17, 100, 102, .28); outline-offset: 3px; }
.primary:disabled { cursor: wait; opacity: .68; transform: none; }
.primary svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.support-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.65; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .auth-shell { display: block; }
  .brand-panel { min-height: auto; padding: 28px 24px 34px; gap: 32px; }
  .brand-mark { width: 46px; height: 46px; }
  h1 { font-size: clamp(35px, 10vw, 54px); }
  .brand-copy { margin-top: 16px; }
  .form-panel { min-height: auto; padding: 42px 24px 58px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
