/* ══════════════════════════════════════════════════════════════════
   DASHBOARD KPIs STYLES
   ══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   PERIOD SELECTOR
   ═══════════════════════════════════════════════════════════════════ */

.period-selector {
  display: flex;
  gap: 8px;
}

.period-btn {
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: rgba(196, 164, 255, 0.6);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}

:root.light-mode .period-btn {
  background: #ffffff;
  border: 1px solid #e0e1e8;
  color: #7a7a9e;
}

:root.light-mode .period-btn:hover {
  background: #f9f9fb;
  border-color: #7c3aed;
  color: #7c3aed;
}

:root.light-mode .period-btn.active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: #7c3aed;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.period-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: rgba(196, 164, 255, 0.8);
}

.period-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════
   KPI CONVERSION RATE (color dinámico)
   ═══════════════════════════════════════════════════════════════════ */

.kpi-conversion {
  font-size: 32px !important;
  transition: color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════
   PIPELINE CHART (barras horizontales)
   ═══════════════════════════════════════════════════════════════════ */

.pipeline-chart {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pipeline-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 140px;
  gap: 16px;
  align-items: center;
}

.pipeline-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(220, 210, 255, 0.7);
  white-space: nowrap;
  text-align: right;
}

:root.light-mode .pipeline-bar-label {
  color: #000000;
}

.pipeline-bar-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  height: 24px;
  overflow: hidden;
  position: relative;
}

:root.light-mode .pipeline-bar-container {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.pipeline-bar-fill {
  height: 100%;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 6px;
  opacity: 0.85;
}

.pipeline-bar-fill:hover {
  opacity: 1;
}

.pipeline-bar-value {
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: rgba(167, 139, 250, 0.85);
  text-align: right;
}

:root.light-mode .pipeline-bar-value {
  color: #7c3aed;
}

/* ═══════════════════════════════════════════════════════════════════
   SELLERS TABLE ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════ */

#sellers-table tbody tr {
  transition: all 0.18s ease;
}

#sellers-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
}

:root.light-mode #sellers-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.05);
}

#sellers-table td:nth-child(2),
#sellers-table td:nth-child(3),
#sellers-table td:nth-child(4) {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
}

:root.light-mode #sellers-table td:nth-child(2),
:root.light-mode #sellers-table td:nth-child(3),
:root.light-mode #sellers-table td:nth-child(4) {
  color: #000000;
}

#sellers-table td:nth-child(4) {
  color: rgba(245, 158, 11, 0.85);
  font-weight: 600;
}

:root.light-mode #sellers-table td:nth-child(4) {
  color: #f59e0b;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .pipeline-bar-row {
    grid-template-columns: 100px 1fr 120px;
    gap: 12px;
  }

  .pipeline-bar-label {
    font-size: 11px;
  }

  .pipeline-bar-value {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .period-selector {
    flex-wrap: wrap;
  }

  .period-btn {
    flex: 1;
    min-width: 60px;
  }

  .pipeline-bar-row {
    grid-template-columns: 80px 1fr 100px;
    gap: 8px;
  }

  .pipeline-bar-label {
    font-size: 10px;
  }

  .pipeline-bar-value {
    font-size: 10px;
  }

  #sellers-table {
    font-size: 12px;
  }

  #sellers-table thead th,
  #sellers-table tbody td {
    padding: 10px 12px;
  }
}
