
.realtime-theme .horizontal-stats-chart {
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.realtime-theme .chart-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 2px;
}

.realtime-theme .chart-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.realtime-theme .chart-title-with-icon {
  display: flex;
  align-items: center;
  gap: 5px;
}

.realtime-theme .zoom-icon {
  flex-shrink: 0;
  color: #94A3B8;
}

.realtime-theme .chart-title {
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  white-space: nowrap;
}

.realtime-theme .zoom-mini-control {
  width: 110px;
  max-width: 110px;
  display: flex;
  align-items: center;
}

.realtime-theme .zoom-slider {
  width: 100%;
  height: 16px;
  margin: 0;
  appearance: none;
  background: transparent;
}

.realtime-theme .zoom-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
}

.realtime-theme .zoom-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 999px;
  background: #eb254d;
  border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.realtime-theme .zoom-slider::-moz-range-track {
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
}

.realtime-theme .zoom-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #eb254d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.realtime-theme .loading-badge {
  font-size: 9px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.realtime-theme .loading-badge-spinner {
  width: 8px;
  height: 8px;
  border: 1.5px solid #d97706;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.realtime-theme .chart-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 8px 4px;
  touch-action: none;
}

.realtime-theme .chart-body--draggable {
  cursor: grab;
}

.realtime-theme .chart-body--draggable:active {
  cursor: grabbing;
}

.realtime-theme .chart-body > div {
  width: 100%;
  height: 120px;
  max-height: 120px;
  min-height: 120px;
  overflow: hidden;
}

.realtime-theme .chart-scrollbar {
  flex-shrink: 0;
  position: relative;
  height: 4px;
  margin: 0 10px 6px;
  background: transparent;
  border-radius: 2px;
  overflow: visible;
}

.realtime-theme .chart-scrollbar-thumb {
  position: absolute;
  top: 0;
  height: 4px;
  background: #D1D5DB;
  border-radius: 2px;
  cursor: grab;
  transition: background 120ms ease;
  min-width: 24px;
}

.realtime-theme .chart-scrollbar-thumb:hover {
  background: #9CA3AF;
}

.realtime-theme .chart-scrollbar-thumb:active {
  cursor: grabbing;
}

.realtime-theme .uplot {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.realtime-theme .uplot canvas {
  image-rendering: crisp-edges;
  text-rendering: optimizeLegibility;
}

.realtime-theme .uplot .u-axis text {
  fill: #475569;
  font-size: 9px;
  font-weight: 500;
}

.realtime-theme .uplot .u-grid {
  display: none;
}

.realtime-theme .uplot .u-axis path,
.realtime-theme .uplot .u-axis line {
  stroke: #cbd5e1;
}

.realtime-theme .chart-loading-state,
.realtime-theme .chart-empty-state {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.realtime-theme .loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .realtime-theme .chart-header {
    padding: 6px 8px 2px;
  }

  .realtime-theme .zoom-mini-control {
    width: 92px;
    max-width: 92px;
  }

  .realtime-theme .chart-body {
    padding: 0 6px 4px;
  }

  .realtime-theme .chart-scrollbar {
    margin: 0 8px 6px;
  }

  .realtime-theme .chart-body > div,
  .realtime-theme .chart-loading-state,
  .realtime-theme .chart-empty-state {
    height: 120px;
    max-height: 120px;
  }
}