/* Page background — animated orange gradient (secondary accent) */
.auth-page {
  height: 100vh;
  padding: 28px;
  display: flex;
  justify-content: center;
  position: relative;
  isolation: isolate;
  background: #0a0807;
  overflow: hidden;
}
.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
}
.auth-page::before {
  background:
    radial-gradient(28% 22% at 22% 32%, rgba(249,115,22,0.30), transparent 70%),
    radial-gradient(32% 24% at 78% 22%, rgba(255,138,51,0.22), transparent 72%),
    radial-gradient(30% 22% at 68% 82%, rgba(176,69,0,0.28),   transparent 70%),
    linear-gradient(135deg, #0a0807 0%, #100b08 50%, #16100a 100%);
  background-size: 220% 220%;
  background-position: 0% 0%;
  animation: authBgShift 18s ease-in-out infinite alternate;
}
.auth-page::after {
  background:
    radial-gradient(22% 18% at 60% 58%, rgba(255,138,51,0.18), transparent 75%),
    radial-gradient(18% 14% at 32% 76%, rgba(255,168,97,0.10), transparent 75%);
  background-size: 260% 260%;
  background-position: 100% 100%;
  mix-blend-mode: screen;
  animation: authBgDrift 24s ease-in-out infinite alternate;
}

@keyframes authBgShift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 50% 100%; }
}
@keyframes authBgDrift {
  0%   { background-position: 100% 100%; transform: translate3d(0, 0, 0); }
  50%  { background-position: 30% 60%;   transform: translate3d(-2%, 1%, 0); }
  100% { background-position: 0% 0%;     transform: translate3d(1%, -2%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page::before,
  .auth-page::after { animation: none; }
}

/* The auth card */
.auth {
  width: 100%;
  max-width: 1040px;
  max-height: 100%;
  margin: auto;
  background: var(--surface);
  border-radius: 26px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 40px 80px rgba(0,0,0,0.35), 0 8px 24px rgba(0,0,0,0.18);
}

/* Left visual panel */
.auth__aside {
  position: relative;
  padding: 56px 48px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(120% 100% at 20% 20%, rgba(43,191,139,0.35), transparent 55%),
    radial-gradient(70% 70% at 80% 80%, rgba(7,30,25,0.7), transparent 60%),
    linear-gradient(160deg, #0a1f1a 0%, #07251f 45%, #04332a 100%);
  overflow: hidden;
}
.auth__aside::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 30% 40%, rgba(43,191,139,0.18), transparent 60%),
    radial-gradient(40% 60% at 70% 70%, rgba(116,223,187,0.10), transparent 65%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.auth__aside::after {
  content: "";
  position: absolute;
  width: 720px; height: 720px;
  left: -180px; top: -120px;
  background:
    conic-gradient(from 90deg at 50% 50%,
      rgba(43,191,139,0.0) 0deg,
      rgba(43,191,139,0.25) 60deg,
      rgba(116,223,187,0.0) 130deg,
      rgba(24,103,78,0.45) 220deg,
      rgba(43,191,139,0.0) 360deg);
  filter: blur(40px);
  opacity: 0.85;
  pointer-events: none;
}
.aside__inner { position: relative; z-index: 1; }
.aside__title {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 340px;
}
.aside__sub {
  margin-top: 14px;
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  max-width: 320px;
}

/* Brand chip on the dark panel */
.auth__brand {
  position: absolute;
  top: 28px; left: 32px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.auth__brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint-300), var(--mint-600));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3), 0 6px 14px rgba(43,191,139,0.4);
}

/* Right form panel */
.auth__main {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.auth-card__title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form__error {
  font-size: 12px;
  color: var(--danger);
  min-height: 14px;
  margin-top: -4px;
}

/* Inputs in this layout */
.auth-form .field__input {
  height: 48px;
  border-radius: 12px;
  background: #f4f6f6;
  border-color: #e6e9e8;
}
.auth-form .field__input:hover { background: #eef1f0; }
.auth-form .field__input:focus { background: #fff; border-color: var(--mint-400); }

.auth-form .field { gap: 4px; }
.auth-form .field__error { min-height: 0; margin-top: -2px; }

.checkbox--compact { font-size: 12px; margin-top: 6px; color: var(--text-soft); }

.auth-form__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.auth-form__meta .checkbox--compact { margin-top: 0; }
.auth-form__forgot {
  font-size: 12px;
  color: var(--mint-700);
  font-weight: 500;
}
.auth-form__forgot:hover { color: var(--mint-800); }

/* Primary dark button (matches reference) */
.btn--dark {
  background: #0f1916;
  color: #fff;
  height: 48px;
  border-radius: 12px;
}
.btn--dark:hover { background: #1a2a25; }
.btn--dark:focus-visible { box-shadow: 0 0 0 4px rgba(43,191,139,0.30); }

.divider--or {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-mute); text-transform: lowercase;
  margin: 4px 0 2px;
}

.social-stack { display: flex; flex-direction: column; gap: 10px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.6s ease, background 0.6s ease, color 0.6s ease;
}
.social-btn:hover { border-color: var(--border-strong); background: #fafbfb; }
.social-btn--dark {
  background: #0f1916;
  color: #fff;
  border-color: #0f1916;
}
.social-btn--dark:hover { background: #1a2a25; border-color: #1a2a25; color: #fff; }
.social-btn svg { width: 18px; height: 18px; }

.auth__footer {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
}
.auth__footer a { color: var(--mint-700); }
.auth__footer a:hover { color: var(--mint-800); }

/* Responsive */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; max-width: 460px; }
  .auth__aside { padding: 44px 32px; min-height: 240px; }
  .aside__title { font-size: 30px; }
  .auth__main { padding: 36px 28px; }
}
@media (max-width: 480px) {
  .auth-page { padding: 16px; }
  .auth { border-radius: 20px; }
  .auth__aside { padding: 32px 24px; min-height: 200px; }
  .aside__title { font-size: 26px; }
  .auth__main { padding: 28px 20px; }
}

/* Short viewports — keep breathing room above/below the card */
@media (max-height: 760px) {
  .auth { min-height: 0; }
  .auth__aside { padding: 40px 40px; }
  .auth__main { padding: 40px 56px; }
}
@media (max-height: 620px) {
  .auth-page { padding: 20px; }
  .auth__aside { padding: 32px 36px; }
  .auth__main { padding: 32px 44px; }
  .auth-card { gap: 16px; }
  .aside__title { font-size: 32px; }
}
