:root {
  --black: #050505;
  --white: #f5f5f0;
  --ink: #111;
  --muted: #777;
  --line: rgba(255,255,255,.15);
  --line-dark: rgba(0,0,0,.18);
  --danger: #b91c1c;
  --success: #166534;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--black);
  color: var(--white);
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.1fr);
  background: var(--black);
}
.auth-side {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 34px clamp(28px, 5vw, 74px) 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 94%);
  pointer-events: none;
}
.auth-brand, .auth-side-copy, .auth-side-foot { position: relative; z-index: 1; }
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  width: fit-content;
}
.auth-brand-mark {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255,255,255,.75);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
}
.auth-brand-copy strong { display: block; letter-spacing: .16em; font-size: 13px; }
.auth-brand-copy small { display: block; color: #8d8d8d; font-size: 9px; letter-spacing: .2em; margin-top: 5px; }
.auth-side-copy { max-width: 590px; padding: 100px 0 80px; }
.auth-kicker { display: flex; align-items: center; gap: 14px; color: #9a9a9a; font-size: 11px; letter-spacing: .28em; }
.auth-kicker::before { content: ""; width: 50px; height: 1px; background: #737373; }
.auth-side h1 {
  margin: 34px 0 26px;
  font-size: clamp(58px, 7vw, 104px);
  line-height: .88;
  letter-spacing: -.065em;
  max-width: 720px;
}
.auth-side h1 em { font-family: Georgia, serif; font-weight: 400; color: #aaa; }
.auth-side p { color: #a6a6a6; font-size: 17px; line-height: 1.8; max-width: 560px; }
.auth-points { display: grid; gap: 14px; margin-top: 34px; }
.auth-point { display: flex; align-items: center; gap: 12px; color: #d0d0d0; font-size: 12px; letter-spacing: .08em; }
.auth-point i { width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; }
.auth-side-foot { color: #6f6f6f; font-size: 10px; letter-spacing: .17em; }

.auth-form-side {
  min-height: 100vh;
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 50px clamp(24px, 7vw, 110px);
}
.auth-form-wrap { width: min(100%, 570px); }
.auth-form-head { margin-bottom: 36px; }
.auth-form-head span { font-size: 11px; letter-spacing: .22em; color: #777; }
.auth-form-head h2 { margin: 13px 0 12px; font-size: clamp(42px, 5vw, 70px); line-height: .95; letter-spacing: -.055em; }
.auth-form-head p { margin: 0; color: #666; line-height: 1.7; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-field { display: grid; gap: 9px; margin-bottom: 16px; }
.auth-field.full { grid-column: 1 / -1; }
.auth-field label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.auth-field input {
  width: 100%;
  min-height: 56px;
  border: 1px solid #c9c9c2;
  background: transparent;
  color: #111;
  padding: 0 16px;
  outline: none;
  border-radius: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-field input:focus { border-color: #111; box-shadow: 0 0 0 1px #111; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 76px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: 8px;
  border: 0;
  background: transparent;
  padding: 0 10px;
  font-size: 10px;
  letter-spacing: .1em;
  font-weight: 700;
}
.auth-check { display: flex; align-items: flex-start; gap: 11px; color: #555; font-size: 13px; line-height: 1.5; margin: 7px 0 22px; }
.auth-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #050505; }
.auth-submit {
  width: 100%;
  min-height: 60px;
  border: 1px solid #050505;
  background: #050505;
  color: #fff;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.auth-submit:hover { transform: translateY(-2px); background: #fff; color: #050505; }
.auth-submit:disabled { opacity: .55; transform: none; cursor: wait; }
.auth-alt { text-align: center; margin: 24px 0 0; color: #666; }
.auth-alt a { color: #111; font-weight: 700; text-underline-offset: 4px; }
.auth-back { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; color: #555; font-size: 12px; text-decoration: none; }
.auth-message { display: none; padding: 14px 16px; margin-bottom: 18px; border: 1px solid; font-size: 13px; line-height: 1.5; }
.auth-message.show { display: block; }
.auth-message.error { color: var(--danger); border-color: rgba(185,28,28,.35); background: rgba(185,28,28,.06); }
.auth-message.success { color: var(--success); border-color: rgba(22,101,52,.35); background: rgba(22,101,52,.06); }

.auth-intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: none;
}
.auth-intro-panel { background: #050505; transform: translateY(0); animation: authPanelUp .85s cubic-bezier(.77,0,.18,1) 1.15s forwards; }
.auth-intro-panel:last-child { background: #f5f5f0; animation-name: authPanelDown; }
.auth-intro-logo {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: authLogoOut .45s ease 1s forwards;
}
.auth-intro-logo span {
  width: 92px;
  height: 92px;
  border: 1px solid #fff;
  display: grid;
  place-items: center;
  color: #fff;
  background: #050505;
  font-size: 42px;
  font-weight: 700;
  animation: authLogoPulse .8s ease both;
}
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: 1fr 1fr;
  visibility: hidden;
  pointer-events: none;
}
.page-transition::before, .page-transition::after {
  content: "";
  background: #050505;
  transform: translateY(-101%);
}
.page-transition::after { background: #f5f5f0; transform: translateY(101%); }
.page-transition.active { visibility: visible; }
.page-transition.active::before, .page-transition.active::after { transform: translateY(0); transition: transform .55s cubic-bezier(.77,0,.18,1); }
.page-transition-label {
  position: fixed;
  inset: 0;
  z-index: 1201;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  font-size: 12px;
  letter-spacing: .3em;
  color: #fff;
}
.page-transition.active + .page-transition-label { opacity: 1; transition: opacity .2s ease .25s; }

@keyframes authPanelUp { to { transform: translateY(-101%); } }
@keyframes authPanelDown { to { transform: translateY(101%); } }
@keyframes authLogoOut { to { opacity: 0; visibility: hidden; transform: scale(.8); } }
@keyframes authLogoPulse { 0% { opacity: 0; transform: scale(.75) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { min-height: 390px; padding-bottom: 34px; }
  .auth-side-copy { padding: 70px 0 35px; }
  .auth-side h1 { font-size: clamp(52px, 14vw, 86px); max-width: 650px; }
  .auth-side p { font-size: 15px; }
  .auth-side-foot { display: none; }
  .auth-form-side { min-height: auto; padding: 58px 24px 70px; }
}
@media (max-width: 560px) {
  .auth-side { min-height: 365px; padding: 24px 22px; }
  .auth-brand-copy { display: none; }
  .auth-brand-mark { width: 52px; height: 52px; }
  .auth-side-copy { padding: 54px 0 20px; }
  .auth-side h1 { font-size: 54px; margin: 24px 0 18px; }
  .auth-side p { display: none; }
  .auth-points { margin-top: 24px; gap: 10px; }
  .auth-form-side { padding: 52px 22px 64px; }
  .auth-grid { grid-template-columns: 1fr; gap: 0; }
  .auth-field.full { grid-column: auto; }
  .auth-form-head h2 { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .auth-intro, .auth-intro-logo { display: none; }
}
