/* 工具箱签名记录布局 / Toolbox signature-history layout. */
.tool-signature-board{padding:0 13px 14px}
.tool-signature-board [hidden]{display:none!important}
.tool-history-tabs{display:flex;flex-wrap:nowrap;gap:4px;padding:4px;margin:0 0 10px;border:1px solid var(--sep-soft,#e5eaf2);border-radius:13px;background:var(--card-soft,#f3f5f8)}
.tool-history-tabs button{flex:1;min-width:0;white-space:nowrap;min-height:34px;padding:7px 6px;border:0;border-radius:10px;background:transparent;color:var(--label2,#777d88);font-family:inherit;font-size:11px;font-weight:600;line-height:1.2;cursor:pointer;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.tool-history-tabs button[aria-selected=true]{background:var(--card,#fff);color:var(--blue,#3478f6);box-shadow:0 1px 4px #1b31521a}
.tool-history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;margin-bottom:8px;color:var(--label2,#8b8d95);font-size:11px}
.tool-history-tools{display:flex;gap:7px}
.tool-history-icon{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid var(--sep-soft,#e5eaf2);border-radius:10px;background:var(--card,#fff);color:var(--label2,#7d8592);cursor:pointer;transition:background .18s,color .18s,transform .18s}
.tool-history-icon:active{transform:scale(.94);background:var(--card-soft,#f3f5f8)}
.tool-history-icon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tool-history-icon[data-action=clear]:hover{color:#e65353;background:#fff5f5}
.tool-history-icon.is-loading svg{animation:tool-history-spin .8s linear infinite}
@keyframes tool-history-spin{to{transform:rotate(360deg)}}
.tool-history-query{display:flex;gap:8px;margin:0 0 10px}
.tool-history-query input{flex:1;min-width:0;height:38px;padding:0 11px;border:1px solid var(--sep-soft,#e5eaf2);border-radius:10px;background:var(--card,#fff);color:var(--label,#252832);font-family:inherit;font-size:12px;outline:none}
.tool-history-query input:focus{border-color:color-mix(in srgb,var(--blue,#3478f6) 55%,#fff);box-shadow:0 0 0 3px color-mix(in srgb,var(--blue,#3478f6) 12%,transparent)}
.tool-history-query button{flex:none;height:38px;padding:0 15px;border:0;border-radius:10px;background:var(--blue,#3478f6);color:#fff;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}
.tool-history-item{display:flex;align-items:center;gap:10px;min-width:0;padding:10px;margin:0 0 8px;border:1px solid var(--sep-soft,#e8edf4);border-radius:14px;background:var(--card,#fff);box-shadow:0 2px 8px #1831540a}
.tool-history-item:last-child{margin-bottom:0}
.tool-history-app-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;overflow:hidden;border-radius:11px;background:linear-gradient(145deg,#39ca70,#1cac59);color:#fff;font-size:16px;font-weight:700}
.tool-history-app-icon img{display:block;width:100%;height:100%;object-fit:cover}
.tool-history-item-body{flex:1;min-width:0}
.tool-history-item-title{display:block;overflow:hidden;color:var(--label,#252832);font-size:12px;font-weight:650;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
.tool-history-item-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:4px;color:var(--label3,#9a9da5);font-size:10px;line-height:1.4}
.tool-history-status{padding:2px 6px;border-radius:999px;background:#f1f3f6;color:#737986;white-space:nowrap}
.tool-history-status.is-success{background:#e9f8ef;color:#22a45a}
.tool-history-status.is-failed,.tool-history-status.is-cancelled{background:#fff0ef;color:#e15b58}
.tool-history-status.is-running,.tool-history-status.is-signing,.tool-history-status.is-queued,.tool-history-status.is-requesting,.tool-history-status.is-reserved{background:#edf3ff;color:#3478f6}
.tool-history-item-actions{display:flex;flex:none;flex-wrap:wrap;justify-content:flex-end;gap:5px}
.tool-history-action{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:0 9px;border:1px solid var(--sep-soft,#e5eaf2);border-radius:9px;background:var(--card,#fff);color:var(--blue,#3478f6);font-size:10px;font-weight:600;text-decoration:none;white-space:nowrap}
.tool-history-action.is-primary{border-color:transparent;background:color-mix(in srgb,var(--blue,#3478f6) 10%,#fff);color:var(--blue,#3478f6)}
.tool-history-empty{padding:22px 12px;text-align:center;color:var(--label3,#9a9da5);font-size:11px}
@media(max-width:390px){.tool-signature-board{padding-right:10px;padding-left:10px}.tool-history-item{gap:8px;padding:9px}.tool-history-app-icon{width:34px;height:34px}.tool-history-item-actions{gap:4px}.tool-history-action{min-height:25px;padding:0 7px;font-size:9.5px}}
/* 预计耗时紧邻本机任务状态显示 / Keep the ETA beside the local task status. */
.tool-history-estimate{display:inline-flex;align-items:center;padding:2px 6px;border-radius:999px;background:color-mix(in srgb,var(--blue,#3478f6) 9%,#fff);color:var(--blue,#3478f6);font-size:10px;line-height:1.4;white-space:nowrap}

.tool-history-icon.is-confirming{color:#e65353;background:#fff0f0;border-color:#e65353}

/* 单条 UDID 记录移除按钮，紧邻右上角状态标签。 / Per-record removal control beside the status badge. */
.tool-history-item-remove{position:absolute;top:8px;right:64px;display:grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid var(--sep-soft,#e5eaf2);border-radius:8px;background:var(--card,#fff);color:var(--label3,#9a9da5);cursor:pointer;transition:color .18s,background .18s,border-color .18s}
.tool-history-item-remove:hover{color:#e65353;background:#fff5f5;border-color:#ffd6d6}
.tool-history-item-remove svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:360px){.tool-history-item-remove{top:8px;right:58px;width:22px;height:22px}}

/* Align metadata labels and values without crowding the title. / 信息标签和值对齐，避免挤占标题。 */
.tool-signature-board .tool-history-item-meta{display:grid;gap:5px;margin-top:9px;width:100%;color:var(--label2,#667085);font-size:11px;line-height:1.6}
.tool-signature-board .tool-history-detail{display:grid;grid-template-columns:78px minmax(0,1fr);column-gap:8px;align-items:baseline;min-width:0}
.tool-signature-board .tool-history-detail-label{color:var(--label2,#667085);white-space:nowrap}
.tool-signature-board .tool-history-detail time,.tool-signature-board .tool-history-detail>span:last-child{font-size:11px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;color:var(--label,#252832)}
@media(max-width:360px){.tool-signature-board .tool-history-detail{grid-template-columns:72px minmax(0,1fr);column-gap:5px}.tool-signature-board .tool-history-detail time,.tool-signature-board .tool-history-detail>span:last-child{font-size:10px}}

/* Place the status before the delete control, with space for the title. / 状态标签在左、删除按钮在右，并为标题预留空间。 */
.tool-signature-board .tool-history-item>.tool-history-status{right:44px}
.tool-signature-board .tool-history-item-remove{right:12px}
.tool-signature-board .tool-history-item-title{padding-right:100px}
@media(max-width:360px){.tool-signature-board .tool-history-item>.tool-history-status{right:40px}.tool-signature-board .tool-history-item-remove{right:10px}}

/* 查询订单号结果样式 */
.tool-history-order-box{background:#f9fafb;border:1px dashed #d1d5db;border-radius:10px;padding:10px 12px;margin-bottom:10px}
.tool-history-order-box b{display:block;font-size:14px;color:#111827;margin-bottom:2px}
.tool-history-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;color:#374151;padding:3px 0;border-bottom:1px solid #eee;word-break:break-all}
.tool-history-code:last-child{border-bottom:0}

/* 查询订单号结果：统一文字大小 + 醒目复制按钮 */
.tool-history-order-box{background:#f9fafb;border:1px dashed #d1d5db;border-radius:10px;padding:10px 12px;margin-bottom:10px}
.tool-history-order-title{display:block;font-size:12px;color:#252832;font-weight:600;margin-bottom:2px}
.tool-history-order-meta{font-size:12px;color:#667085;margin-bottom:2px}
.tool-history-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:#374151;padding:3px 0;border-bottom:1px solid #eee;word-break:break-all}
.tool-history-code:last-child{border-bottom:0}
.tool-history-order-copy{display:block;width:100%;box-sizing:border-box;margin-top:12px;height:38px;border:0;border-radius:10px;background:#16a34a;color:#fff;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}
.tool-history-order-copy:active{opacity:.85}

.tool-history-query input::placeholder{font-size:11px;color:var(--label2,#9aa0ab)}

.tool-history-code-copy{display:inline-block;margin-top:8px;height:28px;padding:0 11px;border:0;border-radius:8px;background:#16a34a;color:#fff;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}
.tool-history-code-copy:active{opacity:.85}
