.shopao-history-trigger{height:32px;padding:0 10px;border:1px solid #e5e7eb!important;border-radius:4px;background:#fff;color:#444;font-size:13px;white-space:nowrap;cursor:pointer}
.shopao-history-mobile-trigger{position:fixed;right:8px;top:12px;z-index:100}
.shopao-mobile-recent-trigger::before{content:'≡'!important}
.shopao-mobile-recent-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.shopao-mobile-recent-list .shopao-task-card{border:0;background:transparent;padding:0;min-width:0;text-align:left}
.shopao-mobile-recent-list b{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px}
.shopao-task-history-rail .shopao-recent-item{width:64px;border:0;padding:0;background:transparent;cursor:pointer}
.shopao-task-history-rail .shopao-recent-item>b{display:block;font-size:10px;font-weight:400;color:#747780;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px}
.shopao-task-thumb{position:relative;display:block!important;width:100%;aspect-ratio:1;background:#f3f4f6;border:1px solid #e9ebef;border-radius:4px;overflow:hidden}
.shopao-task-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.shopao-task-status{position:absolute;bottom:0;left:0;right:0;display:block;padding:3px 0;text-align:center;font-size:11px;font-style:normal;color:#3e4249;background:#e9ecef}
.shopao-task-status.processing{color:#536b9e;background:#e8eefb}
.shopao-task-status.failed{color:#a43f4a;background:#fdecef}
.shopao-task-status.succeeded{color:#287a64;background:#e1f2ec}
.shopao-task-message{font-size:12px;color:#7a7f87;line-height:1.6;overflow-wrap:anywhere;margin:8px 0}
.shopao-task-history-panel,.shopao-task-detail{box-sizing:border-box;letter-spacing:0;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#262930;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;padding:0;max-height:calc(100dvh - 40px);max-width:calc(100vw - 32px)}
.shopao-task-history-panel::backdrop,.shopao-task-detail::backdrop{background:rgba(0,0,0,.35)}
.shopao-task-history-panel{width:1120px;height:min(800px,calc(100dvh - 40px))}
.shopao-task-history-panel[open]{display:flex;flex-direction:column}
.shopao-task-history-panel>header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #eceef2;flex:0 0 auto}
.shopao-task-history-panel h2{font-size:18px;font-weight:600;margin:0}
.shopao-task-history-panel button,.shopao-task-detail button{min-height:32px;min-width:32px;border:1px solid #e5e7eb;background:#fff;border-radius:4px;color:#4b5059;cursor:pointer}
.shopao-task-history-panel button:hover,.shopao-task-detail button:hover{background:#f3f5f8}
.shopao-task-history-panel button:disabled{color:#afb3bb;cursor:default}
.shopao-task-history-panel button:focus-visible,.shopao-task-history-panel input:focus-visible,.shopao-task-history-panel select:focus-visible,.shopao-history-trigger:focus-visible,.shopao-task-history-rail button:focus-visible{outline:2px solid #738ab8;outline-offset:2px}
.shopao-task-history-panel>form{display:flex;gap:12px;flex-wrap:wrap;align-items:end;padding:14px 20px;border-bottom:1px solid #eceef2;flex:0 0 auto}
.shopao-task-history-panel label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#737983;min-width:0}
.shopao-task-history-panel input,.shopao-task-history-panel select{box-sizing:border-box;height:32px;border:1px solid #dfe2e8;border-radius:4px;font:13px inherit;color:#353b45;padding:0 8px;min-width:0;max-width:100%;background:#fff}
.shopao-task-history-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px;align-content:start;overflow:auto;min-height:0;flex:1;padding:20px}
.shopao-task-history-grid>.shopao-task-message{grid-column:1/-1;text-align:center;padding:32px}
.shopao-task-history-panel .shopao-task-card{border:0;border-radius:0;padding:0;min-width:0;text-align:left;background:none}
.shopao-task-card>b,.shopao-task-card>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;font-size:12px;font-weight:500}
.shopao-task-card>small{font-size:11px;font-weight:400;color:#858b95}
.shopao-task-history-panel>footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;border-top:1px solid #eceef2;padding:12px 20px;flex:0 0 auto;font-size:12px;color:#737983}
.shopao-task-detail{width:760px;padding:20px;overflow:auto}
.shopao-task-detail h3{font-size:16px;margin:0 50px 12px 0;overflow-wrap:anywhere}
.shopao-task-detail img,.shopao-task-detail video{display:block;max-width:100%;max-height:60dvh;margin:12px auto;object-fit:contain;background:#f5f6f8}
.shopao-task-detail p{overflow-wrap:anywhere;font-size:13px;line-height:1.6}
.shopao-task-detail a{font-size:13px;color:#536b9e}
.shopao-task-close{float:right}
@media(max-width:760px){.shopao-history-trigger{width:32px;padding:0;font-size:0!important}.shopao-history-trigger::before{content:'◷';font-size:22px}.shopao-task-history-panel{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);height:calc(100dvh - 16px)}.shopao-task-history-panel>header,.shopao-task-history-panel>form,.shopao-task-history-panel>footer{padding:12px}.shopao-task-history-panel>form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.shopao-task-history-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}.shopao-task-detail{padding:12px}}
@media(max-width:980px){.shopao-task-history-rail{display:none!important}}
@media(min-width:761px) and (max-width:1100px){.shopao-task-history-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
