.streamer-history {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(30,43,64,.98), rgba(17,27,41,.98));
  padding: 14px;
}

.streamer-history__title {
  margin: 0;
  color: #fff3d4;
}

.streamer-history__subtitle {
  margin-top: 4px;
  margin-bottom: 12px;
  color: #9da3ba;
  font-size: .9rem;
}

.streamer-history__empty {
  opacity: 0.9;
  color: #9da3ba;
  padding: 8px 0 4px;
}

.streamer-history__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(7, 10, 15, .45);
}

.streamer-history__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.streamer-history__table th,
.streamer-history__table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  white-space: nowrap;
}

.streamer-history__table th {
  font-weight: 700;
  color: #d8dbe8;
  background: rgba(255,255,255,.03);
  position: sticky;
  top: 0;
  z-index: 1;
}

.streamer-history__table td {
  color: #e6edf7;
}

.streamer-history__table tbody tr:hover td {
  background: rgba(255,255,255,.03);
}

.streamer-history__num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.streamer-history__time {
  text-align: left !important;
}

.streamer-history__category {
  display: inline-flex;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(127,183,255,.4);
  background: rgba(127,183,255,.12);
  color: #dce8ff;
}

.streamer-history__category-cell {
  min-width: 260px;
}

.streamer-history__timeline {
  display: flex;
  width: 100%;
  min-width: 240px;
  max-width: 360px;
  height: 40px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.streamer-history__timeline-segment {
  display: block;
  min-width: 2px;
  background: var(--segment-color, #7fb7ff);
}

.streamer-history__timeline-segment + .streamer-history__timeline-segment {
  box-shadow: inset 1px 0 0 rgba(7, 10, 15, .55);
}

.streamer-history__timeline-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-width: 360px;
}

.streamer-history__timeline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #d8dbe8;
  font-size: .78rem;
  line-height: 1.2;
  border: 1px solid rgba(255,255,255,.08);
}

.streamer-history__timeline-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--segment-color, #7fb7ff);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

.streamer-history__tooltip {
  position: fixed;
  z-index: 9999;
  min-width: 240px;
  max-width: 340px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7, 10, 15, .96);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  padding: 10px 12px;
  color: #d8dbe8;
  pointer-events: none;
}

.streamer-history__tooltip-title {
  font-weight: 800;
  color: #eaf1ff;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(255,255,255,.12);
  padding-bottom: 6px;
}

.streamer-history__tooltip-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  line-height: 1.35;
  padding: 3px 0;
}

.streamer-history__tooltip-row.is-active {
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  padding-left: 6px;
  padding-right: 6px;
}

.streamer-history__tooltip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
}

.streamer-history__tooltip-avatar--fallback {
  display: block;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
}

.streamer-history__tooltip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tooltip-segment-color, #d8dbe8);
}

.streamer-history__tooltip-value {
  font-weight: 700;
  color: #f0f4ff;
}

.streamer-history__delta--up {
  color: #8df0b7;
  font-weight: 700;
}
