#storeView .drill-charts,
#categoryView .drill-charts,
#seriesView .drill-charts,
#skuView .drill-charts,
#storeView .final-drill-chart,
#categoryView .final-drill-chart,
#seriesView .final-drill-chart,
#skuView .final-drill-chart,
#storeView .scope-combo-chart,
#categoryView .scope-combo-chart,
#seriesView .scope-combo-chart,
#categoryView #catA,
#categoryView #catB,
#skuView .panel:has(#skuTrend) {
  display: none !important;
}

.unified-range-panel,
.unified-detail-combo {
  margin: 16px 0;
}

.unified-range-panel canvas,
.unified-detail-combo canvas {
  display: block;
  width: 100%;
  height: 250px;
  padding: 10px 16px;
}

.unified-range-panel .analysis-text,
.unified-detail-combo .analysis-text {
  padding: 10px 18px;
  border-top: 1px solid #dce3e8;
  color: #40515c;
  background: #f4f8f9;
  font-size: 12px;
  line-height: 1.7;
}

.unified-detail-combo .analysis-text strong {
  display: block;
  margin-bottom: 4px;
  color: #173d52;
  font-size: 13px;
}

.unified-detail-combo .analysis-text div + div {
  margin-top: 3px;
}

.unified-range-panel .analysis-text:empty,
.unified-detail-combo .analysis-text:empty {
  display: none;
}

#storeView .kpi,
#categoryView .kpi,
#seriesView .kpi,
#skuView .kpi {
  position: relative;
  cursor: pointer;
}

#storeView .kpi.metric-active,
#categoryView .kpi.metric-active,
#seriesView .kpi.metric-active,
#skuView .kpi.metric-active {
  border-color: #146c94;
  box-shadow: 0 0 0 1px #146c94;
}

.metric-detail-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid #b9c8d2;
  border-radius: 50%;
  color: #146c94;
  background: #f7fafb;
  font: 20px/25px Arial, sans-serif;
  box-shadow: 0 1px 3px rgba(25,45,58,.12);
  cursor: pointer;
}

.metric-detail-icon:hover {
  color: #fff;
  background: #146c94;
  transform: scale(1.08);
}

#storeRows tr.detail-selected td,
#skuRows tr.detail-selected td {
  background: #eef7fa;
}

.row-drill-cell {
  position: relative;
  width: 52px;
  overflow: visible;
  text-align: center !important;
}

.row-drill-actions {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
}

.row-drill-actions::before {
  content: "⌕";
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid #b9c8d2;
  border-radius: 50%;
  color: #146c94;
  background: #f7fafb;
  font: 20px/26px Arial, sans-serif;
  box-shadow: 0 1px 3px rgba(25,45,58,.12);
}

.row-drill-menu {
  position: absolute;
  right: 0;
  bottom: 32px;
  z-index: 50;
  display: flex;
  gap: 6px;
  padding: 7px;
  border: 1px solid #cbd5dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(25,45,58,.18);
  opacity: 0;
  visibility: hidden;
  transform: scale(.85);
  transform-origin: right bottom;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.row-drill-actions:hover .row-drill-menu,
.row-drill-actions:focus-within .row-drill-menu {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.row-drill-menu button.sku-drill-icon {
  position: static !important;
  width: auto !important;
  min-width: 54px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 5px !important;
  color: #fff !important;
  font: 13px/30px "Microsoft YaHei", sans-serif !important;
  transform: none !important;
}

.row-drill-menu .to-category { background: #2f9b70 !important; }
.row-drill-menu .to-series { background: #c39129 !important; }

.unified-detail-combo .legend {
  justify-content: flex-start;
}

.unified-share-inline {
  color: #087a72;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#platformCards strong .unified-share-inline,
#categoryCards strong .unified-share-inline,
#seriesCards strong .unified-share-inline {
  margin-left: 3px;
}

#categoryCards .final-share-value,
#seriesCards .final-share-value {
  display: none !important;
}

@media(max-width:900px) {
  .unified-range-panel canvas,
  .unified-detail-combo canvas { height: 220px; }
}
