/* ==========================================================================
   Auth pages (login / register) — extends landing design system
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.auth-header {
  background: rgba(250, 250, 250, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.auth-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}

/* ---------- Layout ---------- */
.auth-main {
  flex: 1;
  display: grid;
  align-items: center;
  padding-block: clamp(20px, 4vw, 56px);
}
.auth-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .auth-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

/* entrance */
@keyframes authRise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.auth-side { animation: authRise 0.7s var(--ease-out) both; }
.auth-card { animation: authRise 0.7s 0.12s var(--ease-out) both; }
.auth-card.is-shake { animation: authShake 0.45s var(--ease); }
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

/* ---------- Brand side panel ---------- */
.auth-side {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.auth-side::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 44px solid var(--lime);
  opacity: 0.12;
  pointer-events: none;
}
.auth-side__label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.auth-side__title {
  margin-top: 16px;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.auth-side__list {
  margin-top: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 13px;
}
.auth-side__list li {
  position: relative;
  padding-left: 32px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.75);
}
.auth-side__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/10px;
}
.auth-side__stat {
  margin-top: auto;
  padding-top: clamp(22px, 3vw, 34px);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lime);
  border-top: 1px solid var(--line-dark);
}

/* ---------- Form card ---------- */
.auth-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4.5vw, 52px);
  box-shadow: 0 30px 70px -35px rgba(12, 12, 13, 0.16);
}
.auth-card__title {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.auth-card__sub {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* fields */
.field { margin-top: 20px; }
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.field__label a {
  font-weight: 600;
  font-size: 13px;
  color: var(--olive-deep);
  border-bottom: 1px solid rgba(130, 170, 60, 0.4);
  transition: border-color 0.25s var(--ease-out);
}
.field__label a:hover { border-bottom-color: var(--olive-deep); }

.input-wrap { position: relative; margin-top: 8px; }
.auth-input {
  width: 100%;
  min-height: 54px;
  padding: 15px 52px 15px 18px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.auth-input::placeholder { color: #b4b4bb; font-weight: 400; }
.auth-input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(130, 170, 60, 0.14);
}
.auth-input.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(229, 83, 60, 0.1);
}

.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.pass-toggle:hover { color: var(--ink); background: var(--surface); }
.pass-toggle svg { width: 20px; height: 20px; }
.pass-toggle .pass-toggle__off { display: none; }
.pass-toggle.is-visible .pass-toggle__on { display: none; }
.pass-toggle.is-visible .pass-toggle__off { display: block; }

.field__error {
  display: none;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
}
.field__error.is-visible { display: block; }

/* password requirements */
.requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: 14px;
}
.req {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s var(--ease-out);
}
.req::before {
  content: "";
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.req.is-ok { color: var(--olive-deep); }
.req.is-ok::before {
  border-color: var(--olive);
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/9px;
}
@media (max-width: 480px) {
  .requirements { grid-template-columns: 1fr; }
}

/* checkbox */
.checkbox {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  cursor: pointer;
}
.checkbox input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.checkbox__box {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  background: var(--white);
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.checkbox__box svg { width: 12px; height: 12px; opacity: 0; transition: opacity 0.2s; }
.checkbox input:checked + .checkbox__box {
  background: var(--lime);
  border-color: var(--ink);
}
.checkbox input:checked + .checkbox__box svg { opacity: 1; }
.checkbox input:focus-visible + .checkbox__box {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}
.checkbox__text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.checkbox__text a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.checkbox__text a:hover { border-bottom-color: var(--ink); }
.checkbox.is-error .checkbox__box { border-color: var(--danger); }

/* submit + notes */
.auth-submit { margin-top: 26px; position: relative; }
.auth-submit .btn { width: 100%; }
.auth-submit.is-loading .btn { pointer-events: none; opacity: 0.75; }
.btn .btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(12, 12, 13, 0.25);
  border-top-color: var(--ink);
  animation: spin 0.7s linear infinite;
}
.is-loading .btn .btn__spinner { display: block; }
.is-loading .btn > svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}
.auth-note a { color: inherit; border-bottom: 1px solid var(--line); }
.auth-note a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.auth-alt {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}
.auth-alt a {
  margin-left: 6px;
  font-weight: 600;
  color: var(--olive-deep);
  border-bottom: 1px solid rgba(130, 170, 60, 0.4);
  transition: border-color 0.25s;
}
.auth-alt a:hover { border-bottom-color: var(--olive-deep); }

/* success state */
.auth-success {
  display: none;
  text-align: center;
  padding: clamp(12px, 3vw, 28px) 0;
}
.auth-success.is-visible { display: block; animation: authRise 0.6s var(--ease-out); }
.auth-success__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--lime);
  display: grid;
  place-items: center;
  color: var(--ink);
}
.auth-success__icon svg { width: 32px; height: 32px; }
.auth-success__title {
  margin-top: 20px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.auth-success__text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.auth-success .btn { margin-top: 24px; }

/* mini footer */
.auth-footer {
  padding: 18px 0 26px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-footer a { color: inherit; border-bottom: 1px solid var(--line); }
.auth-footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .auth-side, .auth-card, .auth-success { animation: none; }
  .btn .btn__spinner { animation-duration: 1.2s; }
}

/* brand panel only where the two-column layout fits */
@media (max-width: 999px) {
  .auth-side { display: none; }
  .auth-card { animation-delay: 0.05s; }
}

/* ---------- join page (invite landing) ---------- */
.join-deal {
  margin-top: 22px;
  display: grid;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 20px 22px;
}
.join-deal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.join-deal__row:last-child { border-bottom: 0; }
.join-deal__row span { color: var(--muted); }
.join-deal__row b { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.join-deal__row b--lime { color: var(--olive-deep); }
.join-deal__id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.join-deal__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
}
.join-deal__excerpt {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
