body {
  background: #f4f4f4;
}
.wrapper {
  max-width: 1200px;
  padding-inline: 20px;
}
.html-output {
  background-color: #f0f4ff;
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  white-space: pre;
  overflow: auto;
  height: auto !important;
  padding: 20px;
  line-height: 1.4;
  color: #2d3748;
}
.tab-content {
  border: 1px solid #dee2e6;
  border-top: none;
  padding: 20px;
  background-color: #fff;
}
.nav-tabs .nav-link.active {
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}
.button-group {
  margin-bottom: 15px;
}
.table-wrapper {
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 2rem;
  padding: 0;
  border: 1px solid #dee2e6;
}
.table-wrapper table {
  margin: 0;
}
#summary thead th, #summary-compare thead th {
  position: sticky;
  top: 0;
  background-color: #343a40;
  color: #fff;
  z-index: 10;
}
thead th {
  border: 1px solid #dee2e6 !important;
}
#summary tbody td:last-child, #summary-compare tbody td:last-child {
  white-space: nowrap;
}
.merge-with {
  letter-spacing: 0;
  padding: 0 6px 0 6px !important;
  counter-reset: css-counter 0;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
}
.merge-element {
  counter-increment: css-counter 1;
  margin-top: -1rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}
.merge-element::before {
  content: counter(css-counter);
  color: #666;
  margin-right: 1px;
  padding: 1px;
  width: 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  border: 1px outset #999;
  font-weight: normal;
  font-size: 11px;
  vertical-align: sub;
  position: relative;
  top: 0.5rem;
}
.merge-element + .merge-element {
  margin-left: 10px;
}
.copy-button, .refresh-button {
  position: relative;
  margin-bottom: 10px;
  margin-right: 8px;
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-button:hover, .refresh-button:hover {
  background-color: #f7fafc;
  border-color: #a0aec0;
}
.copy-button.copied {
  background-color: #48bb78;
  border-color: #38a169;
  color: white;
}
.compare-button {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  font-weight: 500;
  min-width: 215px;
  transition: all 0.2s;
}
.compare-button:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  color: white;
}
.compare-button:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.65;
}
.compare-button.loading {
  position: relative;
  color: transparent;
}
.compare-button.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.row-index {
  color: #666;
  font-weight: normal;
  font-style: italic;
  font-size: 0.8rem;
}
.row-index::before {
  content: '- ';
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2em;
}
.comparison-table th, .comparison-table td {
  border: 1px solid #ccc;
  padding: 0.4rem;
}
.comparison-table thead {
  background: #666;
  color: #ccc;
}
.comparison-table tbody {
  background: #fff;
}
.next-diff-row .cell-different, .comparison-legend .legend-color.cell-different {
  background-color: #fff8dc;
}
.next-diff-row .cell-different:nth-child(2), .next-diff-row .cell-different:nth-child(7), .comparison-legend .legend-color.manual-edit-needed {
  background-color: #ffd6cc !important;
}
.comparison-legend {
  border-left: 3px solid #ccc;
  margin: 1.5rem 0 0 0;
  padding: 0 0 4px 1rem;
}
.comparison-legend h5 {
  margin: 0 0 14px 0;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
}
.legend-items {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.popover-row-number {
  position: absolute;
  background-color: #464646;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.popover-row-number.show {
  opacity: 1;
}

/* ── v7.0.0 filter switch ────────────────────────────────────────── */
.filter-switch-container {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem 0;
  padding: 0.65rem 1.1rem 0.65rem 0.9rem;
  background: linear-gradient(135deg, #fff5f3 0%, #fff8f6 100%);
  border: 1px solid #f0c4b8;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease;
}
.filter-switch-container:has(#manualChangesFilter:checked) {
  box-shadow: 0 1px 6px rgba(194, 77, 46, 0.18);
  border-color: #d9826e;
}
.filter-switch-container .form-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
  min-height: unset;
}
.filter-switch-container .form-check-input {
  width: 2.75em;
  height: 1.45em;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  border-color: #c8c8c8;
  background-color: #e4e4e4;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}
.filter-switch-container .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(210, 90, 56, 0.22);
  border-color: #d9826e;
}
.filter-switch-container .form-check-input:checked {
  background-color: #d0512c;
  border-color: #b84424;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
.filter-switch-container .form-check-label {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  line-height: 1;
}
.filter-switch-label-text {
  font-size: 0.875rem;
  font-weight: 700;
  color: #3d2b25;
  letter-spacing: 0.01em;
}
.manual-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: #ffd6cc;
  border: 1.5px solid #d9967e;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.filter-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: #8a6255;
  background: rgba(255,255,255,0.7);
  border: 1px solid #f0c4b8;
  border-radius: 20px;
  padding: 0.1em 0.55em;
  white-space: nowrap;
}

/* ── v7.1.0 table route filter ───────────────────────────────────── */
.table-filter-bar {
  margin-bottom: 0.6rem;
}
.table-filter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 280px;
}
.table-filter-icon {
  position: absolute;
  left: 0.65rem;
  color: #999;
  font-size: 0.8rem;
  pointer-events: none;
}
.table-filter-input {
  padding-left: 2rem;
  padding-right: 4.5rem;
  height: 2.1rem;
  font-size: 0.875rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.table-filter-input:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
  outline: none;
}
.table-filter-input::-webkit-search-cancel-button {
  cursor: pointer;
}
.table-filter-count {
  position: absolute;
  right: 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 0.1em 0.5em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.table-filter-count.active {
  opacity: 1;
}

/* ── v8.0.0 service change inputs ────────────────────────────────── */
.service-input-label {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.4rem 0;
  color: #212529;
}
.input-example {
  font-weight: 400;
  color: #adb5bd;
  font-size: 0.8em;
  margin-left: 4px;
}

/* URL preview shown below each pair of inputs */
.url-preview {
  font-size: 0.75rem;
  color: #6c757d;
  font-family: monospace;
  margin-top: 0.4rem;
  min-height: 1.1rem;
  word-break: break-all;
}

/* Per-route fetch error row in summary tables */
.route-error-row td {
  background-color: #fff3cd;
}
.route-fetch-error {
  color: #856404;
  font-size: 0.875rem;
}
.route-fetch-error i {
  margin-right: 0.4rem;
}
