:root {
  --ink: #17322e;
  --ink-2: #314a44;
  --ink-3: #74827c;
  --ink-4: #9aa49f;
  --canvas: #f3f1e9;
  --paper: #fffdf8;
  --line: #e4ded0;
  --forest: #173d36;
  --mint: #5f947d;
  --mint-soft: #e7f0e9;
  --gold: #f2d6a2;
  --orange: #d87851;
  --red: #b24b43;
  --red-soft: #f7e4e0;
  --font-sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(480px, 1.05fr); }

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 38px 48px 32px;
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, .76);
  background:
    radial-gradient(circle at 15% 8%, rgba(133, 183, 155, .24), transparent 31%),
    radial-gradient(circle at 92% 91%, rgba(216, 120, 81, .15), transparent 28%),
    linear-gradient(160deg, #1b443c 0%, #12342f 55%, #0d2825 100%);
}
.auth-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .34;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(180deg, black 0%, transparent 78%);
}
.auth-brand-top, .auth-brand-body, .auth-brand-foot { position: relative; z-index: 1; }
.auth-brand-top { display: flex; align-items: center; gap: 13px; }
.auth-logo {
  width: 45px; height: 45px; border-radius: 13px; display: grid; place-items: center;
  color: var(--forest); background: var(--gold); font-family: var(--font-num);
  font-size: 26px; font-weight: 700; box-shadow: 0 8px 22px rgba(0,0,0,.2);
}
.auth-logo.small { width: 37px; height: 37px; border-radius: 10px; font-size: 21px; color: #fffdf8; background: var(--forest); }
.auth-brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.auth-brand-copy strong { color: #fffdf8; font-family: var(--font-num); font-size: 23px; letter-spacing: .13em; }
.auth-brand-copy span { margin-top: 4px; color: rgba(255,255,255,.38); font-size: 9px; letter-spacing: .24em; }
.auth-brand-body { margin: auto 0; max-width: 510px; padding: 42px 0; }
.auth-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-family: var(--font-num); font-size: 9px; letter-spacing: .2em; }
.auth-kicker::before { content: ""; width: 23px; height: 1px; background: currentColor; opacity: .6; }
.auth-brand-body h1 { margin: 18px 0 17px; color: #fffdf8; font-size: clamp(36px, 4.1vw, 55px); line-height: 1.14; letter-spacing: -.045em; font-weight: 550; }
.auth-brand-body > p { max-width: 420px; margin: 0; color: rgba(255,255,255,.5); font-size: 13px; line-height: 1.75; }
.auth-feature-list { margin-top: 39px; display: grid; gap: 3px; max-width: 420px; }
.auth-feature { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.09); font-size: 11px; color: rgba(255,255,255,.63); }
.auth-feature:last-child { border-bottom: 1px solid rgba(255,255,255,.09); }
.auth-feature i { color: var(--gold); font-family: var(--font-num); font-size: 9px; font-style: normal; letter-spacing: .05em; opacity: .75; }
.auth-brand-foot { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.32); font-size: 9.5px; letter-spacing: .04em; }
.auth-beacon { width: 6px; height: 6px; border-radius: 50%; background: #8bc6a8; box-shadow: 0 0 0 4px rgba(139,198,168,.11); }

.auth-form-panel {
  display: flex; align-items: center; justify-content: center; padding: 48px 8vw;
  background:
    radial-gradient(circle at 94% 4%, rgba(214, 173, 91, .13), transparent 23%),
    linear-gradient(180deg, #f8f6ef, #f1eee5);
}
.auth-form-wrap { width: 100%; max-width: 385px; }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 30px; }
.auth-mobile-brand strong { display: block; font-family: var(--font-num); font-size: 18px; letter-spacing: .1em; }
.auth-mobile-brand span { display: block; color: var(--ink-4); font-size: 9px; letter-spacing: .12em; }
.auth-heading { margin-bottom: 24px; }
.auth-eyebrow { color: var(--orange); font-family: var(--font-num); font-size: 9px; font-weight: 600; letter-spacing: .18em; }
.auth-heading h2 { margin: 9px 0 6px; color: var(--ink); font-size: 29px; font-weight: 600; letter-spacing: -.03em; }
.auth-heading p { margin: 0; color: var(--ink-3); font-size: 11px; }
.auth-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #eae5d9; margin-bottom: 19px; }
.auth-tab { border: 0; background: transparent; padding: 7px 15px; border-radius: 7px; color: var(--ink-3); font-size: 10.5px; transition: .16s ease; }
.auth-tab:hover { color: var(--ink); }
.auth-tab.active { color: var(--forest); background: var(--paper); font-weight: 600; box-shadow: 0 1px 5px rgba(31,48,41,.1); }
.auth-form { display: grid; gap: 13px; }
.auth-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.auth-field { display: block; }
.auth-field > span { display: block; margin-bottom: 6px; color: var(--ink-3); font-size: 9.5px; letter-spacing: .02em; }
.auth-field input {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px;
  outline: none; color: var(--ink); background: rgba(255,253,248,.76); font-size: 12px; transition: .16s ease;
}
.auth-field input::placeholder { color: #b2b8b3; }
.auth-field input:focus { border-color: var(--mint); background: var(--paper); box-shadow: 0 0 0 3px rgba(95,148,125,.10); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 55px; }
.password-toggle { position: absolute; right: 5px; top: 5px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-4); font-size: 9px; }
.password-toggle:hover { color: var(--forest); background: var(--mint-soft); }
.auth-submit {
  width: 100%; height: 46px; margin-top: 3px; border: 1px solid var(--forest); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  color: #fffdf8; background: var(--forest); font-size: 12px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 8px 21px rgba(23,61,54,.15); transition: .18s ease;
}
.auth-submit:hover { background: #1e5147; transform: translateY(-1px); }
.auth-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.auth-submit span { font-family: var(--font-num); font-size: 16px; font-weight: 400; }
.auth-alert { display: none; margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; font-size: 10px; line-height: 1.5; }
.auth-alert.show { display: block; }
.auth-alert.error { color: #8d3832; background: var(--red-soft); border: 1px solid #efd1ca; }
.auth-alert.success { color: #356a53; background: var(--mint-soft); border: 1px solid #cfe2d7; }
.auth-register-note { margin: 1px 0 0; color: var(--ink-4); font-size: 9px; line-height: 1.6; }
.auth-foot-note { display: flex; justify-content: space-between; gap: 14px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-4); font-size: 8.5px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 36px 22px; }
  .auth-mobile-brand { display: flex; }
}
@media (max-width: 480px) {
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-form-wrap { max-width: none; }
  .auth-foot-note { flex-direction: column; gap: 5px; }
}
