/* Acesso público — login + cadastro (FLUXO NFE) */

.auth-page {
  --auth-ink: #062e2a;
  --auth-teal: #0d9488;
  --auth-teal-deep: #0f766e;
  --auth-mint: #5eead4;
  --auth-surface: #f4faf8;
  --auth-card: #ffffff;
  --auth-line: rgba(15, 118, 110, 0.14);
  --auth-muted: #5b6b68;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: auto;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: #16302c;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(13, 148, 136, 0.28), transparent 50%),
    linear-gradient(145deg, #042724 0%, #0a4f47 48%, #083b36 100%);
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.5;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(4, 32, 29, 0.55);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  animation: authRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-shell--wide {
  width: min(1120px, 100%);
  grid-template-columns: 0.9fr 1.1fr;
}

@keyframes authRise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.75rem 2.5rem;
  color: #fff;
  min-height: 560px;
  background:
    linear-gradient(160deg, rgba(94, 234, 212, 0.08), transparent 40%),
    transparent;
}

.auth-brand__logo {
  width: clamp(200px, 24vw, 260px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.2));
}

.auth-brand__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.auth-brand h1 {
  margin: 0 0 1rem;
  max-width: 12ch;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
}

.auth-brand__lead {
  max-width: 34ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.55;
}

.auth-brand__points {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.auth-brand__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.auth-brand__points li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.4rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--auth-mint);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.18);
}

.auth-brand__foot {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2.35rem;
  background: var(--auth-surface);
  color: #16302c;
  animation: authFade 0.45s ease 0.12s both;
}

@keyframes authFade {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

.auth-panel h2 {
  margin: 0 0 0.35rem;
  font-family: "Outfit", sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--auth-ink);
}

.auth-panel__sub {
  margin: 0 0 1.4rem;
  color: var(--auth-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-panel .form-label {
  color: #2a4540;
  font-weight: 600;
}

.auth-panel .form-control {
  background: #fff;
  border-color: var(--auth-line);
  color: #16302c;
  min-height: 46px;
}

.auth-panel .form-control:focus {
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.auth-panel .btn-primary {
  background: linear-gradient(135deg, var(--auth-teal), var(--auth-teal-deep));
  border: 0;
  color: #fff;
  font-weight: 600;
  min-height: 48px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-panel .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
}

.auth-panel .btn-secondary {
  background: #fff;
  border: 1px solid var(--auth-line);
  color: var(--auth-ink);
}

.auth-panel .login-feedback.error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.auth-panel .login-feedback.success {
  color: #166534;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.auth-cta-block {
  margin-top: 1.5rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(255, 255, 255, 0.9));
}

.auth-cta-block h3 {
  margin: 0 0 0.35rem;
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  color: var(--auth-ink);
}

.auth-cta-block p {
  margin: 0 0 0.9rem;
  color: var(--auth-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-cta-block .btn {
  width: 100%;
  min-height: 46px;
  font-weight: 600;
}

.auth-cta-block .btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--auth-teal);
  color: var(--auth-teal-deep);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.auth-cta-block .btn-signup:hover {
  background: var(--auth-teal);
  color: #fff;
  transform: translateY(-1px);
}

.auth-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--auth-muted);
}

.auth-meta-row a {
  color: var(--auth-teal-deep);
  font-weight: 600;
  text-decoration: none;
}

.auth-meta-row a:hover { text-decoration: underline; }

/* Cadastro — wizard */
.auth-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.auth-step {
  flex: 1;
  padding: 0.55rem 0.4rem;
  border-radius: 10px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-muted);
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.auth-step.is-active {
  color: var(--auth-teal-deep);
  background: rgba(13, 148, 136, 0.14);
  border-color: rgba(13, 148, 136, 0.28);
}

.auth-step.is-done {
  color: #0f766e;
  background: rgba(16, 185, 129, 0.12);
}

.auth-wizard-pane[hidden] { display: none !important; }

.auth-wizard-pane {
  animation: authFade 0.3s ease both;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.auth-form-grid .span-2 { grid-column: span 2; }

.auth-form-grid .form-group { margin-bottom: 0; }

.auth-form-grid .hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--auth-muted);
}

.auth-nav-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.35rem;
  flex-wrap: wrap;
}

.auth-nav-row .btn { flex: 1; min-width: 140px; }

.auth-panel--scroll {
  justify-content: flex-start;
  max-height: min(860px, calc(100vh - 2rem));
  overflow-y: auto;
}

.auth-shell--wide .auth-brand { min-height: 640px; }

.cep-row {
  display: flex;
  gap: 0.5rem;
}

.cep-row .form-control { flex: 1; }

@media (max-width: 900px) {
  .auth-shell,
  .auth-shell--wide {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    min-height: auto;
    padding: 2rem;
  }
  .auth-brand h1 { font-size: 2.4rem; }
  .auth-panel,
  .auth-panel--scroll {
    padding: 1.75rem;
    max-height: none;
  }
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-form-grid .span-2 { grid-column: auto; }
  .auth-steps { flex-wrap: wrap; }
}
