/**
 * dashboard.css — Dashboard view: metric cards, chart panels, tab buttons.
 * Used by DashboardView.js and dashboard.html.
 */


/* ─── Metric cards grid ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sh);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.metric-card:hover { transform: translateY(-3px); box-shadow: var(--sh2); }

/* Glow decorations */
.metric-card.glow-gold::before,
.metric-card.glow-green::before,
.metric-card.glow-red::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  pointer-events: none;
}
.metric-card.glow-gold::before  { background: radial-gradient(circle, var(--accent-glow), transparent); }
.metric-card.glow-green::before { background: radial-gradient(circle, rgba(26,135,84,0.08), transparent); }
.metric-card.glow-red::before   { background: radial-gradient(circle, rgba(220,38,38,0.08), transparent); }

/* Metric icon */
.mc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.mc-icon.red   { background: rgba(220,38,38,0.07); color: var(--danger); }
.mc-icon.gold  { background: var(--accent-bg);     color: var(--accent); }
.mc-icon.green { background: rgba(26,135,84,0.07); color: var(--success); }
.mc-icon.blue  { background: rgba(59,130,246,0.07); color: var(--blue); }

.mc-body { flex: 1; }
.mc-val  { font-size: 1.3rem; font-weight: 800; }
.mc-lbl  { font-size: 0.65rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.mc-trend { font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.mc-trend.up { color: var(--success); background: rgba(26,135,84,0.08); }

/* ─── Dashboard panels / chart area ─── */
.dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.dash-row .wide { grid-column: 1/-1; }
.dash-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--sh);
}
.dp-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 16px; }

/* ─── Panel section label (above metric grids) ─── */
.panel-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 8px;
}
.panel-section-label .label-accent { color: var(--accent); }
.label-accent { color: var(--accent); }

/* Month input size */
.input-month { width: 160px; }

/* ─── Recent activity feed ─── */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.1s;
}
.feed-item:hover { background: var(--bg3); }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-lend { background: var(--success); }
.dot-sell { background: var(--danger); }
.feed-body { flex: 1; min-width: 0; }
.feed-title { font-weight: 600; font-size: 0.82rem; }
.feed-meta  { font-size: 0.72rem; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-amt   { font-weight: 700; color: var(--accent); font-size: 0.88rem; white-space: nowrap; }

/* ─── Top customer ranking rows ─── */
.top-cust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
}
.top-cust-row:nth-child(odd) { background: var(--bg3); }
.tc-rank { font-weight: 700; color: var(--accent); width: 24px; }
.tc-name { flex: 1; font-weight: 500; }
.tc-amt  { font-weight: 700; }

/* ─── Tab buttons ─── */
.dash-tab-btn { transition: all 0.12s; }
