/* UXOS Works 0.8 | Operations-first design, no external frameworks */
:root{
 --ux-ink:#172230;--ux-muted:#687583;--ux-line:#e9edf1;--ux-light:#f7f9fb;
 --ux-navy:#14253b;--ux-blue:#4e779f;--ux-radius:14px;--ux-shadow:0 4px 22px #2030470a;
}
body{background:#fff;color:var(--ux-ink);font-size:13.5px;line-height:1.5}
.shell{grid-template-columns:222px minmax(0,1fr)}
.sidebar{padding:20px 12px 15px;gap:18px;box-shadow:none;z-index:12}
.brand{gap:10px;padding:4px 10px 12px}.ux-brand-logo{width:36px;height:36px;object-fit:contain;border-radius:11px;flex-shrink:0}
.brand strong{font-size:17px;letter-spacing:-.35px}.brand small{font-size:10.5px;letter-spacing:.01em}
.nav{display:flex;flex-direction:column;gap:2px;overflow-y:auto;scrollbar-width:thin;min-height:0}
.nav-link{font-size:13px;font-weight:570;min-height:41px;padding:9px 10px;border-radius:10px;gap:11px;color:#647181}
.nav-link.active{background:#edf2f7;color:#182b42}.nav-link:hover{color:#19314c;background:#f4f7fa}
.nav-icon{width:19px;display:inline-flex;justify-content:center;color:#7c8a98}
.nav-link.active .nav-icon{color:#3e668e}.ux-icon{vertical-align:middle;flex-shrink:0}
.sidebar-bottom{margin-top:auto;padding:12px 10px 0}.sidebar-bottom strong{font-size:13px}.sidebar-bottom small{font-size:11px}
.software-version strong{font-size:11px}.software-version small{font-size:10.5px}
.topbar{min-height:67px;padding:9px clamp(22px,3vw,42px);background:#fff}.content{padding:26px clamp(20px,3vw,42px) 32px;max-width:1750px;margin-inline:auto}
.page-title{margin-bottom:16px}.page-title h1{font-size:26px;font-weight:750;letter-spacing:-.75px}.page-title p{font-size:13px;color:#788493}
.panel{border-color:var(--ux-line);border-radius:14px;box-shadow:var(--ux-shadow)}.panel-heading{padding:16px 18px}.panel-heading h2{font-size:14.5px;letter-spacing:-.1px}
.panel-body{padding:17px 20px}.muted{color:var(--ux-muted)}.btn{min-height:37px;border-color:#dce3ea;color:#334b62;border-radius:9px;font-weight:650;font-size:12.5px;padding:8px 13px;box-shadow:none}
.btn.primary{background:var(--ux-navy);border-color:var(--ux-navy)}.btn.primary:hover{background:#26405a}
.btn.small{min-height:31px;padding:6px 10px;font-size:12px}.btn .ux-icon{width:16px;height:16px}
input,textarea,select{font-size:13px;min-height:40px;border-color:#dae0e7}.stack{gap:14px}.form-grid{gap:13px}
label{font-size:12px;color:#425268}.status,.pill{font-size:11px}
/* State is a real semantic attribute, not a single all-gray status badge. */
.ux-state{display:inline-flex;align-items:center;gap:6px;border-radius:50px;padding:4px 10px;font-size:10.5px;font-weight:730;letter-spacing:.01em;white-space:nowrap;border:1px solid #dce3ea;background:#f5f6f8;color:#566474}
.ux-state::before{content:"";width:6px;height:6px;border-radius:100%;background:currentColor}
.ux-state-open{background:#f3f7fb;border-color:#d3e0ee;color:#4777a1}
.ux-state-in_progress{background:#ecf6fd;border-color:#bee1fa;color:#166b9e}
.ux-state-on_hold{background:#fff8e9;border-color:#f3dfa9;color:#a46b15}
.ux-state-resolved{background:#f2efff;border-color:#d9d0fc;color:#7354ab}
.ux-state-completed{background:#ebf8f1;border-color:#bfe8d0;color:#20794e}
.ux-state-canceled{background:#f5f5f7;border-color:#dedfe4;color:#858b96}
.ux-state-unknown{background:#fff0f0;border-color:#f1caca;color:#b33c3c}
/* Overview: attention KPIs and a real live work queue */
.ux-home-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}
.ux-home-tools{display:flex;flex-wrap:wrap;gap:8px}.ux-home-today{font-weight:620;font-size:12px;color:#667789}.ux-home-today .ux-icon{width:16px;height:16px;margin-right:5px}
.ux-notice-dot{display:inline-grid;place-items:center;font-size:10px;width:17px;height:17px;border-radius:50%;background:#e9edf6;color:#29476d;margin-left:4px}
.ux-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 17px}.ux-metrics-two{grid-template-columns:repeat(2,minmax(0,1fr))}
.ux-kpi{display:flex;flex-direction:column;min-width:0;padding:17px 19px;border:1px solid var(--ux-line);border-radius:14px;box-shadow:var(--ux-shadow);color:inherit;gap:7px;transition:border-color .16s,background .16s}.ux-kpi:hover{border-color:#cbd8e5;background:#fafcfd;color:inherit}
.ux-kpi small{font-size:12px;color:#687686;font-weight:580}.ux-kpi strong{font-size:30px;letter-spacing:-1.3px;line-height:1.16}.ux-kpi span{display:inline-flex;align-items:center;gap:3px;font-size:11px;color:#728299}.ux-kpi span .ux-icon{width:13px;height:13px}
.ux-kpi-overdue strong{color:#bd6e21}.ux-kpi-resolved strong{color:#725aa7}.ux-kpi-issues strong{color:#b04e46}
.ux-home-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,.67fr);gap:14px;align-items:start}
.ux-home-grid .panel-heading p{font-size:11px;margin:4px 0 0}
.ux-home-board{display:grid;grid-template-columns:minmax(240px,.87fr) minmax(0,1.13fr);min-height:420px}
.ux-home-list{border-right:1px solid var(--ux-line);min-width:0}
.ux-home-filters{display:flex;flex-wrap:wrap;gap:5px;padding:12px 12px 9px;border-bottom:1px solid var(--ux-line)}
.ux-tab{font-size:11px;border:1px solid transparent;border-radius:20px;color:#687789;background:none;padding:6px 9px;font-weight:600}
.ux-tab:hover{background:#f4f7fb}.ux-tab.is-active{border-color:#dce5ee;background:#edf3f8;color:#264867}
.ux-home-items{max-height:590px;overflow-y:auto;scrollbar-width:thin}
.ux-queue-item{display:flex;flex-direction:column;text-align:left;gap:6px;border:0;border-bottom:1px solid #eef1f4;padding:14px 16px;width:100%;background:#fff;color:inherit;cursor:pointer}
.ux-queue-item:hover,.ux-queue-item.is-selected{background:#f6f9fc}.ux-queue-item.is-selected{box-shadow:inset 3px 0 #81a4c2}
.ux-queue-item[hidden],.ux-home-preview[hidden],.ux-list-empty[hidden]{display:none!important}
.ux-queue-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;font-weight:670;color:#647485;font-size:11px}
.ux-queue-item strong{font-size:12.5px;line-height:1.4;overflow-wrap:anywhere}.ux-queue-item small{font-size:11px;color:#84909d}
.ux-list-empty{padding:24px;color:#88939f;font-size:12px}
.ux-home-detail{padding:22px;min-width:0}.ux-home-preview h3{font-size:19px;line-height:1.28;letter-spacing:-.4px;margin:17px 0 9px;overflow-wrap:anywhere}.ux-home-preview p{color:#667485;font-size:12px;max-width:680px;line-height:1.65;white-space:normal;overflow-wrap:anywhere}
.ux-preview-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.ux-order-id{font-size:12px;color:#698197;font-weight:750}
.ux-home-preview dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:26px 0}.ux-home-preview dt{font-size:10.5px;color:#8a96a1;margin-bottom:4px}.ux-home-preview dd{font-size:12px;font-weight:680;margin:0;overflow-wrap:anywhere}
.ux-home-rail{display:grid;gap:14px}.ux-rail-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 17px;border-bottom:1px solid var(--ux-line);font-size:12px}
.ux-rail-row:last-child{border-bottom:0}.ux-rail-row>div{display:grid;gap:4px}.ux-rail-row strong{font-weight:700}.ux-rail-row small{color:#81909e}
.ux-rail-row form .btn{min-height:31px}.ux-rail-number{font-size:18px;font-weight:770}.ux-mini-empty{padding:19px;color:#788596;font-size:12px}.ux-mini-empty a{font-weight:650;color:#3c6a94}
.ux-onboarding{padding-bottom:16px}.ux-onboarding>p{padding:0 18px;margin:13px 0;color:#6e7c8b}.ux-onboarding>.btn{margin:0 18px}
.ux-home-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:24px 0 12px}.ux-home-heading h2{font-size:15px}.ux-home-row{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--ux-line)}.ux-home-row div{display:grid;gap:4px}.ux-home-row small{font-size:11px;color:#84909b}
/* Order detail: one context, compact state actions, assignment within one row */
.ux-order-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:4px 0 20px}
.ux-order-hero h1{font-size:clamp(23px,2.3vw,31px);letter-spacing:-.75px;margin:5px 0 6px;line-height:1.22;overflow-wrap:anywhere}
.ux-order-hero p{font-size:12.5px;color:#7d8997;margin:0}
.ux-order-id .ux-state{margin-left:12px;vertical-align:middle}.ux-hero-actions{display:flex;flex-wrap:wrap;gap:8px}
.ux-overview-panel .panel-body{padding:18px 20px}.ux-order-description{font-size:13px;margin:0 0 18px;max-width:1100px}
.ux-order-metadata{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 22px;border-top:1px solid var(--ux-line);padding-top:17px}
.ux-order-metadata>div{display:grid;gap:4px;min-width:0}.ux-order-metadata small{font-size:11px;color:#8b96a3}.ux-order-metadata strong{font-size:12.5px;line-height:1.5;overflow-wrap:anywhere}
.ux-order-commandstrip{border:1px solid var(--ux-line);border-radius:12px;padding:12px 16px;margin:14px 0 0;display:flex;align-items:center;justify-content:space-between;gap:10px 20px;flex-wrap:wrap;background:#fcfdfe}
.ux-order-commandstrip>div:first-child{display:grid;gap:2px}.ux-order-commandstrip strong{font-size:12px}.ux-order-commandstrip .muted{font-size:11px}
.ux-state-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.ux-state-controls .ux-state-form .btn{font-size:12px;padding:7px 12px;min-width:0;width:auto}
.ux-state-popover{position:relative}.ux-state-popover summary{list-style:none;cursor:pointer}.ux-state-popover summary::-webkit-details-marker{display:none}
.ux-state-popover .stack{position:absolute;right:0;top:calc(100% + 8px);width:min(360px,88vw);background:#fff;padding:16px;border:1px solid #dbe3eb;box-shadow:0 12px 35px #20304020;border-radius:12px;z-index:20}
.ux-state-popover .stack label{font-size:12px}.ux-state-popover .stack .btn{width:100%}
.ux-inline-edit{border-bottom:1px solid #eef1f4;margin-top:7px;padding:8px 14px}.ux-inline-edit summary{display:flex;align-items:center;gap:7px;font-size:12px;cursor:pointer;list-style:none;color:#56687a}.ux-inline-edit summary strong{font-weight:680}
.ux-assignment-form{display:flex;align-items:end;gap:10px;margin:12px 0;max-width:600px}.ux-assignment-form label{flex:1}.ux-assignment-form .btn{white-space:nowrap}
.ux-info-caption{font-size:11px;color:#89949f;margin:7px 0 12px}.ux-edit-context{margin:14px 0;border:1px solid var(--ux-line);border-radius:12px;padding:0 16px 14px}
.ux-edit-context>summary{display:flex;align-items:center;gap:9px;padding:14px 0;color:#536678;font-size:12px;font-weight:720;cursor:pointer;list-style:none}
.ux-edit-context>summary::after{content:'+';font-size:18px;margin-left:auto;color:#8492a0}.ux-edit-context[open]>summary::after{content:'−'}
.ux-edit-context>.panel{margin-top:12px}.ux-edit-context>summary::-webkit-details-marker{display:none}
/* Request form is a fast action, not a page-size block. JS only upgrades to drawer. */
.ux-request-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:4px 0 16px}.ux-request-top>div{display:flex;align-items:center;gap:12px}
.ux-subtle-count{display:inline-flex;align-items:center;font-size:11px;color:#63778e;font-weight:700;background:#f2f6fa;padding:5px 9px;border-radius:22px}
.ux-request-board{max-width:100%}.ux-request-row{padding:14px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--ux-line);gap:12px}
.ux-request-row:hover{background:#f8fafc}.ux-request-row:last-child{border-bottom:0}.ux-request-row-main{display:grid;gap:5px;min-width:0}.ux-request-row-main strong{font-size:13px;overflow-wrap:anywhere}.ux-request-row-main small{font-size:11px;color:#87919d}
.ux-request-row-end{display:flex;gap:11px;align-items:center;color:#8b97a2}.ux-request-row-end .ux-icon{width:15px;height:15px}.ux-empty-requests{display:flex;align-items:center;gap:18px;padding:30px}.ux-empty-requests>.ux-icon{width:27px;height:27px;color:#9babb8}.ux-empty-requests p{margin:5px 0 0;max-width:470px}
.ux-request-drawer{margin-top:16px}.ux-request-drawer .panel-heading p{margin-top:3px;font-size:11px}.ux-request-form label{font-size:12px}.ux-request-form>.btn{width:100%;min-height:43px}.ux-other-location small{font-size:11px;color:#8792a0;font-weight:500}.ux-optional{color:#a0a9b3;font-weight:500}
.ux-request-advanced{border:1px solid var(--ux-line);border-radius:10px;padding:11px 14px}.ux-request-advanced summary{display:flex;align-items:center;gap:8px;font-weight:650;color:#64778c;cursor:pointer;list-style:none}.ux-request-advanced[open] .stack{padding:15px 0 5px}.ux-intake-note{font-size:11px}.ux-dialog-scrim{display:none}
.js .ux-request-drawer{position:fixed;right:0;top:0;bottom:0;width:min(100%,520px);max-height:100dvh;z-index:96;border-radius:16px 0 0 16px;box-shadow:-14px 0 44px #26374920;margin:0;visibility:hidden;transform:translateX(105%);transition:transform .22s ease;overflow:auto;overscroll-behavior:contain}
.js .ux-request-drawer.is-open{visibility:visible;transform:translateX(0)}
.js .ux-request-drawer .panel-heading{position:sticky;top:0;z-index:2;background:#fff}.js .ux-request-drawer .panel-body{padding:20px}
.js .ux-dialog-scrim.is-open{display:block;position:fixed;inset:0;background:#13253c70;z-index:95;backdrop-filter:blur(2px)}
.js [data-other-location].is-hidden{display:none!important}
/* Keep existing procedure/evidence/resource modules readable instead of hiding controls under inert tabs. */
.evidence-gallery{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))}.evidence-tile img{height:115px}.evidence-entry{padding:12px}
.foot{font-size:10px;margin-top:30px}
@media(max-width:1280px){.ux-home-grid{grid-template-columns:1fr}.ux-home-rail{grid-template-columns:1fr 1fr}.ux-home-board{min-height:350px}}
@media(max-width:1050px){.ux-home-board{grid-template-columns:minmax(220px,.9fr) minmax(0,1.1fr)}.ux-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 .shell{display:block}.sidebar{height:auto;position:static;padding:10px 13px;display:block}.sidebar .brand{padding:0 0 8px}
 .sidebar .nav{display:flex;flex-direction:row;overflow:auto;white-space:nowrap;gap:3px;padding-bottom:4px;scrollbar-width:none}.sidebar .nav-link{min-width:max-content;padding:8px 10px;font-size:12px}
 .sidebar .nav-icon{display:inline-flex;width:16px}.sidebar .nav-icon .ux-icon{width:15px;height:15px}
 .sidebar .sidebar-bottom{display:none}.topbar{padding:9px 15px}.content{padding:18px 13px}.page-title h1{font-size:23px}
 .ux-metrics{gap:8px}.ux-kpi{padding:13px}.ux-kpi strong{font-size:26px}.ux-home-top{align-items:flex-start;flex-wrap:wrap}
 .ux-home-grid,.ux-home-rail{grid-template-columns:1fr}.ux-home-board{grid-template-columns:1fr}.ux-home-list{border-right:0;border-bottom:1px solid var(--ux-line)}.ux-home-items{max-height:280px}
 .ux-home-detail{padding:16px}.ux-home-preview dl{gap:12px}.ux-order-metadata{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ux-order-commandstrip{padding:12px}.ux-state-controls{width:100%}.ux-state-popover .stack{left:0;right:auto}.ux-assignment-form{flex-direction:column;align-items:stretch}
 .ux-request-drawer{border-radius:0!important}.ux-request-top{flex-wrap:wrap}.ux-request-row-end .ux-icon{display:none}
}
@media(max-width:420px){.ux-home-preview dl,.ux-order-metadata{grid-template-columns:1fr}.ux-kpi strong{font-size:24px}.ux-state-controls .btn{white-space:normal}}
@media(prefers-reduced-motion:reduce){.ux-request-drawer,.ux-kpi,.ux-queue-item{transition:none!important}}
/* Final polish of the 0.7 split list: compact filters, genuine side-by-side context. */
.orders-split{grid-template-columns:minmax(260px,.78fr) minmax(0,1.62fr);gap:13px}
.orders-list-panel{position:sticky;top:12px;max-height:calc(100vh - 112px);overflow:auto;scrollbar-width:thin}
.order-list-filters{display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:8px;padding:11px 13px}
.order-list-filters label{font-size:10px}.order-list-filters input,.order-list-filters select{min-height:36px;font-size:12px;padding:7px 9px}
.order-list-item{gap:5px;padding:12px 15px}.order-list-item.is-selected{padding-left:12px}
.order-list-title{font-size:12.5px}.order-preview{padding:19px}.order-preview h3{font-size:19px;margin:9px 0 11px}.order-preview .detail-grid{margin-top:14px;gap:11px}
.order-preview-actions{margin-top:17px}.order-preview>p{font-size:12.5px;line-height:1.6}
@media(max-width:1050px){.orders-split{grid-template-columns:1fr}.orders-list-panel{position:static;max-height:390px}.order-list-filters{grid-template-columns:minmax(0,1fr) 140px}}
@media(max-width:550px){.order-list-filters{grid-template-columns:1fr}.order-preview{padding:14px}}
