/**
 * Kapela — Style : Historique des ventes
 * Auteur : Jacks Ngalangala
 */

/* Historique des ventes */
.hist2 {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.hpal {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surf);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.hpal .seg {
  flex-wrap: wrap;
}
.hsec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hchips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hchips.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hchip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  cursor: grab;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
}
.hchip:hover {
  border-color: var(--ink);
}
.hchip:active {
  cursor: grabbing;
}
.hchip.on {
  background: var(--dark);
  color: var(--dark-t);
  border-color: var(--dark);
}
.hchip.on small {
  color: var(--dark-m);
}
.hchip .grow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hchip small {
  color: var(--muted);
  font-size: 12px;
}
.hav {
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
  border: 2px solid var(--surf);
}
.hmi {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--line2);
  flex: none;
}
.hdrop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 14px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-card);
  background: var(--surf);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.hdrop.over {
  border-color: var(--acc);
  background: #f6e3d8;
}
.hdrop.has {
  border-style: solid;
}
.hhint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.hpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 6px 0 12px;
  border-radius: 999px;
  background: var(--dark);
  color: var(--dark-t);
  font-size: 13px;
  font-weight: 600;
  animation: hpop 0.18s ease-out;
}
.hpill small {
  color: var(--dark-m);
  font-weight: 500;
}
.hpill button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@keyframes hpop {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.hbar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
}
.hbar i {
  display: block;
  min-width: 4px;
}
.hleg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.hleg i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.hday {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surf);
  overflow: hidden;
}
.hdh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--line2);
  font-size: 13px;
}
.hdh b:first-child {
  text-transform: capitalize;
}
.hrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 0;
  border-top: 1px solid var(--line2);
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
  width: 100%;
}
.hrow:first-of-type {
  border-top: 0;
}
.hrow:hover,
.hrow.on {
  background: var(--bg);
}
.hrt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hppl {
  display: flex;
}
.hppl .hav + .hav {
  margin-left: -8px;
}
.hmeth {
  display: flex;
  gap: 4px;
  min-width: 56px;
  justify-content: flex-end;
}
.hdrawer {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(20, 16, 12, 0.35);
  display: flex;
  justify-content: flex-end;
}
.hdp {
  width: min(440px, 100%);
  height: 100%;
  overflow-y: auto;
  background: var(--surf);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: hslide 0.22s ease-out;
}
@keyframes hslide {
  from {
    transform: translateX(30px);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.hrec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  font-size: 14px;
}
.hsep {
  border-top: 1px dashed var(--line);
}
@media (max-width: 980px) {
  .hist2 {
    grid-template-columns: 1fr;
  }
  .hpal {
    position: static;
    max-height: none;
    gap: 12px;
    padding: 12px;
  }
  .hchips,
  .hchips.row2 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .hchip {
    flex: none;
  }
  .hpal .seg {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .hrow {
    gap: 10px;
    padding: 10px 12px;
  }
  .hppl {
    display: none;
  }
}

.hfocus {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.hfc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1.5px solid var(--acc);
  border-radius: var(--r-card);
  background: var(--surf);
}
.hfn {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.hfn span {
  display: flex;
  flex-direction: column;
}
.hfn b {
  font-size: 30px;
  line-height: 1;
}
.hfn small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.hq {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
