/**
 * Weight Evolution Module Styles
 * Estilos específicos para o módulo de evolução de pesos
 */

/* ========================================
   CARDS DE ESTATÍSTICAS - COMPACTOS
   ======================================== */

#metadata-summary .stat-card {
  position: relative;
  overflow: hidden;
  padding: 1rem !important;
}

#metadata-summary .stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.05) 0%,
    transparent 100%
  );
  border-radius: 0 0.5rem 0 50%;
  z-index: 0;
}

#metadata-summary .stat-card > * {
  position: relative;
  z-index: 1;
}

#metadata-summary .stat-icon {
  font-size: 1.5rem !important;
  margin-bottom: 0.25rem !important;
}

#metadata-summary .stat-icon i {
  display: block;
}

#metadata-summary .stat-label {
  font-size: 0.75rem !important;
  margin-bottom: 0.25rem !important;
}

#metadata-summary .stat-value {
  font-size: 1.5rem !important;
}

/* ========================================
   TEMPLATE SECTIONS - COMPACTAS
   ======================================== */

.template-section {
  animation: fadeInUp 0.4s ease-out;
  margin-bottom: 2rem !important;
}

.template-section .template-header {
  margin-bottom: 0.5rem;
}

.template-section .template-header h4 {
  font-size: 0.95rem;
  margin-bottom: 0;
  font-weight: 600;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.template-header h4 .badge {
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  vertical-align: middle;
}

/* ========================================
   TABELA DE EVOLUÇÃO
   ======================================== */

.evolution-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  width: auto !important;
  min-width: 100%;
}

.evolution-table tbody tr {
  transition: all 0.2s ease;
}

.evolution-table tbody tr:hover td {
  background-color: rgba(102, 126, 234, 0.08) !important;
  transform: scale(1.005);
}

/* Coluna de equipamentos fixa */
.evolution-table .equipment-col,
.evolution-table .equipment-name {
  min-width: 250px;
  width: 250px;
  max-width: 250px;
  text-align: left;
  vertical-align: middle;
  padding-left: 1rem !important;
  position: -webkit-sticky !important;
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background-clip: padding-box !important;
}

.evolution-table .equipment-col {
  background-color: #e3f2fd !important;
  color: #0d47a1 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.evolution-table .equipment-col i {
  color: #0d47a1 !important;
}

.evolution-table th {
  color: #0d47a1 !important;
}

.evolution-table .equipment-name {
  display: table-cell;
}

.evolution-table .equipment-name .order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-right: 10px;
  vertical-align: middle;
  font-size: 0.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  box-shadow: none;
  flex-shrink: 0;
}

.evolution-table .equipment-name .equipment-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  vertical-align: middle;
  max-width: 100%;
  overflow: hidden;
}

.evolution-table .equipment-name .name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #2d3748;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

.evolution-table .equipment-name .muscle-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #667eea;
  background-color: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  align-self: flex-start;
}

.evolution-table .equipment-name .muscle-group-badge i {
  font-size: 0.65rem;
}

.evolution-table th {
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #e3f2fd !important;
  color: #0d47a1 !important;
  border-bottom: 2px solid #64b5f6;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.evolution-table thead th {
  color: #0d47a1 !important;
}

.evolution-table th * {
  color: #0d47a1 !important;
}

.evolution-table td {
  padding: 0.6rem 0.4rem;
  font-size: 0.8rem;
  vertical-align: middle;
}

.evolution-table tbody td {
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  background-color: #ffffff;
}

.evolution-table tbody tr:last-child td {
  border-bottom: none;
}

.evolution-table tbody tr:nth-child(even) td {
  background-color: #f8f9fa;
}

/* Linhas pares - coluna de equipamento (background OPACO) */
.evolution-table tbody tr:nth-child(even) .equipment-name {
  background-color: #f8f9fa !important;
}

/* Linhas ímpares - coluna de equipamento (background OPACO) */
.evolution-table tbody tr:nth-child(odd) .equipment-name {
  background-color: #ffffff !important;
}

/* Primeira coluna com borda esquerda */
.evolution-table tbody td:first-child {
  border-left: 3px solid transparent;
  background-clip: padding-box;
}

.evolution-table tbody tr:hover td:first-child {
  border-left-color: #667eea;
}

/* Hover - manter background da coluna fixa (background OPACO) */
.evolution-table tbody tr:hover .equipment-name {
  background-color: #e8eeff !important;
}

/* ========================================
   CÉLULAS DE SEMANA - COMPACTAS
   ======================================== */

.week-data {
  position: relative;
  padding: 0.6rem 0.4rem !important;
  min-width: 110px;
  vertical-align: middle;
  display: table-cell;
}

.week-data:hover {
  background-color: rgba(102, 126, 234, 0.08);
}

/* Layout compacto com ícones */
.week-data-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 3px;
  text-align: center;
}

.week-data-compact .volume-highlight {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.3;
  margin-bottom: 2px;
}

.week-data-compact .weight-range {
  font-size: 0.75rem;
  color: #495057;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.week-data-compact .sets-reps {
  font-size: 0.75rem;
  color: #495057;
  line-height: 1.3;
  font-weight: 500;
}

.week-data-compact .avg-reps {
  font-size: 0.7rem;
  color: #6c757d;
  line-height: 1.3;
  font-style: italic;
}

.week-data .evolution-badge-mini {
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 2px;
}

.week-data .evolution-badge-mini i {
  font-size: 0.65rem;
}

.week-data .no-data {
  color: #adb5bd;
  font-size: 1.1rem;
  font-weight: 300;
}

/* Animação de entrada dos dados */
.week-data-compact,
.week-data .evolution-badge-mini {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================
   INDICADORES DE EVOLUÇÃO - COMPACTOS
   ======================================== */

.evolution-positive {
  background-color: rgba(40, 167, 69, 0.15);
  color: #28a745;
}

.evolution-negative {
  background-color: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.evolution-neutral {
  background-color: rgba(108, 117, 125, 0.15);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* ========================================
   CONTROLES DE NAVEGAÇÃO
   ======================================== */

#current-period {
  font-weight: 600;
  background-color: #f8f9fa !important;
  cursor: default;
}

#prev-period:hover,
#next-period:hover {
  background-color: #667eea;
  color: white;
  border-color: #667eea;
}

#prev-period:disabled,
#next-period:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-group .btn {
  position: relative;
}

/* ========================================
   FILTROS E SELETORES
   ======================================== */

#template-filter,
#weeks-selector {
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

#template-filter:focus,
#weeks-selector:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

#template-filter option,
#weeks-selector option {
  padding: 0.5rem;
}

/* ========================================
   EMPTY STATE
   ======================================== */

#empty-state {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#empty-state .empty-state-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ========================================
   LOADING STATE
   ======================================== */

#loading-evolution {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* ========================================
   BADGES E LABELS
   ======================================== */

.order-badge {
  box-shadow: none;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
}

.badge.bg-info {
  background-color: #0dcaf0 !important;
  color: #000 !important;
}

/* ========================================
   WEEK LABELS
   ======================================== */

.week-label {
  line-height: 1.3;
}

.week-number {
  color: rgba(255, 255, 255, 0.95);
}

.week-dates {
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
}

/* ========================================
   TOOLTIPS E DETALHES
   ======================================== */

.week-details {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  font-size: 0.75rem;
  z-index: 1000;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.week-details::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* ========================================
   SCROLL CUSTOMIZADO
   ======================================== */

/* Container responsivo com scroll horizontal */
.table-responsive {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
  position: relative;
  will-change: scroll-position;
}

/* Garantir que a tabela dentro do container responsivo permita sticky */
.table-responsive > .evolution-table {
  position: relative;
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ========================================
   RESPONSIVIDADE - MOBILE
   ======================================== */

@media (max-width: 576px) {
  .template-section {
    padding: 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    background: white;
  }

  .template-header h4 {
    font-size: 0.9rem;
    color: #2d3748;
  }

  .template-header h4 .badge {
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
  }

  /* ===== BORDAS E ESTILO REFINADO PARA MOBILE ===== */
  
  /* Bordas suaves para headers */
  .evolution-table th {
    border: 0.5px solid rgba(102, 126, 234, 0.2) !important;
    background-color: #f8f9ff !important;
  }

  /* Bordas suaves para células de dados */
  .evolution-table td {
    border: 0.5px solid rgba(102, 126, 234, 0.15) !important;
  }

  /* Borda mais destacada para coluna de equipamento */
  .evolution-table .equipment-col {
    border-right: 1px solid rgba(102, 126, 234, 0.3) !important;
  }

  .evolution-table .equipment-name {
    border-right: 1px solid rgba(102, 126, 234, 0.25) !important;
  }

  /* Borda externa da tabela */
  .evolution-table {
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
  }

  /* Linhas alternadas mais suaves (OPACO) */
  .evolution-table tbody tr:nth-child(even) td {
    background-color: #f8f9fa !important;
  }

  .evolution-table tbody tr:nth-child(odd) td {
    background-color: #ffffff !important;
  }

  /* Hover mais suave (OPACO) */
  .evolution-table tbody tr:hover td {
    background-color: #e8eeff !important;
  }

  /* Reduzir drasticamente as colunas para caber 6 semanas no mobile */
  .evolution-table .equipment-col,
  .evolution-table .equipment-name {
    min-width: 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    background-clip: padding-box !important;
    overflow: hidden !important;
  }

  /* Background para coluna fixa no mobile (OPACO) */
  .evolution-table .equipment-col {
    background-color: #f8f9ff !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }

  /* Linhas ímpares - coluna de equipamento mobile (OPACO) */
  .evolution-table tbody tr:nth-child(odd) .equipment-name {
    background-color: #ffffff !important;
  }

  /* Linhas pares - coluna de equipamento mobile (OPACO) */
  .evolution-table tbody tr:nth-child(even) .equipment-name {
    background-color: #f8f9fa !important;
  }

  /* Hover - coluna fixa mobile (OPACO) */
  .evolution-table tbody tr:hover .equipment-name {
    background-color: #e8eeff !important;
  }

  .evolution-table .week-col,
  .evolution-table .week-data {
    min-width: 70px !important;
    width: 80px !important;
    max-width: 90px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }

  /* IMPORTANTE: Forçar todas as colunas th a serem visíveis */
  .evolution-table thead tr th {
    display: table-cell !important;
    white-space: nowrap !important;
  }

  /* IMPORTANTE: Forçar todas as colunas td a serem visíveis */  
  .evolution-table tbody tr td {
    display: table-cell !important;
    white-space: nowrap !important;
  }
  
  /* EXCEÇÃO: Coluna de equipamento DEVE permitir quebra de texto */
  .evolution-table tbody tr td.equipment-col {
    white-space: normal !important;
  }

  /* Ajustar headers */
  .evolution-table th {
    padding: 0.3rem 0.2rem !important;
    font-size: 0.6rem !important;
  }

  .evolution-table th i.bi-gear,
  .evolution-table th i.bi-calendar-week {
    font-size: 0.6rem !important;
  }

  .evolution-table td {
    padding: 0.4rem 0.25rem !important;
    font-size: 0.7rem !important;
  }

  /* Ajustar nome do equipamento */
  .equipment-name .name {
    font-size: 0.7rem !important;
    line-height: 1.2;
    color: #2d3748;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: block;
    max-width: 100%;
  }

  /* Forçar conteúdo do equipamento a ficar dentro da coluna */
  .equipment-name .equipment-info {
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .equipment-name .muscle-group-badge {
    font-size: 0.48rem !important;
    padding: 1px 3px !important;
    border-radius: 3px;
    background-color: rgba(102, 126, 234, 0.08);
    border: 0.5px solid rgba(102, 126, 234, 0.2);
    white-space: normal !important;
    max-width: 100%;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .order-badge {
    min-width: 18px !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 0.65rem !important;
    margin-right: 4px !important;
    box-shadow: none;
    flex-shrink: 0;
  }

  /* Ajustar dados das semanas */
  .week-data {
    padding: 0.35rem 0.2rem !important;
  }

  .week-data-compact {
    gap: 1px;
  }

  .week-data-compact .volume-highlight {
    font-size: 0.75rem !important;
    font-weight: 700;
    margin-bottom: 1px;
    color: #667eea;
  }

  .week-data-compact .weight-range,
  .week-data-compact .sets-reps {
    font-size: 0.58rem !important;
    line-height: 1.1;
    color: #495057;
  }

  .week-data-compact .avg-reps {
    font-size: 0.55rem !important;
    color: #6c757d;
    font-style: italic;
  }

  .week-data .evolution-badge-mini {
    font-size: 0.58rem !important;
    padding: 2px 4px !important;
    border-radius: 4px;
    font-weight: 600;
  }

  .week-data .no-data {
    font-size: 0.9rem !important;
    color: #adb5bd;
  }

  /* Headers de semana */
  .week-number {
    font-size: 0.7rem !important;
    display: block;
  }

  .week-dates {
    font-size: 0.58rem !important;
    display: block;
  }

  /* Controles em mobile */
  .btn-group {
    font-size: 0.8rem;
  }

  #current-period {
    font-size: 0.7rem;
  }

  /* Cards de resumo empilhados */
  #metadata-summary .col-md-3 {
    margin-bottom: 0.75rem;
  }

  .stat-card .stat-value {
    font-size: 1.25rem;
  }

  .stat-card .stat-icon {
    font-size: 1.5rem;
  }

  /* Scrollbar personalizado mais fino para mobile */
  .table-responsive::-webkit-scrollbar {
    height: 6px;
  }

  .table-responsive::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.08);
    border-radius: 3px;
  }

  .table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
  }

  .table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #5568d3 0%, #6a4190 100%);
  }

  /* CRÍTICO: Forçar .table-responsive do Bootstrap a mostrar todas as colunas */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    width: 100% !important;
    position: relative;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    background: white;
  }

  /* Gradiente de fade removido para evitar manchas */
  .table-responsive::before {
    display: none;
  }

  /* Indicador de scroll removido */
  .table-responsive::after {
    display: none;
  }

  /* Forçar a tabela a mostrar todas as colunas sem colapsar */
  .evolution-table {
    table-layout: auto !important;
    width: auto !important;
    min-width: 100% !important;
    display: table !important;
  }

  /* Forçar todas as células a serem visíveis */
  .evolution-table th,
  .evolution-table td {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Prevenir que o Bootstrap esconda colunas */
  .evolution-table thead {
    display: table-header-group !important;
  }

  .evolution-table tbody {
    display: table-row-group !important;
  }

  .evolution-table tr {
    display: table-row !important;
  }

  /* Garantir que week-col não seja escondida */
  .evolution-table .week-col {
    display: table-cell !important;
  }

  .evolution-table .week-data {
    display: table-cell !important;
  }
}

/* ========================================
   RESPONSIVIDADE - TABLET
   ======================================== */

@media (min-width: 577px) and (max-width: 992px) {
  .evolution-table {
    font-size: 0.85rem;
  }

  .equipment-col {
    min-width: 180px;
  }

  .week-col {
    min-width: 110px;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .template-section {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .evolution-table thead {
    background: #667eea !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #prev-period,
  #next-period,
  #refresh-evolution,
  #template-filter,
  #weeks-selector {
    display: none !important;
  }

  .evolution-positive,
  .evolution-negative {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ========================================
   ANIMAÇÕES DE TRANSIÇÃO
   ======================================== */

.template-section,
.stat-card,
.evolution-table tbody tr {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */

.evolution-table tbody tr:focus-within {
  outline: 2px solid #667eea;
  outline-offset: -2px;
}

.btn:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.5);
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .evolution-table thead {
    background: #000;
    color: #fff;
  }

  .template-section {
    border: 2px solid #000;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   HIGHLIGHTS DE PERFORMANCE
   ======================================== */

.equipment-best {
  background-color: rgba(40, 167, 69, 0.05) !important;
  border-left: 3px solid #28a745 !important;
}

.equipment-best:hover {
  background-color: rgba(40, 167, 69, 0.1) !important;
}

.equipment-worst {
  background-color: rgba(255, 193, 7, 0.05) !important;
  border-left: 3px solid #ffc107 !important;
}

.equipment-worst:hover {
  background-color: rgba(255, 193, 7, 0.1) !important;
}

/* ========================================
   SPARKLINES
   ======================================== */

.sparkline-mini {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.sparkline-mini:hover {
  opacity: 1;
}

.sparkline-svg {
  display: block;
}

/* ========================================
   ORDENAÇÃO DE TABELAS
   ======================================== */

.sortable {
  user-select: none;
  transition: background-color 0.2s ease;
}

.sortable:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

.sortable.sort-asc,
.sortable.sort-desc {
  background-color: rgba(13, 110, 253, 0.05);
  font-weight: 600;
}

.sortable.sort-asc i.bi-sort-down,
.sortable.sort-desc i.bi-sort-up {
  color: #0d6efd !important;
}

/* ========================================
   ADVANCED STATS
   ======================================== */

#advanced-stats .stat-card {
  border-left: 4px solid;
}

#advanced-stats .stat-card.evolution-positive {
  border-left-color: #28a745;
}

#advanced-stats .stat-card.evolution-negative {
  border-left-color: #dc3545;
}

#advanced-stats .stat-card:not(.evolution-positive):not(.evolution-negative) {
  border-left-color: #0d6efd;
}

#advanced-stats .stat-value {
  font-size: 1.3rem !important;
}

/* ========================================
   DARK MODE (preparação futura)
   ======================================== */

@media (prefers-color-scheme: dark) {
  .template-section {
    background: #1a1a1a;
    color: #e0e0e0;
  }

  .stat-card {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
  }

  .evolution-table {
    color: #e0e0e0;
  }

  .evolution-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.15);
  }

  .evolution-table tbody td {
    border-color: #404040;
  }

  #current-period {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
  }

  .equipment-best {
    background-color: rgba(40, 167, 69, 0.15) !important;
  }

  .equipment-worst {
    background-color: rgba(255, 193, 7, 0.15) !important;
  }
}
