/* Scoped styles: do not change existing Mercy Inventory styling. */
#searchHistoryPage .sh-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:14px 0; }
#searchHistoryPage .sh-toolbar h3 { margin-right:auto; }
#searchHistoryPage .sh-danger, #shDashboardClean { border:1px solid #b91c1c; color:#b91c1c; }
#searchHistoryPage .sh-danger:hover, #shDashboardClean:hover { background:#fef2f2; }
#searchHistoryPage .table-scroll { overflow-x:auto; }
#searchHistoryPage td, #searchHistoryPage th { overflow-wrap:anywhere; }
#searchHistoryPage td button { margin:2px; }
#searchHistoryPage #shFilter { width:min(100%,360px); padding:10px; }
#searchHistoryPage #shMessage { min-height:1.4em; }
#shDashboardClean { margin-top:16px; }

/* Admin Search History dashboard layout */
#searchHistoryPage .sh-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
#searchHistoryPage .sh-heading h2 { margin:0 0 8px; font-size:1.5rem; }
#searchHistoryPage .sh-heading p { margin:0 0 14px; color:#64748b; }
#searchHistoryPage .sh-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:14px 0 28px; }
#searchHistoryPage .sh-stats>div { padding:14px 12px; border-radius:10px; background:#f8fafc; min-width:0; }
#searchHistoryPage .sh-stats small { display:block; font-size:12px; color:#64748b; margin-bottom:8px; }
#searchHistoryPage .sh-stats strong { display:block; font-size:26px; line-height:1.2; font-weight:700; }
#searchHistoryPage .sh-toolbar { justify-content:flex-start; }
#searchHistoryPage #shUsers td:last-child { min-width:290px; }
@media(max-width:600px) {
  #searchHistoryPage .sh-stats { gap:7px; }
  #searchHistoryPage .sh-stats>div { padding:10px 7px; }
  #searchHistoryPage .sh-stats strong { font-size:20px; }
  #searchHistoryPage .sh-stats small { font-size:10px; }
}

/* Search History confirmation dialog (isolated to this add-on) */
.sh-confirm-overlay { position:fixed; inset:0; z-index:99999; background:rgba(15,23,42,.6); display:flex; align-items:center; justify-content:center; padding:18px; box-sizing:border-box; }
.sh-confirm-dialog { width:min(100%,460px); max-height:90vh; overflow:auto; background:#fff; color:#0f172a; border-radius:16px; padding:26px; box-sizing:border-box; box-shadow:0 24px 70px rgba(0,0,0,.3); }
.sh-confirm-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#fee2e2; color:#b91c1c; font-weight:800; font-size:23px; margin-bottom:14px; }
.sh-confirm-dialog h3 { margin:0 0 10px; font-size:21px; }
.sh-confirm-dialog p { white-space:pre-line; line-height:1.5; margin:0 0 16px; }
.sh-confirm-label { display:block; font-weight:600; font-size:14px; margin:12px 0 6px; }
.sh-confirm-dialog input { display:block; width:100%; box-sizing:border-box; padding:11px 12px; border:1px solid #94a3b8; border-radius:9px; font-size:16px; }
.sh-confirm-dialog [hidden] { display:none !important; }
.sh-confirm-error { color:#b91c1c; font-size:13px; margin-top:6px !important; }
.sh-confirm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; flex-wrap:wrap; }
.sh-confirm-actions button { padding:10px 16px; border-radius:9px; cursor:pointer; }
.sh-confirm-delete { border:1px solid #b91c1c; background:#b91c1c; color:white; font-weight:700; }
.sh-confirm-delete:disabled { opacity:.45; cursor:not-allowed; }
