/* v0.71.0 — compact records, integrated projects and spreadsheet controls. */
.legacy-project-management{display:none!important}
#projectPage>.report-panel:first-child .report-heading{align-items:center}
.project-record-setup{display:grid;gap:.7rem}
.project-record-setup>.project-code-row{margin:0;border:1px solid var(--line);border-radius:12px;background:var(--panel-blue)}
.project-record-setup>.project-code-row>summary{display:none}
.project-record-setup>.project-code-row>.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}
.project-record-setup>.project-code-row>.row-actions{margin-top:.65rem}
.project-sales-row{grid-template-columns:minmax(0,1fr) auto;align-items:center}
.project-sales-row span{display:grid;gap:.12rem}
.project-sales-row small{color:var(--muted)}
.historical-sage-section{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--line)}
.historical-sage-invoice{border-left:4px solid #2b77a8;background:#f3f8fb}

/* Searchable selects must never expand into an unbounded raw option column. */
.project-search-control{min-width:0;max-width:100%}
.project-search-input{width:100%;min-width:0}
.project-listbox{max-height:min(240px,40vh)!important;overflow-x:hidden!important;overflow-y:auto!important;contain:layout paint}
.project-listbox button{white-space:normal;overflow-wrap:anywhere}
.native-project-select{display:none!important}

/* Message dialogs show their complete content without a nested scrollbar. */
#appMessageDialog{height:auto!important;max-height:none!important;overflow:visible!important}
#appMessageDialog>form{height:auto!important;max-height:none!important;overflow:visible!important;padding:1.15rem!important}
#appMessageDialog .message-dialog-copy{min-width:0;overflow-wrap:anywhere}

/* Supplier upload: remove vertical padding that was forcing an internal scroll. */
#uploadDialog .upload-record-section{padding:.45rem .55rem!important}
#uploadDialog .upload-record-section>h3{margin:0 0 .3rem!important}
#uploadDialog .upload-primary-section{gap:.45rem!important}
#uploadDialog .upload-primary-section>.upload-record-section+.upload-record-section{padding-top:.45rem!important}
#uploadDialog .upload-section-fields{gap:.3rem .45rem!important}
#uploadDialog .optional-split-panel,
#uploadDialog .confidential-record-control,
#uploadDialog #pdfSplitPanel{min-height:0!important;margin:.18rem 0!important;padding:.38rem .48rem!important;border-radius:9px!important}
#uploadDialog .optional-split-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.4rem .6rem}
#uploadDialog .optional-split-panel>p,
#uploadDialog .confidential-record-control p,
#uploadDialog #pdfSplitPanel p{margin:.08rem 0!important;line-height:1.25}
#uploadDialog .confidential-record-control{display:flex!important;align-items:center!important;gap:.45rem!important}
#uploadDialog .confidential-record-control label{margin:0!important}
#uploadDialog #pdfSplitPanel .allocation-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.5rem}
#uploadDialog #pdfSplitWorkspace>.pdf-split-guidance{padding:.28rem .4rem!important}
#uploadDialog .upload-files-section textarea{min-height:38px!important;max-height:52px!important}
#uploadDialog .dialog-actions{position:static!important;margin:.35rem 0 0!important;padding:.45rem 0 0!important}

@media(min-width:1181px){
  #uploadDialog{height:auto!important;max-height:none!important;overflow:visible!important}
  #uploadDialog>form.upload-landscape-form{height:auto!important;max-height:none!important;overflow:visible!important;padding:.55rem .7rem!important}
  .upload-landscape-grid{margin:.35rem 0!important;grid-template-rows:auto auto!important}
  .upload-preview-section,#uploadDocumentPreview{min-height:600px!important}
}
@media(min-width:1181px) and (max-height:850px){
  #uploadDialog{zoom:.88!important;width:min(1580px,calc(100vw/.88 - 18px))!important}
  .upload-preview-section,#uploadDocumentPreview{min-height:535px!important}
}

/* Open invoice records use content-sized panels; only the browser viewport scrolls. */
@media(min-width:1101px){
  #detailDialog:has(> .invoice-record-shell){height:auto!important;max-height:none!important;overflow:visible!important}
  #detailDialog>#detailContent.invoice-record-shell{height:auto!important;max-height:none!important;overflow:visible!important;grid-template-rows:auto auto auto!important}
  .invoice-record-grid{grid-template-rows:auto auto auto!important;align-items:start!important;align-content:start!important;overflow:visible!important}
  .invoice-record-section{align-self:start!important;height:auto!important;min-height:0!important}
  .invoice-record-preview{align-self:stretch!important;height:100%!important;min-height:490px!important}
  .invoice-document-frame{height:100%!important;min-height:430px!important}
  .invoice-record-related,.invoice-record-workflow,.invoice-record-audit,.invoice-record-coding{align-self:start!important}
}
@media(min-width:1101px) and (max-height:850px){
  #detailDialog:has(> .invoice-record-shell){zoom:.82!important;width:min(1660px,calc(100vw/.82 - 16px))!important}
  .invoice-record-preview{min-height:400px!important}
  .invoice-document-frame{min-height:350px!important}
}

/* Stage workbook: compact wrapping cells with saved row and column sizing. */
.stage-sheet-canvas{max-height:none!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-gutter:auto!important}
.yeorton-sheet{width:max-content!important;min-width:100%!important;table-layout:fixed!important;font-size:11px!important}
.yeorton-sheet th,.yeorton-sheet td{position:relative;height:auto!important;min-height:28px;vertical-align:top;white-space:normal;overflow-wrap:anywhere}
.yeorton-sheet th{padding:5px 8px!important;line-height:1.2}
.yeorton-sheet input,.yeorton-sheet textarea{box-sizing:border-box;display:block;width:100%!important;height:100%!important;min-height:28px!important;margin:0!important;padding:5px 6px!important;border:0!important;border-radius:0!important;background:transparent!important;font:inherit!important;line-height:1.28;white-space:normal;overflow-wrap:anywhere}
.yeorton-sheet textarea{resize:none;overflow:hidden}
.yeorton-sheet .stage-money-field{text-align:right;font-variant-numeric:tabular-nums}
.stage-column-resizer{position:absolute!important;z-index:3;top:0;right:-4px;width:8px!important;min-width:8px!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;cursor:col-resize!important;touch-action:none}
.stage-column-resizer:hover,.stage-column-resizer:focus{background:rgba(255,255,255,.55)!important;outline:1px solid rgba(0,0,0,.35)}
.stage-row-resizer{position:absolute!important;z-index:3;right:1px;bottom:-4px;width:18px!important;min-width:18px!important;height:8px!important;min-height:8px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:linear-gradient(135deg,transparent 45%,#667 46%,#667 55%,transparent 56%)!important;cursor:row-resize!important;touch-action:none}
.sheet-formula .stage-money-field{font-weight:800}

@media(max-width:900px){
  .project-record-setup>.project-code-row>.form-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:680px){
  .project-record-setup>.project-code-row>.form-grid{grid-template-columns:1fr}
  .project-sales-row{grid-template-columns:1fr}
}
