/* Interakt SPA — Dashboard Stylesheet */

/* Metric Grid Layout */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 0;
}

.stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

.stat-number {
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon-wrapper span {
  font-size: 22px;
}

.stat-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.stat-footer .trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
}
.stat-footer .trend span {
  font-size: 14px;
}
.stat-footer .trend-label {
  color: var(--text-muted);
}

/* Split Rows Layout */
.dashboard-split {
  display: flex;
  gap: 24px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Live Inbox Ticker Feed */
.live-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 310px;
  overflow-y: auto;
}

.feed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background-color: var(--background);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.feed-row:hover {
  background-color: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.feed-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.feed-contact span.channel-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.feed-details {
  min-width: 0;
  flex: 1;
}
.feed-details h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-details p {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 10px;
}

/* Agent Response Times Leaderboard */
.agent-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leader-progress-info {
  flex: 1;
}

.leader-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.leader-name-row h5 {
  font-weight: 600;
  color: var(--text-primary);
}
.leader-name-row span {
  font-weight: 500;
  color: var(--text-secondary);
}

.leader-progress-bar {
  height: 6px;
  background-color: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.leader-progress-fill {
  height: 100%;
  border-radius: 99px;
  background-color: var(--accent);
}

/* Circular Pie/Donut Mock Visuals using CSS gradients */
.chart-container {
  height: 200px;
}

.mock-pie-chart {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0% 68%,
    var(--accent) 68% 90%,
    var(--warning) 90% 100%
  );
  box-shadow: var(--shadow-sm);
  position: relative;
}

.mock-donut-chart {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--success) 0% 74%,
    var(--error) 74% 100%
  );
  box-shadow: var(--shadow-sm);
  position: relative;
}
.mock-donut-chart::before {
  content: '';
  position: absolute;
  top: 25px; left: 25px; right: 25px; bottom: 25px;
  background-color: var(--surface);
  border-radius: 50%;
}
.mock-donut-chart::after {
  content: '74% Auto';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
