/* 调试页（超级管理员）：跨账号看运行轨迹。awd-* 是每一步的输入输出画法，dbg-* 是页面骨架 */
.awd { display: flex; flex-direction: column; gap: 20px; }
.awd-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.awd-sec { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 12px; }
.awd-sec h3 { margin: 0; font-size: var(--fs-md); }
.awd-sec h4 { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.awd-frames { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.awd-frames img { height: 180px; border-radius: 4px; flex: none; cursor: zoom-in; }
.awd pre { margin: 0; padding: 12px; background: var(--sunk); border-radius: var(--radius); font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; }
.awd h5 { margin: 8px 0 4px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.awd-step { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.awd-step h4 { color: var(--text); font-size: var(--fs-sm); }
.awd-io { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 720px) { .awd-io { grid-template-columns: minmax(0, 1fr); } }
.awd-media { margin: 0; flex: none; display: flex; flex-direction: column; gap: 4px; max-width: 220px; }
.awd-media img, .awd-media video { height: 220px; max-width: 220px; object-fit: contain; border-radius: 4px; background: var(--monitor); cursor: zoom-in; }
.awd-media figcaption { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.awd-params { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font: 12px/1.6 var(--mono); }
.awd-params dt { color: var(--muted); }
.awd-params dd { margin: 0; word-break: break-all; }
.awd-log summary { cursor: pointer; font-size: var(--fs-xs); color: var(--muted); }
.awd-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.awd-pair figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.awd-pair figcaption { font-size: var(--fs-xs); color: var(--muted); }
.awd-pair img, .awd-pair video { width: 100%; border-radius: 4px; background: var(--monitor); }
.awd-take.focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.awd-meta { font-size: var(--fs-xs); color: var(--muted); }
.awd-step > summary { list-style: none; cursor: pointer; }
.awd-step > summary::-webkit-details-marker { display: none; }
.awd-step > summary h4::before { content: "▸ "; color: var(--faint); }
.awd-step[open] > summary h4::before { content: "▾ "; }

/* 骨架：上面筛选，左边任务列表，右边详情 */
.dbg { display: flex; flex-direction: column; gap: 12px; }
.dbg .toolbar .field { flex: 0 0 auto; }
.dbg .toolbar .field.grow { flex: 1 1 200px; }
.dbg-check { color: var(--muted); }
.dbg-main { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .dbg-main { grid-template-columns: minmax(0, 1fr); } .dbg-list { max-height: 40vh; } }
.dbg-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); max-height: calc(100vh - 160px); overflow-y: auto; position: sticky; top: 12px; }
.dbg-row { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px; text-align: left; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--text); }
.dbg-row:hover { background: var(--sunk); }
.dbg-row.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.dbg-row:focus-visible, .dbg-unit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dbg-title { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbg-sub { font-size: var(--fs-xs); color: var(--muted); }
.dbg-units { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--fs-xs); }
.dbg-n { color: var(--faint); }
.dbg-pad { padding: 12px; margin: 0; }
.dbg-detail { min-width: 0; }
.dbg-task h2 { margin: 0 0 4px; font-size: var(--fs-lg); }
.dbg-task p { margin: 0; }
.dbg-err { color: var(--fail); background: var(--fail-soft) !important; }
.dbg-info > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.dbg-src { height: 260px; max-width: 100%; background: var(--monitor); border-radius: 4px; }
.dbg-units-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.dbg-unit { flex: none; width: auto; display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; font: inherit; font-size: var(--fs-xs); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; color: var(--text); max-width: 260px; }
.dbg-unit span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbg-unit.done { border-left-color: var(--ok); }
.dbg-unit.failed { border-left-color: var(--fail); }
.dbg-unit.queued, .dbg-unit.running { border-left-color: var(--run); }
.dbg-unit.on { border-color: var(--accent); background: var(--accent-soft); }
.dbg .table { font-size: var(--fs-xs); }
.dbg .table td:nth-child(2), .dbg .table td:nth-child(3) { font-family: var(--mono); white-space: nowrap; }
.dbg .table tr.bad td { color: var(--fail); }
.dbg-tot td { font-weight: 600; }
.awd-pair { grid-template-columns: repeat(auto-fill, minmax(220px, 280px)); }
.awd-pair video { height: 360px; width: auto; max-width: 100%; object-fit: contain; }
