/* Overview Dashboard Styles - Phase 3 Part 1 */
/* Enhanced styles for the real-data overview dashboard */

.overview-dashboard {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.dashboard-title-section {
  flex: 1;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0 0 0.5rem 0;
}

.dashboard-subtitle {
  color: hsl(var(--foreground-muted));
  margin: 0;
  font-size: 0.9rem;
}

.dashboard-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Period Selector */
.period-selector {
  display: flex;
  background: hsl(var(--background-subtle));
  border-radius: 0.5rem;
  padding: 0.25rem;
  border: 1px solid hsl(var(--border));
}

.period-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: hsl(var(--foreground-muted));
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.period-btn:hover {
  background: hsl(var(--background-hover));
  color: hsl(var(--foreground));
}

.period-btn.active {
  background: hsl(var(--primary));
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Refresh Button */
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: hsl(var(--background-hover));
  border-color: hsl(var(--primary));
}

.refresh-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* KPI Cards */
.kpi-card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  border-color: hsl(var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-card.kpi-alert {
  border-color: hsl(var(--danger));
  background: linear-gradient(135deg, hsl(var(--background)) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kpi-title {
  font-weight: 600;
  color: hsl(var(--foreground-muted));
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--primary));
}

.kpi-value-section {
  display: flex;
  justify-content: space-between;
  align-items: baseline;

  /* Alert banner buttons (fix: undefined style) */
  .alert-btn {
    appearance: none;
    border: 1px solid var(--border, #334155);
    background: #0f1720;
    color: #e2e8f0;
    padding: .45rem .75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: .75rem;
    line-height: 1;
  }

  .alert-btn.primary {
    background: #0ea5a3;
    border-color: #0ea5a3;
    color: #0f1115;
  }

  .alert-btn.secondary {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
  }

  .alert-btn:hover {
    filter: brightness(1.05);
  }

  margin-bottom: 1rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
}

.kpi-delta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.kpi-trend-up {
  color: hsl(var(--success));
}

.kpi-trend-down {
  color: hsl(var(--danger));
}

.kpi-trend-neutral {
  color: hsl(var(--foreground-muted));
}

.kpi-delta-icon {
  width: 1rem;
  height: 1rem;
}

/* Sparklines */
.kpi-sparkline {
  height: 2rem;
  display: flex;
  align-items: end;
  gap: 1px;
  margin-top: 0.5rem;
}

.sparkline-bar {
  flex: 1;
  background: hsl(var(--primary));
  opacity: 0.7;
  border-radius: 1px 1px 0 0;
  min-height: 2px;
  transition: opacity 0.2s ease;
}

.kpi-card:hover .sparkline-bar {
  opacity: 1;
}

.kpi-alert-indicator {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1rem;
}

/* KPI Target & Streak Enhancements */
.kpi-target-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: .5rem;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

.kpi-target-badge {
  padding: .2rem .45rem;
  border-radius: 999px;
  background: hsl(var(--surface-secondary));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.kpi-target-badge.status-achieved {
  background: hsl(var(--success) / 0.15);
  color: hsl(var(--success));
  border-color: hsl(var(--success) / 0.4);
}

.kpi-target-badge.status-warning {
  background: hsl(var(--warning) / 0.15);
  color: hsl(var(--warning));
  border-color: hsl(var(--warning) / 0.4);
}

.kpi-target-badge.status-critical {
  background: hsl(var(--danger) / 0.18);
  color: hsl(var(--danger));
  border-color: hsl(var(--danger) / 0.45);
}

.kpi-target-badge.status-on_track {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.4);
}

.kpi-target-value {
  font-weight: 500;
  color: hsl(var(--foreground-muted));
}

.kpi-streak {
  font-weight: 700;
  font-size: .6rem;
  color: hsl(var(--foreground-muted));
}

.kpi-card.kpi-target-critical {
  animation: pulseCritical 2s infinite;
}

@keyframes pulseCritical {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* KPI Targets Modal */
.kpi-targets-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
}

.kpi-targets-modal.hidden {
  display: none;
}

.kpi-targets-modal .ktm-backdrop {
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.65);
  backdrop-filter: blur(4px);
}

.kpi-targets-modal .ktm-panel {
  position: relative;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: .75rem;
  width: 900px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 32px -4px rgba(0, 0, 0, .25);
  overflow: hidden;
}

.kpi-targets-modal .ktm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  background: linear-gradient(120deg, hsl(var(--background)) 0%, hsl(var(--background-subtle)) 100%);
}

.kpi-targets-modal .ktm-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.kpi-targets-modal .ktm-body {
  padding: 1rem 1.25rem;
  overflow: auto;
}

.kpi-targets-modal .ktm-footer {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background-subtle));
}

.ktm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
}

.ktm-table th,
.ktm-table td {
  padding: .5rem .5rem;
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
}

.ktm-table th {
  position: sticky;
  top: 0;
  background: hsl(var(--background));
  z-index: 1;
}

.ktm-table input,
.ktm-table select {
  width: 100%;
  box-sizing: border-box;
  font-size: .65rem;
  padding: .25rem .4rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background-subtle));
  border-radius: 4px;
}

.ktm-table tr:hover td {
  background: hsl(var(--surface-secondary));
}

/* Anomalies Widget */
.anoms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: .5rem;
}

.anoms-table th,
.anoms-table td {
  padding: 6px 8px;
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
}

.anoms-table tbody tr:hover {
  background: hsl(var(--surface-secondary));
}

.anoms-table tr.sev-critical {
  background: hsl(var(--danger) / 0.08);
}

.anoms-table tr.sev-warning {
  background: hsl(var(--warning) / 0.08);
}

.anom-badge {
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.anom-badge.critical {
  background: hsl(var(--danger));
  color: #fff;
}

.anom-badge.warning {
  background: hsl(var(--warning));
  color: #000;
}

.anoms-foot {
  margin-top: .5rem;
  font-size: 10px;
  color: hsl(var(--foreground-muted));
}

/* Recommendations Widget */
.rec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.rec-item {
  border: 1px solid hsl(var(--border));
  border-radius: .65rem;
  padding: .75rem .9rem;
  background: hsl(var(--background));
  display: flex;
  flex-direction: column;
  gap: .35rem;
  position: relative;
}

.rec-item.pri-critical {
  border-color: hsl(var(--danger));
  box-shadow: 0 0 0 1px hsl(var(--danger) / 0.3);
}

.rec-item.pri-high {
  border-color: hsl(var(--warning));
}

.rec-item.pri-medium {
  border-color: hsl(var(--primary) / 0.4);
}

.rec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rec-title {
  font-size: .85rem;
  font-weight: 600;
}

.rec-score {
  font-size: .65rem;
  background: hsl(var(--surface-secondary));
  padding: .2rem .45rem;
  border-radius: 999px;
  font-weight: 600;
}

.rec-desc {
  font-size: .7rem;
  line-height: 1.2;
  color: hsl(var(--foreground));
}

.rec-meta {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: .55rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: hsl(var(--foreground-muted));
}

.rec-priority {
  padding: .15rem .4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .55rem;
}

.badge-critical {
  background: hsl(var(--danger));
  color: #fff;
}

.badge-high {
  background: hsl(var(--warning));
  color: #000;
}

.badge-medium {
  background: hsl(var(--primary));
  color: #fff;
}

.badge-low {
  background: hsl(var(--surface-secondary));
  color: hsl(var(--foreground));
}

.rec-actions-hint {
  font-size: .55rem;
  color: hsl(var(--foreground-muted));
}

/* Tasks Widget */
.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.task-item {
  border: 1px solid hsl(var(--border));
  border-radius: .6rem;
  padding: .6rem .75rem;
  background: hsl(var(--background));
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.task-item.pri-critical {
  border-color: hsl(var(--danger));
}

.task-item.pri-high {
  border-color: hsl(var(--warning));
}

.task-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-title {
  font-size: .75rem;
  font-weight: 600;
}

.task-meta {
  font-size: .55rem;
  color: hsl(var(--foreground-muted));
}

.task-actions {
  display: flex;
  gap: .4rem;
}

.task-priority {
  padding: .15rem .4rem;
  border-radius: 999px;
  font-size: .55rem;
  font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* Widget Sizes */
.widget-large {
  grid-column: span 8;
}

.widget-medium {
  grid-column: span 4;
}

.widget-small {
  grid-column: span 3;
}

/* Responsive */
@media (max-width: 1024px) {

  .widget-large,
  .widget-medium,
  .widget-small {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .dashboard-controls {
    justify-content: space-between;
  }

  .widget-large,
  .widget-medium,
  .widget-small {
    grid-column: span 12;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Widgets */
.dashboard-widget {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow: hidden;
}

.dashboard-widget.loading {
  opacity: 0.6;
  pointer-events: none;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0 0 0.25rem 0;
}

.widget-subtitle {
  color: hsl(var(--foreground-muted));
  font-size: 0.875rem;
  margin: 0;
}

.widget-actions {
  display: flex;
  gap: 0.5rem;
}

/* Chart Container */
.chart-container {
  height: 200px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#revenue-chart {
  max-width: 100%;
  max-height: 100%;
}

/* Revenue Stats */
.revenue-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: hsl(var(--background-subtle));
  border-radius: 0.5rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Alerts Widget */
.alerts-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.alert-summary-card {
  flex: 1;
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
}

.alert-summary-card.critical {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-summary-card.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-count {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Disable pulse/highlight universally for notification visuals */
.alert-count,
.alerts-summary .alert-count,
.alerts-summary .alert-summary-card .alert-count,
.alert-badge,
.pulse,
.alert-icon-container,
.kpi-card.kpi-target-critical,
.alert-summary-card .alert-count {
  animation: none !important;
  box-shadow: none !important;
}

/* Mobile: turn off pulsing/highlight for notifications */
@media (hover: none) and (pointer: coarse) {

  .alert-count,
  .alerts-summary .alert-count,
  .alerts-summary .alert-summary-card .alert-count,
  .alert-badge,
  .pulse {
    animation: none !important;
    box-shadow: none !important;
  }

  .alert-action-btn:focus,
  .alert-action-btn:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
  }
}

.alert-summary-card.critical .alert-count {
  color: hsl(var(--danger));
}

.alert-summary-card.warning .alert-count {
  color: hsl(var(--warning));
}

.alert-label {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Alert Items */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: 1px solid transparent;
}

.alert-item:hover {
  background: hsl(var(--background-hover));
  border-color: hsl(var(--border));
}

.alert-item.severity-critical {
  border-left: 3px solid hsl(var(--danger));
}

.alert-item.severity-warning {
  border-left: 3px solid hsl(var(--warning));
}

.alert-item.severity-info {
  border-left: 3px solid hsl(var(--info));
}

.alert-icon {
  font-size: 1rem;
}

.alert-content {
  flex: 1;
}

.alert-message {
  font-weight: 500;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.alert-time {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
}

.alert-actions {
  display: flex;
  gap: 0.5rem;
}

.alert-action-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  background: hsl(var(--background-subtle));
  border: 1px solid hsl(var(--border));
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alert-action-btn:hover {
  background: hsl(var(--background-hover));
  border-color: hsl(var(--primary));
}

/* No Alerts State */
.no-alerts {
  text-align: center;
  padding: 2rem;
  color: hsl(var(--foreground-muted));
}

.no-alerts-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.no-alerts-text {
  font-size: 0.875rem;
}

/* Top Products */
.top-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-item:hover {
  background: hsl(var(--background-hover));
}

.product-rank {
  font-weight: 700;
  color: hsl(var(--primary));
  font-size: 0.875rem;
  min-width: 1.5rem;
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.product-sku {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
}

.product-metrics {
  text-align: right;
  margin-right: 1rem;
}

.product-revenue {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.product-percentage {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
}

.product-chart {
  width: 60px;
  height: 4px;
  background: hsl(var(--background-subtle));
  border-radius: 2px;
  overflow: hidden;
}

.revenue-bar {
  height: 100%;
  background: hsl(var(--primary));
  transition: width 0.5s ease;
}

/* Cash Runway Widget */
.cash-runway-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.runway-stat {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: hsl(var(--background-subtle));
  border-radius: 0.5rem;
}

.runway-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.runway-label {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Scenario Selector */
.scenario-selector {
  display: flex;
  gap: 0.25rem;
  background: hsl(var(--background-subtle));
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.scenario-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: hsl(var(--foreground-muted));
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
}

.scenario-btn:hover {
  background: hsl(var(--background-hover));
  color: hsl(var(--foreground));
}

.scenario-btn.active {
  background: hsl(var(--primary));
  color: white;
}

/* Runway Scenarios */
.runway-scenarios {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.scenario-card {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.scenario-card.active {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.scenario-name {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.scenario-days {
  font-weight: 700;
  color: hsl(var(--foreground));
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.scenario-burn {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
}

/* Major Outflows */
.major-outflows h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0 0 0.75rem 0;
}

.outflows-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.outflow-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: hsl(var(--background-subtle));
  border-radius: 0.25rem;
}

.outflow-name {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.outflow-amount {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground-muted));
}

/* Pipeline Widget */
.pipeline-totals {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pipeline-stat {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: hsl(var(--background-subtle));
  border-radius: 0.5rem;
}

.pipeline-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.pipeline-label {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pipeline Stages */
.pipeline-stages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stage-item {
  padding: 0.75rem;
  background: hsl(var(--background-subtle));
  border-radius: 0.5rem;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stage-name {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
}

.stage-count {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
  background: hsl(var(--background));
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.stage-value {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.stage-bar {
  height: 4px;
  background: hsl(var(--background));
  border-radius: 2px;
  overflow: hidden;
}

.stage-progress {
  height: 100%;
  background: hsl(var(--primary));
  transition: width 0.5s ease;
}

/* Activity Widget */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.activity-item:hover {
  background: hsl(var(--background-hover));
}

.activity-icon {
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: hsl(var(--background-subtle));
}

.activity-icon.inventory {
  background: rgba(34, 197, 94, 0.1);
}

.activity-icon.sales {
  background: rgba(59, 130, 246, 0.1);
}

.activity-icon.finance {
  background: rgba(147, 51, 234, 0.1);
}

.activity-icon.system {
  background: rgba(107, 114, 128, 0.1);
}

.activity-content {
  flex: 1;
}

.activity-description {
  font-weight: 500;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.75rem;
  color: hsl(var(--foreground-muted));
}

/* No Activity State */
.no-activity {
  text-align: center;
  padding: 2rem;
  color: hsl(var(--foreground-muted));
}

.no-activity-text {
  font-size: 0.875rem;
}

/* Loading States */
.loading-message {
  text-align: center;
  padding: 4rem 2rem;
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid hsl(var(--border));
  border-top: 2px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Utility Classes */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground-muted));
  border-color: hsl(var(--border));
}

.btn-ghost:hover {
  background: hsl(var(--background-hover));
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary));
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}