.cost-business-trends {
  --cbt-ink: var(--layout-text, #283e50);
  --cbt-muted: var(--layout-muted, #71808e);
  --cbt-line: var(--layout-border, #e5ebf0);
  --cbt-panel: var(--layout-panel, #fff);
  --cbt-soft: var(--el-fill-color-light, #f3f7fb);
  --cbt-accent: var(--brand-blue, #2f7bb2);
  display: grid;
  gap: 20px;
  min-width: 0;
  color: var(--cbt-ink);
}
.cbt-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 3px 0 2px; }
.cbt-eyebrow { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: var(--cbt-accent); }
.cbt-heading h1 { margin: 0 0 7px; font-size: 26px; line-height: 1.5; font-weight: 600; letter-spacing: -.4px; }
.cbt-heading p { margin: 0; font-size: 12px; color: var(--cbt-muted); line-height: 1.8; }
.cbt-heading-divider { margin: 0 12px; color: var(--cbt-line); }
.cbt-heading-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.cbt-heading-actions .el-button + .el-button { margin-left: 0; }
.cbt-heading-actions .el-button { min-height: 36px; padding: 9px 17px; }
.cost-business-trends .cbt-controls { padding: 0; overflow: hidden; }
.cbt-controls-heading { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--cbt-line); }
.cost-business-trends .cbt-controls-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.cbt-controls-heading > span { font-size: 12px; color: var(--cbt-muted); }
.cbt-controls-heading .cbt-baseline-tag { margin-left: auto; flex-shrink: 0; padding: 3px 10px; border-radius: 5px; background: var(--cbt-soft); color: var(--cbt-accent); font-size: 11px; }
.cbt-primary-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; padding: 20px 24px; }
.cbt-filter { display: grid; align-content: start; gap: 8px; min-width: 0; }
.cbt-filter label { font-size: 12px; font-weight: 500; color: var(--cbt-ink); }
.cbt-filter .el-select, .cbt-filter .el-date-editor.el-input { width: 100%; min-width: 0; }
.cbt-filter .el-select__wrapper, .cbt-filter .el-input__wrapper { min-height: 36px; }
.cbt-filter .el-date-editor .el-input__inner { font-variant-numeric: tabular-nums; cursor: pointer; }
.cbt-employee-picker { grid-column: span 2; }
.cbt-filter small { min-height: 16px; font-size: 11px; color: var(--cbt-muted); line-height: 1.5; font-variant-numeric: tabular-nums; }
.cbt-filter-notes { padding: 11px 24px; border-top: 1px solid var(--cbt-line); background: var(--cbt-soft); }
.cbt-filter-notes summary { width: fit-content; color: var(--cbt-muted); font-size: 11px; line-height: 1.8; cursor: pointer; }
.cbt-filter-notes summary:hover { color: var(--cbt-accent); }
.cbt-filter-notes-body { display: grid; gap: 8px; padding: 10px 0 2px; }
.cbt-allocation-note, .cbt-employee-note, .cbt-controls-description { margin: 0; color: var(--cbt-muted); font-size: 11px; line-height: 1.8; }
.cbt-allocation-note > span, .cbt-employee-note > span { margin-left: 5px; }
.cbt-employee-required { color: var(--el-color-warning, #9a7334); }
.cbt-controls-description > span { margin-left: 5px; }
.cbt-group-nav { display: flex; align-items: center; gap: 8px; position: sticky; top: 12px; z-index: 10; padding: 10px 12px; border: 1px solid var(--cbt-line); border-radius: 10px; background: var(--cbt-panel); box-shadow: 0 4px 14px rgb(27 64 95 / 4%); }
.cbt-nav-label { padding: 0 8px; color: var(--cbt-muted); font-size: 11px; white-space: nowrap; }
.cbt-group-nav button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 36px; padding: 7px 11px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--cbt-ink); font-size: 12px; white-space: nowrap; transition: background .15s, color .15s; }
.cbt-group-nav button:hover { background: var(--cbt-soft); color: var(--cbt-accent); border-color: var(--cbt-line); }
.cbt-group-nav button > span:first-child { color: var(--cbt-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.cbt-nav-arrow { margin-left: auto; color: var(--cbt-muted); font-size: 13px; }
.cbt-notice { padding: 11px 15px; border: 1px solid var(--cbt-line); border-radius: 8px; background: var(--cbt-soft); color: var(--cbt-muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.cbt-warning { border-color: var(--el-color-warning-light-8, #ede4d2); background: var(--el-color-warning-light-9, #fbf8f1); color: var(--el-color-warning, #8b7246); }
.cbt-comparison-group { display: grid; gap: 16px; min-width: 0; padding-top: 12px; margin-top: 2px; scroll-margin-top: 94px; }
.cbt-comparison-group + .cbt-comparison-group { padding-top: 25px; border-top: 1px solid var(--cbt-line); }
.cbt-comparison-group:focus { outline: none; }
.cbt-comparison-group:focus-visible .cbt-group-number { outline: 2px solid var(--cbt-accent); outline-offset: 3px; }
.cbt-group-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
.cbt-group-number { display: grid; place-items: center; flex-shrink: 0; width: 39px; height: 43px; border: 1px solid var(--cbt-line); border-radius: 8px; background: var(--cbt-panel); color: var(--cbt-accent); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cbt-group-title { flex: 1; min-width: 0; }
.cost-business-trends .cbt-group-heading h2 { margin: 0 0 3px; font-size: 18px; line-height: 1.5; font-weight: 600; }
.cbt-group-heading p { margin: 0; color: var(--cbt-muted); font-size: 12px; line-height: 1.8; }
.cbt-group-mapping { max-width: 32%; padding: 5px 10px; border: 1px solid var(--cbt-line); border-radius: 5px; color: var(--cbt-muted); font-size: 11px; line-height: 1.7; }
.cbt-first-level-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 17px; border: 1px solid var(--cbt-line); border-radius: 8px; background: var(--cbt-panel); }
.cbt-first-level-filter > label { flex-shrink: 0; font-size: 12px; font-weight: 500; }
.cbt-first-level-filter > .el-select { width: 320px; max-width: 100%; }
.cbt-first-level-filter > span { color: var(--cbt-muted); font-size: 11px; }
.cbt-charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.cost-business-trends .cbt-chart-panel { display: flex; flex-direction: column; padding: 18px 16px 12px; min-width: 0; overflow: hidden; }
.cbt-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 4px 12px; border-bottom: 1px solid var(--cbt-line); }
.cbt-chart-heading > div { min-width: 0; }
.cost-business-trends .cbt-chart-heading h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; color: var(--cbt-ink); font-size: 14px; font-weight: 600; line-height: 1.6; }
.cbt-metric-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 2px; background: #4578ad; }
.cbt-metric-dot.is-profit { background: #3a937b; }
.cbt-chart-heading p { margin: 0; font-size: 11px; line-height: 1.7; color: var(--cbt-muted); }
.cbt-chart-heading .el-button { flex-shrink: 0; padding: 5px 7px; height: 28px; font-size: 11px; color: var(--cbt-muted); }
.cbt-expand-icon { width: 15px; height: 15px; margin-right: 4px; }
.cbt-chart { width: 100%; height: 380px; min-width: 0; }
#cbt-group-company .cbt-chart-panel:not(.is-fullscreen) .cbt-chart { height: 520px; }
.cbt-chart-empty { display: flex; flex: 1; min-height: 380px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: var(--cbt-muted); font-size: 12px; line-height: 1.9; text-align: center; }
#cbt-group-company .cbt-chart-panel:not(.is-fullscreen) .cbt-chart-empty { min-height: 520px; }
.cbt-chart-empty strong { color: var(--cbt-ink); font-size: 15px; font-weight: 500; }
.cbt-chart-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 16px; margin-top: auto; padding: 10px 4px 0; border-top: 1px solid var(--cbt-line); color: var(--cbt-muted); font-size: 10px; line-height: 1.8; }
.cost-business-trends .cbt-chart-panel.is-fullscreen { position: fixed; inset: 16px; z-index: 2200; display: flex; flex-direction: column; padding: 22px 24px 16px; border: 1px solid var(--cbt-line); border-radius: 12px; background: var(--cbt-panel); box-shadow: 0 20px 100px #16394e33; }
.cost-business-trends .cbt-chart-panel.is-fullscreen .cbt-chart { flex: 1; height: auto; min-height: 240px; }
.cost-business-trends .cbt-chart-panel.is-fullscreen .cbt-chart-empty { flex: 1; min-height: 0; }
.cbt-chart-panel.is-fullscreen .cbt-chart-heading, .cbt-chart-panel.is-fullscreen .cbt-chart-foot { flex-shrink: 0; }
.cbt-monthly, .cbt-guide { min-width: 0; padding: 0 20px; }
.cbt-monthly summary, .cbt-guide summary { padding: 15px 0; color: var(--cbt-ink); font-size: 12px; font-weight: 500; cursor: pointer; }
.cbt-monthly summary::marker, .cbt-guide summary::marker { color: var(--cbt-muted); font-size: 10px; }
.cbt-monthly summary span, .cbt-guide summary span { margin-left: 14px; color: var(--cbt-muted); font-size: 11px; font-weight: 400; }
.cbt-table-scroll { overflow: auto; max-height: 440px; padding-bottom: 14px; }
.cbt-monthly table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 650px; font-size: 12px; }
.cbt-monthly th, .cbt-monthly td { padding: 11px 16px; border-bottom: 1px solid var(--cbt-line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cbt-monthly th:first-child { position: sticky; left: 0; z-index: 1; background: var(--cbt-panel); text-align: left; }
.cbt-monthly thead th { position: sticky; top: 0; z-index: 2; background: var(--cbt-soft); color: var(--cbt-muted); font-size: 11px; font-weight: 500; }
.cbt-monthly thead th:first-child { z-index: 3; background: var(--cbt-soft); }
.cbt-monthly tbody th { color: var(--cbt-muted); font-weight: 400; }
.cbt-monthly tbody tr:first-child, .cbt-monthly tbody tr:first-child th, .cbt-monthly tbody tr:hover, .cbt-monthly tbody tr:hover th { background: var(--cbt-soft); }
.cbt-guide { margin-top: 4px; }
.cbt-definition { padding: 0 0 17px; color: var(--cbt-muted); font-size: 12px; line-height: 1.9; }
.cbt-definition strong { display: block; margin-bottom: 5px; color: var(--cbt-ink); font-weight: 500; }
.cbt-definition p { margin: 0 0 7px; }
@media (max-width: 1279px) {
  .cbt-charts-grid { grid-template-columns: minmax(0, 1fr); }
  .cbt-group-nav { gap: 3px; padding: 8px; }
  .cbt-nav-label { display: none; }
  .cbt-group-nav button { padding: 7px 9px; }
  .cbt-nav-arrow { display: none; }
  .cbt-group-mapping { max-width: 34%; }
  .cbt-chart { height: 420px; }
}
@media (max-width: 900px) {
  .cbt-primary-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  .cbt-heading { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .cbt-group-heading { flex-wrap: wrap; }
  .cbt-group-mapping { max-width: 100%; margin-left: 52px; }
  .cbt-controls-heading > span:not(.cbt-baseline-tag) { display: none; }
  .cbt-group-nav { overflow-x: auto; }
  .cbt-group-nav button { flex: 0 0 auto; }
}
@media (max-width: 600px) {
  .cost-business-trends { gap: 16px; }
  .cbt-heading h1 { font-size: 23px; }
  .cbt-heading-divider { margin: 0 7px; }
  .cbt-heading p { font-size: 11px; }
  .cbt-heading-actions { justify-content: flex-start; }
  .cbt-heading-actions .el-button { min-height: 34px; padding: 8px 13px; font-size: 12px; }
  .cbt-controls-heading { gap: 8px; padding: 14px 16px; }
  .cbt-controls-heading .cbt-baseline-tag { padding: 3px 6px; font-size: 10px; }
  .cbt-primary-filters { padding: 16px; gap: 16px 12px; }
  .cbt-filter label { font-size: 11px; }
  .cbt-filter small { font-size: 10px; }
  .cbt-filter-notes { padding: 10px 16px; }
  .cbt-group-nav { top: 5px; }
  .cbt-comparison-group { gap: 12px; scroll-margin-top: 78px; }
  .cost-business-trends .cbt-group-heading h2 { font-size: 16px; }
  .cbt-group-heading p { font-size: 11px; }
  .cbt-group-number { width: 32px; height: 36px; font-size: 13px; }
  .cbt-group-mapping { margin-left: 45px; font-size: 10px; }
  .cbt-first-level-filter { gap: 9px; padding: 12px; }
  .cbt-first-level-filter > .el-select { width: 100%; }
  .cost-business-trends .cbt-chart-panel { padding: 14px 8px 10px; }
  .cbt-chart-heading { gap: 6px; }
  .cost-business-trends .cbt-chart-heading h3 { font-size: 12px; gap: 6px; }
  .cbt-chart-heading p { font-size: 10px; }
  .cbt-chart-heading .el-button { padding: 3px; font-size: 10px; }
  .cbt-expand-icon { display: none; }
  .cbt-chart { height: 340px; }
  #cbt-group-company .cbt-chart-panel:not(.is-fullscreen) .cbt-chart { height: 420px; }
  #cbt-group-company .cbt-chart-panel:not(.is-fullscreen) .cbt-chart-empty, .cbt-chart-empty { min-height: 320px; }
  .cbt-chart-foot { font-size: 10px; }
  .cost-business-trends .cbt-chart-panel.is-fullscreen { inset: 5px; padding: 14px 7px 10px; }
  .cbt-monthly, .cbt-guide { padding: 0 14px; }
  .cbt-monthly summary span, .cbt-guide summary span { display: block; margin: 4px 0 0 14px; font-size: 10px; }
}
@media (max-width: 420px) {
  .cbt-primary-filters { grid-template-columns: minmax(0, 1fr); }
  .cbt-employee-picker { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cbt-group-nav button { transition: none; }
}
