/* Login / cadastro modal — overlays current page without route change */

.bb-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: #05070fbf;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: bb-auth-fade 0.2s ease;
}

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

/* .input-group { display:flex } sobrescreve o atributo HTML hidden */
.bb-auth-modal [hidden],
.bb-auth-modal .bb-auth-hidden {
  display: none !important;
}

@keyframes bb-auth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bb-auth-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: min(92vh, 720px);
  overflow: auto;
  background: var(--surface, #171c36);
  border: 1px solid var(--border, #2a3158);
  border-radius: 18px;
  box-shadow: var(--shadow, 0 10px 40px #00000073);
  padding: 28px 24px 22px;
  animation: bb-auth-pop 0.25s ease;
}

@keyframes bb-auth-pop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bb-auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim, #9aa3c7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.bb-auth-close:hover {
  color: var(--text, #eef1ff);
  background: #ffffff0d;
}

.bb-auth-logo {
  display: block;
  height: 64px;
  width: auto;
  margin: 4px auto 18px;
  filter: drop-shadow(0 6px 18px #0000008c);
}

.bb-auth-modal h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  text-align: center;
}

.bb-auth-modal .bb-auth-lead {
  margin: 0 0 18px;
  text-align: center;
  color: var(--text-dim, #9aa3c7);
  font-size: 0.95rem;
}

.bb-auth-modal .input-group {
  margin-bottom: 12px;
}

.bb-auth-modal .btn-block {
  margin-top: 6px;
}

.bb-auth-switch {
  margin-top: 16px;
  text-align: center;
  color: var(--text-dim, #9aa3c7);
  font-size: 0.92rem;
}

.bb-auth-switch button {
  border: none;
  background: none;
  color: var(--accent-2, #00c2ff);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bb-auth-ref {
  margin-bottom: 14px;
}

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