.cmp-main [hidden], #benchmarkDialog [hidden] { display: none !important; }
.cmp-main, .cmp-card, #compareResults { min-width: 0; }
.cmp-main .input, .cmp-main .select { font-size: 14px; min-height: 36px; }
.cmp-main .fund-search-meta { margin-top: 8px; }
.cmp-selected-head, .cmp-run-row, .cmp-actions, .cmp-range, .cmp-inline, .cmp-holding-toolbar, .cmp-chart-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmp-selected-head { justify-content: space-between; margin: 16px 0 10px; }
.cmp-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 50px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.cmp-selected-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px 8px 10px; max-width: 100%; box-sizing: border-box; font-size: 13px; }
.cmp-selected-name { min-width: 0; overflow-wrap: anywhere; }
.cmp-selected-item small { display: block; color: #64748b; font-size: 11px; margin-top: 3px; }
.cmp-selected-meta { display: flex; align-items: center; gap: 6px; min-height: 20px; margin-top: 3px; }
.cmp-selected-item .cmp-selected-meta small { margin: 0; }
.cmp-selected-item .bt-color { flex-shrink: 0; }
.cmp-selected-empty { width: 100%; color: var(--subtext); font-size: 13px; padding: 4px 0; text-align: center; }
.cmp-range { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.cmp-range .label { margin: 0; }
.cmp-range > .select { width: 140px; }
.cmp-dates { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; min-width: 0; }
.cmp-dates label { color: #64748b; font-size: 12px; min-width: 0; }
.cmp-dates .input { display: block; margin-top: 5px; width: 155px; max-width: 100%; box-sizing: border-box; }
.cmp-run-row { margin-top: 16px; justify-content: space-between; }
.cmp-run-row > .hint { margin: 0; flex: 1; min-width: 180px; }
.cmp-actions button { min-height: 38px; }
.cmp-main button:disabled { opacity: .45; cursor: default; }
.cmp-tabs { margin: 0 0 14px; flex-wrap: wrap; gap: 6px; }
.cmp-chart-toolbar, .cmp-holding-toolbar { justify-content: space-between; margin-bottom: 14px; }
.cmp-chart-toolbar .cmp-tabs, .cmp-holding-toolbar .cmp-tabs { margin: 0; }
.cmp-chart-toolbar .bt-benchmark { width: 300px; max-width: 100%; }
.cmp-report-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; white-space: nowrap; }
.cmp-report-label .select { max-width: 180px; width: auto; min-width: 0; }
.cmp-inline { margin-bottom: 12px; }
.cmp-inline .select { width: auto; }
.cmp-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #64748b; }
.cmp-note { margin: 12px 0 0; line-height: 1.8; font-size: 12px; }
.cmp-notice { padding: 9px 12px; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 12px; line-height: 1.7; margin: 0 0 12px; }
.cmp-table { --label-width: 148px; --fund-width: 175px; width: 100%; table-layout: fixed; min-width: calc(var(--label-width) + var(--count) * var(--fund-width)); font-variant-numeric: tabular-nums; }
.cmp-table col:first-child { width: var(--label-width); }
.cmp-table th, .cmp-table td { box-sizing: border-box; padding: 7px 10px; line-height: 20px; vertical-align: middle; overflow-wrap: anywhere; white-space: normal; }
.cmp-table thead th { height: 72px; padding-top: 8px; padding-bottom: 8px; }
.cmp-table tbody tr { height: var(--cmp-row-height, 56px); }
.cmp-stage-table { --label-width: 88px; --period-width: 216px; min-width: calc(var(--label-width) + var(--period-width) + var(--count) * var(--fund-width)); }
.cmp-stage-table col:nth-child(2) { width: var(--period-width); }
.cmp-stage-table tbody td:nth-child(2) { white-space: nowrap; }
.cmp-table tbody th { font-weight: 500; background: #fff; }
.cmp-table tbody tr:last-child th { border-bottom: none; }
.cmp-table th:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.cmp-table thead th:first-child { background: #f8fafc; z-index: 2; }
.cmp-table small { display: block; color: #7b8799; font-size: 11px; line-height: 16px; margin-top: 2px; font-weight: 400; }
.cmp-fund-heading { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 18px; }
.cmp-fund-heading .bt-color { margin-right: 5px; }
.cmp-fund-meta { display: flex; justify-content: center; align-items: center; gap: 5px; height: 16px; margin-top: 2px; }
.cmp-table .cmp-fund-meta small { margin: 0; }
.cmp-fund-meta .ccb-tag { box-sizing: border-box; height: 16px; min-width: 16px; padding: 0 3px; font-size: 10px; }
.cmp-main [data-ccb-code]:empty { display: none; }
.cmp-main [data-ccb-code] { display: inline-flex; }
.cmp-long-cell { text-align: left !important; line-height: 1.8; }
.cmp-loading { min-height: 100px; display: grid; place-items: center; font-size: 13px; color: #7b8799; padding: 14px; text-align: center; }
.cmp-corr-label { max-width: 150px; }
.fund-compare-page .info-tip[data-tip]::after { right: 0; left: auto; transform: none; text-align: left; width: min(360px, calc(100vw - 64px)); overflow-wrap: anywhere; }
.cmp-main .bt-result-meta { font-size: 12px; line-height: 1.7; }
@media(max-width:767px) {
  .cmp-run-row { align-items: stretch; flex-direction: column; }
  .cmp-actions { justify-content: flex-end; }
  .cmp-actions button { flex: 1; }
  .cmp-selected-item { width: 100%; }
  .cmp-selected-name { flex: 1; }
  .cmp-chart-toolbar .bt-benchmark { width: 100%; }
  .cmp-dates { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .cmp-dates .input { width: 100%; }
  .cmp-dates > button { justify-self: start; }
  .cmp-table { --label-width: 116px; --fund-width: 140px; }
  .cmp-stage-table { --label-width: 76px; }
  .cmp-table th, .cmp-table td { padding-left: 8px; padding-right: 8px; }
  .cmp-table thead th { font-size: 12px; }
  .cmp-report-label { width: 100%; }
  .cmp-report-label .select { flex: 1; max-width: 220px; }
}
