.history-launch{display:flex;justify-content:flex-end;margin-bottom:-7px}
#history-open{display:flex;align-items:center;gap:7px;background:transparent;border-color:#394452;color:#bbcadb;font-size:11px;min-height:40px;padding:7px 11px}
#history-open:hover{background:#243343;border-color:#688bac;color:#e1edfa}
#history-open span:first-child{font-size:17px;color:#91b8df}
#history-dialog{padding:0;width:min(1040px,calc(100vw - 40px));height:min(820px,calc(100dvh - 48px));max-width:none;max-height:none;background:#171b21;color:var(--text);border:1px solid #47515f;border-radius:17px;box-shadow:0 24px 90px #0008;overflow:hidden}
#history-dialog[open]{display:flex;flex-direction:column}
#history-dialog::backdrop{background:#070a10b8;backdrop-filter:blur(5px)}
.history-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:23px 26px 19px;border-bottom:1px solid #35404e;background:linear-gradient(115deg,#232e3d,#20252e 70%);flex-shrink:0}
.history-head .eyebrow{color:#98bce0;font-size:10px;margin-bottom:5px}
.history-head h2{font-size:24px;letter-spacing:-.8px;line-height:1.4;margin:0}
#history-close{font-size:25px;line-height:1;width:42px;height:42px;padding:5px;flex-shrink:0;background:#ffffff07}
.history-overview{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 24px;border-bottom:1px solid var(--line);flex-shrink:0}
.history-overview p{font-size:12px;color:#b2bdcc;margin:0;line-height:1.8;white-space:pre-line}
#history-refresh{font-size:11px;padding:8px 10px;flex-shrink:0;background:transparent}
#history-message{font-size:12px;color:#d6b489;margin:0;padding:0 24px;flex-shrink:0}
#history-message:not(:empty){padding-top:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.history-body{display:grid;grid-template-columns:290px minmax(0,1fr);flex:1;min-height:0;overflow:hidden}
#history-runs{overflow-y:auto;padding:14px;border-right:1px solid var(--line);background:#14181e;min-height:0;scrollbar-width:thin;scrollbar-color:#475362 transparent}
.history-run{display:block;text-align:left;width:100%;padding:14px;margin-bottom:8px;background:transparent;border:1px solid transparent;border-radius:10px}
.history-run[aria-pressed=true]{background:#253446;border-color:#617e9e;box-shadow:0 5px 18px #0002}
.history-run-time{display:block;color:#9db5ce;font-size:11px;font-variant-numeric:tabular-nums;line-height:1.6;margin-bottom:6px}
.history-run-title{display:block;color:#e3e9f1;font-size:13px;font-weight:650;line-height:1.65;word-break:keep-all;overflow-wrap:anywhere}
.history-run-status{display:block;color:#acb4bf;font-size:10px;margin-top:8px;line-height:1.5}
#history-detail{padding:27px 30px 35px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#475362 transparent;min-width:0;min-height:0;outline-offset:-3px}
.history-detail-time{color:#9db5ce;font-size:11px;line-height:1.8;margin:0 0 9px;font-variant-numeric:tabular-nums}
#history-detail h3{font-size:23px;line-height:1.5;letter-spacing:-.6px;margin:0 0 12px;word-break:keep-all;overflow-wrap:anywhere}
.history-summary{font-size:14px;color:#c4cedb;line-height:1.9;margin:0 0 18px}
.history-badges{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:24px}
.history-badge{font-size:11px;line-height:1.5;color:#d9e9f9;border:1px solid #445f7b;background:#233447;border-radius:5px;padding:5px 8px}
.history-badge[data-state=completed_with_followup],.history-badge[data-state=partial],.history-badge[data-state=pending]{color:#edcfa6;border-color:#786346;background:#392f23}
.history-badge[data-state=failed]{color:#f1b6b2;border-color:#815350;background:#3b2728}
.history-section{border-top:1px solid #343d48;padding-top:18px;margin-top:21px}
.history-section h4{font-size:13px;line-height:1.6;color:#e6ecf4;margin:0 0 11px;font-weight:700}
.history-section ul{padding-left:18px;margin:0}
.history-section li,.history-section p{font-size:12px;line-height:1.9;color:#b7c1cf;overflow-wrap:anywhere}
.history-section li{margin-bottom:9px;padding-left:2px}
.history-check{margin:10px 0;padding:12px 14px;background:#20262e;border:1px solid #343e4b;border-radius:7px}
.history-check-head{display:flex;align-items:flex-start;gap:10px;justify-content:space-between}
.history-check strong{font-size:12px;font-weight:600;line-height:1.6}
.history-check .history-badge{flex-shrink:0;font-size:10px;padding:3px 6px}
.history-check p{margin:8px 0 0}
.history-footer{font-size:10px;color:#939eac;padding:10px 24px;border-top:1px solid var(--line);flex-shrink:0;line-height:1.6}
@media(max-width:700px){#history-dialog{width:calc(100vw - 16px);height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:12px}.history-head{padding:17px}.history-head h2{font-size:21px}.history-overview{padding:10px 16px;gap:8px}.history-overview p{font-size:11px}.history-body{grid-template-columns:minmax(0,1fr);grid-template-rows:130px minmax(0,1fr)}#history-runs{display:flex;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid var(--line);padding:9px;gap:8px}.history-run{flex:0 0 216px;width:216px;margin:0;padding:10px 12px}.history-run-time{font-size:10px;margin-bottom:3px}.history-run-title{font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.history-run-status{margin-top:5px;font-size:10px}#history-detail{padding:20px 18px 27px}#history-detail h3{font-size:21px}.history-summary{font-size:13px}.history-footer{padding:9px 16px;font-size:10px}#history-message{padding-right:16px;padding-left:16px}.history-badges{margin-bottom:18px}}
@media(max-height:500px){.history-head{padding:10px 17px}.history-head h2{font-size:20px}.history-head .eyebrow{display:none}.history-overview{padding:4px 16px}.history-footer{padding:5px 16px}#history-detail{padding:16px 20px}.history-body{grid-template-columns:230px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}#history-runs{display:block;overflow:auto;border-right:1px solid var(--line);border-bottom:0}.history-run{width:100%;margin-bottom:6px}.history-launch{margin-bottom:0}}
