/* 产品风险待办：列表、筛选和操作弹窗独立于其他抽屉表单。 */
#dialogbody .up-todo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 20px;border-bottom:1px solid #e7edf6;flex-wrap:wrap}
#dialogbody .up-todo-tabs{display:flex;gap:28px}
#dialogbody .up-todo-tabs button{display:flex;align-items:center;gap:8px;padding:12px 0;border:0;border-bottom:2px solid transparent;background:none;color:#718198;font-size:14px;cursor:pointer}
#dialogbody .up-todo-tabs button[aria-selected="true"]{color:#1677ff;border-bottom-color:#1677ff;font-weight:600}
#dialogbody .up-todo-tabs .up-todo-tab-count{padding:0 7px;line-height:20px;border-radius:10px;background:#f0f4fa;font-size:11px;font-weight:400}
/* AI 建议入口：星芒徽标与文字组合，数量纳入标签内部。 */
#dialogbody .up-todo-ai-brand{display:inline-flex;align-items:center;gap:5px;padding:3px 6px 3px 3px;border-radius:7px;background:linear-gradient(110deg,#edf5ff,#f3eeff);color:#6650d8;line-height:20px}
#dialogbody .up-todo-ai-brand b{font-size:12px;font-weight:500;letter-spacing:0}
#dialogbody .up-todo-ai-icon{display:grid;place-items:center;flex:none;width:20px;height:20px;border-radius:6px;color:#fff;background:linear-gradient(140deg,#39a4ff 0%,#6164ef 52%,#a25be6 100%);box-shadow:0 2px 6px #7165e52b}
#dialogbody .up-todo-ai-icon svg{width:16px;height:16px;pointer-events:none}
#dialogbody .up-todo-tabs [data-todo-tab="suggestions"]{padding:7px 0}
#dialogbody .up-todo-tabs [data-todo-tab="suggestions"][aria-selected="true"]{border-bottom-color:#7861e8}
#dialogbody .up-todo-tabs [data-todo-tab="suggestions"][aria-selected="true"] .up-todo-ai-brand{background:linear-gradient(110deg,#e6f0ff,#ede5ff);color:#5942c4}
#dialogbody .up-todo-tabs [data-todo-tab="suggestions"] .up-todo-tab-count{background:#ffffff9c;color:#7a63b6;padding:0 5px;line-height:16px;font-size:10px}
#dialogbody .up-todo-tabs button:focus-visible{outline:2px solid #8d79ed;outline-offset:3px;border-radius:4px}
#dialogbody .up-todo-filters{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 20px}
#dialogbody .up-todo-filters>label{display:flex;align-items:center;gap:12px;min-height:36px;border:1px solid #dce4f1;border-radius:5px;padding:0 10px;color:#425b7a;font-size:12px;background:#fff}
#dialogbody .up-todo-filters select{border:0;background:transparent;min-width:95px;min-height:34px;padding:0 18px 0 2px;color:#34455e;font:inherit;outline-offset:-2px}
#dialogbody .up-todo-filters .up-todo-search{padding:0;flex:0 1 420px}
#dialogbody .up-todo-search input{border:0;border-radius:5px;width:100%;height:34px;font-size:12px;padding:0 12px 0 34px;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%238699b3' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='5'/%3E%3Cpath d='m12 12 5 5'/%3E%3C/svg%3E") 11px center no-repeat}
#dialogbody .up-todo-filters>[data-todo-reset]{margin-left:auto;font-size:12px}
#dialogbody #up-todo-message:empty{display:none}
#dialogbody #up-todo-message{margin-bottom:10px;font-size:12px}
#dialogbody .up-todo-table{border:1px solid #e7edf6;border-radius:6px}
#dialogbody .up-todo-table table{min-width:1520px;table-layout:fixed}
#dialogbody .up-todo-table :is(th,td){font-size:12px;padding:15px 10px;vertical-align:middle;white-space:nowrap}
#dialogbody .up-todo-table tbody tr:nth-child(even){background:#fafcff}
#dialogbody .up-todo-subject{display:flex;flex-direction:column;gap:4px;min-width:0;white-space:normal}
#dialogbody .up-todo-subject b{font-size:13px;font-weight:400;color:#28496b}
#dialogbody .up-todo-subject span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#8a98ad;font-size:11px}
#dialogbody .up-todo-evidence-preview{white-space:normal;line-height:1.7;color:#65768c}
#dialogbody .up-todo-row-actions{display:flex;gap:14px;align-items:center}
#dialogbody .up-todo-row-actions button{font-size:12px;white-space:nowrap}
.up-todo-status{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;background:#f1f4fa;color:#718198;white-space:nowrap}
.up-todo-status.working{background:#edf5ff;color:#1677ff}.up-todo-status.done{background:#eaf8f3;color:#149780}.up-todo-status.suggested{background:#f2f3f5;color:#86909c}
.up-todo-overdue{display:block;color:#e05b62;font-size:11px;margin-top:3px}
.up-todo-dialog{width:min(1000px,calc(100vw - 32px));max-width:none;max-height:86vh;padding:0;border:1px solid #e0e7f2;border-radius:10px;color:#34455e;background:white;box-shadow:0 16px 60px #192c4533;overflow:hidden;box-sizing:border-box}
.up-todo-dialog::backdrop{background:rgba(25,40,63,.3)}
.up-todo-dialog>form{display:flex;flex-direction:column;max-height:86vh;margin:0}
.up-todo-dialog-detail{height:calc(100dvh - 80px);max-height:calc(100dvh - 32px)}
.up-todo-dialog-detail>form{height:100%;max-height:100%}
.up-todo-dialog-detail .up-todo-dialog-body{flex:1}
.up-todo-dialog header{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid #e8edf5;flex:none}
.up-todo-dialog header h3{margin:0;font-size:16px;font-weight:600}
.up-todo-dialog-close{background:none;border:0;font-size:23px;color:#8996a8;cursor:pointer}
.up-todo-dialog-body{overflow:auto;padding:20px 24px;min-height:0;overscroll-behavior:contain;font-size:13px}
.up-todo-dialog h4{margin:0 0 10px;font-size:15px;color:#28496b}
.up-todo-context{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;color:#8390a5;font-size:12px;margin-bottom:22px}
.up-todo-dialog h5{font-size:12px;color:#718198;font-weight:500;margin:18px 0 7px}
.up-todo-dialog section p{white-space:pre-wrap;line-height:1.8;margin:0;color:#425b7a}
.up-todo-dialog-field,.up-todo-dialog-assign>label{display:flex;flex-direction:column;gap:8px;color:#718198;font-size:12px;margin:0 0 16px}
.up-todo-dialog textarea,.up-todo-dialog select,.up-todo-dialog input{box-sizing:border-box;border:1px solid #dce4f1;border-radius:5px;padding:9px 10px;background:#fff;color:#34455e;font:inherit;min-width:0}
.up-todo-dialog textarea{width:100%;resize:vertical;min-height:80px;line-height:1.8}
.up-todo-dialog-assign{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.up-todo-persons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:16px;background:#f7f9fd;border-radius:5px;margin:18px 0}
.up-todo-persons dt{font-size:12px;color:#8390a5;margin-bottom:7px}.up-todo-persons dd{margin:0;font-size:13px}
.up-todo-dialog details{margin-top:18px}.up-todo-dialog summary{color:#4676af;cursor:pointer;font-size:12px}
.up-todo-dialog ul{padding-left:18px;line-height:1.9;margin:8px 0}.up-todo-dialog li{margin-bottom:8px}
.up-todo-dialog-error{color:#dc4f60;line-height:1.7;margin:12px 0 0}.up-todo-dialog-error:empty{display:none}
.up-todo-dialog footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:14px 22px;border-top:1px solid #e8edf5;flex:none;background:#fff}
.up-todo-dialog footer>div{display:flex;gap:10px;margin-left:auto}
.up-todo-dialog :focus-visible{outline:2px solid #91beff;outline-offset:2px}
@media(max-width:700px){#dialogbody .up-todo-toolbar{padding-bottom:10px;gap:10px}#dialogbody .up-todo-filters .up-todo-search{flex-basis:100%}#dialogbody .up-todo-filters>[data-todo-reset]{margin-left:0}.up-todo-dialog-assign{grid-template-columns:1fr}.up-todo-dialog-body{padding:16px}.up-todo-dialog footer{padding:12px}.up-todo-persons{gap:10px;padding:12px}}

#dialogbody .up-detail[data-up-tab="handling"]>.up-toolbar{display:none}
#dialogbody .up-todo-description{white-space:pre-line;line-height:1.7;color:#65768c;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.up-todo-priority{display:inline-block;width:27px;height:16px;border-radius:8px;vertical-align:middle}
.up-todo-priority.red{background:#ff9f9f}.up-todo-priority.yellow{background:var(--orange-fill)}.up-todo-priority.green{background:#76df8d}
/* 产品和店铺共用默认列宽；拖拽保存后的内联列宽优先。 */
#dialogbody .up-todo-table th:nth-child(1){width:240px}
#dialogbody .up-todo-table th:nth-child(2){width:360px}
#dialogbody .up-todo-table th:nth-child(3){width:160px}
#dialogbody .up-todo-table th:nth-child(4){width:120px}
#dialogbody .up-todo-table th:nth-child(5){width:130px}
#dialogbody .up-todo-table th:nth-child(6){width:80px}
#dialogbody .up-todo-table th:nth-child(7){width:100px}
#dialogbody .up-todo-table th:nth-child(8){width:100px}
#dialogbody .up-todo-table th:nth-child(9){width:120px}
#dialogbody .up-todo-table th:nth-child(10){width:110px}
#dialogbody .up-todo-table :is(th,td):last-child{position:sticky;right:0;border-left:1px solid #edf1f7}
#dialogbody .up-todo-table th:last-child{z-index:2;background:#f5f8fc}
#dialogbody .up-todo-table td:last-child{background:#fff}
#dialogbody .up-todo-table tbody tr:nth-child(even) td:last-child{background:#fafcff}
#dialogbody .up-todo-toolbar-actions{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding-bottom:8px}
.up-todo-delete-question{padding:12px 16px;background:#fff3f3;border-radius:6px;color:#d64d58;margin:0 0 20px}
.up-todo-dialog .up-todo-delete-confirm{background:#e34d59;border-color:#e34d59;color:white}
@media(max-width:700px){.up-todo-persons{grid-template-columns:repeat(2,minmax(0,1fr))}}

.up-todo-title{font-size:13px;font-weight:400;color:#28496b;margin:0 0 10px}
.up-todo-field-text{white-space:pre-wrap;line-height:1.8;color:#425b7a}
.up-todo-problem{display:block;white-space:normal;line-height:1.85}
.up-todo-problem-group{display:block;margin:0 0 16px}
.up-todo-problem-group:last-child{margin-bottom:0}
.up-todo-problem-label{display:block;margin-bottom:5px;color:#71829a;font-size:12px;font-weight:500}
.up-todo-problem-line{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
.up-todo-problem-line+.up-todo-problem-line{margin-top:6px}
.up-todo-problem-group.facts>.up-todo-problem-line{position:relative;padding-left:13px}
.up-todo-problem-group.facts>.up-todo-problem-line:before{content:"";position:absolute;left:1px;top:.8em;width:4px;height:4px;border-radius:50%;background:#9aacc3}
.up-todo-problem-group:is(.scope,.period){color:#71829a;font-size:12px;margin-bottom:8px}
.up-todo-problem-group:is(.scope,.period)>.up-todo-problem-label{display:inline;margin:0 5px 0 0}
.up-todo-problem-group:is(.scope,.period)>.up-todo-problem-line{display:inline}
.up-todo-field-text .up-todo-inline-read{width:calc(100% + 14px)}
.up-todo-field-text .up-todo-inline-read>span{flex:1}
.up-todo-inline{min-width:0}
.up-todo-inline-read{display:flex;align-items:flex-start;gap:10px;border:1px solid transparent;border-radius:5px;padding:5px 7px;margin:-5px -7px;text-align:left;background:transparent;color:inherit;font:inherit;line-height:inherit;max-width:calc(100% + 14px);cursor:pointer}
.up-todo-inline-read>span{min-width:0;overflow-wrap:anywhere}
.up-todo-inline-read svg{width:14px;height:14px;flex:none;margin-top:3px;stroke:#8b9ab0;stroke-width:1.3;fill:none;opacity:0}
.up-todo-inline-read:hover,.up-todo-inline-read:focus-visible{background:#fff;border-color:#dce6f5}
.up-todo-inline-read:hover svg,.up-todo-inline-read:focus-visible svg{opacity:1}
.up-todo-inline.editing{padding:0;background:transparent;border:0;border-radius:0;white-space:normal;font-size:13px;font-weight:400}
.up-todo-inline.editing :is(input:not([type="checkbox"]),select,textarea){width:100%}
.up-todo-common{display:grid;grid-template-columns:.85fr 1.3fr 1fr .6fr 1.05fr .8fr 1fr;gap:16px;margin:0;padding:18px 24px;background:#f7f9fc;flex:none}
.up-todo-common>div{min-width:0}.up-todo-common dt{font-size:12px;color:#8390a5;margin-bottom:9px;white-space:nowrap}
.up-todo-common dd{margin:0;font-size:12px;color:#425b7a}.up-todo-common :is(input,select){width:100%;font-size:12px;padding:7px 5px}
.up-todo-common .up-todo-inline.editing{padding:0}.up-todo-common .up-todo-inline-read{white-space:nowrap;font-size:12px}
#dialogbody .up-todo-table :is(th,td):first-child input[type="checkbox"]{accent-color:#1677ff;vertical-align:middle;margin:0 8px 0 0}
#dialogbody .up-todo-table td:first-child:has(input) .up-todo-subject{display:inline-block;width:calc(100% - 25px);vertical-align:middle}
#dialogbody .up-todo-table .up-todo-row-actions{gap:9px;flex-wrap:wrap}
#dialogbody [data-todo-batch]:disabled{opacity:.45;cursor:not-allowed}
.up-todo-batch-date{display:flex;align-items:center;gap:14px;margin-bottom:18px;font-size:13px}
.up-todo-batch-table{overflow:auto}.up-todo-batch-table table{width:100%;min-width:720px;border-collapse:collapse}
.up-todo-batch-table th{text-align:left;background:#f7f9fc;color:#8390a5;font-size:12px;font-weight:400}
.up-todo-batch-table :is(th,td){padding:14px 10px;border-bottom:1px solid #e8edf5}.up-todo-batch-table td:first-child{width:35%;line-height:1.7}
.up-todo-batch-table select{width:100%}
@media(max-width:700px){.up-todo-common{display:flex;overflow-x:auto;padding:14px 16px;gap:20px}.up-todo-common>div{flex:0 0 120px}}

.up-todo-dialog-body>div>section:first-child h5{margin-top:0}
.up-todo-common .up-todo-overdue{display:inline-block;margin:0}

/* 同一表单复用检索式负责人；详情没有关闭横条，仅新增/下发/删除保留提交区。 */
.up-todo-common-assign{grid-template-columns:1.4fr 1fr .7fr}
.up-todo-dialog-header-actions{display:flex;align-items:center;gap:14px}
.up-todo-due{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.up-todo-due .up-todo-overdue{display:inline-block;margin:0;font-size:10px}
.up-todo-due [data-todo-overdue]:empty{display:none}
.up-todo-common .up-todo-due{flex-wrap:wrap;white-space:normal}
.up-todo-common .up-todo-due .up-todo-inline{flex:0 1 auto}
.up-todo-dialog .up-todo-status-select{width:auto;max-width:100%;cursor:pointer;border:0;padding:3px 17px 3px 7px;background-color:#f1f4fa;color:#718198}
.up-todo-dialog .up-todo-status-select.working{background-color:#edf5ff;color:#1677ff}
.up-todo-dialog .up-todo-status-select.done{background-color:#eaf8f3;color:#149780}
.up-todo-dialog .up-todo-inline.editing :is(input,textarea,select):focus{outline:none;border-color:#91beff;box-shadow:none}
.up-todo-people{position:relative;min-width:0;width:100%}
.up-todo-people input[type=search]{width:100%;font-weight:400}
.up-todo-people-options{position:fixed;inset:auto;margin:0;padding:4px;border:1px solid #dce4f1;border-radius:5px;background:white;box-shadow:0 6px 18px #243e6420;overflow:auto;box-sizing:border-box;color:#34455e}
.up-todo-people-options [role=option]{display:block;width:100%;padding:8px;border:0;border-radius:3px;background:transparent;color:inherit;text-align:left;font-size:12px;cursor:pointer}
.up-todo-people-options [role=option]:hover,.up-todo-people-options [aria-selected=true]{background:#edf5ff;color:#1677ff}
.up-todo-people-empty{padding:8px;font-size:12px;color:#8996a8}
