.rework-page-title-probe {
  display: none;
}

.rework-management-page .workspace-card__body {
  padding: 0;
}

.rework-board {
  display: grid;
  gap: 0;
}

.rework-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 6px 4px 8px;
  border-bottom: 1px solid #dde3ef;
  background: #f5f6f9;
}

.rework-toolbar__left,
.rework-toolbar__right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.rework-toolbar__right {
  justify-content: flex-end;
}

.rework-tool-button,
.rework-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 4px;
  color: #2f64f5;
  font-size: 14px;
  white-space: nowrap;
}

.rework-tool-button {
  gap: 4px;
  color: #2f3850;
}

.rework-tool-button__icon {
  color: #59657d;
  font-size: 16px;
}

.rework-link-button:hover {
  color: #1f50d9;
}

.rework-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rework-range__label {
  color: #4f5870;
  font-size: 14px;
  white-space: nowrap;
}

.rework-range__fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rework-range__split {
  color: #576177;
}

.rework-date-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.rework-date-field input {
  width: 174px;
  min-height: 32px;
  padding: 6px 10px 6px 30px;
  border-color: #dfe4ef;
  border-radius: 4px;
  background: #fff;
  color: #4c556b;
  font-size: 13px;
}

.rework-date-field__icon {
  position: absolute;
  left: 10px;
  z-index: 1;
  color: #b2bdcf;
  font-size: 13px;
}

.rework-select-shell {
  position: relative;
  min-width: 104px;
}

.rework-select-shell::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #b2bdcf;
  pointer-events: none;
}

.rework-select-shell select {
  min-height: 32px;
  padding: 6px 30px 6px 12px;
  border-color: #dfe4ef;
  border-radius: 4px;
  background: #fff;
  color: #4c556b;
  font-size: 13px;
  appearance: none;
}

.rework-search {
  min-width: 290px;
}

.rework-search input {
  min-height: 32px;
  border-color: #dfe4ef;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}

.rework-table-shell {
  min-height: calc(100vh - 172px);
  border: 0;
  border-radius: 0;
  background: #fff;
}

.rework-table {
  min-width: 1240px;
}

.rework-table thead th {
  padding: 10px 12px;
  border-right: 1px solid #d7deeb;
  background: #d8deea;
  color: #1f293d;
  font-size: 13px;
}

.rework-table tbody td {
  padding: 9px 12px;
  border-right: 1px solid #edf0f6;
  color: #0f172a;
  font-size: 13px;
  white-space: nowrap;
}

.rework-table tbody tr.is-active {
  background: #dff4fb;
}

.rework-table tbody tr:hover {
  background: #eef8fc;
}

.rework-table th:nth-child(1),
.rework-table td:nth-child(1) {
  width: 52px;
  text-align: center;
}

.rework-table th:nth-child(2) {
  width: 250px;
}

.rework-table th:nth-child(3) {
  width: 250px;
}

.rework-table th:nth-child(4) {
  width: 250px;
}

.rework-table th:nth-child(5) {
  width: 250px;
}

.rework-table th:nth-child(6) {
  width: 250px;
}

.rework-table th:nth-child(7) {
  width: 260px;
}

.rework-process-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f2ff;
  color: #7a6dff;
  font-size: 13px;
}

.rework-process-chip span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9787f5;
}

.rework-config-modal__panel {
  width: min(1280px, calc(100vw - 32px));
  margin-top: 4vh;
}

.rework-config-tabs {
  margin-bottom: 16px;
}

.rework-config-panel {
  display: none;
}

.rework-config-panel.is-active {
  display: block;
}

.rework-config-card,
.rework-param-list-card {
  padding: 0;
  overflow: hidden;
}

.rework-signal-table-shell {
  border: 0;
  border-radius: 0;
}

.rework-reason-table {
  min-width: 620px;
}

.rework-reason-table-shell {
  border: 0;
  border-radius: 0;
}

.rework-reason-table th,
.rework-reason-table td {
  white-space: nowrap;
}

.rework-signal-table {
  min-width: 860px;
}

.rework-signal-table thead th,
.rework-signal-table tbody td {
  white-space: nowrap;
  vertical-align: middle;
}

.rework-signal-table th:first-child,
.rework-signal-table td:first-child {
  width: 118px;
  text-align: center;
}

.rework-signal-table th:not(:first-child),
.rework-signal-table td:not(:first-child) {
  min-width: 180px;
}

.rework-signal-table tbody tr {
  cursor: default;
}

.rework-variable-picker .field-picker__link {
  min-width: 66px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(85, 118, 255, 0.24);
  border-radius: 8px;
  background: rgba(85, 118, 255, 0.08);
  color: var(--color-primary);
  font-weight: 600;
}

.rework-signal-table .rework-variable-picker {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 6px;
}

.rework-signal-table .rework-variable-picker input {
  min-height: 32px;
  padding: 6px 8px;
}

.rework-signal-table .rework-variable-picker .field-picker__link {
  min-width: 54px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
}

.rework-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.rework-status-pill--on {
  background: rgba(38, 168, 109, 0.12);
  color: var(--color-success);
}

.rework-status-pill--off {
  background: rgba(152, 161, 186, 0.18);
  color: #778299;
}

.rework-row-link {
  color: var(--color-primary);
  font-weight: 600;
}

.rework-row-link + .rework-row-link {
  margin-left: 8px;
}

.rework-param-stack {
  display: grid;
  gap: 14px;
}

.rework-param-list-card {
  display: grid;
  gap: 0;
}

.rework-param-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #edf1f7;
  background: #fff;
}

.rework-param-table-shell {
  border: 0;
  border-radius: 0;
  max-height: 260px;
}

.rework-param-table {
  min-width: 980px;
}

.rework-param-table th,
.rework-param-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.rework-param-table input {
  min-height: 32px;
  padding: 6px 8px;
}

.rework-param-table .rework-variable-picker {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 6px;
  min-width: 260px;
}

.rework-param-table .rework-variable-picker .field-picker__link {
  min-width: 54px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
}

.rework-param-query-card {
  padding: 16px;
}

.rework-param-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rework-param-section-head--compact {
  margin-bottom: 12px;
}

.rework-param-section-title {
  margin: 0 0 12px;
  color: #25314e;
  font-size: 15px;
  font-weight: 700;
}

.rework-param-section-head .rework-param-section-title {
  margin-bottom: 0;
}

.rework-param-section-copy {
  margin: 6px 0 0;
  color: #7a879f;
  font-size: 13px;
  line-height: 1.6;
}

.rework-param-query-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.rework-param-query-block {
  display: grid;
  gap: 12px;
}

.rework-param-query-title {
  margin: 0;
  color: #44516d;
  font-size: 14px;
  font-weight: 700;
}

.rework-param-field {
  display: grid;
  gap: 7px;
  color: #4f5a73;
  font-size: 13px;
  font-weight: 600;
}

.rework-param-field--wide {
  grid-column: 1 / -1;
}

.rework-query-grid {
  display: grid;
  gap: 12px;
}

.rework-cross-table-shell {
  border-radius: 10px;
  max-height: 270px;
}

.rework-cross-table {
  min-width: 760px;
}

.rework-cross-table th,
.rework-cross-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.rework-cross-table th:first-child,
.rework-cross-table td:first-child {
  width: 58px;
  text-align: center;
}

.rework-cross-table input {
  min-height: 32px;
  padding: 6px 8px;
}

.rework-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  background: #d8deea;
}

.rework-toggle::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(33, 42, 63, 0.14);
}

.rework-toggle.is-on {
  justify-content: flex-end;
  background: #7fa0ff;
}

.rework-config-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
}

.rework-config-modal__footer .action-button {
  min-width: 96px;
}

.rework-delete-confirm-modal__panel {
  width: min(420px, calc(100vw - 32px));
  margin-top: 18vh;
}

.rework-delete-confirm-copy {
  margin: 0;
  color: #44516d;
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 1280px) {
  .rework-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rework-toolbar__right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .rework-param-query-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .rework-toolbar__left,
  .rework-range,
  .rework-range__fields {
    flex-wrap: wrap;
  }

  .rework-search,
  .rework-select-shell,
  .rework-date-field input {
    width: 100%;
    min-width: 0;
  }

  .rework-query-grid {
    grid-template-columns: 1fr;
  }
}
