/* Review candidate: presentation only. No field order, visibility or handlers changed. */
@layer formalReview {
@media screen {
:root{--formal-ink:var(--win-textColor,#17283f);--formal-muted:#64748b;--formal-line:var(--win-borderColor,#dce3eb);--formal-accent:var(--win-accentColor,#235dc2);--formal-row:var(--win-rowColor,#f7f9fc);--formal-surface:var(--win-surfaceColor,#fff)}
body.zace-desktop{font-family:'Segoe UI',Tahoma,Arial,sans-serif!important;background:var(--win-pageColor,#f3f5f8)!important;color:var(--formal-ink)!important}
body.zace-desktop .main-shell,body.zace-desktop .topbar{background:var(--win-pageColor,#f3f5f8)!important}
body.zace-desktop .sidebar{background:var(--win-sidebarColor,#152c47)!important;border:0!important;box-shadow:none!important}
body.zace-desktop #mainNav>details>summary{font:600 14px/1.6 'Segoe UI',Tahoma,Arial!important;border-radius:6px!important;color:#c5d2e6!important}
body.zace-desktop #mainNav>.nav-group[open]>summary{background:#ffffff12!important;box-shadow:inset -3px 0 #8db6fa!important;color:#fff!important}
body.zace-desktop #mainNav .vx-dropdown{background:#1c3657!important}
body.zace-desktop #desktopToolbar{background:white!important;border:1px solid var(--formal-line)!important;border-radius:8px!important;box-shadow:none!important}
body.zace-desktop #desktopStatus{background:#eef2f7!important;border-top:1px solid var(--formal-line)!important;color:#637690!important}
body.zace-desktop :is(button,input,select,textarea){font-family:'Segoe UI',Tahoma,Arial,sans-serif!important}
body.zace-desktop :is(.btn,#content button,#modal button){background:var(--win-buttonColor,#fff)!important;color:var(--win-buttonText,#344b67)!important;border:1px solid var(--formal-line)!important;border-radius:5px!important;box-shadow:none!important;text-shadow:none!important;font-size:13px!important;font-weight:600!important}
body.zace-desktop :is(.btn,#content button,#modal button):hover:not(:disabled){background:#f0f4fa!important;filter:none!important}
body.zace-desktop :is(button.btn-primary,button[type=submit],[data-command=save]){background:var(--formal-accent)!important;border-color:var(--formal-accent)!important;color:#fff!important}
body.zace-desktop button:disabled{opacity:.5!important;cursor:default!important}
body.zace-desktop :is(button.btn-danger,[data-command=delete]){color:#a13c43!important;background:#fff!important;border-color:#e5d0d3!important}
body.zace-desktop :is(input,select,textarea){background:var(--win-inputColor,#fff)!important;border-color:#cfd9e5!important;border-radius:5px!important;color:var(--formal-ink)!important;box-shadow:none!important}
body.zace-desktop :is(input,select,textarea):focus-visible,body.zace-desktop button:focus-visible{outline:2px solid #8bafe9!important;outline-offset:1px!important}
body.zace-desktop input[readonly]{background:#f6f8fb!important;color:#526780!important}
body.zace-desktop .master-combo{background:var(--win-inputColor,#fff)!important;border:1px solid #cfd9e5!important;border-radius:5px!important;box-shadow:none!important}
body.zace-desktop .master-combo>.master-search{border:0!important;background:transparent!important}
body.zace-desktop :is(.master-combo button,.ve-tree-button,.vp-pick-button){border:0!important;border-right:1px solid var(--formal-line)!important;border-radius:0!important;color:#647b98!important;background:#f9fbfe!important;box-shadow:none!important}
/* Native close/maximize/minimize keep their original locations and handlers. */
body.zace-desktop :is(#modal,#content) .rwc-caption{background:var(--win-captionColor,#152c47)!important;color:var(--win-captionText,#fff)!important;border:0!important;border-bottom:1px solid #102239!important;margin-top:0!important;min-height:48px!important;line-height:24px!important;font:600 17px/24px 'Segoe UI',Tahoma,Arial!important;padding:12px 128px 12px 48px!important;box-sizing:border-box!important;text-shadow:none!important}
/* Nested headings use the caption's company color, rather than a page-heading color. */
body.zace-desktop :is(#modal,#content) .rwc-caption :is(h1,h2,h3){color:var(--win-captionText,#fff)!important}
body.zace-desktop :is(#modal,#content) .rwc-caption :is(.rwc-close,.window-minimize-46,.window-size-control,.window-size-control>button,.rwc-pin){box-sizing:border-box!important;width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;margin:0!important;line-height:30px!important;font-size:16px!important;border-radius:5px!important;border:0!important;background:#ffffff12!important;color:#e9f0fa!important;box-shadow:none!important}
body.zace-desktop :is(#modal,#content) .rwc-caption>.rwc-close{inset:8px 8px auto auto!important}
body.zace-desktop :is(#modal,#content) .rwc-caption>.window-size-control{inset:8px 46px auto auto!important}
body.zace-desktop :is(#modal,#content) .rwc-caption>.window-minimize-46{inset:8px 84px auto auto!important}
body.zace-desktop :is(#modal,#content) .rwc-caption>.rwc-pin{inset:8px auto auto 8px!important}
body.zace-desktop :is(#modal,#content) .rwc-caption>.rwc-close:hover{background:#a84147!important;color:white!important}
body.zace-desktop #modal{border:1px solid #cbd5e2!important;border-radius:9px!important;background:#f3f5f8!important;box-shadow:0 18px 50px #142b4829!important;padding:0!important}
body.zace-desktop #modalBody{padding:0!important;background:#f3f5f8!important}
body.zace-desktop #modalBody>.modal-content,body.zace-desktop #modalBody>.ve-window{padding:0!important;background:#f3f5f8!important}
body.zace-desktop #modalBody :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm){padding:12px!important;gap:9px!important;background:#f3f5f8!important;box-sizing:border-box!important}
/* Keep all existing grid-column/grid-row/order declarations intact. */
body.zace-desktop #tradeForm>.form-grid,body.zace-desktop .ve-header,body.zace-desktop #tradeJournalForm>.form-grid,body.zace-desktop #vxStockForm>.vx-form-grid,body.zace-desktop #transferGridForm>.form-grid{background:var(--formal-surface)!important;border:1px solid var(--formal-line)!important;border-radius:7px!important;padding:12px!important;gap:9px 12px!important;box-sizing:border-box!important}
body.zace-desktop #tradeForm .form-group>label,body.zace-desktop .ve-header label,body.zace-desktop .vx-form-grid label{color:#526780!important;font-family:'Segoe UI',Tahoma,Arial!important;font-size:12px!important;font-weight:600!important;line-height:20px!important}
body.zace-desktop #tradeForm>.form-grid :is(input,select,.master-combo),body.zace-desktop .ve-header :is(input,select,.master-combo){height:32px!important;min-height:32px!important;font-size:13px!important;line-height:24px!important}
body.zace-desktop :is(.ir-extra-header,.trade-tax-treatment){background:#fff!important;border:1px solid var(--formal-line)!important;border-radius:6px!important;padding:6px 10px!important;margin:0!important;font-size:12px!important}
body.zace-desktop :is(.ir-extra-header,.trade-tax-treatment)>summary{color:#526780!important;font:600 12px/20px 'Segoe UI',Tahoma!important;cursor:pointer}
/* Row shading stays alternating; cell editors keep their bindings and tab order. */
body.zace-desktop #modal :is(.table-wrap,.ve-grid-wrap){border:1px solid var(--formal-line)!important;border-radius:6px!important;background:var(--formal-surface)!important;min-height:160px!important}
body.zace-desktop #modal table{font-family:'Segoe UI',Tahoma,Arial!important;border-collapse:collapse!important}
body.zace-desktop #modal table th{background:var(--win-headingColor,#f0f4f9)!important;color:var(--win-headingText,#526780)!important;border:0!important;border-bottom:1px solid var(--formal-line)!important;font:600 12px/19px 'Segoe UI',Tahoma,Arial!important;padding:8px 9px!important;height:38px!important;vertical-align:middle!important;text-shadow:none!important}
body.zace-desktop #modal table td{background:#fff!important;color:var(--formal-ink)!important;border:0!important;border-bottom:1px solid #edf1f6!important;font:13px/22px 'Segoe UI',Tahoma,Arial!important;padding:5px 7px!important;height:36px!important;vertical-align:middle!important}
body.zace-desktop #modal table tbody tr:nth-child(even)>td{background:var(--formal-row)!important}
body.zace-desktop #modal table tbody tr:hover>td{background:#eff4fb!important}
body.zace-desktop #modal table td:focus-within{background:#edf3fd!important;outline:2px solid #6492d9!important;outline-offset:-2px!important;box-shadow:none!important}
body.zace-desktop #modal table td :is(input,select,.master-search,.master-combo,output){background:transparent!important;border:0!important;border-radius:3px!important;box-shadow:none!important;min-height:25px!important;height:25px!important;font:13px/22px 'Segoe UI',Tahoma,Arial!important;color:inherit!important;padding:1px 3px!important;font-variant-numeric:tabular-nums!important}
body.zace-desktop #modal table td :is(input[type=number],.ve-money,[data-total]){font-family:'Segoe UI',Arial!important;direction:ltr!important;font-variant-numeric:tabular-nums!important}
body.zace-desktop #modal table th .ve-resize{width:6px!important;background:transparent!important}
/* Footer groups retain their positions and all existing actions. */
body.zace-desktop :is(.invoice-bottom-46,.ve-bottom,.ir-account-strip){background:transparent!important;gap:10px!important;padding:4px 0!important}
body.zace-desktop :is(.vp-invoice-cash,.ve-cash-box,.vp-invoice-totals,.ve-totals){background:#fff!important;border:1px solid var(--formal-line)!important;border-radius:6px!important;padding:9px 10px!important;box-shadow:none!important}
body.zace-desktop :is(.vp-invoice-cash,.ve-cash-box) legend{color:#526780!important;font:600 12px/19px 'Segoe UI',Tahoma!important;padding:0 5px!important}
body.zace-desktop :is(.vp-invoice-totals,.ve-totals){font:13px/25px 'Segoe UI',Tahoma!important;color:#526780!important}
body.zace-desktop :is(.vp-invoice-totals,.ve-totals) input{background:#f2f6fc!important;border:0!important;color:#235dc2!important;font-variant-numeric:tabular-nums!important;font-weight:600!important;border-radius:4px!important;height:28px!important}
body.zace-desktop :is(.pc-draft-note,.ir-payment-footer){border:1px solid var(--formal-line)!important;background:white!important;border-radius:6px!important;padding:7px 10px!important;color:#637690!important;font-size:12px!important}
body.zace-desktop .pc-draft-note textarea{background:white!important;border:0!important;font-size:12px!important;min-height:32px!important}
body.zace-desktop .ir-payment-footer .ir-customer-remaining{color:#963d3d!important;font-weight:600!important}
body.zace-desktop :is(#tradeForm>.actions,.ve-commandbar,.vx-dialog-footer){background:#f3f5f8!important;border-top:1px solid var(--formal-line)!important;padding:10px 0 3px!important;gap:7px!important;flex-wrap:wrap!important;box-sizing:border-box!important}
body.zace-desktop :is(#tradeForm>.actions,.ve-commandbar,.vx-dialog-footer)>button{min-height:32px!important;padding:5px 10px!important;font-size:12px!important}
body.zace-desktop #vxFullItem :is(input,select){min-height:32px!important;font-size:14px!important}
body.zace-desktop #vxFullItem .vx-form-grid{padding:16px!important;gap:14px!important}
body.zace-desktop #vxFullItem .vx-tabs{background:#f3f5f8!important;gap:4px!important;padding:8px!important}
body.zace-desktop #vxFullItem .vx-tabs button{background:white!important;border-color:var(--formal-line)!important;font-size:13px!important;padding:8px!important}
body.zace-desktop #vxFullItem .vx-tabs button.active{background:#e8effa!important;color:var(--formal-accent)!important;border-bottom:2px solid var(--formal-accent)!important}
body.zace-desktop :is(.vp-main,.vp-sidebar,.card,.kpi-card){background:#fff!important;border:1px solid var(--formal-line)!important;border-radius:8px!important;box-shadow:none!important}
body.zace-desktop #content table thead th{background:var(--win-headingColor,#f0f4f9)!important;color:var(--win-headingText,#526780)!important}
body.zace-desktop #content table tbody tr:nth-child(even)>td{background:var(--formal-row)!important}
}
}

/* Presentation-only addition: compact rows, without changing widths, order or navigation. */
@layer formalReview {
@media screen {
body.zace-desktop :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) {
  --document-grid-line: color-mix(in srgb,var(--win-borderColor,#dce3eb) 72%,#7188a4);
  --document-grid-stripe: color-mix(in srgb,var(--win-rowColor,#f7f9fc) 94%,var(--win-accentColor,#235dc2));
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table th {
  background:color-mix(in srgb,var(--win-headingColor,#f0f4f9) 90%,#7188a4)!important;
  color:color-mix(in srgb,var(--win-headingText,#526780) 72%,#17283f)!important;
  font-weight:700!important;
  height:32px!important;
  padding:5px 7px!important;
  box-shadow:inset -1px 0 var(--document-grid-line),inset 0 -1px var(--document-grid-line)!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table tbody tr>td {
  background:var(--formal-surface,#fff)!important;
  box-shadow:inset -1px 0 var(--document-grid-line),inset 0 -1px var(--document-grid-line)!important;
  border-bottom-color:transparent!important;
  height:28px!important;
  padding:2px 7px!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table tbody tr:nth-child(even)>td {
  background:var(--document-grid-stripe,#eaf0f8)!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table tbody tr:hover>td {
  background:color-mix(in srgb,var(--formal-surface,#fff) 90%,var(--formal-accent,#235dc2))!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table tbody tr>td:focus-within {
  background:color-mix(in srgb,var(--formal-surface,#fff) 86%,var(--formal-accent,#235dc2))!important;
  outline:2px solid var(--formal-accent,#235dc2)!important;
  outline-offset:-2px!important;
}
body.zace-desktop #modal:has(:is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm)) .rwc-caption {
  background:color-mix(in srgb,var(--win-captionColor,#152c47) 90%,#000)!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) :is(.form-group>label,.ve-header label,.vx-form-grid label,summary,legend) {
  color:color-mix(in srgb,var(--win-textColor,#17283f) 80%,#526780)!important;
  font-weight:600!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table td :is(input,select,.master-search,.master-combo,output) {
  height:23px!important;
  min-height:23px!important;
  padding-block:0!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) :is(input[type=number],input[inputmode=decimal],input[inputmode=numeric],.ve-money,[data-item-code],[data-key=code],[data-total],.ve-position,[name=number],[name=documentNumber],#veCashCode,[data-ir=implicit],[data-ir=weightPrice],.vp-invoice-totals input,.ve-totals input) {
  text-align:center!important;
  font-variant-numeric:tabular-nums!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table td :is(input[type=number],input[inputmode=decimal],.ve-money,[data-item-code],[data-key=code],[data-ir=implicit],[data-ir=weightPrice]) {
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table td :is([data-ir=implicit],[data-ir=weightPrice]) {display:block!important}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) :is(.vp-invoice-totals output,.vp-invoice-cash input[readonly],.vp-invoice-cash output,#veDiscountCode) {
  text-align:center!important;
  font-variant-numeric:tabular-nums!important;
}
body.zace-desktop #modal :is(#tradeForm,#voucherForm,#tradeJournalForm,#vxStockForm,#transferGridForm) table td:has(>input:is([type=number],[inputmode=decimal],[data-key=code],[data-item-code])) {
  text-align:center!important;
}
}
}

/* Text commands are not window icons: preserve readable caption actions. */
body.zace-desktop.vn-interface.ref-single-preview.ux-readable #content#content#content#content#content .rwc-caption>.actions {display:flex!important;flex:0 1 auto!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;max-width:100%!important;}
body.zace-desktop.vn-interface.ref-single-preview.ux-readable #content#content#content#content#content .rwc-caption>.actions>.btn {width:auto!important;min-width:88px!important;height:32px!important;min-height:32px!important;padding:4px 12px!important;white-space:nowrap!important;line-height:22px!important;font-size:13px!important;color:#172b40!important;background:#f5f8fc!important;border:1px solid #cad6e4!important;border-radius:5px!important;flex:0 0 auto!important;}

@layer formalReview {
@media screen {
/* Voucher labels must participate in the responsive grid. The legacy absolute
   offsets otherwise combine with zero-width flex controls to collapse inputs. */
body.zace-desktop #modal #voucherForm {
  min-width:0!important;
  overflow:auto!important;
}
body.zace-desktop #modal #voucherForm>.ve-header {
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr))!important;
  width:min(1040px,100%)!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  align-self:flex-start!important;
  flex:0 0 auto!important;
}
body.zace-desktop #modal #voucherForm>.ve-header>label {
  position:static!important;
  inset:auto!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  min-height:32px!important;
  grid-column:auto!important;
  grid-row:auto!important;
}
body.zace-desktop #modal #voucherForm .vn-date-control {
  height:32px!important;
  min-height:32px!important;
  align-items:center!important;
}
body.zace-desktop #modal #voucherForm .ve-header .master-combo>.master-search {
  height:100%!important;
  min-height:0!important;
  box-sizing:border-box!important;
  padding-inline-end:24px!important;
}
body.zace-desktop #modal #voucherForm .ve-header .master-combo>.master-arrow {
  height:100%!important;
  min-height:0!important;
}
/* Keep saved column sizes and frozen offsets owned by the existing grid code. */
body.zace-desktop #modal #voucherForm>.ve-grid-wrap {
  min-width:0!important;
  max-width:100%!important;
  overflow:auto!important;
  flex:1 0 160px!important;
}
/* Account rows and totals grow with their contents and wrap without clipping. */
body.zace-desktop #modal #voucherForm>.ve-bottom {
  height:auto!important;
  min-height:0!important;
  min-width:0!important;
  max-width:100%!important;
  flex-wrap:wrap!important;
  align-items:flex-start!important;
}
body.zace-desktop #modal #voucherForm .ve-cash-box {
  flex:1 1 420px!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
}
body.zace-desktop #modal #voucherForm .ve-cash-box>div {
  height:auto!important;
  min-height:28px!important;
  flex-wrap:wrap!important;
}
body.zace-desktop #modal #voucherForm .ve-cash-box span {
  flex:1 1 100px!important;
  min-width:0!important;
}
body.zace-desktop #modal #voucherForm .ve-tree-button {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  flex:0 0 28px!important;
  width:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  height:28px!important;
  min-height:28px!important;
  padding:3px!important;
}
body.zace-desktop #modal #voucherForm .ve-tree-button>svg {
  flex:0 0 18px!important;
  width:18px!important;
  min-width:18px!important;
  height:18px!important;
  padding:0!important;
}
body.zace-desktop #modal #voucherForm .ve-totals {
  flex:0 1 240px!important;
  width:240px!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
}
body.zace-desktop #modal .ve-journal #voucherForm .ve-totals {
  flex:1 1 auto!important;
  width:auto!important;
  flex-wrap:wrap!important;
}
body.zace-desktop #modal #voucherForm .ve-default-cash {
  position:static!important;
  float:none!important;
  height:auto!important;
  margin-top:4px!important;
}
}
}
