/* =========================================================
   Laporan — pemilih periode, kartu angka, grafik harian, peringkat menu
   ========================================================= */

/* ---------- Pemilih periode ---------- */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.segmented__btn {
  min-height: 46px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  transition: background 0.16s ease, color 0.16s ease;
}

.segmented__btn.is-active {
  background: linear-gradient(160deg, var(--red-bright), var(--red-deep));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.periode-label {
  margin: -8px 2px 14px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ---------- Kartu angka ---------- */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  padding: 14px 15px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sm);
}

.stat--utama {
  grid-column: 1 / -1;
  background: linear-gradient(150deg, #2E2320 0%, #241B1A 60%, #201717 100%);
  border-color: var(--line-strong);
}

.stat__label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.stat--utama .stat__label { color: var(--gold-dim); }

.stat__value {
  display: block;
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.stat--utama .stat__value { font-size: 30px; color: var(--gold); }

.stat__note {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ---------- Grafik harian ---------- */
.daychart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 122px;
  padding: 12px 12px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

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

.daychart__bar {
  width: 100%;
  max-width: 26px;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.daychart__col--kosong .daychart__bar { background: var(--surface-3); }

.daychart__col--puncak .daychart__bar {
  background: linear-gradient(180deg, #F4C463, var(--gold));
  box-shadow: 0 0 14px rgba(232, 176, 75, 0.35);
}

.daychart__tick {
  font-size: 9.5px;
  font-family: var(--font-num);
  color: var(--text-dim);
  white-space: nowrap;
}

/* ---------- Peringkat menu ---------- */
.rank { display: flex; flex-direction: column; gap: 3px; }

.rank__row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 11px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rank__row--juara { border-color: var(--line-strong); background: linear-gradient(120deg, #2A211C, var(--surface)); }

.rank__pos {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dim);
}
.rank__row--juara .rank__pos { background: var(--gold); color: #241A08; }

.rank__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rank__name { font-size: 14px; font-weight: 700; }
.rank__name small { font-size: 10px; font-weight: 700; color: var(--red-bright); letter-spacing: 0.08em; margin-left: 6px; }

.rank__qty {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.rank__qty span { font-size: 10.5px; font-weight: 600; color: var(--text-dim); margin-left: 3px; }

.rank__bar {
  height: 5px;
  margin: 7px 0 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.rank__bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red-bright), var(--gold));
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.rank__omzet { font-family: var(--font-num); font-size: 11.5px; color: var(--text-dim); }

/* ---------- Riwayat transaksi ---------- */
.riwayat { display: flex; flex-direction: column; gap: 3px; }

.riwayat__item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.riwayat__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 9px 12px;
  text-align: left;
}

.riwayat__no {
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}

.riwayat__ringkas { min-width: 0; }
.riwayat__ringkas b { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.riwayat__ringkas small { font-family: var(--font-num); font-size: 11px; color: var(--text-dim); }

.riwayat__total { font-family: var(--font-num); font-size: 14.5px; font-weight: 800; color: var(--text); white-space: nowrap; }

.riwayat__detail {
  display: none;
  padding: 4px 12px 12px;
  border-top: 1px dashed var(--line);
}
.riwayat__item.is-open .riwayat__detail { display: block; }

.riwayat__baris {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-mid);
}
.riwayat__baris span:last-child { font-family: var(--font-num); color: var(--text); }

.riwayat__aksi { display: flex; gap: 8px; margin-top: 10px; }
