/* auth.css — autenticação: dropdown de perfil + modal */

/* ============================================================
   Ícone de perfil + dropdown
   ============================================================ */

.perfil-wrapper {
  position: relative;
  flex-shrink: 0;
}

.btn-perfil {
  background: none;
  border: none;
  color: var(--txt-soft);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.15s;
}

.btn-perfil:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-perfil {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(22, 22, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 6px;
  min-width: 170px;
  z-index: 5000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dropdown-perfil.escondida { display: none; }

.dropdown-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.15s;
  white-space: nowrap;
}

.dropdown-item:hover { background: rgba(255, 255, 255, 0.09); }

.dropdown-item-logout { color: #ff6b6b; }

.dropdown-nome {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 14px 2px;
  font-family: 'Archivo', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dropdown-divisor {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* ============================================================
   Modal de autenticação (overlay opcional)
   ============================================================ */

.modal-auth {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-auth.escondida { display: none; }

.modal-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-auth-card {
  position: relative;
  z-index: 1;
  margin: 16px;
}

.modal-auth-fechar {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.modal-auth-fechar:hover { color: #fff; }

/* ============================================================
   Card de autenticação (dentro do modal)
   ============================================================ */

.auth-card {
  background: rgba(18, 18, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.auth-logo-titulo {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
}

.auth-logo-slogan {
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin-top: 3px;
}

.auth-divisor {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0;
}

/* Abas Entrar / Cadastre-se */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Archivo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 0 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}

.auth-tab.auth-tab-ativa {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Label acima do input */
.auth-label {
  font-family: 'Archivo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  margin-bottom: -6px;
}

/* Formulário */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-size: 0.95rem;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.auth-input::placeholder { color: rgba(255, 255, 255, 0.25); }

.auth-btn-submit {
  margin-top: 8px;
  width: 100%;
}

/* Mensagem de erro */
.auth-erro {
  color: #ff6b6b;
  font-size: 0.82rem;
  text-align: center;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
}

/* ============================================================
   Notificação estilo iPhone — pill que expande no topo
   ============================================================ */

.notif-pill {
  position: fixed;
  top: 16px;
  left: 50%;

  /* começa fora da tela, centrado horizontalmente */
  transform: translateX(-50%) translateY(calc(-100% - 24px));

  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;

  /* pill estreito — só o ícone */
  max-width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0 12px;

  background: rgba(30, 30, 32, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
              0 2px 8px  rgba(0, 0, 0, 0.25);

  cursor: pointer;
  z-index: 9999;

  transition: transform 0.45s cubic-bezier(0.34, 1.40, 0.64, 1),
              max-width  0.45s cubic-bezier(0.34, 1.10, 0.64, 1) 0.30s,
              min-width  0.45s cubic-bezier(0.34, 1.10, 0.64, 1) 0.30s,
              padding    0.45s ease                               0.30s;
}

/* Estado expandido */
.notif-pill.notif-aberta {
  transform: translateX(-50%) translateY(0);
  max-width: 340px;
  min-width: 220px;
  padding: 0 14px 0 12px;
  gap: 10px;
}

/* Estado saindo */
.notif-pill.notif-saindo {
  transform: translateX(-50%) translateY(calc(-100% - 24px));
  transition: transform 0.35s cubic-bezier(0.55, 0, 0.45, 1) 0.15s,
              max-width  0.25s ease,
              min-width  0.25s ease,
              padding    0.25s ease;
  max-width: 48px;
  min-width: 48px;
  padding: 0 12px;
}

/* Ícone da notificação */
.notif-icone {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #2BD46A;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Texto da notificação */
.notif-corpo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.25s ease 0.55s;
  pointer-events: none;
}

.notif-pill.notif-aberta .notif-corpo { opacity: 1; }

.notif-pill.notif-saindo .notif-corpo {
  opacity: 0;
  transition: opacity 0.10s ease;
}

.notif-app {
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.notif-msg {
  font-family: 'Archivo', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

/* Botão em carregamento (envio de login/cadastro) — feedback visual durante a
   espera, inclusive no "cold start" do servidor. */
.btn-carregando {
  opacity: 0.75;
  cursor: progress;
  animation: btn-pulsando 1.1s ease-in-out infinite;
}

@keyframes btn-pulsando {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 0.5; }
}
