/**
 * Shell de auth público (login/register SSR) — paridade AuthAgencyShell.
 * Tokens: agency-chrome.css (:root).
 */

.az-main--auth {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

.auth-agency {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, oklch(0.72 0.08 230 / 0.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 10%, oklch(0.70 0.07 317 / 0.12), transparent 50%),
    var(--surface-2);
  color: var(--navy);
}

/* Botões / eyebrow mínimos (sem puxar agency-home inteiro) */
.auth-agency .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--radius-xl);
  border: 0;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.auth-agency .btn--nav {
  font-size: 14px;
  padding: 10px 18px;
  height: 40px;
}
.auth-agency .btn--hero {
  font-size: 15px;
  padding: 13px 24px;
  height: 48px;
}
.auth-agency .btn--navy {
  background: var(--navy);
  color: #fff;
}
.auth-agency .btn--navy:hover { background: var(--navy-2); }
.auth-agency .btn--text {
  background: transparent;
  color: var(--navy);
  padding: 10px 14px;
  height: 40px;
  font-size: 14px;
  border-radius: 10px;
}
.auth-agency .btn--text:hover {
  background: var(--surface-2);
  color: var(--navy);
}
.auth-agency .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.auth-agency__nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: oklch(1 0 0 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid oklch(0.9 0.01 258);
}
.auth-agency__logo {
  display: block;
  width: 132px;
  color: var(--navy);
}
.auth-agency__logo svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}

.auth-agency__main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 80px;
}
.auth-agency__panel {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  padding: 40px 40px 44px;
  box-shadow: 0 30px 80px -30px oklch(0.15 0.05 258 / 0.16);
  border: 1px solid var(--line-lite);
}
.auth-agency__panel--sm { max-width: 440px; }
.auth-agency__panel--md { max-width: 720px; }

.auth-agency__intro {
  text-align: center;
  margin-bottom: 32px;
}
.auth-agency__intro .eyebrow { margin-bottom: 14px; }
.auth-agency__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 2.4vw + 0.8rem, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 10px;
}
.auth-agency__lead {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.auth-agency__form { display: grid; gap: 20px; }
.auth-agency__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.auth-agency__field { display: grid; gap: 8px; }
.auth-agency__field[hidden] { display: none !important; }
.auth-agency__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.auth-agency__label {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy);
}
.auth-agency__forgot {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.auth-agency__forgot:hover { text-decoration: underline; }

.auth-agency__control { position: relative; }
.auth-agency__control > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.auth-agency__input,
.auth-agency__select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px; /* ≥16px evita zoom iOS */
  color: var(--navy);
  background: var(--surface-2);
  border: 1px solid var(--line-lite);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.auth-agency__input::placeholder { color: var(--ink-3); }
.auth-agency__input--icon { padding-left: 44px; }
.auth-agency__input--toggle { padding-right: 44px; }
.auth-agency__input:focus,
.auth-agency__select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px oklch(0.6655 0.0977 229.58 / 0.22);
}
.auth-agency__input.is-invalid,
.auth-agency__select.is-invalid {
  border-color: oklch(0.55 0.18 25);
}

.auth-agency__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  padding: 4px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  line-height: 0;
}
.auth-agency__toggle:hover {
  color: var(--navy);
  background: oklch(0.2 0.04 258 / 0.06);
}

.auth-agency__select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.auth-agency__select.auth-agency__input--icon { padding-left: 44px; }

.auth-agency__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.auth-agency__check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.auth-agency__check label {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.auth-agency__check a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-agency__check a:hover { color: oklch(0.50 0.089 230.34); }

.auth-agency__hint {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
  margin: 0;
}
.auth-agency__optional {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 12px;
}
.auth-agency__error {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: oklch(0.45 0.16 25);
  margin: 0;
}
.auth-agency__error[hidden] { display: none !important; }
.auth-agency__dup-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 16px;
  margin: 12px 0 0;
  font-family: var(--font-sans);
  font-size: 14px;
}
.auth-agency__dup-links[hidden] { display: none !important; }
.auth-agency__dup-links a,
.auth-agency__dup-links button {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  background: transparent;
  border: 0;
  padding: 10px 4px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
}
.auth-agency__dup-links a:hover,
.auth-agency__dup-links button:hover {
  text-decoration: underline;
}

.auth-agency__alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  text-align: center;
  margin-bottom: 8px;
}
.auth-agency__alert--error {
  background: oklch(0.96 0.04 25);
  color: oklch(0.4 0.14 25);
}
.auth-agency__alert--success {
  background: oklch(0.96 0.04 155);
  color: oklch(0.35 0.1 155);
}
.auth-agency__alert[hidden] { display: none !important; }

.auth-agency__submit {
  width: 100%;
  margin-top: 4px;
}
.auth-agency__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-google {
  margin-top: 28px;
}
.auth-google[hidden] {
  display: none !important;
}
.auth-google.is-busy {
  opacity: 0.65;
  pointer-events: none;
}
.auth-google__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
}
.auth-google__divider::before,
.auth-google__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-lite);
}
.auth-google__divider span {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.auth-google.is-focus {
  outline: 3px solid oklch(0.6655 0.0977 229.58 / 0.45);
  outline-offset: 6px;
  border-radius: 16px;
}
.auth-google__host {
  min-height: 48px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.auth-google__host > div,
.auth-google__host iframe {
  max-width: 100%;
  min-height: 40px;
}
.auth-google.is-pending {
  visibility: hidden;
}
.auth-google__consent {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
}
.auth-google__consent a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}
.auth-google__consent a:hover {
  text-decoration: underline;
}

.auth-agency__footer-note {
  text-align: center;
  margin-top: 28px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-2);
}
.auth-agency__footer-note a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}
.auth-agency__footer-note a:hover {
  color: oklch(0.50 0.089 230.34);
  text-decoration: underline;
}

/* Footer dentro do shell auth */
.auth-agency .az-footer {
  margin-top: auto;
}

@media (max-width: 720px) {
  .auth-agency__nav { padding: 14px 16px; }
  .auth-agency__grid { grid-template-columns: 1fr; }
  .auth-agency__panel { padding: 28px 18px 32px; }
  .auth-agency__main {
    padding: 24px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  }
  .auth-agency .btn--hero {
    font-size: 15px;
    height: 48px;
    min-height: 48px;
  }
  .auth-google__consent a {
    display: inline-block;
    padding: 10px 2px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-agency .btn,
  .auth-agency__input,
  .auth-google {
    transition: none;
  }
}
