.ls-cleanup-history { margin-top:12px; font-size:.78rem; color:var(--text-primary); }
.ls-cleanup-history > summary { display:flex; align-items:center; justify-content:flex-end; gap:9px; padding:4px 0; cursor:pointer; list-style:none; color:var(--text-secondary); font-weight:600; }
.ls-cleanup-history > summary::-webkit-details-marker { display:none; }
.ls-cleanup-history > summary:focus-visible { outline:2px solid var(--accent-purple); outline-offset:3px; border-radius:5px; }
.ls-cleanup-history-icon { display:inline-grid; place-items:center; width:28px; height:28px; background:var(--bg-card); border:1px solid var(--border-color); border-radius:7px; font-size:20px; line-height:1; }
.ls-cleanup-history-icon::before { content:'+'; }
.ls-cleanup-history[open] .ls-cleanup-history-icon::before { content:'−'; }
#lsCleanupHistoryPanel { margin-top:8px; padding:12px; background:var(--bg-card); border:1px solid var(--border-color); border-radius:8px; }
.ls-cleanup-history-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--text-muted); }
.ls-cleanup-history-toolbar .btn { flex-shrink:0; }
.ls-cleanup-history-message { margin:12px 0 0; color:var(--text-muted); line-height:1.5; }
.ls-cleanup-history-message:empty { display:none; }
.ls-cleanup-history-message[data-error="true"] { color:var(--accent-red, #dc2626); }
.ls-cleanup-history-entries { list-style:none; padding:0; margin:10px 0 0; max-height:320px; overflow-y:auto; overscroll-behavior:contain; }
.ls-cleanup-history-entries:empty { display:none; }
.ls-cleanup-history-entry { display:grid; grid-template-columns:125px minmax(0, 1fr) auto; gap:8px 14px; padding:12px 2px; border-top:1px solid var(--border-color); align-items:start; }
.ls-cleanup-history-entry time { color:var(--text-muted); line-height:1.5; font-size:.73rem; }
.ls-cleanup-history-product { min-width:0; line-height:1.5; overflow-wrap:anywhere; }
.ls-cleanup-history-product strong { display:block; font-size:.8rem; }
.ls-cleanup-history-meta { color:var(--text-muted); font-size:.72rem; }
.ls-cleanup-history-result { text-align:right; font-size:.72rem; line-height:1.5; }
.ls-cleanup-history-action { display:block; font-weight:700; margin-bottom:4px; }
.ls-cleanup-history-badge { display:inline-block; padding:2px 7px; border-radius:5px; background:var(--bg-input); color:var(--text-secondary); }
.ls-cleanup-history-badge[data-status="accepted"] { background:rgba(16,185,129,.1); color:var(--accent-green, #047857); }
.ls-cleanup-history-badge[data-status="pending"] { background:rgba(245,158,11,.1); color:var(--accent-orange, #b45309); }
.ls-cleanup-history-badge[data-status="failed"] { background:rgba(239,68,68,.1); color:var(--accent-red, #dc2626); }
.ls-cleanup-history-note { margin-top:4px; color:var(--text-muted); font-size:.72rem; line-height:1.5; }
.ls-cleanup-history-footer { display:flex; justify-content:center; margin-top:10px; }
.ls-cleanup-history-footer:has(button[hidden]) { display:none; }
.ls-cleanup-history [hidden] { display:none !important; }
@media (max-width:600px) {
  .ls-cleanup-history-entry { grid-template-columns:minmax(0, 1fr) auto; gap:5px 8px; }
  .ls-cleanup-history-entry time { grid-column:1 / -1; }
  .ls-cleanup-history-toolbar { align-items:flex-start; }
  #lsCleanupHistoryPanel { padding:10px; }
}
