.auth-body {
  min-height: 100vh;
  background: var(--bg);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
  padding: clamp(20px, 4vw, 48px);
}

.auth-panel,
.auth-visual {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-md);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 52px);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  text-align: center;
}

.auth-brand-mark {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-brand-mark img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 0;
}

.auth-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-brand h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  color: var(--ink);
}

.auth-intro {
  margin: 0 0 28px;
  max-width: 42ch;
  color: var(--ink-2);
}

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

.auth-alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #b42318 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #b42318 9%, var(--surface));
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
}

[data-theme="dark"] .auth-alert {
  color: #ffb4ab;
  background: color-mix(in srgb, #ffb4ab 10%, var(--surface));
  border-color: color-mix(in srgb, #ffb4ab 28%, var(--line));
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px "Roboto", system-ui, sans-serif;
  padding: 0 16px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-field input::placeholder {
  color: var(--muted);
}

.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

.identifier-control {
  position: relative;
  display: block;
}

.domain-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: none;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.domain-suggestions.open {
  display: grid;
  gap: 4px;
}

.domain-option {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 700 14px "Roboto", system-ui, sans-serif;
  text-align: left;
}

.domain-option:hover,
.domain-option:focus {
  background: var(--surface-2);
  outline: none;
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 36px;
  width: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.password-toggle svg,
.auth-submit svg,
.theme-choice svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.password-icon {
  display: none;
}

.password-icon.active {
  display: block;
}

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

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.auth-link {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.auth-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
}

.auth-link:hover {
  color: var(--gold);
}

.auth-submit,
.google-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  font: 700 15px "Roboto", system-ui, sans-serif;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  transition: background .18s, transform .18s, box-shadow .18s;
}

.auth-submit:hover {
  background: var(--primary-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.auth-submit svg {
  transition: transform .18s;
}

.auth-submit:hover svg {
  transform: translateX(3px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

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

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s, background .18s, transform .18s;
}

.google-btn:hover {
  border-color: var(--gold);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.google-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.auth-footnote {
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
}

.auth-terms {
  margin: 10px 0 0;
  text-align: center;
}

.auth-visual {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  gap: 22px;
  min-height: 620px;
  padding: clamp(20px, 3vw, 36px);
  overflow: hidden;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: auto -12% -18% 22%;
  height: 48%;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
  opacity: .38;
  pointer-events: none;
}

.theme-actions {
  position: sticky;
  top: 20px;
  z-index: 1;
  justify-self: end;
  align-self: start;
  display: grid;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.auth-visual > .theme-actions {
  position: fixed;
  top: clamp(12px, 2vw, 22px);
  right: clamp(12px, 2vw, 22px);
  z-index: 80;
}

.theme-choice {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.theme-choice.active {
  background: var(--surface);
  color: var(--primary);
}

.theme-icon {
  display: none;
}

.theme-icon.active {
  display: block;
}

.visual-card {
  position: relative;
  z-index: 1;
  align-self: center;
  min-height: min(58vh, 560px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.visual-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 900ms ease, transform 1400ms ease;
}

.visual-slide.active {
  opacity: 1;
  transform: scale(1);
}

.visual-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 12px solid rgba(0, 0, 0, .08);
  pointer-events: none;
}

[data-theme="dark"] .auth-brand-mark img {
  filter: brightness(1.12);
}

[data-theme="dark"] .auth-link,
[data-theme="dark"] .password-toggle,
[data-theme="dark"] .theme-choice.active {
  color: var(--gold);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}

.auth-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 18, .58);
}

.auth-modal-card {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.auth-modal-card.has-art {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 28px;
  padding-right: 34px;
}

.modal-copy {
  min-width: 0;
}

.auth-modal-card h2 {
  margin: 0 44px 10px 0;
  font-size: 28px;
}

.auth-modal-card p {
  margin: 0 0 22px;
  color: var(--ink-2);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
}

.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.modal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}

.modal-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.whatsapp-action {
  background: #1f7a4f;
  border-color: #1f7a4f;
  color: #ffffff;
}

.button-png-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.button-png-whatsapp {
  mask-image: url("../../images/whatsapp.png");
  -webkit-mask-image: url("../../images/whatsapp.png");
}

.terms-content {
  margin-bottom: 22px;
}

.terms-content p:last-child {
  margin-bottom: 0;
}

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

.modal-form .modal-action {
  width: 100%;
}

.modal-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #2a7d5c 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #2a7d5c 10%, var(--surface));
  color: var(--ink);
  font-size: 14px;
}

.auth-note-error {
  border-color: color-mix(in srgb, #b42318 24%, var(--line));
  background: color-mix(in srgb, #b42318 10%, var(--surface));
  color: #b42318;
}

.modal-art {
  width: 150px;
  aspect-ratio: 1;
  display: block;
  justify-self: end;
  background: color-mix(in srgb, var(--primary) 88%, var(--gold));
  opacity: .92;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.modal-art-forgot {
  mask-image: url("../../images/forgot-password.png");
  -webkit-mask-image: url("../../images/forgot-password.png");
}

.modal-art-support {
  mask-image: url("../../images/support.png");
  -webkit-mask-image: url("../../images/support.png");
}

.modal-art-terms {
  mask-image: url("../../images/terms%26conds.png");
  -webkit-mask-image: url("../../images/terms%26conds.png");
}

[data-theme="dark"] .modal-art {
  background: var(--gold);
  opacity: .96;
}

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

  .auth-panel {
    order: 1;
  }

  .auth-visual {
    order: 2;
    display: flex;
    flex-direction: column;
    min-height: 420px;
  }

  .visual-card {
    order: 1;
    min-height: 360px;
    width: 100%;
  }

  .visual-slide {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 12px;
    gap: 12px;
  }

  .auth-panel,
  .auth-visual {
    padding: 20px;
  }

  .auth-brand {
    align-items: center;
  }

  .auth-brand-mark {
    width: 132px;
    height: 132px;
  }

  .auth-visual {
    min-height: auto;
  }

  .visual-card {
    min-height: 260px;
  }

  .auth-modal-card.has-art {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-right: 28px;
  }

  .modal-art {
    width: 118px;
    justify-self: center;
    order: -1;
  }
}
