/* Separate historical analytics without touching current header and signal cards. */
#feed .mt-history-open{margin:9px 0 11px;padding:9px 13px;border-radius:9px;border:1px solid var(--border,#44546c);
  background:var(--surface,#263349);color:var(--text,#fff);font-weight:750;font-size:12px;cursor:pointer}
#mtHistoryDialog{box-sizing:border-box;width:min(96vw,900px);max-width:900px;max-height:93dvh;overflow:auto;
  border:1px solid var(--border,#35445b);border-radius:16px;padding:16px;
  background:var(--surface,#151d2b);color:var(--text,#f3f6fb);box-shadow:0 15px 75px #0008}
#mtHistoryDialog::backdrop{background:rgba(0,0,0,.82)}
#mtHistoryDialog .mt-hist-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
#mtHistoryDialog .mt-hist-head h2{margin:0;font-size:20px}
#mtHistoryDialog .mt-hist-head small{color:var(--muted,#a5b2c4);font-size:11px}
#mtHistoryDialog .mt-hist-head button{border:1px solid var(--border,#44546c);border-radius:8px;padding:8px 11px;
 background:var(--bg,#263349);color:var(--text,#fff)}
#mtHistoryDialog .mt-hist-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:17px 0 12px}
#mtHistoryDialog .mt-hist-controls label{display:flex;flex-direction:column;gap:5px;color:var(--muted,#a5b2c4);font-size:11px;min-width:0}
#mtHistoryDialog .mt-hist-controls input,#mtHistoryDialog .mt-hist-controls select{box-sizing:border-box;width:100%;min-width:0;
  background:var(--bg,#0e1520);border:1px solid var(--border,#43516a);border-radius:8px;padding:9px;color:var(--text,#fff)}
#mtHistoryDialog #mtHistStatus{font-size:11px;color:var(--muted,#a5b2c4);margin:8px 0}
#mtHistoryDialog .mt-hist-progress,#mtHistoryDialog .mt-hist-group{border:1px solid var(--border,#3a475d);
  background:var(--bg,#131b28);padding:12px;border-radius:12px;margin:10px 0}
#mtHistoryDialog .mt-hist-progress{display:grid;grid-template-columns:1fr auto;gap:6px}
#mtHistoryDialog .mt-hist-progress small{grid-column:1/-1;color:var(--muted,#a5b2c4);font-size:11px;line-height:1.5}
#mtHistoryDialog .mt-hist-bar{grid-column:1/-1;height:6px;background:#8092a344;border-radius:10px;overflow:hidden;min-width:55px}
#mtHistoryDialog .mt-hist-bar div{height:100%;background:#39b795;border-radius:10px}
#mtHistoryDialog .mt-hist-group h3{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 12px;font-size:14px}
#mtHistoryDialog .mt-hist-group h3 small{font-size:11px;color:var(--muted,#a5b2c4);font-weight:normal}
#mtHistoryDialog .mt-hist-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:13px}
#mtHistoryDialog .mt-hist-metrics>div{border:1px solid var(--border,#3a475d);border-radius:9px;display:flex;
 flex-direction:column;gap:3px;padding:10px}
#mtHistoryDialog .mt-hist-metrics small,#mtHistoryDialog .mt-hist-metrics span{color:var(--muted,#a5b2c4);font-size:11px}
#mtHistoryDialog .mt-hist-metrics strong{font-size:18px;color:#38b98a}
#mtHistoryDialog .mt-hist-metrics>div+div strong{color:#e37680}
#mtHistoryDialog .mt-hist-table{overflow-x:auto}
#mtHistoryDialog table{width:100%;border-collapse:collapse;font-size:11px;white-space:nowrap;text-align:left}
#mtHistoryDialog th,#mtHistoryDialog td{border-bottom:1px solid var(--border,#3a475d);padding:8px 6px}
#mtHistoryDialog th{color:var(--muted,#a5b2c4)}
#mtHistoryDialog td .mt-hist-bar{margin-top:4px}
#mtHistoryDialog .mt-hist-foot,#mtHistoryDialog .mt-hist-empty{color:var(--muted,#a5b2c4);font-size:11px;line-height:1.6}
@media(max-width:550px){#mtHistoryDialog{padding:11px}#mtHistoryDialog .mt-hist-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 #mtHistoryDialog .mt-hist-head h2{font-size:17px}}
