/* Shared shell distilled from recommended.html + the final schedule.css cascade.
 * Keep source-body styles in their native modules. See layout-reference.md. */
#main-content:has(> :is(#shared-work-root,#dashboard-work-root,.patient-work-root)){padding:0;max-width:none;width:100%;margin:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root){--ink:#263346;--muted:#738093;--primary:#6366f1;--line:#e4e8ef;--bg:#f7f8fb;--soft:#f0f1ff;box-sizing:border-box;background:var(--bg);color:var(--ink);font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;display:flex;flex-direction:column;width:100%;max-width:1900px;margin:auto;padding:12px 28px 24px;min-width:0;height:calc(100dvh - var(--work-header-height,70px));min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) *,#work-reading-dialog *{box-sizing:border-box}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [hidden]{display:none!important}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :where(.work-toolbar,.queue-panel,.reading-navigation,.calendar-controls) :is(button,input,select,textarea),:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions>button{font:inherit;color:inherit}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :where(.work-toolbar,.queue-panel,.reading-navigation,.calendar-controls) button,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions>button{background:white;border:1px solid #d9dee7;border-radius:6px;padding:8px 12px;font-weight:550;cursor:pointer}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :where(.work-toolbar,.queue-panel,.reading-navigation,.calendar-controls) button:hover,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions>button:hover{background:#f5f6fc;border-color:#b7bed1}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) button:disabled{opacity:.55;cursor:not-allowed}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #b8bbff;outline-offset:2px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) button.primary{background:var(--primary);border-color:var(--primary);color:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .text-btn{border:0;background:transparent;color:#585bd5;padding:4px 6px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(h2,h3,p):where(:not(#work-native-body *,.work-native-portal *)){margin:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.work-toolbar,.queue-panel) :is(select,input){border:1px solid #dce1e9;border-radius:6px;background:white;padding:8px 9px;font-size:12px;max-width:100%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .count{background:#eef0f5;color:#778193;padding:2px 6px;font-size:10px;border-radius:5px;margin-left:5px;font-weight:550}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:0;flex-wrap:nowrap;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs{flex:0 0 auto;margin-right:10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-scope-controls{flex:1;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-tabs{display:inline-flex;margin:0;align-items:center;gap:3px;padding:3px;background:#e9edf4;border:1px solid #d5dce7;border-radius:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-tabs button{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 10px;border:1px solid transparent;border-radius:5px;font-size:11px;font-weight:650;line-height:16px;color:#526078;white-space:nowrap;background:transparent}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-tabs button:hover{background:#f6f7fb;color:#343b73}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-tabs button.active{background:white;border-color:#d6dbe6;color:#494398;box-shadow:0 1px 3px #24345218}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-tabs .count{margin:0;padding:0 5px;font-size:9px;line-height:14px;border-radius:5px;background:#dce2ec;color:#526078}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-tabs button.active .count{background:#eeecfb;color:#5750a9}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-scope{display:flex;align-items:center;gap:8px;position:relative;min-height:42px;flex-wrap:wrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-popover{position:relative}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-popover summary{cursor:pointer;list-style:none;padding:9px 12px;background:white;border:1px solid #dbe2e6;border-radius:7px;color:#40595a;font-family:inherit;font-size:12px;line-height:18px;font-weight:600;display:flex;gap:14px;align-items:center}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) summary::-webkit-details-marker{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-popover[open] summary{border-color:#9288ec;background:#f7f5ff}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-popover-panel{position:absolute;top:calc(100% + 7px);left:0;z-index:var(--z-dropdown);background:white;border:1px solid #dce2e8;border-radius:10px;box-shadow:0 12px 32px #24324226;padding:16px;width:300px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options{padding:6px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options button{display:block;width:100%;text-align:left;border:0;padding:12px;border-radius:6px;background:white;font-family:inherit;font-size:13px;line-height:1.5;font-weight:600}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options button[aria-pressed=true]{background:#f1efff;color:#594dce}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options small{display:block;font-size:11px;line-height:1.5;font-weight:400;color:#6a7b83;margin-top:5px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .filter-panel-heading,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .filter-panel-footer{display:flex;align-items:center;justify-content:space-between;font-size:13px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-scope-bar{display:grid;gap:12px;padding:12px 0;margin:0;border:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-scope-bar label{display:grid;gap:5px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-scope-bar select{width:100%;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .filter-help{font-size:11px;line-height:1.5;color:#75838b;margin:0 0 12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .filter-panel-footer{border-top:1px solid #edf0f3;padding-top:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-manage-queues{display:inline-block;font-size:11px;color:#585bd5;margin:0 0 12px;text-decoration:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-chips{display:flex;gap:6px;flex-wrap:wrap;flex:1}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .filter-chip{max-width:280px;overflow-wrap:anywhere;font-size:11px;padding:5px 9px;border:1px solid #ddd9f7;background:#f5f3ff;border-radius:12px;color:#61558b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #display-mode{margin-left:auto;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .display-toolbar{margin:0;padding:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .period-toggle{display:flex;border:1px solid #dadee9;border-radius:6px;padding:2px;background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .period-toggle button{border:0;font-size:12px;padding:7px 17px;background:transparent}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .period-toggle button.active{background:#eeeffe;color:#5f5dc6}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-dropdown{position:relative;flex-shrink:0;margin-left:4px}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-dropdown>summary{list-style:none;cursor:pointer;font-size:12px;font-weight:600;padding:10px 14px;border-radius:7px;display:flex;gap:20px;align-items:center;background:var(--primary);color:white}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet{position:absolute;top:calc(100% + 8px);right:0;z-index:var(--z-dropdown);background:white;border:1px solid #dce2e8;border-radius:10px;box-shadow:0 12px 32px #24324226;padding:8px;width:300px}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet-heading{font-size:10px;letter-spacing:.7px;text-transform:uppercase;color:#8a95a3;padding:9px 10px 5px}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet>button{display:block;width:100%;padding:10px;text-align:left;border:0;background:transparent;border-radius:6px}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet>button:hover{background:#f2f0ff}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet strong{display:block;font-size:12px;color:#35485a}
:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet small{display:block;font-size:11px;font-weight:400;color:#7b8795;margin-top:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-workspace{display:grid;grid-template-columns:370px minmax(0,1fr);gap:17px;flex:1;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .panel{background:white;border:1px solid var(--line);border-radius:9px;box-shadow:0 2px 5px #28344a02;overflow:hidden}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-panel{display:flex;flex-direction:column;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-heading{display:flex;align-items:center;gap:8px;justify-content:space-between;padding:12px 15px;border-bottom:1px solid var(--line);flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-heading strong{font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-heading>.count{margin-left:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort{position:relative;display:block;margin-left:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort>summary{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:4px;list-style:none;cursor:pointer;background:white;border:1px solid #dce2e9;border-radius:5px;color:#68768b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort>summary:hover,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort.custom-sort>summary{background:#efedfb;color:#5d54bc;border-color:#d2cdeb}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:var(--z-dropdown);width:218px;padding:6px;background:white;border:1px solid #dce2e9;border-radius:8px;box-shadow:0 8px 24px #23324924;color:#475870}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort-menu>strong{display:block;font-size:11px;padding:6px 8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort-menu>button{display:flex;justify-content:space-between;width:100%;border:0;padding:8px;font-size:11px;font-weight:500;text-align:left}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort-menu>button[aria-pressed=true]{background:#f0eefc;color:#554bb1}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-sort-menu>small{display:block;padding:8px;font-size:10px;font-weight:400;color:#778397;line-height:1.5}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .list-controls{display:flex;gap:7px;padding:10px 12px;flex-shrink:0;border-bottom:1px solid var(--line)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-search{flex:1;width:0;min-width:0;height:34px;font-size:11px;padding:7px 8px;border-radius:5px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(#work-type-menu,#work-filter-menu) .scope-popover-panel{width:200px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options button strong{font-weight:600}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-list{overflow-y:auto;flex:1;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row{display:flex;width:100%;padding:15px 16px;border:0;border-bottom:1px solid #edf0f5;border-radius:0;text-align:left;position:relative;font-weight:400;background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row:hover{background:#fafaff}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row.selected{background:#f4f3ff}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row.selected:before{content:"";position:absolute;top:0;bottom:0;left:0;width:3px;background:var(--primary)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row.done{opacity:.6}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-info{flex:1;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-top strong{font-size:14px;font-weight:650;line-height:20px;min-width:0;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:19px;font-weight:500;margin:5px 0 8px;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;font-size:11px;line-height:17px;color:#647287}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-assignee{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-assignee.unassigned{font-weight:600;color:#72614b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-owner{display:flex;align-items:baseline;min-width:0;flex:1}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-work-type{flex:none;white-space:pre;font-size:10px;font-weight:400;color:#8a94a3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-due{text-align:right;flex-shrink:0;max-width:65%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-due.overdue{color:#ac3434;font-weight:600}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-submeta{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;margin-top:6px;font-size:10px;line-height:15px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-queue{color:#798399;font-size:10px;min-width:0;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-review{font-size:10px;color:#5b51ae;font-weight:600;text-align:right;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-flag{display:block;margin-top:5px;color:#a65d35;font-size:10px;line-height:15px;font-weight:500}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority{font-size:10px;line-height:15px;font-weight:650;white-space:nowrap;padding:2px 6px;border-radius:4px;color:#6c788d;background:#f0f3f7}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .priority-critical,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .priority-stat{background:#ffe6e8;color:#a32b3b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .priority-high,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .priority-urgent{background:#fff0df;color:#975416}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .priority-low{color:#6d7d86;background:#f4f6f7}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-footer{padding:11px 15px;display:flex;justify-content:space-between;font-size:9px;color:#9aa3b0;background:#fcfcfe;border-top:1px solid var(--line);flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail{display:flex;flex-direction:column;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-head{padding:12px 20px 10px;border-bottom:1px solid var(--line);flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient h2{font-size:14px;letter-spacing:0;font-weight:650}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient .avatar{display:grid;place-items:center;width:27px;height:27px;font-size:10px;border-radius:6px;background:#efeffa;color:#6565a7;font-weight:650}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-identity{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .pill{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:550;padding:3px 7px;border-radius:5px;white-space:nowrap;background:#f1f3f6;color:#6d798c;line-height:1.4}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .pill.status{background:#edf6f5;color:#5b9588}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions :is(button,a),:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .record-more>summary{font-size:10px;padding:5px 8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions a{border:1px solid #d9dee7;border-radius:6px;text-decoration:none;background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-title{font-size:20px;font-weight:620;letter-spacing:-.3px;margin-top:9px;line-height:1.3;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .metadata{display:flex;flex-wrap:wrap;align-items:flex-start;gap:3px 14px;padding:6px 20px;background:white;border-bottom:1px solid var(--line);flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .metadata-value{border:0;background:none;padding:4px 0;min-height:25px;line-height:17px;font-size:11px;font-weight:550}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .metadata-value>span{font-weight:400;color:#778397;margin-right:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-controls,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-controls-row{display:contents}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control{position:relative;display:flex;align-items:flex-start;gap:5px;min-width:0;font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>label{margin:0;padding-top:4px;line-height:17px;font-size:11px;font-weight:400;color:#778397;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>.work-fixed-priority{display:flex;align-items:center;min-height:25px;padding:4px 0;line-height:17px;font-size:11px;font-weight:550}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>button,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>select,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>input[type="date"]{margin:0;width:auto;max-width:220px;min-height:25px;border:1px solid #dce2e9;border-radius:5px;background:white;padding:3px 7px;font-size:11px;line-height:17px;font-weight:550}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>button{display:flex;align-items:center;gap:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Anchor native menus below their trigger rather than the flex row’s center. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>.work-metadata-menu{top:100%;left:0;right:auto;margin-top:4px;width:240px;max-width:calc(100vw - 48px);font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>.work-metadata-menu button{font-size:11px;line-height:17px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>.work-metadata-menu input{font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field="assignee"],:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field-control="assignee"]{order:1}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field="priority"],:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field-control="priority"]{order:2}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field="deadline"],:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field-control="deadline"]{order:3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field="schedule"]{order:4}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field="queue"],:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field-control="queue"]{order:5}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-queue-label{margin-left:0;color:#738093}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-body{padding:13px 20px;overflow-y:auto;flex:1;min-height:0;background:#f0f2f5}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-detail-content{font-size:15px;line-height:1.55;color:#29374a;max-width:78ch;margin:0 auto;overflow-wrap:anywhere;background:white;border:1px solid #d7dde5;border-radius:8px;padding:22px 24px;box-shadow:0 1px 3px #26334608}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer{padding:9px 20px;min-height:0;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:white;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer button{padding:6px 10px;font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .footer-left,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .footer-right{display:flex;gap:7px;align-items:center}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .record-more{position:relative}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .record-more summary{cursor:pointer;border:1px solid #dce2e8;border-radius:6px;list-style:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .record-more>div{position:absolute;right:0;top:100%;z-index:var(--z-dropdown);width:220px;padding:6px;background:white;border:1px solid #dce2e8;box-shadow:0 8px 20px #22334422;border-radius:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .record-more button{display:block;width:100%;text-align:left;border:0;padding:9px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .empty{padding:45px 25px;text-align:center;color:var(--muted);font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .empty h3{margin-bottom:9px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-incomplete,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .outside-filter{padding:8px 12px;background:#fff8eb;color:#856943;font-size:11px;border-bottom:1px solid #eadbc0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-placeholder{padding:24px;color:#7b8797;font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog{padding:0;width:min(1180px,calc(100vw - 64px));height:calc(100dvh - 64px);max-width:none;max-height:none;border:1px solid #cbd2dc;border-radius:12px;background:#f1f3f6;box-shadow:0 24px 80px #17223545;overflow:visible;color:var(--ink)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog::backdrop{background:rgba(27,36,51,.48)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail{width:100%;height:100%;min-height:0;max-height:100%;display:flex;border:0;border-radius:12px;background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;padding:9px 20px;border-bottom:1px solid #e4e8ef;background:#f6f7f9;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation>div{grid-column:2;display:flex;gap:6px;justify-self:center}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation>[data-work-reading="close"]{grid-column:3;justify-self:end}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation span{font-size:11px;color:#69758b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation button{padding:5px 9px;font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail-body{padding:22px 28px;background:#eef0f3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .day-detail-content{font-size:16px;max-width:80ch;padding:26px 30px}
#work-toast.work-toast{margin:0;inset:auto;border:0;max-width:min(90vw,640px);position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#343f55;color:white;border-radius:8px;padding:13px 20px;font-size:12px;box-shadow:0 6px 30px #0002;z-index:var(--z-toast)}
@media(max-width:1180px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root){padding:12px 18px 18px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-workspace{grid-template-columns:310px minmax(0,1fr)}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row{padding:13px 11px;gap:8px}}
@media(max-width:1100px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-toolbar{flex-wrap:wrap}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs{flex-basis:100%;margin-right:0}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-top{flex-wrap:wrap}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions{margin-left:auto}}
@media(max-width:760px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root){padding:12px;height:calc(100dvh - var(--work-header-height,62px));min-height:0}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-toolbar{flex-wrap:wrap;gap:8px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs{flex-basis:100%}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-scope-controls{flex:1;min-width:185px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-scope{gap:6px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-chips{order:4;flex-basis:100%}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-chips:empty{display:none}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-popover-panel{width:min(300px,calc(100vw - 48px))}:is(#shared-work-root,#dashboard-work-root,#dashboard-root,.patient-work-root) .create-sheet{width:min(300px,calc(100vw - 32px))}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .create-dropdown{margin-left:auto}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-workspace{display:flex;flex-direction:column;min-height:0}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-panel{flex:1;min-height:250px;max-height:none}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail:not(dialog #work-detail){display:none}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-top{flex-wrap:wrap;gap:5px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-actions{flex-wrap:wrap;margin-left:auto}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-title{font-size:18px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-queue-label{margin-left:0}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog{width:calc(100vw - 16px);height:calc(100dvh - 24px);border-radius:9px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog #work-detail{display:flex;min-height:0;border-radius:9px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail-body{padding:10px;overflow-y:auto}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .day-detail-content{font-size:15px;padding:17px 14px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation{padding:8px 10px;gap:6px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation span{display:none}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .reading-navigation button{padding:6px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail-footer{padding:8px 12px}#work-toast.work-toast{margin:0;inset:auto;border:0;max-width:min(90vw,640px);width:90%;text-align:center}}
@media(max-width:760px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root){padding:12px 12px 16px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-toolbar{flex-direction:column}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs{flex:0 0 auto}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-scope-controls{flex:1 1 auto;width:auto}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .display-toolbar{display:flex;align-items:flex-start;flex-direction:column}}
/* Same calendar columns/cards as the reference, with complete 24h / 7-day coverage. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-calendar{flex:1;min-height:0;overflow:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-coverage{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 9px;font-size:10px;color:#738093}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-coverage button{font-size:10px;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .date-nav{display:flex;align-items:center;gap:6px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .date-nav button{font-size:11px;padding:6px 10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .date-nav input{font-size:12px;font-weight:600;padding:6px 8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .date-nav span{font-size:10px;color:#8b96a6;margin-left:7px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-overview{background:white;border:1px solid var(--line);border-radius:9px;overflow:hidden;margin-bottom:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-heading{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;gap:12px;border-bottom:1px solid var(--line);font-size:11px;color:#8190a4}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-heading h2{font-size:16px;color:#3f4e65}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-heading p{font-size:10px;margin-top:3px;color:#939ead}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-heading>span{font-size:10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-scroll{overflow-x:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-grid{display:grid;grid-template-columns:38px repeat(var(--calendar-days),minmax(145px,1fr));min-width:calc(38px + var(--calendar-days)*145px)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-axis{display:grid;grid-template-rows:60px var(--calendar-track-height,600px) auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-time-axis{position:relative;font-size:9px;color:#a4aebb}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-time-axis span{position:absolute;right:6px;transform:translateY(-50%)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-column{border-left:1px solid #edf0f5;display:flex;flex-direction:column;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-column.selected-day{background:#fafaff}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-day-button{height:60px;display:flex;align-items:center;justify-content:space-between;padding:11px 14px;background:transparent;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-day-button>span{font-size:10px;color:#8a95a5;letter-spacing:.7px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-day-button strong{font-size:21px;font-weight:550;color:#586880}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .selected-day .week-day-button strong{color:#6661ce}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-day-track{height:var(--calendar-track-height,600px);position:relative;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--calendar-hour-height,60px) - 1px),#eef0f5 calc(var(--calendar-hour-height,60px) - 1px),#eef0f5 var(--calendar-hour-height,60px));border-top:1px solid #edf0f5;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event{position:absolute;border:1px solid #cdd8f0;background:#edf1ff;color:#7184b3;border-radius:4px;text-align:left;font-size:11px;font-weight:400;padding:3px 6px;overflow:hidden;text-overflow:ellipsis;line-height:14px;z-index:var(--z-content);min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event b{display:block;font-size:10px;font-weight:600;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event strong,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.npv,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.medrec{color:#769e91;background:#e9f5ef;border-color:#c7e0d3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.time-marker{border-style:dashed;background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event:hover,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event:focus-visible{z-index:var(--z-content-active);filter:brightness(.96)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-no-events{position:absolute;top:100px;left:0;right:0;text-align:center;color:#b2bac6;font-size:10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-flex,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-deadlines{padding:9px 12px;min-height:57px;border-top:1px solid #edf0f5;display:flex;flex-direction:column;gap:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.week-flex,.week-deadlines)>span{font-size:8px;font-weight:600;letter-spacing:.7px;color:#a0a9b8}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.week-flex,.week-deadlines)>small{font-size:9px;color:#aab2bd}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-flexible{border:0;background:#f0f2ff;color:#8891b5;padding:3px 6px;font-size:9px;text-align:left;border-radius:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.calendar-flexible,.week-due) strong,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.calendar-flexible,.week-due) span{display:block;overflow-wrap:anywhere;font-size:9px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-due{padding:7px 8px;border:1px solid #e6e9f2;border-radius:5px;text-align:left;display:flex;flex-direction:column;gap:3px;background:#fcfcff;font-size:10px;color:#7a859c}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-footer{display:flex;justify-content:space-between;align-items:center;padding:7px 15px;background:#fcfdff;border-top:1px solid var(--line);font-size:9px;color:#99a4b5;gap:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-grid{min-width:0;grid-template-columns:38px minmax(0,1fr)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-event{font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-event :is(b,strong,span){font-size:10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-day-button{height:44px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-axis{grid-template-rows:44px var(--calendar-track-height,600px) auto}
@media(max-width:760px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-controls{flex-wrap:wrap;gap:8px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .date-nav{flex-wrap:wrap}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .date-nav span{flex-basis:100%;margin-left:0}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-heading{flex-wrap:wrap}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-footer{flex-wrap:wrap}}

/* The queue can be hidden without remounting the selected work or losing scroll. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-workspace.queue-collapsed{grid-template-columns:minmax(0,1fr)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-panel[hidden]{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-toggle-queue{display:flex;align-items:center;justify-content:center;padding:7px;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-toggle-queue[hidden]{display:none}
@media(max-width:760px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-collapsed #work-detail:not(dialog #work-detail){display:flex;flex:1;min-height:0}}

/* Tickets already frame the message: omit additional nested cards. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-body.ticket-body,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail-body.ticket-body{background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .ticket-body .day-detail-content,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .ticket-body .day-detail-content{border:0;border-radius:0;box-shadow:none;padding:0;background:transparent}

/* Loading stays local to the panel; existing content never flashes blank. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-panel,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail{position:relative}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-panel:has(#work-list[aria-busy=true])::before,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail[aria-busy=true]::before{content:"";position:absolute;top:0;left:0;width:35%;height:3px;background:var(--primary);z-index:var(--z-toast);animation:work-progress 1.2s ease-in-out infinite}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail[aria-busy=true]::after{content:"Loading work…";position:absolute;bottom:62px;left:50%;transform:translateX(-50%);padding:8px 14px;background:white;border:1px solid var(--line);border-radius:20px;box-shadow:0 3px 12px #23324920;font-size:12px;color:var(--muted);pointer-events:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail[aria-busy=true] .detail-body,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail[aria-busy=true] .detail-footer{opacity:.55;pointer-events:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-loading,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-page-status{display:flex;gap:9px;align-items:center;justify-content:center;font-size:12px;color:var(--muted);padding:14px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-load-more{min-height:38px;text-align:center;padding:8px 12px 14px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-page-status:empty{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-spinner{width:16px;height:16px;border:2px solid #e4e4f6;border-top-color:var(--primary);border-radius:50%;animation:work-spin .75s linear infinite;flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-skeleton{padding:18px 15px;border-bottom:1px solid var(--line)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-skeleton span{display:block;height:11px;width:70%;margin:0 0 10px;border-radius:4px;background:linear-gradient(90deg,#edf0f5 25%,#f9fafc 50%,#edf0f5 75%);background-size:200% 100%;animation:work-shimmer 1.3s linear infinite}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-skeleton span:nth-child(2){width:90%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-skeleton span:nth-child(3){width:50%;margin:0;height:9px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row{animation:work-arrive .18s ease-out}
@keyframes work-spin{to{transform:rotate(360deg)}}
@keyframes work-shimmer{to{background-position:-200% 0}}
@keyframes work-progress{0%{left:-35%}100%{left:100%}}
@keyframes work-arrive{from{opacity:.4}to{opacity:1}}
@media(prefers-reduced-motion:reduce){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-spinner,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-skeleton span,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-row,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .queue-panel::before,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-detail::before{animation:none}}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .footer-right{flex-wrap:wrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-ticket-actions{width:100%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-ticket-actions>div{gap:6px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-ticket-actions>div>.flex-1{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-ticket-actions button,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-ticket-actions a{font-size:11px;padding:6px 9px;border-radius:6px}

.work-reschedule-modal { width:min(460px,calc(100vw - 32px)); max-height:calc(100vh - 48px); overflow:auto; padding:24px; border:1px solid #d1d5db; border-radius:12px; background:white; box-shadow:0 24px 64px #0003; }
.work-reschedule-modal::backdrop { background:rgb(15 23 42 / .45); }
.work-reschedule-modal input,.work-reschedule-modal select { width:100%; }

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-control{border-top:1px solid #edf0f3;margin:6px 6px 0;padding:12px 6px 0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-control label{display:grid;gap:6px;font-size:12px;font-weight:550}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-control select{width:100%;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-control .work-manage-queues{margin:10px 0 6px}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-heading strong{font-size:12px;color:#64748b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-heading small{margin:3px 0 10px;font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-search input{width:100%;background:#f8fafc;font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queue-options{max-height:240px;overflow-y:auto;margin:7px -6px 0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options .scope-queue-option{display:flex;align-items:center;gap:9px;padding:10px 12px;line-height:1.4;font-weight:550}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-option>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-icon{display:grid;place-items:center;width:24px;height:24px;border:1px solid #e2e8f0;border-radius:5px;background:#f8fafc;color:#64748b;flex-shrink:0;font-size:17px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-option[aria-pressed=true] .scope-queue-icon{background:#e8e5ff;border-color:#d4ccff;color:#594dce}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-check{color:#594dce;font-size:13px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-empty{padding:10px 12px;margin:0;color:#738093;font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-scope-picker.queue-view>summary{background:#f1efff;border-color:#d7d2f9;color:#594dce}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-scope-label{max-width:245px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Native actions share one footer; menus open into the available body space. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer .work-source-actions { margin:0; padding:0; border:0; display:flex; align-items:center; gap:8px; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer .work-ticket-actions { width:auto; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer .work-ticket-actions > div { gap:8px; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer button, :is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer [data-escalation-action-menu] > summary { min-height:32px; padding:6px 10px; font-size:12px; line-height:18px; border-radius:6px; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer [data-escalation-action-menu] > div { top:auto; bottom:calc(100% + 8px); left:auto; right:0; margin:0; max-height:min(440px,60vh); overflow-y:auto; }

/* The combined view menu reveals queue choices on demand. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-control { position:relative; margin:6px 0 0; padding:6px 0 0; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options .scope-queues-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queues-trigger[aria-expanded=true] { background:#f1efff; color:#594dce; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queues-trigger>span:last-child { font-size:22px; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queues-submenu { position:absolute; top:0; left:100%; width:300px; padding:14px; border:1px solid #dce2e9; border-radius:10px; background:white; box-shadow:0 12px 30px #22334424; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queues-submenu[hidden] { display:none; }
@media(max-width:760px) { :is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queues-submenu { position:static; width:100%; margin-top:4px; box-shadow:none; border:0; border-top:1px solid #edf0f3; border-radius:0; } }

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-assignee-options{max-height:240px;overflow-y:auto;margin:7px -6px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-control .scope-assignee-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:6px;font-family:inherit;font-size:13px;line-height:1.4;font-weight:550;cursor:pointer}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-assignee-option:hover{background:#f5f6fc}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-assignee-option:has(:checked){background:#f1efff;color:#594dce}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-assignee-option input{width:16px;height:16px;margin:0;accent-color:#6366f1;flex-shrink:0}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queues-trigger[aria-pressed=true]{background:#f1efff;color:#594dce}

/* Scheduled sidebar groups use the work item's local calendar day. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scheduled-list-heading{display:flex;align-items:center;justify-content:space-between;margin:0;padding:9px 15px;background:#f3f5f9;border-bottom:1px solid #e4e8ef;color:#526078;font-size:11px;font-weight:650;line-height:16px;position:sticky;top:0;z-index:var(--z-sticky)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-scheduled-group="past"] .scheduled-list-heading{background:#fff1f2;color:#b42336}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scheduled-list-count{font-size:10px;font-weight:550;color:inherit}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scheduled-list-empty{padding:10px 15px;color:#8792a2;font-size:11px;border-bottom:1px solid #eef0f4}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event strong{font-weight:600}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .type-check{width:14px;height:14px;border:1px solid #a7b1c2;border-radius:3px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;margin-right:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [role="checkbox"][aria-checked="true"] .type-check{background:var(--primary);border-color:var(--primary);color:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [role="checkbox"][aria-checked="true"] .type-check::after{content:"✓";font-size:11px}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options [data-work-type]{display:flex;align-items:center}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-controls{position:sticky;top:0;z-index:var(--z-sticky);background:var(--bg)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event{color:#3c526e}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.npv,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.medrec{color:#315d4e}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-event :is(strong,span){font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .day-calendar .week-event b{font-size:11px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control>input[type=date]{border:1px solid #dce2e9;border-radius:5px;background:white;padding:3px 7px;font:inherit;min-height:25px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-field-control="deadline"]{order:3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-discussion{border-top:1px solid var(--line);padding-top:20px;margin-top:20px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-closed{padding:10px 12px;background:#f3f4f8;border-radius:6px;color:#647287;font-size:13px;margin-bottom:16px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-actions button{border:1px solid #dce2e9;border-radius:5px;background:#f3f4f6;color:#475569;cursor:pointer}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-actions .review-action-complete{background:#16a34a;border-color:#16a34a;color:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-actions .review-action-snooze{background:#eab308;border-color:#eab308;color:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-actions .review-action-archive{background:#d97706;border-color:#d97706;color:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-actions .review-action-delete{background:#dc2626;border-color:#dc2626;color:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog{width:min(460px,calc(100vw - 32px));border:1px solid #dce2e9;border-radius:10px;padding:20px;color:var(--ink);box-shadow:0 16px 60px #24324230}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog::backdrop{background:#24324266}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog h3{font-size:18px;font-weight:650;margin:0 0 16px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog label{display:grid;gap:6px;margin:12px 0;font-size:13px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog :is(input,select,textarea){font:inherit;border:1px solid #dce2e9;border-radius:6px;padding:8px;width:100%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .review-task-dialog-actions button{padding:8px 12px;border:1px solid #dce2e9;border-radius:6px;cursor:pointer}

/* Schedule rail shares the existing all-date list, filters and pagination. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode #work-workspace > #work-detail,
:is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode #work-reading-placeholder{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode #work-calendar{height:100%;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-schedule-status{display:block;font-size:11px;color:#58657d;margin-top:3px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-item-status{display:block!important;font-size:11px!important;line-height:1.3;font-weight:600;white-space:normal;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.calendar-item-status,.row-schedule-status).status-completed{color:#26744f}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.calendar-item-status,.row-schedule-status).status-cancelled{color:#8a5151}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) :is(.calendar-item-status,.row-schedule-status).status-archived{color:#647086}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.status-completed{background:#f0f6f2;border-color:#d4e4db}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.status-cancelled{background:#f7f0f0;border-color:#ead6d6}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-event.status-archived{background:#f2f3f5;border-color:#dde1e8}
@media(max-width:760px){
  :is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode .queue-panel{flex:0 0 210px;min-height:0}
  :is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode #work-calendar{flex:1;min-height:0;height:auto}
}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-calendar-key].calendar-selected{outline:2px solid var(--primary);outline-offset:1px}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-view-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-calendar-hours]{font-size:11px;padding:6px 9px}

/* Calendar navigation is outside the scrolling calendar surface. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-calendar-toolbar{flex-shrink:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-calendar-toolbar .calendar-controls{position:static;margin-bottom:8px}

/* Current time belongs only to today's timed column, in the calendar timezone. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-column.current-day .week-day-button strong{position:relative;color:#b42d37}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .week-column.current-day .week-day-button strong::after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:30px;height:30px;border:1px solid #c23c4580;border-radius:50%;pointer-events:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-now{position:absolute;left:0;right:0;height:0;border-top:2px solid #c23c45;z-index:var(--z-content-indicator);pointer-events:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-now::before{content:"";position:absolute;left:-4px;top:-5px;width:8px;height:8px;border-radius:50%;background:#c23c45}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .calendar-now-label{position:absolute;left:5px;bottom:3px;padding:1px 4px;border-radius:3px;background:white;color:#b42d37;font-size:10px;font-weight:650;line-height:14px;white-space:nowrap;box-shadow:0 0 0 1px #c23c4533}

/* Four-section workspace; legacy rendering stays behind its existing flag. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"]{padding-bottom:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"] .queue-heading{justify-content:space-between}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"] .queue-heading #work-list-sort{margin:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"] .queue-footer{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards-mode{display:block;overflow:hidden}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards-mode>#work-detail,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards-mode>#work-reading-placeholder,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode>#work-detail,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode>#work-reading-placeholder{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards{height:100%;overflow:auto;max-width:980px;margin:0 auto;padding:0 2px 16px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode{display:block}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode>.queue-panel{width:100%;height:100%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .list-controls{max-width:420px}
/* Shared rows use the native tickets/queue.html and _ticket_row.html styling. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table{width:100%;border-collapse:collapse;font:14px/1.5 ui-sans-serif,system-ui,sans-serif;min-width:1100px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table th{position:sticky;top:0;background:#f9fafb;z-index:var(--z-sticky);padding:12px 24px;border-bottom:1px solid #e5e7eb}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table td{padding:16px 24px;vertical-align:middle;border-bottom:1px solid #e5e7eb}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table button{border:0;background:transparent;padding:0;border-radius:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table th button{font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table .work-table-title{color:#2563eb;font-weight:500;max-width:320px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-table-actions{position:relative}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-table-actions summary{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;cursor:pointer;list-style:none;padding:6px 10px;border:1px solid #dce2e9;background:white;border-radius:6px;font-size:12px;font-weight:600;color:#475569}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-table-actions summary:hover{background:#f9fafb}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-table-actions summary::-webkit-details-marker{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-table-actions>div{position:absolute;right:0;top:calc(100% + 4px);min-width:155px;z-index:var(--z-dropdown);border:1px solid var(--line);background:white;border-radius:7px;box-shadow:0 8px 24px #26334620;padding:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-table-actions button{display:block;width:100%;text-align:left;border:0;font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) :is(.work-task-table,.po-task-actions) .work-table-actions button{padding:8px 10px;border-radius:4px;color:#374151;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) :is(.work-task-table,.po-task-actions) .work-table-actions button:hover{background:#f3f4f6}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-scheduled-time{display:flex;gap:8px;align-items:baseline;font-size:17px;font-weight:700;line-height:1.35;color:#373365;margin-bottom:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .row-scheduled-time small{font-size:11px;font-weight:500;color:var(--muted)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"][data-mode="calendar"] #work-calendar{flex:1;min-height:0;width:100%}
@media(max-width:1000px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"] .work-toolbar{flex-wrap:wrap}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .queue-list{overflow:auto}}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .list-controls{position:absolute;top:4px;left:48px;width:min(420px,calc(100% - 110px));border:0;padding:8px 0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table select{max-width:120px;padding:5px 7px;font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table .work-table-priority{border:0;border-radius:9999px;font-weight:600}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table .work-table-priority.bg-red-100{background:#fee2e2;color:#991b1b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table .work-table-priority.bg-orange-100{background:#ffedd5;color:#9a3412}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table .work-table-priority.bg-yellow-100{background:#fef9c3;color:#854d0e}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-task-table .work-table-priority.bg-gray-100{background:#f3f4f6;color:#1f2937}

/* The sort control sits on the left in the new panel; open into the panel. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"] .list-sort-menu{left:0;right:auto;max-width:calc(100vw - 64px)}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority-picker{position:relative}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority-picker summary{display:flex;justify-content:space-between;gap:16px;cursor:pointer;list-style:none;border:1px solid #dce2e9;border-radius:6px;background:white;padding:6px 10px;color:#374151;font-size:12px;font-weight:500}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority-picker .work-metadata-menu{position:absolute;top:100%;left:0;min-width:150px;z-index:var(--z-dropdown);background:white;border:1px solid #e5e7eb;border-radius:6px;padding:4px;box-shadow:0 8px 16px #0002}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority-picker button{display:block;width:100%;text-align:left;border:0;background:white;padding:8px 12px;border-radius:4px;color:#374151}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority-picker button:hover{background:#f3f4f6}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-priority-picker button[aria-pressed=true]{background:#e0e7ff;font-weight:600}
.work-resolution-dialog{width:min(480px,calc(100vw - 32px));padding:24px;border:1px solid #e5e7eb;border-radius:8px;background:white;color:#1f2937;box-shadow:0 20px 25px #0003}
.work-resolution-dialog::backdrop{background:#11182799}

/* Keep the shared work toolbar locked while the records scroll. */
body:has(:is(#shared-work-root,#dashboard-work-root,.patient-work-root)) #app-header{position:sticky;top:0;z-index:var(--z-nav)}

/* Native focus content fills the shared dialog without a second reading card. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="inbound_alert"] .day-detail-content,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail[data-body-type="inbound_alert"] .day-detail-content{max-width:none;width:100%;margin:0;border:0;border-radius:0;padding:0;box-shadow:none;background:transparent;font-size:14px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="inbound_alert"] .detail-body{background:white;padding:16px 20px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="inbound_alert"] .work-title,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="inbound_alert"] .metadata{display:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="clinical"] .day-detail-content{max-width:none;border:0;padding:0;box-shadow:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-native-clinical>section{border:0;border-radius:0}
/* Match Task reading width in the pane; expanded dialogs keep their layout. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-workspace>.detail[data-body-type="clinical"] .day-detail-content{width:100%;max-width:78ch;margin-inline:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-workspace>.detail[data-body-type="clinical"] .detail-body{background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail:is([data-source-kind="fax"],[data-source-kind="direct"]) .detail-body{padding:0;display:flex;overflow:hidden}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail:is([data-source-kind="fax"],[data-source-kind="direct"]) .day-detail-content{display:flex;flex:1;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-native-body:has(#vitals-review-body){padding:0;max-width:none}
/* Priority uses the same compact geometry as assignment and date fields. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-metadata-control .work-priority-picker summary{height:25px;min-height:25px;box-sizing:border-box;padding:3px 7px;border-radius:5px;font-size:11px;line-height:17px;font-weight:550;align-items:center}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog .detail[data-body-type="inbound_alert"] .detail-body{padding:16px 20px;background:white}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="inbound_alert"] #work-native-body .focus-card{padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;max-width:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail[data-body-type="inbound_alert"] #work-native-body .vitals-review-card{padding:0;background:transparent;border:0;border-radius:0;max-width:none}

/* Inbound/Alerts filters and Create scroll with their cards; app nav stays sticky. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"]:is([data-section="inbound"],[data-section="alerts"]){height:auto;min-height:calc(100dvh - var(--work-header-height,70px))}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards-mode{overflow:visible;flex:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards-mode .work-cards{height:auto;overflow:visible}
/* Native main-content uses max-w-7xl (1280px) with p-6 (24px per side). */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-cards-mode .work-cards{max-width:min(1232px,calc(100vw - 48px));width:100%;padding:0 0 16px}
/* Inbound and Alerts use the original focus modal as their presentation base. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"]{width:min(672px,calc(100vw - 32px));height:fit-content;max-height:90dvh;border:0;border-radius:12px;background:white;overflow:visible}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="vitals"]{width:min(896px,calc(100vw - 32px))}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"]{width:min(1180px,calc(100vw - 32px));height:90dvh}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .work-native-focus{position:relative;width:100%;max-width:none;margin:0;height:auto;max-height:90dvh;min-height:0;overflow:visible;border:0;box-shadow:none;font:16px/1.625 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-modal-header{padding:16px 24px;border-radius:12px 12px 0 0;gap:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-modal-header h3{min-width:0;overflow-wrap:anywhere}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .detail-body{padding:16px 24px;background:white;min-height:0;overflow-y:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .work-focus-content{width:100%;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-footer{padding:16px 24px;border-radius:0 0 12px 12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-actions{gap:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .work-focus-arrows{display:contents}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-nav-btn{font-size:24px;line-height:24px;width:48px;height:48px;padding:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-channel="sms"] .work-native-focus{height:90dvh}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-channel="sms"] .focus-body{display:flex;flex-direction:column;overflow:hidden}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-channel="sms"] #work-native-body,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-channel="sms"] #work-native-body>.focus-card{display:flex;flex:1;flex-direction:column;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"] .work-native-focus{height:90dvh}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"] .detail-body{display:flex;padding:0;overflow:hidden}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"] .work-focus-content{display:flex;flex:1;min-height:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"] .focus-footer{display:none}
@media(max-width:1024px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="vitals"] .work-focus-arrows,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"] .work-focus-arrows{display:flex;gap:4px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"]:is([data-focus-kind="vitals"],[data-focus-kind="document"]) .focus-nav-btn{position:static;transform:none;width:28px;height:28px;padding:2px;box-shadow:none}}
@media(max-width:800px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .work-focus-arrows{display:flex;gap:4px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-nav-btn{position:static;transform:none;width:28px;height:28px;padding:2px;box-shadow:none}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-modal-header{padding:12px 16px;gap:8px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .detail-body,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"] .focus-footer{padding:16px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-reading-dialog[data-layout="native-focus"][data-focus-kind="document"] .detail-body{padding:0}}
/* The native vitals owner row is needed when the generic metadata bar is absent. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-native-focus #work-native-body [data-vitals-owner]{display:flex}

/* Native ADT details keep event, timeline, and clinical context easy to scan. */
.work-adt-grid { display:grid; gap:16px; margin-top:16px; }
.work-adt-grid section { border:1px solid #e5e7eb; border-radius:8px; padding:16px; background:#f9fafb; }
.work-adt-grid h4 { font-size:14px; font-weight:600; color:#374151; margin:0 0 12px; }
.work-adt-grid dl { display:grid; grid-template-columns:140px minmax(0,1fr); gap:8px 16px; margin:0; font-size:14px; line-height:1.5; }
.work-adt-grid dt { color:#6b7280; }
.work-adt-grid dd { margin:0; color:#111827; white-space:pre-line; overflow-wrap:anywhere; }
@media(max-width:540px) { .work-adt-grid dl { grid-template-columns:1fr; gap:4px; } .work-adt-grid dd { margin-bottom:8px; } }

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-compose-control { position:relative; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer [data-work-compose] { display:inline-flex; align-items:center; justify-content:center; gap:6px; background:#e5e7eb; color:#1f2937; border:0; font-family:inherit; font-weight:400; cursor:pointer; transition:opacity .15s ease; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail-footer [data-work-compose]:hover { opacity:.9; }

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-compose-menu { position:absolute; bottom:calc(100% + 8px); left:0; z-index:var(--z-dropdown); min-width:170px; padding:4px; background:white; border:1px solid #e5e7eb; border-radius:8px; box-shadow:0 8px 24px #11182726; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-compose-menu[hidden] { display:none; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-compose-menu button { display:block; width:100%; text-align:left; border:0; background:white; color:#374151; white-space:nowrap; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-compose-menu button:hover, :is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-compose-menu button:focus-visible { background:#f3f4f6; }

/* Reclaim the table search/sort row while scrolling through records. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .queue-heading { transition:height .16s ease,padding .16s ease,opacity .16s ease; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .table-controls-hidden .queue-heading { height:0; min-height:0; padding-top:0; padding-bottom:0; opacity:0; border:0; overflow:hidden; visibility:hidden; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .table-controls-hidden .list-controls { visibility:hidden; opacity:0; pointer-events:none; }
@media(prefers-reduced-motion:reduce) { :is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-table-mode .queue-heading { transition:none; } }

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-row { display:flex; align-items:center; gap:4px; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-queue-row .scope-queue-option { flex:1; min-width:0; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options .scope-queue-star { flex-shrink:0; width:30px; padding:4px; border:0; background:transparent; font-size:19px; color:#9ca3af; text-align:center; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options .scope-queue-star[aria-pressed=true] { color:#6366f1; }
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options .scope-queue-star:hover { color:#6366f1; background:#f0f1ff; }

/* Reading text in Tasks; native utilities otherwise override the body size. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail:is([data-body-type="ticket"],[data-body-type="clinical"],[data-body-type="review"]) .day-detail-content,
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .detail:is([data-body-type="ticket"],[data-body-type="clinical"],[data-body-type="review"]) #work-native-body :is(.prose,p:not(.text-xs),blockquote,div:has(> .comment-text-part)) {
  font-size:16px;
  line-height:1.625;
}

#work-toast.work-toast[data-type="success"]{background:#15803d}
#work-toast.work-toast[data-type="error"]{background:#b91c1c}
#work-toast.work-toast::backdrop{background:transparent;pointer-events:none}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-document-host{position:relative}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-document-loading{position:absolute;inset:0;z-index:var(--z-content);display:flex;align-items:center;justify-content:center;gap:10px;background:#f8fafc;color:#64748b;font-size:14px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-document-review-frame{transition:opacity 150ms ease}
@media(prefers-reduced-motion:reduce){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-document-review-frame{transition:none}}

/* Keep an all-date agenda alongside the calendar; work bodies open in the modal. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode .day-workspace{grid-template-columns:300px minmax(0,1fr)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode .queue-heading{justify-content:flex-start}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root).calendar-rail-mode #work-list-title{font-size:13px;font-weight:600}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queue-menu.queue-view>summary{background:#f1efff;border-color:#d7d2f9;color:#594dce}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queue-label{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queues-submenu.scope-popover-panel{width:320px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queues-submenu .scope-queue-search{display:block;margin-bottom:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queues-submenu .scope-queue-row{padding-right:8px}
@media(max-width:760px){:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-queues-submenu.scope-popover-panel{width:min(320px,calc(100vw - 48px))}}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-choice{display:flex;align-items:center;gap:9px;padding:8px 0;font-size:13px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-choice input{width:auto}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-presence-note,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-reminder-note{font-size:12px;color:#64748b;width:100%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-reminder-note button{border:0;background:transparent;color:#594dce;text-decoration:underline;padding:0 4px}

/* Table menus share the compact scope-menu geometry and app button typography. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) :is(.work-task-table,.po-task-actions) .work-table-actions>div{min-width:190px;padding:6px;border-color:#dce2e8;border-radius:8px;box-shadow:0 12px 32px #24324226}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) :is(.work-task-table,.po-task-actions) .work-table-actions button{font-family:inherit;font-size:13px;line-height:1.5;font-weight:500;padding:8px 10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) :is(.work-task-table,.po-task-actions) .work-table-actions button.destructive{color:#b91c1c}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) :is(.work-task-table,.po-task-actions) .work-table-actions button.destructive:hover{background:#fef2f2}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill{display:inline-flex;align-items:center;white-space:nowrap;max-width:100%;padding:3px 9px;border:1px solid transparent;border-radius:9999px;font-family:inherit;font-size:12px;line-height:18px;font-weight:600}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-open{background:#eff6ff;border-color:#dbeafe;color:#1e40af}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-in-review{background:#eef2ff;border-color:#e0e7ff;color:#3730a3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-waiting{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-snoozed{background:#fffbeb;border-color:#fde68a;color:#92400e}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-completed{background:#f0fdf4;border-color:#bbf7d0;color:#166534}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-cancelled{background:#fef2f2;border-color:#fecaca;color:#991b1b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-unassigned{background:white;border-color:#d1d5db;border-style:dashed;color:#4b5563}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root,.po-work-lanes) .work-status-pill.status-archived{background:#f3f4f6;border-color:#e5e7eb;color:#374151}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-status-reminder{margin-top:6px;font-size:12px;line-height:18px;color:#64748b}
.work-row-action-dialog{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}
.work-row-action-dialog h3{font-size:18px;font-weight:600;margin:0 0 6px}
.work-row-action-dialog .work-action-context{color:#64748b;font-size:12px;margin:0 0 18px;overflow-wrap:anywhere}
.work-row-action-dialog label{display:grid;gap:6px;font-size:13px;margin:14px 0}
.work-row-action-dialog :is(input,select,textarea){width:100%;font:inherit;padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;background:white;color:#374151}
.work-row-action-dialog .work-action-help{font-size:12px;color:#64748b;margin-top:8px}
.work-row-action-dialog [data-error]{color:#b91c1c;font-size:13px;margin-top:12px}
.work-row-action-buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.work-row-action-buttons button{font:inherit;font-size:13px;font-weight:500;border:1px solid #d1d5db;border-radius:6px;padding:8px 12px;background:white;color:#374151;cursor:pointer}
.work-row-action-buttons button.primary{background:#6366f1;border-color:#6366f1;color:white}
.work-row-action-buttons button.danger{background:#b91c1c;border-color:#b91c1c;color:white}
.work-row-action-buttons button:disabled{opacity:.55;cursor:wait}
.work-outcome-dialog{width:min(560px,calc(100vw - 32px));max-height:90dvh;overflow:auto;padding:24px;border:1px solid #e5e7eb;border-radius:12px;background:white;color:#1f2937;box-shadow:0 24px 64px #0003}
.work-outcome-dialog::backdrop{background:rgb(15 23 42 / .48)}
.work-outcome-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:1px solid #e5e7eb;padding-bottom:12px;margin-bottom:18px}
.work-outcome-heading .work-action-context{margin:2px 0 0}
.work-outcome-heading button{border:0;background:transparent;color:#64748b;font-size:24px;line-height:1;cursor:pointer}
.work-outcome-dialog fieldset{border:0;margin:0;padding:0}
.work-outcome-dialog legend{font-size:12px;font-weight:650;color:#475569;margin-bottom:8px}
.work-outcome-options{display:grid;gap:7px}
.work-row-action-dialog .work-outcome-option{display:flex;align-items:center;gap:11px;margin:0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;cursor:pointer}
.work-row-action-dialog .work-outcome-option:has(input:checked){border-color:#818cf8;background:#f5f5ff}
.work-row-action-dialog .work-outcome-option input{width:16px;height:16px;margin:0;accent-color:#6366f1;flex:none}
.work-outcome-option span{display:grid;gap:1px}.work-outcome-option strong{font-size:13px;color:#1f2937}.work-outcome-option small{font-size:12px;color:#64748b;line-height:1.3}
.work-outcome-optional{font-weight:400;color:#94a3b8}
.work-outcome-dialog [data-work-outcome-note] label{display:block}
.work-outcome-dialog [data-work-outcome-note] textarea{display:block;margin-top:6px}
.work-outcome-dialog [data-work-outcome-next]{border-top:1px solid #e5e7eb;margin-top:16px;padding-top:12px}
.work-row-action-dialog .work-outcome-checkbox{display:flex;align-items:center;gap:8px;margin:2px 0 10px}
.work-row-action-dialog .work-outcome-checkbox input{width:16px;height:16px;margin:0;accent-color:#6366f1}
.work-outcome-next-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.work-outcome-next-fields label{margin:4px 0}
.work-outcome-dialog .work-row-action-buttons{border-top:1px solid #e5e7eb;padding-top:16px;margin-top:18px}
.work-outcome-dialog [hidden]{display:none!important}.work-outcome-task-link{display:inline-flex;color:#4338ca;font-weight:600;margin:8px 0 18px}
.work-outcome-task-summary{margin:12px 0 16px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc}.work-outcome-task-summary .work-outcome-task-link{display:block;margin:0;font-size:13px}.work-outcome-task-summary p{margin:3px 0 0;font-size:12px;color:#64748b}
.work-outcome-owner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 0 23px;color:#475569;font-size:13px}.work-outcome-owner button{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#4338ca;padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer}.work-outcome-owner button:hover{background:#f5f3ff}
.work-outcome-primary{display:block;margin-left:auto;background:#6366f1;color:white;border:0;border-radius:6px;padding:8px 14px;cursor:pointer}
@media(max-width:540px){.work-outcome-next-fields{grid-template-columns:1fr}}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) select.work-table-status{cursor:pointer;padding-right:28px;text-align:left;min-height:26px;appearance:auto;max-width:220px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) select.work-table-status:disabled{cursor:wait;opacity:.65}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) select.work-table-status option{background:white;color:#1f2937}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-created-info{display:flex;flex-wrap:wrap;gap:4px 6px;color:#6b7280;font-size:12px;margin-top:5px;line-height:1.5}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-created-info strong,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-created-info time{font-weight:400;color:#4b5563;margin-left:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-status-detail{font-size:11px;font-weight:400;color:#6b7280;margin-top:3px}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-priority-tone="critical"] .work-priority-picker>summary{background:#fee2e2;border-color:#fecaca;color:#991b1b}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-priority-tone="high"] .work-priority-picker>summary{background:#ffedd5;border-color:#fed7aa;color:#9a3412}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-priority-tone="normal"] .work-priority-picker>summary{background:#fef9c3;border-color:#fde68a;color:#854d0e}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-priority-tone="low"] .work-priority-picker>summary{background:#f3f4f6;border-color:#e5e7eb;color:#374151}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-heading{display:flex;align-items:center;gap:7px;white-space:nowrap}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter{position:relative;font-size:12px;font-weight:400;text-transform:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter>summary{list-style:none;cursor:pointer;padding:2px 5px;color:#6b7280}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter.filtered>summary{color:#1d4ed8;background:#eff6ff;border-radius:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter>div{position:absolute;top:100%;right:0;z-index:var(--z-dropdown);min-width:235px;padding:14px;background:white;border:1px solid #d1d5db;box-shadow:0 8px 24px #11182722;border-radius:7px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter label{display:block;margin-top:10px;color:#4b5563}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter input{display:block;width:100%;margin-top:4px;padding:6px;border:1px solid #d1d5db;border-radius:5px;color:#1f2937}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-buttons{display:flex;justify-content:space-between;gap:12px;margin-top:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-buttons button{padding:5px 9px;border:1px solid #d1d5db;border-radius:5px}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-column-options{min-width:260px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-help{font-size:12px;color:#6b7280;margin:4px 8px 10px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-row .work-column-choice{flex:1}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-move{display:flex;gap:3px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-move button{border:1px solid #e5e7eb;border-radius:4px;background:white;color:#4b5563;width:26px;height:26px;padding:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-move button:disabled{opacity:.3;cursor:default}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-created-info>span+span:before{content:'·';margin-right:6px;color:#9ca3af}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter label,:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-date-filter input{text-transform:none;font-size:12px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-columns-menu .scope-popover-panel{max-height:75vh;overflow-y:auto}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-name{display:inline-flex;align-items:center;gap:8px;cursor:grab;padding:3px 0;width:100%;user-select:none}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-name:active{cursor:grabbing}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-name:focus-visible{outline:2px solid #2563eb;border-radius:3px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-grip{font-size:17px;color:#9ca3af}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-row.dragging{opacity:.45}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-column-row.column-drop-target{box-shadow:inset 0 2px 0 #2563eb;background:#eff6ff}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-reset-columns{font-size:12px;color:#2563eb;padding:4px 8px;margin-bottom:6px;text-align:left;border-radius:4px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-reset-columns:hover{background:#eff6ff}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-linked-calls{margin-top:20px;display:grid;gap:12px}

/* Keep toolbar spacing shared; add breathing room only above inbound cards. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root)[data-inbound-alerts-enabled="true"][data-section="inbound"] .work-cards{padding-top:8px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-scope>.list-sort{margin-left:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .compact-scope>.list-sort>summary{width:34px;height:34px}

/* Primary work sections should read as navigation, above the lighter filters. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs .day-tabs{gap:3px;padding:3px;background:#e8e7f4;border-color:#c9c7e3;border-radius:9px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs .day-tabs button{padding:6px 10px;font-size:11px;line-height:16px;font-weight:650;color:#4c4b66;border-radius:5px}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs .day-tabs button:hover{background:#f4f3fc;color:#494398}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs .day-tabs button.active{background:#6255bb;border-color:#6255bb;color:white;box-shadow:0 1px 3px #433a7826}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs .day-tabs .count{font-size:9px;line-height:14px;background:#d9d8eb;color:#55516f}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) #work-tabs .day-tabs button.active .count{background:#ffffff26;color:white}

/* Saved-view library and focused condition editor, matching Patients. */
.work-view-dialog{width:min(680px,calc(100vw - 32px));max-height:90vh;overflow:auto;border:1px solid #e3e6ed;border-radius:12px;padding:24px;background:#fff;color:#273449;box-shadow:0 20px 70px #18213730;font-family:inherit;font-size:13px}
.work-view-dialog::backdrop{background:#19213566}
.work-view-dialog header,.work-view-dialog footer{display:flex;align-items:center;gap:8px;justify-content:space-between}
.work-view-dialog h2{font-size:18px;font-weight:650}.work-view-dialog h3{font-size:15px;font-weight:650;margin:18px 0 12px}
.work-view-dialog p,.work-view-note{color:#788190;font-size:12px;margin:8px 0 14px}
.work-view-dialog button,.work-view-dialog input,.work-view-dialog select{font:inherit;border:1px solid #e3e6ed;border-radius:6px;padding:7px 10px;background:white;color:inherit}
.work-view-dialog button{cursor:pointer}.work-view-dialog button:hover{background:#f6f4fc;color:#554599}.work-view-dialog button:disabled{opacity:.5;cursor:wait}
.work-view-dialog .primary,.work-view-changes .primary{background:#7762ad;color:white;border-color:#7762ad}.work-view-dialog .primary:hover{background:#655298;color:white}
.work-view-dialog input[type=search],.work-view-field input:not([type=checkbox]),.work-view-field select{width:100%;min-width:0}
.work-view-field{display:flex;flex-direction:column;gap:6px;margin:20px 0 12px;font-weight:550}
.work-view-dialog footer{justify-content:flex-end;border-top:1px solid #e7e9ef;padding-top:16px;margin-top:24px}.work-view-dialog footer>span{flex:1}
.work-view-library-row{display:flex;gap:8px;align-items:center;padding:14px 0;border-bottom:1px solid #eef0f4}.work-view-library-row>div{flex:1;min-width:0}.work-view-library-row small{display:block;color:#788190;font-size:12px;margin-top:4px}.work-view-library-row .work-view-name{padding:0;border:0;font-weight:650;text-align:left;overflow-wrap:anywhere}
.work-view-condition{display:flex;gap:12px;align-items:center;border-bottom:1px solid #e5e7eb;padding:12px 0}.work-view-condition>button:first-child{flex:1;text-align:left;white-space:normal;border:0;background:transparent;padding:0;line-height:1.6}.work-view-condition strong{font-weight:400;color:#554599;border-bottom:1px dotted #b6abcd}.work-view-condition>button:last-child{border:0;background:transparent}
.work-view-dialog .work-view-link{border:0;color:#554599;background:transparent;padding:12px 0}.work-view-condition-option{display:block;width:100%;text-align:left;margin-top:6px}.work-view-dialog .work-view-danger,#work-view-error{color:#b91c1c}
.work-view-changes{display:flex;gap:6px;align-items:center;padding:3px 5px 3px 9px;border:1px solid #d6c9ee;border-radius:7px;background:#f7f3ff;font-size:11px;color:#554599}.work-view-changes[hidden]{display:none}.work-view-changes button{border:0;border-radius:4px;padding:4px 7px}
#work-saved-views-menu .scope-popover-panel{min-width:260px}#work-saved-view-options>button{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left}#work-saved-view-options>button[aria-pressed=true]{color:#554599;background:#f6f4fc;font-weight:650}
.work-view-dialog [hidden]{display:none!important}
.work-view-checklist{max-height:280px;overflow:auto;border:1px solid #e3e6ed;border-radius:6px}.work-view-checklist label{display:flex;align-items:center;gap:9px;padding:9px 12px;font-weight:400}.work-view-checklist label:hover{background:#f6f4fc}.work-view-checklist input{accent-color:#7762ad}
.work-view-dialog header{border:0;padding:0;margin:0;background:transparent;position:static}.work-view-dialog .work-view-field select{min-height:36px}#work-view-search{width:100%}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-manage-views{border:0;background:transparent;color:#615476;padding:7px 8px;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-manage-views:hover{background:#f0ebf8;border-radius:6px}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options [data-work-status]{display:flex;align-items:center}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .scope-options [data-work-scope][role=checkbox]{display:grid;grid-template-columns:14px 1fr;column-gap:8px;align-items:center}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-scope] .type-check{margin:0;grid-row:1/3}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) [data-work-scope] small{grid-column:2}

.work-view-dialog .work-view-checklist{display:flex;flex-direction:column;padding:4px;gap:2px}
.work-view-dialog .work-view-checklist label{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:38px;margin:0;padding:8px 10px;border-radius:4px;font-size:13px;line-height:20px;font-weight:400;cursor:pointer}
.work-view-dialog .work-view-checklist input[type=checkbox]{appearance:auto;flex:0 0 16px;width:16px;height:16px;min-width:16px;margin:0;padding:0;border-radius:3px;accent-color:#6366f1;cursor:pointer}

/* Tasks quick-select views share the quiet tab treatment of Patients/Referrals. */
#shared-work-root .work-quick-viewbar{display:flex;align-items:center;gap:8px;border-bottom:1px solid #dce1ea;background:transparent;min-height:44px;padding:0;margin-bottom:0;flex-wrap:nowrap}
#shared-work-root .work-quick-viewbar[hidden]{display:none}
#work-quick-views{display:flex;align-items:stretch;gap:0;flex:1 1 0;overflow-x:auto;min-width:0;scrollbar-width:none}
#work-quick-views::-webkit-scrollbar{display:none}
#work-quick-views>button{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#5a6375;padding:10px 9px;white-space:nowrap;font-family:inherit;font-size:14px;line-height:21px;font-weight:500;position:relative;flex:0 0 auto}
#work-quick-views>button+button:before{content:'';position:absolute;left:0;top:13px;bottom:13px;width:1px;background:#e8eaf0}
#work-quick-views>button[aria-pressed=true]{border-bottom-color:#6650a4;background:#f2effa;color:#493b85;font-weight:500}
#work-quick-views>button:hover{background:#f6f7fa}
#work-viewbar-controls{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:0}
#work-viewbar-controls>.scope-popover>summary{height:36px;padding:7px 10px;font-family:inherit;font-size:13px;line-height:20px;font-weight:500}
#work-viewbar-controls>#work-saved-views-menu>summary{border-color:transparent;background:transparent;color:#667085}
#work-viewbar-controls .scope-popover-panel{top:calc(100% + 6px);right:0;left:auto;max-height:60vh;overflow-y:auto}
#work-viewbar-controls .work-view-changes{display:flex;align-items:center;gap:5px;font-size:12px}
#work-viewbar-controls .work-view-changes[hidden]{display:none}
.work-quick-editor{max-width:940px!important;width:min(940px,94vw)!important}
.work-quick-editor-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(240px,1fr);gap:24px}
.work-quick-editor h3{font-size:13px;font-weight:600;margin:12px 0;color:#485267}
.work-view-draft-columns{border:1px solid #e1e5ed;border-radius:6px;margin-bottom:12px;overflow:hidden}
.work-view-draft-columns>div{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #edf0f5;font-size:13px}
.work-view-draft-columns>div:last-child{border-bottom:0}
.work-view-draft-columns>div>button{margin-left:auto;padding:0 5px}
.work-view-draft-columns [draggable=true]{cursor:grab}
.work-view-library-row>.work-quick-grip{color:#98a0b0;cursor:grab}
.work-view-library-row>[data-quick-star]{color:#7a6b9f;min-width:27px}
.work-view-library-row>[data-quick-star][aria-pressed=true]{color:#7353a6}
.work-column-resize{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;touch-action:none}
.work-column-resize:hover{background:#c8bfde}
@media(max-width:800px){.work-quick-editor-grid{grid-template-columns:1fr}#work-viewbar-controls{margin-left:auto}}

:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-editable-chip{display:inline-flex;align-items:center;max-width:100%;padding:0;overflow:hidden}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-editable-chip button{border:0;background:transparent;color:inherit;font:inherit;padding:5px 9px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-editable-chip button:first-child{text-align:left;overflow-wrap:anywhere}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-editable-chip button:last-child{font-size:14px}:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .work-editable-chip button:hover{background:#eae6f5}

.work-quick-editor.work-filter-editor{max-width:500px!important;width:min(500px,94vw)!important}

/* Search and display controls precede the quiet views row, outside the table. */
#shared-work-root .work-results-tools{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:2px 0 10px}
#shared-work-root .work-results-tools .list-controls{position:static;display:flex;flex:1;max-width:440px;min-width:160px;padding:0;border:0}
#shared-work-root .work-results-tools #work-search{width:100%;height:36px;border:1px solid #dce1e9;border-radius:6px;background:white;padding:8px 10px;font:inherit;font-size:12px}
#shared-work-root .work-results-tools .queue-heading{display:flex;gap:8px;margin-left:auto;height:36px;min-height:0;padding:0;border:0;background:transparent;overflow:visible;opacity:1;visibility:visible}
#shared-work-root .work-results-tools #work-table-toggle,#shared-work-root .work-results-tools .list-sort>summary{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:1px solid #dce1e9;border-radius:6px;background:white;color:#596579;cursor:pointer}
#shared-work-root .work-results-tools #work-table-toggle:hover,#shared-work-root .work-results-tools .list-sort>summary:hover{background:#f6f4fb;border-color:#b7bed1}
#shared-work-root .work-results-tools .list-sort-menu button{display:block;width:100%;text-align:left;border:0;border-radius:4px;padding:8px 10px;background:white;font:inherit;font-size:12px;cursor:pointer}
#shared-work-root .work-results-tools .list-sort-menu button:hover{background:#f6f4fb}
#shared-work-root[data-section=tasks] .work-quick-viewbar{margin-bottom:0;padding-left:0;padding-right:0}
@media(max-width:600px){#shared-work-root .work-results-tools{gap:8px}#shared-work-root .work-results-tools .list-controls{min-width:0;max-width:none}}

#shared-work-root .work-results-tools .list-sort.custom-sort>summary{background:#efedfb;color:#5d54bc;border-color:#d2cdeb}
#shared-work-root .work-results-tools .list-sort-menu button[aria-pressed=true]{background:#f0eefc;color:#554bb1}

#shared-work-root .work-results-tools #work-list-sort .list-sort-menu{left:auto;right:0;width:240px;max-width:calc(100vw - 32px);max-height:min(60dvh,calc(100dvh - 210px));overflow-y:auto;overscroll-behavior:contain}

/* Patient work uses the shared table/cards without taking over page geometry. */
.patient-work-root{height:auto!important;max-width:none!important;padding:0!important;background:white!important;margin:0!important}
.patient-work-root .patient-work-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.patient-work-root .patient-work-toolbar input{flex:1;min-width:160px}
.patient-work-root .patient-work-toolbar .scope-popover-panel{min-width:190px;right:0;left:auto}
.patient-work-root .patient-work-toolbar select{padding:7px 10px;border:1px solid #d1d5db;border-radius:6px;background:white;font:inherit}
.patient-work-root #work-list{overflow:auto;max-height:none;border:1px solid var(--line);border-radius:8px}
.patient-work-root #work-list .work-task-table{min-width:850px}
.patient-work-root #work-list .work-task-table :is(th,td){padding-left:16px;padding-right:16px}
.patient-work-root [data-filter] .scope-popover-panel label{display:flex;gap:8px;align-items:center;padding:7px 10px;cursor:pointer}
.patient-work-root [data-filter] .scope-popover-panel input{flex:none;width:14px;height:14px;min-width:0;accent-color:var(--primary)}
.patient-work-root #work-cards{max-width:100%;padding:0}
.patient-work-root .patient-work-caption{color:var(--muted);padding:8px 0;font-size:12px}
.patient-work-root .patient-work-toast{position:fixed;inset:auto 20px 20px auto;padding:12px 18px;border:1px solid #d1d5db;border-radius:8px;background:#fff;box-shadow:0 4px 20px #0002;max-width:380px}
.patient-work-root .patient-work-toast:popover-open{display:block}

/* Patient hosts can be narrow even on a wide viewport. Reuse workspace controls,
   with wrapping and top-layer sheets instead of clipping inside the tab. */
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-work-toolbar{flex-direction:row;flex-wrap:wrap;min-width:0}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-work-toolbar .scope-popover-panel{width:240px;max-width:calc(100vw - 16px)}
:is(#shared-work-root,#dashboard-work-root,.patient-work-root) .patient-work-toolbar .create-dropdown{margin-left:auto}

/* Staff schedule overlays retain the existing work-item layer. */
.calendar-working-band,.calendar-absence-band{position:absolute;left:0;right:0;pointer-events:none;background:rgba(13,148,136,.08);border-left:2px solid #99d6cb}.calendar-absence-band{background:repeating-linear-gradient(135deg,rgba(245,158,11,.12),rgba(245,158,11,.12) 5px,transparent 5px,transparent 10px);border-color:#f59e0b}.calendar-duty-strip{font-size:11px;line-height:1.5;color:#475569;background:#f0fdfa;padding:6px 10px}.calendar-schedule-health{padding:8px 14px;background:#f8fafc;font-size:12px;color:#64748b}.calendar-working-band span,.calendar-absence-band span{font-size:10px;color:#64748b;padding:3px}.week-day-track>.week-event{isolation:isolate}
