/* ==========================================================================
   PERFIL.CSS — Layout Dashboard de 2 Colunas com Abas
   ========================================================================== */

.page-perfil *, 
.page-perfil *::before, 
.page-perfil *::after {
  box-sizing: border-box;
}

.page-perfil .app-main {
  max-width: 1100px;
  margin: 0 auto;
}

/* Grelha Principal de 2 Colunas */
.perfil-layout-grid {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 2.5rem !important;
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  width: 100%;
}

/* --- COLUNA ESQUERDA (SIDEBAR) --- */
.perfil-sidebar {
  flex: 0 0 240px !important;
  width: 240px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1.75rem !important;
  border-right: 1px solid #f1f5f9;
  padding-right: 2rem;
}

.perfil-avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.perfil-avatar-grande {
  width: 100% !important;
  height: 200px !important;
  background-color: #1f3d32;
  color: #ffffff;
  border-radius: 12px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 3.5rem;
  font-weight: 700;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.perfil-avatar-grande img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-alterar-foto {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f3d32;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-alterar-foto:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.perfil-section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.25rem;
}

.perfil-sidebar-item strong {
  display: block;
  font-size: 0.95rem;
  color: #1e293b;
}

.perfil-sidebar-item p {
  margin: 0.2rem 0 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.badge-primary {
  display: inline-block;
  background-color: #e0f2fe;
  color: #0284c7;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.3rem;
}

/* --- COLUNA DIREITA (CONTEÚDO PRINCIPAL) --- */
.perfil-main-content {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1.75rem !important;
}

.perfil-header-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 1rem;
}

.perfil-nome-titulo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.perfil-subtitulo {
  font-size: 0.95rem;
  color: #0284c7;
  font-weight: 600;
  margin: 0.25rem 0 0 0;
}

/* NAVEGAÇÃO POR ABAS */
.perfil-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-top: 1.25rem;
}

.tab-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  padding-bottom: 0.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #0284c7;
}

.tab-btn.active {
  color: #0284c7;
  border-bottom: 2px solid #0284c7;
}

/* PAINÉIS DAS ABAS */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Informações de Contato */
.perfil-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-row {
  display: flex;
  font-size: 0.9rem;
}

.info-label {
  width: 150px;
  color: #64748b;
  font-weight: 500;
}

.info-value {
  color: #1e293b;
  font-weight: 600;
}

.highlight-blue {
  color: #0284c7;
}

/* Botão Sair */
.btn-sair-custom {
  background-color: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sair-custom:hover {
  background-color: #ffe4e6;
}

/* Aviso e Histórico */
.aviso-entrega-presencial {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.aviso-entrega-presencial p { margin: 0; }

.historico-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.historico-titulo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.btn-nova-doacao {
  background-color: #1f3d32 !important;
  border: none !important;
  border-radius: 6px !important;
  color: white !important;
}

/* Card Pix */
.card--pix {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
}

/* Responsive para dispositivos móveis */
@media (max-width: 768px) {
  .perfil-layout-grid {
    flex-direction: column !important;
    padding: 1.25rem;
    gap: 1.5rem !important;
  }

  .perfil-sidebar {
    width: 100% !important;
    flex: none !important;
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1.5rem;
  }

  .perfil-avatar-grande {
    height: 160px !important;
  }

  .perfil-tabs {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .info-row {
    flex-direction: column;
    gap: 0.1rem;
  }

  .info-label {
    width: 100%;
  }
}