.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

.table-scrollbar {
  position: fixed;
  right: 18px;
  bottom: 0;
  left: 298px;
  z-index: 20;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 12px rgba(30, 35, 45, 0.08);
}

.sidebar-collapsed .table-scrollbar {
  left: 94px;
}

.table-scrollbar-inner {
  height: 1px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pagination-summary {
  min-width: 48px;
  color: #3f5573;
  font-weight: 600;
  white-space: nowrap;
}

.pagination-size-select,
.pagination-jump input,
.pagination-jump-button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  outline: 0;
  font-size: 12px;
}

.pagination-size-select {
  min-width: 98px;
  padding: 0 26px 0 10px;
}

.pagination-jump {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #3f5573;
  white-space: nowrap;
}

.pagination-jump label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pagination-jump input {
  width: 48px;
  padding: 0 6px;
  text-align: center;
}

.pagination-jump-button {
  padding: 0 10px;
  background: #f8fafc;
  color: #3157d5;
  font-weight: 600;
}

.pagination-jump-button:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.pagination-button,
.pagination-number {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 12px;
}

.pagination-button {
  background: #f8fafc;
}

.pagination-button:hover:not(:disabled),
.pagination-number:hover:not(.active) {
  border-color: #c7d2fe;
  color: #3157d5;
}

.pagination-button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  background: #f8fafc;
}

.pagination-number.active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3157d5;
  font-weight: 700;
}

.pagination-ellipsis {
  min-width: 14px;
  color: #94a3b8;
  text-align: center;
}

.pagination-button .inline-icon {
  width: 14px;
  height: 14px;
}

.pagination-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.actions > .pagination-inline:first-child {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1320px;
  table-layout: auto;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
}

td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

td:last-child {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

th {
  background: #fafafa;
  color: #526071;
  font-weight: 600;
}

.selection-cell {
  width: 42px;
  max-width: 42px;
  text-align: center;
}

.selection-checkbox {
  width: 15px;
  height: 15px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--primary);
}

.selected-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f9fbfd;
}

tfoot td {
  background: #f7f8fa;
  color: #1f2937;
  font-weight: 600;
  border-top: 1px solid var(--line);
}

.table-summary-row td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.table-row-warn {
  background: #fffbe6;
}

.table-row-danger {
  background: #fff1f0;
}

.log-row-failed {
  background: #fff7f7;
}

.log-row-danger {
  background: #fffaf0;
}

.log-level {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.log-level-failed {
  color: #cf1322;
  background: #fff1f0;
  border-color: #ffa39e;
}

.log-level-danger {
  color: #ad4e00;
  background: #fff7e6;
  border-color: #ffd591;
}

.log-level-important {
  color: #0958d9;
  background: #e6f4ff;
  border-color: #91caff;
}

.log-level-normal {
  color: #344054;
  background: #f8fafc;
  border-color: #d0d5dd;
}

.log-level-system {
  color: #531dab;
  background: #f9f0ff;
  border-color: #d3adf7;
}

.compact-table {
  min-width: 760px;
}

.status,
.role-tag,
.scope-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status.matched,
.status.active,
.status.success,
.status.resolved {
  background: #f6ffed;
  color: var(--success);
  border-color: #b7eb8f;
}

.status.pending,
.status.running {
  background: #fafafa;
  color: #8c8c8c;
  border-color: #d9d9d9;
}

.status.exception,
.status.open,
.status.failed {
  background: #fff1f0;
  color: var(--danger);
  border-color: #ffa39e;
}

.status.duplicate,
.status.paused {
  background: #f5f3ff;
  color: var(--purple);
  border-color: #ddd6fe;
}

.status.retake,
.status.processing {
  background: #fffbeb;
  color: #fa8c16;
  border-color: #ffd591;
}

.status.info {
  background: #e6f4ff;
  color: #0958d9;
  border-color: #91caff;
}

.status.warning {
  background: #fffbe6;
  color: #ad6800;
  border-color: #ffe58f;
}

.status.neutral {
  background: #f5f5f5;
  color: #595959;
  border-color: #d9d9d9;
}

.ops-summary-grid,
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.ops-summary-grid {
  grid-template-columns: minmax(320px, 1.3fr) minmax(280px, 1fr);
}

.ops-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 14px;
  min-width: 0;
}

.ops-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  margin-bottom: 12px;
}

.ops-card-head strong {
  font-size: 14px;
  line-height: 1.35;
}

.ops-card-head > span:not(.status) {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.ops-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ops-kv div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.ops-kv dt {
  color: var(--muted);
  font-size: 12px;
}

.ops-kv dd {
  margin: 0;
  min-width: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.ops-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ops-counts span {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafafa;
  padding: 10px 8px;
  text-align: center;
}

.ops-counts b,
.ops-counts small {
  display: block;
}

.ops-counts b {
  font-size: 20px;
  line-height: 1.1;
}

.ops-counts small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ops-card-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  min-height: 18px;
  word-break: break-word;
}
