/* R897 native Operator Desk: the four workflows share ONE modal; no popup is nested.
   Scoped to Operator Desk only. Do not alter the inbox, chat, or other dialogs. */
#r840-operator-root .r840-operator-dialog{
  width:min(990px,calc(100vw - 24px));max-width:calc(100vw - 24px);
  max-height:min(92dvh,930px);background:#f7f9fc;color:#1b3247;
  border:1px solid #d8e2ec;box-shadow:0 28px 84px rgba(10,30,48,.24);
}
#r840-operator-root .r840-operator-header{
  background:#fff;color:#1b3147;border-bottom:1px solid #e1e8ef;gap:12px;min-width:0;
}
#r840-operator-root .r840-operator-header>strong{color:#172d41}
#r840-operator-root .r840-operator-header>strong small{color:#6c8196}
#r840-operator-root .r840-operator-header nav button{color:#53687d}
#r840-operator-root .r840-operator-header nav button[aria-current="true"]{
  color:#116ca0;background:#e6f4fc;border:1px solid #acd7ee;
}
#r840-operator-root .r840-close{color:#597084}
#r840-operator-root .r840-panel-body{
  background:#f7f9fc;color:#23394e;min-width:0;overflow:auto;
  overscroll-behavior:contain;padding:0;scrollbar-gutter:stable;
}
#r840-operator-root .r897-native-flow{min-width:0;max-width:100%;color:#253a4c;--txt:#23394e;--text:#23394e;--muted:#65798a;--line:#e0e8f0;--panel:#fff;--paper:#fff;--surface:#fff;--accent:#167db5}
#r840-operator-root .r897-native-heading{
  display:flex;align-items:flex-start;justify-content:space-between;gap:20px;
  padding:22px 28px 20px;background:#fff;border-bottom:1px solid #e1e9ef;
}
#r840-operator-root .r897-native-heading>div:first-child{min-width:0;max-width:570px}
#r840-operator-root .r897-native-heading small{font-size:10px;font-weight:760;letter-spacing:.12em;color:#087c98}
#r840-operator-root .r897-native-heading h2{font-size:24px;line-height:1.2;font-weight:730;color:#193146;margin:5px 0 7px;letter-spacing:-.026em}
#r840-operator-root .r897-native-heading p{font-size:12px;line-height:1.55;color:#667b8c;margin:0}
#r840-operator-root .r897-native-identity{border:1px solid #dce8f0;background:#f8fbfe;border-radius:12px;padding:11px 14px;min-width:170px;max-width:240px;display:grid;gap:3px;text-align:right;min-height:48px}
#r840-operator-root .r897-native-identity span{font-size:10px;color:#7c8c9c}
#r840-operator-root .r897-native-identity strong{font-size:12px;color:#273e50;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#r840-operator-root .r897-native-flow :is(.client-automation-tabs,.r871-ai-tabs,.r895-ai-subnav){
 display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0;background:#fff;
 border-bottom:1px solid #e4ebf1;padding:11px 28px;margin:0;
}
#r840-operator-root .r897-native-flow :is(.client-automation-tabs,.r871-ai-tabs,.r895-ai-subnav) button{
 font-size:12px;color:#5b7182;background:transparent!important;border:1px solid transparent!important;
 padding:8px 12px;border-radius:9px;box-shadow:none!important;cursor:pointer;
}
#r840-operator-root .r897-native-flow :is(.client-automation-tabs,.r871-ai-tabs,.r895-ai-subnav) button:is([aria-selected="true"],[aria-current="page"],.selected){color:#146c98!important;background:#e7f4fa!important;border-color:#bfdeec!important}
#r840-operator-root .r897-native-controls{min-width:0;display:block;padding:20px 28px 28px;box-sizing:border-box}
#r840-operator-root .r897-native-controls>*{min-width:0;max-width:100%}
#r840-operator-root .r897-native-controls :is(form,.client-shared-knowledge,.r871-group-ai-settings,.client-ai-health,.client-ai-scope,.client-ai-shared-note,.r895-tools,.r895-business-advanced,.ops-card,.client-reply-card){
 color:#263d51;background:#fff!important;border:1px solid #e0e9f0!important;
 border-radius:13px!important;box-shadow:0 2px 8px rgba(23,49,71,.025);max-width:100%;min-width:0;
}
#r840-operator-root .r897-native-controls :is(form,.client-shared-knowledge,.r871-group-ai-settings,.client-ai-health,.client-ai-scope,.client-ai-shared-note,.r895-tools,.r895-business-advanced,.ops-card){padding:18px!important;margin:0 0 12px!important;display:grid;gap:11px;}
#r840-operator-root .r897-native-controls :is(.client-reply-card,.r895-business-advanced details){padding:14px!important;margin:0 0 9px;background:#f9fbfd!important}
#r840-operator-root .r897-native-controls :is(.r838-scope-picker,.r871-ai-tabs){border-radius:12px;background:#ecf4fa;border:1px solid #e0eaf2;display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:10px 12px;margin-bottom:12px}
#r840-operator-root .r897-native-controls .r871-ai-tabs{background:#fff}
#r840-operator-root .r897-native-controls .r838-scope-picker button{font-size:12px;border:1px solid transparent;border-radius:9px;background:transparent;color:#466780;padding:8px 12px}
#r840-operator-root .r897-native-controls .r838-scope-picker button[aria-pressed="true"]{background:#fff;color:#126b9a;border:1px solid #bed5e8}
#r840-operator-root .r897-native-controls .r838-scope-picker small{font-size:11px;color:#758b9f}
#r840-operator-root .r897-native-controls :is(h3,h4,strong){color:#23394e}
#r840-operator-root .r897-native-controls h3{font-size:15px;margin:0;font-weight:720}
#r840-operator-root .r897-native-controls p{color:#62788b!important;font-size:12px!important;line-height:1.6!important;margin:0}
#r840-operator-root .r897-native-controls label{color:#344b60;font-size:12px;font-weight:600;min-width:0;line-height:1.55}
#r840-operator-root .r897-native-controls :is(input:not([type=checkbox]):not([type=radio]),textarea,select){
 display:block;box-sizing:border-box;max-width:100%;width:100%;min-width:0;
 background:#fff!important;color:#20374a!important;border:1px solid #cad9e5!important;
 border-radius:9px!important;padding:10px 12px!important;font-size:13px!important;font-family:inherit;line-height:1.45;
}
#r840-operator-root .r897-native-controls textarea{resize:vertical;min-height:66px}
#r840-operator-root .r897-native-controls :is(input[type=checkbox],input[type=radio]){accent-color:#1284b4;flex:0 0 auto;margin-top:3px}
#r840-operator-root .r897-native-controls .client-inline-check{display:flex;align-items:flex-start;gap:8px}
#r840-operator-root .r897-native-controls :is(.client-reply-top,.client-reply-heading,.client-reply-footer,.client-rule-head,.client-rule-timing,.r895-tools-links){display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#r840-operator-root .r897-native-controls .client-rule-list{display:grid;gap:9px}
#r840-operator-root .r897-native-controls [data-r895-pane][hidden]{display:none!important}
#r840-operator-root .r897-native-controls .r895-ai-section-head{padding:0 0 5px;display:grid;gap:5px}
#r840-operator-root .r897-native-controls .r895-ai-section-head>div{display:grid;gap:4px}
#r840-operator-root .r897-native-controls .r895-ai-section-head span{color:#6d8597;font-size:12px}
#r840-operator-root .r897-native-controls :is(button.primary,button[type=submit],.r840-primary){
 background:#177fb6!important;color:#fff!important;border:1px solid #1579ae!important;
 border-radius:10px!important;padding:10px 15px!important;font-size:12px;font-weight:680;cursor:pointer;
}
#r840-operator-root .r897-native-controls :is(button.secondary,button:not([class])){color:#215b7c;background:#f0f6fa;border:1px solid #d2e2ec;border-radius:9px;padding:9px 12px;cursor:pointer}
#r840-operator-root .r897-native-controls button:disabled{opacity:.55;cursor:not-allowed}
#r840-operator-root .r897-native-controls a{color:#0876a9;text-decoration:underline}
#r840-operator-root .r897-native-controls details{padding:12px 14px;border:1px solid #e0e9f1;border-radius:11px;background:#f9fbfe}
#r840-operator-root .r897-native-controls summary{cursor:pointer;color:#2c475b;font-weight:650}
#r840-operator-root .r897-native-controls :is(button,input,textarea,select,a):focus-visible{outline:2px solid #369bd1;outline-offset:2px}
#r840-operator-root .r897-native-controls [role=alert]{color:#973f3f!important;background:#fff6f5;border:1px solid #f2d6d3;border-radius:9px;padding:9px}
#r840-operator-root .r897-native-controls .r895-tools-links{gap:7px}
#r840-operator-root .r897-native-controls .r895-tools-links button{border:1px solid #d2e2ec;border-radius:8px;padding:8px 11px;font-size:12px;background:#f6fbff;color:#216b8a}
#r840-operator-root .r897-native-controls .r895-business-advanced{display:grid;gap:10px}
#r840-operator-root .r897-native-controls .r895-business-advanced summary small{font-weight:450;color:#6f8695;float:right}
/* Queue and broadcast now share the same plain white surface; behavior unchanged. */
#r840-operator-root .r840-panel-body>.r840-panel-lead,
#r840-operator-root .r840-panel-body>.r840-broadcast-grid,
#r840-operator-root .r840-panel-body>.r840-metrics,
#r840-operator-root .r840-panel-body>.r840-queue-list,
#r840-operator-root .r840-panel-body>.r840-panel-foot,
#r840-operator-root .r840-panel-body>.r840-empty,
#r840-operator-root .r840-panel-body>.r840-review-bar,
#r840-operator-root .r840-panel-body>.r840-notice{margin-left:24px;margin-right:24px}
#r840-operator-root .r840-panel-body>.r840-panel-lead{margin-top:23px}
#r840-operator-root .r840-panel-lead h2{color:#223a4c}
#r840-operator-root .r840-panel-lead small{color:#188497}
#r840-operator-root .r840-panel-lead p{color:#6a8193}
#r840-operator-root .r840-metrics article,#r840-operator-root .r840-queue-item,#r840-operator-root .r840-broadcast-grid>section{background:#fff;border:1px solid #e0e8ef}
#r840-operator-root .r840-metrics article strong,#r840-operator-root .r840-queue-item strong,#r840-operator-root .r840-recipient strong{color:#22394b}
#r840-operator-root .r840-metrics article small,#r840-operator-root .r840-queue-item small,#r840-operator-root .r840-recipient small,#r840-operator-root .r840-panel-foot{color:#667f94}
#r840-operator-root .r840-field{color:#354f65}
#r840-operator-root .r840-field :is(input,textarea){color:#21394c;background:#fff;border-color:#ccdbe8}
#r840-operator-root .r840-warning{background:#fff7ea;border-left-color:#d49e46;color:#7c5d2b}
#r840-operator-root .r840-counter{color:#607b90}
#r840-operator-root .r840-recipient:hover{background:#edf6fb}
#r840-operator-root .r840-recipient .r840-round{color:#267ab6;background:#eaf3fc}
#r840-operator-root .r840-empty{color:#6a8395;border-color:#d6e6f2}
#r840-operator-root .r840-notice{color:#176954;background:#eaf7ef}
@media(max-width:800px){
 #r840-operator-root .r897-native-heading{padding:17px 15px;gap:10px}
 #r840-operator-root .r897-native-heading h2{font-size:21px}
 #r840-operator-root .r897-native-identity{min-width:0;max-width:38%;padding:9px}
 #r840-operator-root .r897-native-controls{padding:14px}
 #r840-operator-root .r897-native-flow :is(.client-automation-tabs,.r871-ai-tabs,.r895-ai-subnav){padding:10px 14px}
 #r840-operator-root .r840-panel-body>.r840-panel-lead,#r840-operator-root .r840-panel-body>.r840-broadcast-grid,#r840-operator-root .r840-panel-body>.r840-metrics,#r840-operator-root .r840-panel-body>.r840-queue-list,#r840-operator-root .r840-panel-body>.r840-panel-foot{margin-left:14px;margin-right:14px}
}
@media(max-width:760px){
 #r840-operator-root .r840-operator-dialog{width:100%;max-width:100%;max-height:94dvh;border-radius:18px 18px 0 0}
 #r840-operator-root .r897-native-identity{display:none}
 #r840-operator-root .r840-operator-header nav{min-width:0;flex:1 1 auto;overflow-x:auto}
 #r840-operator-root .r840-operator-header nav button{padding:8px 9px;font-size:11px}
 #r840-operator-root .r840-panel-body{scrollbar-gutter:auto}
 #r840-operator-root .r840-broadcast-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){#r840-operator-root .r897-native-flow *{animation:none!important;transition:none!important}}
/* Single secondary navigation; existing settings' internal nav is kept in code for
   legacy standalone use but never displayed inside the unified Operator Desk. */
#r840-operator-root .r840-operator-dialog.r896-settings-active .r840-operator-header{background:#fff!important;color:#1d3548!important;border-color:#dfe7ee!important}
#r840-operator-root .r840-operator-dialog.r896-settings-active .r840-operator-header nav button{color:#526d80!important}
#r840-operator-root .r840-operator-dialog.r896-settings-active .r840-operator-header nav button[aria-current="true"]{background:#e6f4fc!important;color:#146f9e!important;border-color:#b9dce9!important}
#r840-operator-root .r897-native-heading-right{display:flex;flex-direction:column;align-items:flex-end;min-width:0;gap:6px}
#r840-operator-root .r897-native-heading .r838-scope-picker{display:flex;gap:3px;padding:3px;border-radius:9px;border:1px solid #d9e6ed;background:#f4f8fc}
#r840-operator-root .r897-native-heading .r838-scope-picker button{font-size:11px;padding:6px 9px;white-space:nowrap;color:#547188;border:0;background:transparent;border-radius:7px;cursor:pointer}
#r840-operator-root .r897-native-heading .r838-scope-picker button[aria-pressed="true"]{background:#fff;color:#096f9e;box-shadow:0 1px 3px rgba(0,0,0,.08)}
#r840-operator-root .r897-native-heading .r838-scope-picker small{display:none}
#r840-operator-root .r897-native-identity{text-align:right;max-width:300px;width:100%;padding:6px 9px;border:0;background:transparent;min-height:0}
#r840-operator-root .r897-native-tabs{display:flex;gap:5px;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;border-bottom:1px solid #e0e8ef;background:#fff;padding:10px 24px}
#r840-operator-root .r897-native-tabs button{border:1px solid transparent;background:transparent;padding:9px 11px;font-size:12px;color:#5d7386;border-radius:9px;flex:0 0 auto;cursor:pointer}
#r840-operator-root .r897-native-tabs button[aria-current="page"]{background:#e8f5fb;color:#146b9b;border-color:#baddeb}
#r840-operator-root .r897-native-controls>.r838-scope-picker,
#r840-operator-root .r897-native-controls>.r871-ai-tabs,
#r840-operator-root .r897-native-controls>.client-automation-tabs,
#r840-operator-root .r897-native-controls .r895-ai-subnav,
#r840-operator-root .r897-native-controls .r895-ai-section-head{display:none!important}
#r840-operator-root .r897-native-controls .r871-group-ai-settings{margin-top:0!important}
@media(max-width:760px){
 #r840-operator-root .r897-native-heading{display:grid;gap:7px}
 #r840-operator-root .r897-native-heading-right{flex-direction:row;justify-content:space-between;align-items:center;gap:5px;min-width:0}
 #r840-operator-root .r897-native-heading .r838-scope-picker button{font-size:10px;padding:6px 7px}
 #r840-operator-root .r897-native-identity{display:none}
 #r840-operator-root .r897-native-tabs{padding:8px 12px}
}
