/* ============================================================
   Executor Dashboard — formal workspace (matches assignments UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

.ex-dash {
  --c-done: #0f172a;
  --c-progress: var(--theme-red);
  --c-pending: #64748b;
  --c-ret-ex: var(--theme-red-bright);
  --c-ret-v: #475569;
  --panel-ex: var(--theme-red-deep);
  --panel-ver: #475569;
  --ex-text: #0f172a;
  --ex-muted: #64748b;
  --ex-border: #e2e8f0;
  --ex-surface: #ffffff;
  --ex-subtle: #f8fafc;
  --ex-radius: 16px;
  --ex-font: 'IBM Plex Sans', system-ui, sans-serif;

  font-family: var(--ex-font);
  color: var(--ex-text);
}

.dashboard-main.ex-dash-page {
  background: #f1f5f9;
  gap: 18px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

/* ── Hero ── */
.ex-dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius);
  border-left: 4px solid var(--theme-red-bright);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.06);
}

.ex-dash-hero-text {
  min-width: 0;
  flex: 1 1 240px;
}

.ex-dash-hero-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ex-muted);
}

.ex-dash-hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ex-text);
}

.ex-dash-hero-lede {
  margin: 0;
  max-width: 58ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ex-muted);
  font-weight: 400;
}

/* Subheading above executor + verifier combined summary numbers */
.ex-dash-combined-stats-heading {
  margin: 0;
  padding: 0 2px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--ex-text);
}

/* ── Error banner ── */
.ex-dash-error {
  font-size: 14px;
  font-weight: 500;
  color: var(--theme-red-deep);
  background: linear-gradient(135deg, var(--theme-red-soft), rgba(255, 255, 255, 0.96));
  border: 1px solid var(--theme-red-border);
  border-radius: 10px;
  padding: 12px 16px;
}

/* Summary strip container */
.ex-dash-page .ex-dash-summary-wrap {
  margin-top: 0;
}

/* ══════════════════════════════════════════════
   SUMMARY BAR + REVIEW CTA
══════════════════════════════════════════════ */
.ex-dash-summary-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

@media (min-width: 900px) {
  .ex-dash-summary-wrap {
    flex-direction: row;
    align-items: stretch;
    gap: 14px;
  }
  .ex-dash-summary-wrap .ex-dash-summary-bar {
    flex: 1;
    min-width: 0;
  }
}

.ex-dash-btn-review-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  border-radius: 14px;
  border: 1px solid var(--theme-red-bright);
  background: linear-gradient(135deg, var(--theme-red-deep), #7f1d1d);
  color: var(--theme-white);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(127, 29, 29, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.ex-dash-btn-review-cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(127, 29, 29, 0.45);
  transform: translateY(-1px);
}

.ex-dash-btn-review-cta:focus-visible {
  outline: 2px solid var(--theme-red-bright);
  outline-offset: 3px;
}

.ex-dash-summary-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--theme-white);
  border: 1px solid var(--ex-border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.ex-dash-summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 12px;
  transition: background 0.15s ease;
}

.ex-dash-summary-item:hover {
  background: var(--ex-subtle);
}

.ex-dash-summary-sep {
  width: 1px;
  background: var(--ex-border);
  margin: 12px 0;
  flex-shrink: 0;
}

.ex-dash-summary-num {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ex-dash-summary-num--green  { color: #189e52; }
.ex-dash-summary-num--blue   { color: var(--c-progress); }
.ex-dash-summary-num--amber  { color: var(--c-pending); }
.ex-dash-summary-num--violet { color: #1879bd; }
.ex-dash-summary-num--rose   { color: #f36f2a; }

.ex-dash-summary-lbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ex-muted);
  text-align: center;
}

/* ── Recent activity (footer of dashboard) ── */
.ex-dash-recent {
  background: var(--theme-white);
  border: 1px solid var(--ex-border);
  border-radius: 16px;
  padding: 16px 18px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.ex-dash-recent--last {
  margin-top: 22px;
}

/* Per role: status distribution (pie) + recent activity — two columns, equal height */
.ex-dash-pie-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 16px;
  min-width: 0;
}

.ex-dash-pie-recent-row > .ex-dash-bucket-pie {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.ex-dash-pie-recent-row > .ex-dash-bucket-pie--empty {
  height: 100%;
  min-height: 120px;
  box-sizing: border-box;
}

.ex-dash-pie-recent-row .ex-dash-bucket-pie-body {
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  min-height: 0;
}

.ex-dash-pie-recent-row .ex-dash-bucket-pie-chart-wrap {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

.ex-dash-recent--role {
  margin-top: 0;
}

.ex-dash-pie-recent-row .ex-dash-recent--role {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.ex-dash-pie-recent-row .ex-dash-recent-head {
  flex-shrink: 0;
}

.ex-dash-pie-recent-row .ex-dash-recent-table {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 1024px) {
  .ex-dash-pie-recent-row {
    grid-template-columns: 1fr;
  }

  .ex-dash-pie-recent-row > .ex-dash-bucket-pie,
  .ex-dash-pie-recent-row > .ex-dash-bucket-pie--empty {
    height: auto;
  }

  .ex-dash-pie-recent-row .ex-dash-recent--role {
    height: auto;
  }

  .ex-dash-pie-recent-row .ex-dash-recent-table {
    flex: none;
    overflow-y: visible;
  }
}

.ex-dash-recent-head {
  margin-bottom: 10px;
}

.ex-dash-recent-title {
  margin: 0 0 4px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ex-text);
}

.ex-dash-recent-sub {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ex-muted);
}

.ex-dash-recent-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ex-dash-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
  font-size: 12px;
  align-items: center;
  padding: 6px 0;
}

.ex-dash-recent-row--head {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ex-border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 800;
  color: var(--ex-muted);
}

.ex-dash-recent-row--empty {
  padding: 14px 0;
  color: var(--ex-muted);
  grid-template-columns: 1fr;
}

.ex-dash-recent-cell-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ex-text);
}

.ex-dash-recent-cell-muted {
  color: var(--ex-muted);
  font-size: 13px;
  font-weight: 500;
}

.ex-dash-recent-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ex-subtle);
  color: var(--ex-text);
}

.ex-dash-recent-pill--done {
  background: #ecfdf5;
  color: #047857;
}

.ex-dash-recent-pill--active {
  background: #eff6ff;
  color: #1d4ed8;
}

.ex-dash-recent-pill--pending {
  background: #fffbeb;
  color: #b45309;
}

@media (max-width: 720px) {
  .ex-dash-recent-row:not(.ex-dash-recent-row--head):not(.ex-dash-recent-row--empty) {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ex-border);
  }
}

/* ══════════════════════════════════════════════
   GRID
══════════════════════════════════════════════ */
.ex-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 1024px) {
  .ex-dash-grid { grid-template-columns: 1fr; }
  .ex-dash-summary-bar { flex-wrap: wrap; }
  .ex-dash-summary-item { min-width: 40%; }
}

/* ══════════════════════════════════════════════
   METRIC CARDS (2×2 per role) + ROLE ROWS
══════════════════════════════════════════════ */
.ex-dash-buckets-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.ex-dash-role-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Role sections — full-width blocks, no boxed container */
.ex-dash-role-panel {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.ex-dash-role-block-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ex-dash-role-block-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ex-dash-role-block-caption {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--ex-muted);
}

.ex-dash-role-block-total {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
}

.ex-dash-role-block-caption-lbl {
  font-weight: 500;
  font-size: 15px;
  color: var(--ex-muted);
}

.ex-dash-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Wide, short cards: one row of four from tablet landscape up */
@media (min-width: 768px) {
  .ex-dash-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .ex-dash-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Single metric card (wide footprint, modest height) ── */
.ex-dash-metric-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 17px 14px 15px;
  border-radius: 12px;
  border: 1px solid var(--ex-border);
  background: linear-gradient(180deg, var(--ex-surface) 0%, var(--ex-subtle) 100%);
  color: inherit;
  font: inherit;
  font-family: var(--ex-font, 'IBM Plex Sans', system-ui, sans-serif);
  cursor: pointer;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 6px 20px rgba(15, 23, 42, 0.05);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
  overflow: hidden;
  min-height: 0;
}

.ex-dash-metric-card:hover {
  box-shadow:
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.ex-dash-metric-card:focus-visible {
  outline: 2px solid var(--panel-ver);
  outline-offset: 2px;
}

.ex-dash-metric-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 6px;
  padding-top: 2px;
}

.ex-dash-metric-card-count-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ex-dash-metric-card-count {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ex-subtle);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ex-dash-metric-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ex-subtle);
  line-height: 1.25;
  margin-bottom: 2px;
}

.ex-dash-metric-card-hint {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ex-subtle);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ex-dash-metric-card-go {
  display: flex;
  align-items: center;
  color: var(--ex-muted);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ex-dash-metric-card:hover .ex-dash-metric-card-go {
  opacity: 1;
  transform: translateX(2px);
}

.ex-dash-metric-card-go { color: var(--panel-ver); }

/* Executor metric cards — same surface palette as verifier cards */
.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--not_started {
  background: #ff0000;
  border-color: rgba(217, 119, 6, 0.32);
  box-shadow:
    inset 4px 0 0 0 #d97706,
    0 1px 3px rgba(180, 83, 9, 0.1),
    0 8px 22px rgba(180, 83, 9, 0.07);
}

.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--not_started:hover {
  background:#ff0000;
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow:
    inset 4px 0 0 0 #b45309,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Aligns with verifier `in_process` (executor: Submit to verifier) */
.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--verification_required {
  background: #ea580c;
  border-color: rgba(234, 88, 12, 0.32);
  box-shadow:
    inset 4px 0 0 0 #ea580c,
    0 1px 3px rgba(194, 65, 12, 0.1),
    0 8px 22px rgba(194, 65, 12, 0.07);
}

.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--verification_required:hover {
  background: #ea580c;
  border-color: rgba(194, 65, 12, 0.45);
  box-shadow:
    inset 4px 0 0 0 #c2410c,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--returned {
  background: #3030ee;
  border-color: rgba(126, 34, 206, 0.28);
  box-shadow:
    inset 4px 0 0 0 #9333ea,
    0 1px 3px rgba(107, 33, 168, 0.1),
    0 8px 22px rgba(107, 33, 168, 0.07);
}

.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--returned:hover {
  background: #3030ee;
  border-color: rgba(107, 33, 168, 0.4);
  box-shadow:
    inset 4px 0 0 0 #7e22ce,  
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--done {
  background: #2a7900;
  border-color: rgba(5, 150, 105, 0.32);
  box-shadow:
    inset 4px 0 0 0 #059669,
    0 1px 3px rgba(5, 150, 105, 0.1),
    0 8px 22px rgba(4, 120, 87, 0.08);
}

.ex-dash-role-block:not(.ex-dash-role-block--verifier) .ex-dash-metric-card--done:hover {
  background: #2a7900;
  border-color: rgba(4, 120, 87, 0.45);
  box-shadow:
    inset 4px 0 0 0 #047857,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Verifier metric cards — distinct but cohesive palette */
.ex-dash-role-block--verifier .ex-dash-metric-card--not_started {
  background: #ff0000;
  border-color: rgba(217, 119, 6, 0.32);
  box-shadow:
    inset 4px 0 0 0 #d97706,
    0 1px 3px rgba(180, 83, 9, 0.1),
    0 8px 22px rgba(180, 83, 9, 0.07);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--not_started:hover {
  background:#ff0000;
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow:
    inset 4px 0 0 0 #b45309,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--in_process {
  background: #ea580c;
  border-color: rgba(234, 88, 12, 0.32);
  box-shadow:
    inset 4px 0 0 0 #ea580c,
    0 1px 3px rgba(194, 65, 12, 0.1),
    0 8px 22px rgba(194, 65, 12, 0.07);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--in_process:hover {
  background: #ea580c;
  border-color: rgba(194, 65, 12, 0.45);
  box-shadow:
    inset 4px 0 0 0 #c2410c,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--returned {
  background: #3b82f6;
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow:
    inset 4px 0 0 0 #2563eb,
    0 1px 3px rgba(37, 99, 235, 0.12),
    0 8px 22px rgba(37, 99, 235, 0.08);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--returned:hover {
  background: linear-gradient(165deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow:
    inset 4px 0 0 0 #1d4ed8,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--returned-ver {
  background: #2f22e8;
  border-color: rgba(126, 34, 206, 0.28);
  box-shadow:
    inset 4px 0 0 0 #9333ea,
    0 1px 3px rgba(107, 33, 168, 0.1),
    0 8px 22px rgba(107, 33, 168, 0.07);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--returned-ver:hover {
  background: #2f22e8;
  border-color: rgba(107, 33, 168, 0.4);
  box-shadow:
    inset 4px 0 0 0 #7e22ce,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--done {
  background: #2a7900;
  border-color: rgba(5, 150, 105, 0.32);
  box-shadow:
    inset 4px 0 0 0 #059669,
    0 1px 3px rgba(5, 150, 105, 0.1),
    0 8px 22px rgba(4, 120, 87, 0.08);
}

.ex-dash-role-block--verifier .ex-dash-metric-card--done:hover {
  background: #2a7900;
  border-color: rgba(4, 120, 87, 0.45);
  box-shadow:
    inset 4px 0 0 0 #047857,
    0 8px 28px rgba(15, 23, 42, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

/* ══════════════════════════════════════════════
   PANEL CARDS
══════════════════════════════════════════════ */
.ex-dash-panel {
  border-radius: var(--ex-radius);
  border: 1px solid var(--ex-border);
  background: var(--ex-surface);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 6px 24px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ex-dash-panel:hover {
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Coloured top accent */
.ex-dash-panel::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--panel-ex) 0%, var(--theme-red-deep) 100%);
}

.ex-dash-panel--verifier::before {
  background: linear-gradient(90deg, var(--panel-ver) 0%, var(--theme-gray-900) 100%);
}

/* ── Panel head ── */
.ex-dash-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 0;
}

.ex-dash-panel-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--theme-red-soft);
  border: 1px solid var(--theme-red-border);
  color: var(--theme-red-deep);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.12);
}
.ex-dash-panel-icon svg { width: 22px; height: 22px; }

.ex-dash-panel--verifier .ex-dash-panel-icon {
  background: var(--theme-gray-50);
  border-color: var(--theme-gray-200);
  color: var(--theme-gray-700);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ex-dash-panel-icon.ex-dash-panel-icon--verifier {
  background: var(--theme-gray-50);
  border-color: var(--theme-gray-200);
  color: var(--theme-gray-700);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ex-dash-panel-icon.ex-dash-role-block-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.ex-dash-panel-icon.ex-dash-role-block-icon svg {
  width: 20px;
  height: 20px;
}

.ex-dash-panel-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ex-dash-panel-label {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ex-muted);
  font-weight: 600;
}

/* Role section titles */
.ex-dash-role-block .ex-dash-panel-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ex-text);
  letter-spacing: -0.01em;
  text-transform: none;
}

.ex-dash-panel-total {
  margin: 2px 0 0;
  font-size: 39px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
}

.ex-dash-panel-caption {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ex-muted);
}

/* ── Rows container ── */
.ex-dash-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 14px 14px 14px;
}

/* ── Bucket row buttons ── */
.ex-dash-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: var(--ex-font, 'IBM Plex Sans', system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 6px;
}

.ex-dash-row:last-child { margin-bottom: 0; }

.ex-dash-row:hover {
  background: var(--ex-subtle);
  border-color: var(--ex-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.ex-dash-row:focus-visible {
  outline: 2px solid var(--panel-ex);
  outline-offset: 2px;
}
.ex-dash-panel--verifier .ex-dash-row:focus-visible {
  outline-color: var(--panel-ver);
}

/* Colored dot */
.ex-dash-row-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

/* Row body */
.ex-dash-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ex-dash-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ex-dash-row-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ex-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-dash-row-count {
  font-size: 21px;
  font-weight: 800;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.ex-dash-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ex-dash-row-hint {
  font-size: 12.5px;
  color: var(--ex-muted);
}

.ex-dash-row-go {
  display: flex;
  align-items: center;
  color: var(--ex-muted);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.ex-dash-row:hover .ex-dash-row-go {
  opacity: 1;
  transform: translateX(2px);
}

.ex-dash-panel:not(.ex-dash-panel--verifier) .ex-dash-row-go { color: var(--panel-ex); }
.ex-dash-panel--verifier                      .ex-dash-row-go { color: var(--panel-ver); }

/* Semantic tints on hover for each bucket */
.ex-dash-row--done:hover         { background: var(--theme-gray-50); border-color: var(--theme-gray-200); }
.ex-dash-row--in_process:hover   { background: var(--theme-red-soft); border-color: var(--theme-red-border); }
.ex-dash-row--not_started:hover  { background: var(--theme-gray-50); border-color: var(--theme-gray-100); }
.ex-dash-row--verification_required:hover { background: var(--theme-red-soft); border-color: var(--theme-red-border); }
.ex-dash-row--returned:hover     { background: var(--theme-red-soft); border-color: var(--theme-red-border); }
.ex-dash-row--returned-ver:hover { background: var(--theme-gray-50); border-color: var(--theme-gray-200); }

/* ── Loading ── */
.ex-dash-loading {
  padding: 80px 24px;
  color: var(--ex-muted);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.ex-dash-loading::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--ex-border);
  border-top-color: var(--theme-red);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.ex-dash-loading-text {
  display: inline-block;
}

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

/* Trend period toolbar */
.ex-dash-trend-toolbar {
  padding: 14px 16px;
  background: var(--ex-surface);
  border: 1px solid var(--ex-border);
  border-radius: var(--ex-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ex-dash-trend-toolbar .ex-dash-trend-period-row {
  margin-bottom: 0;
}

/* ── Trend period selector (applies to both role charts) ── */
.ex-dash-trend-period-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 8px;
}

.ex-dash-trend-period-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ex-muted);
}

.ex-dash-trend-period {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--ex-subtle);
  border: 1px solid var(--ex-border);
  border-radius: 10px;
}

.ex-dash-trend-period-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ex-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ex-dash-trend-period-btn:hover {
  color: var(--ex-text);
  background: rgba(0, 0, 0, 0.04);
}

.ex-dash-trend-period-btn--active {
  background: var(--theme-white);
  color: var(--ex-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ex-dash-trend-period-btn:focus-visible {
  outline: 2px solid var(--panel-ex);
  outline-offset: 2px;
}

/* Trend chart row, then pie row (always stacked) */
.ex-dash-trend-pie-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.ex-dash-trend-pie-row > * {
  min-width: 0;
  width: 100%;
}

/* Donut + legend: chart centered, legend as a clean band below */
.ex-dash-trend-pie-row .ex-dash-bucket-pie-body {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.ex-dash-trend-pie-row .ex-dash-bucket-pie-chart-wrap {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

.ex-dash-trend-pie-row .ex-dash-pie-legend {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  margin-top: 8px;
}

@media (min-width: 900px) {
  .ex-dash-trend-pie-row .ex-dash-bucket-pie-body {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 28px 36px;
  }

  .ex-dash-trend-pie-row .ex-dash-bucket-pie-chart-wrap {
    flex: 0 0 auto;
    width: min(100%, 300px);
    margin-top: 4px;
  }

  .ex-dash-trend-pie-row .ex-dash-pie-legend {
    flex: 1 1 280px;
    min-width: 0;
    margin-top: 0;
    align-self: center;
  }
}

/* ── Trend charts (executor / verifier) ── */
.ex-dash-trend {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border: none;
  border-radius: 16px;
  padding: 14px 16px 12px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.07);
}

.ex-dash-trend--role-verifier .ex-dash-trend-key--assigned {
  background: #64748b;
}

.ex-dash-trend--empty {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ex-dash-trend-empty-msg {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ex-muted);
  text-align: center;
  max-width: 28rem;
}

.ex-dash-trend-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ex-dash-trend-head-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.ex-dash-trend-subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ex-muted);
}

/* Wraps the period pill-group + legend side-by-side */
.ex-dash-trend-head-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* Empty state: keep head at top, message centered */
.ex-dash-trend--empty {
  align-items: stretch;
  justify-content: flex-start;
}

.ex-dash-trend-head--empty {
  margin-bottom: 12px;
}

.ex-dash-trend-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ex-text);
}

.ex-dash-trend-legend-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ex-muted);
}

.ex-dash-trend-key {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.ex-dash-trend-key--assigned {
  background: var(--theme-red-bright, #dc2626);
}

.ex-dash-trend-key--completed {
  background: var(--c-done, #171717);
}

.ex-dash-trend-chart-wrap {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.ex-dash-trend-caption {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ex-muted);
}

/* ── Bucket pie charts (executor / verifier) — matches metric card copy ── */
.ex-dash-bucket-pie {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  border: none;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.07);
}

.ex-dash-bucket-pie--empty {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px;
}

.ex-dash-bucket-pie-empty-msg {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ex-muted);
  text-align: center;
  max-width: 28rem;
}

.ex-dash-bucket-pie-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.ex-dash-bucket-pie-head-text {
  min-width: 0;
  flex: 1 1 200px;
}

.ex-dash-bucket-pie-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ex-muted);
  margin-bottom: 4px;
}

.ex-dash-bucket-pie-lede {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ex-muted);
  max-width: 42ch;
}

.ex-dash-bucket-pie-sub {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ex-dash-bucket-pie-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  min-width: 0;
}

.ex-dash-bucket-pie-chart-wrap {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

/* Donut stage: center label + soft ring */
.ex-dash-pie-donut-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
}

.ex-dash-pie-donut-ring {
  position: absolute;
  width: min(100%, 268px);
  aspect-ratio: 1;
  max-width: 268px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(241, 245, 249, 0.65) 52%,
    rgba(226, 232, 240, 0.4) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(15, 23, 42, 0.06);
  pointer-events: none;
  z-index: 0;
}

.ex-dash-pie-donut-stage .recharts-responsive-container {
  position: relative;
  z-index: 1;
}

.ex-dash-pie-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
  text-align: center;
}

.ex-dash-pie-center-value {
  font-size: clamp(1.75rem, 5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
}

.ex-dash-pie-center-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ex-muted);
}

.ex-dash-bucket-pie-chart-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ex-muted);
  background: var(--ex-subtle);
  border-radius: 12px;
}

.ex-dash-pie-tooltip {
  max-width: 260px;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

.ex-dash-pie-tooltip-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ex-text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.ex-dash-pie-tooltip-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.ex-dash-pie-tooltip-num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ex-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ex-dash-pie-tooltip-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--ex-muted);
  font-variant-numeric: tabular-nums;
}

.ex-dash-pie-tooltip-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ex-muted);
}

.ex-dash-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}

@media (min-width: 520px) {
  .ex-dash-pie-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }
}

.ex-dash-pie-legend-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 0;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.ex-dash-pie-legend-item:hover {
  background: #ffffff;
  box-shadow:
    0 4px 20px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  transform: translateY(-1px);
}

.ex-dash-pie-legend-swatch {
  width: 5px;
  flex-shrink: 0;
  min-height: 100%;
  border-radius: 0;
  align-self: stretch;
}

.ex-dash-pie-legend-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 10px 10px 10px 4px;
  text-align: left;
}

.ex-dash-pie-legend-item:focus-visible {
  outline: 2px solid var(--panel-ex);
  outline-offset: 2px;
}

.ex-dash-role-block--verifier .ex-dash-pie-legend-item:focus-visible {
  outline-color: var(--panel-ver);
}

.ex-dash-pie-legend-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ex-text);
  line-height: 1.25;
  letter-spacing: -0.02em;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ex-dash-pie-legend-hint {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ex-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ex-dash-pie-legend-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  padding: 10px 12px 10px 8px;
  background: rgba(248, 250, 252, 0.9);
  border-left: 1px solid rgba(226, 232, 240, 0.9);
}

.ex-dash-pie-legend-count {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ex-text);
  line-height: 1;
}

.ex-dash-pie-legend-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--ex-muted);
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .ex-dash-hero {
    padding: 18px 18px 20px;
  }
}
