:root {
  --hlc-atlas-border: #d7dbe1;
  --hlc-atlas-muted: #6b7280;
  --hlc-atlas-surface: #f8fafc;
  --hlc-atlas-surface-2: #ffffff;
  --hlc-atlas-accent: #111827;
  --hlc-atlas-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --hlc-atlas-max-height: 70vh;
}

.hlc-atlas-v4-app {
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
}

.hlc-atlas-v4-shell {
  border: 1px solid var(--hlc-atlas-border);
  background: var(--hlc-atlas-surface-2);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--hlc-atlas-shadow);
}

.hlc-atlas-v4-toolbar,
.hlc-atlas-v4-ranges,
.hlc-atlas-v4-actions {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.hlc-atlas-v4-toolbar {
  grid-template-columns: 2fr 1.25fr 1.25fr;
}

.hlc-atlas-v4-ranges {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hlc-atlas-v4-search label,
.hlc-atlas-v4-selects,
.hlc-atlas-v4-sort,
.hlc-atlas-v4-range-group {
  display: grid;
  gap: 8px;
}

.hlc-atlas-v4-selects,
.hlc-atlas-v4-sort {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.hlc-atlas-v4-selects label,
.hlc-atlas-v4-sort label,
.hlc-atlas-v4-search label,
.hlc-atlas-v4-range-group label {
  display: grid;
  gap: 6px;
}

.hlc-atlas-v4-range-group {
  border: 1px solid var(--hlc-atlas-border);
  border-radius: 14px;
  padding: 12px;
  background: var(--hlc-atlas-surface);
}

.hlc-atlas-v4-range-title,
.hlc-atlas-v4-search span,
.hlc-atlas-v4-selects span,
.hlc-atlas-v4-sort span {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.hlc-atlas-v4-app input,
.hlc-atlas-v4-app select,
.hlc-atlas-v4-app button {
  font: inherit;
}

.hlc-atlas-v4-app input,
.hlc-atlas-v4-app select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--hlc-atlas-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  box-sizing: border-box;
}

.hlc-atlas-v4-actions {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.hlc-atlas-v4-reset,
.hlc-atlas-v4-pagination button,
.hlc-atlas-v4-link {
  border: 1px solid var(--hlc-atlas-border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.hlc-atlas-v4-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 600;
  text-align: left;
}

.hlc-atlas-v4-summary,
.hlc-atlas-v4-note,
.hlc-atlas-v4-muted {
  color: var(--hlc-atlas-muted);
}

.hlc-atlas-v4-content {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  gap: 16px;
}

.hlc-atlas-v4-table-wrap,
.hlc-atlas-v4-detail {
  border: 1px solid var(--hlc-atlas-border);
  border-radius: 16px;
  background: var(--hlc-atlas-surface-2);
  overflow: auto;
  max-height: var(--hlc-atlas-max-height);
}

.hlc-atlas-v4-detail {
  padding: 16px;
}

.hlc-atlas-v4-table {
  width: 100%;
  border-collapse: collapse;
}

.hlc-atlas-v4-table thead th {
  position: sticky;
  top: 0;
  background: var(--hlc-atlas-surface);
  z-index: 1;
  font-size: 12px;
  text-align: left;
}

.hlc-atlas-v4-table th,
.hlc-atlas-v4-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hlc-atlas-border);
  vertical-align: middle;
}

.hlc-atlas-v4-table tbody tr {
  cursor: pointer;
}

.hlc-atlas-v4-table tbody tr:hover,
.hlc-atlas-v4-table tbody tr.is-selected {
  background: #f3f6fa;
}

.hlc-atlas-v4-swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  display: inline-block;
  vertical-align: middle;
}

.hlc-atlas-v4-swatch.large {
  width: 54px;
  height: 54px;
}

.hlc-atlas-v4-detail-swatch {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.hlc-atlas-v4-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.hlc-atlas-v4-detail-grid dt {
  font-size: 12px;
  color: var(--hlc-atlas-muted);
}

.hlc-atlas-v4-detail-grid dd {
  margin: 0;
  font-weight: 600;
}

.hlc-atlas-v4-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hlc-atlas-v4-pagination button.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

@media (max-width: 1100px) {
  .hlc-atlas-v4-toolbar,
  .hlc-atlas-v4-ranges,
  .hlc-atlas-v4-content {
    grid-template-columns: 1fr;
  }

  .hlc-atlas-v4-selects,
  .hlc-atlas-v4-sort,
  .hlc-atlas-v4-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .hlc-atlas-v4-shell {
    padding: 14px;
  }

  .hlc-atlas-v4-selects,
  .hlc-atlas-v4-sort,
  .hlc-atlas-v4-detail-grid {
    grid-template-columns: 1fr;
  }

  .hlc-atlas-v4-actions {
    grid-template-columns: 1fr;
  }
}
