.system-break-rules-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  max-width: var(--system-admin-page-max-width, 1320px);
  padding: 18px 20px 96px;
}

.system-break-rules-workbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1e7;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.system-break-rules-summary {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

.system-break-rules-filters {
  align-items: end;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.system-break-rules-metric {
  align-items: center;
  background: #f5f8fa;
  border: 1px solid #d8e1e7;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
}

.system-break-rules-metric span,
.system-break-rules-search span,
.system-break-rules-filter span {
  color: #5b6b76;
  font-size: 12px;
  font-weight: 700;
}

.system-break-rules-metric strong {
  color: #1d2b34;
  font-size: 15px;
  font-weight: 800;
}

.system-break-rules-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.system-break-rules-search,
.system-break-rules-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.system-break-rules-search input,
.system-break-rules-filter select {
  background: #ffffff;
  border: 1px solid #c8d3db;
  border-radius: 6px;
  color: #1f2d36;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
}

.system-break-rules-search input {
  width: 260px;
}

.system-break-rules-search input:focus,
.system-break-rules-filter select:focus {
  border-color: #1f7a6c;
  box-shadow: 0 0 0 3px rgba(31, 122, 108, 0.16);
  outline: none;
}

.system-break-rules-icon-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

#newBreakRuleButton {
  order: 1;
}

#reloadBreakRulesButton {
  order: 2;
}

.system-break-rules-icon-button svg,
.system-break-rules-row-button svg,
.system-break-rules-dialog-close svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.system-break-rules-icon-button svg {
  height: 18px;
  width: 18px;
}

.system-break-rules-table-section {
  background: #ffffff;
  border: 1px solid #c8d3db;
  border-radius: 8px;
  overflow: hidden;
}

.system-break-rules-section-header {
  align-items: center;
  background: #eef6f3;
  border-bottom: 1px solid #c4d7d1;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.system-break-rules-section-header h2 {
  align-items: center;
  color: #173f38;
  display: flex;
  font-size: 17px;
  gap: 8px;
  margin: 0;
}

.system-break-rules-section-header h2::before {
  background: #1f7a6c;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 18px;
  width: 4px;
}

.system-break-rules-table-wrap {
  overflow-x: auto;
}

.system-break-rules-table {
  border-collapse: collapse;
  min-width: 900px;
  table-layout: fixed;
  width: 100%;
}

.system-break-rules-table th,
.system-break-rules-table td {
  border-bottom: 1px solid #d4dee5;
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
}

.system-break-rules-table th:not(:last-child),
.system-break-rules-table td:not(:last-child) {
  border-right: 1px solid #d4dee5;
}

.system-break-rules-table th {
  background: #f5f8fa;
  color: #4f606c;
  font-size: 12px;
  font-weight: 800;
  position: static;
  top: auto;
  vertical-align: middle;
  white-space: nowrap;
  z-index: auto;
}

.system-break-rules-table td {
  color: #22313b;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.system-break-rules-table th:nth-child(1),
.system-break-rules-table td:nth-child(1) {
  width: 190px;
}

.system-break-rules-table th:nth-child(2),
.system-break-rules-table td:nth-child(2) {
  width: 230px;
}

.system-break-rules-table th:nth-child(3),
.system-break-rules-table td:nth-child(3) {
  width: 170px;
}

.system-break-rules-table th:nth-child(4),
.system-break-rules-table td:nth-child(4) {
  width: 120px;
}

.system-break-rules-table th:nth-child(5),
.system-break-rules-table td:nth-child(5) {
  width: 82px;
}

.system-break-rules-table th:nth-child(6),
.system-break-rules-table td:nth-child(6) {
  width: 104px;
}

.system-break-rules-empty {
  color: #6a7882;
  height: 80px;
  text-align: center;
  vertical-align: middle;
}

.system-break-rules-badge {
  background: #eef3f6;
  border: 1px solid #cfdbe3;
  border-radius: 999px;
  color: #41525e;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.system-break-rules-badge.is-active {
  background: #e8f5f1;
  border-color: #9ccfc0;
  color: #166657;
}

.system-break-rules-badge.is-inactive {
  background: #f6eeee;
  border-color: #e1bcbc;
  color: #8b3434;
}

.system-break-rules-row-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.system-break-rules-row-button {
  align-items: center;
  background: #2c7892;
  border: 1px solid #25677d;
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.system-break-rules-row-button svg {
  height: 15px;
  width: 15px;
}

.system-break-rules-row-button:hover:not(:disabled) {
  background: #24677d;
  border-color: #205d72;
  color: #ffffff;
}

.system-break-rules-row-button:disabled {
  background: #f5f8fa;
  border-color: #e0e7ec;
  color: #9aa8b1;
  cursor: not-allowed;
}

.system-break-rules-dialog {
  border: 1px solid #c8d3db;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(24, 36, 44, 0.28);
  color: #22313b;
  max-width: 860px;
  padding: 0;
  width: min(860px, calc(100vw - 28px));
}

.system-break-rules-dialog::backdrop {
  background: rgba(18, 28, 35, 0.42);
}

.system-break-rules-dialog form {
  display: flex;
  flex-direction: column;
  max-height: min(760px, calc(100vh - 40px));
}

.system-break-rules-dialog-header,
.system-break-rules-dialog-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.system-break-rules-dialog-header {
  background: #eef6f3;
  border-bottom: 1px solid #d3e4df;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.system-break-rules-dialog-close {
  align-items: center;
  background: #2c7892;
  border: 1px solid #25677d;
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.system-break-rules-dialog-close svg {
  height: 17px;
  width: 17px;
}

.system-break-rules-dialog-close:hover {
  background: #24677d;
  border-color: #205d72;
  color: #ffffff;
}

.system-break-rules-dialog-close:focus {
  border-color: #205d72;
  outline: 2px solid #205d72;
  outline-offset: 2px;
}

.system-break-rules-dialog-header h2 {
  align-items: center;
  color: #173f38;
  display: flex;
  font-size: 17px;
  gap: 8px;
  margin: 0;
}

.system-break-rules-dialog-header h2::before {
  background: #1f7a6c;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 18px;
  width: 4px;
}

.system-break-rules-dialog-header p {
  color: #5b6b76;
  font-size: 13px;
  margin: 4px 0 0;
}

.system-break-rules-dialog-footer {
  border-top: 1px solid #edf1f4;
  justify-content: flex-end;
}

.system-break-rules-dialog-footer .status {
  align-items: center;
  background: #eef3f6;
  border: 1px solid #cfdbe3;
  border-radius: 999px;
  color: #41525e;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  max-width: min(360px, 58vw);
  min-height: 28px;
  overflow: hidden;
  padding: 6px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-break-rules-dialog-footer .status.error {
  background: #fff0ed;
  border-color: #e0aaa2;
  color: #9a3027;
}

.system-break-rules-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  padding: 14px 16px;
}

.system-break-rules-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-break-rules-field-wide {
  grid-column: span 2;
}

.system-break-rules-field,
.system-break-rules-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.system-break-rules-field span,
.system-break-rules-toggle span,
.system-break-rules-band-section h3 {
  color: #50616d;
  font-size: 12px;
  font-weight: 700;
}

.system-break-rules-field input,
.system-break-rules-field select {
  background: #ffffff;
  border: 1px solid #c8d3db;
  border-radius: 6px;
  color: #1f2d36;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
}

.system-break-rules-toggle {
  align-items: center;
  align-self: end;
  background: #f5f8fa;
  border: 1px solid #d8e1e7;
  border-radius: 6px;
  box-sizing: border-box;
  flex-direction: row;
  height: 38px;
  min-height: 38px;
  padding: 8px 10px;
}

.system-break-rules-toggle {
  display: none;
}

.system-break-rules-toggle input,
.system-break-rules-band-option input {
  height: 16px;
  margin: 0;
  width: 16px;
}

.system-break-rules-field input:focus,
.system-break-rules-toggle:focus-within {
  border-color: #1f7a6c;
  box-shadow: 0 0 0 3px rgba(31, 122, 108, 0.16);
  outline: none;
}

.system-break-rules-field input:invalid {
  border-color: #d25555;
}

.system-break-rules-band-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.system-break-rules-band-section header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.system-break-rules-band-section h3 {
  margin: 0;
}

.system-break-rules-band-rows {
  display: grid;
  gap: 8px;
}

.system-break-rules-band-row {
  align-items: end;
  background: #f8fafb;
  border: 1px solid #d8e1e7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 120px 120px minmax(120px, 1fr) minmax(120px, 1fr) minmax(140px, 1fr) 74px;
  padding: 10px;
}

.system-break-rules-band-option {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1e7;
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
}

@media (max-width: 900px) {
  .system-break-rules-workbar {
    align-items: stretch;
    flex-direction: column;
  }

  .system-break-rules-actions {
    align-items: stretch;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .system-break-rules-summary {
    flex-wrap: wrap;
  }

  .system-break-rules-filters {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .system-break-rules-search {
    flex: 1 1 260px;
  }

  .system-break-rules-search input {
    width: 100%;
  }

  .system-break-rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-break-rules-field-wide {
    grid-column: span 2;
  }

  .system-break-rules-band-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .system-break-rules-main {
    padding: 12px 12px 84px;
  }

  .system-break-rules-metric {
    flex: 1 1 120px;
  }

  .system-break-rules-actions button,
  .system-break-rules-filter {
    flex: 1 1 140px;
  }

  .system-break-rules-grid,
  .system-break-rules-band-row {
    grid-template-columns: 1fr;
  }

  .system-break-rules-field-wide {
    grid-column: auto;
  }
}
