.sq-panel{margin:0 0 14px;padding:14px;border:1px solid #b9c8ae;background:#f6faef;color:#253e2a;min-width:0;overflow-wrap:anywhere}.sq-panel h3{margin:0 0 10px}.sq-panel label,.sq-dialog label{display:block;margin:10px 0}.sq-panel input:not([type=checkbox]),.sq-panel textarea,.sq-panel select,.sq-dialog input:not([type=checkbox]),.sq-dialog textarea,.sq-dialog select{width:100%;box-sizing:border-box;max-width:100%;font:inherit;min-height:44px}.sq-panel textarea,.sq-dialog textarea{min-height:72px}.sq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.sq-panel button,.sq-panel summary,.sq-dialog button{min-height:44px;white-space:normal}.sq-panel summary{cursor:pointer;padding:10px 0}.sq-drop{border:2px dashed #9eaf91;padding:12px;background:#fffef8}.sq-drag{background:#dfefd9}.sq-check{display:flex!important;align-items:center;gap:10px;min-height:44px}.sq-check input{width:22px;height:22px;flex-shrink:0}.sq-actions,.sq-history{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sq-actions>label{flex:1;min-width:180px}.sq-pre{white-space:pre-wrap}.sq-line{display:block;margin-top:5px}.sq-line-button{white-space:nowrap!important;overflow-wrap:normal;min-width:44px;padding-inline:5px;font-size:12px}.sq-line-button.is-linked{background:#d7ead2;border-color:#66895a;color:#21472a}.sq-dialog{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #8ba17c;background:#fffdf4;color:#253e2a;border-radius:5px;box-sizing:border-box}.sq-dialog::backdrop{background:#0007}.sq-dialog>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:#eae9d6;z-index:1}.sq-dialog h2{margin:0;font-size:1.2rem}.sq-dialog-body{padding:14px;overflow-wrap:anywhere}.sq-dialog button{max-width:100%}.sq-message,#sqStatus,#sqInvoiceStatus{white-space:pre-wrap}.sq-history{margin-top:10px}@media(max-width:700px){.sq-grid{grid-template-columns:minmax(0,1fr)}.sq-panel{padding:12px}.sq-panel input,.sq-panel select,.sq-panel textarea,.sq-dialog input,.sq-dialog select,.sq-dialog textarea{font-size:16px!important}.sq-actions{align-items:stretch}.sq-actions>*{max-width:100%}.sq-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.sq-line-button{min-height:44px}}
.sq-rate-rule{border-top:1px solid #c5cfba;margin-top:8px;padding-top:6px;min-width:180px}.sq-rate-rule label{display:block;font-size:12px;white-space:normal}.sq-rate-rule input,.sq-rate-rule select{width:100%;box-sizing:border-box;min-height:36px}.sq-rate-rule small{display:block;white-space:normal;color:#3d593e}.sq-rate-rule [hidden]{display:none!important}@media(max-width:700px){.sq-rate-rule input,.sq-rate-rule select{font-size:16px;min-height:44px}}

.sq-lifecycle{padding:12px;background:#fffef8;border:1px solid #c5cfba;margin:12px 0}.sq-panel [hidden]{display:none!important}.sq-usage{border-top:1px solid #b9c8ae;margin-top:12px;padding-top:8px}.sq-usage-line{padding:10px;background:#fffef8;margin:8px 0}.sq-usage-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}.sq-usage-numbers span{display:grid;grid-template-rows:2em auto;font-size:12px}.sq-usage-numbers b{font-size:16px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.sq-review{color:#8a391d;font-weight:600}

.sq-lifecycle input:disabled,.sq-lifecycle select:disabled{opacity:1;color:#334b3a;-webkit-text-fill-color:#334b3a;background:#f4f5ef}

.sq-scope-summary{margin:12px 0;padding:12px 14px;border:1px solid #b9c8ae;border-left:4px solid #34765c;border-radius:8px;background:#fffef8;min-width:0;overflow-wrap:anywhere}.sq-scope-summary h4{margin:0 0 8px}.sq-scope-summary ul{margin:8px 0;padding-left:20px}.sq-scope-summary li{margin:5px 0;line-height:1.45}.sq-scope-summary small{display:block;color:#57685d}.sq-scope-period{margin:0;color:#345645;font-weight:600}

/* Shared quotation actions: clear hierarchy in both accounting portals. */
.sq-panel button,.sq-dialog button,.sq-line-button {
  appearance:none;box-sizing:border-box;min-height:44px;padding:10px 16px;
  border:1px solid #bccbc2;border-radius:8px;background:#fffef9;
  color:#234c3d;font-family:inherit;line-height:1.35;
  font-size:14px;font-weight:600;text-shadow:none;box-shadow:none;
  cursor:pointer;transition:background-color .15s,border-color .15s;
}
.sq-panel button:hover:not(:disabled),.sq-dialog button:hover:not(:disabled),.sq-line-button:hover:not(:disabled) {
  background:#eaf2ed;border-color:#739584;
}
.sq-panel button:focus-visible,.sq-dialog button:focus-visible,.sq-line-button:focus-visible {
  outline:3px solid #219bb5;outline-offset:3px;
}
.sq-panel #sqAccept,.sq-panel #sqRevise,.sq-panel #sqApplyAll,.sq-dialog #sqLineApply {
  background:#205c47;border-color:#205c47;color:#fff;
}
.sq-panel #sqAccept:hover:not(:disabled),.sq-panel #sqRevise:hover:not(:disabled),
.sq-panel #sqApplyAll:hover:not(:disabled),.sq-dialog #sqLineApply:hover:not(:disabled) {
  background:#164735;border-color:#164735;
}
.sq-panel .sq-void-action,.sq-dialog #sqVoidConfirm,.sq-dialog #sqLineClear {
  color:#973a30;border-color:#dcb4ac;background:#fff8f5;
}
.sq-panel .sq-void-action:hover:not(:disabled),.sq-dialog #sqVoidConfirm:hover:not(:disabled),
.sq-dialog #sqLineClear:hover:not(:disabled) {background:#fbe9e4;border-color:#b75d4d;}
.sq-panel .sq-void-action {margin-top:16px;}
.sq-dialog .sq-actions {align-items:stretch;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid #dddeda;}
.sq-dialog .sq-actions>button {flex:1 1 150px;}
.sq-history {gap:10px;margin-top:16px;}
.sq-history button {text-align:left;background:#edf3ef;}
.sq-panel button:disabled,.sq-dialog button:disabled,.sq-line-button:disabled {
  color:#737d77;background:#edf0ec;border-color:#d6dcd7;cursor:not-allowed;opacity:1;
}
.sq-dialog {border-radius:12px;}
.sq-dialog>header {padding:14px 16px;background:#eef2e9;border-bottom:1px solid #d6ddce;}
.sq-dialog>header button {flex:none;}
.sq-dialog-body {padding:18px;}
.sq-line-button {padding:6px 10px;font-size:12px;min-height:36px;}
.sq-line-button.is-linked {background:#e1efe7;border-color:#8eb5a0;color:#205c47;}
@media(max-width:700px) {
  .sq-dialog .sq-actions {display:grid;grid-template-columns:minmax(0,1fr);}
  .sq-dialog .sq-actions>button,.sq-history>button {width:100%;}
  .sq-dialog-body {padding:14px;}
  .sq-panel #sqAccept,.sq-panel #sqRevise,.sq-panel #sqApplyAll {width:100%;}
  .sq-line-button {min-height:44px;}
}
@media(prefers-reduced-motion:reduce) {
  .sq-panel button,.sq-dialog button,.sq-line-button {transition:none;}
}

/* Identical, bounded SO and quotation tags in invoice item rows. */
.line-sales-order-cell .line-apply-sales-order,
.line-sales-order-cell .sq-line-button {
  display:inline-block;box-sizing:border-box;width:52px;min-width:0;max-width:100%;
  min-height:34px;margin:0;padding:6px 4px;border:1px solid #b5c8be;
  border-radius:7px;background:#fffef9;color:#234c3d;box-shadow:none;
  font-family:inherit;font-size:12px;font-weight:600;line-height:1.2;
  text-align:center;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;
  vertical-align:middle;cursor:pointer;
}
.line-sales-order-cell .line-apply-sales-order.is-linked,
.line-sales-order-cell .sq-line-button.is-linked {background:#e1efe7;border-color:#8eb5a0;color:#205c47;}
.line-sales-order-cell .line-apply-sales-order:hover:not(:disabled),
.line-sales-order-cell .sq-line-button:hover:not(:disabled) {background:#d1e6da;border-color:#608b75;}
.line-sales-order-cell .line-apply-sales-order:focus-visible {outline:3px solid #219bb5;outline-offset:2px;}
.line-sales-order-cell .sq-line {margin-top:5px;max-width:100%;}
.line-sales-order-cell .line-clear-sales-order {border:1px solid #dcb4ac;border-radius:6px;background:#fff8f5;color:#973a30;box-shadow:none;vertical-align:middle;min-height:34px;}
@media(max-width:700px){
  .line-sales-order-cell .line-apply-sales-order,.line-sales-order-cell .sq-line-button,
  .line-sales-order-cell .line-clear-sales-order {min-height:44px;}
}

/* Read-only invoices retain their linked references; only editing is disabled. */
.transaction-view-dialog .line-sales-order-cell .line-apply-sales-order.transaction-view-mutation,
.transaction-view-dialog .line-sales-order-cell .sq-line-button.transaction-view-mutation {
  display:inline-block!important;opacity:1;cursor:default;
  background:#f3f6f2;border-color:#b5c8be;color:#345346;
}
.transaction-view-dialog .line-sales-order-cell .line-apply-sales-order.is-linked,
.transaction-view-dialog .line-sales-order-cell .sq-line-button.is-linked {
  background:#e1efe7;border-color:#8eb5a0;color:#205c47;
}

/* Quotation billing choices are readable before selecting an item. */
.sq-quote-choices{border:0;padding:0;margin:16px 0;min-width:0}.sq-quote-choices legend{font-weight:600;margin-bottom:10px}.sq-quote-card{border:1px solid #bdcfc3;border-radius:10px;background:#fffef9;margin-bottom:12px;overflow:hidden}.sq-quote-card>header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;background:#edf4ee}.sq-quote-status{font-size:12px;color:#265c43}.sq-quote-status.needs-review{color:#8a391d}.sq-quote-period,.sq-quote-balance{margin:10px 14px;font-size:13px;line-height:1.5}.sq-quote-scope{margin:10px 14px;font-size:13px}.sq-quote-scope summary{cursor:pointer}.sq-dialog .sq-rate-choice{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border-top:1px solid #dce5dd;cursor:pointer;min-height:44px;box-sizing:border-box;margin:0}.sq-rate-choice input{width:20px!important;height:20px;flex:0 0 20px;margin:2px 0;accent-color:#245b47}.sq-rate-choice>span{min-width:0;display:grid;gap:5px}.sq-rate-price{font-variant-numeric:tabular-nums;color:#285640;font-size:14px;line-height:1.5}.sq-rate-choice.is-selected{background:#e2f0e8;box-shadow:inset 4px 0 #2c7554}.sq-rate-choice:focus-within{outline:2px solid #218fa3;outline-offset:-2px}.sq-dialog label[hidden]{display:none!important}

/* Centre action labels and let wrapped text determine button height. */
.sq-dialog .sq-actions > button {
  display:flex;align-items:center;justify-content:center;text-align:center;
  height:auto;min-height:48px;padding:10px 14px;line-height:1.35;
  white-space:normal;overflow-wrap:normal;box-sizing:border-box;
}

/* Make the acceptance entry point a primary disclosure action. */
.sq-panel #sqAcceptance {margin:18px 0 12px;}
.sq-panel #sqAcceptance > summary {
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  width:fit-content;max-width:100%;min-height:48px;box-sizing:border-box;
  padding:12px 18px;border:1px solid #245e4c;border-radius:9px;
  background:#245e4c;color:#fff;font-size:14px;font-weight:700;
  line-height:1.4;list-style:none;cursor:pointer;
  box-shadow:0 2px 4px rgba(33,63,49,.12);
}
.sq-panel #sqAcceptance > summary::-webkit-details-marker {display:none;}
.sq-panel #sqAcceptance > summary::after {content:'+';font-size:20px;line-height:1;flex:none;}
.sq-panel #sqAcceptance[open] > summary::after {content:'−';}
.sq-panel #sqAcceptance > summary:hover {background:#1c4d3d;}
.sq-panel #sqAcceptance > summary:focus-visible {outline:3px solid #258ba0;outline-offset:3px;}
@media(max-width:700px){.sq-panel #sqAcceptance > summary {width:100%;}}

.sq-po-notice{margin:6px 0 0;padding:8px 10px;background:#edf5ef;border-radius:6px;color:#28523c;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.sq-po-notice.needs-review{background:#fff4df;color:#804b13;border-left:3px solid #b7832b}

.sq-uploaded-documents{margin:16px 0;padding:12px;background:#fffef9;border:1px solid #d4dfd6;border-radius:9px}.sq-uploaded-documents h4{margin:0 0 10px}.sq-document-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:1px solid #e0e7df}.sq-document-row>span{flex:1 1 200px;min-width:0;overflow-wrap:anywhere}.sq-document-row small{display:block;color:#687a6e;margin-top:4px}.sq-document-row button{height:auto;min-height:44px}.sq-document-preview iframe{width:100%;height:65dvh;border:1px solid #d4dfd6;border-radius:8px;background:white}.sq-document-preview img{max-width:100%;height:auto}.sq-document-preview pre{white-space:pre-wrap;overflow-wrap:anywhere}.sq-document-name{overflow-wrap:anywhere}
