:root{color-scheme:dark}
html{width:100%;height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth}
body.history-page{display:block;width:100%;height:auto;min-height:100vh;margin:0;overflow-x:hidden;overflow-y:visible;background:#0a0f17;color:#e8eef8}
.history-page .brand{color:#f3f5fa}
.history-page .brand-mark{background:linear-gradient(145deg,#8f9dff,#6674dc);color:#fff;box-shadow:0 8px 24px rgba(101,116,220,.28),inset 0 1px 0 rgba(255,255,255,.28)}
.history-topbar{height:68px;padding:0 clamp(18px,4vw,56px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #28364a;background:rgba(10,15,23,.92);position:sticky;top:0;z-index:20;backdrop-filter:blur(16px)}
.history-back{color:#aab7ca;text-decoration:none;font-size:14px;font-weight:750}
.history-back:hover{color:#fff}
.history-page .history-main{display:block;width:min(1180px,calc(100% - 36px));height:auto;min-height:calc(100vh - 68px);margin:0 auto;padding:54px 0 80px;overflow:visible}
.history-intro{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);gap:28px;align-items:end}
.history-kicker{margin:0 0 10px;color:#8096ff;font-size:12px;font-weight:850;letter-spacing:.12em}
.history-intro h1{margin:0;color:#f1f5fb;font-size:clamp(34px,5vw,50px);line-height:1.1;letter-spacing:-.045em}
.history-intro>div>p:last-child{max-width:700px;margin:15px 0 0;color:#9fadc0;line-height:1.7}
.qa-notice{padding:17px 18px;border:1px solid #34445d;border-radius:15px;background:#121c2b}
.qa-notice strong,.qa-notice span{display:block}
.qa-notice strong{margin-bottom:6px;color:#f0c36c;font-size:14px}
.qa-notice span{color:#9fadc0;font-size:12px;line-height:1.55}
.history-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:34px 0 18px}
.history-summary article{display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:16px 18px;border:1px solid #2c3a4f;border-radius:14px;background:#111a27}
.history-summary span{color:#9fadc0;font-size:13px}
.history-summary strong{font-size:22px}
.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px}
.history-filters,.history-tools{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.history-filters button,.refresh-button,.page-size-select,.history-pagination button{min-height:38px;padding:0 14px;border:1px solid #33435a;border-radius:10px;background:#111a27;color:#aebbd0;font-weight:760}
.history-filters button.active{border-color:#778cff;background:#263662;color:#fff}
.refresh-button:hover,.history-filters button:hover,.history-pagination button:hover:not(:disabled){border-color:#7489ee;color:#fff}
.page-size-label{color:#8f9db2;font-size:12px}
.page-size-select{padding:0 30px 0 11px;color:#e7edf7}
.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0;color:#9eacc0;font-size:13px}
.history-pagination>div{display:flex;align-items:center;gap:9px}
.history-pagination button{min-width:68px}
.history-pagination button:disabled{opacity:.35}
.page-indicator{min-width:58px;color:#e8eef8;text-align:center}
.history-pagination-bottom{margin-top:15px;padding-top:18px;border-top:1px solid #253348}
.history-list{display:grid;gap:13px}
.history-list[aria-busy="true"]{opacity:.55}
.history-card{border:1px solid #2c3a4f;border-radius:17px;background:#111925;overflow:hidden}
.history-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:15px 17px;border-bottom:1px solid #253348}
.history-identity{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
.history-number{color:#8ba0ff;font-size:16px;font-weight:900}
.history-meta{display:flex;flex-wrap:wrap;gap:6px 12px;color:#8f9db2;font-size:11px}
.history-status{min-width:116px;height:36px;padding:0 9px;border:1px solid #3a4a60;border-radius:9px;background:#0d1520;color:#e7edf7;font-weight:720}
.history-card-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.history-pane{min-width:0;padding:17px}
.history-pane+.history-pane{border-left:1px solid #253348}
.history-pane h2{margin:0 0 10px;color:#b9c7db;font-size:12px}
.history-text{min-height:116px;max-height:none;margin:0;padding:14px;border:1px solid #29384e;border-radius:12px;background:#0c1420;color:#e4eaf3;font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;overflow:visible}
.history-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:12px 17px;border-top:1px solid #253348;color:#8e9db3;font-size:11px}
.detected-list{display:flex;flex-wrap:wrap;gap:6px}
.detected-chip{padding:4px 7px;border:1px solid #3d4f69;border-radius:999px;background:#182538;color:#bed0e8}
.review-badges{display:flex;gap:6px;white-space:nowrap}
.review-badge{padding:4px 7px;border-radius:7px;background:#182233}
.history-empty{padding:70px 20px;border:1px dashed #34445a;border-radius:16px;text-align:center;color:#8f9eb2}
.history-toast{position:fixed;left:50%;bottom:24px;z-index:50;transform:translate(-50%,16px);padding:10px 14px;border-radius:10px;background:#eef3fb;color:#142033;font-size:13px;font-weight:750;opacity:0;pointer-events:none;transition:.18s}
.history-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:760px){
  .history-topbar{height:60px;padding:0 15px}
  .history-page .history-main{width:calc(100% - 24px);min-height:calc(100vh - 60px);padding:30px 0 55px}
  .history-intro{grid-template-columns:1fr;gap:18px}
  .history-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:24px}
  .history-summary article{min-height:58px;padding:13px}
  .history-toolbar{align-items:stretch;flex-direction:column}
  .history-filters,.history-tools{width:100%}
  .history-filters button{flex:1 1 auto}
  .history-tools{justify-content:flex-end}
  .history-filters button,.refresh-button,.page-size-select{min-height:36px;padding:0 10px;font-size:12px}
  .history-pagination{align-items:flex-start;flex-direction:column;gap:8px}
  .history-pagination>div{width:100%}
  .history-pagination button{flex:1}
  .page-indicator{flex:0 0 68px}
  .history-card-head{flex-direction:column}
  .history-status{width:100%}
  .history-card-body{grid-template-columns:1fr}
  .history-pane+.history-pane{border-top:1px solid #253348;border-left:0}
  .history-footer{grid-template-columns:1fr}
  .review-badges{white-space:normal;flex-wrap:wrap}
  .history-text{min-height:100px;font-size:12px}
}
