/* ═══════════════════════════════════════════════════════════
   PROFILE.CSS — Aba de Perfil

   IMPORTANTE: este seletor NÃO define `display`. Quem mostra/
   esconde o painel é o `.panel` / `.panel.active` do main.css
   (display: none ↔ display: flex). Como um seletor por id
   (#profile-panel) tem mais prioridade que um por classe (.panel),
   qualquer `display` colocado aqui sobrescreveria o `display: none`
   e o painel ficaria visível o tempo todo, mesmo em outras abas.
   Mesmo padrão usado em #achievements-panel e #history-panel.
   ═══════════════════════════════════════════════════════════ */

#profile-panel {
  overflow-y: auto;
  padding: 24px;
  gap: 16px;
}

/* Limita a largura do conteúdo sem mexer no painel em si */
#profile-panel > * {
  width: 100%;
  max-width: 640px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-field:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.profile-field span {
  color: var(--text-dim);
}
.profile-field strong {
  color: var(--text);
  font-weight: 600;
}

.goal-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.goal-row .inp {
  max-width: 100px;
}

/* .stats-row (calendar.css) tem margin-bottom próprio; aqui o
   espaçamento vem do gap do painel */
#profile-panel .stats-row {
  margin-bottom: 0;
}

.profile-danger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-color: rgba(248, 113, 113, 0.35);
}
.profile-danger strong {
  color: var(--danger);
}
.profile-danger p {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .profile-danger {
    flex-direction: column;
    align-items: flex-start;
  }
  #profile-panel .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* "Sair" dentro do Perfil: só aparece no celular, onde a sidebar
   (que tem o botão Sair no desktop) fica escondida. */
.profile-logout-mobile {
  display: none;
}

@media (max-width: 768px) {
  .profile-logout-mobile {
    display: flex;
  }
}
