/* The approved compact desktop screens and their blue palette.
   Screen only. Printing, data, permissions and document event handlers are shared. */
@layer screenshotRestore {
 @media screen {
  html[data-desktop-palette=reference] {
   --desktop-ink:#153b5d;
   --desktop-muted:#456785;
   --desktop-brand:#1764b0;
   --desktop-brand-strong:#115697;
   --desktop-title-start:#3063ab;
   --desktop-title-end:#3973bd;
   --desktop-caption-control:#28538f;
   --desktop-surface:#fff;
   --desktop-canvas:#f7fbff;
   --desktop-line:#bdd4e8;
   --desktop-rule:#c9ddec;
   --desktop-soft:#dfedfa;
   --desktop-alternate:#eef6fd;
   --desktop-table-alternate:var(--desktop-alternate);
   --desktop-selected:#d5eaff;
   --desktop-focus:var(--desktop-selected);
   --win-captionColor:var(--desktop-title-end)!important;--win-captionText:#fff!important;--win-headingColor:var(--desktop-soft)!important;--win-headingText:var(--desktop-ink)!important;
   --win-surfaceColor:var(--desktop-surface)!important;--win-pageColor:var(--desktop-canvas)!important;--win-textColor:var(--desktop-ink)!important;--win-rowColor:var(--desktop-alternate)!important;--win-borderColor:var(--desktop-line)!important;
   --win-buttonColor:var(--desktop-soft)!important;--win-buttonText:var(--desktop-ink)!important;--win-inputColor:var(--desktop-surface)!important;--win-accentColor:var(--desktop-brand)!important;--win-sidebarColor:var(--desktop-soft)!important;
   --formal-ink:var(--desktop-ink)!important;--formal-muted:var(--desktop-muted)!important;--formal-line:var(--desktop-line)!important;--formal-accent:var(--desktop-brand)!important;--formal-row:var(--desktop-alternate)!important;--formal-surface:var(--desktop-surface)!important;
  }
  /* Purchase item search uses the table cell as its sole visible frame. */
  html[data-desktop-palette=reference] body.zace-desktop #tradeForm[data-trade-kind=purchase] #tradeLines td:has(>select[data-key=itemId])>.master-combo{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;width:100%!important}
  html[data-desktop-palette=reference] body.zace-desktop #tradeForm[data-trade-kind=purchase] #tradeLines td:has(>select[data-key=itemId])>.master-combo>.master-search{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;outline:none!important}
  html[data-desktop-palette=reference] body.zace-desktop #tradeForm[data-trade-kind=purchase] #tradeLines td:has(>select[data-key=itemId]):focus-within{outline:1px solid var(--desktop-brand)!important;outline-offset:-1px!important}
  /* The darker home frame is scoped to the dashboard; document grids retain their accepted colors. */
  html[data-desktop-palette=reference] body.zace-desktop #content:is(.desktop-home-frame,#homePeriodFilter){background:#d3e2ef!important}
  html[data-desktop-palette=reference] body.zace-desktop #content:is(.desktop-home-frame,#homePeriodFilter) :is(.kpi-card,.card){background:#f0f5fb!important}
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) :is(.sidebar,.topbar){background:linear-gradient(150deg,#3063ab,#3973bd)!important;border-color:#4b7dbc!important;color:#f5f9ff!important}
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) .sidebar :is(.brand,.brand span,.nav-item,.nav-label,.nav-group-title),
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) #mainNav>.nav-group>summary{color:#f5f9ff!important}
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) .topbar :is(label,.user-chip small){color:#f5f9ff!important}
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) #desktopToolbar{background:#bfd3e6!important}
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) #mainNav{background:#3063ab!important}
  html[data-desktop-palette=reference] body.zace-desktop:is(.desktop-home-frame,#homePeriodFilter) #mainNav :is(summary,.nav-item):is(:hover,:focus-visible){background:#28538f!important;color:#f5f9ff!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(.sidebar,.topbar,#desktopStatus,.screen-tabs){
   background:var(--desktop-soft)!important;
   border-color:var(--desktop-line)!important;
   color:var(--desktop-ink)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop :is(.sidebar .brand,.sidebar .brand span,#desktopStatus :is(span,small),.topbar :is(label,.user-chip small)){
   color:var(--desktop-muted)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop :is(.sidebar .brand-mark,.topbar .avatar){
   background:var(--desktop-brand)!important;
   color:#fff!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop .sidebar .brand-mark:not(.has-logo){background:linear-gradient(135deg,#3063ab,#3973bd)!important;color:#e8c46a!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#mainNav,#desktopToolbar,.rwc-restore-dock){
   background:var(--desktop-canvas)!important;
   border-color:var(--desktop-line)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop :is(#mainNav,#desktopToolbar) :is(.vx-dropdown,.vn-submenu){
   background:var(--desktop-surface)!important;
   border-color:var(--desktop-line)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop :is(#mainNav,#desktopToolbar) :is(button,summary,a):not(:disabled,[aria-disabled=true]){
   color:var(--desktop-ink)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop :is(#mainNav,#desktopToolbar) :is(button,summary,a):is(:hover,:focus-visible):not(:disabled,[aria-disabled=true]),
  html[data-desktop-palette=reference] body.zace-desktop :is(#mainNav,#desktopToolbar) details[open]>summary{
   background:var(--desktop-selected)!important;
   color:var(--desktop-ink)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop #sidebar #mainNav > .nav-group[open] > summary{
   background:var(--desktop-selected)!important;color:#163b66!important;text-shadow:none!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop #sidebar #mainNav > .nav-group[open] > summary span{color:#163b66!important;text-shadow:none!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody,.main-shell){background:var(--desktop-surface)!important;color:var(--desktop-ink)!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) :is(input,select,textarea,button,.btn,label,th,td){font-family:Tahoma,Arial,sans-serif!important;font-size:12px!important;line-height:1.35!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(.rwc-caption,.ve-caption,.vr-caption,.page-head,.vp-window-title,.document-window-title){background:linear-gradient(115deg,var(--desktop-title-start),var(--desktop-title-end))!important;border-color:var(--desktop-brand-strong)!important;color:#fff!important;box-shadow:none!important;border-radius:0!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(.rwc-caption,.ve-caption,.vr-caption,.page-head) :is(h1,h2,h3,.eyebrow,.muted){color:#fff!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) .rwc-caption :is(.rwc-close,.window-minimize-46,.window-size-control>button,.rwc-pin){
   background:var(--desktop-caption-control)!important;
   border-color:var(--desktop-brand-strong)!important;
   color:#fff!important;
   text-shadow:none!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) .rwc-caption .rwc-close:hover{background:#a84147!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) .rwc-caption :is(.rwc-close,.window-minimize-46,.window-size-control>button,.rwc-pin):focus-visible{outline:2px solid #fff!important}
  html[data-desktop-palette=reference] body.zace-desktop #modalBody>.modal-content>h2:not(.rwc-caption){background:var(--desktop-brand)!important;color:#fff!important;font:700 13px/28px Tahoma!important;margin:0 0 6px!important;padding:0 10px!important;min-height:28px!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) :is(input,select){min-height:24px!important;height:24px!important;border:1px solid var(--desktop-rule)!important;border-radius:2px!important;background:var(--desktop-surface)!important;color:var(--desktop-ink)!important;box-shadow:none!important;padding:1px 4px!important;accent-color:var(--desktop-brand)}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) :is(input,select,textarea):focus{background:var(--desktop-focus)!important;outline:1px solid var(--desktop-brand)!important;outline-offset:0!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) input[type=checkbox]{width:14px!important;height:14px!important;min-height:14px!important;padding:0!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) .btn{min-height:26px!important;height:auto!important;padding:3px 10px!important;border:1px solid var(--desktop-line)!important;border-radius:3px!important;background:var(--desktop-soft)!important;color:var(--desktop-ink)!important;box-shadow:none!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) .btn-primary{background:var(--desktop-brand)!important;color:#fff!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) .btn-danger{background:#fff1f0!important;border-color:#e9c0bc!important;color:#9b2525!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) :is(.ve-totals,.vp-invoice-totals,.report-top-totals,.sales-commission-total){
   background:var(--desktop-soft)!important;
   border-color:var(--desktop-line)!important;
   color:var(--desktop-ink)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop #content :is(.report-top-totals,.sales-commission-total){border-top-color:var(--desktop-brand)!important}
  /* Give document and report grids the same cell treatment while retaining the
     independent print preview and the formatted financial template. */
  html[data-desktop-palette=reference] body.zace-desktop :is(#content,#modalBody) table:not(:where(.pc-overlay table,.pc-preview-overlay table,#printArea table,.ve-print table,.print-sheet table,.financial-template-sheet:not(.financial-screen-sheet))){
   border-collapse:collapse!important;
   border-color:var(--desktop-line)!important;
   font-variant-numeric:tabular-nums;

   & > :is(thead,tbody,tfoot)>tr>:is(th,td){
    padding:2px 4px!important;
    border:1px solid var(--desktop-rule)!important;
    background:var(--reference-row, var(--desktop-surface))!important;
   }
   & > thead>tr>:is(th,td){
    background:var(--desktop-soft)!important;
    color:var(--desktop-ink)!important;
    padding:3px 5px!important;
    border-color:var(--desktop-line)!important;
    font-weight:700!important;
   }
   & > tbody>tr{--reference-row:var(--desktop-surface)}
   & > tbody>tr:nth-child(even){--reference-row:var(--desktop-alternate)}
   & > tbody>tr:is(.month-total,.period-total,.trial-total,.statement-boundary,.rt-summary,.irv-group,.irv-subtotal,.trial-group,[data-report-summary],[data-report-kind=total],[data-template-row=section],[data-template-row=total]),
   & > tfoot>tr{--reference-row:var(--desktop-soft)}
   & > tbody>tr:is(.selected,.desktop-selected,.vp-selected,.rwc-selected,.ve-active,.ve-row-selected,.vr-selected,.vr-trial-selected,.wu-current-row,.rd-selected,.cd-selected,.rll-search-current,[aria-selected=true]){
    --reference-row:var(--desktop-selected);

    /* The report layer uses white text for its former dark selection. Pair
       the pale selection with readable ink and retain the accounting colors. */
    &:where(#content tr) > :is(td,th){
     color:var(--desktop-ink)!important;
     -webkit-text-fill-color:currentColor!important;
    }
    &:where(#content tr) > td.trial-nature.trial-debit{color:#0000bb!important}
    &:where(#content tr) > td.trial-nature.trial-credit{color:#c00000!important}
    &:where(#content tr) > :is(td,th) :is(.negative,.numeric-negative),
    &:where(#content tr) > :is(td,th):is(.negative,.numeric-negative){
     color:#b42318!important;
     -webkit-text-fill-color:currentColor!important;
    }
   }
   &:is(.ve-grid,.ir-grid,.trade-lines)>tbody>tr>td:focus-within{
    background:var(--desktop-focus)!important;
    outline:1px solid var(--desktop-brand)!important;
    outline-offset:-1px!important;
   }
  }
  html[data-desktop-palette=reference] body.zace-desktop #modalBody #voucherForm>.ve-header{
   display:grid!important;
   width:100%!important;
   max-width:100%!important;
   box-sizing:border-box;
   grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))!important;
   grid-auto-rows:auto!important;
   gap:4px 10px!important;
   margin:0 0 4px!important;
   padding:4px 6px!important;
   border:1px solid var(--desktop-line)!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop #modalBody #voucherForm>.ve-header>label{
   display:flex!important;
   flex-wrap:nowrap!important;
   min-width:0!important;
   white-space:normal!important;
   grid-column:auto!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop #modalBody #voucherForm>.ve-header>label>:is(input,select,.master-combo){
   min-width:0!important;
   flex:1 1 0!important;
  }
  html[data-desktop-palette=reference] body.zace-desktop #tradeForm :is(.ir-extra-header,.trade-tax-treatment,.vp-invoice-cash,.vp-invoice-totals){border:1px solid var(--desktop-line)!important;border-radius:2px!important;margin-block:3px!important}
  html[data-desktop-palette=reference] body.zace-desktop #tradeForm :is(.ir-extra-header,.trade-tax-treatment,.vp-invoice-cash){background:var(--desktop-surface)!important}
  html[data-desktop-palette=reference] body.zace-desktop #tradeForm .ir-grid td :is(input,select){height:22px!important;min-height:22px!important;padding:1px 2px!important}
  html[data-desktop-palette=reference] body.zace-desktop :is(#tradeForm,#returnForm,#voucherForm) .actions{gap:5px!important}
  @media(min-width:821px){
   html[data-desktop-palette=reference] body.zace-desktop #modal[data-window-size] :is(#tradeForm,#returnForm){
    scroll-padding-block-end:52px;

    &>.actions{
     position:sticky!important;
     inset:auto!important;
     bottom:0!important;
     z-index:10!important;
     flex-shrink:0!important;
     background:var(--desktop-surface)!important;
     border-top:1px solid var(--desktop-line)!important;
     padding-block:3px!important;
     min-height:34px!important;
    }
   }
  }
  @media(min-width:900px){
   html[data-desktop-palette=reference] body.zace-desktop #modal[data-window-size] #tradeForm.ir-compact-invoice{
    gap:3px!important;
    padding:4px!important;

    &>.form-grid{
     grid-auto-rows:minmax(24px,auto)!important;
     gap:2px 8px!important;
     padding:3px 5px!important;
    }
    &>.form-grid>.form-group{min-height:24px!important}
    &>.form-grid>.form-group>label{font-size:11px!important;line-height:1.2!important}
    &>:is(.invoice-display-options,.ir-extra-header,#addTradeLine){min-height:22px!important;margin:0!important;padding-block:1px!important}
    &>.table-wrap:has(>.ir-grid){min-height:200px!important}
    & .ir-grid thead th{padding:2px 3px!important;font-size:11px!important;line-height:1.15!important}
    & .ir-grid td:has(>[data-unit-pack]:not([hidden])){height:auto!important;min-height:0!important}
    & .ir-grid [data-unit-pack]:not([hidden]){
     display:block!important;
     position:static!important;
     height:auto!important;
     max-width:100%!important;
     padding:0!important;
     margin:1px 0 0!important;
     font-size:10px!important;
     line-height:1.2!important;
     white-space:nowrap!important;
     overflow:hidden!important;
     text-overflow:ellipsis!important;
     pointer-events:auto!important;
     cursor:help;
    }
    /* The guide occupies one line until the user points to it or uses its unit selector. */
    & .ir-grid td:focus-within>[data-unit-pack]:not([hidden]),
    & .ir-grid [data-unit-pack]:not([hidden]):hover{white-space:normal!important;overflow-wrap:anywhere}
    &>.trade-tax-treatment{gap:2px 8px!important;margin:0!important;padding:2px 6px!important}
    &>.trade-tax-treatment :is(small,p){margin-block:0!important;line-height:1.25!important}
    &>.purchase-total-adjust{gap:4px 8px!important;padding:2px 6px!important}
    &>.purchase-total-adjust>label{gap:1px!important}
    &>.ir-payment-footer{padding:2px 6px!important}
    &>.invoice-bottom-46{gap:2px 8px!important;padding:2px 0!important}
    & .vp-invoice-totals{gap:1px!important;padding:2px 5px!important}
    & .vp-invoice-totals>div{min-height:20px!important}
    & .vp-invoice-totals :is(input,output){height:20px!important;min-height:20px!important;line-height:18px!important;padding-block:0!important}
    & .invoice-bottom-46 .pc-draft-note textarea{min-height:28px!important;height:28px!important}
    & .invoice-bottom-46 :is(.ir-account-strip,.vp-invoice-cash){gap:2px!important;padding-block:1px!important;margin-block:0!important}
   }
  }
  .mf-reference-list{padding:6px;border:1px solid #d4d6e5}.mf-reference-list>label{display:flex;gap:8px;align-items:center;margin-bottom:6px}.mf-reference-list input[type=search]{width:min(380px,75vw)}
  .manufacturing-reference-form{display:flex;flex-direction:column;gap:4px;min-height:70vh}
  .manufacturing-reference-header{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 12px;padding:6px;border:1px solid #c7cbd6;background:#f6f6f6}
  .manufacturing-reference-header>.form-group{display:flex!important;align-items:center!important;flex-direction:row!important;gap:6px!important;min-width:0!important}.manufacturing-reference-header label{min-width:88px!important}.manufacturing-reference-header :is(input,select){min-width:0!important;flex:1!important}
  .manufacturing-grid-title{margin:3px 0;padding:3px 8px;background:#eaeafb;color:#292b45;font:700 12px Tahoma}
  .manufacturing-reference-grid{flex:1 0 180px;overflow:auto;border:1px solid #c7cbd6}
  .manufacturing-reference-grid table{width:100%;min-width:950px}.manufacturing-reference-grid thead{position:sticky;top:0;z-index:2}
  .manufacturing-reference-pair{display:flex;flex-direction:column;gap:5px;min-height:0}.manufacturing-reference-section{display:flex;flex-wrap:wrap;gap:3px}.manufacturing-reference-section>.manufacturing-grid-title{flex:1 1 40%;margin:0;height:26px;box-sizing:border-box}.manufacturing-reference-section>.vp-universal-grid-tools{display:flex!important;flex:0 0 auto!important;align-items:center!important;flex-wrap:nowrap!important;height:26px!important;max-height:26px!important;gap:3px!important;margin:0!important;padding:0!important}.manufacturing-reference-section>.vp-universal-grid-tools>*{margin:0!important;min-height:24px!important;height:24px!important;width:auto!important}.manufacturing-reference-section>.manufacturing-reference-grid{flex-basis:100%;height:clamp(150px,calc((100dvh - 420px)/2),350px);min-height:150px}.manufacturing-reference-section>.btn{width:auto!important;flex:0 0 auto!important}.manufacturing-reference-section table:not(.mf-detail-columns) [data-mf-optional]{display:none!important}.manufacturing-reference-section td:has([data-mf-material-code]){width:115px!important;min-width:100px!important}.manufacturing-reference-section td:has([data-mf-material-barcode]){width:140px!important;min-width:110px!important}.manufacturing-reference-section [data-mf-material-code]{width:100%;min-width:0}
  .manufacturing-reference-footer{margin-top:auto;position:sticky;bottom:0;background:#f6f6fb;padding:6px;z-index:3}
  .manufacturing-reference-form>h3:not(.manufacturing-grid-title){display:none}
  .manufacturing-reference-form .mf-material-identity{padding:2px!important;font-size:11px!important}
  .manufacturing-reference-form .mf-material-identity span{display:none}
  @media(min-width:900px){
   html[data-desktop-palette=reference] body.zace-desktop #tradeForm.ir-compact-invoice>.form-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px 10px!important;padding:5px!important}
   html[data-desktop-palette=reference] body.zace-desktop #tradeForm.ir-compact-invoice>.form-grid>.form-group{display:flex!important;align-items:center!important;gap:5px!important;min-height:26px!important;min-width:0!important}
   html[data-desktop-palette=reference] body.zace-desktop #tradeForm.ir-compact-invoice>.form-grid>.form-group>label{flex:0 0 88px!important;width:88px!important;margin:0!important;white-space:normal!important}
   html[data-desktop-palette=reference] body.zace-desktop #tradeForm.ir-compact-invoice>.form-grid>.form-group>:is(input,select){flex:1 1 0!important;min-width:0!important}
  }
  @media(max-width:899px){.manufacturing-reference-header{grid-template-columns:1fr}.manufacturing-reference-header>.form-group{flex-wrap:wrap}}
 }
}
