.wf-shell {
  --wf-purple: var(--purple, #642b8c);
  --wf-purple-deep: var(--purple-deep, #461664);
  --wf-purple-soft: var(--purple-soft, #f2eaf7);
  --wf-orange: var(--orange, #e97b24);
  --wf-orange-soft: var(--orange-soft, #fff1e5);
  --wf-blue: var(--blue, #2d6f9e);
  --wf-blue-soft: var(--blue-soft, #eaf3f9);
  --wf-green: var(--green, #2e8464);
  --wf-green-soft: var(--green-soft, #e8f4ef);
  --wf-red: var(--red, #b74646);
  --wf-red-soft: var(--red-soft, #fbeaea);
  --wf-ink: var(--ink, #172235);
  --wf-muted: var(--slate, #717a86);
  --wf-border: var(--border, #d8dce2);
  display: grid;
  min-width: 0;
  gap: 14px;
  color: var(--wf-ink);
}

.wf-shell *,
.wf-shell *::before,
.wf-shell *::after,
.wf-modal *,
.wf-modal *::before,
.wf-modal *::after { box-sizing: border-box; }

.wf-shell button,
.wf-shell input,
.wf-shell select,
.wf-shell textarea,
.wf-modal button,
.wf-modal input,
.wf-modal select,
.wf-modal textarea { font: inherit; }

.wf-head {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(100, 43, 140, .14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 91% 8%, rgba(233, 123, 36, .15), transparent 28%),
    linear-gradient(135deg, #fff 0%, #fbf8fd 62%, #fff9f4 100%);
  box-shadow: 0 12px 28px rgba(41, 28, 52, .07);
}

.wf-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(var(--wf-purple), var(--wf-orange));
}

.wf-head > div:first-child { max-width: 750px; }

.wf-kicker {
  display: block;
  color: var(--wf-purple);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
}

.wf-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.wf-title-row h1 {
  margin: 0;
  color: var(--wf-ink);
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1;
  letter-spacing: -.045em;
}

.wf-title-row > span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(100, 43, 140, .18);
  border-radius: 999px;
  background: var(--wf-purple-soft);
  color: var(--wf-purple);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .07em;
}

.wf-head > div > p {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--wf-muted);
  font-size: 12px;
  line-height: 1.55;
}

.wf-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-btn,
.wf-icon-btn {
  border: 1px solid #d2d7dd;
  outline: none;
  background: #fff;
  color: #293647;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.wf-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.wf-btn.small { min-height: 31px; padding: 0 10px; font-size: 9px; }
.wf-btn:hover, .wf-icon-btn:hover { border-color: rgba(100, 43, 140, .45); color: var(--wf-purple); }
.wf-btn:focus-visible, .wf-icon-btn:focus-visible { box-shadow: 0 0 0 3px rgba(100, 43, 140, .15); }
.wf-btn:active, .wf-icon-btn:active { transform: translateY(1px); }
.wf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.wf-btn.primary {
  border-color: var(--wf-purple);
  background: linear-gradient(135deg, var(--wf-purple), var(--wf-purple-deep));
  color: #fff;
  box-shadow: 0 7px 16px rgba(100, 43, 140, .2);
}

.wf-btn.primary:hover { color: #fff; box-shadow: 0 9px 20px rgba(100, 43, 140, .27); }
.wf-btn.success { border-color: var(--wf-green); background: var(--wf-green); color: #fff; }
.wf-btn.success:hover { border-color: #236b52; background: #236b52; color: #fff; box-shadow: 0 8px 18px rgba(46, 132, 100, .2); }

.wf-icon-btn {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
}

.wf-parallel-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(45, 111, 158, .2);
  border-left: 4px solid var(--wf-blue);
  border-radius: 10px;
  background: linear-gradient(90deg, var(--wf-blue-soft), #fff 72%);
}

.wf-parallel-note > span {
  display: grid;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  background: var(--wf-blue);
  color: #fff;
}

.wf-parallel-note > div { flex: 1; min-width: 0; }
.wf-parallel-note strong { display: block; color: #235c83; font-size: 10px; }
.wf-parallel-note p { margin: 2px 0 0; color: #567082; font-size: 9px; line-height: 1.45; }
.wf-parallel-note > b { color: var(--wf-blue); font-size: 9px; letter-spacing: .08em; white-space: nowrap; }

.wf-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.wf-metrics article {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 34, 53, .04);
}

.wf-metrics article::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--wf-purple); }
.wf-metrics article.blue::before { background: var(--wf-blue); }
.wf-metrics article.orange::before { background: var(--wf-orange); }
.wf-metrics article.red::before { background: var(--wf-red); }
.wf-metrics article.green::before { background: var(--wf-green); }
.wf-metrics span, .wf-metrics strong, .wf-metrics small { display: block; }
.wf-metrics span { color: var(--wf-muted); font-size: 8px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.wf-metrics strong { overflow: hidden; margin-top: 6px; font-size: 18px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.wf-metrics small { margin-top: 3px; color: #7b8490; font-size: 8px; }

.wf-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(315px, .65fr);
  gap: 13px;
  align-items: start;
}

.wf-main { display: grid; min-width: 0; gap: 13px; }
.wf-lanes { display: grid; gap: 12px; }

.wf-lane,
.wf-intake-card,
.wf-detail {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(23, 34, 53, .045);
}

.wf-lane > header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3e6ea;
  background: linear-gradient(90deg, #f8fbfd, #fff);
}

.wf-lane.repair > header { background: linear-gradient(90deg, #fff9f3, #fff); }

.wf-lane-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--wf-blue-soft);
  color: var(--wf-blue);
}

.wf-lane.repair .wf-lane-icon { background: var(--wf-orange-soft); color: var(--wf-orange); }
.wf-lane > header > div { flex: 1; min-width: 0; }
.wf-lane > header > div > span { display: block; color: var(--wf-blue); font-size: 7px; font-weight: 850; letter-spacing: .12em; }
.wf-lane.repair > header > div > span { color: var(--wf-orange); }
.wf-lane h3 { margin: 2px 0 0; font-size: 12px; }
.wf-lane header p { margin: 2px 0 0; color: var(--wf-muted); font-size: 8px; line-height: 1.4; }
.wf-lane header > b { align-self: center; padding: 4px 7px; border-radius: 999px; background: #edf4f8; color: var(--wf-blue); font-size: 8px; white-space: nowrap; }
.wf-lane.repair header > b { background: var(--wf-orange-soft); color: #a95c16; }

.wf-timeline {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.wf-timeline::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 21px;
  width: 2px;
  border-radius: 1px;
  background: #e3e8ed;
}

.wf-work-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid #e0e4e8;
  border-radius: 9px;
  background: #fff;
  color: var(--wf-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.wf-work-card:hover { border-color: #b7c0ca; background: #fbfcfd; transform: translateY(-1px); }
.wf-work-card:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(100, 43, 140, .13); }
.wf-work-card.active { border-color: rgba(100, 43, 140, .48); background: #fcf9fe; box-shadow: inset 0 0 0 1px rgba(100, 43, 140, .08), 0 4px 12px rgba(100, 43, 140, .07); }

.wf-work-rail { display: block; width: 7px; height: 100%; min-height: 55px; border-radius: 5px; background: var(--wf-blue); }
.wf-work-rail.repair { background: var(--wf-orange); }
.wf-work-main { min-width: 0; }
.wf-work-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wf-work-title strong { font-size: 11px; }
.wf-work-scope { display: -webkit-box; overflow: hidden; margin-top: 4px; color: #5f6b78; font-size: 8.5px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wf-work-meta { display: flex; gap: 5px 10px; flex-wrap: wrap; margin-top: 6px; color: #7a8490; font-size: 7.5px; }
.wf-work-meta span { position: relative; }
.wf-work-meta span + span::before { content: "·"; position: absolute; left: -7px; color: #a2a9b1; }
.wf-work-side { display: flex; min-width: 118px; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.wf-work-side small { color: #7d8792; font-size: 7px; }

.wf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf0f3;
  color: #586371;
  font-size: 7px;
  font-weight: 820;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wf-badge i { display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.wf-badge.purple { background: var(--wf-purple-soft); color: var(--wf-purple); }
.wf-badge.blue { background: var(--wf-blue-soft); color: var(--wf-blue); }
.wf-badge.orange { background: var(--wf-orange-soft); color: #a65b18; }
.wf-badge.green { background: var(--wf-green-soft); color: var(--wf-green); }
.wf-badge.red { background: var(--wf-red-soft); color: var(--wf-red); }

.wf-sla { font-size: 7px; font-weight: 750; white-space: nowrap; }
.wf-sla.green { color: var(--wf-green); }
.wf-sla.orange { color: #a65b18; }
.wf-sla.red { color: var(--wf-red); }
.wf-sla.grey { color: var(--wf-muted); }

.wf-empty-lane, .wf-empty {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 92px;
  padding: 20px;
  color: var(--wf-muted);
  text-align: center;
}

.wf-empty-lane strong, .wf-empty strong { color: #4e5967; font-size: 10px; }
.wf-empty-lane span, .wf-empty span { font-size: 8px; }

.wf-intake-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3e6ea;
}

.wf-intake-card h2 { margin: 3px 0 0; font-size: 12px; }
.wf-intake-card header p { margin: 2px 0 0; color: var(--wf-muted); font-size: 8px; }
.wf-count { padding: 5px 8px; border-radius: 999px; background: var(--wf-purple-soft); color: var(--wf-purple); font-size: 8px; font-weight: 800; white-space: nowrap; }
.wf-intake-list { display: grid; }

.wf-intake-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 14px;
  border-bottom: 1px solid #e8eaed;
}

.wf-intake-row:last-child { border-bottom: 0; }
.wf-source-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; background: var(--wf-purple); color: #fff; font-size: 7px; font-weight: 850; letter-spacing: .04em; }
.wf-intake-row > div:nth-child(2) { min-width: 0; }
.wf-intake-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wf-intake-title strong { font-size: 10px; }
.wf-intake-row p { overflow: hidden; margin: 4px 0 0; color: #5e6875; font-size: 8.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.wf-intake-row small { display: block; margin-top: 4px; color: #7b8590; font-size: 7px; }
.wf-intake-row em { display: inline-block; margin-top: 5px; padding: 3px 5px; border-radius: 5px; background: var(--wf-orange-soft); color: #9a581b; font-size: 7px; font-style: normal; }
.wf-intake-actions { display: flex; align-items: center; gap: 5px; }

.wf-detail { position: sticky; top: 10px; }

.wf-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e2e5e9;
  background: linear-gradient(135deg, #fff, #fbf8fd);
}

.wf-detail > header > div { min-width: 0; }
.wf-detail-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.wf-detail-actions .wf-btn { min-height: 32px; padding: 0 9px; font-size: 8px; }
.wf-detail h2 { margin: 3px 0 0; font-size: 14px; }
.wf-detail header p { margin: 3px 0 0; color: var(--wf-muted); font-size: 8px; line-height: 1.4; }
.wf-detail-status { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid #e7eaed; background: #fafbfc; }
.wf-detail-status .wf-sla { margin-left: auto; }

.wf-detail-section { padding: 11px 14px; border-bottom: 1px solid #e7eaed; }
.wf-detail-section > span, .wf-source > span, .wf-audit > header span { display: block; color: #6c7682; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wf-detail-section > p { margin: 6px 0 0; color: #344151; font-size: 9px; line-height: 1.5; }
.wf-detail-section > small { display: block; margin-top: 5px; color: var(--wf-purple); font-size: 7px; font-weight: 700; }
.wf-muted { color: var(--wf-muted) !important; }

.wf-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid #e7eaed;
}

.wf-detail-grid > div { min-width: 0; padding: 9px 14px; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.wf-detail-grid > div:nth-child(2n) { border-right: 0; }
.wf-detail-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
.wf-detail-grid dt { color: #7a8490; font-size: 7px; text-transform: uppercase; }
.wf-detail-grid dd { overflow: hidden; margin: 3px 0 0; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.wf-authority { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-top: 7px; padding: 8px; border: 1px solid #cae3d8; border-radius: 7px; background: var(--wf-green-soft); }
.wf-authority strong { color: #236b52; font-size: 9px; }
.wf-authority b { color: #236b52; font-size: 10px; }
.wf-authority small { grid-column: 1 / -1; color: #59816f; font-size: 7px; }
.wf-authority.pending { border-color: #ead3a6; background: var(--wf-orange-soft); }
.wf-authority.pending strong, .wf-authority.pending small { color: #8e5b1f; }

.wf-evidence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 7px; }
.wf-evidence > div { display: grid; min-width: 0; place-items: center; padding: 7px 3px; border: 1px solid #e1e5e8; border-radius: 7px; background: #fafbfc; text-align: center; }
.wf-evidence strong { font-size: 12px; }
.wf-evidence small { color: #7b8590; font-size: 6.5px; }

.wf-link-list { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.wf-link-chip { padding: 5px 7px; border: 1px solid #d9dfe4; border-radius: 999px; background: #fff; color: var(--wf-purple); font-size: 7px; font-weight: 700; cursor: pointer; }
.wf-link-chip:hover { border-color: var(--wf-purple); background: var(--wf-purple-soft); }

.wf-source { display: grid; gap: 3px; padding: 10px 14px; border-bottom: 1px solid #e7eaed; background: #f8f9fb; }
.wf-source strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.wf-source small { overflow: hidden; color: #7c8590; font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }

.wf-audit { padding: 11px 14px 13px; }
.wf-audit > header { display: flex; align-items: center; justify-content: space-between; }
.wf-audit > header b { padding: 3px 5px; border-radius: 999px; background: #edf0f3; color: #66717e; font-size: 6px; }
.wf-audit article { position: relative; display: grid; grid-template-columns: 8px 1fr; gap: 7px; margin-top: 8px; }
.wf-audit article > i { position: relative; width: 7px; height: 7px; margin-top: 3px; border: 2px solid #fff; border-radius: 50%; background: var(--wf-purple); box-shadow: 0 0 0 1px #cbb7d9; }
.wf-audit article > i::after { content: ""; position: absolute; top: 7px; left: 1px; width: 1px; height: calc(100% + 14px); background: #e1e5e8; }
.wf-audit article:last-child > i::after { display: none; }
.wf-audit article strong { display: block; font-size: 8px; }
.wf-audit article p { margin: 2px 0 0; color: #626e7a; font-size: 7.5px; line-height: 1.4; }
.wf-audit article small { display: block; margin-top: 2px; color: #89919a; font-size: 6.5px; }

.wf-boundary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px dashed #cfd4da; border-radius: 9px; background: rgba(255, 255, 255, .55); color: #77818c; font-size: 7.5px; }
.wf-boundary strong { color: #515d6a; white-space: nowrap; }

/* Workflow modal */
.wf-modal { width: min(1000px, 100%); }
.wf-modal-body { display: grid; gap: 14px; }

.wf-method-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(100, 43, 140, .17);
  border-radius: 8px;
  background: var(--wf-purple-soft, #f2eaf7);
}

.wf-method-note.api { border-color: rgba(45, 111, 158, .2); background: var(--wf-blue-soft, #eaf3f9); }
.wf-method-note.authority { border-color: rgba(46, 132, 100, .24); background: var(--wf-green-soft, #e8f4ef); }
.wf-method-note.authority span { background: var(--wf-green, #2e8464); }
.wf-method-note span { padding: 4px 6px; border-radius: 5px; background: var(--wf-purple, #642b8c); color: #fff; font-size: 7px; font-weight: 850; letter-spacing: .06em; white-space: nowrap; }
.wf-method-note.api span { background: var(--wf-blue, #2d6f9e); }
.wf-method-note p { margin: 0; color: #5f6874; font-size: 8px; line-height: 1.4; }

.wf-form-grid { display: grid; gap: 10px; }
.wf-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wf-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wf-form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wf-field.wide { grid-column: 1 / -1; }

.wf-field { display: grid; min-width: 0; gap: 4px; }
.wf-field > span { color: #52606e; font-size: 8px; font-weight: 760; }
.wf-field > span b { color: #b74646; }
.wf-field > small, .wf-help { color: #7b8590; font-size: 7px; line-height: 1.4; }
.wf-field input, .wf-field select, .wf-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d4dae0;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: #172235;
  padding: 8px 9px;
  font-size: 9px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.wf-field textarea { min-height: 78px; resize: vertical; line-height: 1.45; }
.wf-field textarea[readonly] { background: #f3f5f7; color: #687381; cursor: not-allowed; }
.wf-field input[readonly] { background: #f3f5f7; color: #687381; cursor: not-allowed; }
.wf-field input:focus, .wf-field select:focus, .wf-field textarea:focus { border-color: var(--wf-purple, #642b8c); box-shadow: 0 0 0 3px rgba(100, 43, 140, .1); }

.wf-money { position: relative; }
.wf-money i { position: absolute; top: 50%; left: 9px; color: #697581; font-size: 8px; font-style: normal; transform: translateY(-50%); }
.wf-money input { padding-left: 20px; }

.wf-name-preview { display: grid; align-content: center; padding: 8px 10px; border: 1px solid #dfd3e7; border-radius: 8px; background: #fbf8fd; }
.wf-name-preview span { color: #766781; font-size: 7px; text-transform: uppercase; }
.wf-name-preview strong { margin-top: 2px; color: var(--wf-purple, #642b8c); font-size: 12px; }
.wf-name-preview small { margin-top: 2px; color: #85798d; font-size: 6.5px; }

.wf-parent-field[hidden] { display: none; }

.wf-fieldset { min-width: 0; margin: 0; padding: 11px; border: 1px solid #dfe3e7; border-radius: 9px; background: #fafbfc; }
.wf-fieldset legend { padding: 0 5px; color: #4f5b68; font-size: 8px; font-weight: 800; }
.wf-fieldset > p { margin: 7px 0 0; color: #7a8490; font-size: 7px; }

.wf-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wf-check-grid label { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 7px; align-items: flex-start; min-width: 0; padding: 7px; border: 1px solid #e0e4e8; border-radius: 7px; background: #fff; cursor: pointer; }
.wf-check-grid input { width: 13px; height: 13px; margin: 1px 0 0; accent-color: var(--wf-purple, #642b8c); }
.wf-check-grid strong, .wf-check-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-check-grid strong { font-size: 8px; }
.wf-check-grid small { margin-top: 2px; color: #7d8791; font-size: 6.5px; }

.wf-authority-guard { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #cae3d8; border-radius: 9px; background: var(--wf-green-soft, #e8f4ef); }
.wf-authority-guard strong { color: #236b52; font-size: 9px; }
.wf-authority-guard span { color: #4f7465; font-size: 8px; line-height: 1.45; }

.wf-foot-note { color: #78828d; font-size: 8px; }

.wf-review-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid #dfe3e7; border-radius: 9px; background: #fafbfc; }
.wf-review-summary > div { min-width: 0; }
.wf-review-summary span:first-child { display: block; color: #737e89; font-size: 7px; text-transform: uppercase; }
.wf-review-summary strong { display: block; margin-top: 2px; font-size: 12px; }
.wf-review-summary p { margin: 4px 0 0; color: #5d6875; font-size: 8px; line-height: 1.45; }

.wf-review-grid { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr); gap: 12px; }
.wf-review-grid > section { min-width: 0; padding: 11px; border: 1px solid #dfe3e7; border-radius: 9px; background: #fff; }
.wf-review-grid h3 { margin: 0 0 8px; font-size: 10px; }
.wf-review-grid pre { max-height: 300px; overflow: auto; margin: 0; padding: 10px; border-radius: 7px; background: #172235; color: #e8edf3; font: 8px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.wf-review-grid dl { display: grid; gap: 6px; margin: 10px 0 0; }
.wf-review-grid dl > div { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 7px; padding-top: 6px; border-top: 1px solid #eceef1; }
.wf-review-grid dt { color: #79838e; font-size: 7px; }
.wf-review-grid dd { overflow: hidden; margin: 0; color: #364352; font-size: 7px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.wf-validation-list { display: grid; gap: 5px; }
.wf-validation-list > div, .wf-valid { display: grid; grid-template-columns: 19px 1fr; gap: 7px; align-items: start; padding: 7px; border-radius: 7px; font-size: 7.5px; line-height: 1.4; }
.wf-validation-list i, .wf-valid i { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; font-style: normal; font-weight: 850; }
.wf-validation-list .error { background: var(--wf-red-soft, #fbeaea); color: #933b3b; }
.wf-validation-list .error i { background: var(--wf-red, #b74646); color: #fff; }
.wf-validation-list .warning { background: var(--wf-orange-soft, #fff1e5); color: #8f571f; }
.wf-validation-list .warning i { background: var(--wf-orange, #e97b24); color: #fff; }
.wf-valid { background: var(--wf-green-soft, #e8f4ef); color: #276c54; }
.wf-valid i { background: var(--wf-green, #2e8464); color: #fff; }

@media (max-width: 1180px) {
  .wf-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wf-workspace { grid-template-columns: 1fr; }
  .wf-detail { position: static; }
  .wf-form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .wf-head { align-items: stretch; flex-direction: column; }
  .wf-head-actions { justify-content: flex-start; }
  .wf-form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wf-head { padding: 18px; }
  .wf-head-actions, .wf-head-actions .wf-btn { width: 100%; }
  .wf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-parallel-note { align-items: flex-start; }
  .wf-parallel-note > b { display: none; }
  .wf-work-card { grid-template-columns: 7px minmax(0, 1fr); }
  .wf-work-side { grid-column: 2; min-width: 0; align-items: flex-start; text-align: left; }
  .wf-intake-row { grid-template-columns: auto minmax(0, 1fr); }
  .wf-intake-actions { grid-column: 2; }
  .wf-form-grid.two, .wf-form-grid.three, .wf-form-grid.four { grid-template-columns: 1fr; }
  .wf-check-grid { grid-template-columns: 1fr; }
  .wf-detail-grid { grid-template-columns: 1fr; }
  .wf-detail-grid > div { border-right: 0; }
  .wf-detail-grid > div:nth-last-child(-n + 2) { border-bottom: 1px solid #edf0f2; }
  .wf-detail-grid > div:last-child { border-bottom: 0; }
  .wf-detail > header { flex-direction: column; }
  .wf-detail-actions { width: 100%; justify-content: flex-start; }
  .wf-review-grid dl > div { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .wf-metrics { grid-template-columns: 1fr; }
  .wf-evidence { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .wf-head-actions, .wf-intake-actions, .wf-detail .wf-btn { display: none !important; }
  .wf-workspace { grid-template-columns: 1fr; }
  .wf-detail { position: static; break-inside: avoid; }
}
