/* Wraith slate palette — shared operational surfaces, without layout changes. */
html[data-theme=dark]{--ui-page:#06141b;--ui-panel:#11212d;--ui-input:#091a24;--ui-ink:#edf1ef;--ui-muted:#aebdc0;--ui-border:#354b59;--ui-disabled:#253745;--ui-disabled-ink:#9ba8ab;--ui-hover:#253745;--ui-active:#253745;--ui-active-ink:#edf1ef;--ui-focus:#9ba8ab;--line:#354b59;--muted:#aebdc0;--accent:#9ba8ab;--modern-shadow:0 10px 30px #00000020;background:#06141b;color:#edf1ef}
html[data-theme=light]{--ui-page:#e9edeb;--ui-panel:#f8faf9;--ui-input:#ffffff;--ui-ink:#11212d;--ui-muted:#4a5c6a;--ui-border:#b8c4c5;--ui-disabled:#dce3e1;--ui-disabled-ink:#4a5c6a;--ui-hover:#e0e7e5;--ui-active:#ccd0cf;--ui-active-ink:#11212d;--ui-focus:#4a5c6a;--line:#c8d1cf;--muted:#4a5c6a;--accent:#253745;--modern-shadow:0 8px 26px #11212d09;background:#e9edeb;color:#11212d}
html[data-theme] body.operations-app{background:var(--ui-page);color:var(--ui-ink);font-family:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased}
html[data-theme] body.operations-app :is(.panel,.stats,.stat,.overview,.presence-panel,.import-card,.measurement-launch,.label-output,dialog){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border);border-radius:16px;box-shadow:var(--modern-shadow)}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar){background:#11212d;color:#ccd0cf;border-right:1px solid #253745;box-shadow:6px 0 24px #06141b12}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) nav a{color:#b6c3c5;border-radius:10px;min-height:44px;transition:background .15s,color .15s}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) nav a:hover{background:#253745;color:#fff}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) nav a:is(.active,[aria-current=page]){background:#253745;color:#fff;box-shadow:inset 3px 0 #9ba8ab}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) .app-revision{color:#9ba8ab}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) .logo{filter:brightness(0) invert(1)}
html[data-theme] body.operations-app :is(h1,h2,h3,.product .name,.product-heading h3,.section-label span,.count-heading h1,.label-job strong){color:var(--ui-ink);letter-spacing:-.025em}
html[data-theme] body.operations-app :is(.eyebrow,.breadcrumb,.section-label,.location-label){color:var(--ui-muted)}
html[data-theme] body.operations-app :is(label,.unit-note,.footnote,.label-note,.identifiers,.identifiers span:first-child,.location-value,.muted,.history-list,.empty-detail p,.heading p,.status:not(.error)){color:var(--ui-muted)}
html[data-theme] body.operations-app :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){background:var(--ui-input);color:var(--ui-ink);border-color:var(--ui-border);border-radius:9px;box-shadow:none;transition:border-color .15s,box-shadow .15s}
html[data-theme] body.operations-app :is(input,select,textarea):focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb,var(--ui-focus) 12%,transparent)}
html[data-theme] body.operations-app :is(.search,.search-wrap){background:var(--ui-input);border-color:var(--ui-border);border-radius:11px}
html[data-theme] body.operations-app :is(.primary,.actions button[type=submit],#loadSheet,#newCount){background:#253745;color:#fff;border:1px solid #4a5c6a;border-radius:10px;box-shadow:0 3px 8px #06141b12;font-weight:600}
html[data-theme=dark] body.operations-app :is(.primary,.actions button[type=submit],#loadSheet,#newCount){background:#ccd0cf;color:#11212d;border-color:#ccd0cf}
html[data-theme] body.operations-app :is(.primary,.actions button[type=submit],#loadSheet,#newCount):hover{filter:brightness(1.09)}
html[data-theme] body.operations-app :is(.secondary,.quiet,.camera-trigger,.subtle-button,.icon-button,.theme-toggle){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border);border-radius:9px}
html[data-theme] body.operations-app :is(.filters button,.archive-tabs button,.label-size){border-radius:9px;color:var(--ui-muted)}
html[data-theme] body.operations-app :is(.filters button.active,.filters button.selected,.archive-tabs button.active,.label-size[aria-pressed=true]){background:var(--ui-active);color:var(--ui-active-ink);border-color:var(--ui-border);font-weight:700;box-shadow:inset 0 -2px var(--ui-focus)}
html[data-theme] body.operations-app :is(.product,.label-job,.archive-table tbody tr,.presence-user){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html[data-theme] body.operations-app :is(.product:hover,.archive-table tbody tr:hover){background:var(--ui-hover)}
html[data-theme] body.operations-app .product.active{background:var(--ui-active);border-left-color:var(--ui-focus)}
html[data-theme] body.operations-app :is(.pill,.hint,.measurement-history-status){background:var(--ui-hover);color:var(--ui-muted);border-color:var(--ui-border);border-radius:7px}
html[data-theme] body.operations-app :is(.progress i,.progress-bar){background:var(--ui-focus)}
html[data-theme] body.operations-app :is(th,td,.panel-title,.product-heading,header,.save-area,.list-footer){border-color:var(--ui-border)}
html[data-theme] body.operations-app th{color:var(--ui-muted);font-weight:600}
html[data-theme] body.operations-app .archive-table{border-radius:12px}
html[data-theme] body.operations-app :is(.actions,.audit-toolbar,.attachment-heading,.attachment-body,.audit-body){background:var(--ui-panel);color:var(--ui-ink)}
html[data-theme] body.operations-app .theme-track{background:var(--ui-border)}
html[data-theme] body.operations-app :is(.navigation-flyout,.section-nav-menu){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
@media(max-width:760px){html[data-theme] body.operations-app :is(.panel,.stats,.overview,.presence-panel,.import-card){border-radius:12px}html[data-theme] body.operations-app :is(button,.primary,.secondary,.camera-trigger){min-height:44px}html[data-theme] body.operations-app :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px}html[data-theme] body.operations-app .actions{border-top:1px solid var(--ui-border)}}
@media(prefers-reduced-motion:reduce){html[data-theme] body.operations-app *{scroll-behavior:auto!important;transition:none!important}}
/* Translucent surfaces with opaque fallbacks and a single card outline. */
html[data-theme=dark]{--ui-panel:rgba(17,33,45,.88);--ui-input:rgba(6,20,27,.64);--ui-border:rgba(155,168,171,.22);--ui-focus:#bd9af4;--ui-active:rgba(149,99,232,.17);--ui-active-ink:#e3d4ff;--accent:#bd9af4;--glass-edge:rgba(230,237,240,.12);--glass-top:rgba(255,255,255,.09);--glass-shadow:0 12px 32px #0002,inset 0 1px 0 var(--glass-top);--purple-fill:rgba(149,99,232,.15);--purple-ink:#d5baff;--purple-edge:rgba(189,154,244,.32)}
html[data-theme=light]{--ui-panel:rgba(248,250,249,.87);--ui-input:rgba(255,255,255,.76);--ui-border:rgba(74,92,106,.2);--ui-focus:#7543b7;--ui-active:rgba(117,67,183,.11);--ui-active-ink:#61339e;--accent:#7543b7;--glass-edge:rgba(255,255,255,.8);--glass-top:rgba(255,255,255,.95);--glass-shadow:0 10px 28px #11212d0b,inset 0 1px 0 var(--glass-top);--purple-fill:rgba(117,67,183,.09);--purple-ink:#6534a4;--purple-edge:rgba(117,67,183,.25)}
html[data-theme] body.operations-app{background:radial-gradient(ellipse at 0 0,rgba(149,99,232,.07),transparent 52%),var(--ui-page)}
html[data-theme] body.operations-app :is(.panel,.stats,.overview,.presence-panel,.import-card,.measurement-launch,.label-output,dialog,.archive-table tbody tr){background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:20px;box-shadow:var(--glass-shadow);background-clip:padding-box}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){html[data-theme] body.operations-app :is(.panel,.presence-panel,.import-card,.label-output,dialog,.archive-table tbody tr,.section-flyout){-webkit-backdrop-filter:blur(18px) saturate(115%);backdrop-filter:blur(18px) saturate(115%)}}
html[data-theme] body.operations-app :is(.primary,.actions button[type=submit],#loadSheet,#newCount){background:linear-gradient(145deg,#9161ce,#7142b0);border-color:#a782d8;color:#fff;box-shadow:inset 0 1px 0 #ffffff30,0 5px 14px #7142b020;border-radius:12px}
html[data-theme] body.operations-app :is(.secondary,.quiet,.camera-trigger,.subtle-button,.icon-button,.theme-toggle,.record-actions button){background:var(--ui-panel);border:1px solid var(--ui-border);color:var(--ui-ink);border-radius:12px;box-shadow:inset 0 1px 0 var(--glass-top)}
html[data-theme] body.operations-app :is(.archive-table td.record-actions button:first-child,.actions button:not(.primary),.nav-item.active){background:var(--purple-fill);color:var(--purple-ink);border-color:var(--purple-edge)}
html[data-theme] body.operations-app :is(.workflow-badge:not(.done),.badge:not(.done),.count-status,.measurement-status.pending){background:var(--purple-fill);color:var(--purple-ink);border-color:var(--purple-edge)}
html[data-theme] body.operations-app .workflow-badge{margin:3px 5px 3px 0;line-height:1.5;border-radius:9px;padding:5px 9px;max-width:100%;vertical-align:top}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) nav a:is(.active,[aria-current=page]){background:rgba(149,99,232,.16);box-shadow:inset 3px 0 #b18be5}
html[data-theme] body.operations-app :is(.sidebar,.operations-sidebar) nav i{background:#b18be5}
html[data-theme] body.operations-app .section-flyout{background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border);box-shadow:var(--glass-shadow)}
html[data-theme] body.operations-app .section-flyout-link{color:var(--ui-ink)}
html[data-theme] body.operations-app .section-flyout-link:is(:hover,.active){background:var(--purple-fill);color:var(--purple-ink)}
html[data-theme] body.operations-app .archive-table{background:transparent;box-shadow:none;border-color:var(--ui-border);border-radius:16px}
html[data-theme] body.operations-app .archive-table :is(table,tbody,td){background:transparent!important;box-shadow:none;border-radius:0}
html[data-theme] body.operations-app .archive-table th{background:var(--ui-panel);color:var(--ui-muted)}
html[data-theme] body.operations-app :is(input,select,textarea,.theme-toggle):focus-visible{outline-color:var(--ui-focus)}
html[data-theme] body.operations-app :is(.measurement-groups .weight-group,.measurement-groups .weight-group legend){border-color:var(--purple-edge);color:var(--purple-ink);background:var(--purple-fill)}
html[data-theme] body.operations-app .location-line.gross .location-value{color:var(--purple-ink)}
@media(max-width:760px){
 html[data-theme] body.operations-app .archive-table{background:transparent!important;border:0!important;border-radius:0;overflow:visible}
 html[data-theme] body.operations-app .archive-table :is(table,tbody){display:block;width:100%;padding:0;margin:0;border:0;background:transparent!important}
 html[data-theme] body.operations-app .archive-table tbody tr{min-width:0;overflow:hidden;border:1px solid var(--ui-border);border-radius:20px;margin:0 0 16px;padding:6px 16px 16px;box-shadow:var(--glass-shadow)}
 html[data-theme] body.operations-app .archive-table td{padding:10px 0;border:0;min-width:0}
 html[data-theme] body.operations-app .archive-table td:first-child{border-bottom:1px solid var(--ui-border);padding:14px 0}
 html[data-theme] body.operations-app .archive-table td.record-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
 html[data-theme] body.operations-app .record-actions button{width:100%;min-width:0;min-height:46px;margin:0;padding:10px;white-space:normal;line-height:1.45;overflow-wrap:anywhere}
 html[data-theme] body.operations-app .archive-tabs button{min-height:48px;padding:12px;line-height:1.45;border:1px solid var(--ui-border);background:var(--ui-panel)}
 html[data-theme] body.operations-app .archive-tabs button.active{background:var(--purple-fill);color:var(--purple-ink);border-color:var(--purple-edge)}
}
@media(prefers-reduced-transparency:reduce){html[data-theme=dark]{--ui-panel:#11212d;--ui-input:#091a24}html[data-theme=light]{--ui-panel:#f8faf9;--ui-input:#fff}html[data-theme] body.operations-app *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}}
html[data-theme] body.operations-app #measurements input.pending{background:var(--purple-fill);border-color:var(--purple-edge)}
html[data-theme] body.operations-app :is(.warnings,.notice,.label-size[aria-pressed=true]){background:var(--purple-fill);border-color:var(--purple-edge);color:var(--purple-ink)}
@media(max-width:420px){html[data-theme] body.operations-app .page-heading>div{flex:0 1 auto;width:100%}}
