.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 26px 18px;
  overflow: hidden;
  background: rgba(2, 8, 23, .38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.auth-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-overlay .auth-shell {
  width: min(100%, 500px);
  max-width: calc(100vw - 36px);
  min-height: 0;
  padding: 12px;
  overflow: visible;
}

.auth-modal-overlay .auth-card {
  width: 100%;
  max-width: 448px;
  max-height: calc(100vh - 52px);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease;
}

.auth-modal-overlay .auth-card > .auth-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  z-index: 5 !important;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(103, 232, 249, .55);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(30, 64, 175, .72), rgba(8, 47, 73, .9));
  color: #dffaff;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 0 12px rgba(34, 211, 238, .25), inset 0 1px 0 rgba(255, 255, 255, .15);
  transform: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.auth-modal-overlay .auth-card > .auth-close:hover {
  border-color: #67e8f9;
  background: linear-gradient(145deg, #2563eb, #06b6d4);
  color: #fff;
  box-shadow: 0 0 10px rgba(34, 211, 238, .55), 0 0 24px rgba(37, 99, 235, .35);
  transform: rotate(90deg) scale(1.05);
}

body.auth-embedded,
html:has(body.auth-embedded) {
  background: transparent !important;
  overflow: hidden !important;
}

body.auth-embedded::before,
body.auth-embedded::after,
body.auth-embedded .header {
  display: none !important;
}

body.auth-embedded .auth-shell {
  min-height: 100vh;
  padding: 12px !important;
}

body.auth-embedded .auth-card {
  max-height: calc(100vh - 24px);
  overflow: hidden;
}

.auth-modal-overlay.is-open .auth-card {
  transform: translateY(0) scale(1);
}

.auth-modal-overlay .auth-close {
  cursor: pointer;
}

body.auth-modal-open {
  overflow: hidden;
}

body.auth-modal-open > *:not(.auth-modal-overlay) {
  filter: blur(2px);
  transition: filter .22s ease;
}

@media (max-width: 560px) {
  .auth-modal-overlay {
    align-items: start;
    padding: 16px 8px;
  }

  .auth-modal-overlay .auth-shell {
    max-width: calc(100vw - 16px);
    padding: 8px;
  }

  .auth-modal-overlay .auth-card {
    max-height: calc(100vh - 32px);
  }
}

/* O portal usa autenticação exclusivamente por e-mail e senha. */
.auth-divider,
.btn-google {
  display: none !important;
}
