/* One employee palette. Surfaces are explicit: artwork, images, maps and PDF
   previews keep their original colours. This file changes no role visibility. */
html[data-staff-graphite] {
  --staff-bg:#15171c; --staff-card:#20242b; --staff-raised:#2b313b;
  --staff-line:rgba(182,194,212,.16); --staff-control-line:#637185;
  --staff-edge:rgba(230,238,255,.065); --staff-text:#f1f3f6; --staff-muted:#bdc7d5;
  --staff-link:#a4ccff; --staff-accent:#b71d36; --staff-focus:#a9ceff;
  --staff-success:#a2e4c3; --staff-warning:#f6d68c; --staff-danger:#ffbcc4; --staff-done:#b9ceff;
  --staff-panel-light:linear-gradient(145deg,rgba(228,237,255,.035),transparent 65%);
  --staff-button-light:linear-gradient(180deg,rgba(235,241,255,.065),rgba(0,0,0,.075));
  --cf-shell-bg:var(--staff-bg)!important; --cf-shell-card:var(--staff-card)!important;
  --cf-shell-raised:var(--staff-raised)!important; --cf-shell-line:var(--staff-line)!important;
  --cf-shell-text:var(--staff-text)!important; --cf-shell-muted:var(--staff-muted)!important;
  --cf-shell-link:var(--staff-link)!important; --cf-shell-focus:var(--staff-focus)!important;
  --cf-shell-warning:var(--staff-warning)!important; --cf-color-scheme:dark!important;
  --bg:var(--staff-bg)!important; --card:var(--staff-card)!important;
  --ink:var(--staff-text)!important; --text:var(--staff-text)!important;
  --muted:var(--staff-muted)!important; --line:var(--staff-line)!important;
  --surface:var(--staff-card)!important; --surface-soft:var(--staff-raised)!important;
  --border:var(--staff-line)!important; --red:var(--staff-accent)!important;
  --blue:var(--staff-link)!important; --green:var(--staff-success)!important;
  --amber:var(--staff-warning)!important;
  color-scheme:dark; background:var(--staff-bg); color:var(--staff-text);
  --staff-dock-space:86px;
}
/* Native scrollbars belong to the employee theme, including nested tables and
   tab lists. Non-graphite pages keep their platform/light-theme scrollbars. */
html[data-staff-graphite],html[data-staff-graphite] * {
  scrollbar-color:#78889e #1b2028;
}
html[data-staff-graphite]::-webkit-scrollbar,
html[data-staff-graphite] *::-webkit-scrollbar {width:12px;height:12px}
html[data-staff-graphite]::-webkit-scrollbar-track,
html[data-staff-graphite] *::-webkit-scrollbar-track,
html[data-staff-graphite]::-webkit-scrollbar-corner,
html[data-staff-graphite] *::-webkit-scrollbar-corner {background:#1b2028}
html[data-staff-graphite]::-webkit-scrollbar-thumb,
html[data-staff-graphite] *::-webkit-scrollbar-thumb {
  background:#78889e;border:3px solid #1b2028;border-radius:8px;
}
html[data-staff-graphite]::-webkit-scrollbar-thumb:hover,
html[data-staff-graphite] *::-webkit-scrollbar-thumb:hover {background:#a3afc0}
/* A wide tab list scrolls itself at tablet and desktop widths too. Padding keeps
   the existing keyboard-focus outline inside the scroll viewport. */
#ss-root {min-width:0;max-width:100%}
#ss-root .ss-tabs {
  width:100%;min-width:0;max-width:100%;box-sizing:border-box;
  overflow-x:auto;overscroll-behavior-x:contain;padding:5px;
}
#ss-root .ss-tabs button {flex:none;white-space:nowrap}
html[data-staff-graphite] #ss-root .ss-tabs {border-bottom-color:var(--staff-line)}
.cf-direct-budget {min-width:0;max-width:100%}
.cf-direct-budget-card {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;
  gap:16px;padding:16px;margin:12px 0;border:1px solid var(--staff-line,var(--border,#39414d));
  border-radius:12px;min-width:0;background:var(--staff-card,var(--card,#fff));
}
.cf-direct-budget-card>strong,.cf-direct-budget-card>p {grid-column:1/-1;margin:0;overflow-wrap:anywhere}
.cf-direct-budget-field {display:grid;gap:8px;min-width:0;line-height:1.5}
.cf-direct-budget-field input {width:100%;min-width:0;max-width:none;box-sizing:border-box;min-height:44px;padding:10px 12px;font:inherit}
.cf-direct-budget-actions {display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.cf-direct-budget-actions .btn {min-height:44px;white-space:normal}
.cf-direct-budget-result:empty {display:none}
@media(max-width:760px) {
  .cf-direct-budget-card {grid-template-columns:minmax(0,1fr)}
  .cf-direct-budget-actions,.cf-direct-budget-actions .btn {width:100%}
  .cf-direct-budget-field input {font-size:16px}
}
html[data-staff-graphite] :is(body,.workspace,main,.content,.mp-main) {
  background:var(--staff-bg)!important; color:var(--staff-text)!important;
}
html[data-staff-graphite] :is(#calculator,.calculator-workbench,.cw-shell,#cashier,[data-cashier-graphite],.cf-management) {
  --cw-ink:var(--staff-text); --cw-muted:var(--staff-muted); --cw-line:var(--staff-line);
  --cw-red:var(--staff-accent); --cf-accent:var(--staff-success);
  --desk-bg:var(--staff-bg)!important; --desk-card:var(--staff-card)!important;
  --desk-raised:var(--staff-raised)!important; --desk-line:var(--staff-line)!important;
  --desk-text:var(--staff-text)!important; --desk-muted:var(--staff-muted)!important;
  --desk-focus:var(--staff-focus)!important;
}
html[data-staff-graphite] .ca-shell {--ca-ink:var(--staff-text);--ca-muted:var(--staff-muted);--ca-line:var(--staff-line);--ca-red:var(--staff-link)}
html[data-staff-graphite] :is(.topbar,.view>.head,.card,.panel,.settings-box,.stat,.metric,
  .modal,.modal-body,dialog,.drawer,.messenger-panel,.assistant-panel,.auth-card,.login-card,
  .pw-queue,.pw-main,.pw-card,.pw-job,.warehouse-unified-tabs,.courier-route-tools,
  .cw-catalog,.cw-stat,.cw-modal .modal-body,.cw-group,.cw-result,.cw-summary,
  .cf-management,.cash-panel,.cashier-rubricator,.cashier-item,.cashier-stat,
  .mp-header,.mp-toolbar,.mp-stats,.mp-dialog,.mp-note,.mp-order-list,.mp-shop,
  .sc-cashier-notice,.order-load-notice,.order-billing,#context,#proposal-lines,
  .fh-panel,.fh-list,.fh-calendar,.fh-metric,.wb-panel,.fh-error,
  .ca-card,.ca-kpi,.ca-empty,.ca-calendar,.mail-folders,.mail-list,.mail-reader,
  .mail-sidebar,.mail-detail,.mail-nav,.mail-index,.mail-index-head,.omni-accounts,
  .omni-sidebar,.omni-list,.omni-conversation,.omni-index,.omni-thread,.omni-thread-head,
  .help-flow>div,.help-note,.help-shot-nav,.help-shot-panel,.help-auto,
  .ss-metrics>div,.ss-toolbar,.ss-dialog,.ss-memberships,.ss-editor-help,
  .mp-sidebar,.mp-location,.mp-bulk-tools,#attention-count,
  .data-card,.data-head,.crm-panel,.cco-metric,.cco-section,.cco-calendar-day,.cco-dialog>header,
  .oj-shop-summary,.oj-bulk,.oj-column,.oj-order-card,#order-journal-summary>div,
  .order-main-fields,.order-workspace-stat,.order-doc-row,.client-contact-card,
  .order-unified-strip,.order-layout-drop,.cashier-order-filebox,.order-layout-card,
  .courier-action-card,.courier-stop-list,.schedule-board,.schedule-cell,
  .assistant-head,.assistant-foot,.messenger-head,.messenger-foot) {
  background:var(--staff-card)!important; color:var(--staff-text)!important;
  border-color:var(--staff-line)!important;
  background-image:var(--staff-panel-light)!important;
  box-shadow:inset 0 1px var(--staff-edge),0 6px 18px rgba(0,0,0,.10);
}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,.cf-management,.mp-main,body.staff-standalone)
  :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea) {
  background:#151a22!important; color:var(--staff-text)!important;
  border-color:var(--staff-control-line)!important; color-scheme:dark; max-width:100%;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.15);
}
html[data-staff-graphite] :is(input,textarea)::placeholder {color:#aeb9c9!important;opacity:1}
html[data-staff-graphite] :is(input[type=checkbox],input[type=radio]) {accent-color:var(--staff-accent)}
/* Native owner switch: the generic .field input width must not stretch it. */
html[data-staff-graphite] #support-senior-enabled[type=checkbox] {
  appearance:auto;width:22px;min-width:22px;max-width:22px;height:22px;
  padding:0;margin:4px 0;align-self:start;flex:none;
}

html[data-staff-graphite] :is(button,.btn,.button,summary,.tabs a,.pipeline-tab,.chip) {
  color:var(--staff-text); border-color:var(--staff-line);
}
html[data-staff-graphite] :is(button,.btn,.button) {
  background-image:var(--staff-button-light)!important;
  box-shadow:inset 0 1px var(--staff-edge),inset 0 -1px rgba(0,0,0,.18),0 2px 5px rgba(0,0,0,.12);
}
html[data-staff-graphite] :is(button,.btn,.button,.pipeline-tab,.chip):not(.primary):not(.danger):not(.ai) {
  background-color:var(--staff-raised)!important; color:var(--staff-text)!important;
  border-color:var(--staff-line)!important;
}
html[data-staff-graphite] :is(.btn.primary,.cw-btn.primary,button.primary,.button.primary,.dock-button.ai,.btn.danger,button.danger) {
  background:var(--staff-accent)!important; color:#fff!important; border-color:var(--staff-accent)!important;
}
html[data-staff-graphite] :is(button,.btn,.button):hover:not(:disabled) {border-color:rgba(182,194,212,.38)!important;box-shadow:inset 0 1px rgba(230,238,255,.12),0 3px 8px rgba(0,0,0,.18)}
html[data-staff-graphite] :is(button,.btn,.button):active:not(:disabled) {box-shadow:inset 0 2px 4px rgba(0,0,0,.28)}
html[data-staff-graphite] :is(.tabs,.cashier-tabs,.fh-tabs,.pipeline-tabs,.oj-section-tabs,.cc-tabs,.nav)
  :is(button.active,[aria-current=page],[aria-selected=true]) {background:#402632!important;color:#fff!important;border-color:rgba(241,132,151,.35)!important;box-shadow:inset 3px 0 #f18497}
html[data-staff-graphite] :is(button,input,select,textarea):disabled {opacity:1;color:#aeb9c9!important;background-color:#262b33!important;cursor:not-allowed}
html[data-staff-graphite] :is(button,input,select,textarea,a,summary,[tabindex]):focus-visible {outline:2px solid var(--staff-focus)!important;outline-offset:3px}
html[data-staff-graphite] :is(.muted,.hint,.eyebrow,.help-text,small,.metric small,.stat small) {color:var(--staff-muted)}
html[data-staff-graphite] :is(.view>.head,.modal-head,.panel-head) .eyebrow {color:var(--staff-muted)!important}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,.mp-main,body.staff-standalone) a:not(.btn):not(.button) {color:var(--staff-link)}
html[data-staff-graphite] :is(.topbar,.head,.modal-head,.panel-head) :is(h1,h2,h3,b,strong) {color:var(--staff-text)!important}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,body.staff-standalone) :is(th,td) {color:var(--staff-text);border-color:var(--staff-line)!important}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,body.staff-standalone) th {background:var(--staff-raised)!important;color:var(--staff-muted)!important}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,body.staff-standalone) tbody tr {background:var(--staff-card)}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,body.staff-standalone) tbody tr:hover {background:var(--staff-raised)}
html[data-staff-graphite] :is(.view,.modal,dialog,.panel,body.staff-standalone) td {background-color:transparent}
/* Filled legacy boards use explicit surfaces rather than the old light cards. */
html[data-staff-graphite] :is(#crm .kanban-column,#crm .kanban-add-stage,
  #schedule .schedule-person,#courier .courier-contact,#courier .courier-proof-upload,
  #courier .courier-route-order>div) {
  background:var(--staff-card)!important;color:var(--staff-text)!important;border-color:var(--staff-line)!important;
}
html[data-staff-graphite] :is(#crm .deal-card,#crm .kanban-count,
  #schedule .schedule-corner,#schedule .schedule-date) {
  background:var(--staff-raised)!important;color:var(--staff-text)!important;border-color:var(--staff-line)!important;
}
html[data-staff-graphite] #crm :is(.kanban-total,.deal-client,.deal-card small) {color:var(--staff-muted)!important}
html[data-staff-graphite] #crm .deal-priority.urgent {color:var(--staff-danger)!important}
html[data-staff-graphite] #crm .deal-card:hover {border-color:var(--staff-focus)!important}
html[data-staff-graphite] #crm .kanban-column:is(.dragover,.stage-dragover) {box-shadow:inset 0 0 0 2px var(--staff-focus)}
html[data-staff-graphite] #schedule .schedule-cell.filled {background:#20382f!important;color:var(--staff-text)!important}
html[data-staff-graphite] #schedule .schedule-cell.filled:hover {background:#29483b!important}
html[data-staff-graphite] #courier .courier-stop-list li.active {background:#402632!important;box-shadow:inset 3px 0 #f18497}
html[data-staff-graphite] #courier .courier-stop-list li.done {opacity:1}
html[data-staff-graphite] #courier .courier-stop-list button {background:transparent!important}
/* Only the map's empty/loading/error message; no rules touch map tiles or artwork. */
html[data-staff-graphite] #courier .courier-map-empty {background:var(--staff-card);color:var(--staff-text)}
html[data-staff-graphite] .view .status {background:var(--staff-raised)!important;color:var(--staff-text)!important}
html[data-staff-graphite] .view .status:is(.production,.approval,.delivery) {background:#343126!important;color:var(--staff-warning)!important}
html[data-staff-graphite] .view .status.new {background:#20382f!important;color:var(--staff-success)!important}
html[data-staff-graphite] .view .status:is(.ready,.closed) {background:#273246!important;color:var(--staff-done)!important}
html[data-staff-graphite] .view .status.cancelled {background:#3b2630!important;color:var(--staff-danger)!important}
/* Stage colours identify the order, while its surface remains graphite. */
html[data-staff-graphite] #orders tr.has-deal-stage {background:color-mix(in srgb,var(--deal-stage) 5%,var(--staff-card))!important}
html[data-staff-graphite] #orders tr.has-deal-stage:hover {background:color-mix(in srgb,var(--deal-stage) 9%,var(--staff-raised))!important}
html[data-staff-graphite] #orders tr.order-attention {--oj-row-accent:var(--staff-danger);background:#2c232b!important;box-shadow:inset 4px 0 var(--staff-danger)}
html[data-staff-graphite] #orders tr.order-new {--oj-row-accent:var(--staff-success);background:#222c2a!important;box-shadow:inset 4px 0 var(--staff-success)}
html[data-staff-graphite] #orders tr.order-working {--oj-row-accent:var(--staff-warning);background:#2c2b25!important;box-shadow:inset 4px 0 var(--staff-warning)}
html[data-staff-graphite] #orders tr.order-attention:hover {background:#382a32!important}
html[data-staff-graphite] #orders tr.order-new:hover {background:#2a3831!important}
html[data-staff-graphite] #orders tr.order-working:hover {background:#38352b!important}
html[data-staff-graphite] #orders tr:is(.order-attention,.order-new,.order-working) td:first-child {box-shadow:inset 4px 0 var(--oj-row-accent)!important}
html[data-staff-graphite] #orders :is(th,td) {color:var(--staff-text)!important}
html[data-staff-graphite] #orders tbody :is(.tag,.status-badge,.oj-stage-label,.oj-stage-trigger) {background:var(--staff-raised)!important;color:var(--staff-text)!important;border-color:var(--staff-line)!important}
/* Small, labelled status cues carry colour; the order surface stays graphite. */
html[data-staff-graphite] #orders :is(.oj-stage-trigger,.oj-stage-label) {border-inline-start:3px solid var(--oj-row-accent,var(--deal-stage,var(--staff-line)))!important}
html[data-staff-graphite] #orders tr.order-attention :is(.oj-stage-trigger,.oj-stage-label) {color:var(--staff-danger)!important;background:#35282f!important}
html[data-staff-graphite] #orders tr.order-new :is(.oj-stage-trigger,.oj-stage-label) {color:var(--staff-success)!important;background:#24382f!important}
html[data-staff-graphite] #orders tr.order-working :is(.oj-stage-trigger,.oj-stage-label) {color:var(--staff-warning)!important;background:#363225!important}
html[data-staff-graphite] #orders tr:is([data-order-status=ready],[data-order-status=closed]):not(.order-attention) {--oj-row-accent:var(--staff-done);background:#232b39!important;box-shadow:inset 4px 0 var(--staff-done)}
html[data-staff-graphite] #orders tr:is([data-order-status=ready],[data-order-status=closed]):not(.order-attention):hover {background:#2b3547!important}
html[data-staff-graphite] #orders tr:is([data-order-status=ready],[data-order-status=closed]):not(.order-attention) :is(.oj-stage-trigger,.oj-stage-label) {color:var(--staff-done)!important;background:#273246!important}
html[data-staff-graphite] #orders tr[data-order-status=cancelled] {--oj-row-accent:var(--staff-danger);background:#2c232b!important;box-shadow:inset 4px 0 var(--staff-danger)}
html[data-staff-graphite] #orders tr[data-order-status=cancelled] :is(.oj-stage-trigger,.oj-stage-label) {color:var(--staff-danger)!important;background:#35282f!important}
html[data-staff-graphite] :is(.data-head,.modal-head,.modal-foot,.panel-head,.assistant-head,.assistant-foot,.messenger-head,.messenger-foot,.oj-tools,.courier-live-map,.help-shot,hr) {border-color:var(--staff-line)!important}
html[data-staff-graphite] #orders .oj-column {border-top-color:var(--stage-color,var(--staff-line))!important}
html[data-staff-graphite] :is(.status-badge,.badge,.pill,.tag) {background-color:var(--staff-raised);color:var(--staff-text);border-color:var(--staff-line)}
html[data-staff-graphite] :is(.error,.warning,.danger-text,[data-error]) {color:var(--staff-danger)}
html[data-staff-graphite] :is(.error,.ca-error,.wh-error) {background:#3b2630!important;color:var(--staff-danger)!important;border-color:var(--staff-danger)!important}
html[data-staff-graphite] .hint {background:var(--staff-raised)!important;color:var(--staff-muted)!important;border-color:var(--staff-line)!important}
html[data-staff-graphite] :is(.success,.success-text) {color:var(--staff-success)}
html[data-staff-graphite] #inventory .wh-controls label,html[data-staff-graphite] .wh-form label {color:var(--staff-muted)!important}
html[data-staff-graphite] #ss-root {color:var(--staff-text)!important}
html[data-staff-graphite] #ss-root p {color:var(--staff-muted)!important}
html[data-staff-graphite] :is(.pricing-kicker,.sc-heading>div>span,.help-search span,.ozon-word) {color:var(--staff-link)!important}
html[data-staff-graphite] :is(.help-icon,.help-chip) {background:var(--staff-raised)!important;color:var(--staff-text)!important}
html[data-staff-graphite] .help-step span {color:var(--staff-muted)!important}
html[data-staff-graphite] :is(.cw-eyebrow,.cw-entry-arrow) {color:var(--staff-link)!important}
html[data-staff-graphite] .cw-entry-icon {background:var(--staff-raised)!important;color:var(--staff-link)!important}
html[data-staff-graphite] :is(.fh-metric>span,.fh-metric small,.fh-block-head small,.fh-days span,.fh-days small,.fh-note,.fh-empty,.fh-panel-foot,.fh-filters label,.fh-table small,.fh-review-row small,.fh-priority-row small) {color:var(--staff-muted)!important}
html[data-staff-graphite] :is(.fh-priority-row b,.fh-priority-row strong) {color:var(--staff-text)!important}
html[data-staff-graphite] :is(.fh-type,.fh-badge,.wb-badge,.fh-review-icon) {background:var(--staff-raised)!important;color:var(--staff-muted)!important}
html[data-staff-graphite] :is(.fh-good,.fh-badge.good,.wb-badge.good) {color:var(--staff-success)!important}
html[data-staff-graphite] :is(.fh-bad,.fh-metric.fh-warn strong,.fh-badge.bad,.fh-badge.wait) {color:var(--staff-warning)!important}
html[data-staff-graphite] :is(.alert,.notice,.warning-box,.error-box) {background:var(--staff-raised);color:var(--staff-text);border-color:var(--staff-line)}
html[data-staff-graphite] :is(.topbar,#sidebar,.mp-sidebar) {border-color:var(--staff-line)}
html[data-staff-graphite] .topbar {min-width:0;gap:12px}
html[data-staff-graphite] .sidebar :is(.side-state,.nav-label,summary,.brand small) {color:var(--staff-muted)!important}
/* Navigation is a quiet rail; elevation belongs to actions and content. */
html[data-staff-graphite] .sidebar .nav button {background-image:none!important;box-shadow:none}
html[data-staff-graphite] .sidebar .nav button:not(.active) {background-color:transparent!important;border-color:transparent!important}
html[data-staff-graphite] .sidebar .nav button:not(.active):hover {background-color:var(--staff-raised)!important}
html[data-staff-graphite] .view>.head {background:transparent!important;border-color:transparent!important;box-shadow:none}
html[data-staff-graphite] :is(.cco-tabs,.mp-tabs) :is([aria-pressed=true],[aria-selected=true]) {background:#402632!important;color:#fff!important;border-color:rgba(241,132,151,.35)!important;box-shadow:inset 3px 0 #f18497}
html[data-staff-graphite] .sidebar .nav button.active i {color:var(--staff-text)!important}
html[data-staff-graphite] .cf-office-theme,html[data-staff-graphite] [data-graphite-theme] {display:none!important}
html[data-staff-graphite] #bottom-dock {
  background:var(--staff-card)!important;border-color:var(--staff-line)!important;
  bottom:calc(12px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);
  box-shadow:0 4px 18px #0005;
}
html[data-staff-graphite] #bottom-dock .dock-button {background:var(--staff-raised)!important;color:var(--staff-text)!important;border:1px solid var(--staff-line)!important}
html[data-staff-graphite] #bottom-dock .dock-button.ai {background:var(--staff-accent)!important;color:#fff!important}
html[data-staff-graphite] body:has(>#bottom-dock) .content {padding-bottom:calc(var(--staff-dock-space) + env(safe-area-inset-bottom))!important}
html[data-staff-graphite] :is(.messenger-panel,.assistant-panel,#assistant-panel.assistant-panel) {
  bottom:calc(var(--staff-dock-space) + env(safe-area-inset-bottom))!important;
  max-height:calc(100dvh - var(--staff-dock-space) - 20px - env(safe-area-inset-bottom))!important;
}
html[data-staff-graphite] .sc-cashier-notice {bottom:calc(var(--staff-dock-space) + env(safe-area-inset-bottom))}
html[data-staff-graphite] .content,html[data-staff-graphite] .view,html[data-staff-graphite] .top-actions {min-width:0}
html[data-staff-graphite] .view>.head h1 {font-size:clamp(24px,2.3vw,34px)}
/* Independent employee registries share the same palette, not the print/PDF. */
html[data-staff-graphite] body.staff-standalone {margin:0;font:15px/1.5 system-ui,sans-serif}
html[data-staff-graphite] body.staff-standalone>header {background:var(--staff-card);color:var(--staff-text);border-color:var(--staff-line);flex-wrap:wrap}
html[data-staff-graphite] body.staff-standalone :is(h1,h2,h3,label) {color:var(--staff-text)}
html[data-staff-graphite] body.staff-standalone :is(.heading p,header p,header strong span,#page-subtitle) {color:var(--staff-muted)!important}
html[data-staff-graphite] body.staff-standalone :is(aside,article,fieldset,form,#category-settings) {background:var(--staff-card);color:var(--staff-text);border-color:var(--staff-line)}
html[data-staff-graphite] body.staff-standalone :is(.row,.entry,.item,.registry-item,.summary,.totals,.facsimile,.toolbar,.filters,.invoice-card,.mp-order,.mp-product) {background:var(--staff-card);color:var(--staff-text);border-color:var(--staff-line)}
html[data-staff-graphite] body.staff-standalone :is(main,.layout,.panel,.heading,.toolbar,.filters,.mp-main) {min-width:0;max-width:100%;box-sizing:border-box}
html[data-staff-graphite] body.staff-standalone :is(.heading,.panel-head,.toolbar,.filters,.buttons,.actions) {flex-wrap:wrap}
html[data-staff-graphite] body.staff-standalone table {width:100%;border-collapse:collapse}
html[data-staff-graphite] body.staff-standalone :is(th,td) {overflow-wrap:anywhere}
@media(max-width:760px) {
  html[data-staff-graphite] {--staff-dock-space:78px}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar {
    display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:4px 8px;
    padding:8px 12px;height:auto;min-height:0;align-items:center;
  }
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .top-actions {display:contents}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar #menu {grid-column:1;grid-row:1;width:36px;height:38px;padding:0}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar .staff-role-field:not([hidden]) {display:block;grid-column:2;grid-row:1;min-width:0;width:100%}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar .staff-role-field label {display:none}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar .staff-role-field select {width:100%;max-width:100%;min-width:0;min-height:38px;font-size:13px;padding:6px}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar .user-menu {grid-column:3;grid-row:1;gap:4px}
  /* These two actions appear asynchronously after authentication. Give them a
     shared row so grid auto-placement cannot squeeze them into the menu cell. */
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar :is(#online-copycenter-open,#staff-print-chat-open) {
    grid-row:3;width:100%;min-width:0;min-height:36px;padding:6px;font-size:11px;line-height:1.25;white-space:normal;
  }
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar #online-copycenter-open {grid-column:1/3}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar #staff-print-chat-open {grid-column:3}
  html[data-staff-graphite] .topbar :is(#account-settings,#logout) {min-height:38px;padding:4px 7px;font-size:12px}
  html[data-staff-graphite] .topbar #account-settings {padding:0}
  html[data-staff-graphite] .topbar .avatar {width:34px;height:34px;font-size:12px}
  html[data-staff-graphite] body[data-staff-workspace]:not(.copycenter-role) .topbar .crumb {grid-column:1/-1;grid-row:2;font-size:11px;line-height:16px}
  html[data-staff-graphite] .topbar #staff-role-state:not(:empty) {grid-column:1/-1;font-size:12px}
  html[data-staff-graphite] .topbar .pwa-install:not([hidden]) {grid-column:2/-1;font-size:12px;padding:4px 8px;justify-self:end}
  html[data-staff-graphite] #bottom-dock {left:8px;right:8px;width:auto;max-width:none;gap:4px;padding:4px;bottom:calc(8px + env(safe-area-inset-bottom))}
  html[data-staff-graphite] #bottom-dock .dock-button {min-height:44px;height:44px!important;min-width:44px;font-size:11px!important;padding:2px 4px!important}
  html[data-staff-graphite] #cashier .cashier-graphite-tools #bottom-dock {left:auto;right:auto;width:100%;bottom:auto}
  html[data-staff-graphite] #materials .material-bulk {flex-wrap:wrap;min-width:0}
  html[data-staff-graphite] #materials .data-card {overflow-x:auto;max-width:100%}
  html[data-staff-graphite] #incoming-invoices .data-head {flex-wrap:wrap;gap:10px;min-width:0}
  html[data-staff-graphite] #incoming-invoice-filter {max-width:100%;overflow-x:auto;min-width:0}
  html[data-staff-graphite] #incoming-invoice-filter button {flex:none}
  html[data-staff-graphite] #incoming-invoices .table-wrap {overflow-x:auto;max-width:100%}
  html[data-staff-graphite] body.staff-standalone main {padding:16px 12px}
  html[data-staff-graphite] body.staff-standalone>header {padding:12px;gap:12px}
  html[data-staff-graphite] body.staff-standalone :is(.layout,.metrics,.mp-stats) {grid-template-columns:minmax(0,1fr)}
  html[data-staff-graphite] body.staff-standalone :is(h1,.heading h1) {font-size:26px;overflow-wrap:anywhere}
}

/* Decorative dividers stay quiet; input boundaries and keyboard focus remain
   distinct. Respect a user's explicit high-contrast preference. */
@media (prefers-contrast:more) {
  html[data-staff-graphite] {--staff-line:#8793a5;--staff-control-line:#a5b4ca;--staff-edge:transparent;--staff-panel-light:none;--staff-button-light:none}
  html[data-staff-graphite] :is(button,.btn,.button):hover:not(:disabled) {border-color:var(--staff-focus)!important}
}
@media (prefers-reduced-motion:reduce) {
  html[data-staff-graphite],html[data-staff-graphite] .ss-tabs {scroll-behavior:auto}
}
@media (forced-colors:active) {
  html[data-staff-graphite],html[data-staff-graphite] * {scrollbar-color:auto}
  html[data-staff-graphite]::-webkit-scrollbar-track,html[data-staff-graphite] *::-webkit-scrollbar-track,
  html[data-staff-graphite]::-webkit-scrollbar-corner,html[data-staff-graphite] *::-webkit-scrollbar-corner {background:Canvas}
  html[data-staff-graphite]::-webkit-scrollbar-thumb,html[data-staff-graphite] *::-webkit-scrollbar-thumb {background:ButtonText;border-color:Canvas}

  html[data-staff-graphite] :is(button,.btn,.button,input,select,textarea) {forced-color-adjust:auto;box-shadow:none}
  html[data-staff-graphite] :is(button,input,select,textarea,a,summary,[tabindex]):focus-visible {outline-color:Highlight!important}
}
