/**
 * Páginas de auth públicas (magiclink, SSO errors, login legado).
 * Chrome: public-chrome.css
 */

.auth-wrap {
  overflow-x: clip;
}

.auth-hero.ds-section {
  position: relative;
  display: block;
  padding: 2.5rem 0 4rem;
  margin: 0;
  text-align: center;
  isolation: isolate;
  border-top: none;
  border-bottom: none;
  background: transparent;
  overflow: visible;
  min-height: min(70vh, 42rem);
}

.auth-hero.ds-section::before {
  display: none;
}

.auth-hero > .landing-shell {
  position: relative;
  z-index: 1;
}

/* —— Login estilo legado (print 1) + chrome DSF —— */
.auth-login {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}

.auth-login__welcome {
  margin: 0 0 1.75rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.55rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--heading, #fafafa);
}

.auth-login__card.neural-panel {
  padding: 1.5rem 1.4rem 1.5rem !important;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35) !important;
}

.auth-login__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
  padding: 0.3rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-login__tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-dim, #888894);
  font-family: var(--font-body, inherit);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-login__tab:hover {
  color: var(--heading, #fafafa);
  background: rgba(255, 255, 255, 0.04);
}

.auth-login__tab.is-active {
  color: var(--heading, #fafafa);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-login__tab:focus-visible {
  outline: 2px solid rgba(51, 210, 255, 0.55);
  outline-offset: 2px;
}

.auth-login__intro {
  margin-bottom: 1.15rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary, #a1a1aa);
  text-align: center;
}

.auth-login__intro p {
  margin: 0 0 0.55rem;
  text-align: center;
}

.auth-login__intro p:last-child {
  margin-bottom: 0;
}

.auth-login__intro strong {
  color: var(--heading, #fafafa);
  font-weight: 600;
}

.auth-login__panel {
  display: none;
  width: 100%;
  text-align: center;
}

.auth-login__panel.is-active,
.auth-login__panel:not([hidden]) {
  display: block;
}

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

.auth-login__panel-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-dim, #888894);
  text-align: center;
}

.auth-login__errornote {
  background: rgba(181, 38, 38, 0.12);
  border-left: 4px solid #e05a5a;
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.875rem;
  margin: 0 0 1rem;
  line-height: 1.5;
  text-align: left;
}

.auth-form {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.auth-form__row {
  margin-bottom: 1rem;
  width: 100%;
  text-align: left;
}

.auth-form .ds-label {
  display: block;
  width: 100%;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--heading, #fafafa);
  text-align: left;
}

/* Anula max-width: 320px do DSF — campos a preencher a largura do cartão */
.auth-login .auth-form .ds-input,
.auth-login .auth-form input.ds-input,
.auth-login .auth-form input[type="email"],
.auth-login .auth-form input[type="text"],
.auth-login .auth-form input[type="password"] {
  display: block;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.auth-form__errors,
.auth-form .ds-helper {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #fca5a5;
  text-align: center;
}

.auth-login__btn-row {
  display: flex;
  justify-content: center;
  margin-top: 0.55rem;
}

.auth-login__btn-row--microsoft {
  margin-top: 0;
}

.auth-login__divider,
hr.auth-login__divider {
  display: block;
  width: 100%;
  height: 0;
  padding: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.02rem 0 !important;
}

/* Entrar — azul legado */
.auth-btn-enter.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  padding: 12px 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  color: #fff !important;
  background: #1a489f !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none !important;
}

.auth-btn-enter.btn:hover {
  background: #1d52b3 !important;
  box-shadow: 0 0 20px rgba(26, 72, 159, 0.4);
  transform: translateY(-1px);
  color: #fff !important;
}

/* Microsoft — branco + logo (print 1) */
.auth-btn-microsoft.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
  color: #333 !important;
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  box-shadow: none;
  text-decoration: none !important;
  backdrop-filter: none;
}

.auth-btn-microsoft.btn:hover {
  background: #f3f4f6 !important;
  border-color: #9ca3af !important;
  color: #111827 !important;
  transform: translateY(-1px);
}

.auth-btn-microsoft__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Sent / failed / SSO — painel centrado */
.auth-hero__inner {
  max-width: 28rem;
  margin: 0 auto;
}

.auth-hero__title.ds-display {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.auth-hero__eyebrow.tagline {
  margin: 0 auto 0.85rem;
}

.auth-hero__lead {
  max-width: 26rem;
  margin: 0.85rem auto 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-secondary, #a1a1aa);
}

.auth-hero__panel.neural-panel {
  margin-top: 1.75rem;
  padding: 1.5rem 1.35rem 1.4rem !important;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28) !important;
}

.auth-hero__panel p {
  margin: 0 0 0.75rem;
  color: var(--text-secondary, #a1a1aa);
  line-height: 1.55;
  font-size: 0.95rem;
}

.auth-hero__panel p:last-child {
  margin-bottom: 0;
}

.auth-hero__panel a {
  color: var(--accent-cyan, #33d2ff);
}

.auth-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
  margin-top: 1.35rem;
}

.auth-hero__cta-row--center {
  justify-content: center;
  margin-top: 1.5rem;
}

.auth-hero__cta-row .btn {
  flex: 1 1 auto;
  min-width: 10rem;
}

@media (max-width: 560px) {
  .auth-hero__cta-row .btn {
    width: 100%;
  }
}

/* —— Light mode —— */
html[data-theme="light"] .auth-login__welcome {
  color: var(--heading, #0a0a0e);
}

html[data-theme="light"] .auth-login__card.neural-panel,
html[data-theme="light"] .auth-hero__panel.neural-panel {
  border-color: rgba(10, 10, 14, 0.1) !important;
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .auth-login__tabs {
  background: rgba(10, 10, 14, 0.04);
  border-color: rgba(10, 10, 14, 0.1);
}

html[data-theme="light"] .auth-login__tab {
  color: var(--text-dim, #5b6472);
}

html[data-theme="light"] .auth-login__tab:hover {
  color: var(--heading, #0a0a0e);
  background: rgba(10, 10, 14, 0.05);
}

html[data-theme="light"] .auth-login__tab.is-active {
  color: var(--heading, #0a0a0e);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .auth-login__intro,
html[data-theme="light"] .auth-login__panel-hint,
html[data-theme="light"] .auth-hero__lead,
html[data-theme="light"] .auth-hero__panel p {
  color: var(--text-secondary, #5b6472);
}

html[data-theme="light"] .auth-login__intro strong,
html[data-theme="light"] .auth-form .ds-label,
html[data-theme="light"] .auth-hero__title.ds-display {
  color: var(--heading, #0a0a0e);
}

html[data-theme="light"] .auth-login__divider,
html[data-theme="light"] hr.auth-login__divider {
  border-top-color: rgba(10, 10, 14, 0.12);
}

html[data-theme="light"] .auth-btn-microsoft.btn {
  color: #333 !important;
  background: #fff !important;
  border-color: #d1d5db !important;
}

html[data-theme="light"] .auth-btn-microsoft.btn:hover {
  background: #f3f4f6 !important;
  border-color: #9ca3af !important;
  color: #111827 !important;
}
