/* ==========================================================================
   Malvern POS: October 2026 management & modal redesign
   Loaded last. Dense, touch-sized records (44px rows, whole-row targets),
   one-line toolbars, and one-screen modals: no paging or steps inside a
   modal. Only presentation lives here; IDs and behaviour are unchanged.
   ========================================================================== */
:root {
  --rd-row: 44px;
  --rd-field: 52px;
  --rd-radius: 12px;
  --rd-line: #EDE3D8;
  --rd-plum: #47262D;
  --rd-plum-soft: #F1E5E7;
  --rd-butter: #F9D96B;
}

/* ---- Visually hidden helpers ------------------------------------------- */
.rd-hidden-select, .rd-hide { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0; pointer-events: none; }
.rd-ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Page shell: the top bar already names the page, so pages start with their tools */
.rd-page.page-view { padding: 12px 16px 10px; }
.rd-page > .page-heading { flex-wrap: nowrap; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 10px; }
.rd-page > .page-heading .rd-title-block, .workflow-view.rd-page > .page-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rd-page > .page-heading > .view-segments { margin: 0; }
.rd-page > .page-heading > .inline-actions, .rd-page > .page-heading > .rd-tools { display: flex; flex-wrap: nowrap; gap: 6px; margin-left: auto; }
.rd-page > .page-heading .button { min-height: 44px; padding: 0 14px; white-space: nowrap; }
.rd-page > .page-heading > .button.primary { margin-left: 0; }
.rd-page > .page-heading > .rd-tools + .button.primary { margin-left: 4px; }
.rd-page > .page-heading > .rd-summary { margin-left: auto; }
.rd-page .view-segments button { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.rd-page .view-segments svg { width: 16px; height: 16px; }
@media (max-width: 1180px) {
  .rd-tools .button .ui-icon, .rd-page > .page-heading > .inline-actions .button .ui-icon { display: none; }
  .rd-tools .button { padding: 0 10px; font-size: 13px; }
}

/* Summary figures in the heading row */
.rd-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rd-summary > span { display: inline-flex; align-items: baseline; gap: 5px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--rd-line); border-radius: 999px; color: var(--color-text-muted); background: #fff; font-size: 12.5px; white-space: nowrap; }
.rd-summary > span strong { color: var(--color-text); font-size: 14px; font-variant-numeric: tabular-nums; }
.rd-summary > span.bad strong { color: var(--color-danger); }

/* ---- One-line toolbar ----------------------------------------------------- */
.rd-page > .rd-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid var(--rd-line); }
.rd-toolbar .search-box { position: relative; display: block; flex: 1 1 220px; min-width: 160px; }
.rd-toolbar .search-box .search-icon { position: absolute; top: 50%; left: 12px; display: flex; color: var(--color-text-muted); transform: translateY(-50%); pointer-events: none; }
.rd-toolbar .search-box .search-icon .ui-icon, .rd-toolbar .search-box .search-icon svg { width: 18px; height: 18px; }
.rd-toolbar .search-box input { min-height: 44px; padding-left: 38px; border-radius: 12px; font-size: 14px; }
.rd-select select { width: auto; max-width: 190px; min-height: 44px; padding: 0 30px 0 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.rd-filter-chips { display: flex; gap: 6px; }
.rd-chip-toggle.toggle { position: relative; min-height: 44px; padding: 0 12px; border: 1px solid var(--color-control-border); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.rd-chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.rd-chip-toggle:has(input:checked) { color: #FAF4E8; border-color: var(--rd-plum); background: var(--rd-plum); }
.rd-chip-toggle:has(input:focus-visible) { outline: 3px solid var(--rd-plum); outline-offset: 2px; }
.rd-count { flex: 0 0 auto; color: var(--color-text-muted); font-size: 12.5px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) { .rd-filter-chips .rd-chip-toggle { padding: 0 10px; font-size: 12.5px; } .rd-count { display: none; } }

/* Segmented choice (filters, modes) */
.rd-seg { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--rd-line); border-radius: 13px; background: var(--color-surface-subtle); }
.rd-seg button, .rd-seg .button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--color-text-muted); background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: none; }
.rd-seg button[aria-pressed="true"], .rd-seg .button[aria-pressed="true"] { color: #FAF4E8; background: var(--rd-plum); }
.rd-seg-wide { display: flex; }
.rd-seg-wide > * { flex: 1 1 0; }

/* ---- Dense record tables ------------------------------------------------ */
.rd-page .table-panel, .rd-page .fit-fill > .data-table, .rd-page .table-card { border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; }
.rd-page .table-panel.panel { padding: 0; overflow: hidden; }
.rd-page .data-table { overflow: hidden; }
.rd-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.rd-table thead th { position: sticky; top: 0; z-index: 1; height: 32px; padding: 0 10px; border-bottom: 1px solid var(--rd-line); color: #7A6D70; background: #F8F3EC; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.rd-table td { height: var(--rd-row); padding: 4px 10px; border-bottom: 1px solid #F2EBE3; vertical-align: middle; overflow: hidden; }
.rd-table tbody tr:last-child td { border-bottom: 0; }
.rd-table td small { display: block; margin-top: 1px; overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.rd-table td strong { font-weight: 650; }
.rd-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.rd-table .numeric strong { font-size: 14px; }
.rd-table .row-end { text-align: right; white-space: nowrap; }
.rd-table .row-actions, .rd-table .sale-actions { display: inline-flex; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; }
.rd-row { cursor: pointer; transition: background-color 120ms; }
.rd-row:hover td { background: #FCF8F2; }
.rd-row:active td { background: var(--rd-plum-soft); }
.rd-row.inactive td { color: var(--color-text-muted); }
.rd-row.inactive td strong { font-weight: 550; }
.rd-name-cell { white-space: nowrap; }
.rd-name-cell > strong, .rd-name-cell > .rd-ellipsis { display: inline-block; max-width: calc(100% - 64px); overflow: hidden; vertical-align: bottom; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.rd-name-cell > .rd-ellipsis { max-width: 100%; }
.rd-muted-cell { overflow: hidden; color: var(--color-text-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-receipt { white-space: nowrap; }
.rd-mini.mini-button { min-height: 36px; min-width: 0; padding: 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 650; }
.rd-mini.mini-button .ui-icon { width: 15px; height: 15px; }
.rd-mini.rd-refund:not(:disabled) { color: var(--color-danger); border-color: #E7C2C7; }
.rd-promo, .rd-tag { display: inline-flex; align-items: center; height: 18px; margin-left: 6px; padding: 0 6px; border-radius: 999px; color: var(--rd-plum); background: var(--rd-butter); font-size: 10.5px; font-weight: 800; vertical-align: 2px; }
.rd-tag { color: var(--color-text-muted); background: var(--color-surface-subtle); }
.rd-tag.warn { color: var(--color-warning); background: var(--color-warning-bg); }
.rd-id { color: var(--rd-plum); font-weight: 650; }
.rd-stock { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 44px; height: 26px; padding: 0 9px; border-radius: 999px; color: var(--color-text); background: var(--color-surface-subtle); font-size: 13px; font-weight: 750; }
.rd-stock.low { color: #8A4B00; background: #FFF0C7; }
.rd-stock.uncounted { color: var(--color-text-muted); background: transparent; font-size: 11.5px; font-weight: 650; }
.rd-table .status-chip { min-height: 24px; padding: 2px 9px; white-space: nowrap; }

/* Column widths */
.product-record-table th:nth-child(1) { width: auto; }
.product-record-table th:nth-child(2) { width: 15%; }
.product-record-table th:nth-child(3) { width: 82px; }
.product-record-table th:nth-child(4) { width: 82px; }
.product-record-table th:nth-child(5) { width: 15%; }
.product-record-table th:nth-child(6) { width: 140px; }
.rd-sales-table th:nth-child(1) { width: 128px; }
.rd-sales-table th:nth-child(3) { width: 110px; }
.rd-sales-table th:nth-child(4) { width: 104px; }
.rd-sales-table th:nth-child(5) { width: 214px; }
@media (max-width: 1100px) {
  .product-record-table th:nth-child(5), .product-record-table td:nth-child(5) { display: none; }
  .product-record-table th:nth-child(2) { width: 22%; }
}

/* Compact pager with jump strip */
.rd-page .fit-pager { min-height: 0; gap: 8px; padding: 8px 0 0; }
.rd-page .fit-pager .fp-btn { width: 64px; height: 44px; border-radius: 12px; }
.rd-page .fit-pager .fp-btn svg { width: 22px; height: 22px; }
.rd-page .fit-pager .fp-status { flex: 0 0 auto; min-width: 92px; gap: 3px; }
.rd-page .fit-pager .fp-dots { display: none; }
.rd-jump { display: flex; flex: 1 1 auto; justify-content: center; gap: 3px; min-width: 0; }
.rd-jump[hidden] { display: none; }
.rd-jump button { flex: 1 1 0; max-width: 54px; min-width: 0; height: 44px; padding: 0; border: 1px solid var(--rd-line); border-radius: 10px; color: var(--rd-plum); background: #fff; font-size: 12.5px; font-weight: 750; }
.rd-jump button:active:not(:disabled) { background: var(--rd-butter); }
.rd-jump button:disabled { opacity: .3; }
.rd-jump + .fp-status { flex-direction: row; }

/* ---- Products ------------------------------------------------------------ */
#productsView.rd-page > .page-heading .view-segments { flex: 0 0 auto; }
@media (max-width: 1100px) { #productsView .rd-toolbar .search-box { min-width: 140px; } }

/* ---- Checkout: plum line behind each product card ---------------------------- */
#productList .product-tile { box-shadow: 0 3px 0 var(--rd-plum), 0 1px 2px rgba(30, 26, 28, .04); }
#productList .product-tile:hover { box-shadow: 0 3px 0 var(--rd-plum), 0 6px 18px rgba(30, 26, 28, .07); }
#productList .product-tile:active { box-shadow: 0 1px 0 var(--rd-plum); }
#productList.product-grid { padding-bottom: 5px; }

/* ---- Suppliers ------------------------------------------------------------- */
#suppliersView .stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 8px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; }
#suppliersView .stat-strip .stat { display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 14px; border-right: 1px solid var(--rd-line); }
#suppliersView .stat-strip .stat:last-child { border-right: 0; }
#suppliersView .stat-strip .stat span { color: var(--color-text-muted); font-size: 11.5px; }
#suppliersView .stat-strip .stat strong { font-size: 16px; }
#suppliersView .table-card.panel { padding: 0; overflow: hidden; }
#suppliersView .supplier-table { table-layout: auto; font-size: 13px; }
#suppliersView .supplier-table th { height: 32px; padding: 0 12px; background: #F8F3EC; font-size: 11px; }
#suppliersView .supplier-table td { height: 52px; padding: 5px 12px; }
#suppliersView .supplier-table td small { margin-top: 1px; font-size: 11.5px; }
#suppliersView .supplier-table .avatar { width: 34px; height: 34px; font-size: 12px; }
#suppliersView .supplier-table .mini-button { min-height: 36px; padding: 0 12px; }
#suppliersView .supplier-table tr { cursor: pointer; }
#suppliersView .supplier-table tbody tr:hover td { background: #FCF8F2; }
#suppliersView [data-segment="deliveries"].panel { padding: 0; overflow: hidden; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; }
#suppliersView [data-segment="deliveries"] > .panel-heading { display: none; }
#deliveryHistory { padding: 0; }
.delivery-table th:nth-child(1) { width: 140px; }
.delivery-table th:nth-child(2) { width: 24%; }
.delivery-table th:nth-child(4) { width: 70px; }
.delivery-table th:nth-child(5) { width: 96px; }
.rd-lines summary { display: flex; align-items: center; gap: 8px; min-height: 36px; list-style: none; cursor: pointer; }
.rd-lines summary::-webkit-details-marker { display: none; }
.rd-lines summary .rd-ellipsis { flex: 1 1 auto; min-width: 0; color: var(--color-text); }
.rd-lines-count { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; color: var(--rd-plum); background: var(--rd-plum-soft); font-size: 11.5px; font-weight: 750; }
.rd-lines summary .rd-lines-count::after { content: " ▾"; }
.rd-lines[open] summary .rd-lines-count::after { content: " ▴"; }
.rd-lines ul { margin: 4px 0 6px; padding: 0; list-style: none; }
.rd-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-top: 1px dashed var(--rd-line); font-size: 12.5px; }
.rd-lines li span:last-child { color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-table td:has(.rd-lines[open]) { height: auto; }

/* ---- Categories & age rules ---------------------------------------------- */
#categoriesView .two-panel-grid { gap: 12px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
#categoriesView .two-panel-grid > .panel { padding: 12px 14px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; }
#categoriesView .panel-heading { margin-bottom: 8px; }
#categoriesView .panel-heading h2 { font-size: 16px; }
#categoriesView .panel-heading .help { display: none; }
#categoriesView .card-icon { width: 34px; height: 34px; }
#categoryList { display: flex; flex-direction: column; gap: 6px; }
#categoryList .category-group { padding: 0; border: 1px solid var(--rd-line); border-radius: 12px; background: #fff; box-shadow: none; }
#categoryList .category-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 10px; }
#categoryList .category-swatch { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
#categoryList .category-main { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; }
#categoryList .category-main strong { flex: 0 1 auto; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
#categoryList .pill-row { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0; overflow: hidden; }
#categoryList .pill { min-height: 22px; padding: 2px 8px; font-size: 11px; white-space: nowrap; }
#categoryList .pill-muted { display: none; }
#categoryList .mini-button { min-height: 36px; padding: 0 12px; }
#categoryList .subcategory-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 8px 52px; }
#categoryList .subcategory-chip { min-height: 32px; padding: 0 10px; font-size: 12px; }
#ageRuleList { display: flex; flex-direction: column; gap: 6px; }
#ageRuleList .age-rule-card { display: flex; align-items: center; gap: 10px; min-height: 0; padding: 8px 10px; border: 1px solid var(--rd-line); border-radius: 12px; box-shadow: none; }
#ageRuleList .age-badge { width: 52px; height: 52px; border-radius: 12px; }
#ageRuleList .age-badge b { font-size: 18px; }
#ageRuleList .age-rule-body { flex: 1 1 auto; min-width: 0; }
#ageRuleList .age-rule-body p { margin: 1px 0 0; font-size: 12px; }
#ageRuleList .age-rule-meta:nth-of-type(2) { display: none; }
#ageRuleList .mini-button { min-height: 36px; padding: 0 12px; }

/* ---- Staff ------------------------------------------------------------------ */
#staffView .staff-layout { gap: 12px; }
#staffView .staff-layout > .panel { padding: 12px 14px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; }
#staffView .panel-heading { margin-bottom: 8px; }
#staffView .panel-heading h2 { font-size: 16px; }
#staffView .panel-heading .help { font-size: 12px; }
#staffList { display: flex; flex-direction: column; gap: 6px; }
.rd-staff-row.entity-card { display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0; padding: 6px 8px 6px 10px; border: 1px solid var(--rd-line); border-radius: 12px; background: #fff; box-shadow: none; cursor: pointer; }
.rd-staff-row:active { background: var(--rd-plum-soft); }
.rd-staff-row.inactive { opacity: .65; }
.rd-staff-row .avatar { flex: 0 0 auto; width: 34px; height: 34px; font-size: 12px; }
.rd-staff-main { flex: 1 1 auto; min-width: 0; }
.rd-staff-main h3 { margin: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rd-staff-main p { display: flex; gap: 4px; margin: 2px 0 0; }
.rd-staff-row .card-actions { margin: 0; }
.rd-role { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; color: var(--color-text-muted); background: var(--color-surface-subtle); font-size: 11px; font-weight: 750; }
.rd-role.manager { color: #FAF4E8; background: var(--rd-plum); }
.rd-role.supervisor { color: var(--rd-plum); background: var(--rd-butter); }
#permissionMatrix .workspace-table th, #permissionMatrix .workspace-table td { height: 40px; padding: 4px 10px; font-size: 12px; }
#permissionMatrix tbody th { letter-spacing: 0; text-transform: none; font-size: 12.5px; font-weight: 600; color: var(--color-text); }

/* ---- Master–detail (credit, customers, services, rounds) --------------------- */
.rd-master-detail, .workflow-view.rd-page .workflow-split-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-height: 0; }
.rd-master-detail > .panel, .workflow-view.rd-page .workflow-split-layout > .panel { display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; box-shadow: none; }
.rd-master-detail .panel-heading, .rd-list-head { flex: 0 0 auto; align-items: center; margin-bottom: 8px; }
.rd-master-detail .panel-heading h2, .rd-list-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.rd-list-head .count-badge, .rd-master-detail .count-badge { padding: 3px 9px; border-radius: 999px; color: var(--color-text-muted); background: var(--color-surface-subtle); font-size: 12px; font-weight: 700; }
.rd-list-head .button { min-height: 40px; padding: 0 12px; }
.rd-list-tools { display: flex; flex: 0 0 auto; gap: 8px; margin-bottom: 8px; }
.rd-list-tools .search-box { flex: 1 1 auto; min-width: 0; }
.rd-list-tools .search-box-input { width: 100%; min-height: 44px; }
.workflow-view.rd-page .workflow-card-list, .rd-master-detail .compact-list { flex: 1 1 auto; min-height: 0; gap: 6px; }
.rd-balance { display: flex; flex-direction: column; align-items: flex-end; }
.rd-balance span { color: var(--color-text-muted); font-size: 11.5px; font-weight: 650; }
.rd-balance strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rd-balance strong.bad, .rd-owed.bad { color: var(--color-danger); }
.rd-owed { font-variant-numeric: tabular-nums; }
.rd-owed.good { color: var(--color-success); }

/* Customer credit */
#creditView .credit-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
#creditView .credit-panel > .search-box { position: relative; display: block; flex: 0 0 auto; margin-bottom: 8px; }
#creditView .credit-panel > .search-box .search-icon { position: absolute; top: 50%; left: 12px; display: flex; color: var(--color-text-muted); transform: translateY(-50%); }
#creditView .credit-panel > .search-box svg { width: 18px; height: 18px; }
#creditView .credit-panel > .search-box input { min-height: 44px; padding-left: 38px; }
.credit-customer-list { display: flex; flex-direction: column; gap: 6px; }
.rd-account-row.credit-customer-card { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; margin: 0; padding: 6px 12px; border: 1px solid var(--rd-line); border-radius: 12px; color: var(--color-text); background: #fff; text-align: left; box-shadow: none; }
.rd-account-row[aria-pressed="true"] { border-color: var(--rd-plum); background: var(--rd-plum-soft); box-shadow: inset 4px 0 0 var(--rd-plum); }
.rd-account-row.has-debt .rd-owed { color: var(--color-text); }
.rd-account-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.rd-account-main strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rd-account-main small { overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-account-side { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 2px; }
.rd-account-side strong { font-size: 15px; }
.rd-account-side .status-chip { min-height: 20px; padding: 1px 8px; font-size: 10.5px; }
.rd-account-head { align-items: flex-start !important; }
.rd-account-head .help { margin: 2px 0 0; font-size: 12px; }
.rd-limit { flex: 0 0 auto; margin: 0 0 8px; color: var(--color-text-muted); font-size: 12px; }
.rd-limit:empty { display: none; }
.rd-limit-track { height: 8px; margin-bottom: 4px; overflow: hidden; border-radius: 999px; background: var(--color-surface-subtle); }
.rd-limit-track i { display: block; height: 100%; border-radius: inherit; background: var(--color-success); }
.rd-limit-track i.warn { background: #D99A00; }
.rd-limit-track i.bad { background: var(--color-danger); }
#creditView .credit-mode-tabs { margin-bottom: 8px; }
#creditView .credit-mode-tabs .button { min-height: 40px; }
#creditInvoiceList { display: flex; flex-direction: column; gap: 6px; }
.rd-invoice.credit-invoice-item { margin: 0; padding: 6px 10px; border: 1px solid var(--rd-line); border-radius: 12px; background: #fff; }
.rd-invoice.overdue { border-color: #EBC4C9; background: #FFF9FA; }
.rd-invoice .credit-invoice-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.rd-invoice .credit-invoice-num { font-weight: 750; }
.rd-invoice-date { color: var(--color-text-muted); font-size: 12px; }
.rd-invoice .credit-invoice-amount { margin-left: auto; font-size: 15px; font-variant-numeric: tabular-nums; }
.rd-invoice .status-chip { min-height: 22px; padding: 2px 8px; font-size: 10.5px; white-space: nowrap; }
.rd-invoice .credit-invoice-lines { margin-top: 2px; overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-invoice .credit-actions-menu { position: relative; flex: 0 0 auto; width: auto; }
.rd-invoice .credit-actions-menu summary { width: auto; list-style: none; }
.rd-invoice .credit-actions-menu summary::-webkit-details-marker { display: none; }
.rd-invoice .credit-actions-popover { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; display: grid; gap: 10px; width: 320px; padding: 12px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; box-shadow: 0 18px 40px rgba(30, 26, 28, .18); }
.rd-invoice .credit-actions-popover form { display: grid; gap: 6px; }
.rd-invoice .credit-actions-popover .button { min-height: 44px; }
.rd-pay-panel { display: flex; flex-direction: column; gap: 10px; }
.rd-pay-panel[hidden] { display: none; }
.rd-pay-panel .rd-amount input { font-size: 22px; font-weight: 750; }
.rd-big.button { min-height: 56px; font-size: 16px; }

/* Customers */
.rd-customers.workflow-split-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) !important; }
.rd-customer-list { display: flex; flex-direction: column; }
.rd-customer-row.entity-card { display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0; padding: 6px 12px 6px 8px; border: 1px solid var(--rd-line); border-radius: 12px; background: #fff; box-shadow: none; cursor: pointer; }
.rd-customer-row[aria-current="true"] { border-color: var(--rd-plum); background: var(--rd-plum-soft); box-shadow: inset 4px 0 0 var(--rd-plum); }
.rd-customer-row.inactive { opacity: .65; }
.rd-customer-row .avatar { flex: 0 0 auto; width: 36px; height: 36px; font-size: 12px; }
.rd-customer-main { flex: 1 1 auto; min-width: 0; }
.rd-customer-main h3 { margin: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rd-customer-main p { margin: 1px 0 0; overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-customer-side { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.rd-customer-side .status-chip { min-height: 22px; padding: 2px 8px; font-size: 10.5px; }
.rd-detail-panel { gap: 10px; }
.rd-customer-card { padding: 10px 12px; border-radius: 12px; background: #FBF6EF; }
.rd-customer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rd-customer-top h2 { margin: 0; font-size: 17px; }
.rd-customer-top .help { margin: 1px 0 0; font-size: 12px; }
.rd-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 8px; color: var(--color-text-muted); font-size: 12px; }
.rd-facts strong { color: var(--color-text); }
.rd-actions.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rd-actions .button { min-height: 40px; padding: 0 11px; font-size: 13px; }

/* Workflow forms on redesigned workspaces */
.workflow-view.rd-page .workflow-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin: 0; padding: 0; border: 0; box-shadow: none; }
.workflow-view.rd-page .workflow-form h2 { margin: 0; font-size: 16px; }
.workflow-view.rd-page .workflow-form .field { margin: 0; }
.workflow-view.rd-page .workflow-form .field > span { margin-bottom: 4px; font-size: 12px; }
.workflow-view.rd-page .workflow-form input:not([type="checkbox"]), .workflow-view.rd-page .workflow-form select { min-height: 44px; padding: 8px 10px; }
.workflow-view.rd-page .workflow-form .rd-span, .workflow-view.rd-page .workflow-form .rd-switch { grid-column: 1 / -1; }
.workflow-view.rd-page .workflow-form .help { margin: 0; font-size: 12px; }
.workflow-view.rd-page .workflow-form .workflow-actions .button { min-height: 48px; }
.workflow-view.rd-page .workflow-form .workflow-actions .button.primary { flex: 1 1 auto; }

/* Services */
.rd-services.workflow-split-layout { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr) !important; }
.rd-services [data-service-list] { flex: 1 1 auto; min-height: 0; border: 1px solid var(--rd-line); border-radius: 12px; }
.rd-services .rd-table th:nth-child(3) { width: 82px; }
.rd-services .rd-table th:nth-child(4) { width: 96px; }
.rd-services .rd-table th:nth-child(5) { width: 96px; }
.rd-reverse { position: relative; display: inline-block; }
.rd-reverse summary { list-style: none; }
.rd-reverse summary::-webkit-details-marker { display: none; }
.rd-reverse .rd-pop { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; width: 320px; padding: 12px; border: 1px solid var(--rd-line); border-radius: 14px; background: #fff; text-align: left; white-space: normal; box-shadow: 0 18px 40px rgba(30, 26, 28, .18); }
.rd-reverse .rd-pop .workflow-form { grid-template-columns: 1fr !important; }
.rd-services .rd-table td:has(.rd-reverse[open]) { overflow: visible; }

/* News rounds */
.rd-rounds.workflow-split-layout { grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr) !important; }
.rd-rounds .round-form-tabs { margin-bottom: 4px; }
.rd-rounds .round-form-tabs .button { min-height: 40px; }
.rd-round-filter { flex: 0 0 auto; max-width: 100%; margin-bottom: 8px; overflow: hidden; }
.rd-stop-list { display: flex; flex-direction: column; gap: 4px; }
.rd-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 30px; padding: 6px 4px 2px; border-bottom: 2px solid var(--rd-plum); }
.rd-group-head strong { font-size: 13.5px; }
.rd-group-head span { color: var(--color-text-muted); font-size: 12px; font-weight: 650; }
.rd-stop.workflow-card { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 4px 8px; border: 1px solid var(--rd-line); border-radius: 12px; background: #fff; cursor: pointer; }
.rd-stop.inactive { opacity: .6; }
.rd-stop-no { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #FAF4E8; background: var(--rd-plum); font-size: 13px; font-weight: 800; }
.rd-stop-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.rd-stop-main strong { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-stop-main small { overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-stop-amount { flex: 0 0 auto; font-weight: 750; font-variant-numeric: tabular-nums; }
.rd-stop-amount small { color: var(--color-text-muted); font-weight: 600; }
.rd-stop .status-chip { min-height: 22px; padding: 2px 8px; font-size: 10.5px; }

/* Chips */
.rd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--color-control-border); border-radius: 999px; color: var(--color-text); background: #fff; font-size: 13px; font-weight: 650; white-space: nowrap; }
.rd-chip small { color: var(--color-text-muted); font-size: 11.5px; font-weight: 600; }
.rd-chip[aria-pressed="true"] { color: #FAF4E8; border-color: var(--rd-plum); background: var(--rd-plum); }
.rd-chip[aria-pressed="true"] small { color: #E9D8DC; }
.rd-chip:active { transform: scale(.97); }

/* ==========================================================================
   One-screen modals
   ========================================================================== */
dialog.rd-modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 22px; }
dialog.rd-modal.rd-md { width: min(620px, calc(100vw - 24px)); }
dialog.rd-modal.rd-lg { width: min(820px, calc(100vw - 24px)); }
dialog.rd-modal.rd-xl { width: min(1000px, calc(100vw - 24px)); }
dialog.rd-modal:has(.wide-dialog).rd-md { width: min(620px, calc(100vw - 24px)); }
dialog.rd-modal:has(.wide-dialog).rd-lg { width: min(820px, calc(100vw - 24px)); }
dialog.rd-modal:has(.wide-dialog).rd-xl { width: min(1000px, calc(100vw - 24px)); }
.rd-card.dialog-card { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
.rd-head.dialog-heading { flex: 0 0 auto; align-items: center; gap: 14px; margin: 0; padding: 14px 18px 12px; border-bottom: 1px solid var(--rd-line); }
.rd-head-main { flex: 1 1 auto; min-width: 0; }
.rd-head .eyebrow { margin-bottom: 1px; font-size: 10.5px; }
.rd-head h2 { margin: 0; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.rd-sub { margin: 2px 0 0; color: var(--color-text-muted); font-size: 12px; }
.rd-head .icon-button { flex: 0 0 auto; width: 44px; height: 44px; }
.rd-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; min-height: 0; padding: 14px 18px; overflow: auto; overscroll-behavior: contain; }
.rd-foot.dialog-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 10px; margin: 0; padding: 12px 18px; border-top: 1px solid var(--rd-line); background: #FFFDF9; }
.rd-foot .button { min-height: 48px; padding: 0 18px; white-space: nowrap; }
.rd-foot .button.primary, .rd-foot .cash-action, .rd-foot .card-action { min-width: 170px; }
.rd-foot .grow { flex: 1 1 auto; }
.rd-meta { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; color: var(--color-text-muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.rd-meta + .grow { display: none; }

.rd-section { display: flex; flex-direction: column; gap: 6px; }
.rd-legend { color: #8A7A7E; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rd-grid { display: grid; gap: 8px 10px; }
.rd-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rd-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rd-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rd-grid .span2, .rd-switches .span2 { grid-column: span 2; }
.rd-hint { margin: 0; font-size: 12px; }
[hidden].rd-f, .rd-f[hidden], .rd-switch[hidden] { display: none !important; }

/* Floating-label field: label sits inside the 52px box, so a form row costs one control height */
.rd-modal .field, .rd-f.field { margin: 0; }
.rd-f.field { position: relative; display: block; min-width: 0; height: var(--rd-field); border: 1px solid var(--color-control-border); border-radius: var(--rd-radius); background: #fff; transition: border-color 120ms, box-shadow 120ms; }
.rd-f.field > span { position: absolute; z-index: 1; top: 6px; right: 12px; left: 12px; margin: 0; overflow: hidden; color: var(--color-text-muted); font-size: 11px; font-weight: 650; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.rd-f.field > span small { font-size: 10.5px; font-weight: 500; }
.rd-f.field > input, .rd-f.field > select { width: 100%; height: 100%; min-height: 0; padding: 19px 12px 4px; border: 0; border-radius: inherit; background: transparent; font-size: 15px; font-weight: 550; box-shadow: none; }
.rd-f.field > select { padding-right: 28px; }
.rd-f.field > input:focus-visible, .rd-f.field > select:focus-visible { outline: none; box-shadow: none; }
.rd-f.field:focus-within { border-color: var(--rd-plum); box-shadow: 0 0 0 3px rgba(71, 38, 45, .16); }
.rd-f.field:has(:disabled) { background: var(--color-surface-subtle); }
.rd-f.field:has(:disabled) > span::after { content: " · locked"; font-weight: 500; }
.rd-f.field:has(:invalid:not(:placeholder-shown)) { border-color: var(--color-danger); }
.rd-money > input { font-variant-numeric: tabular-nums; }

/* Toggle switches laid out as a compact grid of 44px targets */
.rd-switches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rd-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--rd-line); border-radius: var(--rd-radius); background: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.rd-switch input[type="checkbox"] { position: relative; flex: 0 0 auto; width: 38px; height: 22px; min-height: 0; margin: 0; border: 0; border-radius: 999px; background: #D8CCC2; appearance: none; transition: background 150ms; cursor: pointer; }
.rd-switch input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform 150ms; }
.rd-switch input[type="checkbox"]:checked { background: var(--rd-plum); }
.rd-switch input[type="checkbox"]:checked::after { transform: translateX(16px); }
.rd-switch input[type="checkbox"]:focus-visible { outline: 3px solid var(--rd-plum); outline-offset: 2px; }
.rd-switch:has(input:checked) { border-color: #D9C3C8; background: #FCF7F8; }
@media (prefers-reduced-motion: reduce) { .rd-switch input[type="checkbox"], .rd-switch input[type="checkbox"]::after { transition: none; } }

/* Option cards (role, rule type) */
.rd-type-pick, .rd-role-pick { display: grid; gap: 8px; }
.rd-type-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rd-role-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rd-option { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 64px; padding: 10px 12px; border: 1.5px solid var(--color-control-border); border-radius: 14px; color: var(--color-text); background: #fff; text-align: left; }
.rd-option strong { font-size: 14.5px; }
.rd-option small { color: var(--color-text-muted); font-size: 11.5px; line-height: 1.35; }
.rd-option[aria-pressed="true"] { border-color: var(--rd-plum); background: var(--rd-plum-soft); box-shadow: inset 0 0 0 1px var(--rd-plum); }
.rd-option[aria-pressed="true"] strong::before { content: "✓ "; color: var(--rd-plum); }
.rd-callout { padding: 10px 12px; border-radius: 12px; color: #214B70; background: var(--color-info-bg); font-size: 13px; font-weight: 600; }
.rd-callout:empty { display: none; }
.rd-rule-chips .rd-chip { min-height: 44px; }

/* Product editor */
.rd-kpis { display: flex; flex: 0 0 auto; gap: 6px; }
.rd-kpi { display: flex; flex-direction: column; align-items: flex-end; min-width: 84px; padding: 4px 10px; border-radius: 10px; background: var(--color-success-bg); }
.rd-kpi span { color: var(--color-text-muted); font-size: 10.5px; font-weight: 700; }
.rd-kpi strong { color: var(--color-success); font-size: 16px; font-variant-numeric: tabular-nums; }
.rd-kpis.warn .rd-kpi { background: var(--color-warning-bg); } .rd-kpis.warn .rd-kpi strong { color: var(--color-warning); }
.rd-kpis.bad .rd-kpi { background: var(--color-danger-bg); } .rd-kpis.bad .rd-kpi strong { color: var(--color-danger); }
#productDialog .rd-body { gap: 10px; }
#productDialog .candidate-list:not(.hidden) { max-height: 180px; overflow: auto; }
#productDialog .rd-switches { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }

/* Stock adjustment */
.rd-product-line strong { display: block; font-size: 16px; }
.rd-product-line small { color: var(--color-text-muted); font-size: 12px; }
.rd-stock-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.rd-stock-box { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 14px; background: var(--color-surface-subtle); }
.rd-stock-box span { color: var(--color-text-muted); font-size: 12px; font-weight: 650; }
.rd-stock-box strong { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.rd-stock-box.up { color: var(--color-success); background: var(--color-success-bg); }
.rd-stock-box.down { color: #8A4B00; background: #FFF0C7; }
.rd-stock-box.bad { color: var(--color-danger); background: var(--color-danger-bg); }
.rd-stock-arrow { color: var(--color-text-muted); font-size: 26px; }
.rd-stepper { display: grid; grid-template-columns: 64px 64px minmax(0, 1fr) 64px 64px; gap: 8px; }
.rd-step { min-height: 52px; border: 1px solid var(--color-control-border); border-radius: 14px; color: var(--rd-plum); background: #fff; font-size: 17px; font-weight: 800; }
.rd-step:active { background: var(--rd-butter); transform: scale(.97); }
.rd-stock-input > input { text-align: center; font-size: 20px !important; font-weight: 750 !important; }
.rd-stock-input > span { text-align: center; }

/* ---- Payment modals ------------------------------------------------------- */
.rd-pay .rd-head { padding-block: 12px; }
.rd-due { display: flex; flex-direction: column; align-items: flex-end; margin: 0; padding: 0; background: none; }
.rd-due span { color: var(--color-text-muted); font-size: 12px; font-weight: 650; }
.rd-due strong { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rd-cash { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.rd-cash-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rd-tendered.field { margin: 0; }
.rd-tendered > span { margin-bottom: 4px; font-size: 12px; font-weight: 700; }
.rd-tendered input { min-height: 64px; border: 2px solid var(--rd-plum); border-radius: 14px; background: #FFFCF5; font-size: 32px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.rd-change.change-preview { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 12px 16px; border-radius: 14px; color: var(--color-success); background: var(--color-success-bg); }
.rd-change span { font-size: 14px; font-weight: 700; }
.rd-change strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rd-change.short { color: var(--color-danger); background: var(--color-danger-bg); }
.rd-notes.quick-cash { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; }
.rd-notes button { min-height: 52px; border-radius: 12px; font-size: 16px; font-weight: 800; }
.rd-notes button[aria-pressed="true"] { color: #FAF4E8; border-color: var(--rd-plum); background: var(--rd-plum); }
.rd-notes #cashExactBtn { color: var(--rd-plum); background: var(--rd-butter); border-color: #E9C24A; }
.rd-suggest { display: flex; gap: 6px; }
.rd-suggest:empty { display: none; }
.rd-suggest button { flex: 1 1 0; min-height: 44px; border: 1px dashed var(--color-control-border); border-radius: 12px; color: var(--color-text); background: #fff; font-size: 14px; font-weight: 750; }
.rd-pay .receipt-choice { margin: 0; }
.rd-pay .receipt-choice button { min-height: 44px; }
.rd-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(54px, 1fr); gap: 6px; }
.rd-keypad button { border: 1px solid #E2D4C7; border-radius: 14px; color: var(--color-text); background: #fff; font-size: 24px; font-weight: 700; box-shadow: 0 1px 0 rgba(71, 38, 45, .08); font-variant-numeric: tabular-nums; }
.rd-keypad button:active { background: var(--rd-butter); border-color: #E9C24A; transform: scale(.96); }
.rd-keypad [data-key="back"], .rd-keypad [data-key="clear"] { background: #F2E5E0; font-size: 17px; }
.rd-keypad .rd-key-wide { grid-column: 1 / -1; min-height: 48px; }
.rd-foot .cash-action { min-height: 56px; font-size: 17px; }

.rd-card-pay { gap: 14px; }
.rd-terminal { display: flex; flex-direction: column; align-items: center; padding: 16px; border-radius: 18px; color: #FAF4E8; background: linear-gradient(160deg, #47262D, #2E181D); }
.rd-terminal > span { color: #E3CDD2; font-size: 13px; font-weight: 650; }
.rd-terminal .terminal-total { margin: 2px 0 0; color: #fff; font-size: 46px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; background: none; border: 0; padding: 0; }
.rd-steps { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rd-steps li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--rd-line); border-radius: 12px; font-size: 13.5px; }
.rd-steps b { display: grid; flex: 0 0 auto; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--rd-plum); background: var(--rd-butter); font-size: 13px; }
.rd-terminal-status { margin: 0; font-weight: 650; }
.rd-terminal-status:empty { display: none; }
.rd-foot .card-action { min-height: 56px; font-size: 16px; }

/* Keyboard open: the modal body scrolls to the field; nothing is split into pages */
body.osk-bottom dialog.rd-modal[open]:has(> #onscreenKeyboard) > .rd-card { max-height: calc(100dvh - var(--osk-h, 0px) - 12px); }

/* Narrow screens */
@media (max-width: 900px) {
  .rd-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-switches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-role-pick { grid-template-columns: 1fr; }
  .rd-cash { grid-template-columns: 1fr; }
  .rd-master-detail, .workflow-view.rd-page .workflow-split-layout { grid-template-columns: 1fr !important; }
}

/* ---- Fixes after visual review ------------------------------------------------ */
.rd-mini.mini-button .ui-icon { display: none; }
.product-record-table th:nth-child(6) { width: 148px; }
.rd-sales-table th:nth-child(5) { width: 236px; }
.rd-meta.hidden + .grow { display: block; }
.rd-due.payment-total { flex-direction: column; align-items: flex-end; gap: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.rd-due.payment-total strong { font-size: 30px; }
.rd-foot .cash-action { color: var(--rd-plum); background: var(--rd-butter); border-color: #E9C24A; }
.rd-foot .cash-action:hover { background: #F4CE50; }
.rd-foot .card-action { color: #fff; background: var(--color-success); border-color: var(--color-success); }
.rd-foot .card-action:hover { background: #1A5537; }
.rd-table.product-record-table { min-width: 0; }
.rd-table.product-record-table td { min-width: 0 !important; width: auto; }
.rd-table.product-record-table td:first-child { width: auto; }
.rd-table.product-record-table .inactive { opacity: 1; }
.product-record-table td { height: 40px; padding-block: 2px; }
.product-record-table .rd-mini.mini-button { min-height: 34px; }
.product-record-table .rd-stock { height: 24px; }
.workflow-view .rd-switch input[type="checkbox"], .rd-switch input[type="checkbox"] { width: 38px !important; height: 22px !important; min-height: 0 !important; padding: 0; }
.workflow-view.rd-page .workflow-form > label.rd-switch { min-height: 44px; font-size: 13px; }
.rd-page > .page-heading > .inline-actions .button .ui-icon { display: inline-block; }
.rd-page > .page-heading > .rd-title-block + .button.primary { margin-left: auto; }
.rd-name-cell > strong { max-width: 100%; }
.rd-name-cell > strong:has(+ .rd-promo), .rd-name-cell > strong:has(+ .rd-tag) { max-width: calc(100% - 64px); }
.rd-services .rd-table th:nth-child(3) { width: 78px; }
.rd-services .rd-table th:nth-child(4) { width: 96px; }
.rd-invoice-date { white-space: nowrap; }
.rd-round-filter { flex-wrap: wrap; }
.delivery-table th:nth-child(1) { width: 118px; }
.delivery-table th:nth-child(2) { width: 30%; }
#categoryList .subcategory-chips { justify-content: flex-start; }
.rd-f.field:has(:invalid:not(:placeholder-shown)) { border-color: var(--color-control-border); }
.rd-f.field:has(:user-invalid) { border-color: var(--color-danger); }
.rd-f.field:focus-within:has(:user-invalid) { box-shadow: 0 0 0 3px rgba(180, 35, 50, .14); }
@media (max-width: 1180px) { .rd-page > .page-heading > .inline-actions.rd-tools .button .ui-icon { display: none; } }
.rd-row.rd-flash td { animation: rd-flash 1.6s ease-out; }
@keyframes rd-flash { 0%, 40% { background: #FFF1C4; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .rd-row.rd-flash td { animation: none; background: #FFF6D8; } }
html[data-lane="sco"] #mainNav,
html[data-lane="sco"] #cashBtn,
html[data-lane="sco"] #creditBtn,
html[data-lane="sco"] #splitBtn,
html[data-lane="sco"] #giftcardBtn,
html[data-lane="sco"] #selfCheckoutBtn,
html[data-lane="sco"] .manager-only { display: none; }
.workflow-view.rd-page > .page-heading { min-height: 0; margin: 0; padding: 0; overflow: hidden; }
html[data-shop-colours="1"] .button.primary,
html[data-shop-colours="1"] .rd-chip-toggle:has(input:checked),
html[data-shop-colours="1"] .rd-seg button[aria-pressed="true"],
html[data-shop-colours="1"] .rd-seg .button[aria-pressed="true"] { color: var(--shop-on-primary); background: var(--color-brand); border-color: var(--color-brand); }
html[data-shop-colours="1"] .nav-btn.active { color: var(--color-brand); background: var(--color-selected); }
html[data-shop-colours="1"] .login-brand-panel { background: var(--color-brand); color: var(--shop-on-primary); }
html[data-shop-colours="1"] .login-brand-copy h2,
html[data-shop-colours="1"] .login-brand-panel { color: var(--shop-on-primary); }
html[data-shop-colours="1"] .login-brand-copy > span,
html[data-shop-colours="1"] .rd-promo,
html[data-shop-colours="1"] .rd-tag { color: var(--color-text); background: var(--color-action); }
html[data-shop-colours="1"] a { color: var(--color-info); }
