.v4-work {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid #d4e0e9;
  border-radius: 16px;
  background: #fff;
  color: #173042;
  min-width: 0;
  scroll-margin-top: 20px;
}
.v4-work h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}
.v4-work p {
  line-height: 1.65;
  color: #526673;
}
.v4-work details {
  margin: 16px 0;
  border-top: 1px solid #e3eaf0;
  padding-top: 12px;
}
.v4-work summary {
  cursor: pointer;
  font-weight: 600;
}
.v4-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  margin-top: 16px;
}
.v4-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
}
.v4-work input,
.v4-work select,
.v4-work textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #b7c8d4;
  border-radius: 7px;
  padding: 10px;
  background: #fff;
  color: #173042;
  font: inherit;
}
.v4-work textarea {
  min-height: 108px;
  overflow-wrap: anywhere;
}
.v4-wide {
  grid-column: 1/-1;
}
.v4-work button {
  border: 0;
  border-radius: 8px;
  background: #155e63;
  color: white;
  padding: 11px 16px;
  cursor: pointer;
  align-self: end;
  font: inherit;
  line-height: 1.5;
  max-width: 100%;
  white-space: normal;
}
.v4-work button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.v4-work button:focus-visible,
.v4-work input:focus-visible,
.v4-work textarea:focus-visible,
.v4-work select:focus-visible {
  outline: 3px solid #72bfc2;
  outline-offset: 3px;
}
.v4-result {
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.v4-result[data-error="true"] {
  border-left: 4px solid #b04b30;
  padding-left: 12px;
}
.v4-card {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #d7e3e9;
  border-radius: 10px;
  background: #f7fafb;
  min-width: 0;
}
.v4-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.v4-card-heading h3 {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.v4-facts {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 3fr);
  gap: 8px 16px;
  line-height: 1.65;
  margin: 12px 0 0;
}
.v4-facts dt {
  font-size: 13px;
  color: #526673;
}
.v4-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.v4-badge {
  display: inline-block;
  width: fit-content;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.5;
  background: #e3edf2;
  color: #315567;
}
.v4-badge[data-state="SATISFIED"],
.v4-badge[data-state="VERIFIED"],
.v4-badge[data-state="PASSED"],
.v4-badge[data-state="FULFILLED"],
.v4-badge[data-state="C4_VERIFIED_TRACK_RECORD"],
.v4-badge[data-state="VERIFIED_APPLIED"] {
  background: #e0f3e9;
  color: #1d6546;
}
.v4-badge[data-state="UNKNOWN_PENDING"],
.v4-badge[data-state="UNSATISFIED"],
.v4-badge[data-state="BLOCKED_MISSING_EVIDENCE"],
.v4-badge[data-state="REJECTED_DEAD_LETTER"] {
  background: #fff0dc;
  color: #82521d;
}
.v4-gates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr));
  gap: 10px;
  margin: 16px 0;
}
.v4-gate {
  padding: 14px;
  border: 1px solid #c9d9e2;
  border-radius: 10px;
  background: #f3f7fa;
  min-width: 0;
  overflow-wrap: anywhere;
}
.v4-gate strong,
.v4-gate small {
  display: block;
  line-height: 1.6;
}
.v4-gate .v4-badge {
  margin: 8px 0;
}
.v4-gate[data-status="PASSED"] {
  border-color: #74b49b;
  background: #edf8f2;
}
.v4-gate[data-status="BLOCKED_MISSING_EVIDENCE"] {
  border-color: #e5b48c;
  background: #fff4ea;
}
.v4-banner {
  display: inline-block;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 20px;
  background: #e7f1f4;
  color: #245766;
  margin-bottom: 12px;
}
.v4-work .v4-status {
  font-size: 13px;
  font-weight: 600;
  color: #315c64;
  overflow-wrap: anywhere;
}
.v4-repeat,
.v4-checks {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #d5e1e7;
  border-radius: 10px;
  padding: 12px;
}
.v4-repeat legend,
.v4-checks legend {
  font-size: 14px;
  font-weight: 600;
  padding: 0 6px;
}
.v4-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr));
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #e0e8ed;
}
.v4-row:last-child {
  margin-bottom: 12px;
}
.v4-work .v4-secondary {
  background: #e7f0f2;
  color: #20575c;
  border: 1px solid #b6d0d4;
}
.v4-work .v4-remove {
  background: #fff;
  color: #94503e;
  border: 1px solid #dbb9ad;
  padding: 9px 12px;
  font-size: 13px;
}
.v4-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 12px;
}
.v4-checks label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.v4-checks input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
}
.v4-row-summary {
  margin: 0;
}
.v4-file-summary {
  padding: 12px;
  background: #f1f6f8;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.v4-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.v4-work table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
  table-layout: fixed;
}
.v4-work caption {
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  margin: 12px 0;
}
.v4-work th,
.v4-work td {
  padding: 10px 8px;
  border-bottom: 1px solid #d7e2e8;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.v4-work th {
  background: #eaf1f4;
  font-weight: 600;
}
.v4-parties {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.v4-parties > div {
  padding: 12px;
  background: #eaf2f5;
  border-radius: 8px;
  min-width: 0;
}
.v4-parties span,
.v4-parties strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.v4-parties span {
  font-size: 12px;
  color: #526673;
}
.v4-issues {
  color: #8c4926;
  line-height: 1.7;
  padding-left: 20px;
}
.v4-empty {
  padding: 12px 0;
}
.v4-audit-verdict {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #c9d9e2;
  border-radius: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.v4-audit-verdict[data-valid="true"] {
  border-color: #74b49b;
  background: #edf8f2;
}
.v4-audit-verdict[data-valid="false"] {
  border-color: #d39079;
  background: #fff1eb;
  color: #813a29;
}
.v4-audit-verdict dl {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr);
  gap: 8px 12px;
  margin-bottom: 0;
}
.v4-audit-verdict dt {
  font-weight: 600;
}
.v4-audit-verdict dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  .v4-work table,
  .v4-work tbody,
  .v4-work tr,
  .v4-work td {
    display: block;
    width: auto;
  }
  .v4-work caption {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .v4-work thead {
    display: none;
  }
  .v4-work tr {
    margin: 12px 0;
    border: 1px solid #d7e2e8;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
  }
  .v4-work td {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(0, 1.6fr);
    gap: 10px;
    padding: 8px 0;
    min-width: 0;
  }
  .v4-work td:before {
    content: attr(data-label);
    color: #526673;
  }
  .v4-work td:last-child {
    border-bottom: 0;
  }
  .v4-parties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .v4-work {
    padding: 16px 12px;
    margin: 16px 0;
    border-radius: 10px;
  }
  .v4-fields,
  .v4-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .v4-work h2 {
    font-size: 1.15rem;
  }
  .v4-work button {
    width: 100%;
  }
  .v4-facts,
  .v4-audit-verdict dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  .v4-facts dd,
  .v4-audit-verdict dd {
    margin-bottom: 7px;
  }
  .v4-card {
    padding: 12px;
  }
  .v4-parties {
    gap: 7px;
  }
  .v4-parties > div {
    padding: 9px;
  }
}

.v4-nullable-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v4-work .v4-null-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.v4-work .v4-null-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.v4-nullable-field input:disabled {
  background: #eef3f6;
  color: #687b87;
}
.v4-preview {
  min-width: 0;
}
.v4-preview table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.v4-preview th,
.v4-preview td {
  padding: 8px;
  text-align: left;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #dce5eb;
}
.v4-preview [data-preview-status="DEFICIT"] {
  color: #9b342a;
}
.v4-preview [data-preview-status="UNKNOWN_PENDING"] {
  color: #82521d;
}
.v4-envelope-row {
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #d5e2e9;
  border-radius: 8px;
}
.v4-work output {
  overflow-wrap: anywhere;
  min-width: 0;
}
.v4-service-chip {
  border-radius: 18px;
  background: #edf6f7;
  padding: 12px;
}
.v4-row-summary[data-valid="true"] {
  color: #1d6546;
}
.v4-row-summary[data-valid="false"] {
  color: #82521d;
}
@media (max-width: 600px) {
  .v4-preview table,
  .v4-preview tbody,
  .v4-preview tr,
  .v4-preview td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .v4-preview thead {
    display: none;
  }
  .v4-preview tr {
    padding: 10px 0;
    border-bottom: 2px solid #dce5eb;
  }
  .v4-preview td:before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
  }
}
