/* ../../../../../../Views/Tenant/ChartCode.css */
.codes {
  --s1: #4f7cff;
  --s2: #f59e0b;
  --s3: #10b981;
  --s4: #ec4899;
  --s5: #8b5cf6;
  --other: #0891b2;
}
@media (prefers-color-scheme: dark) {
  .codes {
    --s1: #6b93ff;
    --s2: #fbbf24;
    --s3: #34d399;
    --s4: #f472b6;
    --s5: #a78bfa;
    --other: #22d3ee;
  }
}
.page .codes.card {
  width: auto;
  margin-inline: calc(50% - (100vw - var(--side-offset, 0px)) / 2 + 32px);
  padding: 24px;
  margin-bottom: 24px;
}
.codes .month {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 12px;
}
.codes .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.codes .legend .item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.codes .legend .item.off {
  opacity: 0.45;
}
.codes .legend .item.off .swatch {
  background: var(--text-muted);
}
.codes .legend strong {
  font-weight: 650;
}
.codes .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.codes .s1 {
  fill: var(--s1);
  background: var(--s1);
}
.codes .s2 {
  fill: var(--s2);
  background: var(--s2);
}
.codes .s3 {
  fill: var(--s3);
  background: var(--s3);
}
.codes .s4 {
  fill: var(--s4);
  background: var(--s4);
}
.codes .s5 {
  fill: var(--s5);
  background: var(--s5);
}
.codes .other {
  fill: var(--other);
  background: var(--other);
}
.codes .plot {
  width: 100%;
}
.codes .chart {
  display: block;
}
.codes .chart .grid {
  stroke: var(--card-border);
  stroke-width: 1;
}
.codes .chart .base {
  stroke: var(--text-muted);
  stroke-width: 1;
}
.codes .chart .axis {
  font-size: 11px;
  fill: var(--text-muted);
}
.codes .chart .axis.now {
  fill: var(--accent);
  font-weight: 700;
}
.codes .chart .today {
  fill: var(--icon-bg);
}
.codes .chart .bar:hover {
  opacity: 0.75;
}
.codes .empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.codes .loading {
  display: flex;
  justify-content: center;
  padding: 48px;
}
.codes .loading svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
