.sales-filters{
  display:grid;
  grid-template-columns:minmax(180px,240px) minmax(220px,320px);
  gap:12px;
  margin:18px 0;
}

.sales-filters select{
  min-height:52px;
  padding:0 14px;
  border:1px solid #dce5e2;
  border-radius:14px;
  background:#fff;
  font:inherit;
}

.sales-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.sales-kpi{
  min-height:120px;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#fff;
  border:1px solid #dde6e3;
  border-radius:18px;
}

.sales-kpi span{
  color:#6d7a76;
  font-size:14px;
}

.sales-kpi strong{
  color:#102f2b;
  font-size:27px;
}

.sales-kpi small{
  color:#788681;
}

.sales-kpi.highlight{
  background:#edf5f2;
}

.sales-selected{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
  padding:16px;
  border-radius:18px;
  background:#183f39;
  color:#fff;
}

.sales-selected > div{
  padding:10px 14px;
  display:flex;
  flex-direction:column;
  gap:7px;
}

.sales-selected span{
  opacity:.72;
  font-size:13px;
}

.sales-selected strong{
  font-size:20px;
}

.sales-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.sales-panel{
  margin-bottom:16px;
  padding:20px;
  background:#fff;
  border:1px solid #dde6e3;
  border-radius:18px;
}

.sales-panel h3{
  margin:0 0 16px;
}

.sales-stat-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid #edf1ef;
}

.sales-stat-row:last-child{
  border-bottom:0;
}

.sales-stat-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.sales-stat-title small{
  color:#74827e;
}

.sales-stat-value{
  white-space:nowrap;
  font-weight:800;
}

.book-sales-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}

.book-sales-card{
  padding:15px;
  background:#f4f8f7;
  border-radius:14px;
}

.book-sales-card strong{
  display:block;
  margin-top:8px;
  font-size:25px;
}

.sales-note{
  color:#74827e;
  font-size:13px;
  line-height:1.9;
}

.sales-books{
  max-width:360px;
  white-space:normal;
  line-height:1.8;
}

.sales-amount{
  direction:ltr;
  white-space:nowrap;
  font-weight:800;
}

@media(max-width:1000px){
  .sales-kpis,
  .sales-selected{
    grid-template-columns:repeat(2,1fr);
  }

  .book-sales-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:700px){
  .sales-filters,
  .sales-grid,
  .sales-kpis,
  .sales-selected,
  .book-sales-grid{
    grid-template-columns:1fr;
  }

  .sales-table{
    min-width:900px;
  }
}

/* ===== SALES TREND ===== */

.sales-trend-panel{
  overflow:hidden;
}

.sales-trend-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.sales-trend-heading h3{
  margin:0 0 5px;
}

.sales-trend-heading small{
  color:#74827e;
}

.sales-trend-heading > strong{
  white-space:nowrap;
  color:#173f39;
  font-size:20px;
}

.sales-trend-chart{
  height:260px;
  display:flex;
  align-items:flex-end;
  gap:5px;
  padding:18px 8px 30px;
  border-radius:16px;
  background:#f5f8f7;
  overflow-x:auto;
}

.sales-trend-day{
  flex:1 0 18px;
  min-width:18px;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:center;
  position:relative;
}

.sales-trend-bar{
  width:100%;
  min-height:3px;
  border-radius:7px 7px 3px 3px;
  background:#214c45;
  transition:.15s ease;
  cursor:pointer;
}

.sales-trend-bar:hover{
  opacity:.72;
  transform:translateY(-2px);
}

.sales-trend-label{
  position:absolute;
  top:calc(100% + 8px);
  font-size:10px;
  color:#788681;
  white-space:nowrap;
}

@media(max-width:700px){

  .sales-trend-chart{
    min-height:230px;
  }

  .sales-trend-day{
    flex:0 0 22px;
  }
}
