/* ==========================================================================
   DASHBOARD ENHANCEMENTS (DETAILED OVERVIEW & ANALYTICS)
   ========================================================================== */

/* 1. Dashboard Toolbar */
.dash-period-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.dash-period-btn {
  background: transparent;
  border: none;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-period-btn:hover {
  color: var(--text);
}

.dash-period-btn.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-animation {
  animation: spin 0.6s linear infinite;
  transform-origin: center center;
}

/* 1.1 Dashboard Header Row */
.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

/* 2. Operational Action Banners (Việc cần xử lý ngay - Rõ ràng & Trực quan) */
.dash-action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dash-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.dash-action-card.action-warning {
  border-left: 4px solid var(--amber);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, var(--surface) 100%);
}

.dash-action-card.action-primary {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.05) 0%, var(--surface) 100%);
}

.dash-action-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dash-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-action-icon i, .dash-action-icon svg {
  width: 22px;
  height: 22px;
}

.action-warning .dash-action-icon {
  background: var(--amber-soft);
  color: #d97706;
}

.action-primary .dash-action-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.dash-action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-action-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.dash-action-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border: none;
}

.btn-action-warning {
  background: #d97706;
  color: var(--surface);
}
.btn-action-warning:hover {
  background: var(--amber-hover);
}

.btn-action-primary {
  background: var(--accent);
  color: var(--surface);
}
.btn-action-primary:hover {
  background: var(--accent-hover);
}


/* Detailed Platform Breakdown */
.platform-breakdown-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-detail-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.platform-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.platform-name-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.platform-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.platform-share-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.platform-bar-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.platform-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.platform-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.platform-orders-num {
  font-weight: 500;
}

.platform-growth-tag {
  font-weight: 600;
  color: var(--green);
}

