.period-select {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 28px 7px 11px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236e7681' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.period-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.chart-placeholder {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 248px;
  display: flex;
  align-items: stretch;
  padding: 12px 16px;
  gap: 4px;
  overflow: hidden;
  position: relative;
}

.chart-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.chart-col-bars {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
}

.chart-bar {
  flex: 0 0 auto;
  border-radius: 3px 3px 0 0;
  min-width: 0;
  width: 100%;
  transition: opacity 0.15s;
  position: relative;
  cursor: pointer;
}

.chart-bar:hover { opacity: 0.8; }
.chart-bar:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 4px;
}

.chart-bar.success { background: linear-gradient(180deg, var(--accent) 0%, rgba(13,148,136,0.4) 100%); }
.chart-bar.error   { background: linear-gradient(180deg, var(--red)    0%, rgba(248,81,73,0.3)   100%); }

.chart-col-label {
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  font-size: 10.5px;
  line-height: 1;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-wrap {
  position: relative;
  padding-bottom: 24px;
}

.chart-y-grid {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.chart-y-line {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
}

.quota-bar-wrap {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.quota-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
}

.latency-bar {
  display: flex;
  height: 12px;
  border-radius: 3px;
  overflow: hidden;
  gap: 2px;
}

.latency-seg { border-radius: 2px; }
.latency-p50  { background: var(--accent); }
.latency-p95  { background: var(--amber); }
.latency-p99  { background: var(--red); }
