/* Kullanım analizi (#/kullanim, client/usage.js). Tek seri mavi; ısı haritası tek renk açıktan koyuya (h1–h5). */
.uz {
  --uz-1: #2a78d6;
  --uz-h0: var(--soft);
  --uz-h1: #cde2fb;
  --uz-h2: #86b6ef;
  --uz-h3: #3987e5;
  --uz-h4: #1c5cab;
  --uz-h5: #0d366b;
  --uz-grid: var(--soft);
}
:root[data-theme='dark'] .uz {
  --uz-1: #3987e5;
  --uz-h1: #184f95;
  --uz-h2: #256abf;
  --uz-h3: #3987e5;
  --uz-h4: #6da7ec;
  --uz-h5: #b7d3f6;
  --uz-grid: #1f293d;
}
.uz .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.uz-scroll {
  overflow-x: auto;
  max-width: 100%;
}

/* Süzgeç satırı */
.uz-filters {
  gap: 8px;
}
.uz-filters input[type='date'] {
  width: auto;
  padding: 4px 8px;
}
.uz-filters select {
  width: auto;
  max-width: 220px;
  padding: 4px 8px;
}
.uz-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.uz .btn.sm {
  background: var(--card);
}
.uz .btn.sm:hover {
  background: var(--soft);
}
.uz .btn.on {
  background: var(--uz-1);
  border-color: var(--uz-1);
  color: #fff;
}
.uz-note {
  margin: 8px 2px 0;
}
#uz-body {
  transition: opacity 0.15s;
}
#uz-body.uz-busy {
  opacity: 0.55;
  pointer-events: none;
}

/* KPI kutuları */
.uz-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}
.uz-kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.uz-kl {
  font-size: 12px;
  color: var(--quiet);
}
.uz-kv {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.uz-ks {
  font-size: 12px;
  color: var(--quiet);
  overflow-wrap: anywhere;
}

/* Eğilim grafiği: sütunlar en çok 24px, uç yuvarlak, taban düz, aralarda 2px */
.uz-chart {
  display: flex;
  gap: 8px;
  height: 200px;
  margin: 18px 0 4px;
}
.uz-y {
  position: relative;
  width: 52px;
  flex: none;
  font-size: 11px;
  color: var(--quiet);
}
.uz-y span {
  position: absolute;
  right: 0;
  transform: translateY(50%);
  white-space: nowrap;
}
.uz-plot {
  position: relative;
  flex: 1;
  min-width: 0;
}
.uz-plot > i {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--uz-grid);
}
.uz-plot > i:last-of-type {
  background: var(--line);
}
.uz-cols {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
}
.uz-col {
  position: relative;
  flex: 1;
  min-width: 1px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  cursor: default;
}
.uz-col b {
  display: block;
  width: 100%;
  max-width: 24px;
  background: var(--uz-1);
  border-radius: 4px 4px 0 0;
}
.uz-col.uz-hot b {
  filter: brightness(1.15);
}
.uz-col.uz-hot {
  background: var(--soft);
}
.uz-col em {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -4px);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}
.uz-x {
  display: flex;
  justify-content: space-between;
  margin-left: 60px;
  font-size: 11px;
  color: var(--quiet);
}

/* Isı haritası */
.uz-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 2px 10px;
}
.uz-heat {
  display: grid;
  grid-template-columns: 34px repeat(24, minmax(16px, 1fr));
  gap: 2px;
  min-width: 460px;
  font-size: 11px;
}
.uz-heat i {
  display: block;
  height: 22px;
  border-radius: 3px;
}
.uz-hh {
  color: var(--quiet);
  text-align: left;
}
.uz-hd {
  color: var(--quiet);
  align-self: center;
}
.uz i.h0 {
  background: var(--uz-h0);
}
.uz i.h1 {
  background: var(--uz-h1);
}
.uz i.h2 {
  background: var(--uz-h2);
}
.uz i.h3 {
  background: var(--uz-h3);
}
.uz i.h4 {
  background: var(--uz-h4);
}
.uz i.h5 {
  background: var(--uz-h5);
}
.uz-heat i.uz-hot {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
}
.uz-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.uz-legend i {
  display: inline-block;
  width: 16px;
  height: 12px;
  border-radius: 2px;
}
.uz-l0 {
  margin-left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Tablo görünümü (grafiklerin altında açılır) */
.uz-tv {
  margin-top: 10px;
}
.uz-tv summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--quiet);
}
.uz-tv table {
  font-size: 12px;
  margin-top: 6px;
}
.uz-tv td,
.uz-tv th {
  padding: 3px 6px;
}
.uz-heat-t td,
.uz-heat-t th {
  padding: 2px 4px;
}

/* Kişi tablosu: ilk sütun yapışık, başlıklara tıklanınca sıralanır */
.uz-users {
  font-size: 13px;
}
.uz-users th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--head);
}
.uz-users th.on {
  color: var(--ink);
}
.uz-users th:first-child,
.uz-users td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--card);
  min-width: 160px;
}
.uz-users th:first-child {
  z-index: 2;
  background: var(--head);
}
.uz-users tbody tr {
  cursor: pointer;
}
.uz-users tbody tr:hover td {
  background: var(--soft);
}
.uz-users tr.uz-sel td {
  background: var(--chip);
}
.uz-users tr.uz-off td {
  opacity: 0.7;
}
.uz-on {
  color: var(--ok);
  font-weight: 600;
}
.uz-spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  height: 18px;
  width: 72px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.uz-spark i {
  flex: 1;
  background: var(--uz-1);
  border-radius: 1px 1px 0 0;
}

/* Çubuk listeleri */
.uz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 0 12px;
}
.uz-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.uz-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 4px;
  border-radius: 4px;
  font-size: 13px;
}
.uz-bar.uz-hot {
  background: var(--soft);
}
.uz-bl {
  min-width: 0;
}
.uz-bl span,
.uz-bl small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uz-bl small {
  color: var(--quiet);
  font-size: 11px;
}
.uz-bt {
  height: 14px;
}
.uz-bt i {
  display: block;
  height: 100%;
  background: var(--uz-1);
  border-radius: 0 4px 4px 0;
}
.uz-bv {
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.uz-dev {
  display: grid;
  gap: 10px;
}
.uz-sub {
  margin: 2px 4px 4px;
}

/* Olay akışı */
.uz-ev {
  font-size: 13px;
}
.uz-ev td {
  vertical-align: middle;
}
.ptitle .right select#uz-kind {
  width: auto;
  padding: 3px 6px;
  font-size: 12px;
}

/* İpucu */
.uz-tip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  max-width: 280px;
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--card);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.uz-tip b {
  display: block;
  font-size: 13px;
}
.uz-tip span {
  display: block;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .uz-chart {
    height: 160px;
  }
  .uz-y {
    width: 40px;
  }
  .uz-x {
    margin-left: 48px;
  }
  .uz-kv {
    font-size: 20px;
  }
}
