/* HFR 전용 데이터 그리드
   각 열은 독립된 col 너비를 가지며, 열 조절 시 표 전체 폭만 변경됩니다. */
.hfr-grid-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: auto !important;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  background: #fff;
  box-shadow: inset -16px 0 14px -18px rgba(20, 53, 88, 0.55);
}

.hfr-data-grid {
  width: var(--hfr-grid-width) !important;
  min-width: var(--hfr-grid-width) !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-variant-numeric: tabular-nums;
}

.hfr-data-grid th,
.hfr-data-grid td {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 38px;
  padding: 8px 10px !important;
  overflow: hidden !important;
  border-right: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e7edf4 !important;
  color: #24364b;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.hfr-data-grid thead th {
  position: sticky !important;
  top: 0;
  z-index: 3;
  height: 40px;
  padding-right: 21px !important;
  border-top: 1px solid #cbd8e7 !important;
  border-bottom: 1px solid #b8c9dc !important;
  background: linear-gradient(180deg, #f7faff 0%, #e8f0f8 100%) !important;
  color: #173a60 !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: none !important;
  cursor: pointer;
  user-select: none;
}

.hfr-data-grid thead th:first-child,
.hfr-data-grid tbody td:first-child {
  border-left: 1px solid #d7e1ec !important;
}

.hfr-data-grid tbody tr:nth-child(even) td {
  background: #f8fbfe;
}

.hfr-data-grid tbody tr:hover td {
  background: #eef6ff;
}

.hfr-data-grid tbody tr:focus-within td {
  background: #e8f3ff;
}

.hfr-data-grid td .rs-cell-text {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hfr-grid-heading {
  display: inline;
  min-width: 0;
}

.hfr-grid-sort {
  display: inline-block;
  min-width: 11px;
  margin-left: 5px;
  color: #1764ad;
  font-size: 9px;
  vertical-align: 1px;
}

.hfr-data-grid th.is-sorted {
  background: linear-gradient(180deg, #edf6ff 0%, #d9eafb 100%) !important;
  color: #0b5596 !important;
}

.hfr-grid-resize {
  position: absolute;
  top: 0;
  right: -7px;
  z-index: 6;
  width: 15px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.hfr-grid-resize::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  border-radius: 2px;
  background: #aebfd1;
  transition: width 120ms ease, background 120ms ease;
}

.hfr-data-grid th:hover .hfr-grid-resize::after,
.hfr-grid-resize:hover::after,
.hfr-grid-resize:focus-visible::after,
.is-hfr-grid-resizing .hfr-grid-resize::after {
  width: 3px;
  background: #1773c7;
}

.hfr-grid-resize:focus-visible {
  outline: 2px solid #2b7fd0;
  outline-offset: -3px;
}

body.is-hfr-grid-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

.hfr-data-grid.is-hfr-grid-resizing thead th {
  cursor: col-resize;
}

.hfr-grid-tooltip {
  position: fixed;
  z-index: 30020;
  display: grid;
  gap: 2px;
  min-width: 205px;
  padding: 9px 11px;
  border: 1px solid rgba(13, 75, 136, 0.18);
  border-radius: 7px;
  background: rgba(12, 43, 78, 0.96);
  color: #fff;
  box-shadow: 0 10px 26px rgba(11, 35, 64, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 100ms ease, transform 100ms ease;
}

.hfr-grid-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hfr-grid-tooltip b {
  font-size: 12px;
}

.hfr-grid-tooltip span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
}

.hfr-grid-shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.hfr-grid-shell::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #aebfd0;
}

.hfr-grid-shell::-webkit-scrollbar-track {
  background: #edf2f7;
}

@media (max-width: 720px) {
  .hfr-data-grid th,
  .hfr-data-grid td {
    height: 36px;
    padding: 7px 9px !important;
    font-size: 11px;
  }

  .hfr-grid-shell {
    -webkit-overflow-scrolling: touch;
  }
}