/* ── Dashboard Grid ──────────────────────────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.dashboard-grid-full { grid-column: 1 / -1; }

/* ── Chart Cards ────────────────────────────────────────────────────── */

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-card canvas {
  max-height: 240px;
  flex: 1;
}

/* ── Pipeline Funnel ────────────────────────────────────────────────── */

.pipeline-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--bg-tertiary);
}

.pipeline-bar:last-child { border-bottom: none; }

.pipeline-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  width: 90px;
  flex-shrink: 0;
}

.pipeline-track {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--r-full);
  overflow: hidden;
}

.pipeline-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.5s ease;
}

.pipeline-count {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Employee Performance Table ─────────────────────────────────────── */

.perf-table-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--bg-tertiary);
}

.perf-table-row:last-child { border-bottom: none; }

.perf-rank {
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.perf-rank.top { background: var(--red-light); color: var(--red); }

.perf-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  text-transform: uppercase;
}

.perf-name {
  flex: 1;
  min-width: 0;
}

.perf-name strong {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perf-name span {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.perf-stats {
  display: flex;
  gap: var(--sp-4);
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  text-align: right;
}

.perf-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.perf-stat strong { font-weight: 700; color: var(--text-primary); }
.perf-stat span   { font-size: var(--font-size-xs); color: var(--text-muted); }

/* ── Follow-up Cards ────────────────────────────────────────────────── */

.followup-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-2);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--bg-card);
}

.followup-item:hover { border-color: var(--border-dark); box-shadow: var(--shadow-sm); }

.followup-item.overdue { border-color: var(--red-100); background: var(--red-50); }
.followup-item.overdue .followup-date { color: var(--red); font-weight: 600; }

.followup-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.followup-priority.critical { background: #991B1B; }
.followup-priority.high     { background: var(--red); }
.followup-priority.medium   { background: var(--yellow); }
.followup-priority.low      { background: var(--blue); }

.followup-content { flex: 1; min-width: 0; }
.followup-name { font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.followup-company { font-size: var(--font-size-xs); color: var(--text-muted); }
.followup-date { font-size: var(--font-size-xs); margin-top: 2px; }

/* ── Welcome Banner ─────────────────────────────────────────────────── */

.welcome-banner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
  overflow: hidden;
  position: relative;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.08;
}

.welcome-greeting {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: 1.2;
}

.welcome-greeting span { color: var(--red); }

.welcome-subtitle {
  font-size: var(--font-size-sm);
  opacity: 0.6;
  margin-top: var(--sp-1);
}

@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
