/* Only the secondary task pages opt into this layout. */
.task-layout{--muted:#486575}
.task-layout [hidden]{display:none!important}
.task-layout .wb{max-width:1200px;box-sizing:border-box}
.task-layout .wb-header{margin-bottom:20px}
.task-layout .wb-header h1{line-height:1.5}
.task-layout .page-view-nav{display:flex;gap:8px;overflow-x:auto;padding:2px 0 12px;margin:16px 0;scrollbar-width:thin}
.task-layout .page-view-nav button{flex:none;min-height:44px;padding:10px 18px;border:1px solid #b6d0db;border-radius:10px;background:#fff;color:#21485b;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.task-layout .page-view-nav button[aria-pressed=true]{background:#226b82;border-color:#226b82;color:#fff}
.task-layout .page-view-nav button:disabled{opacity:.55;cursor:not-allowed}
.task-layout .page-related{margin:16px 0;color:#486575}
.task-layout .page-related summary{cursor:pointer;min-height:44px;align-content:center;font-weight:600}
.task-layout .page-related nav{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0}
.task-layout .panel{margin-top:16px;padding:24px;min-width:0}
.task-layout .panel>h2:first-child{margin-top:0}
.task-layout .wb-status:empty,.task-layout #status:empty,.task-layout #settingsStatus:empty{display:none}
.task-layout .wb-footer,.task-layout .wb-footer>div{display:flex;flex-wrap:wrap;gap:10px}
.task-layout button:not(.page-view-nav button){min-height:44px}
.task-layout button:focus-visible,.task-layout summary:focus-visible{outline:3px solid #007bbb;outline-offset:3px}
.task-layout input:not([type=checkbox]):not([type=radio]),.task-layout select,.task-layout textarea{max-width:100%;box-sizing:border-box;font:inherit}
.task-layout .wb-filters label{min-width:0}
.task-layout .wb-filters{margin:12px 0}
.task-layout .view-empty{padding:24px;background:#fff;border:1px solid #cbdde7;border-radius:12px;color:#486575}
.task-layout [data-view-panel]:has(>section:not([hidden]))>.view-empty{display:none}
.task-layout .settings-shortcuts{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}
.task-layout .settings-reason,.task-layout #rules>label{display:grid;gap:8px;margin:16px 0}
.task-layout #ruleFields fieldset{padding:16px;border:1px solid #cbdde7;border-radius:10px;margin:16px 0}
.task-layout #ruleFields select{min-height:44px;margin:4px;max-width:calc(100% - 12px)}
@media(max-width:767px){
 .task-layout .wb{padding:16px}
 .task-layout .page-view-nav{margin-block:12px}
 .task-layout .page-view-nav button{padding-inline:14px}
 .task-layout .panel{padding:18px}
 .task-layout .wb-filters label{flex:1 1 160px;max-width:100%}
 .task-layout .wb-filters input:not([type=checkbox]):not([type=radio]),.task-layout .wb-filters select,.task-layout .wb-filters textarea{width:100%}
 .task-layout .wb-footer>div{width:100%}
 .task-layout .workbench-brand-heading{flex-wrap:wrap}
 .task-layout .settings-shortcuts>*{width:100%}
 .task-layout #rules textarea{width:100%}
}

/* Keep task navigation compact, with room for long Chinese labels and fields. */
.task-layout .page-view-nav{overscroll-behavior-inline:contain;scroll-padding-inline:8px}
.task-layout :is(.panel,.wb-header>div,[data-view-panel],form){min-width:0}
.task-layout :is(h1,h2,h3){overflow-wrap:anywhere;text-wrap:balance}
.task-layout :is(input,select,textarea){caret-color:var(--primary,#007bbb)}
.task-layout ::selection{background:#cce5ef;color:#15354b}
.task-layout :is(.wb-table,#count,.verification-count){font-variant-numeric:tabular-nums}
.task-layout .wb-scroll{scrollbar-color:#91acbb transparent;scrollbar-width:thin}
.task-layout .wb-header :is(a,button){flex-shrink:0}
.task-layout :is(.wb-filters,.wb-footer,.task-actions,.actions)>button{max-width:100%;white-space:normal}
.task-layout :is(h1,h2,h3)[tabindex="-1"]:focus{outline:0}
@media(max-width:767px){
 .task-layout :is(input,select,textarea){font-size:16px}
 .task-layout :is(.wb-filters,.wb-footer){min-width:0;gap:12px}
 .task-layout .page-view-nav button{min-height:44px}
}

.task-layout .wb-status{border:1px solid var(--line,#cbdde7);border-radius:10px}
.task-layout .wb-status.wb-error{border-color:#b42318;background:#fff5f3;color:#9c241c}
