/* Persisted sale, stock receipt and customer collection workspaces. */
.storage-warning { padding:14px 18px; border:1px solid #e7af87; border-radius:10px; color:#8d4624; background:#fff3e8; }
.storage-warning[hidden] { display:none; }
.workflow-note,.workflow-notice { color:#826f9a; font-size:12px; line-height:1.7; }
.workflow-notice { margin:0 0 20px; padding:13px 16px; border:1px solid #e4daef; border-radius:10px; background:#f8f4fc; }
.workflow-panel { margin-bottom:22px; padding:22px; min-width:0; }
.workflow-table { width:100%; border-collapse:collapse; text-align:left; font-size:12px; }
.workflow-table th { padding:12px 10px; border-bottom:1px solid var(--line); color:#a294af; font-size:10px; text-transform:uppercase; font-weight:600; white-space:nowrap; }
.workflow-table td { padding:14px 10px; border-bottom:1px solid var(--line); color:var(--ink); vertical-align:middle; }
.workflow-table td .status-pill { white-space:nowrap; }
.cell-subtext { display:block; margin-top:4px; color:#a094aa; font-size:10px; }
.workflow-filters { display:flex; gap:12px; margin:18px 0; }
.workflow-filters > label { flex:1; }
.workflow-filters select { padding:0 10px; min-height:38px; border:1px solid #e4daef; border-radius:9px; color:#746282; background:var(--white); }
.mini-action { padding:7px 9px; min-height:31px; font-size:10px; white-space:nowrap; }
.table-link { padding:0; border:0; color:#8159bd; background:none; font-weight:700; }
.row-actions { display:flex; flex-wrap:wrap; gap:8px; }
.line-rate { width:90px; max-width:100%; height:34px; padding:0 6px; border:1px solid #e6deed; border-radius:6px; background:var(--white); color:var(--ink); font-size:12px; }
.pending-at-checkout { display:flex; justify-content:space-between; padding:10px 0; color:#9c6c42; font-size:12px; }
.workflow-form { padding:24px; }
.app-modal.workflow-modal { width:min(860px,calc(100vw - 24px)); }
.app-modal.invoice-detail-modal { width:min(920px,calc(100vw - 20px)); }
.workflow-form label { min-width:0; }
.workflow-form select,.workflow-form input { width:100%; min-width:0; }
.workflow-form select { display:block; min-height:40px; margin-top:5px; border:1px solid #e4daef; border-radius:8px; padding:0 9px; background:var(--white); color:var(--ink); }
.stock-entry-row { display:grid; grid-template-columns:2fr .7fr .9fr 30px; align-items:end; gap:10px; padding:13px 0; border-bottom:1px solid var(--line); }
.stock-entry-row label { color:#8d7c9e; font-size:11px; }
.stock-entry-row input { display:block; min-height:40px; margin-top:5px; border:1px solid #e4daef; border-radius:8px; padding:0 9px; background:var(--white); color:var(--ink); }
.bill-actions { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 10px; }
.bill-actions button[hidden] { display:none; }
.bill-sheet { padding:30px; margin-top:16px; background:#fff; color:#283145; border:1px solid #e8e2ee; border-radius:10px; }
.bill-head { display:flex; justify-content:space-between; gap:18px; padding-bottom:18px; border-bottom:2px solid #8b65c6; }
.bill-head h2 { margin:0; font-size:26px; }
.bill-head > div:last-child { text-align:right; }
.bill-head p { margin:4px 0; font-size:11px; }
.bill-customer { display:grid; gap:4px; margin:22px 0; }
.bill-customer strong,.bill-head strong,.bill-table td:first-child { overflow-wrap:anywhere; }
.bill-customer span,.bill-customer small { color:#8c8197; font-size:11px; }
.bill-table { width:100%; border-collapse:collapse; font-size:12px; }
.bill-table th { padding:10px 7px; text-align:right; background:#f5f1fa; color:#8c769f; font-size:10px; }
.bill-table th:first-child,.bill-table td:first-child { text-align:left; width:44%; }
.bill-table td { padding:12px 7px; border-bottom:1px solid #ece7f1; text-align:right; }
.bill-table td strong,.bill-table td small { display:block; }
.bill-table td small { margin-top:3px; color:#9a8ca6; font-size:10px; }
.bill-totals { width:min(320px,100%); margin:18px 0 24px auto; }
.bill-totals p { display:flex; justify-content:space-between; gap:15px; margin:9px 0; font-size:12px; }
.bill-grand { padding:12px 0; border-top:1px solid #ece7f1; border-bottom:1px solid #ece7f1; font-size:16px !important; }
.bill-note { padding:12px; background:#faf8fc; font-size:12px; overflow-wrap:anywhere; white-space:pre-wrap; }
.bill-receipts { padding-left:18px; color:#83758f; font-size:11px; line-height:1.8; overflow-wrap:anywhere; }
.bill-thanks { text-align:center; margin-top:30px; font-size:13px; font-weight:700; }
.bill-disclaimer { color:#a093ac; text-align:center; font-size:10px; }
.saved-activity { display:flex; width:100%; border:0; background:none; text-align:left; }
.saved-activity:hover { background:#f8f4fc; }
#paymentsView .payment-overview { display:none; }
#billPrintArea { display:none; }
.dark .workflow-notice { background:#30283e; border-color:#4d3c62; color:#beabc9; }
.dark .workflow-form select,.dark .workflow-form input { background:#30283e; border-color:#4d3c62; color:#e6d9ef; }
@media (max-width:640px) {
  .workflow-panel { padding:14px; }
  .workflow-form { padding:17px; }
  .workflow-filters { flex-direction:column; }
  .stock-entry-row { grid-template-columns:1fr 1fr 28px; gap:8px; }
  .stock-entry-row label:first-child { grid-column:1/-1; }
  .bill-sheet { padding:14px; }
  .bill-head { flex-direction:column; }
  .bill-head > div:last-child { text-align:left; }
  .bill-table { font-size:10px; }
  .bill-table td,.bill-table th { padding:9px 3px; }
  .bill-actions > button { flex:1 1 42%; padding:9px 5px; font-size:11px; }
  .page-heading-actions { flex-wrap:wrap; }
  #salesView .page-heading-actions button { flex:1 1 42%; }
}
@media print {
  body.print-invoice > :not(#billPrintArea) { display:none !important; }
  body.print-invoice #billPrintArea { display:block !important; width:100%; }
  body.print-invoice #barcodePrintArea { display:none !important; }
  body.print-invoice .bill-sheet { padding:0; margin:0; border:0; border-radius:0; }
  body.print-invoice .bill-table { font-size:10pt; }
  body.print-invoice .bill-table tr { break-inside:avoid; }
  body.print-invoice .bill-table thead { display:table-header-group; }
  body.print-invoice .bill-totals { break-inside:avoid; }
}
