.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Match user dashboard cards (UserDashboard.css) */
.admin-kpi {
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  position: relative;
  background: var(--theme-white);
  color: var(--theme-black);
  border: 1px solid var(--theme-gray-100);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.admin-kpi--clickable {
  cursor: pointer;
}

.admin-kpi--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.admin-kpi--clickable:focus-visible {
  outline: 2px solid var(--theme-black);
  outline-offset: 2px;
}

.admin-kpi--green {
  background: #189e52;
  border-color: #158a48;
  color: #ffffff;
}

.admin-kpi--blue {
  background: #1879bd;
  border-color: #1569a8;
  color: #ffffff;
}

.admin-kpi--amber {
  background: #f36f2a;
  border-color: #e55a1f;
  color: #ffffff;
}

.admin-kpi--gray {
  background: var(--theme-white);
}

.admin-kpi--green .admin-kpi-label,
.admin-kpi--green .admin-kpi-note,
.admin-kpi--blue .admin-kpi-label,
.admin-kpi--blue .admin-kpi-note,
.admin-kpi--amber .admin-kpi-label,
.admin-kpi--amber .admin-kpi-note {
  color: inherit;
  opacity: 0.9;
}

.admin-kpi--green .admin-kpi-value,
.admin-kpi--blue .admin-kpi-value,
.admin-kpi--amber .admin-kpi-value,
.admin-kpi--green .admin-kpi-icon,
.admin-kpi--blue .admin-kpi-icon,
.admin-kpi--amber .admin-kpi-icon {
  color: inherit;
}

.admin-kpi-content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.admin-kpi-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 0;
}

.admin-kpi-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--theme-black);
}
.admin-kpi-icon svg {
  width: 26px;
  height: 26px;
}

.admin-kpi-label {
  font-size: 0.8rem;
  color: var(--theme-gray-600);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: center;
}

.admin-kpi-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--theme-black);
  margin-bottom: 0.35rem;
  text-align: center;
  line-height: 1;
}

.admin-kpi-note {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--theme-gray-600);
  margin: 0;
  text-align: center;
}

.admin-kpi-add-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.admin-dashboard-layout {
  display: grid;
  /* grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); */
  gap: 14px;
}

/* Trend analysis (reuses executor chart styles + .ex-dash variables) */
.admin-dashboard-trend-section {
  width: 100%;
  min-width: 0;
}

.admin-trend-chart-embed.ex-dash {
  font-family: inherit;
  color: inherit;
  --ex-muted: #64748b;
  --ex-text: var(--theme-black, #0f172a);
  --ex-border: var(--theme-gray-200, #e2e8f0);
  --ex-subtle: var(--theme-gray-50, #f8fafc);
  --panel-ex: var(--theme-maroon-deep, #6b1420);
}

.admin-trend-chart-embed .ex-dash-trend--role-admin .ex-dash-trend-key--assigned {
  background: #8b1538;
}

.admin-trend-chart-embed .ex-dash-trend--role-admin .ex-dash-trend-key--completed {
  background: #189e52;
}

.admin-dashboard-activity-section .admin-compact-table {
  min-width: 640px;
}

.admin-compact-table-wrap {
  overflow-x: auto;
}

.admin-compact-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 700px;
}

.admin-compact-table th,
.admin-compact-table td {
  border-bottom: 1px solid var(--theme-gray-100);
  padding: 9px 8px;
  font-size: 13px;
  text-align: left;
}

.admin-compact-table th {
  background: var(--theme-gray-50);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--theme-gray-500);
}

.admin-side-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.admin-workload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-workload-row {
  border: 1px solid var(--theme-gray-100);
  background: var(--theme-gray-50);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-workload-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-black);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-workload-metrics {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--theme-gray-600);
}

.admin-activity-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.admin-activity-list li {
  font-size: 13px;
  color: var(--theme-gray-600);
}

@media (max-width: 900px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .admin-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
