/* 작업 이력 (src/history.js) — 테두리 없는 카드·표, 상태는 작은 꼬리표 */
.hist-page{display:flex;flex-direction:column;gap:var(--layout-gap)}
.hist-note{color:var(--muted);font-size:13px}
.hist-card{background:var(--surface);border-radius:var(--layout-panel-radius);padding:22px 24px;min-width:0}
.hist-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.hist-head h2{margin:0;font:var(--type-panel-title)}
.hist-idx{font-size:11px;font-weight:500;color:var(--muted);margin-left:6px}
.hist-selects{display:flex;gap:8px}
.hist-selects select{font:inherit;font-size:12px;color:var(--secondary);background:var(--inset);border:0;border-radius:8px;padding:8px 10px}
.hist-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin-bottom:10px}
.hist-chips::-webkit-scrollbar{display:none}
.hist-chips button{flex:none;display:inline-flex;align-items:center;gap:6px;border:0;border-radius:var(--radius-pill);padding:7px 12px;font:inherit;font-size:12px;background:var(--inset);color:var(--secondary);cursor:pointer}
.hist-chips button small{font-size:10px;color:var(--muted)}
.hist-chips button[aria-pressed="true"]{background:var(--solid);color:var(--on-solid);font-weight:600}
.hist-chips button[aria-pressed="true"] small{color:inherit;opacity:.7}
.hist-error{font-size:12px;color:var(--danger)}
.hist-table{overflow-x:auto}
.hist-table table{width:100%;border-collapse:collapse;font-size:12px}
.hist-table th{font-weight:500;color:var(--muted);font-size:11px;text-align:left;padding:0 10px 10px;white-space:nowrap}
.hist-table td{padding:10px;border-top:1px solid var(--inset);vertical-align:top}
.hist-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.hist-table .mono{font-family:var(--font-mono);font-size:11px;white-space:nowrap}
.hist-table td small{color:var(--muted);font-size:11px}
.hist-ch{display:block;margin-top:2px}
.hist-st{display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;border-radius:var(--radius-pill);white-space:nowrap;background:var(--hover);color:var(--secondary)}
.hist-st.info{background:var(--accent-soft);color:var(--accent)}
.hist-st.good{background:var(--dot-ok-bg);color:var(--dot-ok-text)}
.hist-st.warn{background:var(--dot-warn-bg);color:var(--dot-warn-text)}
.hist-st.crit{background:var(--danger-bg);color:var(--danger)}
.hist-table details summary{cursor:pointer;color:var(--danger);font-size:11px}
.hist-err{margin:6px 0 0;font-size:11px;color:var(--secondary);white-space:pre-wrap;overflow-wrap:anywhere;max-width:420px}
td.hist-err{margin:0}
.hist-acts{white-space:nowrap}
.hist-acts-in{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}   /* 버튼 사이 띄우기(붙어 보이던 것) · 칸이 좁으면 줄 바꿈 */
.hist-acts button{border:0;border-radius:7px;padding:5px 9px;font:inherit;font-size:11px;background:var(--inset);color:var(--secondary);cursor:pointer;margin:0}
.hist-acts button.danger{background:var(--danger-bg);color:var(--danger)}
.hist-acts button:disabled{opacity:.5}
.hist-empty{text-align:center;color:var(--muted);padding:24px 10px}
@media(max-width:760px){.hist-card{padding:18px 16px}}
/* 오류 보기 — 표를 밀지 않고 누른 자리에 말풍선 */
.hist-pop{position:fixed;z-index:60;background:var(--surface);border-radius:14px;padding:12px;box-shadow:0 12px 34px #00000026}
.hist-pop-text{margin:0 0 10px;max-height:40vh;overflow:auto;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;color:color-mix(in srgb,var(--danger) 70%,var(--ink));background:color-mix(in srgb,var(--danger) 9%,var(--surface));border-radius:10px;padding:10px 12px}
.hist-pop.is-cancel .hist-pop-text{color:var(--secondary);background:var(--inset)}
.hist-pop-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;color:var(--muted)}
.hist-pop-foot button{flex:none;font:inherit;font-size:var(--button-small-font);font-weight:600;height:var(--button-small-height);padding:0 var(--button-small-pad-x);border:0;border-radius:var(--button-radius);background:var(--inset);color:var(--ink);cursor:pointer}
.hist-pop-tail{position:absolute;top:-6px;width:12px;height:12px;margin-left:-6px;background:var(--surface);transform:rotate(45deg);border-radius:2px}
.hist-pop.up .hist-pop-tail{top:auto;bottom:-6px}
/* 칸 폭 고정 — 쪽을 넘겨도 칸이 옆으로 움직이지 않게(자동 폭은 그 쪽 글자 길이에 맞춰 매번 달라진다) */
.hist-jobs{table-layout:fixed;width:100%;min-width:880px}
.hist-jobs .c-kind{width:12%}.hist-jobs .c-st{width:8%}.hist-jobs .c-try{width:6%}.hist-jobs .c-node{width:15%}
.hist-jobs .c-ago{width:9%}.hist-jobs .c-note{width:12%}.hist-jobs .c-acts{width:196px}
.hist-jobs td{overflow-wrap:anywhere}
/* 모든 칸 왼쪽 정렬(숫자는 폭만 고르게) · 줄 가운데 맞춤 */
.hist-table .tnum{font-variant-numeric:tabular-nums;white-space:nowrap}
.hist-jobs td{vertical-align:middle}
/* '오류 보기' · '취소 이유' — 상태 배지와 같은 계열의 연한 알약(누를 수 있게 조금 크고 진하게) */
.hist-why{display:inline-flex;align-items:center;gap:3px;height:26px;padding:0 9px 0 10px;border:0;border-radius:999px;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;
 background:color-mix(in srgb,var(--danger) 11%,var(--surface));color:var(--danger)}
.hist-why:hover,.hist-why[aria-expanded="true"]{background:color-mix(in srgb,var(--danger) 18%,var(--surface))}
.hist-why.is-cancel{background:var(--inset);color:var(--secondary)}
.hist-why.is-cancel:hover,.hist-why.is-cancel[aria-expanded="true"]{background:var(--hover);color:var(--ink)}
.hist-why svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.hist-why[aria-expanded="true"] svg{transform:rotate(180deg)}
.hist-prog{margin-left:6px;font-size:11px;color:var(--secondary)}
.hist-why.is-past{background:var(--inset);color:var(--muted)}.hist-why.is-past:hover,.hist-why.is-past[aria-expanded="true"]{background:var(--hover);color:var(--ink)}
.hist-acts button[data-act="cancel"]{color:var(--ink)}   /* 단계 멈춤은 검정, 작업 취소만 빨강 */
