/* ==========================================================================
   JK Real Estate — Auth pages (login / register / password)
   Aligned with public home visual language.
   ========================================================================== */

.auth-v2,
.auth-v2 *,
.auth-v2 *::before,
.auth-v2 *::after {
  box-sizing: border-box;
}

.auth-v2 {
  --au-blue: #0b3d91;
  --au-blue-deep: #082a68;
  --au-navy: #071e42;
  --au-green: #70b000;
  --au-green-dark: #5c9e00;
  --au-ink: #20283a;
  --au-muted: #64748b;
  --au-line: #e2e8f0;
  --au-bg: #f8fafc;
  --au-danger: #dc2626;
  --au-radius-lg: 18px;
  --au-radius: 10px;
  --au-font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --au-font-display: "Poppins", "Manrope", ui-sans-serif, system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--au-font-body);
  color: var(--au-ink);
  background: var(--au-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 40px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---- shell -------------------------------------------------------------- */

.auth-shell {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: #fff;
  border-radius: var(--au-radius-lg);
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(7, 30, 66, 0.05),
    0 24px 56px -20px rgba(7, 30, 66, 0.28);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.auth-shell--wide {
  max-width: 1180px;
}

/* ---- brand panel (left) -------------------------------------------------- */

.auth-hero {
  position: relative;
  padding: clamp(28px, 4vw, 48px);
  color: #eaf1ff;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 26px);
  overflow: hidden;
  isolation: isolate;
  background: var(--au-navy);
  min-height: 100%;
}

.auth-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.auth-hero__bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.auth-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(7, 30, 66, 0.94) 0%,
      rgba(7, 30, 66, 0.86) 32%,
      rgba(7, 30, 66, 0.55) 58%,
      rgba(7, 30, 66, 0.28) 78%,
      rgba(7, 30, 66, 0.18) 100%
    ),
    linear-gradient(
      180deg,
      rgba(7, 30, 66, 0.28) 0%,
      rgba(7, 30, 66, 0.08) 40%,
      rgba(7, 30, 66, 0.42) 100%
    );
}

.auth-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 26px);
  flex: 1;
  min-height: 0;
}

.auth-hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  align-self: flex-start;
}

.auth-hero__brand img {
  height: 72px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(2, 12, 30, 0.45));
}

.auth-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0;
  color: var(--au-green);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
}

.auth-hero__title {
  margin: 0;
  font-family: var(--au-font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.auth-hero__title em {
  font-style: normal;
  color: #b9e770;
}

.auth-hero__sub {
  margin: -8px 0 0;
  max-width: 36ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.auth-hero__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 14px;
}

.auth-hero__points li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: rgba(219, 231, 251, 0.95);
}

.auth-hero__points svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--au-navy);
  background: var(--au-green);
  border-radius: 6px;
  padding: 3px;
}

.auth-hero__foot {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12.5px;
  color: rgba(185, 201, 228, 0.9);
}

/* ---- form panel (right) -------------------------------------------------- */

.auth-panel {
  padding: clamp(26px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.auth-panel__inner {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}

.auth-panel__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--au-green);
  margin: 0 0 8px;
}

.auth-panel__title {
  margin: 0 0 6px;
  font-family: var(--au-font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--au-navy);
}

.auth-panel__sub {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--au-muted);
}

/* fields */

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .auth-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
  .auth-grid--2 .auth-field--full {
    grid-column: 1 / -1;
  }
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--au-navy);
}

.auth-control {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-control > svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.16s ease;
}

.auth-control:focus-within > svg {
  color: var(--au-blue);
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  font: inherit;
  font-size: 14.5px;
  color: var(--au-ink);
  background: #f8fafc;
  border: 1.5px solid var(--au-line);
  border-radius: var(--au-radius);
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  appearance: none;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  background: #fff;
  border-color: var(--au-blue);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

/* referral code */

.auth-referral {
  padding: 15px;
  border: 1px solid var(--au-line);
  border-radius: var(--au-radius);
  background: linear-gradient(135deg, #f8fafc, #f7fbef);
}

.auth-referral__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-referral__applied {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #cfe5a8;
  border-radius: 999px;
  color: #4d7c0f;
  background: #eef7e6;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-referral__choice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-referral__choice legend {
  float: left;
  width: auto;
  margin: 0 6px 0 0;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
}

.auth-referral__choice label {
  cursor: pointer;
}

.auth-referral__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-referral__choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 6px 12px;
  border: 1px solid var(--au-line);
  border-radius: 999px;
  color: #64748b;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.auth-referral__choice input:checked + span {
  border-color: var(--au-green);
  color: var(--au-green-dark);
  background: rgba(112, 176, 0, 0.1);
}

.auth-input--referral {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-input--referral[readonly] {
  color: #526175;
  background: #eef3f7;
  cursor: default;
}

.auth-referral__help {
  margin: 0;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.45;
}

.auth-referral.is-no-referral .auth-referral__head,
.auth-referral.is-no-referral > .auth-control,
.auth-referral.is-no-referral .auth-referral__help {
  display: none;
}

/* password visibility toggle */

.auth-eye {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-eye:hover {
  color: var(--au-blue);
  background: rgba(11, 61, 145, 0.07);
}

.auth-eye svg {
  width: 19px;
  height: 19px;
}

.auth-eye .auth-eye--off {
  display: none;
}

.auth-eye[aria-pressed="true"] .auth-eye--on {
  display: none;
}

.auth-eye[aria-pressed="true"] .auth-eye--off {
  display: block;
}

.auth-input--has-eye {
  padding-right: 48px;
}

/* OTP digit field */

.auth-input--otp {
  height: 58px;
  padding: 0 16px;
  text-align: center;
  font-family: var(--au-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.auth-input--otp::placeholder {
  letter-spacing: 0.2em;
  text-indent: 0;
  font-size: 1rem;
  font-weight: 500;
}

.auth-control--otp > svg {
  display: none;
}

/* Status card (resend OTP result) */

.auth-status {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--au-radius);
  border: 1px solid var(--au-line);
  background: #f8fafc;
}

.auth-status--success {
  border-color: #cfe5a8;
  background: #eef7e6;
}

.auth-status--error {
  border-color: #fecaca;
  background: #fef2f2;
}

.auth-status--info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.auth-status__title {
  margin: 0;
  font-family: var(--au-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--au-navy);
}

.auth-status--success .auth-status__title {
  color: #3f6212;
}

.auth-status--error .auth-status__title {
  color: #991b1b;
}

.auth-status--info .auth-status__title {
  color: #1e40af;
}

.auth-status__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--au-muted);
}

.auth-status--success .auth-status__text {
  color: #4d7c0f;
}

.auth-status--error .auth-status__text {
  color: #b91c1c;
}

.auth-status--info .auth-status__text {
  color: #1d4ed8;
}

.auth-meta--between {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* meta row + links */

.auth-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-v2 a {
  color: var(--au-blue);
  font-weight: 600;
  text-decoration: none;
}

.auth-v2 a:hover {
  color: var(--au-green-dark);
}

.auth-error {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--au-danger);
  min-height: 0;
}

.auth-error:empty {
  display: none;
}

/* submit */

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: var(--au-radius);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--au-green);
  box-shadow: 0 10px 22px -12px rgba(92, 158, 0, 0.55);
  transition: background 0.16s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

a.auth-submit,
.auth-v2 a.auth-submit {
  color: #fff;
}

.auth-submit:hover {
  background: var(--au-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(92, 158, 0, 0.6);
}

a.auth-submit:hover,
.auth-v2 a.auth-submit:hover {
  color: #fff;
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit svg {
  width: 18px;
  height: 18px;
}

/* divider + switch link */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--au-line);
}

.auth-switch {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--au-muted);
}

.auth-switch a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-left: 8px;
  border: 1.5px solid rgba(112, 176, 0, 0.55);
  border-radius: 999px;
  color: var(--au-green-dark);
  font-weight: 700;
  font-size: 13px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.auth-switch a:hover {
  background: var(--au-green-dark);
  border-color: var(--au-green-dark);
  color: #fff;
}

.auth-terms {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.auth-terms a {
  font-weight: 600;
}

/* back to site */

.auth-back {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--au-line);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  color: var(--au-navy) !important;
  box-shadow: 0 6px 18px rgba(7, 30, 66, 0.08);
}

.auth-back svg {
  width: 15px;
  height: 15px;
}

.auth-back:hover {
  color: var(--au-green-dark) !important;
}

/* ---- responsive ----------------------------------------------------------- */

@media (max-width: 940px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .auth-panel {
    order: 1;
  }

  .auth-hero {
    order: 2;
    gap: 14px;
    padding-bottom: 28px;
    min-height: 0;
  }

  .auth-hero__points {
    grid-template-columns: 1fr 1fr;
    gap: 9px 14px;
    font-size: 13px;
  }

  .auth-hero__brand img {
    height: 56px;
  }

  .auth-hero__title {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .auth-v2 {
    padding: 12px;
    align-items: flex-start;
    padding-top: 64px;
  }

  .auth-hero__points {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 24px 20px 28px;
  }

  .auth-back {
    top: 12px;
    left: 12px;
  }

  .auth-switch a {
    margin-left: 0;
    margin-top: 10px;
  }

  .auth-switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}
