/* Hamyara 0.15.23 — pre-v1 visual hardening */
:root{--v173-control:50px;--v173-sidebar-width:258px;--v173-rail-width:82px}

/* 1) Sidebar hover preview: same vertical rhythm as pinned expanded sidebar. */
@media(min-width:901px){
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .sidebar{
    padding:12px 12px 16px!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .brand-v154{
    min-height:78px!important;height:78px!important;margin-bottom:8px!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .brand-v154 .brand-link{
    min-height:74px!important;height:74px!important;align-items:center!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .business-switcher-v151{
    min-height:62px!important;height:62px!important;margin-bottom:10px!important;align-items:center!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .nav-list{
    display:flex!important;flex-direction:column!important;gap:4px!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .nav-caption{
    display:flex!important;align-items:center!important;min-height:28px!important;height:28px!important;
    margin:8px 10px 2px!important;padding:0!important;line-height:1.2!important;transform:none!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .nav-item{
    display:flex!important;align-items:center!important;min-height:46px!important;height:46px!important;
    padding:0 11px!important;line-height:1.2!important;transform:none!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .nav-item>span{
    display:flex!important;align-items:center!important;height:46px!important;line-height:1.2!important;
    margin:0!important;padding:0!important;transform:none!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .nav-item .nav-svg,
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .logout-btn .nav-svg{
    align-self:center!important;transform:none!important;
  }
  body .app-shell.sidebar-collapsed-v17.sidebar-hover-expanded-v153 .sidebar-bottom{
    margin-top:12px!important;transform:none!important;
  }
}

/* 2) No arrow glyph at the end of any combo box, selected or empty. */
body .combo-toggle,
body .step-control-chevron-v153,
body .variant-chevron-v162{display:none!important;width:0!important;min-width:0!important;margin:0!important;padding:0!important}
body .combo-control{padding-inline:12px!important}
body .step-control-v153{grid-template-columns:minmax(0,1fr)!important;padding-inline:12px!important}
body .variant-control-v154{grid-template-columns:minmax(0,1fr)!important;padding-inline:12px!important}
body select.select,
body select.input,
body .select{
  appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;
  background-image:none!important;
}

/* 3) Dashboard recent transactions: 15 rows, compact fixed core columns + added payment/code info. */
body .recent-transactions-v173{table-layout:fixed!important;min-width:1120px!important}
body .recent-transactions-v173 :is(th,td){padding-inline:8px!important}
body .recent-transactions-v173 .tx-date-col-v173{width:112px!important;max-width:112px!important}
body .recent-transactions-v173 .tx-time-col-v173{width:64px!important;max-width:64px!important}
body .recent-transactions-v173 .tx-money-col-v173{width:126px!important;max-width:126px!important}
body .recent-transactions-v173 .tx-type-col-v173{width:92px!important;max-width:92px!important}
body .recent-transactions-v173 .tx-paid-col-v173{width:126px!important;max-width:126px!important}
body .recent-transactions-v173 .tx-remain-col-v173{width:126px!important;max-width:126px!important}
body .recent-transactions-v173 .tx-code-col-v173{width:118px!important;max-width:118px!important;font-size:12px!important}
body .recent-transactions-v173 .description-cell{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body .recent-transactions-v173 .money-with-unit-v165{width:100%!important;justify-content:flex-start!important}

/* 4) Business-profile warehouse image action matches the main business-image action. */
body .warehouse-photo-action-v173{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:40px!important;padding:7px 13px!important;border-radius:10px!important;
  background:#2a6f8d!important;color:#fff!important;font-style:normal!important;font-weight:750!important;
  box-shadow:0 6px 14px rgba(22,83,112,.15)!important;cursor:pointer!important;
}

/* 5) Sale/purchase document details: give party more width, shrink date/time to their real content. */
@media(min-width:1181px){
  body.transaction-page form[data-tx-type="sale"] .document-fields,
  body.transaction-page form[data-tx-type="purchase"] .document-fields,
  body.transaction-page form[data-tx-type="return_sale"] .document-fields,
  body.transaction-page form[data-tx-type="return_purchase"] .document-fields{
    grid-template-columns:minmax(360px,2.3fr) minmax(170px,.9fr) 164px 98px!important;
    column-gap:12px!important;row-gap:7px!important;align-items:start!important;
  }
}
body.transaction-page form[data-tx-type="sale"] .focus-date-v168,
body.transaction-page form[data-tx-type="purchase"] .focus-date-v168,
body.transaction-page form[data-tx-type="return_sale"] .focus-date-v168,
body.transaction-page form[data-tx-type="return_purchase"] .focus-date-v168{max-width:164px!important}
body.transaction-page form[data-tx-type="sale"] .focus-time,
body.transaction-page form[data-tx-type="purchase"] .focus-time,
body.transaction-page form[data-tx-type="return_sale"] .focus-time,
body.transaction-page form[data-tx-type="return_purchase"] .focus-time{max-width:98px!important}
body.transaction-page form[data-tx-type="sale"] .focus-time>.input,
body.transaction-page form[data-tx-type="purchase"] .focus-time>.input{padding-inline:8px!important;text-align:center!important}

/* Route graphic: centered precisely between source and destination. */
body .document-route-v173{
  grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)!important;
  gap:10px!important;align-items:center!important;
}
body .document-route-v173>div:first-child{text-align:right!important}
body .document-route-v173>div:last-child{text-align:right!important}
body .route-arrow-v173{
  width:40px!important;height:40px!important;border-radius:50%!important;display:grid!important;place-items:center!important;
  justify-self:center!important;background:linear-gradient(135deg,#2d7899,#235e7a)!important;color:#fff!important;
  box-shadow:0 6px 14px rgba(35,94,122,.20)!important;border:1px solid rgba(255,255,255,.28)!important;
}
body .route-arrow-svg-v173{width:21px!important;height:21px!important;stroke:currentColor!important;stroke-width:2.2!important;transform:rotate(180deg)!important}

/* Purchase invoice upload: lower vertical footprint. */
body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-upload-v159{
  margin-top:9px!important;padding:9px 11px!important;min-height:58px!important;gap:9px!important;
}
body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-copy-v159{gap:1px!important}
body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-picker-v159>span{min-height:38px!important;padding:5px 10px!important}
body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-thumb-v159 img{width:50px!important;height:36px!important}

/* 6) Item price/total: one border only, amounts centered. */
body.transaction-page .price-field .money-input-wrap{
  border:1px solid #d4e1ea!important;border-radius:11px!important;background:#fff!important;overflow:hidden!important;
}
body.transaction-page .price-field .money-input-wrap>.input{
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;
  text-align:center!important;padding-left:48px!important;padding-right:48px!important;
}
body.transaction-page .price-field .money-input-wrap:focus-within{border-color:#7da5ed!important;box-shadow:0 0 0 3px rgba(37,99,235,.08)!important}
body.transaction-page .retail-line-value-v165{justify-content:center!important;position:relative!important}
body.transaction-page .retail-line-value-v165>strong{
  flex:0 1 auto!important;justify-content:center!important;text-align:center!important;margin-inline:auto!important;
}
body.transaction-page .retail-line-value-v165>small{position:absolute!important;left:12px!important;right:auto!important}
body.transaction-page .retail-items-footer-v29{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(270px,320px)!important;
  align-items:end!important;gap:16px!important;
}
body.transaction-page .retail-items-metrics-v29{
  min-height:82px!important;display:flex!important;align-items:center!important;align-content:center!important;
  justify-content:flex-start!important;gap:10px!important;margin:0!important;padding-top:24px!important;
}
body.transaction-page .invoice-discount-field-v29{margin:0!important;align-self:end!important;min-height:82px!important}
@media(max-width:980px){body.transaction-page .retail-items-footer-v29{grid-template-columns:1fr!important}.retail-items-metrics-v29{padding-top:0!important;min-height:auto!important}}

/* 7) Expense form gets its own stable geometry — no inherited sale/purchase squeeze. */
@media(min-width:1001px){
  body.transaction-page form[data-tx-type="expense"] .document-fields{
    display:grid!important;grid-template-columns:minmax(420px,1fr) 178px 108px!important;
    gap:10px 14px!important;align-items:start!important;
  }
  body.transaction-page form[data-tx-type="expense"] .focus-party{grid-column:1!important;min-width:0!important}
  body.transaction-page form[data-tx-type="expense"] .focus-date-v168{grid-column:2!important;max-width:178px!important}
  body.transaction-page form[data-tx-type="expense"] .focus-time{grid-column:3!important;max-width:108px!important}
}
body.transaction-page form[data-tx-type="expense"] .document-fields>.field{min-width:0!important;margin:0!important}
body.transaction-page form[data-tx-type="expense"] .field-label{white-space:nowrap!important;min-height:24px!important;align-items:center!important}
body.transaction-page form[data-tx-type="expense"] .focus-party :is(.step-control-v153,.combo-control),
body.transaction-page form[data-tx-type="expense"] .focus-date-v168 .date-composite-v168,
body.transaction-page form[data-tx-type="expense"] .focus-time>.input{
  height:var(--v173-control)!important;min-height:var(--v173-control)!important;max-height:var(--v173-control)!important;
}
body.transaction-page form[data-tx-type="expense"] .focus-time>.input{text-align:center!important;padding-inline:8px!important}
body.transaction-page form[data-tx-type="expense"] .focus-notes{grid-column:1/-1!important;margin-top:0!important}
body.transaction-page form[data-tx-type="expense"] #document-info .focus-card-body{padding:14px 16px!important}
body.transaction-page form[data-tx-type="expense"] #document-info .focus-card-head{min-height:58px!important}
body.transaction-page form[data-tx-type="expense"] #document-info .focus-card-head p{margin:0!important}
body.transaction-page form[data-tx-type="expense"] .document-fields .field-hint{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

/* Expense payment controls are exactly equal-height. */
@media(min-width:901px){
  body.transaction-page form[data-tx-type="expense"] .retail-payment{
    display:grid!important;grid-template-columns:minmax(300px,1.65fr) 190px 190px 36px!important;gap:12px!important;align-items:start!important;
  }
}
body.transaction-page form[data-tx-type="expense"] .retail-payment>.mini-field{
  display:grid!important;grid-template-rows:24px 52px 28px!important;min-height:104px!important;align-content:start!important;
}
body.transaction-page form[data-tx-type="expense"] .payment-account :is(.step-picker-host-v153,.step-control-v153,.combo-control,.select),
body.transaction-page form[data-tx-type="expense"] .payment-amount .money-input-wrap,
body.transaction-page form[data-tx-type="expense"] .payment-method>.select{
  height:52px!important;min-height:52px!important;max-height:52px!important;box-sizing:border-box!important;
}
body.transaction-page form[data-tx-type="expense"] .retail-payment>.row-action{margin-top:31px!important;align-self:start!important}

@media(max-width:1000px){
  body.transaction-page form[data-tx-type="expense"] .document-fields{grid-template-columns:minmax(0,1fr) minmax(150px,.45fr)!important}
  body.transaction-page form[data-tx-type="expense"] .focus-party{grid-column:1/-1!important}
  body.transaction-page form[data-tx-type="expense"] .focus-date-v168,body.transaction-page form[data-tx-type="expense"] .focus-time{grid-column:auto!important;max-width:none!important}
}
@media(max-width:680px){
  body.transaction-page form[data-tx-type="expense"] .document-fields{grid-template-columns:1fr!important}
  body.transaction-page form[data-tx-type="expense"] .focus-party,body.transaction-page form[data-tx-type="expense"] .focus-date-v168,body.transaction-page form[data-tx-type="expense"] .focus-time{grid-column:1!important}
}

/* Final direct/native select height normalization; enhanced and non-enhanced states must match. */
body.transaction-page form[data-tx-type="expense"] .focus-party>.select,
body.transaction-page form[data-tx-type="expense"] .focus-party .enhanced-native,
body.transaction-page form[data-tx-type="expense"] .focus-party .step-control-v153,
body.transaction-page form[data-tx-type="expense"] .focus-party .combo-control{
  height:var(--v173-control)!important;min-height:var(--v173-control)!important;max-height:var(--v173-control)!important;
}
body.transaction-page form[data-tx-type="sale"] :is(.focus-party,.focus-warehouse)>.select,
body.transaction-page form[data-tx-type="purchase"] :is(.focus-party,.focus-warehouse)>.select,
body.transaction-page form[data-tx-type="return_sale"] :is(.focus-party,.focus-warehouse)>.select,
body.transaction-page form[data-tx-type="return_purchase"] :is(.focus-party,.focus-warehouse)>.select{
  height:52px!important;min-height:52px!important;max-height:52px!important;
}

/* Responsive correction discovered in QA: the expense three-column row only fits comfortably above 1180px. */
@media(max-width:1180px){
  body.transaction-page form[data-tx-type="expense"] .document-fields{
    grid-template-columns:minmax(0,1fr) minmax(150px,.45fr)!important;
  }
  body.transaction-page form[data-tx-type="expense"] .focus-party{grid-column:1/-1!important;max-width:none!important}
  body.transaction-page form[data-tx-type="expense"] .focus-date-v168,
  body.transaction-page form[data-tx-type="expense"] .focus-time{grid-column:auto!important;max-width:none!important}
}
body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-preview-v159.is-empty{display:none!important}
@media(max-width:900px){
  body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-upload-v159{grid-template-columns:minmax(0,1fr) auto!important}
  body.transaction-page form[data-tx-type="purchase"] .purchase-invoice-preview-v159:not(.is-empty){grid-column:1/-1!important}
}
@media(max-width:900px){html,body,.app-shell{overflow-x:hidden!important;max-width:100%!important}}
@media(max-width:520px){
  body .topbar,body.transaction-page .topbar{padding-inline:8px!important;gap:6px!important}
  body .topbar-left{min-width:0!important;gap:5px!important}
  body .date-chip-v168{max-width:145px!important;min-width:0!important;padding-inline:6px!important;gap:5px!important}
  body .date-copy-v168 b>span,body .date-copy-v168 b>em{font-size:11.5px!important}
}

/* FINAL 0.15.23: no dropdown arrow anywhere, including native selects and old pseudo-arrows. */
body.readable-ui select.select,
body.readable-ui select.filter-select,
body.readable-ui select:not([multiple]){
  appearance:none!important;
  -webkit-appearance:none!important;
  -moz-appearance:none!important;
  background-image:none!important;
  padding-left:12px!important;
}
body .step-control-v153::after{content:none!important;display:none!important}
body .variant-control-v154 i::before{content:none!important;display:none!important}
body .combo-toggle,
body .step-control-chevron-v153,
body .variant-chevron-v162{display:none!important}
