﻿.ca-hero{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(680px,1.6fr);gap:26px;align-items:stretch;margin-bottom:16px;border:1px solid #dce3ea;background:#fff;border-radius:10px;overflow:hidden}
.ca-hero-title{padding:22px 24px;background:#fbfaf8}.ca-hero-title>span{display:block;color:#a4520d;font-size:12px;font-weight:700;letter-spacing:.12em;margin-bottom:7px}.ca-hero-title h2{margin:0;color:#172033;font-size:20px;line-height:1.35}.ca-hero-title p{margin:8px 0 0;color:#69758a;font-size:12px}
.ca-ledger-totals{display:grid;grid-template-columns:repeat(3,1fr);align-items:center}.ca-ledger-totals>div{padding:18px 24px;border-left:1px solid #e5e9ef}.ca-ledger-totals span,.ca-ledger-totals small{display:block}.ca-ledger-totals span{color:#69758a;font-size:13px}.ca-ledger-totals strong{display:block;margin:8px 0 5px;color:#273247;font-size:27px;letter-spacing:-.02em}.ca-ledger-totals small{color:#8a94a6;font-size:12px}.ca-ledger-totals .received strong,.received,.ca-received{color:#1b7a55!important}.ca-ledger-totals .outstanding{background:#fffaf5}.ca-ledger-totals .outstanding strong,.due,.ca-due{color:#bd4c14!important}
.ca-workbench{border:1px solid #dce3ea;background:#fff;border-radius:10px;overflow:hidden}.ca-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 16px;border-bottom:1px solid #e3e8ee}.ca-toolbar>div:first-child{display:flex;align-items:baseline;gap:10px}.ca-toolbar>div:first-child strong{font-size:17px;color:#263247}.ca-toolbar>div:first-child span{font-size:12px;color:#7b8799}.ca-toolbar-actions{display:flex;align-items:center;gap:8px}.ca-search{display:flex;align-items:center;gap:6px;height:34px;width:230px;padding:0 10px;border:1px solid #d8dee7;border-radius:6px;background:#fff}.ca-search span{color:#596579;font-size:17px}.ca-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;font-size:12px;color:#273247}.ca-segment{display:flex;padding:2px;border:1px solid #d8dee7;border-radius:6px;background:#f5f7f9}.ca-segment button{height:27px;padding:0 10px;border:0;border-radius:4px;background:transparent;color:#657186;font-size:12px;cursor:pointer}.ca-segment button.active{background:#fff;color:#9b4b0d;box-shadow:0 1px 3px #1f2d3d1c;font-weight:700}
.ca-table-wrap{overflow:auto;max-height:calc(100vh - 334px)}.ca-customer-table th{position:sticky;top:0;z-index:2}.ca-customer-table td{height:56px}.ca-customer-name{display:flex;flex-direction:column;align-items:flex-start;gap:3px;border:0;background:transparent;padding:0;color:#253147;cursor:pointer}.ca-customer-name b{font-size:14px}.ca-customer-name:hover b{color:#bb5a0f}.ca-customer-name small,.ca-progress+small{color:#8791a2;font-size:11px}.ca-progress{width:92px;height:5px;background:#e7ebf0;border-radius:9px;overflow:hidden;margin-bottom:5px}.ca-progress i{display:block;height:100%;background:#3f8a6c;border-radius:inherit}.ca-table-foot{display:flex;justify-content:flex-end;gap:24px;padding:10px 16px;border-top:1px solid #e3e8ee;background:#fafbfc;color:#5f6b7d;font-size:12px}.ca-table-foot b{color:#b44a16}
.customer-drawer.expansion-drawer{width:min(1260px,94vw)}.customer-receipt-drawer.expansion-drawer{width:min(1140px,92vw)}.ca-statement-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.ca-statement-head>div{display:flex;gap:18px;color:#69758a;font-size:12px}.ca-statement-totals{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #d7e0e9;border-radius:7px;background:#fff8f1;margin-bottom:16px}.ca-statement-totals>div{padding:15px 18px;border-left:1px solid #e7ebf0}.ca-statement-totals>div:first-child{border-left:0}.ca-statement-totals span{display:block;color:#758195;font-size:12px}.ca-statement-totals b{display:block;margin-top:5px;color:#263247;font-size:20px}.ca-history-note,.ca-order-note{padding:9px 12px;border:1px solid #f1dbc5;background:#fffaf4;color:#8a521d;border-radius:6px;font-size:12px;margin-bottom:12px}.ca-drawer-section-title{display:flex;align-items:center;justify-content:space-between;margin:18px 0 10px}.ca-drawer-section-title h3{margin:0;color:#283449;font-size:15px}.ca-drawer-section-title p{margin:3px 0 0;color:#7b8798;font-size:12px}.ca-orders{display:flex;flex-direction:column;gap:9px}.ca-order{border:1px solid #dce3ea;border-radius:7px;background:#fff;overflow:hidden}.ca-order[open]{border-color:#c9d2dd;box-shadow:0 2px 7px #2534490b}.ca-order summary{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:56px;padding:0 15px;list-style:none;cursor:pointer;background:#fafbfc}.ca-order summary::-webkit-details-marker{display:none}.ca-order[open] summary{background:#fff8f1;border-bottom:1px solid #eadbcf}.ca-order-identity,.ca-order-numbers{display:flex;align-items:center;gap:14px}.ca-order-identity span{color:#6f7b8d;font-size:12px}.ca-order-identity b{color:#273348;font-size:14px}.ca-order-numbers span{color:#687488;font-size:12px}.ca-order-numbers span b{margin-left:3px;color:#273348;font-size:13px}.ca-order-numbers i{font-style:normal;color:#8490a1;font-size:17px;transition:transform .15s}.ca-order[open] .ca-order-numbers i{transform:rotate(180deg)}.ca-order-detail{overflow:auto}.ca-order-detail .data-table{border:0}.ca-order-detail th{background:#f7f8fa}.ca-order-detail td,.ca-order-detail th{padding:10px 12px}.ca-order-note{margin:10px 12px 0}.ca-allocation-line{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;padding:9px 12px;border-top:1px dashed #e0e5eb;background:#fbfcfd;font-size:11px;color:#6e798a}.ca-allocation-line b{color:#3d495c}.ca-allocation-line span{padding-right:10px;border-right:1px solid #dce2e9}.ca-receipts-table{overflow:auto;border:1px solid #dce3ea;border-radius:7px}.ca-receipts-table .data-table{border:0}.ca-empty{padding:36px!important}
.ca-receipt-form{display:flex;flex-direction:column;gap:14px}.ca-form-row{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,.7fr);gap:12px}.ca-form-row label,.ca-notes{min-width:0;display:flex;flex-direction:column;gap:6px}.ca-form-row label>span,.ca-notes>span,.ca-amount-band label>span,.ca-receipt-order label>span{color:#5e6a7d;font-size:12px;font-weight:600}.ca-form-row select,.ca-form-row input,.ca-notes input{min-width:0;width:100%;box-sizing:border-box;height:36px;border:1px solid #d3dae4;border-radius:6px;padding:0 10px;background:#fff;color:#273247}.ca-amount-band{display:grid;grid-template-columns:1.3fr repeat(3,1fr);align-items:stretch;border:1px solid #dfd5ca;border-radius:7px;background:#fff4e8;overflow:hidden}.ca-amount-band>label,.ca-amount-band>div{padding:13px 16px;border-left:1px solid #eadfd5}.ca-amount-band>label{border-left:0}.ca-amount-band>div span{display:block;color:#7b6d60;font-size:11px}.ca-amount-band>div b{display:block;margin-top:7px;color:#273247;font-size:17px}.ca-amount-band label>div,.ca-receipt-order label>div{display:flex;align-items:center;margin-top:5px}.ca-amount-band label i,.ca-receipt-order label i{font-style:normal;color:#9c561b;margin-right:-20px;z-index:1}.ca-amount-band input{width:100%;height:33px;padding:0 8px 0 24px;border:1px solid #d6c3b2;border-radius:5px;background:#fff;font-size:18px;font-weight:700;color:#a44d0c;outline:0}.ca-receipt-order-head{display:flex;align-items:center;justify-content:space-between;margin-top:5px}.ca-receipt-order-head h3{margin:0;font-size:15px;color:#273348}.ca-receipt-order-head p{margin:4px 0 0;font-size:12px;color:#7a8697}.ca-receipt-orders{display:flex;flex-direction:column;gap:7px;max-height:390px;overflow:auto}.ca-receipt-order{display:grid;grid-template-columns:1.6fr repeat(3,.7fr) 1fr;gap:12px;align-items:center;min-height:68px;padding:9px 12px;border:1px solid #dce3ea;border-radius:7px;background:#fff}.ca-receipt-order.allocated{border-color:#d9a775;background:#fffbf7}.ca-receipt-order>div:first-child{display:flex;flex-direction:column;gap:2px}.ca-receipt-order>div:first-child span,.ca-receipt-order>div:first-child small{color:#7a8697;font-size:11px}.ca-receipt-order>div:first-child b{color:#273348;font-size:13px}.ca-receipt-order>div:not(:first-child) span{display:block;color:#7a8697;font-size:10px}.ca-receipt-order>div:not(:first-child) b{display:block;margin-top:3px;color:#344055;font-size:12px}.ca-receipt-order label{display:flex;flex-direction:column;gap:2px}.ca-receipt-order label input{width:100%;height:31px;padding:0 7px 0 22px;border:1px solid #d2d9e3;border-radius:5px;text-align:right;color:#9f4f12;font-weight:700}.ca-notes{margin-top:2px}.ca-receipt-form .form-actions{margin-top:0;padding-top:12px;border-top:1px solid #e3e8ee}
@media(max-width:1100px){.ca-hero{grid-template-columns:1fr}.ca-ledger-totals>div:first-child{border-left:0}.ca-toolbar{align-items:flex-start;flex-direction:column}.ca-toolbar-actions{width:100%;flex-wrap:wrap}.ca-form-row{grid-template-columns:repeat(2,minmax(0,1fr))}.ca-receipt-order{grid-template-columns:1.2fr repeat(3,.7fr)}.ca-receipt-order label{grid-column:1/-1}.ca-amount-band{grid-template-columns:1fr 1fr}}
@media print{.ca-toolbar-actions,.ca-statement-head .btn,.ca-drawer-section-title .btn{display:none!important}.ca-order{break-inside:avoid}.ca-order:not([open])>*:not(summary){display:block!important}}


/* Keep receipt fields usable inside the narrower workspace iframe. */
@media(max-width:600px){
  .ca-form-row{grid-template-columns:minmax(0,1fr)}
  .ca-form-row select,.ca-form-row input,.ca-notes input{min-height:44px}
  .ca-amount-band{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ca-amount-band>label,.ca-amount-band>div{min-width:0;padding:12px}
  .ca-amount-band input,.ca-receipt-order label input{min-width:0;min-height:44px}
  .ca-receipt-order-head{align-items:flex-start;flex-direction:column;gap:10px}
  .ca-receipt-order-head .btn{min-height:44px}
  .ca-receipt-order{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .ca-receipt-order>div{min-width:0;overflow-wrap:anywhere}
  .ca-receipt-order>div:first-child{grid-column:1/-1}
  .ca-receipt-form .form-actions{flex-wrap:wrap}
  .ca-receipt-form .form-actions .btn{min-height:44px}
}
