/* Responsive certificate tab and shared task hint. / 自适应证书入口与共享任务角标。 */
.tool-history-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible}
.tool-history-tabs [data-tab]{position:relative;min-width:0;white-space:nowrap;padding-inline:6px!important}
.tool-history-progress-badge{display:inline-grid;place-items:center;vertical-align:middle;margin-left:4px;min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:#ff3b30;color:#fff;font:700 10px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;pointer-events:none}
.tool-history-progress-badge[hidden],.tool-history-certificate[hidden],.tool-history-toolbar[hidden]{display:none!important}
.tool-history-certificate{padding:12px 0 4px;min-width:0}
.tool-certificate-form{display:flex;align-items:flex-end;gap:8px;min-width:0}
.tool-certificate-form label{display:grid;gap:7px;flex:1;min-width:0;font-size:12px;color:var(--label2,#667085)}
.tool-certificate-form input{width:100%;box-sizing:border-box;min-width:0;min-height:42px;padding:10px 12px;border:1px solid var(--separator,#e4e7ec);border-radius:10px;background:var(--card,#fff);color:var(--label,#1d2939);font-size:16px}
.tool-certificate-form button{flex-shrink:0;min-height:42px;padding:0 14px;border:0;border-radius:10px;background:var(--theme-primary,#039855);color:#fff;font-size:13px;cursor:pointer}
.tool-certificate-form button:disabled{opacity:.5;cursor:default}
.tool-history-certificate [role=status]{margin:10px 0 0;line-height:1.65;font-size:12px;color:var(--label2,#667085);overflow-wrap:anywhere}
@media(max-width:360px){.tool-history-tabs [data-tab]{font-size:11px!important}.tool-certificate-form{flex-direction:column;align-items:stretch}.tool-certificate-form button{width:100%}.tool-history-progress-badge{margin-left:2px;min-width:14px;height:14px;padding:0 3px}}

/* Expired records remain readable on mobile. / 失效记录在移动端保持清晰可读。 */
.tool-history-expiry{flex-basis:100%;font-size:10px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}.tool-history-status.is-expired{color:#8b909a;background:#f1f3f5}

/* Align task identity, timing and actions on narrow screens. / 小屏幕统一对齐任务身份、时间与操作。 */
.tool-history-item{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px 12px;align-items:start;padding:12px}
.tool-history-app-icon{width:40px;height:40px;border-radius:11px;grid-column:1;grid-row:1}
.tool-history-item-body{grid-column:2;grid-row:1;min-width:0}
.tool-history-item-title{font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.tool-history-bundle-id{margin-top:4px;color:var(--label2,#667085);font:10px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere}
.tool-history-item-meta{margin-top:6px;gap:5px 8px;line-height:1.6}
.tool-history-expiry{font-size:10px;line-height:1.7}
.tool-history-item-actions{grid-column:2;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;margin:0}
.tool-history-item-actions .tool-history-action{min-height:30px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:6px 12px;white-space:nowrap}
@media(max-width:360px){.tool-history-item{grid-template-columns:36px minmax(0,1fr);gap:8px;padding:10px}.tool-history-app-icon{width:36px;height:36px}.tool-history-item-meta time{flex-basis:100%}}

/* Pin the status badge to the top right; align the two time rows. / 状态标签固定右上角，两个时间行统一对齐。 */
.tool-history-item{position:relative}
.tool-history-item>.tool-history-status{position:absolute;top:12px;right:12px;margin:0;max-width:92px;white-space:nowrap;font-size:10px;line-height:1.25;font-weight:500;padding:2px 5px;min-height:0;letter-spacing:0}
.tool-history-item-title{padding-right:65px;box-sizing:border-box;min-height:20px}
.tool-history-item-meta{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.tool-history-item-meta time,.tool-history-expiry{display:block;font-size:10px;line-height:1.7;white-space:normal;overflow-wrap:anywhere;flex-basis:auto}
@media(max-width:360px){.tool-history-item>.tool-history-status{top:10px;right:10px}}

/* Four equal-width actions across the full card. / 卡片底部四个操作等宽排列。 */
.tool-history-item-actions{grid-column:1 / -1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%;margin-top:4px}
.tool-history-item-actions .tool-history-action{width:100%;min-width:0;min-height:32px;padding:6px 2px;font-size:10px;line-height:1.3;text-align:center;border:0;box-sizing:border-box;cursor:pointer}
.tool-history-item-actions button.tool-history-action:disabled{opacity:.45;cursor:default}
@media(max-width:360px){.tool-history-item-actions{gap:4px}.tool-history-item-actions .tool-history-action{font-size:9px;padding-inline:1px}}

/* Equal styling for all four record actions, including links and buttons. / 四个记录操作统一样式，链接与按钮保持一致。 */
.tool-history-item-actions .tool-history-action,.tool-history-item-actions .tool-history-action.is-primary{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;height:32px;min-height:32px;margin:0;padding:6px 2px;border:1px solid transparent;border-radius:9px;background:color-mix(in srgb,var(--theme-primary,#039855) 10%,var(--card,#fff));color:var(--theme-primary,#039855);font-family:inherit;font-size:10px;font-weight:600;line-height:1.3;text-decoration:none;box-shadow:none;box-sizing:border-box}
@media(max-width:360px){.tool-history-item-actions .tool-history-action,.tool-history-item-actions .tool-history-action.is-primary{font-size:9px}}

/* Share typography and geometry for both UDID forms. / UDID 查询和证书下载表单共用字号、尺寸与间距。 */
.tool-history-query,.tool-certificate-form{display:flex;flex-direction:row;align-items:flex-end;gap:8px;min-width:0;margin:0 0 10px}
.tool-history-query label,.tool-certificate-form label{display:grid;gap:7px;flex:1;min-width:0;font-family:inherit;font-size:12px;line-height:1.5;font-weight:400;color:var(--label2,#667085)}
.tool-history-query input,.tool-certificate-form input{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;height:40px;min-height:0;box-sizing:border-box;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;font-weight:400;line-height:normal;outline:none}
.tool-history-query input:focus,.tool-certificate-form input:focus{border-color:var(--theme-primary,#039855);box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-primary,#039855) 12%,transparent)}
.tool-history-query button,.tool-certificate-form button{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 84px;width:84px;min-width:0;height:40px;min-height:0;margin:0;padding:0 8px;box-sizing:border-box;border:0;border-radius:10px;background:var(--theme-primary,#039855);color:#fff;font-family:inherit;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}
.tool-history-query button:disabled,.tool-certificate-form button:disabled{opacity:.5;cursor:default}
.tool-history-certificate [role=status],.tool-history-udid .tool-history-empty{font-size:12px;line-height:1.65}
@media(hover:none) and (pointer:coarse){.tool-history-query input,.tool-certificate-form input{font-size:16px}}
