/* Dashboard Layout Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
}

.welcome-banner {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-medium) 100%);
  color: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.welcome-subtitle {
  font-size: var(--fs-sm);
  color: var(--beige);
  font-weight: 500;
}

.dashboard-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 992px) {
  .dashboard-sections-grid {
    grid-template-columns: 1fr;
  }
}

.recent-activities-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.activity-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--gray-light);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--off-white);
  color: var(--brown-medium);
  flex-shrink: 0;
}

.activity-details {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--brown-dark);
}

.activity-time {
  font-size: var(--fs-xs);
  color: var(--gray-medium);
}

/* ==================== ESTILOS MOBILE-FIRST (MOCKUP ACCORDANCE) ==================== */

/* Wrapper para o fundo bege em todo o dashboard mobile */
.mobile-dashboard-wrapper {
  background-color: #F8F5F2; /* Cor de fundo principal clara */
  padding: 16px;
  min-height: 100vh;
  margin: -24px -16px; /* Compensar padding do main content */
  font-family: var(--font-body);
}

/* Títulos das Seções */
.section-title-mobile h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #3D2B1F; /* Marrom escuro profundo */
  margin-bottom: 12px;
  margin-top: 24px;
}

/* 1. Cartão Principal de Boas-Vindas */
.premium-welcome-card {
  background: linear-gradient(145deg, #4F321B 0%, #2A190C 100%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  min-height: 160px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.welcome-content {
  flex: 1;
  padding: 24px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.welcome-greeting {
  font-size: 11px;
  color: #D6C1A6;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.welcome-username {
  font-size: 18px;
  font-weight: 800;
  color: #FFF;
  margin: 0 0 12px 0;
}

.welcome-description {
  font-size: 10px;
  color: #9E9E9E;
  line-height: 1.4;
  max-width: 140px;
  margin: 0 0 16px 0;
}

.welcome-progress {
  display: flex;
  height: 4px;
  width: 140px;
}

.welcome-progress-fill {
  background: #D4AF37;
  height: 100%;
  border-radius: 2px 0 0 2px;
}

.welcome-progress-track {
  flex: 1;
  background: #23160D;
  height: 100%;
  border-radius: 0 2px 2px 0;
}

/* Medalha Gigante Círculo */
.welcome-white-circle {
  position: absolute;
  right: -40px;
  top: -20px;
  width: 180px;
  height: 180px;
  background: #FFFFFF;
  border-radius: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-medal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-right: 30px; /* offset para compensar a parte escondida do círculo */
  box-shadow: 0 8px 16px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.4);
  border: 2px solid #FFF;
  position: relative;
  z-index: 2;
}

.welcome-medal.bronze { background: linear-gradient(135deg, #C5835C, #8C5230); }
.welcome-medal.silver { background: linear-gradient(135deg, #B3B3B3, #7A7A7A); }
.welcome-medal.gold { background: linear-gradient(135deg, #E5C158, #B8860B); }

.medal-top-star {
  width: 10px;
  height: 10px;
  color: #FFF;
  fill: #FFF;
  margin-bottom: 2px;
}

.medal-subtitle {
  font-size: 7px;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 0.5px;
}

.medal-title {
  font-size: 13px;
  font-weight: 900;
  color: #FFF;
  letter-spacing: 1px;
}

.medal-bottom-stars {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.medal-bottom-stars i {
  width: 8px;
  height: 8px;
  color: #FFF;
  fill: #FFF;
}

/* Barra de Evolução Fina */
.welcome-evolution-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.evolution-progress-container {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.evolution-progress-fill {
  height: 100%;
  background-color: #D4AF37; /* Dourado */
  border-radius: 4px;
}

.evolution-percentage-text {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

/* 2. Resumo de Desempenho (Grid 2x2) */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.02);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.kpi-label {
  font-size: 9px;
  font-weight: 800;
  color: #8D8D8D;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.kpi-more {
  width: 14px;
  height: 14px;
  color: #A0A0A0;
}

.kpi-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.kpi-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 50%; /* Agora é um círculo perfeito */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-box i {
  width: 16px;
  height: 16px;
}

.kpi-value {
  font-size: 16px;
  font-weight: 800;
  color: #3D2B1F;
  letter-spacing: -0.5px;
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #2E7D32; /* Verde sucesso */
}

.kpi-trend.text-gray {
  color: #8D8D8D;
}
.kpi-trend.text-green {
  color: #2E7D32;
}

.kpi-trend i {
  width: 12px;
  height: 12px;
}

.kpi-extra {
  color: #8D8D8D;
  font-weight: 600;
}

/* 3. Ações Rápidas (Grid 4x2) */
.quick-actions-mobile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 8px;
}

.quick-action-icon {
  width: 50px;
  height: 50px;
  background-color: var(--white);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  color: #62402A;
  transition: transform 0.2s;
}

.quick-action-icon i {
  width: 20px;
  height: 20px;
}

.quick-action-btn:active .quick-action-icon {
  transform: scale(0.95);
}

.quick-action-btn span {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  text-align: center;
}

/* 4. Evolução de Nível */
.evolution-card {
  background-color: #2A2A2A;
  border-radius: 20px;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.evo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.evo-item.active {
  opacity: 1;
  transform: scale(1.1);
}

.evo-label {
  font-size: 9px;
  font-weight: 700;
  color: #8D8D8D;
  letter-spacing: 1px;
}

.evo-medal {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #FFF;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2);
}

.evo-medal.bronze { background: linear-gradient(135deg, #A05A2C, #D48C5B); border: 2px solid #E4A77D; }
.evo-medal.silver { background: linear-gradient(135deg, #7F8C8D, #BDC3C7); border: 2px solid #DFE4EA; color: #333; text-shadow: none; }
.evo-medal.gold { background: linear-gradient(135deg, #B8860B, #FFD700); border: 2px solid #FFE55C; color: #5C4033; text-shadow: none; }

.evo-name {
  font-size: 11px;
  font-weight: 700;
  color: #FFF;
}

.evo-value {
  font-size: 9px;
  font-weight: 700;
  color: #D4AF37;
}

.evo-arrow {
  color: #555;
}

/* 5. Metas do Mês (Gauge Semicírculo) */
.goals-card {
  background-color: var(--white);
  border-radius: 20px;
  padding: 24px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.goal-left, .goal-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.goal-right {
  text-align: right;
}

.goal-label {
  font-size: 11px;
  font-weight: 600;
  color: #8D8D8D;
}

.goal-value {
  font-size: 13px;
  font-weight: 800;
  color: #3D2B1F;
}

.goal-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 10px;
}

.gauge-wrapper {
  position: relative;
  width: 140px;
  height: 70px; /* Metade da altura = Semicírculo perfeito */
  overflow: hidden;
  margin-bottom: -15px; /* Compensa o espaço vazio inferior no layout flex */
}

.gauge-arch, .gauge-fill-arch {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px; /* Círculo completo */
  border-radius: 50%;
  box-sizing: border-box;
}

.gauge-arch {
  border: 14px solid #F0F0F0; /* Fundo mais claro */
  border-bottom-color: transparent;
  border-right-color: transparent;
  transform: rotate(-45deg); 
}

.gauge-fill-arch {
  border: 14px solid #62402A; /* Cor escura do preenchimento */
  border-bottom-color: transparent;
  border-right-color: transparent;
  transition: transform 1s ease-out;
  /* Rotação é injetada inline pelo JS (de -45deg a 135deg) */
}

.gauge-text {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #3D2B1F;
}

/* 6. Ranking dos Associados (Cartões Empilhados) */
.ranking-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ranking-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  background-color: var(--white);
}

.ranking-card.border-gold { border: 1px solid #F2E3B6; }
.ranking-card.border-silver { border: 1px solid #E9ECEF; }
.ranking-card.border-bronze { border: 1px solid #F0DFD3; }

.ranking-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ranking-avatar-box {
  position: relative;
  width: 44px;
  height: 44px;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9AB;
  border: 1px solid #E0E5E9;
}
.avatar-placeholder i { width: 22px; height: 22px; }

.ranking-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #FFF;
  border: 2px solid #FFF;
}

.ranking-badge.gold { background-color: #D4AF37; }
.ranking-badge.silver { background-color: #A8A9AD; }
.ranking-badge.bronze { background-color: #CD7F32; }

.ranking-info {
  display: flex;
  flex-direction: column;
}

.ranking-name {
  font-size: 14px;
  font-weight: 800;
  color: #3D2B1F;
}

.ranking-level {
  font-size: 10px;
  font-weight: 600;
  color: #8D8D8D;
}

.ranking-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ranking-val {
  font-size: 15px;
  font-weight: 800;
}

.ranking-val.gold-text { color: #B8860B; }
.ranking-val.silver-text { color: #6C757D; }
.ranking-val.bronze-text { color: #A0522D; }

.ranking-sales {
  font-size: 10px;
  font-weight: 600;
  color: #8D8D8D;
}

/* 7. Últimas Comissões (Lista Simples) */
.commissions-card {
  background-color: var(--white);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.commission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F0F0F0;
}

.commission-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.comm-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comm-title {
  font-size: 12px;
  font-weight: 700;
  color: #3D2B1F;
}

.comm-date {
  font-size: 10px;
  color: #8D8D8D;
}

.comm-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.comm-val {
  font-size: 13px;
  font-weight: 800;
}

.comm-val.text-green { color: #2E7D32; }
.comm-val.text-orange { color: #F57F17; }
.comm-val.text-blue { color: #1565C0; }
.comm-val.text-red { color: #C62828; }

.comm-tag {
  font-size: 8px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.comm-tag.bg-green { background-color: #2E7D32; color: #FFF; }
.comm-tag.bg-orange { background-color: #F57F17; color: #FFF; }
.comm-tag.bg-blue { background-color: #1565C0; color: #FFF; }
.comm-tag.bg-red { background-color: #C62828; color: #FFF; }

/* 8. Área de Conquistas (Prateleiras) */
.achievements-shelves {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
  margin-top: 16px;
}

.shelf {
  position: relative;
}

.shelf-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 16px;
  position: relative;
  z-index: 2;
  margin-bottom: -8px; /* Assenta os itens na prateleira */
}

.ach-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.ach-trophy {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.ach-trophy.silver { filter: grayscale(1) brightness(1.2) drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.ach-trophy.bronze { filter: sepia(1) hue-rotate(340deg) saturate(2) drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }

.ach-text {
  display: flex;
  flex-direction: column;
}

.ach-name {
  font-size: 10px;
  font-weight: 800;
  color: #3D2B1F;
}

.ach-desc {
  font-size: 8px;
  font-weight: 600;
  color: #8D8D8D;
  margin-top: 2px;
}

.shelf-board {
  height: 16px;
  background: linear-gradient(to bottom, #8C5F3E, #62402A);
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  position: relative;
}

.shelf-board::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgba(255,255,255,0.2);
}

/* 9. Mural de Avisos */
.notices-empty {
  background-color: var(--white);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #CCC;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  margin-bottom: 24px;
}

/* Sobrescreve estilos de modal e alertas para mobile, se necessário */
@media (max-width: 992px) {
  .mobile-bottom-nav {
    display: flex;
  }
  
  #main-content {
    padding: 0 !important;
    padding-bottom: 80px !important;
  }
}

