.cscd-wrap{max-width:1180px;margin:20px auto;padding:0 12px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}.cscd-card{background:#fff;border:1px solid #dfe5ee;border-radius:14px;padding:16px;margin:14px 0;box-shadow:0 2px 10px rgba(20,40,70,.05)}.cscd-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.cscd-stat{border:1px solid #e7edf5;border-radius:12px;padding:12px;background:#f8fafc}.cscd-stat b{font-size:1.4rem}.cscd-table{width:100%;border-collapse:collapse}.cscd-table th,.cscd-table td{border-bottom:1px solid #e5e7eb;padding:8px;text-align:left;vertical-align:top}.cscd-button{display:inline-block;background:#0f172a;color:#fff!important;padding:9px 14px;border:0;border-radius:10px;font-weight:700;text-decoration:none;cursor:pointer}.cscd-button-alt{background:#2563eb}.cscd-button-warn{background:#ea580c}.cscd-row{display:flex;gap:8px;flex-wrap:wrap;align-items:end}.cscd-row label{display:block;font-weight:700;margin-bottom:3px}.cscd-row input,.cscd-row select,.cscd-row textarea{border:1px solid #cbd5e1;border-radius:8px;padding:9px;min-width:180px}.cscd-note{background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;border-radius:10px;padding:12px}.cscd-good{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;border-radius:10px;padding:12px}.cscd-bad{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;border-radius:10px;padding:12px}@media(max-width:700px){.cscd-table{font-size:.9rem}.cscd-row{display:block}.cscd-row>div{margin-bottom:8px}.cscd-row input,.cscd-row select,.cscd-row textarea{width:100%;box-sizing:border-box}}
.cscd-note-small{font-size:.9rem;color:#475569;margin-bottom:6px}.cscd-pill{display:inline-block;background:#fef3c7;color:#92400e;border:1px solid #fde68a;border-radius:999px;padding:2px 8px;font-size:.78rem;font-weight:800;margin-top:4px}
.cscd-context{background:#f1f5f9;border:1px solid #dbe3ef;border-radius:10px;padding:9px;margin:8px 0 10px 0}.cscd-note-small{font-size:.92rem;color:#475569;margin:8px 0 12px 0}.cscd-pill{display:inline-block;background:#eef2ff;color:#3730a3;border-radius:999px;padding:2px 7px;font-size:.75rem;font-weight:700}
.cscd-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.cscd-two input{width:100%;box-sizing:border-box}.cscd-authorise{background:#f8fafc;border:1px solid #dbe3ef;border-radius:10px;padding:12px;margin:10px 0;color:#334155}@media(max-width:700px){.cscd-two{grid-template-columns:1fr}}
.cscd-linkstat { display:block; color:inherit; text-decoration:none; }
.cscd-linkstat:hover { text-decoration:none; box-shadow:0 0 0 2px rgba(0,0,0,.08) inset; }
.cscd-linkstat small { display:block; margin-top:6px; font-size:.82rem; font-weight:400; opacity:.75; }
.cscd-filebutton{display:inline-block;background:#0f172a;color:#fff!important;padding:8px 12px;border-radius:9px;font-weight:800;cursor:pointer;margin:4px 0}.cscd-filebutton+input[type=file]{display:block;margin-top:7px}.cscd-context small,.cscd-stat small{display:block;margin-top:5px;color:#475569;font-weight:400;line-height:1.35}

/* v0.1.14: hide the technical camera file input so staff only see Open camera plus Upload existing file. */
.cscd-camera-input{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;}
.cscd-filebutton+input.cscd-camera-input{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;margin:0!important;}

.cscd-button-light{background:#64748b}

/* v0.1.20: branch/till switch moved lower down; keep visible but out of payment path */
.cscd-store-switch{border:1px solid #cbd5e1;background:#f8fafc}
.cscd-store-switch h2{margin-top:0}
.cscd-store-switch select{min-width:260px}


/* v0.1.21: compact current store/till warning at the top with quick jump to the lower switcher */
.cscd-active-context{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;border-radius:10px;padding:10px 12px;margin:8px 0 12px 0;box-shadow:0 2px 8px rgba(20,40,70,.08)}
.cscd-active-context small{color:#92400e}.cscd-button-small{padding:7px 10px;border-radius:9px;white-space:nowrap}#cscd-branch-switch{scroll-margin-top:85px}
@media(max-width:700px){.cscd-active-context{position:static;display:block}.cscd-active-context .cscd-button{margin-top:8px}.cscd-button-small{display:inline-block}}

/* v0.2.3: admin payment-method correction form */
.cscd-correct-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.cscd-correct-form select,.cscd-correct-form input{border:1px solid #cbd5e1;border-radius:8px;padding:7px}.cscd-muted{color:#94a3b8}




/* v0.2.9: admin layout fix - use the available Joomla admin width and keep wide transaction tables inside the card instead of running off the page. */
.cscd-wrap.cscd-admin{max-width:none;width:100%;margin:12px 0;padding:0 8px;box-sizing:border-box}
.cscd-admin .cscd-card{box-sizing:border-box;max-width:100%;overflow-x:auto}
.cscd-admin .cscd-table{max-width:100%}
.cscd-admin .cscd-table th{white-space:nowrap}
.cscd-admin .cscd-table th,.cscd-admin .cscd-table td{padding:7px 6px;line-height:1.35}
.cscd-admin .cscd-correct-form select{max-width:160px}
.cscd-admin .cscd-correct-form input{max-width:120px}
@media (min-width:900px){
  .cscd-admin .cscd-table{font-size:.92rem}
}
@media (max-width:1200px){
  .cscd-admin .cscd-correct-form{display:grid;grid-template-columns:1fr;gap:5px;align-items:start}
  .cscd-admin .cscd-correct-form select,.cscd-admin .cscd-correct-form input,.cscd-admin .cscd-correct-form button{width:100%;max-width:170px;box-sizing:border-box}
}

/* v0.3.0: reports and printable front-end takings report */
.cscd-summary-table .cscd-total-row td{background:#f8fafc;border-top:2px solid #cbd5e1}
.cscd-report{max-width:none;margin:14px auto}.cscd-report h1{margin-top:0}.cscd-check-table th:first-child,.cscd-check-table td:first-child{text-align:center;width:34px}.cscd-check-box{font-size:1.25rem;font-weight:800;color:#334155}.cscd-print-actions{position:sticky;top:8px;z-index:40}
@media print{
  body{background:#fff!important}
  .cscd-print-actions,.cscd-active-context,#cscd-branch-switch{display:none!important}
  .cscd-wrap,.cscd-report{max-width:none!important;margin:0!important;padding:0!important;font-size:11px!important}
  .cscd-card{box-shadow:none!important;border:1px solid #bbb!important;border-radius:0!important;break-inside:avoid;padding:8px!important;margin:8px 0!important}
  .cscd-grid{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:6px!important}
  .cscd-stat{padding:6px!important;border:1px solid #bbb!important;background:#fff!important}
  .cscd-stat b{font-size:1rem!important}
  .cscd-table th,.cscd-table td{padding:4px!important;border-bottom:1px solid #ccc!important}
  a{color:#000!important;text-decoration:none!important}
}

/* v0.3.3: paid invoice lookup / reprint actions */
.cscd-action-stack{display:flex;flex-direction:column;gap:7px;align-items:flex-start}.cscd-action-stack .cscd-row{align-items:center}.cscd-action-stack small{max-width:260px}

/* v0.4.7 customer billing/VAT editor */
.cscd-customer-edit { margin: 8px 0; }
.cscd-customer-edit > summary { display: inline-block; cursor: pointer; padding: 8px 10px; border-radius: 8px; background: #eef3fb; border: 1px solid #d5dfef; font-weight: 700; }
.cscd-customer-edit[open] > summary { margin-bottom: 8px; }
.cscd-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 8px 0; }
.cscd-edit-grid label { display: block; font-size: 13px; font-weight: 700; }
.cscd-edit-grid input { width: 100%; box-sizing: border-box; margin-top: 3px; }


/* v0.4.4 customer resend button */
.cscd-resend-form{align-items:center;gap:7px}.cscd-resend-form small{max-width:220px;overflow-wrap:anywhere}
/* v0.4.5 VAT field detection warning */
.cscd-warning{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:10px;padding:8px 10px;margin:8px 0;font-size:.92rem;}

/* v0.4.7: payment audit + admin-only Other/backfill visibility */
.cscd-payment-audit{margin-top:6px;max-width:100%}
.cscd-payment-audit>summary{cursor:pointer;font-weight:800;color:#1e293b;background:#f8fafc;border:1px solid #dbe3ef;border-radius:8px;padding:6px 8px;display:inline-block}
.cscd-mini-table{border-collapse:collapse;width:100%;margin-top:6px;font-size:.86rem;background:#fff}
.cscd-mini-table th,.cscd-mini-table td{border-bottom:1px solid #e5e7eb;padding:4px 5px;text-align:left;vertical-align:top}
.cscd-mini-table small{color:#64748b;overflow-wrap:anywhere}
.cscd-layby-backfill{background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:8px;margin:6px 0;color:#7c2d12}


/* v0.4.9: updated invoice PDF refresh/attachment on customer detail resend; keeps v0.4.8 void audit tools */
.cscd-button-danger{background:#b91c1c!important}.cscd-void-form{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.cscd-void-form input{border:1px solid #cbd5e1;border-radius:8px;padding:6px}.cscd-voided-row td{background:#f8fafc;color:#64748b}.cscd-pill-void{background:#fee2e2!important;color:#991b1b!important;border:1px solid #fecaca}.cscd-pill-posted{background:#dcfce7!important;color:#166534!important;border:1px solid #bbf7d0}

/* v0.4.10 workshop collection signature bridge */
.cscd-signature-card { max-width: 900px; margin: 0 auto; }
.cscd-collection-sign-form { display: grid; gap: 14px; }
.cscd-collection-sign-form label { display: grid; gap: 6px; font-weight: 700; }
.cscd-collection-sign-form input,
.cscd-collection-sign-form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #cfd8e3; border-radius: 10px; font: inherit; }
.cscd-signature-wrap { display: grid; gap: 8px; }
.cscd-signature-pad { width: 100%; height: 220px; border: 2px solid #0b3d78; border-radius: 12px; background: #fff; touch-action: none; }
@media (max-width: 700px) { .cscd-signature-pad { height: 180px; } }

/* v0.4.11 visible Workshop collection signature action in Cash Desk */
.cscd-workshop-release-form{background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:8px 10px;max-width:360px}.cscd-workshop-release-form small{display:block;flex-basis:100%;color:#7c2d12}


/* v0.4.13 direct invoice PDF print action */
.cscd-invoice-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}

/* v0.4.14 sale credit / commission tracking */
.cscd-sales-credit-label{font-weight:700}.cscd-sales-credit-select{min-width:210px}.cscd-sales-credit-help{max-width:260px;display:block}

/* v0.4.23 invoice assignment router */
.cscd-assignment-router{background:#f8fafc;border:1px solid #dbe3ef;border-radius:8px;padding:7px 9px;color:#334155;line-height:1.35;max-width:420px}
.cscd-action-stack .cscd-bad{max-width:460px}

/* v0.4.24 customer refund approval workflow */
.cscd-refund-box{background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:8px 10px;max-width:520px}
.cscd-refund-box>summary{cursor:pointer;font-weight:800;color:#7c2d12}
.cscd-refund-form{display:grid;gap:8px;margin-top:8px}.cscd-refund-form label{font-weight:700}.cscd-refund-form input,.cscd-refund-form select,.cscd-refund-form textarea{width:100%;box-sizing:border-box}
.cscd-refund-approval{border-color:#fed7aa!important;background:#fffbeb}.cscd-refund-approve-form{display:flex;gap:5px;flex-wrap:wrap;align-items:center;margin:3px 0}.cscd-refund-approval small{color:#64748b}

/* v0.4.25 R0 warranty/no-charge close workflow */
/* v0.4.26 search-all default dropdown */
.cscd-zero-close-box{background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:8px 10px;max-width:560px}
.cscd-zero-close-box>summary{cursor:pointer;font-weight:800;color:#92400e}
.cscd-zero-close-form{margin-top:8px}.cscd-zero-close-form input,.cscd-zero-close-form select{box-sizing:border-box}
.cscd-zero-close-note{max-width:520px}

.cscd-account-hold{background:#8b0000!important;border-color:#5c0000!important;color:#fff!important;box-shadow:0 2px 12px rgba(139,0,0,.18)}
.cscd-account-hold strong,.cscd-account-hold a,.cscd-account-hold small{color:#fff!important}

/* v0.4.36 branch special-order bridge */
.cscd-special-order-box {
  flex: 1 1 100%;
  border: 1px solid #f5a65a;
  background: #fff8ee;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 4px 0;
  color: #3b2108;
}
.cscd-special-order-box strong { color: #9b3c00; }
.cscd-special-order-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-weight: 700;
}
.cscd-special-order-check input { transform: scale(1.15); }


/* v0.4.37 branch sale of online stock guard */
.cscd-branch-online-box{
  flex:1 1 100%;
  border-radius:10px;
  padding:10px 12px;
  margin:6px 0;
  max-width:680px;
  line-height:1.35;
}
.cscd-branch-online-box ul{margin:6px 0 0 18px;padding:0}
.cscd-branch-online-block{background:#fee2e2;border:1px solid #ef4444;color:#7f1d1d}
.cscd-branch-online-block strong{color:#7f1d1d}
.cscd-branch-online-allow{background:#eff6ff;border:1px solid #93c5fd;color:#1e3a8a}
.cscd-branch-online-allow strong{color:#1e40af}

.cscd-payment-correction-box {
  border: 1px solid #f59e0b;
  background: #fff7ed;
  border-radius: 8px;
  padding: 8px;
  margin: 6px 0;
}
.cscd-payment-correction-box summary { cursor: pointer; font-weight: 700; }
.cscd-overpay-good { color: #92400e; }
.cscd-overpay-form,
.cscd-overpay-refund-form,
.cscd-transfer-form { gap: 6px; align-items: center; }
.cscd-transfer-form { margin-top: 4px; }
.cscd-transfer-form input,
.cscd-transfer-form select { font-size: 12px; padding: 4px 6px; }

/* v0.4.41 staff extra payment capture + admin warning */
.cscd-overpay-alert{border-color:#f59e0b!important;background:#fffbeb!important}
.cscd-overpay-alert h2{color:#92400e}
.cscd-overpay-staff-note{background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:7px 9px;margin:6px 0;max-width:520px}

/* v0.4.44 refund approvals visibility */
.cscd-refund-approval{border:2px solid #f97316!important;background:#fff7ed!important;box-shadow:0 0 0 3px rgba(249,115,22,.08)}
.cscd-refund-approval h2{color:#7c2d12;margin-top:0}
.cscd-refund-approval .cscd-pill{background:#ffedd5!important;color:#9a3412!important;border:1px solid #fed7aa!important}


/* v0.4.47 VM status audit */
.cscd-vm-status-audit{border:2px solid #2563eb!important;background:#f8fbff!important}
.cscd-vm-status-audit h2{color:#1e3a8a;margin-top:0}
.cscd-vm-status-audit .cscd-pill{background:#dbeafe!important;color:#1e40af!important;border:1px solid #bfdbfe!important}
.cscd-vm-status-audit .cscd-correct-form{margin:4px 0}

/* v0.4.49 VM status audit bulk actions */
.cscd-vm-status-audit .cscd-bulk-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0 12px;padding:8px 10px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:8px}
.cscd-vm-status-audit .cscd-bulk-form select{padding:5px 7px}
.cscd-vm-audit-check{transform:scale(1.15)}


/* v0.4.50 VM status audit filters */
.cscd-vm-audit-filter { margin: 10px 0 12px; padding: 10px; background: #f4f8ff; border: 1px solid #cfe0ff; border-radius: 6px; }
.cscd-vm-audit-filter label { font-weight: 700; }
.cscd-vm-audit-filter select { min-width: 190px; }

/* v0.4.60 performance overview */
.cscd-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:12px}
.cscd-kpis>div{border:1px solid #dbe3ef;background:#f8fafc;border-radius:10px;padding:10px 12px}
.cscd-kpis strong{display:block;font-size:18px;color:#172033;line-height:1.2}
.cscd-kpis span{display:block;font-size:12px;color:#64748b;margin-top:3px}

/* v0.4.64: front Cash Desk mobile ordering / reduction */
.cscd-wrap,.cscd-card,.cscd-stat,.cscd-row,.cscd-grid{box-sizing:border-box;max-width:100%}
.cscd-card{overflow-wrap:anywhere}
.cscd-jumpbar{position:sticky;top:52px;z-index:25;display:flex;gap:8px;overflow-x:auto;padding:8px 2px 10px;margin:0 0 8px 0;background:rgba(255,255,255,.94);backdrop-filter:blur(4px);-webkit-overflow-scrolling:touch}
.cscd-jumpbar a{display:inline-flex;align-items:center;white-space:nowrap;text-decoration:none;background:#eef2ff;border:1px solid #dbe3ef;color:#0b3d78;border-radius:999px;padding:8px 11px;font-weight:800;font-size:.86rem}
.cscd-jumpbar a:hover{background:#dbeafe;text-decoration:none}
.cscd-section>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:10px;align-items:flex-start;font-size:1.35rem;font-weight:900;color:#0b2239;line-height:1.15;margin:-2px 0 0 0}
.cscd-section>summary::-webkit-details-marker{display:none}
.cscd-section>summary:after{content:'▾';font-size:1.05rem;color:#64748b;margin-top:3px;transition:transform .15s ease}
.cscd-section[open]>summary:after{transform:rotate(180deg)}
.cscd-section>summary small{display:block;font-size:.83rem;font-weight:500;color:#64748b;margin-top:4px;line-height:1.25}
.cscd-section-body{margin-top:12px}
.cscd-subcard{margin:0;padding:14px;box-shadow:none;background:#fff}
.cscd-action-grid{align-items:start}
.cscd-compact-card h2{margin-top:0}
.cscd-table-mobile-ready td[data-label]:before{display:none}
@media(max-width:700px){
  .cscd-wrap{margin:8px auto;padding:0 8px}
  .cscd-wrap h1{font-size:1.65rem;line-height:1.1;margin:6px 0 10px}
  .cscd-card{padding:12px;margin:10px 0;border-radius:12px;overflow-x:auto}
  .cscd-card h2{font-size:1.28rem;line-height:1.15;margin:0 0 10px}
  .cscd-active-context{font-size:.92rem;padding:10px;line-height:1.35}
  .cscd-jumpbar{top:0;margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px;border-top:1px solid #edf2f7;border-bottom:1px solid #edf2f7}
  .cscd-jumpbar a{font-size:.8rem;padding:8px 10px}
  .cscd-dashboard-grid,.cscd-grid{grid-template-columns:1fr 1fr;gap:8px}
  .cscd-action-grid{grid-template-columns:1fr}
  .cscd-stat{padding:10px;min-width:0}
  .cscd-stat b{font-size:1.15rem;line-height:1.1}
  .cscd-stat small{font-size:.76rem}
  .cscd-section>summary{font-size:1.18rem;align-items:center}
  .cscd-section>summary small{font-size:.78rem}
  .cscd-section:not([open]){padding-top:13px;padding-bottom:13px}
  .cscd-subcard{padding:12px;margin:0}
  .cscd-row input,.cscd-row select,.cscd-row textarea,.cscd-card input,.cscd-card select,.cscd-card textarea{max-width:100%;box-sizing:border-box}
  .cscd-button{width:100%;box-sizing:border-box;text-align:center;margin:3px 0}
  .cscd-button-small{width:auto}
  .cscd-table-mobile-ready,.cscd-table-mobile-ready thead,.cscd-table-mobile-ready tbody,.cscd-table-mobile-ready tr,.cscd-table-mobile-ready th,.cscd-table-mobile-ready td{display:block;width:100%;box-sizing:border-box}
  .cscd-table-mobile-ready thead{display:none}
  .cscd-table-mobile-ready tr{border:1px solid #dbe3ef;border-radius:10px;background:#fff;margin:8px 0;padding:8px;box-shadow:0 1px 4px rgba(20,40,70,.04)}
  .cscd-table-mobile-ready td{border:0;border-bottom:1px solid #eef2f7;padding:7px 0;text-align:left;min-height:22px}
  .cscd-table-mobile-ready td:last-child{border-bottom:0}
  .cscd-table-mobile-ready td[data-label]:before{content:attr(data-label);display:block;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.02em;color:#64748b;margin-bottom:2px}
  .cscd-mini-table{font-size:.82rem}
}
@media(max-width:420px){
  .cscd-dashboard-grid,.cscd-grid{grid-template-columns:1fr}
}

/* v0.4.65: petty cash slips printable report */
.cscd-bad-inline{display:inline-block;background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-radius:999px;padding:2px 7px;font-size:.78rem;font-weight:800}
.cscd-petty-report .cscd-check-box{font-size:1.15rem}
@media print{.cscd-petty-report .cscd-grid{grid-template-columns:repeat(5,1fr)!important}}

/* v0.4.69: quick payment capture inside account-hold outstanding invoice list */
.cscd-mini-payment-form{gap:6px;align-items:center;margin:0;flex-wrap:wrap}
.cscd-mini-payment-title{font-weight:800;color:#0b2239;width:100%;font-size:.88rem}
.cscd-mini-payment-form select{max-width:180px}
.cscd-mini-payment-form .cscd-mini-partpay{width:100%;font-size:.82rem}
.cscd-mini-payment-form .cscd-button{width:auto}
@media(max-width:700px){.cscd-mini-payment-form .cscd-button{width:100%}}


/* v0.4.73: account-hold quick-pay cards clearer/wider, with separate order/invoice/customer identity lines */
.cscd-account-hold-details{display:block;width:100%;max-width:100%;clear:both}
.cscd-account-hold-pay-list{display:grid;gap:10px;margin:8px 0 6px;max-width:100%;width:100%}
.cscd-account-hold-pay-card{border:1px solid #dbe3ef;background:#fff;border-radius:12px;padding:10px;display:grid;grid-template-columns:minmax(150px,1fr) minmax(190px,auto);gap:10px;align-items:start;color:#0f172a;box-shadow:0 1px 4px rgba(20,40,70,.04)}
.cscd-account-hold-invoice strong{display:block;color:#0b2239;font-size:.96rem;line-height:1.2;overflow-wrap:anywhere}
.cscd-account-hold-invoice span{display:block;color:#64748b;font-size:.84rem;margin-top:3px}
.cscd-account-hold-money{display:flex;gap:8px;flex-wrap:wrap;align-items:stretch;justify-content:flex-start}
.cscd-account-hold-money span{min-width:72px;border:1px solid #e5e7eb;background:#f8fafc;border-radius:8px;padding:6px 8px;color:#64748b;font-size:.76rem;line-height:1.15}
.cscd-account-hold-money strong{color:#0f172a;font-size:.9rem;white-space:nowrap}
.cscd-account-hold-pay-action{grid-column:1 / -1;border-top:1px solid #eef2f7;padding-top:8px;min-width:0}
.cscd-mini-payment-form{display:grid!important;grid-template-columns:minmax(150px,190px) minmax(190px,260px) minmax(100px,130px) auto auto;gap:8px;align-items:end;max-width:100%}
.cscd-mini-payment-form .cscd-mini-payment-title,.cscd-mini-payment-form .cscd-mini-partpay,.cscd-mini-payment-form small{grid-column:1 / -1;width:auto}
.cscd-mini-payment-form select,.cscd-mini-payment-form input{min-width:0!important;max-width:100%;box-sizing:border-box}
.cscd-mini-payment-form .cscd-button{width:auto;white-space:nowrap}
@media(max-width:850px){
  .cscd-account-hold-pay-card{grid-template-columns:1fr}
  .cscd-mini-payment-form{grid-template-columns:1fr 1fr}
  .cscd-mini-payment-form .cscd-button{width:100%}
}
@media(max-width:560px){
  .cscd-mini-payment-form{grid-template-columns:1fr!important}
  .cscd-account-hold-money span{min-width:0;flex:1 1 80px}
}

/* v0.4.76: retail invoice release modes + courier tracking */
.cscd-release-options{display:grid;gap:12px;margin:12px 0}
.cscd-release-option{border:1px solid #dbe3ef;background:#fff;border-radius:12px;padding:10px 12px;box-shadow:0 1px 4px rgba(20,40,70,.04)}
.cscd-release-option>summary{cursor:pointer;font-weight:900;color:#0b2239;font-size:1.05rem;list-style:none}
.cscd-release-option>summary::-webkit-details-marker{display:none}
.cscd-release-option>summary:after{content:' ▾';color:#64748b;font-weight:700}
.cscd-release-option:not([open])>summary:after{content:' ▸'}
.cscd-release-option form{display:grid;gap:10px;margin-top:10px}
.cscd-release-option label{display:grid;gap:4px;font-weight:800;color:#0b2239}
.cscd-release-option input,.cscd-release-option textarea{width:100%;box-sizing:border-box}
.cscd-release-courier{border-color:#93c5fd;background:#f8fbff}
.cscd-tracking-found{border:1px solid #bfdbfe;background:#eff6ff;border-radius:8px;padding:8px 10px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* v0.4.77: stop refund/recent transaction tables from crushing the left columns; give note/reason columns proper space. */
.cscd-refund-approval-table,
.cscd-front-transactions-table,
.cscd-admin-transactions-table{table-layout:auto;min-width:1180px}
.cscd-refund-approval-table th,
.cscd-refund-approval-table td,
.cscd-front-transactions-table th,
.cscd-front-transactions-table td,
.cscd-admin-transactions-table th,
.cscd-admin-transactions-table td{white-space:nowrap;vertical-align:top;line-height:1.4}
.cscd-refund-approval-table td:nth-child(1),.cscd-refund-approval-table th:nth-child(1){min-width:92px}
.cscd-refund-approval-table td:nth-child(2),.cscd-refund-approval-table th:nth-child(2){min-width:92px}
.cscd-refund-approval-table td:nth-child(3),.cscd-refund-approval-table th:nth-child(3){min-width:92px}
.cscd-refund-approval-table td:nth-child(4),.cscd-refund-approval-table th:nth-child(4){min-width:92px}
.cscd-refund-approval-table td:nth-child(5),.cscd-refund-approval-table th:nth-child(5){min-width:170px;white-space:normal}
.cscd-refund-approval-table td:nth-child(8),.cscd-refund-approval-table th:nth-child(8){min-width:360px;white-space:normal}
.cscd-refund-approval-table td:nth-child(9),.cscd-refund-approval-table th:nth-child(9){min-width:430px;white-space:normal}
.cscd-front-transactions-table{min-width:1240px}
.cscd-front-transactions-table td:nth-child(1),.cscd-front-transactions-table th:nth-child(1){min-width:96px}
.cscd-front-transactions-table td:nth-child(4),.cscd-front-transactions-table th:nth-child(4){min-width:88px}
.cscd-front-transactions-table td:nth-child(5),.cscd-front-transactions-table th:nth-child(5){min-width:120px}
.cscd-front-transactions-table td:nth-child(6),.cscd-front-transactions-table th:nth-child(6){min-width:105px}
.cscd-front-transactions-table td:nth-child(7),.cscd-front-transactions-table th:nth-child(7){min-width:120px}
.cscd-front-transactions-table td:nth-child(8),.cscd-front-transactions-table th:nth-child(8){min-width:480px;white-space:normal}
.cscd-admin-transactions-table{min-width:1780px}
.cscd-admin-transactions-table td:nth-child(1),.cscd-admin-transactions-table th:nth-child(1){min-width:96px}
.cscd-admin-transactions-table td:nth-child(2),.cscd-admin-transactions-table th:nth-child(2){min-width:85px}
.cscd-admin-transactions-table td:nth-child(3),.cscd-admin-transactions-table th:nth-child(3){min-width:92px}
.cscd-admin-transactions-table td:nth-child(4),.cscd-admin-transactions-table th:nth-child(4){min-width:92px}
.cscd-admin-transactions-table td:nth-child(8),.cscd-admin-transactions-table th:nth-child(8){min-width:135px}
.cscd-admin-transactions-table td:nth-child(9),.cscd-admin-transactions-table th:nth-child(9){min-width:110px}
.cscd-admin-transactions-table td:nth-child(10),.cscd-admin-transactions-table th:nth-child(10){min-width:120px}
.cscd-admin-transactions-table td:nth-child(11),.cscd-admin-transactions-table th:nth-child(11){min-width:500px;white-space:normal}


/* v0.4.78: customer payments / invoice lookup spacing.
   Keep the action panel wide, but stop the invoice/date/customer/money columns from being crushed into one-letter wraps. */
#cscd-search-results{overflow-x:auto}
.cscd-table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;margin:10px 0 4px}
.cscd-lookup-table,.cscd-workshop-lookup-table{table-layout:auto;min-width:1120px;overflow-wrap:normal;word-break:normal}
.cscd-lookup-table th,.cscd-lookup-table td,.cscd-workshop-lookup-table th,.cscd-workshop-lookup-table td{overflow-wrap:normal;word-break:normal;vertical-align:top;line-height:1.4}
.cscd-lookup-table th,.cscd-workshop-lookup-table th{white-space:nowrap;background:#f8fafc}
.cscd-lookup-table td:nth-child(1),.cscd-lookup-table th:nth-child(1){min-width:150px}
.cscd-lookup-table td:nth-child(2),.cscd-lookup-table th:nth-child(2){min-width:96px}
.cscd-lookup-table td:nth-child(3),.cscd-lookup-table th:nth-child(3){min-width:130px}
.cscd-lookup-table td:nth-child(4),.cscd-lookup-table th:nth-child(4){min-width:88px;white-space:nowrap}
.cscd-lookup-table td:nth-child(5),.cscd-lookup-table th:nth-child(5){min-width:105px}
.cscd-lookup-table td:nth-child(6),.cscd-lookup-table th:nth-child(6){min-width:130px}
.cscd-lookup-table td:nth-child(7),.cscd-lookup-table th:nth-child(7){min-width:460px;white-space:normal}
.cscd-lookup-table td:nth-child(1),.cscd-lookup-table td:nth-child(3),.cscd-lookup-table td:nth-child(5),.cscd-lookup-table td:nth-child(6){white-space:normal}
.cscd-lookup-table .cscd-action-stack{min-width:430px;max-width:620px}
.cscd-lookup-table .cscd-action-stack .cscd-row{gap:8px 10px}
.cscd-workshop-lookup-table{min-width:1080px}
.cscd-workshop-lookup-table td:nth-child(1),.cscd-workshop-lookup-table th:nth-child(1){min-width:120px}
.cscd-workshop-lookup-table td:nth-child(2),.cscd-workshop-lookup-table th:nth-child(2){min-width:190px}
.cscd-workshop-lookup-table td:nth-child(3),.cscd-workshop-lookup-table th:nth-child(3){min-width:180px}
.cscd-workshop-lookup-table td:nth-child(4),.cscd-workshop-lookup-table th:nth-child(4){min-width:120px}
.cscd-workshop-lookup-table td:nth-child(5),.cscd-workshop-lookup-table th:nth-child(5){min-width:150px}
.cscd-workshop-lookup-table td:nth-child(6),.cscd-workshop-lookup-table th:nth-child(6){min-width:420px;white-space:normal}
@media(max-width:700px){
  #cscd-search-results{overflow-x:hidden}
  .cscd-lookup-table,.cscd-workshop-lookup-table{min-width:900px;font-size:.9rem}
}


/* v0.4.79: make account-hold quick-pay method explicit so staff can see Cash / POS/Card / EFT before posting the old invoice payment. */
.cscd-mini-payment-method-help{margin-top:-2px;margin-bottom:2px;color:#475569}
.cscd-mini-payment-form .cscd-payment-method-label,.cscd-mini-payment-form .cscd-mini-amount-label{display:block;font-weight:800;color:#0b2239;font-size:.84rem;line-height:1.2;min-width:0}
.cscd-mini-payment-form .cscd-payment-method-label select,.cscd-mini-payment-form .cscd-mini-amount-label input{margin-top:4px;width:100%;box-sizing:border-box;font-weight:400}
.cscd-mini-payment-form .cscd-mini-amount-label input{max-width:130px}
@media(max-width:560px){.cscd-mini-payment-form .cscd-mini-amount-label input{max-width:100%}}

/* v0.4.81: front Cash actions changed from 5 narrow side-by-side cards to stacked dropdown panels. */
.cscd-cash-action-list{display:grid;grid-template-columns:1fr;gap:10px;max-width:100%}
.cscd-action-dropdown{margin:0;box-shadow:none;background:#fff;overflow:visible}
.cscd-action-dropdown>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:12px;align-items:flex-start;font-size:1.12rem;font-weight:900;color:#0b2239;line-height:1.15}
.cscd-action-dropdown>summary::-webkit-details-marker{display:none}
.cscd-action-dropdown>summary:after{content:'▾';flex:0 0 auto;color:#64748b;font-size:1rem;margin-top:2px;transition:transform .15s ease}
.cscd-action-dropdown[open]>summary:after{transform:rotate(180deg)}
.cscd-action-dropdown>summary small{display:block;font-size:.82rem;font-weight:500;color:#64748b;margin-top:4px;line-height:1.25}
.cscd-action-dropdown-body{margin-top:12px}
.cscd-action-dropdown form{max-width:780px}
.cscd-action-dropdown .cscd-table{min-width:720px}
@media(max-width:700px){
  .cscd-cash-action-list{gap:8px}
  .cscd-action-dropdown>summary{font-size:1rem;align-items:center}
  .cscd-action-dropdown>summary small{font-size:.76rem}
  .cscd-action-dropdown:not([open]){padding-top:12px;padding-bottom:12px}
  .cscd-action-dropdown form{max-width:100%}
  .cscd-action-dropdown .cscd-table{min-width:0}
}

/* v0.4.82: front workflow polish - payment capture first, compact cash position, smaller cash action buttons. */
#cscd-search-results{border-color:#bfdbfe;box-shadow:0 3px 14px rgba(37,99,235,.08)}
#cscd-search-results h2{font-size:1.7rem;margin-bottom:8px}
.cscd-cash-position-strip{padding:12px 14px;margin:12px 0;background:#f8fafc}
.cscd-strip-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.cscd-strip-title h2{margin:0;font-size:1.25rem}
.cscd-cash-strip-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px;margin:8px 0}
.cscd-cash-strip-grid>div{border:1px solid #e7edf5;background:#fff;border-radius:10px;padding:8px 10px;min-width:0}
.cscd-cash-strip-grid span{display:block;color:#64748b;font-size:.78rem;font-weight:800;line-height:1.15}
.cscd-cash-strip-grid strong{display:block;color:#0b2239;font-size:1rem;line-height:1.15;margin-top:3px;white-space:nowrap}
#cscd-cash-actions .cscd-section-body{margin-top:8px}
.cscd-cash-action-list{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;align-items:start}
.cscd-action-dropdown{padding:10px 12px;border-radius:12px;background:#f8fafc}
.cscd-action-dropdown[open]{grid-column:1/-1;background:#fff}
.cscd-action-dropdown>summary{font-size:.98rem;align-items:center;min-height:32px}
.cscd-action-dropdown>summary small{font-size:.74rem;margin-top:2px}
.cscd-action-dropdown-body{margin-top:10px;border-top:1px solid #eef2f7;padding-top:10px}
.cscd-secondary-section{padding:12px 14px;background:#fbfdff}
.cscd-secondary-section>summary{font-size:1.05rem;align-items:center}
.cscd-secondary-section>summary small{font-size:.76rem;margin-top:1px}
.cscd-secondary-section:not([open]){padding-top:11px;padding-bottom:11px}
@media(max-width:700px){
  #cscd-search-results h2{font-size:1.4rem}
  .cscd-strip-title{display:block}
  .cscd-strip-title .cscd-button{margin-top:8px}
  .cscd-cash-strip-grid{grid-template-columns:1fr 1fr}
  .cscd-cash-action-list{grid-template-columns:1fr}
  .cscd-action-dropdown[open]{grid-column:auto}
}
@media(max-width:420px){.cscd-cash-strip-grid{grid-template-columns:1fr}}

/* v0.4.85: public customer tracking page (read-only, outside staff Cash Desk). */
.cscd-public-track{max-width:860px;margin:0 auto}
.cscd-track-card{padding:22px}
.cscd-track-form input{width:100%;box-sizing:border-box}
.cscd-track-result{margin-top:18px;border-top:1px solid #e7edf5;padding-top:16px}
.cscd-track-status{display:inline-block;margin:4px 0 12px;padding:8px 12px;border-radius:999px;background:#ecfdf5;border:1px solid #bbf7d0;color:#14532d}
.cscd-public-track-table{min-width:0;max-width:620px;margin-bottom:14px}
.cscd-public-track-table th{width:170px;background:#f8fafc;text-align:left}
.cscd-track-shipment{margin-top:12px;background:#f8fbff;border-color:#bfdbfe;box-shadow:none}
.cscd-track-shipment h3{margin-top:0}
@media(max-width:560px){.cscd-public-track-table th{width:auto}.cscd-public-track-table th,.cscd-public-track-table td{display:block}}

/* v0.4.95: till-user tender receipt number reminders for Cash/POS receipts. */
.cscd-receipt-reminder{margin:12px 0;padding:12px 14px;border:1px solid #f97316;border-left:5px solid #f97316;background:#fff7ed;border-radius:12px;color:#7c2d12}
.cscd-receipt-reminder strong{color:#9a3412}
.cscd-receipt-reminder-list{display:grid;gap:8px;margin-top:10px}
.cscd-receipt-reminder-row{display:grid;grid-template-columns:minmax(220px,1fr) 180px auto;gap:8px;align-items:center;padding:8px 10px;background:#fff;border:1px solid #fed7aa;border-radius:10px}
.cscd-receipt-reminder-row input{width:100%;box-sizing:border-box}
.cscd-tender-receipt-label{display:block;font-weight:800;color:#0b2239;font-size:.84rem;line-height:1.2;min-width:170px}
.cscd-tender-receipt-label input{margin-top:4px;box-sizing:border-box}
@media(max-width:700px){.cscd-receipt-reminder-row{grid-template-columns:1fr}.cscd-tender-receipt-label{min-width:0}.cscd-tender-receipt-label input{width:100%!important}}


/* v0.4.96: compact Cash Desk on desktop/mobile, popup help, sticky workflow and reliable return targets. */
.cscd-compact-ui{max-width:1280px;margin-top:8px}.cscd-compact-ui>h1{font-size:1.55rem;margin:4px 0 7px;line-height:1.1}
.cscd-active-context{position:static!important;min-height:42px;padding:7px 10px;margin:5px 0 7px;display:flex!important;align-items:center;justify-content:space-between;gap:8px}.cscd-context-line,.cscd-context-actions{display:flex;align-items:center;gap:7px;min-width:0}.cscd-context-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cscd-context-actions{flex:0 0 auto}.cscd-context-actions .cscd-button{margin:0}
.cscd-jumpbar{top:0!important;margin-bottom:6px;padding-top:6px;padding-bottom:6px}.cscd-jumpbar a{padding:6px 10px;font-size:.8rem}
.cscd-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cscd-title-row h2,.cscd-title-row h3{margin:0}
.cscd-help-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:27px;height:27px;padding:0;border:1px solid #94a3b8;border-radius:999px;background:#f8fafc;color:#0b3d78;font-weight:900;font-size:.86rem;line-height:1;cursor:pointer}.cscd-help-button:hover{background:#dbeafe;border-color:#60a5fa}.cscd-help-button-inline{width:20px;height:20px;font-size:.72rem;vertical-align:middle;margin-left:3px}.cscd-summary-help-source{display:none!important}.cscd-section>summary,.cscd-action-dropdown>summary{align-items:center}.cscd-section>summary:after,.cscd-action-dropdown>summary:after{margin-left:auto}.cscd-section>summary .cscd-help-button,.cscd-action-dropdown>summary .cscd-help-button{order:2;margin-left:4px}.cscd-section>summary:after,.cscd-action-dropdown>summary:after{order:3}
.cscd-help-modal[hidden]{display:none!important}.cscd-help-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px}.cscd-help-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62)}.cscd-help-panel{position:relative;width:min(560px,100%);max-height:80vh;overflow:auto;background:#fff;border-radius:14px;padding:18px 20px;box-shadow:0 18px 55px rgba(0,0,0,.28);white-space:pre-line;color:#1e293b}.cscd-help-panel h3{margin:0 34px 10px 0;color:#0b2239}.cscd-help-close{position:absolute;right:10px;top:8px;width:32px;height:32px;border:0;border-radius:999px;background:#e2e8f0;color:#0f172a;font-size:1.35rem;cursor:pointer}.cscd-help-open{overflow:hidden}
.cscd-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#cscd-search-results{overflow:visible!important;padding:0;border-color:#bfdbfe}.cscd-search-toolbar{position:sticky;top:48px;z-index:24;background:rgba(255,255,255,.97);padding:11px 13px;border-radius:13px 13px 0 0;border-bottom:1px solid #dbeafe;box-shadow:0 4px 10px rgba(15,23,42,.04)}.cscd-search-toolbar h2{font-size:1.25rem!important;margin:0!important}.cscd-search-form{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:7px;margin-top:8px;align-items:center}.cscd-search-form input,.cscd-search-form select{width:100%;min-width:0;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:9px;padding:9px 10px;background:#fff}.cscd-search-form .cscd-button{margin:0;white-space:nowrap}.cscd-search-status{display:inline-block;margin:9px 13px 2px;padding:5px 8px;border-radius:999px;background:#eff6ff;color:#1e3a8a;font-size:.8rem}.cscd-payment-card>.cscd-bad,.cscd-payment-card>.cscd-table-scroll,.cscd-payment-card>.cscd-unified-workshop-results{margin-left:13px;margin-right:13px}.cscd-payment-card>.cscd-table-scroll,.cscd-payment-card>.cscd-unified-workshop-results{margin-bottom:13px}.cscd-return-highlight{animation:cscdReturnFlash 1.8s ease}@keyframes cscdReturnFlash{0%,35%{box-shadow:0 0 0 4px rgba(37,99,235,.28)}100%{box-shadow:none}}.cscd-lookup-table tr[id],.cscd-workshop-lookup-table tr[id]{scroll-margin-top:145px}
.cscd-payment-form{display:grid!important;grid-template-columns:repeat(4,minmax(120px,1fr));gap:7px!important;align-items:end!important;width:100%;max-width:720px;padding:9px;border:1px solid #dbeafe;border-radius:11px;background:#f8fbff;box-sizing:border-box}.cscd-payment-form label{font-size:.78rem;line-height:1.15;margin:0;min-width:0}.cscd-payment-form input,.cscd-payment-form select{width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box;padding:8px!important}.cscd-payment-form .cscd-form-wide,.cscd-payment-form .cscd-special-order-box,.cscd-payment-form .cscd-branch-online-box,.cscd-payment-form .cscd-short-writeoff-box,.cscd-payment-form .cscd-note-small{grid-column:1/-1}.cscd-payment-form>.cscd-note-small{display:none}.cscd-payment-help{align-self:center;justify-self:end}.cscd-payment-form .cscd-accept-button{grid-column:1/-1;margin:0;min-height:43px}.cscd-part-payment-check,.cscd-collected-check{font-size:.88rem!important;font-weight:800!important;padding:3px 0}.cscd-part-payment-check input,.cscd-collected-check input{width:auto!important;margin-right:5px;vertical-align:middle}.cscd-action-stack{gap:5px}.cscd-payment-audit>summary{padding:5px 7px;font-size:.82rem}
.cscd-cash-position-strip{padding:8px 11px;margin:8px 0}.cscd-cash-position-main{display:flex;align-items:center;gap:12px;justify-content:space-between}.cscd-cash-position-main>div:first-child span{display:block;color:#64748b;font-size:.72rem;font-weight:800;text-transform:uppercase}.cscd-cash-position-main>div:first-child strong{display:block;font-size:1.18rem;color:#0b2239;white-space:nowrap}.cscd-cash-position-today{display:flex;gap:12px;flex-wrap:wrap;color:#475569;font-size:.82rem;font-weight:700}.cscd-cash-position-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}.cscd-totals-section{padding:10px 12px;margin:8px 0}.cscd-totals-section>summary{font-size:.98rem}.cscd-totals-section .cscd-dashboard-grid{margin-top:8px}
.cscd-receipt-reminder{padding:8px 10px;margin:7px 0;border-left-width:4px}.cscd-receipt-reminder>summary{cursor:pointer;list-style:none;display:flex;gap:5px;align-items:center;color:#9a3412}.cscd-receipt-reminder>summary::-webkit-details-marker{display:none}.cscd-receipt-reminder>summary:after{content:'▾';margin-left:auto}.cscd-receipt-reminder[open]>summary:after{transform:rotate(180deg)}.cscd-receipt-reminder-help{font-size:.78rem;color:#9a3412;margin:7px 0 3px}.cscd-tender-receipt-label{min-width:0!important}.cscd-unified-workshop-results .cscd-title-row{margin:10px 0 6px}.cscd-unified-workshop-results h3{font-size:1.05rem}.cscd-action-dropdown .cscd-note-small{display:none}.cscd-section:not([open]){padding-top:10px;padding-bottom:10px}.cscd-secondary-section>summary{font-size:.98rem}
@media(max-width:700px){.cscd-compact-ui{margin:3px auto;padding:0 5px}.cscd-compact-ui>h1{font-size:1.2rem;margin:2px 0 5px}.cscd-active-context{font-size:.78rem;padding:6px 8px;margin:4px 0 5px}.cscd-context-line span:not(:last-child){display:none}.cscd-context-line strong{max-width:105px;overflow:hidden;text-overflow:ellipsis}.cscd-context-actions{gap:4px}.cscd-context-actions .cscd-button{padding:6px 8px;font-size:.78rem}.cscd-jumpbar{margin-left:-5px;margin-right:-5px;padding-left:5px;padding-right:5px;gap:5px}.cscd-jumpbar a{padding:6px 8px;font-size:.72rem}#cscd-search-results{margin-top:6px;border-radius:11px}.cscd-search-toolbar{top:44px;padding:8px;border-radius:10px 10px 0 0}.cscd-search-toolbar h2{font-size:1rem!important}.cscd-search-form{grid-template-columns:minmax(0,1fr) 64px;gap:5px;margin-top:6px}.cscd-search-form input,.cscd-search-form select{padding:8px 7px;font-size:.82rem;height:38px}.cscd-search-form .cscd-button{width:auto;padding:8px 7px;font-size:.78rem;height:38px}.cscd-search-status{margin:7px 8px 0;font-size:.72rem;padding:4px 7px}.cscd-payment-card>.cscd-bad,.cscd-payment-card>.cscd-table-scroll,.cscd-payment-card>.cscd-unified-workshop-results{margin-left:7px;margin-right:7px}.cscd-lookup-table,.cscd-workshop-lookup-table{min-width:0!important;font-size:.86rem!important}.cscd-lookup-table tr,.cscd-workshop-lookup-table tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:0 9px;padding:8px!important}.cscd-lookup-table td,.cscd-workshop-lookup-table td{width:auto!important;min-width:0!important}.cscd-lookup-table td:nth-child(1),.cscd-lookup-table td:nth-child(3),.cscd-lookup-table td:nth-child(7){grid-column:1/-1}.cscd-workshop-lookup-table td:nth-child(2),.cscd-workshop-lookup-table td:nth-child(3),.cscd-workshop-lookup-table td:nth-child(6){grid-column:1/-1}.cscd-table-mobile-ready td{padding:5px 0!important}.cscd-table-mobile-ready td[data-label]:before{font-size:.64rem;margin-bottom:1px}.cscd-payment-form{grid-template-columns:1fr 1fr!important;gap:6px!important;padding:7px!important;max-width:none}.cscd-payment-form label{font-size:.72rem}.cscd-payment-form input,.cscd-payment-form select{font-size:.86rem;padding:7px!important;height:37px}.cscd-payment-form .cscd-sales-credit-label,.cscd-payment-form .cscd-form-wide,.cscd-payment-form .cscd-special-order-box,.cscd-payment-form .cscd-branch-online-box,.cscd-payment-form .cscd-short-writeoff-box,.cscd-payment-form .cscd-note-small{grid-column:1/-1}.cscd-payment-form .cscd-sales-credit-label select{height:37px}.cscd-payment-help{grid-column:2;grid-row:auto;justify-self:end}.cscd-payment-form .cscd-accept-button{position:sticky;bottom:6px;z-index:12;width:100%;min-height:42px;box-shadow:0 5px 18px rgba(37,99,235,.24)}.cscd-cash-position-strip{padding:7px 8px;margin:6px 0}.cscd-cash-position-main{gap:7px}.cscd-cash-position-main>div:first-child strong{font-size:1rem}.cscd-cash-position-today{gap:5px;display:grid;grid-template-columns:1fr;font-size:.69rem;line-height:1.05}.cscd-cash-position-actions .cscd-button{width:auto;padding:6px 8px;font-size:.72rem;margin:0}.cscd-totals-section>summary{font-size:.82rem}.cscd-dashboard-grid{grid-template-columns:1fr 1fr!important}.cscd-dashboard-grid .cscd-stat{padding:7px}.cscd-dashboard-grid .cscd-stat b{font-size:1rem}.cscd-card{margin:7px 0;padding:9px}.cscd-section>summary{font-size:.98rem}.cscd-section-body{margin-top:7px}.cscd-action-dropdown{padding:8px 9px}.cscd-action-dropdown>summary{font-size:.88rem;min-height:25px}.cscd-help-panel{padding:16px;max-height:76vh}}
@media(max-width:390px){.cscd-search-form{grid-template-columns:minmax(0,1fr) 55px}.cscd-search-form .cscd-button{font-size:0}.cscd-search-form .cscd-button:after{content:'Go';font-size:.78rem}.cscd-cash-position-today span:nth-child(n+2){display:none}}


/* v0.4.97: compact invoice result actions and automatic part-payment workflow. */
.cscd-assignment-router{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:0}
.cscd-assignment-pill{display:inline-flex;align-items:center;min-height:27px;padding:4px 8px;border:1px solid #dbeafe;border-radius:999px;background:#eff6ff;color:#1e3a8a;font-size:.78rem;line-height:1.1}
.cscd-invoice-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.cscd-invoice-actions .cscd-button{padding:7px 10px}
.cscd-resend-form{align-items:center!important}
.cscd-invoice-customer-tools{width:100%;max-width:720px;border:1px solid #e2e8f0;border-radius:9px;background:#fff}
.cscd-invoice-customer-tools>summary{cursor:pointer;padding:6px 9px;font-size:.82rem;font-weight:800;color:#334155;list-style:none}
.cscd-invoice-customer-tools>summary::-webkit-details-marker{display:none}
.cscd-invoice-customer-tools>summary:after{content:'▾';float:right}
.cscd-invoice-customer-tools[open]>summary:after{transform:rotate(180deg)}
.cscd-action-dropdown-body{display:flex;gap:7px;flex-wrap:wrap;align-items:center;padding:0 8px 8px}
.cscd-action-dropdown-body>.cscd-customer-edit,.cscd-action-dropdown-body>.cscd-tracking-only-box{width:100%}
.cscd-workshop-release-form{display:grid!important;grid-template-columns:minmax(150px,1fr) auto auto;align-items:center!important;gap:6px!important;max-width:720px;padding:7px 8px}
.cscd-workshop-release-form input{width:100%!important;min-width:0!important}
.cscd-short-writeoff-panel{width:100%;max-width:720px;border:1px solid #fed7aa;border-radius:9px;background:#fff7ed}
.cscd-short-writeoff-panel>summary{cursor:pointer;padding:7px 9px;font-size:.8rem;font-weight:800;color:#9a3412;list-style:none}
.cscd-short-writeoff-panel>summary::-webkit-details-marker{display:none}
.cscd-short-writeoff-panel>summary:after{content:'▾';float:right}
.cscd-short-writeoff-panel[open]>summary:after{transform:rotate(180deg)}
.cscd-short-writeoff-form{padding:0 8px 8px;align-items:center!important}
.cscd-short-writeoff-form input{min-width:220px;flex:1}
.cscd-mini-partpay-help{align-self:end}
.cscd-payment-form .cscd-collected-check{grid-column:1/-1;display:flex;align-items:center;gap:5px}

@media(min-width:701px){
  .cscd-lookup-table{display:block;width:100%}
  .cscd-lookup-table thead{display:none}
  .cscd-lookup-table tbody{display:block}
  .cscd-lookup-table tr{display:grid;grid-template-columns:1.35fr .72fr 1.15fr .65fr .55fr .9fr;gap:0 10px;border:1px solid #dbe5f0;border-radius:12px;margin:8px 0;padding:9px;background:#fff}
  .cscd-lookup-table td{border:0!important;padding:4px 5px!important;min-width:0}
  .cscd-lookup-table td[data-label]:before{content:attr(data-label);display:block;font-size:.63rem;line-height:1;text-transform:uppercase;letter-spacing:.035em;color:#64748b;font-weight:800;margin-bottom:4px}
  .cscd-lookup-table td:nth-child(7){grid-column:1/-1;border-top:1px solid #e2e8f0!important;margin-top:5px;padding-top:8px!important}
  .cscd-lookup-table td:nth-child(7):before{display:none}
  .cscd-action-stack{display:grid;grid-template-columns:auto minmax(190px,1fr);gap:6px 8px;align-items:center;max-width:none;width:100%}
  .cscd-action-stack>.cscd-assignment-router{grid-column:1}
  .cscd-action-stack>.cscd-invoice-actions{grid-column:2;justify-self:end}
  .cscd-action-stack>.cscd-invoice-customer-tools,
  .cscd-action-stack>.cscd-workshop-release-form,
  .cscd-action-stack>.cscd-short-writeoff-panel,
  .cscd-action-stack>.cscd-payment-form,
  .cscd-action-stack>.cscd-payment-audit,
  .cscd-action-stack>.cscd-bad,
  .cscd-action-stack>.cscd-good,
  .cscd-action-stack>.cscd-note,
  .cscd-action-stack>.cscd-note-small,
  .cscd-action-stack>form:not(.cscd-resend-form){grid-column:1/-1;max-width:none}
  .cscd-payment-form{max-width:none;grid-template-columns:repeat(5,minmax(120px,1fr))}
  .cscd-payment-form .cscd-sales-credit-label{grid-column:auto}
}

@media(max-width:700px){
  .cscd-assignment-pill{font-size:.7rem;padding:3px 6px}
  .cscd-invoice-actions .cscd-button{padding:7px 9px;font-size:.78rem}
  .cscd-invoice-customer-tools{max-width:none}
  .cscd-workshop-release-form{grid-template-columns:1fr auto!important}
  .cscd-workshop-release-form input{grid-column:1/-1}
  .cscd-workshop-release-form .cscd-button{width:100%}
  .cscd-short-writeoff-form{display:grid!important;grid-template-columns:1fr auto;gap:6px!important}
  .cscd-short-writeoff-form input{grid-column:1/-1;width:100%!important;min-width:0!important}
  .cscd-short-writeoff-form .cscd-button{width:100%}
  .cscd-action-stack{align-items:stretch}
  .cscd-action-stack>.cscd-invoice-actions{justify-content:flex-start}
  .cscd-payment-form .cscd-payment-help{grid-column:2;justify-self:end}
}

/* v0.4.98: keep duplicate/additional payment as a hidden paid-invoice exception. */
.cscd-invoice-customer-tools .cscd-payment-correction-box{width:100%;box-sizing:border-box;margin:5px 0 0;padding:0;border-color:#f59e0b}
.cscd-invoice-customer-tools .cscd-payment-correction-box>summary{list-style:none;padding:8px 9px;font-size:.8rem;color:#92400e}
.cscd-invoice-customer-tools .cscd-payment-correction-box>summary::-webkit-details-marker{display:none}
.cscd-invoice-customer-tools .cscd-payment-correction-box>summary:after{content:'▾';float:right}
.cscd-invoice-customer-tools .cscd-payment-correction-box[open]>summary:after{transform:rotate(180deg)}
.cscd-invoice-customer-tools .cscd-payment-correction-box .cscd-note-small{display:block;padding:0 9px;margin:5px 0}
.cscd-invoice-customer-tools .cscd-overpay-form{width:auto;margin:7px 8px;padding:8px;grid-template-columns:minmax(120px,.7fr) minmax(135px,.7fr) minmax(240px,1.4fr) auto}
.cscd-invoice-customer-tools .cscd-overpay-form label{font-size:.72rem;font-weight:800}
.cscd-invoice-customer-tools .cscd-overpay-form input,.cscd-invoice-customer-tools .cscd-overpay-form select{width:100%;box-sizing:border-box}
.cscd-invoice-customer-tools .cscd-overpay-refund-form{display:grid;grid-template-columns:minmax(135px,.7fr) minmax(120px,.55fr) minmax(240px,1.4fr) auto;gap:6px;margin:7px 8px;padding:8px;border-top:1px solid #fed7aa}
.cscd-invoice-customer-tools .cscd-overpay-refund-form input,.cscd-invoice-customer-tools .cscd-overpay-refund-form select{width:100%;box-sizing:border-box}
@media(max-width:700px){
  .cscd-invoice-customer-tools .cscd-overpay-form{grid-template-columns:1fr 1fr!important}
  .cscd-invoice-customer-tools .cscd-overpay-form .cscd-overpay-reason,.cscd-invoice-customer-tools .cscd-overpay-form button{grid-column:1/-1;width:100%}
  .cscd-invoice-customer-tools .cscd-overpay-refund-form{grid-template-columns:1fr 1fr}
  .cscd-invoice-customer-tools .cscd-overpay-refund-form input[name="reason"],.cscd-invoice-customer-tools .cscd-overpay-refund-form button{grid-column:1/-1;width:100%}
}

/* v0.4.111: audited Superuser tender/invoice correction. */
.cscd-admin-correction{min-width:210px;max-width:290px;border:1px solid #f59e0b;border-radius:9px;background:#fff7ed;padding:5px 7px;white-space:normal}
.cscd-admin-correction>summary{cursor:pointer;font-weight:800;color:#9a3412;list-style:none}
.cscd-admin-correction>summary::-webkit-details-marker{display:none}
.cscd-admin-correction>summary:after{content:'▾';float:right}
.cscd-admin-correction[open]>summary:after{transform:rotate(180deg)}
.cscd-admin-correction .cscd-correct-form{display:grid;grid-template-columns:1fr;gap:6px;margin-top:7px;align-items:start}
.cscd-admin-correction .cscd-correct-form label{white-space:normal;font-size:.78rem;font-weight:700}
.cscd-admin-correction .cscd-correct-form input[type="checkbox"]{width:auto;max-width:none;margin-right:5px}
.cscd-admin-correction .cscd-correct-form input,.cscd-admin-correction .cscd-correct-form button{width:100%;max-width:100%;box-sizing:border-box}
.cscd-admin-transactions-table{min-width:2020px}

/* v0.4.119 digital petty-cash receipt links */
.cscd-receipt-link{display:inline-block;font-weight:800;text-decoration:none;margin:2px 4px 2px 0}.cscd-receipt-original{font-weight:600;color:#5b6470}

/* v0.4.143: backend petty receipt VAT correction, anchored saves and bulk Wave assignment. */
#cscd-petty-purchases,.cscd-petty-report tr[id^="cscd-petty-row-"]{scroll-margin-top:18px}
.cscd-petty-report tr:target td{background:#fff7ed}
.cscd-petty-bulk-form{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:12px 0;padding:10px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc}
.cscd-petty-bulk-form label{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.cscd-petty-bulk-form select{min-width:220px}
.cscd-petty-report .cscd-check-box input[type="checkbox"]{width:18px;height:18px}
.cscd-petty-edit{min-width:210px;margin-top:7px;border:1px solid #f59e0b;border-radius:9px;background:#fff7ed;padding:5px 7px;white-space:normal}
.cscd-petty-edit>summary{cursor:pointer;font-weight:800;color:#9a3412;list-style:none}
.cscd-petty-edit>summary::-webkit-details-marker{display:none}
.cscd-petty-edit>summary:after{content:'▾';float:right}
.cscd-petty-edit[open]>summary:after{transform:rotate(180deg)}
.cscd-petty-edit-form{display:grid;grid-template-columns:1fr;gap:7px;margin-top:8px;min-width:280px}
.cscd-petty-edit-form label{display:grid;gap:3px;font-size:.78rem;font-weight:800}
.cscd-petty-edit-form input,.cscd-petty-edit-form select,.cscd-petty-edit-form textarea{width:100%;max-width:none!important;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:8px;padding:7px;font:inherit}
.cscd-petty-edit-form textarea{resize:vertical;min-height:88px}
.cscd-petty-edit-form small{white-space:normal;color:#64748b}
@media(max-width:700px){
  .cscd-petty-bulk-form{display:grid;grid-template-columns:1fr}
  .cscd-petty-bulk-form label{display:grid;grid-template-columns:1fr}
  .cscd-petty-bulk-form select,.cscd-petty-bulk-form .cscd-button{width:100%;min-width:0}
  .cscd-petty-edit-form{min-width:240px}
}

/* v0.4.150: audited petty-cash receipt recapture on an existing cash-out row. */
.cscd-petty-receipt-recap{min-width:210px;margin-top:7px;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc;padding:5px 7px;white-space:normal}
.cscd-petty-receipt-recap>summary{cursor:pointer;font-weight:800;color:#0b2239;list-style:none}
.cscd-petty-receipt-recap>summary::-webkit-details-marker{display:none}
.cscd-petty-receipt-recap>summary:after{content:'▾';float:right}
.cscd-petty-receipt-recap[open]>summary:after{transform:rotate(180deg)}
.cscd-petty-receipt-recap-form{display:grid;grid-template-columns:1fr;gap:7px;margin-top:8px;min-width:280px}
.cscd-petty-receipt-recap-form label{display:grid;gap:4px;font-size:.78rem;font-weight:800;white-space:normal}
.cscd-petty-receipt-recap-form input[type="file"],.cscd-petty-receipt-recap-form input[type="text"]{width:100%;max-width:none!important;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:8px;padding:7px;font:inherit}
.cscd-petty-receipt-recap-form .cscd-camera-input{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
.cscd-petty-receipt-recap-form small{white-space:normal;color:#64748b}
@media(max-width:700px){.cscd-petty-receipt-recap-form{min-width:240px}}
/* v0.4.158 cash-tin transaction audit */
#cscd-till-balances,#cscd-till-audit,.cscd-admin-transactions-table tr[id]{scroll-margin-top:80px}
.cscd-till-audit-table .cscd-audit-void td{opacity:.72;background:#f8fafc}
.cscd-admin-transactions-table tr[id]:target td{background:#fff7ed}

/* v0.4.163: temporary, audited mixed-branch acknowledgement for genuine cross-branch Workshop/retail invoices. */
.cscd-mixed-branch-ack{max-width:620px}.cscd-mixed-branch-ack-form{display:flex;flex-direction:column;gap:9px;margin-top:10px}.cscd-mixed-branch-check{display:flex!important;align-items:flex-start;gap:8px;font-weight:800!important;line-height:1.35}.cscd-mixed-branch-check input{width:auto!important;min-width:0!important;margin-top:3px}.cscd-mixed-branch-ack-form .cscd-button{align-self:flex-start}.cscd-mixed-branch-ack-form .cscd-note-small{margin:0;color:#7f1d1d}.cscd-mixed-branch-ok{max-width:620px}

/* v0.4.167: one-action settlement for customers with several matched workshop/retail invoices. */
.cscd-account-hold-pay-all{margin:10px 0;padding:10px 12px;border:1px solid #b7c9ea;border-radius:12px;background:#f4f8ff;color:#0f2b55}
.cscd-account-hold-pay-all>strong{display:block;margin-bottom:2px;font-size:.98rem}
.cscd-account-hold-pay-all-form{margin-top:8px;align-items:end;gap:8px;flex-wrap:wrap}
.cscd-account-hold-pay-all-form .cscd-button{white-space:nowrap}
.cscd-account-hold-pay-all-form .cscd-mini-amount-label{font-weight:800;font-size:.84rem;line-height:1.2}
.cscd-account-hold-pay-all-form .cscd-mini-amount-label input{margin-top:4px;font-weight:800;background:#fff}
@media(max-width:700px){.cscd-account-hold-pay-all-form .cscd-button{width:100%}}
