/* ==========================================================================
   Auth B2B — shared design system for Login / Cadastro / Recuperação de senha
   Source: Figma "Protótipo B2B" (Login, Cadastro, Recuperação frames)
   ========================================================================== */

:root {
  --auth-verde: #4bd398;
  --auth-verde-escuro: #2ebe80;
  --auth-texto: #232323;
  --auth-texto-secundario: #6c6c6c;
  --auth-placeholder: #9a9a9a;
  --auth-borda: #d9d9d9;
  --auth-azul: #007aff;
  --auth-amarelo: #fec53d;
}

.auth-page * {
  box-sizing: border-box;
}

.auth-page {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  overflow-x: hidden;
}

/* ---------- centered card layout (Cadastro / Esqueci a senha / Nova senha) ---------- */

.auth-card-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
}

.auth-card {
  width: 100%;
  min-width: 0;
  max-width: 474px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- shared header (logo + divider + title) ---------- */

.auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-header .auth-logo {
  width: 44px;
  height: 37px;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-header .auth-divider {
  align-self: stretch;
  width: 1px;
  background: var(--auth-borda);
}

.auth-header h1 {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--auth-texto);
}

.auth-title {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--auth-texto);
}

.auth-subtitle {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--auth-texto-secundario);
}

.auth-error {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #dc3545;
}

/* ---------- form ---------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.auth-field {
  position: relative;
  width: 100%;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1.5px solid var(--auth-borda);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--auth-texto);
  background: #fff;
  transition: border-color .15s ease;
}

.auth-input::placeholder {
  color: var(--auth-placeholder);
  font-family: 'DM Sans', sans-serif;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-verde);
}

.auth-field-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-placeholder);
  font-size: 16px;
  pointer-events: none;
}

.auth-field-icon.is-clickable {
  pointer-events: auto;
  cursor: pointer;
}

/* ---------- buttons ---------- */

.auth-btn-primary {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--auth-verde);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: opacity .15s ease;
}

.auth-btn-primary:hover {
  opacity: .9;
  color: #fff;
}

.auth-btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.auth-btn-secondary {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--auth-borda);
  border-radius: 10px;
  background: #fff;
  color: var(--auth-texto);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color .15s ease, background .15s ease;
}

.auth-btn-secondary:hover {
  border-color: var(--auth-verde);
  background: #fafffd;
}

/* ---------- links / footer text ---------- */

.auth-footer-text {
  margin: 0;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--auth-texto-secundario);
}

.auth-link {
  color: var(--auth-verde);
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--auth-verde-escuro);
  text-decoration: underline;
}

.auth-link-blue {
  color: var(--auth-azul);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.auth-link-blue:hover {
  text-decoration: underline;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  width: 100%;
  color: var(--auth-verde-escuro);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.auth-back-link:hover {
  text-decoration: underline;
}

/* ---------- toggle switch (Lembrar senha) ---------- */

.auth-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.auth-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.auth-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #f2f2f2;
  border: 1px solid #e5e5e5;
  transition: background .15s ease;
  flex-shrink: 0;
}

.auth-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 1px 1px 3px rgba(51, 51, 51, .3);
  transition: transform .15s ease;
}

.auth-switch input:checked + .auth-switch-track {
  background: var(--auth-verde);
  border-color: var(--auth-verde);
}

.auth-switch input:checked + .auth-switch-track::after {
  transform: translateX(20px);
}

.auth-switch-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #1a1a1a;
}

/* ---------- terms checkbox (Cadastro) ---------- */

.auth-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-terms-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--auth-verde);
  border-radius: 4px;
}

.auth-terms-row label {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1e1e1e;
}

/* ---------- password strength (shared with inputValidationPassword macro) ---------- */

.auth-strength-track {
  height: 8px;
  width: 100%;
  border-radius: 12px;
  background: var(--auth-borda);
  overflow: hidden;
}

.auth-strength-bar {
  height: 100%;
  border-radius: 12px;
  transition: width .25s ease, background-color .25s ease;
}

.auth-strength-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.auth-strength-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #1e1e1e;
}

.auth-strength-list i {
  font-size: 15px;
  width: 18px;
  text-align: center;
}

/* ---------- Login screen: two-pane layout ---------- */

.auth-login-wrap {
  min-height: 100vh;
  display: flex;
}

.auth-login-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-login-left .auth-card {
  max-width: 420px;
  gap: 24px;
}

.auth-login-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: linear-gradient(180deg, #1c203a 0%, #2f7088 100%);
}

.auth-login-right img {
  width: 100%;
  max-width: 380px;
  height: auto;
}

.auth-divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.auth-divider-row .line {
  flex: 1 1 0;
  height: 1px;
  background: var(--auth-borda);
}

.auth-divider-row span {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--auth-texto-secundario);
}

.auth-secondary-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

@media (max-width: 991px) {
  .auth-login-right {
    display: none;
  }

  .auth-login-wrap {
    background: linear-gradient(180deg, #1c203a 0%, #2f7088 100%);
  }

  .auth-login-left {
    padding: 40px 20px;
  }

  .auth-login-left .auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  }
}

@media (max-width: 480px) {
  .auth-card-page {
    padding: 32px 16px;
  }

  .auth-header h1,
  .auth-title {
    font-size: 26px;
  }
}
