/* tasks.css - 后期任务模块样式（server/tasks/webui/），设计稿 docs\后期任务\设计稿.html。
   颜色与尺寸变量沿用 app.css 的 :root。*/
.tk-pghead{display:flex;align-items:flex-end;gap:16px;min-height:70px;padding:8px 0 6px}
.tk-pgtitle{margin:0;font-size:calc(var(--ui-base) * 1.6);font-weight:740;letter-spacing:-.03em}
.tk-pgsub{margin:4px 0 0;color:var(--muted);font-size:var(--ui-small)}
.tk-pgsub:empty{display:none}
.tk-pgdate{margin-left:auto;color:var(--muted);font-size:var(--ui-small)}
.tk-card{margin-top:14px;padding:18px 22px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.tk-card-tight{margin-top:8px}
.tk-card h3{margin:0 0 12px;font-size:var(--ui-base);font-weight:700}
.tk-card h3 span{margin-left:8px;color:var(--muted);font-weight:400;font-size:var(--ui-small)}
.tk-tag{display:inline-block;padding:2px 9px;border-radius:999px;font-size:var(--ui-caption);font-weight:700;white-space:nowrap;background:#eef1f5;color:#46536a}
.tk-tag.burn{background:#eaf3ff;color:#1d5fbf}
.tk-tag.trans_burn{background:#eef1ff;color:#3b4fbf}
.tk-tag.ocr_trans_burn{background:#f3eaff;color:#6d3fb5}
.tk-tag.ocr_trans{background:#e9f7f0;color:#0b7a5a}
.tk-tag.dub{background:#fff6e7;color:#a96008}
.tk-tag.dub_burn{background:#ffeede;color:#b5471a}
.tk-tag.bgm{background:#fce9f1;color:#a3306b}
.tk-st{font-size:var(--ui-small);font-weight:650}
.tk-st.open{color:#a96008}
.tk-st.done{color:var(--up)}
/* 搜历史任务 */
.tk-search{height:var(--ui-control);padding:0 12px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface-soft);font-size:var(--ui-small);width:260px}
.tk-pubhead .tk-search{margin-left:auto}
.tk-pubhead .tk-search+.seg{margin-left:0}
.tk-grp-search{margin-top:18px}
.tk-vids li.tk-hit>.tk-vbody>span:first-child{background:#fff3b0;border-radius:4px;padding:0 4px;font-weight:700}
.tk-dim{color:var(--subtle)}
.tk-empty,.tk-note{margin:8px 0 0;color:var(--muted);font-size:var(--ui-small)}
.tk-table{width:100%;border-collapse:collapse;font-size:var(--ui-small)}
.tk-table th{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);color:var(--muted);font-size:var(--ui-caption);font-weight:650;white-space:nowrap}
.tk-table td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.tk-table tr:last-child td{border-bottom:0}
.tk-quota{font-variant-numeric:tabular-nums;color:#46536a}
/* 进度条 */
.tk-prog{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:0 20px 12px}
.tk-prog.small{padding:0;gap:8px}
.tk-bar{height:8px;border-radius:999px;background:#eef1f5;overflow:hidden}
.tk-prog.small .tk-bar{height:6px;min-width:70px}
.tk-bar i{display:block;height:100%;background:var(--up);border-radius:999px;transition:width .2s}
.tk-prog b{font-size:var(--ui-small);font-variant-numeric:tabular-nums;white-space:nowrap}
/* 运营表单 */
.tk-form{display:grid;grid-template-columns:1fr 1fr;gap:14px 22px}
.tk-field{display:block;min-width:0}
.tk-full{grid-column:1/-1}
.tk-label{display:block;margin-bottom:6px;color:var(--muted);font-size:var(--ui-small);font-weight:650}
.tk-label em{float:right;font-style:normal;font-weight:500;color:var(--up)}
.tk-field input,.tk-field textarea,.tk-field select{width:100%;height:var(--ui-control);padding:0 12px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface-soft);font-size:var(--ui-base)}
.tk-field textarea.tk-tall{height:150px;padding:8px 12px;resize:vertical;font-size:var(--ui-small);line-height:1.6}
.tk-kinds{display:inline-flex;flex-wrap:wrap}
.tk-kinds button{padding:8px 14px;font-size:var(--ui-small);white-space:nowrap}
.tk-kinds button.active{font-weight:700}
.tk-acts{display:flex;align-items:center;gap:12px;align-self:end}
.tk-acts .hint,.tk-acts .error{margin:0;min-height:0}
.tk-bigbtn{height:var(--ui-control);padding:0 22px;border:0;border-radius:9px;background:var(--blue);color:#fff;font-size:var(--ui-base);font-weight:700}
.tk-bigbtn:hover{background:var(--blue-dark)}
/* 运营：我发布的任务 */
.tk-pubhead{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.tk-pubhead h3{margin:0}
.tk-pubhead .seg{margin-left:auto}
#tk-pub-summary b{color:#a96008;font-weight:650}
.tk-rhead,.tk-row{display:grid;grid-template-columns:200px 1.5fr 50px 100px 1.2fr 150px 70px 30px;align-items:center;gap:12px;padding:10px 6px;font-size:var(--ui-small)}
/* 运营列表多一列「确定完成」勾（后期的搜索结果行没有这列） */
.tk-rhead,#tk-pub-list .tk-row{grid-template-columns:200px 1.5fr 50px 100px 1.2fr 150px 70px 64px 30px}
.tk-final{text-align:center;white-space:nowrap}
.tk-final input{margin:0;width:16px;height:16px;vertical-align:middle;accent-color:var(--up);cursor:pointer}
.tk-rhead{padding:6px 6px 8px;border-bottom:1px solid var(--line);color:var(--muted);font-size:var(--ui-caption);font-weight:650}
.tk-rhead .num,.tk-row .num{text-align:right}
.tk-pubitem{border-bottom:1px solid var(--line)}
.tk-pubitem:last-child{border-bottom:0}
.tk-name{font-weight:650;min-width:0}
.tk-name div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-name small{display:block;color:var(--muted);font-weight:400;font-size:var(--ui-caption)}
.tk-namecell{display:flex;align-items:center;gap:12px;min-width:0}
.tk-namecell .tk-btn{flex:none}
.tk-car{height:26px;width:26px;padding:0;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--muted);font-size:12px}
.tk-pubdetail{display:grid;grid-template-columns:1.15fr 1fr;gap:0 24px;padding:4px 6px 14px}
.tk-pubdetail .tk-vids li{cursor:default}
/* 后期：摘要条 */
.tk-sum{margin-top:6px;display:grid;grid-template-columns:1.3fr 1.3fr 1fr;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.tk-sum>div{padding:14px 20px;border-right:1px solid var(--line);min-width:0}
.tk-sum>div:last-child{border-right:0}
.tk-sum small{display:block;color:var(--muted);font-size:var(--ui-small)}
.tk-sum b{display:block;margin-top:3px;font-size:calc(var(--ui-base) * 1.5);letter-spacing:-.02em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-sum b em{font-style:normal;font-size:var(--ui-small);font-weight:500;color:var(--muted);margin-left:6px}
.tk-sum b.tk-s-next{white-space:normal;font-size:calc(var(--ui-base) * 1.2);line-height:1.3}
.tk-sum b.tk-s-next em{display:block;margin:2px 0 0}
.tk-sum .hot b{color:#a96008}
.tk-sum .good b{color:var(--up)}
.tk-grp{margin:22px 0 4px;display:flex;align-items:baseline;gap:10px}
.tk-grp h3{margin:0;font-size:var(--ui-base)}
.tk-grp span{color:var(--muted);font-size:var(--ui-small)}
/* 后期：任务卡 */
.tk-task{margin-top:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.tk-task.urgent{border-color:#f0c98a}
.tk-thead{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:14px 20px 12px}
.tk-tname{font-size:calc(var(--ui-base) * 1.15);font-weight:750;letter-spacing:-.01em}
.tk-tmeta{margin-top:2px;color:var(--muted);font-size:var(--ui-small)}
.tk-tmeta b{color:var(--ink);font-weight:600}
.tk-due{text-align:right}
.tk-due small{display:block;color:var(--muted);font-size:var(--ui-caption)}
.tk-due b{display:block;font-size:var(--ui-base);font-weight:750}
.tk-task.urgent .tk-due b{color:#a96008}
.tk-tbody{display:grid;grid-template-columns:1.15fr 1fr;border-top:1px solid var(--line)}
.tk-tbody>div{padding:14px 20px 16px;min-width:0}
.tk-tbody>div+div{border-left:1px solid var(--line);background:var(--surface-soft)}
.tk-tbody h4,.tk-specpanel h4{margin:0 0 8px;color:var(--muted);font-size:var(--ui-caption);font-weight:700;letter-spacing:.02em}
.tk-specpanel h4+h4,.tk-specpanel .tk-spec+h4{margin-top:12px}
.tk-vids{margin:0;padding:0;list-style:none}
.tk-vids li{display:flex;align-items:flex-start;gap:10px;padding:7px 4px;border-bottom:1px solid #f0f2f5;font-size:var(--ui-small);cursor:pointer;user-select:none}
.tk-vids li:last-child{border-bottom:0}
.tk-vids li:hover{background:#f6f9ff}
.tk-vids li.busy{opacity:.5;pointer-events:none}
.tk-vids li:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;border-radius:6px}
.tk-vids i{width:17px;height:17px;flex:0 0 17px;border:1.5px solid var(--line-strong);border-radius:5px;display:grid;place-items:center;font-style:normal;font-size:12px;background:#fff}
/* 剧名下面还有备注行，勾选框按剧名第一行居中，不按整行居中 */
.tk-vids li>i{margin-top:calc((var(--ui-small) * var(--ui-line-height) - 17px) / 2)}
.tk-vids li.done{color:var(--subtle);text-decoration:line-through}
.tk-vids li.done i{background:var(--up);border-color:var(--up);color:#fff}
.tk-spec{margin:0;color:#46536a;font-size:var(--ui-small);line-height:1.65;overflow-wrap:anywhere}
.tk-spec b{color:var(--ink)}
.tk-path{display:flex;align-items:center;gap:8px;margin:3px 0;padding:5px 8px;border:1px solid var(--line);border-radius:7px;background:#fff;font-size:var(--ui-caption)}
.tk-path-label{flex:0 0 auto;color:var(--muted);white-space:nowrap}
.tk-path-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,"Microsoft YaHei UI",monospace}
/* 运营：地址词条编辑 */
.tk-pathrow{display:grid;grid-template-columns:auto 1fr 32px;gap:8px;align-items:center;margin-bottom:8px}
.tk-path-labelbox{display:flex;gap:6px}
.tk-path-labelbox select{width:150px}
.tk-pathrow select,.tk-pathrow input{height:36px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface-soft);font-size:var(--ui-small)}
.tk-pathrow select{background:#fff}
.tk-path-custom{width:140px}
.tk-path-in{font-family:Consolas,"Microsoft YaHei UI",monospace}
.tk-path-rm{height:32px;width:32px;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:16px}
.tk-path-rm:hover{border-color:#efc4bd;color:var(--down)}
.tk-path-addbtn{height:32px;margin-top:2px}
.tk-mylabels{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.tk-mylabels-cap{color:var(--muted);font-size:var(--ui-caption)}
.tk-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 10px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface-soft);font-size:var(--ui-caption)}
.tk-chip-rm{border:0;background:none;cursor:pointer;color:var(--muted);font-size:inherit;padding:0;line-height:1}
.tk-chip-rm:hover{color:var(--danger,#c00)}
/* 交稿提醒 */
.tk-due em{display:block;font-style:normal;font-size:var(--ui-caption);color:var(--muted)}
.tk-due.soon b,.tk-due.soon em{color:#a96008}
.tk-due.over b,.tk-due.over em{color:var(--down)}
.tk-task.over{border-color:#efc4bd}
.tk-due-sub{color:var(--muted);font-size:var(--ui-caption)}
.tk-due-soon,.tk-due-soon .tk-due-sub{color:#a96008}
.tk-due-over,.tk-due-over .tk-due-sub{color:var(--down)}
.tk-row .tk-duecell{display:block;padding:0;border:0;white-space:nowrap}
/* 编号 */
.tk-kcell{display:flex;align-items:center;gap:8px}
.tk-no{width:26px;height:26px;flex:0 0 26px;display:grid;place-items:center;border-radius:999px;background:var(--ink);color:#fff;font-style:normal;font-size:var(--ui-small);font-weight:750;font-variant-numeric:tabular-nums}
.tk-no.small{width:22px;height:22px;flex-basis:22px;font-size:var(--ui-caption)}
.tk-task.urgent .tk-no{background:#a96008}
.tk-task.over .tk-no{background:var(--down)}
/* 交稿控件 */
.tk-duectl{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.tk-duetext{width:260px;height:var(--ui-control);padding:0 12px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface-soft)}
.tk-dueat{display:flex;gap:12px}
.tk-dueat label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-small);font-weight:650;white-space:nowrap}
.tk-dueat input{height:44px;padding:0 12px;border:2px solid var(--blue);border-radius:9px;background:#fff;font-size:calc(var(--ui-base) * 1.1);font-weight:650;color:var(--ink)}
.tk-duepreview{padding:6px 12px;border-radius:999px;background:var(--up-bg);color:var(--up);font-size:var(--ui-small);font-weight:650}
.tk-duepreview.at{background:var(--blue-soft);color:var(--blue-dark)}
.tk-duepreview.empty{background:#f2f4f7;color:var(--muted);font-weight:500}
/* 管理员绩效看板 */
.tk-sum-admin>div:last-child small{margin-bottom:6px}
.tk-kpi-edit{display:flex;align-items:center;gap:8px}
.tk-kpi-edit input{width:110px;height:36px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface-soft);font-size:var(--ui-base);font-weight:700}
.tk-kpi-edit .hint,.tk-kpi-edit .error{margin:0;min-height:0}
.tk-strong{font-weight:750}
.tk-pause{white-space:nowrap}
.tk-pause .tk-btn{height:28px;padding:0 12px}
.tk-paused{margin-right:8px;color:#a96008;font-size:var(--ui-small);font-weight:650}
.tk-paused-row td{background:#f4f5f7}
.tk-others-row td{color:var(--muted)}
/* 音效账号的派单暂停 / 恢复，列在后期人员表下 */
.tk-sound-pause{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:var(--ui-small)}
.tk-sound-cap{color:var(--muted);font-size:var(--ui-caption);font-weight:650}
.tk-sound-pause .tk-pause{display:inline-flex;align-items:center;gap:8px}
.tk-sound-pause .tk-pause b{font-weight:600}
.tk-gap{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.tk-gap small{color:#a96008;font-size:var(--ui-caption);font-weight:650}
.tk-gap.ok{color:var(--up);font-weight:650}
.tk-path button{height:22px;padding:0 8px;border:1px solid var(--line-strong);border-radius:6px;background:#fff;font-size:11px;color:var(--blue-dark);font-weight:650}
.tk-tfoot{display:flex;align-items:center;gap:12px;padding:10px 20px;border-top:1px solid var(--line)}
.tk-hint{color:var(--muted);font-size:var(--ui-small)}
.tk-spacer{flex:1}
.tk-btn{height:34px;padding:0 16px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;font-size:var(--ui-small);font-weight:650}
.tk-btn.primary{border-color:var(--up);background:var(--up);color:#fff}
.tk-btn.ghost{color:var(--blue-dark)}
/* 管理员筛选 */
.tk-filter{display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.tk-filter select{height:32px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;font-size:var(--ui-small)}
/* 0.2：复制 / 异常 / 日期范围 / 修改撤回 */
.tk-copy{height:24px;padding:0 8px;border:1px solid var(--line-strong);border-radius:6px;background:#fff;font-size:11px;color:var(--blue-dark);font-weight:650;white-space:nowrap}
.tk-vids li .tk-copy,.tk-vids li .tk-flagbtn{opacity:0;transition:opacity .12s}
.tk-vids li:hover .tk-copy,.tk-vids li:hover .tk-flagbtn,.tk-vids li:focus-within .tk-copy,.tk-vids li:focus-within .tk-flagbtn{opacity:1}
.tk-vids li{flex-wrap:wrap}
.tk-vbody{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tk-vtitle{overflow-wrap:anywhere}
.tk-vids li i{cursor:pointer}
.tk-vids li{cursor:default}
.tk-vids li.flagged{background:#fff7f5}
.tk-vids li.flagged .tk-vtitle,.tk-vids li.flagged>.tk-vbody>span{color:var(--down);font-weight:650}
.tk-flagline{display:flex;align-items:center;gap:6px;color:var(--down);font-size:var(--ui-caption)}
.tk-flagline b{font-weight:750}
.tk-flagbtn{height:24px;padding:0 8px;border:1px solid #efc4bd;border-radius:6px;background:#fff;color:var(--down);font-size:11px;font-weight:650;white-space:nowrap}
.tk-flagform{flex-basis:100%;display:flex;gap:6px;align-items:center;padding:6px 0 2px 27px}
.tk-flagform select,.tk-flagform input{height:30px;padding:0 8px;border:1px solid var(--line-strong);border-radius:7px;background:#fff;font-size:var(--ui-small)}
.tk-flagform input{flex:1;min-width:0}
.tk-flagform input.bad{border-color:var(--down)}
.tk-btn.small{height:30px;padding:0 10px;font-size:var(--ui-caption)}
.tk-btn.danger{border-color:#efc4bd;color:var(--down)}
.tk-flagtag{margin-left:8px;padding:1px 7px;border-radius:999px;background:#fff1f0;color:var(--down);font-size:var(--ui-caption);font-weight:700}
.tk-lh{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.tk-lh h4{margin:0}
.tk-pubacts{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end;padding-top:8px}
.tk-pubitem.withdrawn .tk-row{opacity:.55}
.tk-st.withdrawn{color:var(--subtle)}
.tk-kinds.tk-locked button{pointer-events:none;opacity:.55}
.tk-kinds.tk-locked button.active{opacity:1}
.tk-range{display:inline-flex;align-items:center;gap:6px}
.tk-range input{height:30px;padding:0 8px;border:1px solid var(--line-strong);border-radius:7px;background:#fff;font-size:var(--ui-small)}
.tk-range span{color:var(--muted)}
.tk-range .tk-btn{height:30px;padding:0 10px;font-size:var(--ui-caption)}
.tk-range-admin{margin-top:4px;flex-wrap:wrap}
.tk-range-admin .seg{margin-right:6px}
.tk-disp-range{margin-bottom:10px}
.tk-pager{display:flex;align-items:center;gap:10px;justify-content:center;margin-top:10px}
.tk-pager span{font-size:var(--ui-small);color:var(--muted)}
.tk-grp .tk-spacer{flex:1}
/* 0.3：后期备注 / 已完成展开 */
.tk-note{margin-top:2px}
.tk-note-text{display:inline-block;color:#46536a;font-size:var(--ui-caption);cursor:text;border-bottom:1px dashed transparent}
.tk-note-text:hover{border-bottom-color:var(--line-strong)}
.tk-note-text.empty{color:var(--subtle);opacity:0;transition:opacity .12s}
.tk-vids li:hover .tk-note-text.empty,.tk-vids li:focus-within .tk-note-text.empty,.tk-tbody>div>.tk-note .tk-note-text.empty,.tk-pubdetail>div>.tk-note .tk-note-text.empty{opacity:1}
.tk-note input{width:min(100%,520px);height:28px;padding:0 8px;border:1px solid var(--blue);border-radius:6px;background:#fff;font-size:var(--ui-caption)}
.tk-noteline{color:#46536a;font-size:var(--ui-caption)}
.tk-noteline.task{margin-top:8px;padding-top:6px;border-top:1px dashed var(--line)}
.tk-noteline b{font-weight:700;color:var(--muted)}
.tk-tbody>div>.tk-note,.tk-pubdetail>div>.tk-note{margin-top:10px;padding-top:8px;border-top:1px dashed var(--line)}
.tk-done-row{cursor:pointer}
.tk-done-row:hover td{background:#f6f9ff}
.tk-done-row .tk-car{margin-left:8px}
.tk-done-detail>td{padding:0 10px 10px;background:var(--surface-soft)}
.tk-done-detail .tk-pubdetail{padding:10px 6px 4px}
/* 0.3：运营打回 */
.tk-returnbar{margin:0 20px 10px;padding:8px 12px;border:1px solid #efc4bd;border-radius:9px;background:#fff1f0;color:var(--down);font-size:var(--ui-small)}
.tk-returnbar b{font-weight:750}
.tk-task:has(.tk-returnbar:not(.reopen)){border-color:#efc4bd}
/* 补齐素材退回：黄条，和打回的红条区分开 */
.tk-returnbar.reopen{border-color:#e8d08a;background:#fff8e6;color:#8a6a12;font-weight:750}
/* 运营改了类型：提醒后期，用黄色和打回的红色区分开 */
.tk-kindbar{margin:0 20px 10px;padding:8px 12px;border:1px solid #e8d08a;border-radius:9px;background:#fff8e6;color:#8a6a12;font-size:var(--ui-small)}
.tk-kindbar b{font-weight:750}
