
.pss-history-wrap{border:1px solid #ddd;border-radius:10px;padding:14px;background:#fff;max-width:980px}
.pss-history-search{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.pss-history-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pss-history-label{font-weight:600;white-space:nowrap}
.pss-history-input{position:relative;min-width:280px;flex:1}
.pss-history-q{width:100%;padding:10px 10px;border:1px solid #ccc;border-radius:8px}
.pss-history-show{padding:10px 14px;border:1px solid #222;border-radius:8px;background:#222;color:#fff;cursor:pointer}
.pss-history-reset{padding:10px 14px;border:1px solid #bbb;border-radius:8px;background:#f6f6f6;color:#111;cursor:pointer;margin-left:auto}
.pss-history-days{padding:9px;border-radius:8px;border:1px solid #ccc}
.pss-history-suggest{position:absolute;left:0;right:0;top:42px;background:#fff;border:1px solid #ccc;border-radius:8px;z-index:9999;display:none;max-height:260px;overflow:auto}
.pss-suggest-list{list-style:none;margin:0;padding:6px}
.pss-suggest-list li{padding:8px 10px;border-radius:6px;cursor:pointer}
.pss-suggest-list li:hover{background:#f3f3f3}
.pss-history-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:12px}
.pss-history-stats{display:flex;gap:16px;flex-wrap:wrap}
.pss-history-stats b{font-size:1.05em}
.pss-history-chart{margin-top:10px}
.pss-history-chart{position:relative}
.pss-history-canvas{display:block;width:100%}
.pss-history-table-wrap{margin-top:12px;overflow:auto}
.pss-history-table{width:100%;border-collapse:collapse}
.pss-history-table th,.pss-history-table td{border-bottom:1px solid #eee;padding:8px 10px;font-size:14px}
.pss-history-table th{text-align:left;background:#fafafa;position:sticky;top:0}
.pss-history-table td.num{text-align:right;font-variant-numeric:tabular-nums}
.pss-history-table td.neg{color:#d10000}
.pss-history-error{margin-top:10px;padding:10px;border:1px solid #f2a0a0;background:#fff4f4;border-radius:8px;color:#a00000}
.pss-history-note{margin-top:8px;color:#666}

/* Mobile adjustments */
@media (max-width: 600px){
  .pss-history-wrap{padding:12px}
  .pss-history-search{flex-direction:column;align-items:stretch}
  .pss-history-row{width:100%}
  .pss-history-input{min-width:0}
  .pss-history-q{width:100%}
  .pss-history-days{width:90px}
  .pss-history-show{flex:1}
  .pss-history-reset{width:100%}
  .pss-history-head{flex-direction:column;align-items:flex-start}
  .pss-history-title{font-size:16px;line-height:1.35}
  .pss-history-chart{height:240px}
  .pss-history-canvas{height:240px !important}
}

/* Desktop balance: keep controls on a single row like the reference */
@media (min-width: 601px){
  .pss-history-search{flex-wrap:nowrap;align-items:center}
  .pss-row-product{flex:1;min-width:0}
  .pss-history-input{min-width:0}
  .pss-row-actions{flex:0 0 auto;align-items:center}
  .pss-history-reset{margin-left:0}
}
