/* Operations workspace: scoped to the administrator shell, never customer/worker pages. */
html[data-theme="light"] .admin-shell{--bg:#f3f5f2;--surface:#fdfefb;--surface-alt:#f5f7f3;--surface-inset:#eef2ec;--surface-hover:#e8eee7;--text:#1d2b24;--text-secondary:#637369;--border:#e0e7dd;--accent:#196747;--accent-hover:#125236;--accent-soft:#e2eee4;--button-text:#fff;--sidebar:#f5f7f3;--sidebar-text:#69796f;--sidebar-active:#e5eee4;--elevation:0 4px 18px #203c2b04}
html[data-theme="dark"] .admin-shell{--bg:#131c18;--surface:#1d2923;--surface-alt:#24332b;--surface-inset:#18231d;--surface-hover:#304238;--text:#e4ece4;--text-secondary:#adbcaf;--border:#34483a;--accent:#94cbaa;--accent-hover:#b2ddbf;--accent-soft:#2b4434;--button-text:#122a1b;--sidebar:#1b2720;--sidebar-text:#abbcaf;--sidebar-active:#2b4434;--elevation:0 4px 18px #0000000a}
html[data-theme] .admin-shell{--paper:var(--bg);--white:var(--surface);--ink:var(--text);--muted:var(--text-secondary);--line:var(--border);--green:var(--accent);--green2:var(--accent);--mint:var(--accent-soft);--shadow:var(--elevation);background:var(--bg);color:var(--text);grid-template-columns:224px minmax(0,1fr);gap:14px;padding:14px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
html[data-theme] .admin-shell .admin-side{top:14px;height:calc(100dvh - 28px);padding:25px 17px 18px;border:0;border-radius:24px;background:var(--sidebar);box-shadow:none}
.admin-shell .brand{gap:10px;padding:0 5px}.admin-shell .brand-logo{width:38px;height:38px}.admin-shell .brand strong{font-size:20px;letter-spacing:-.6px}.admin-shell .brand small{font-size:9px;letter-spacing:1.8px;margin-top:3px;color:var(--text-secondary)}
.admin-shell .ops-nav-caption{font-size:10px;letter-spacing:1px;color:var(--text-secondary);margin:38px 12px 12px}.admin-shell .admin-side nav{margin-top:0;gap:5px}
html[data-theme] .admin-shell .admin-side nav button{display:flex;align-items:center;gap:12px;position:relative;padding:12px 13px;min-height:46px;font-size:14px;font-weight:500;border-radius:12px;text-align:left;transition:background .16s,color .16s}
.admin-shell svg{width:21px;height:21px;flex-shrink:0}.admin-shell .admin-side nav button.active:before{content:"";position:absolute;left:-17px;top:11px;bottom:11px;width:4px;background:var(--accent);border-radius:0 4px 4px 0}
html[data-theme] body.mouse-ui-ready .admin-shell .admin-side nav button:hover{transform:none;background:var(--surface-hover);color:var(--text)}
html[data-theme] .admin-shell .side-foot{border-top:1px solid var(--border);padding:16px 8px 0}.admin-shell .side-foot>button{display:flex;align-items:center;gap:11px;margin:12px 0;color:var(--text-secondary)}.admin-shell .ops-system{font-size:11px}.admin-shell .company-signature{font-size:10px;letter-spacing:.5px}
html[data-theme] .admin-shell .admin-main{padding:0 8px 24px;min-width:0}.admin-shell .admin-main>header.ops-topbar{background:var(--surface-alt);border:0;border-radius:24px;min-height:80px;padding:14px 20px;margin:0 0 24px;gap:16px;align-items:center}
.admin-shell .ops-global-search{display:flex;align-items:center;gap:9px;background:var(--surface);border-radius:30px;padding:6px 10px 6px 15px;width:min(480px,52%);color:var(--text-secondary);margin:0}.admin-shell .ops-global-search input{min-width:0;flex:1;width:0;border:0!important;background:transparent!important;box-shadow:none!important;padding:9px 0;font-size:13px}.admin-shell .ops-global-search:focus-within{outline:2px solid var(--accent);outline-offset:2px}.admin-shell .ops-global-search kbd{font:10px inherit;white-space:nowrap;padding:5px 7px;border-radius:7px;background:var(--surface-inset);color:var(--text-secondary)}.admin-shell .ops-global-search button{display:grid;place-items:center;border:0;background:var(--surface-inset);border-radius:50%;width:30px;height:30px;color:var(--accent)}.admin-shell .ops-global-search button svg{width:16px;height:16px}
.admin-shell .ops-top-actions{display:flex;align-items:center;gap:16px}.admin-shell .ops-help{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;color:var(--accent);background:var(--surface)}.admin-shell .admin-user{gap:10px;flex-wrap:wrap}.admin-shell .admin-user .ops-avatar{width:42px;height:42px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:16px}.admin-shell .admin-user b{font-size:13px}.admin-shell .admin-user small{font-size:10px;margin-top:4px}.admin-shell [data-admin-password]{font-size:10px;padding:7px 10px;border-radius:999px}
.admin-shell .ops-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 5px 24px}.admin-shell .ops-page-heading h1{font-size:32px;line-height:1.25;letter-spacing:-1px;font-weight:650;margin:5px 0 9px}.admin-shell .ops-page-heading .eyebrow{font-size:9px;letter-spacing:1.5px;margin:0;color:var(--text-secondary)}.admin-shell .ops-page-heading p:last-child{font-size:13px;line-height:1.7;color:var(--text-secondary);margin:0}.admin-shell .ops-page-action{display:flex;align-items:center;gap:12px;white-space:nowrap;padding:13px 20px;border-radius:999px;font-size:13px}
html[data-theme] .admin-shell :is(.admin-card,.dash-panel,.dw-order,.dw-tools,.worker-team-card){border:1px solid var(--border);background:var(--surface);border-radius:20px;box-shadow:var(--elevation)}
html[data-theme] body.mouse-ui-ready .admin-shell :is(.dash-panel,.admin-card):hover{border-color:var(--border);transform:none;box-shadow:var(--elevation)}
.admin-shell .primary{border-radius:999px}.admin-shell :is(input,select,textarea){border-radius:11px}.admin-shell .table-wrap{border:1px solid var(--border);border-radius:16px}.admin-shell table thead{background:var(--surface-alt)}.admin-shell :is(td,th){padding:14px 13px}.admin-shell .admin-card>h2{font-size:19px}
html[data-theme] .admin-shell .command-dashboard .dash-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
html[data-theme] .admin-shell .dash-kpis article{border:1px solid var(--border);border-radius:22px;padding:22px;min-height:150px;background:var(--surface);box-shadow:none;position:relative;overflow:hidden}
html[data-theme] .admin-shell .dash-kpis article:first-child{grid-column:span 2;background:linear-gradient(120deg,#153e2c,#218254);border-color:transparent;color:#fff}
html[data-theme] .admin-shell .dash-kpis article:first-child :is(span,b,small){color:#f2fbef}.admin-shell .dash-kpis article:first-child:after{content:"";position:absolute;right:-25px;top:-65px;width:200px;height:200px;border:1px solid #ffffff1c;border-radius:50%;box-shadow:0 0 0 30px #ffffff04,0 0 0 60px #ffffff04}
html[data-theme] .admin-shell .dash-kpis article>span{font-size:13px;color:var(--text-secondary)}
html[data-theme] .admin-shell .dash-kpis article>b{font-size:35px;line-height:1.4;font-weight:600;letter-spacing:-1px;color:var(--text);margin:9px 0 3px}
html[data-theme] .admin-shell .dash-kpis article>small{font-size:11px;color:var(--text-secondary)}
.admin-shell .dashboard-range{border:0;background:transparent;padding:0 4px 16px}.admin-shell .range-presets{gap:5px}.admin-shell .range-presets button{border-radius:999px;padding:7px 12px}.admin-shell .dash-layout{gap:16px;grid-template-columns:minmax(0,1fr) 280px}.admin-shell .dash-panel{padding:20px}.admin-shell .dash-panel>header{margin-bottom:18px}.admin-shell .dash-panel>header :is(h2,h3){font-size:16px;letter-spacing:-.3px}.admin-shell .dash-panel>header :is(span,em){font-size:10px}.admin-shell .dash-panel>header>div>span{font-size:9px;letter-spacing:1.1px;color:var(--text-secondary)}.admin-shell .dash-side{gap:16px}.admin-shell .dash-status-list>div{font-size:12px;padding:10px 0}.admin-shell .dash-status-list b{font-size:16px}.admin-shell .district-bar{font-size:12px;margin:13px 0}.admin-shell .district-bar i{background:var(--surface-inset);border-radius:5px}.admin-shell .district-bar em{background:var(--accent);border-radius:5px}.admin-shell .dash-bottom{gap:16px;margin-top:16px}.admin-shell .finance-cards{gap:10px}.admin-shell .finance-cards>div{background:var(--surface-alt);border-radius:12px;padding:14px}.admin-shell .finance-cards span{font-size:11px}.admin-shell .finance-cards b{font-size:19px}.admin-shell .dash-events p b{font-size:12px}.admin-shell .dash-events p span,.admin-shell .dash-events time{font-size:10px}.admin-shell .tech-load p b{font-size:13px}.admin-shell .tech-load p small{font-size:11px}.admin-shell .big-rating b{font-size:36px}
.admin-shell .dw-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.admin-shell .dw-summary>button{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;border:1px solid var(--border);background:var(--surface);color:var(--text);padding:20px 22px;border-radius:21px;min-width:0;position:relative}.admin-shell .dw-summary>button>span{font-size:13px}.admin-shell .dw-summary>button>b{font-size:34px;line-height:1.3;font-weight:600;letter-spacing:-1px}.admin-shell .dw-summary>button>small{font-size:10px;line-height:1.5;color:var(--text-secondary)}.admin-shell .dw-summary>button>i{position:absolute;right:18px;top:18px;width:26px;height:26px;border-radius:50%;border:1px solid var(--border);display:grid;place-items:center;font-style:normal}.admin-shell .dw-summary>button.dw-hero{background:linear-gradient(120deg,#153e2c,#218254);color:#f2fbef;border-color:transparent;display:flex;margin:0}.admin-shell .dw-summary>button.dw-hero>small{color:#daecde}.admin-shell .dw-hero>i{border-color:#ffffff66!important}.admin-shell .dw-summary>button[aria-pressed="true"]{outline:2px solid var(--accent);outline-offset:2px}
.admin-shell .dw-orientation{border:0;background:transparent;padding:0 3px 17px}.admin-shell .dw-orientation ol{font-size:12px}.admin-shell .dw-layout{grid-template-columns:170px minmax(0,1fr);gap:18px}.admin-shell .dw-queue-rail{background:var(--surface-alt);border-radius:20px;padding:16px 9px}.admin-shell .dw-queues h3{padding-left:10px;font-size:10px;letter-spacing:.5px}.admin-shell .dw-queues button{border-radius:10px;font-size:12px}.admin-shell .dw-queue-rail>p{font-size:10px;padding:8px 10px}.admin-shell .dw-tools{padding:18px}.admin-shell .dw-batch-bar{border-radius:16px;background:var(--accent-soft);border-color:var(--border)}.admin-shell .dw-order{padding:19px;border-radius:19px;max-width:430px}.admin-shell .dw-order>header strong{font-size:11px;letter-spacing:.4px}.admin-shell .dw-card-heading h3{font-size:18px;letter-spacing:-.3px}.admin-shell .dw-card-heading>span{font-size:12px}.admin-shell .dw-card-actions .primary{padding:9px 14px}.admin-shell .dw-flags span{border-radius:7px}.admin-shell .dw-owner{font-size:10px}.admin-shell .dw-card-more{border-top:1px solid var(--border);padding-top:10px}.admin-shell .dw-list-heading h2{font-size:18px}.admin-shell .dw-list-heading span{font-size:11px}.admin-shell .dw-group-disclosure{border-radius:15px}.admin-shell .dw-empty{background:var(--surface);border:1px dashed var(--border);border-radius:20px}
.admin-shell .finance-main>header,.admin-shell .crm-main>header{background:var(--surface-alt);border-radius:22px;padding:23px;margin-bottom:22px}
@media(min-width:1600px){.admin-shell .admin-main{padding-inline:12px}.admin-shell .ops-page-heading{margin-bottom:28px}.admin-shell .dw-summary>button{padding:24px}.admin-shell .dw-orders{gap:18px}}
@media(max-width:1100px){html[data-theme] .admin-shell{grid-template-columns:190px minmax(0,1fr);gap:8px;padding:10px}html[data-theme] .admin-shell .admin-side{top:10px;height:calc(100dvh - 20px);padding-inline:12px}.admin-shell .ops-global-search kbd{display:none}.admin-shell .ops-top-actions{gap:8px}.admin-shell .admin-user>div{display:none}.admin-shell .ops-page-heading h1{font-size:27px}.admin-shell .dw-summary{gap:10px}.admin-shell .dw-summary>button{padding:17px}.admin-shell .dw-summary>button>i{display:none}.admin-shell .dash-layout{grid-template-columns:minmax(0,1fr) 230px}.admin-shell .dash-bottom{grid-template-columns:1fr 1fr}.admin-shell .dash-bottom>.dash-panel:last-child{grid-column:span 2}}
@media(max-width:900px){html[data-theme] .admin-shell{display:block;padding:8px}html[data-theme] .admin-shell .admin-side{position:relative;top:auto;width:100%;height:auto;border-radius:19px;padding:12px 14px;margin-bottom:10px}.admin-shell .ops-nav-caption,.admin-shell .admin-side .side-foot{display:none}.admin-shell .brand{padding:0}.admin-shell .brand-logo{width:31px;height:31px}.admin-shell .brand strong{font-size:17px}.admin-shell .brand small{font-size:8px}.admin-shell .admin-side nav{display:flex!important;flex-wrap:nowrap;overflow:auto;gap:4px;padding-top:11px!important;margin-top:0!important}html[data-theme] .admin-shell .admin-side nav button{flex-shrink:0;min-height:38px;padding:8px 11px;font-size:12px;gap:7px}.admin-shell .admin-side nav button svg{width:17px;height:17px}.admin-shell .admin-side nav button.active:before{display:none}html[data-theme] .admin-shell .admin-main{padding:0 2px 65px}.admin-shell .admin-main>header.ops-topbar{min-height:64px;padding:10px 12px;border-radius:18px;margin-bottom:20px}.admin-shell .ops-global-search{width:auto;flex:1}.admin-shell .ops-global-search input{font-size:12px}.admin-shell .ops-help{width:32px;height:32px}.admin-shell .admin-user .ops-avatar{width:34px;height:34px}.admin-shell [data-admin-password]{font-size:9px;padding:5px}.admin-shell .ops-top-actions{gap:6px}.admin-shell .ops-page-heading{margin:0 8px 20px}.admin-shell .ops-page-heading p:last-child{font-size:12px}.admin-shell .ops-page-action{padding:11px 14px;font-size:11px}.admin-shell .dw-layout{gap:12px;grid-template-columns:150px minmax(0,1fr)}.admin-shell .dw-summary>button{padding:16px}.admin-shell .dw-summary>button>span{font-size:12px}.admin-shell .dw-summary>button>b{font-size:28px}.admin-shell .dash-kpis article{padding:18px}}
@media(max-width:760px){.admin-shell .dw-layout{display:block}.admin-shell .dw-queue-rail{padding:7px;margin-bottom:12px}.admin-shell .dw-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-shell .dw-summary>button{padding:16px 18px;gap:4px;border-radius:17px}.admin-shell .dw-summary>button>small{font-size:10px}.admin-shell .dw-orientation ol{font-size:10px}.admin-shell .ops-page-heading h1{font-size:25px}.admin-shell .ops-page-heading .eyebrow{font-size:8px}.admin-shell .ops-page-heading{gap:10px}.admin-shell .ops-page-action{white-space:normal;max-width:108px;flex-shrink:0}.admin-shell .ops-page-action svg{display:none}.admin-shell .dash-layout{display:block}.admin-shell .dash-side{display:grid;grid-template-columns:1fr 1fr;margin-top:14px}.admin-shell .dash-side .rating-panel{grid-column:span 2}.admin-shell .dash-bottom{grid-template-columns:1fr}.admin-shell .dash-bottom>.dash-panel:last-child{grid-column:auto}html[data-theme] .admin-shell .command-dashboard .dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.admin-shell .dash-kpis article:first-child{grid-column:span 2}.admin-shell .dash-panel{padding:16px}.admin-shell .dashboard-range{flex-wrap:wrap}.admin-shell .dw-order{max-width:430px}.admin-shell .ops-topbar .ops-help{display:none}}
@media(max-width:480px){.admin-shell .ops-topbar .admin-user>div{display:none}.admin-shell .ops-global-search{padding-left:10px;gap:6px}.admin-shell .ops-global-search>svg{width:17px}.admin-shell .ops-topbar .ops-avatar{display:none!important}.admin-shell .ops-global-search button{display:none}.admin-shell .ops-page-heading p:last-child{font-size:11px}.admin-shell .dw-order{max-width:none}.admin-shell .dash-side{display:flex;flex-direction:column}.admin-shell .dw-orientation{align-items:flex-start}.admin-shell .finance-main>header,.admin-shell .crm-main>header{padding:18px}.admin-shell .admin-main h1{overflow-wrap:anywhere}}
html[data-theme] .admin-shell .dw-summary>.dw-hero>span{color:#f2fbef}
.admin-shell .admin-card:has(>table){overflow-x:auto}.admin-shell .material-table-wrap{max-width:100%;overflow-x:auto}
.admin-shell :is(.admin-card,.pilot-grid>*,.classified-grid>*,.table-wrap){min-width:0;max-width:100%}.admin-shell .pilot-grid,.admin-shell .classified-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-shell .table-wrap{overflow-x:auto}.admin-shell .ops-page-heading~.admin-card{overflow-wrap:anywhere}
@media(max-width:760px){.admin-shell .pilot-grid,.admin-shell .classified-grid{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.admin-shell *{transition:none!important;animation:none!important}}

/* Seven-stage board: keep semantic hues, but adapt every surface to appearance. */
html[data-theme="light"] .admin-shell :is([data-status-node],[data-status-column]){--node-bg:#fff6e5;--node-border:#e4c68c;--node-text:#795316;--node-tone:#a86b0c}
html[data-theme="light"] .admin-shell :is([data-status-node="assigned"],[data-status-column="assigned"]){--node-bg:#eef4ff;--node-border:#bdcfee;--node-text:#315b90;--node-tone:#3c71b2}
html[data-theme="light"] .admin-shell :is([data-status-node="accepted"],[data-status-column="accepted"]){--node-bg:#f4effb;--node-border:#d7c8e9;--node-text:#6d4894;--node-tone:#8053ac}
html[data-theme="light"] .admin-shell :is([data-status-node="enroute"],[data-status-column="enroute"]){--node-bg:#eaf6f9;--node-border:#afd2dc;--node-text:#236477;--node-tone:#23798e}
html[data-theme="light"] .admin-shell :is([data-status-node="arrived"],[data-status-column="arrived"]){--node-bg:#fff0f0;--node-border:#e8c0c3;--node-text:#98494f;--node-tone:#b45c64}
html[data-theme="light"] .admin-shell :is([data-status-node="servicing"],[data-status-column="servicing"]){--node-bg:#eaf5ee;--node-border:#bad8c3;--node-text:#296744;--node-tone:#348457}
html[data-theme="light"] .admin-shell :is([data-status-node="completed"],[data-status-column="completed"]){--node-bg:#f0f3f1;--node-border:#cbd5cf;--node-text:#53665c;--node-tone:#607b6b}
html[data-theme="dark"] .admin-shell :is([data-status-node],[data-status-column]){--node-bg:#30291c;--node-border:#665536;--node-text:#e9c681;--node-tone:#d7ad5e}
html[data-theme="dark"] .admin-shell :is([data-status-node="assigned"],[data-status-column="assigned"]){--node-bg:#1d2b3b;--node-border:#3e5d7e;--node-text:#b3d1f5;--node-tone:#89b3e7}
html[data-theme="dark"] .admin-shell :is([data-status-node="accepted"],[data-status-column="accepted"]){--node-bg:#2b2236;--node-border:#614776;--node-text:#d8b9f3;--node-tone:#bd95e1}
html[data-theme="dark"] .admin-shell :is([data-status-node="enroute"],[data-status-column="enroute"]){--node-bg:#1b3037;--node-border:#3b6470;--node-text:#a5d8e6;--node-tone:#7ebfcf}
html[data-theme="dark"] .admin-shell :is([data-status-node="arrived"],[data-status-column="arrived"]){--node-bg:#362327;--node-border:#794c53;--node-text:#efb4bb;--node-tone:#db929d}
html[data-theme="dark"] .admin-shell :is([data-status-node="servicing"],[data-status-column="servicing"]){--node-bg:#1d3225;--node-border:#3e6b4e;--node-text:#b0ddbe;--node-tone:#8ac79e}
html[data-theme="dark"] .admin-shell :is([data-status-node="completed"],[data-status-column="completed"]){--node-bg:#252e29;--node-border:#4c6053;--node-text:#bbcdbf;--node-tone:#9eb5a4}
html[data-theme] .admin-shell .admin-kanban-column{background:var(--node-bg);border:1px solid var(--node-border);border-top:3px solid var(--node-tone);border-radius:17px}
html[data-theme] .admin-shell .admin-kanban-column>header{border-bottom-color:var(--node-border);color:var(--node-text)}
html[data-theme] .admin-shell .admin-kanban-column>header small{color:var(--node-text);opacity:.9}
html[data-theme] .admin-shell .admin-kanban-column>header>span{background:color-mix(in srgb,var(--node-tone) 16%,var(--node-bg));color:var(--node-text)}
html[data-theme] .admin-shell .admin-kanban-column .kanban-empty{background:transparent;border-color:var(--node-border);color:var(--node-text)}
html[data-theme] .admin-shell .admin-kanban-column .admin-order-card{background:var(--surface);border-color:var(--node-border);color:var(--text)}
html[data-theme] .admin-shell .admin-kanban-column .pill{background:var(--node-bg);color:var(--node-text)}
html[data-theme] .admin-shell .flow-nodes [data-status-node]{background:var(--node-bg);border-color:var(--node-border);color:var(--node-text)}
html[data-theme] .admin-shell .flow-nodes [data-status-node] :is(small,em){color:var(--node-text)}
html[data-theme] .admin-shell .flow-nodes [data-status-node]>span{background:var(--node-tone);color:var(--surface)}
html[data-theme="dark"] .admin-shell .flow-nodes [data-status-node]>span{color:#152019}
html[data-theme] .admin-shell .flow-nodes [data-status-node].active{border-color:var(--node-tone);box-shadow:inset 0 0 0 2px var(--node-tone)}
html[data-theme] body.mouse-ui-ready .admin-shell .flow-nodes [data-status-node]:hover{background:color-mix(in srgb,var(--node-tone) 13%,var(--node-bg));border-color:var(--node-tone)}
