.v6-hidden {
  display: none !important;
}

.v6-visually-hidden-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.v6-interest-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--border, #d8e1ed);
  border-radius: 12px;
  background: #eef3f9;
}

.v6-interest-tabs a {
  padding: 9px 16px;
  border-radius: 9px;
  color: #526174;
  font-weight: 750;
  text-decoration: none;
}

.v6-interest-tabs a.active {
  background: #fff;
  color: #132238;
  box-shadow: 0 2px 8px rgba(18, 38, 63, .08);
}

.v6-previous-alliance-grid,
.v6-admin-filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, .42fr) minmax(240px, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.group-search-grid.v6-group-search-grid {
  grid-template-columns: minmax(240px, 1.6fr) minmax(130px, .55fr) minmax(190px, .85fr) auto !important;
}

.v6-score-line {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 5px 9px;
  border-radius: 9px;
  font-weight: 750;
  line-height: 1.25;
}

.v6-tier-regular {
  background: #eef2f7 !important;
  color: #526174 !important;
}

.v6-tier-medium {
  background: #e8f7ff !important;
  color: #087fb8 !important;
}

.v6-tier-advanced {
  background: #f0eaff !important;
  color: #7651d6 !important;
}

.v6-tier-elite {
  background: #fff4dc !important;
  color: #a96c00 !important;
}

.v6-tier-unscored {
  background: #f2f4f7 !important;
  color: #667085 !important;
}

.v6-score-audit {
  margin: 14px 0 4px;
  padding: 14px 16px;
  border: 1px solid #cbd9eb;
  border-radius: 12px;
  background: #f7fbff;
  color: #465872;
  line-height: 1.5;
}

.v6-score-audit strong {
  color: #132238;
}

.v6-threshold-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cdd8e7;
  border-radius: 14px;
  background: #f8fbff;
}

.v6-threshold-panel h3 {
  margin: 0 0 5px;
}

.v6-threshold-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.v6-threshold-option {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #d8e1ed;
  border-radius: 12px;
  background: #fff;
}

.v6-threshold-option.recommended {
  border-color: #7aa7ff;
  box-shadow: 0 0 0 2px rgba(44, 104, 230, .08);
}

.v6-threshold-option .btn {
  width: fit-content;
  margin-top: 8px;
}

.v6-admin-interest-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0 4px;
}

.v6-interest-manager {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.v6-interest-section {
  overflow: hidden;
  border: 1px solid var(--border, #d9e1ec);
  border-radius: 14px;
  background: #fff;
}

.v6-interest-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border, #d9e1ec);
  background: #f7f9fc;
}

.v6-interest-heading h3 {
  margin: 5px 0 0;
}

.v6-interest-heading small {
  display: block;
  margin-top: 4px;
  color: #66758b;
}

.v6-heading-actions,
.v6-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.v6-interest-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.15fr) minmax(240px, .9fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 18px;
  border-top: 1px solid #edf1f6;
}

.v6-interest-row:first-of-type {
  border-top: 0;
}

.v6-interest-row .v6-meta {
  display: block;
  margin-top: 3px;
  color: #66758b;
  font-size: 13px;
}

.v6-admin-original-table {
  display: none !important;
}

.v6-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(7, 17, 31, .28);
}

.v6-dialog::backdrop {
  background: rgba(7, 17, 31, .55);
  backdrop-filter: blur(2px);
}

.v6-dialog-inner {
  padding: 22px;
}

.v6-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.v6-dialog-head h2 {
  margin: 0;
}

.v6-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v6-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.v6-search-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.v6-search-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid #dbe4ef;
  border-radius: 11px;
  background: #fff;
}

.v6-search-result small {
  display: block;
  margin-top: 3px;
  color: #66758b;
}

.v6-danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e6ebf2;
}

.v6-help-note {
  margin-top: 8px;
  color: #66758b;
  font-size: 13px;
  line-height: 1.45;
}

.catalog-ranking-table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.catalog-ranking-table-wrap:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.catalog-ranking-table {
  min-width: 900px;
  font-size: 13px;
}

.catalog-ranking-table th,
.catalog-ranking-table td {
  padding: 9px 10px;
}

.catalog-ranking-table th:first-child,
.catalog-ranking-table td:first-child {
  width: 72px;
}

.catalog-ranking-table th:nth-child(2),
.catalog-ranking-table td:nth-child(2) {
  min-width: 145px;
}

.catalog-ranking-table td:nth-child(2) small {
  white-space: nowrap;
}

.catalog-ranking-table th:nth-child(4),
.catalog-ranking-table th:nth-child(5) {
  min-width: 75px;
}

@media (max-width: 900px) {
  .v6-previous-alliance-grid,
  .v6-admin-filter-grid,
  .v6-threshold-options,
  .v6-dialog-grid,
  .v6-interest-row {
    grid-template-columns: 1fr;
  }

  .group-search-grid.v6-group-search-grid {
    grid-template-columns: 1fr !important;
  }

  .v6-interest-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
