/* =============================================================================
   Cash Bill POS -- web/css/pos.css (WP6)
   Port of the approved Phase 0 shared stylesheet (shell/component classes,
   minus the watermark shown only in the approved look) plus the page-only
   rules of the approved POS screen and Checkout modal screen, plus the
   shell/login/modal-form/flash rules the approved screens never had to show.
   Selectors that came from a single approved-look page
   are scoped under that view's root class (.v-pos) or under a dedicated
   wrapper (#coModal, .cust-modal) per R16, because plain names such as
   .lines-table / .cust-row / .empty-row are reused with different rules on
   other screens once everything lives in one SPA document.
   ============================================================================= */

*{ box-sizing: border-box }

html, body{
  margin: 0;
  height: 100%;
  background: var(--cb-page);
  color: var(--cb-ink);
  font-family: var(--cb-font);
  font-size: var(--cb-fs-14);
  line-height: 1.4;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol{ margin: 0 }

/* [hidden] must win over mock.css's .sidenav{display:flex} etc. */
[hidden]{ display: none !important }

/* ---------- static background colour blocks (mock.css, unchanged) -------- */
.bg-arcs{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    radial-gradient(46vw 50vh at 2% 4%,   var(--cb-a1), transparent 70%),
    radial-gradient(42vw 46vh at 99% 10%, var(--cb-a2), transparent 70%),
    radial-gradient(44vw 48vh at 14% 98%, var(--cb-a3), transparent 70%),
    radial-gradient(40vw 44vh at 96% 94%, var(--cb-a4), transparent 70%);
  background-repeat: no-repeat;
}

/* ---------- app shell: fixed viewport, page itself never scrolls --------- */
.app-shell{
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
  background: transparent;
}
.app-shell.with-sidenav{
  grid-template-columns: 184px 1fr;
  grid-template-rows: auto 1fr;
}
.app-shell.with-sidenav .topbar{ grid-column: 1 / -1 }

/* bare layout (login): no topbar, body centres its one glass card */
.app-shell[data-layout="bare"]{ grid-template-rows: 1fr }
.app-shell[data-layout="bare"] .topbar{ display: none }
.app-shell[data-layout="bare"] #cb-body{ display: flex; align-items: center; justify-content: center }
.app-shell[data-layout="bare"] .banner-slot{ position: absolute; top: 0; left: 0; right: 0 }

#cb-body{
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden;
}
.app-body{ min-height: 0 }
.banner-slot{ min-height: 0 }

/* ---------- topbar: solid, carries text/controls -------------------------- */
.topbar{
  position: relative;
  z-index: 2;
  background: var(--cb-topbar-bg);
  border-bottom: 1px solid var(--cb-divider);
  padding: var(--cb-sp-12) var(--cb-sp-20);
  display: flex;
  align-items: center;
  gap: var(--cb-sp-16);
  flex-wrap: wrap;
  min-height: 52px;
}
.topbar h1{
  font-size: var(--cb-fs-16);
  font-weight: 640;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.topbar .spacer{ flex: 1 }
.topbar-right{
  display: flex;
  align-items: center;
  gap: var(--cb-sp-12);
  color: var(--cb-ink2);
  font-size: var(--cb-fs-13);
}
.clock{
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--cb-ink);
  padding: 4px 10px;
  border: 1px solid var(--cb-divider);
  border-radius: var(--cb-r-sm);
  background: var(--cb-panel-2);
  white-space: nowrap;
}

/* compact text nav in the POS topbar (D3 -- the POS screen has no sidenav) */
.topnav{ display: flex; align-items: center; gap: 2px }
.topnav .navlink{
  padding: 5px 10px;
  border-radius: var(--cb-r-sm);
  color: var(--cb-ink2);
  text-decoration: none;
  font-size: var(--cb-fs-13);
  font-weight: 560;
  white-space: nowrap;
}
.topnav .navlink:hover{ background: var(--cb-fill); color: var(--cb-ink) }
.topnav .navlink.active{ background: var(--cb-brand); color: #fff }

/* ---------- sidenav: solid, carries text ----------------------------------- */
.sidenav{
  position: relative;
  z-index: 2;
  background: var(--cb-sidenav-bg);
  border-right: 1px solid var(--cb-divider);
  padding: var(--cb-sp-12) var(--cb-sp-8);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
}
.sidenav a{
  display: block;
  padding: 8px 12px;
  border-radius: var(--cb-r-sm);
  color: var(--cb-ink2);
  text-decoration: none;
  font-size: var(--cb-fs-14);
  font-weight: 520;
}
.sidenav a:hover{ background: var(--cb-fill); color: var(--cb-ink) }
.sidenav a.active{ background: var(--cb-brand); color: #fff }
.sidenav a.disabled{ color: var(--cb-ink3); pointer-events: none }

/* ---------- panel: solid surface for any block that carries text ---------- */
.panel{
  position: relative;
  z-index: 1;
  background: var(--cb-panel);
  border: 1px solid var(--cb-divider);
  border-radius: var(--cb-r-lg);
  box-shadow: var(--cb-shadow-sm);
}
.panel-2{ background: var(--cb-panel-2) }
.panel-pad{ padding: var(--cb-sp-16) }

/* ---------- .glass: a panel that floats over .bg-arcs, never over text ---- */
.glass{
  position: relative;
  z-index: 1;
  background: var(--cb-glass-panel);
  backdrop-filter: var(--cb-glass-blur);
  -webkit-backdrop-filter: var(--cb-glass-blur);
  border: 1px solid var(--cb-edge);
  box-shadow:
    inset 0 1px 0 var(--cb-hi),
    inset 0 -1px 0 var(--cb-lo),
    0 1px 2px rgba(14,20,27,.08),
    0 10px 28px -6px var(--cb-edge);
}
.glass::after{
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,255,255,.22) 40%, rgba(255,255,255,.05) 62%, rgba(255,255,255,.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .85;
}

/* ---------- table on glass -------------------------------------------------- */
.glass .tbl thead th{
  background: var(--cb-glass-thead);
  border-bottom-color: var(--cb-glass-divider);
}
.glass .tbl tbody td{ border-bottom-color: var(--cb-glass-divider) }
.glass .tbl tbody tr:nth-child(even){ background: var(--cb-glass-zebra) }
.glass .tbl tbody tr:hover{ background: var(--cb-glass-hover) }

/* ---------- buttons -------------------------------------------------------- */
.btn{
  font: inherit;
  font-size: var(--cb-fs-14);
  font-weight: 590;
  cursor: pointer;
  color: var(--cb-ink);
  background: var(--cb-panel);
  border: 1px solid var(--cb-divider);
  border-radius: var(--cb-r-sm);
  padding: 8px 16px;
  transition: transform .12s ease, filter .12s ease, background .12s ease;
}
a.btn{ display: inline-block; text-decoration: none }
.btn:hover{ background: var(--cb-panel-2) }
.btn:active{ transform: scale(.97) }
.btn:disabled{ color: var(--cb-ink3); cursor: not-allowed }

.btn-primary{
  background: var(--cb-brand);
  border-color: transparent;
  color: #fff;
  font-weight: 620;
  box-shadow: var(--cb-shadow-sm);
}
.btn-primary:hover{ filter: brightness(1.06) }
.btn-primary:disabled{ background: var(--cb-ink3); box-shadow: none }

.btn-danger{
  background: var(--cb-bad-fg);
  border-color: transparent;
  color: #fff;
  font-weight: 620;
}
.btn-danger:hover{ filter: brightness(1.08) }

/* ---------- kbd: keyboard-shortcut hint ------------------------------------ */
kbd{
  font-family: var(--cb-font-mono);
  font-size: var(--cb-fs-12);
  font-weight: 600;
  color: var(--cb-ink2);
  background: var(--cb-panel-2);
  border: 1px solid var(--cb-divider);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ---------- pill (status capsule) ------------------------------------------ */
.pill{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--cb-pill-fs);
  font-weight: 640;
  letter-spacing: .01em;
  padding: var(--cb-pill-pad-y) var(--cb-pill-pad-x);
  border-radius: var(--cb-r-pill);
  line-height: 1.5;
  white-space: nowrap;
}
.pill.ok{   color: var(--cb-ok-fg);   background: var(--cb-ok-bg) }
.pill.warn{ color: var(--cb-warn-fg); background: var(--cb-warn-bg) }
.pill.bad{  color: var(--cb-bad-fg);  background: var(--cb-bad-bg) }
.pill.info{ color: var(--cb-info-fg); background: var(--cb-info-bg) }
.pill.void{ color: var(--cb-void-fg); background: var(--cb-void-bg) }

/* ---------- table: high density, numeric columns right-aligned ------------ */
.tbl{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--cb-fs-13);
}
.tbl thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--cb-panel-2);
  border-bottom: 1px solid var(--cb-divider);
  text-align: left;
  padding: 6px 10px;
  font-size: var(--cb-fs-12);
  font-weight: 640;
  color: var(--cb-ink2);
  letter-spacing: .02em;
  height: var(--cb-row-36);
}
.tbl tbody td{
  height: var(--cb-row-36);
  padding: 4px 10px;
  border-bottom: 1px solid var(--cb-divider-soft);
  vertical-align: middle;
}
.tbl.row-40 thead th,
.tbl.row-40 tbody td{ height: var(--cb-row-40) }
.tbl tbody tr:last-child td{ border-bottom: none }
.tbl tbody tr:nth-child(even){ background: rgba(14,20,27,.015) }
.tbl tbody tr:hover{ background: var(--cb-fill) }
.tbl .num{
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.tbl .code{
  font-family: var(--cb-font-mono);
  font-size: var(--cb-fs-12);
  color: var(--cb-ink2);
}

/* ---------- ellipsis -------------------------------------------------------- */
.ellipsis{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
}

/* ---------- modal: solid dialog over a translucent scrim ------------------ */
.modal-scrim{
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--cb-modal-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal{
  position: relative;
  z-index: 51;
  background: var(--cb-modal-bg);
  border-radius: var(--cb-r-lg);
  box-shadow: var(--cb-shadow-lg);
  padding: var(--cb-sp-20);
  min-width: 320px;
  max-width: 92vw;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.modal h2{
  font-size: var(--cb-fs-20);
  font-weight: 640;
  letter-spacing: -.02em;
  margin-bottom: var(--cb-sp-8);
}
.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: var(--cb-sp-8);
  margin-top: var(--cb-sp-16);
}
.modal-error{
  color: var(--cb-bad-fg);
  font-size: var(--cb-fs-13);
  font-weight: 640;
  margin: var(--cb-sp-8) 0;
}

/* ---------- banner: full-width strip, solid, always on top of content ----- */
.banner{
  position: relative;
  z-index: 3;
  padding: 8px var(--cb-sp-20);
  font-size: var(--cb-fs-13);
  font-weight: 590;
  display: flex;
  align-items: center;
  gap: var(--cb-sp-8);
}
.banner.offline{ background: var(--cb-bad-bg); color: var(--cb-bad-fg) }
.banner.update{  background: var(--cb-info-bg); color: var(--cb-info-fg) }
.banner .banner-action{
  font-weight: 640;
  text-decoration: underline;
  cursor: pointer;
}
/* transient flash() banners (app.js), kind = ok|warn|bad|info */
.banner-ok{   background: var(--cb-ok-bg);   color: var(--cb-ok-fg) }
.banner-warn{ background: var(--cb-warn-bg); color: var(--cb-warn-fg) }
.banner-bad{  background: var(--cb-bad-bg);  color: var(--cb-bad-fg) }
.banner-info{ background: var(--cb-info-bg); color: var(--cb-info-fg) }

/* ---------- misc form controls, kept consistent across mockups ------------ */
input, select, textarea{
  font: inherit;
  font-size: var(--cb-fs-14);
  color: var(--cb-ink);
  background: var(--cb-panel);
  border: 1px solid var(--cb-divider);
  border-radius: var(--cb-r-sm);
  padding: 8px 10px;
}
input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: var(--cb-brand);
  box-shadow: 0 0 0 3px rgba(11,97,87,.14);
}

/* =============================================================================
   login (bare layout) -- no mockup; built from tokens.css + mock.css
   conventions. Scoped under .v-login (the view root class).
   ============================================================================= */
.v-login{ display: flex; align-items: center; justify-content: center; width: 100%; height: 100% }
.v-login .login-card{
  width: min(360px, calc(100vw - 32px));
  padding: var(--cb-sp-24);
  border-radius: var(--cb-r-lg);
  display: flex;
  flex-direction: column;
  gap: var(--cb-sp-16);
}
.v-login .login-title{ font-size: var(--cb-fs-20); font-weight: 640; text-align: center; letter-spacing: -.02em }
.v-login .login-field{ display: flex }
.v-login .login-code{
  width: 100%;
  font-size: var(--cb-fs-16);
  padding: 11px 14px;
  border-radius: var(--cb-r-md);
}
.v-login .login-remember{ display: flex; align-items: center; gap: 8px; font-size: var(--cb-fs-13); color: var(--cb-ink2) }
.v-login .login-error{ color: var(--cb-bad-fg); font-size: var(--cb-fs-13); font-weight: 640 }
.v-login .login-btn{ width: 100%; padding: 12px; font-size: var(--cb-fs-16) }

/* =============================================================================
   POS (approved Phase 0 POS screen) -- scoped under .v-pos, the view's own
   root class. Ported 1:1 from the approved page rules; only the selector
   prefix changed.
   ============================================================================= */
.view.v-pos{ display: grid; grid-template-rows: 1fr auto; min-height: 0 }

.v-pos .pos-columns{
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 560px;
  gap: var(--cb-sp-16);
  padding: var(--cb-sp-16) var(--cb-sp-20);
}
@media (max-width: 1100px){
  .v-pos .pos-columns{ grid-template-columns: 1fr 420px }
}
@media (min-width: 1600px){
  .v-pos .pos-columns{ grid-template-columns: 1fr 720px }
}

.v-pos .left-col{
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--cb-sp-8);
}
.v-pos .search-bar{ flex: 0 0 auto }
.v-pos .search-input{
  width: 100%;
  font-size: var(--cb-fs-16);
  padding: 11px 14px;
  border-radius: var(--cb-r-md);
  border: 1.5px solid var(--cb-brand);
  box-shadow: 0 0 0 3px rgba(11,97,87,.14);
}

.v-pos .results-card{
  flex: 1;
  min-height: 0;
  padding: 6px;
  border-radius: var(--cb-r-lg);
  display: flex;
}
.v-pos .results-inner{
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
}
.v-pos .results-hint{
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: var(--cb-fs-12);
  font-weight: 640;
  color: var(--cb-info-fg);
  background: var(--cb-info-bg);
  border-bottom: 1px solid var(--cb-divider);
}
.v-pos .results-scroll{ flex: 1; min-height: 0; overflow: auto }
.v-pos .results-table{ table-layout: fixed; min-width: 640px }
.v-pos .results-table .col-code{ width: 82px }
.v-pos .results-table .col-uom{  width: 52px }
.v-pos .results-table .col-cost{ width: 80px }
.v-pos .results-table .col-list{ width: 80px }
.v-pos .results-table .col-last{ width: 140px }
.v-pos .results-table thead th{ white-space: nowrap }

.v-pos .row-selected td{ background: var(--cb-glass-row-selected) !important }
.v-pos .row-selected td:first-child{ box-shadow: inset 3px 0 0 0 var(--cb-brand) }
.v-pos .row-dim td{ color: var(--cb-ink3) }
.v-pos .row-dim .ellipsis{ color: var(--cb-ink3) }
.v-pos .dim{ color: var(--cb-ink3) }

.v-pos .right-col{
  min-height: 0;
  min-width: 0;
  border-radius: var(--cb-r-lg);
  display: flex;
  flex-direction: column;
  gap: var(--cb-sp-8);
}
.v-pos .cust-bar{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: var(--cb-sp-12);
  border-bottom: 1px solid var(--cb-divider);
}
.v-pos .cust-name{ font-size: var(--cb-fs-16); font-weight: 640; flex: 0 1 auto; min-width: 0 }
.v-pos .cust-placeholder{ color: var(--cb-ink2) }
.v-pos .cust-change{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--cb-fs-13);
  color: var(--cb-ink2);
  white-space: nowrap;
  text-decoration: none;
}
.v-pos .cust-change:hover{ color: var(--cb-ink) }

.v-pos .lines-scroll{ flex: 1; min-height: 0; overflow: auto }
.v-pos .lines-table{ table-layout: fixed; min-width: 480px }
.v-pos .lines-table .col-no{   width: 30px }
.v-pos .lines-table .col-code{ width: 80px }
.v-pos .lines-table .col-qty{  width: 64px }
.v-pos .lines-table .col-price{ width: 76px }
.v-pos .lines-table .col-amount{ width: 84px }
.v-pos .lines-table tbody td{ height: auto; padding: 6px 8px; vertical-align: top; white-space: nowrap }
/* QTY / U.PRICE cells can be edited in place (click; Enter saves, Esc cancels) */
.v-pos .lines-table td.cell-edit{ cursor: text }
.v-pos .lines-table td.cell-edit:hover{ box-shadow: inset 0 0 0 1px var(--cb-brand); border-radius: var(--cb-r-sm) }
.v-pos .lines-table td.cell-edit .inline-edit{
  width: 100%;
  box-sizing: border-box;
  margin: -3px 0;
  padding: 2px 6px;
  font: inherit;
  text-align: right;
  color: var(--cb-ink);
  background: var(--cb-panel);
  border: 1px solid var(--cb-brand);
  border-radius: var(--cb-r-sm);
  outline: none;
}
.v-pos .lines-table td.cell-edit .inline-edit.inline-bad{ border-color: var(--cb-bad-fg); box-shadow: 0 0 0 2px rgba(179, 38, 30, .18) }
/* below cost, warned once: the next Enter will sell under cost */
.v-pos .lines-table td.cell-edit .inline-edit.inline-armed{ border-color: var(--cb-warn-fg); background: var(--cb-warn-bg); box-shadow: 0 0 0 2px rgba(180, 83, 9, .22) }
.v-pos .lines-table thead th{ height: var(--cb-row-36); padding: 6px 8px }
.v-pos .line-sub-row{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
}
.v-pos .line-sub{
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--cb-ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-pos .line-sub-row .pill{ flex: 0 0 auto }
.v-pos .row-below-cost td{ background: var(--cb-glass-below-cost) }
.v-pos .row-editing td{ background: var(--cb-warn-bg) }
.v-pos .row-confirm td{ border-top: none; padding-top: 0 }
.v-pos .confirm-msg{
  white-space: normal;
  color: var(--cb-warn-fg);
  font-size: var(--cb-fs-12);
  font-weight: 640;
  padding-bottom: 8px;
}
.v-pos .empty-row td{ color: var(--cb-ink2); font-style: normal; text-align: center; padding: 24px 10px }

.v-pos .totals-row{
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: var(--cb-sp-12);
  border-top: 1px solid var(--cb-divider);
}
.v-pos .total-block{ display: flex; flex-direction: column; gap: 2px }
.v-pos .total-label{ font-size: var(--cb-fs-12); font-weight: 640; letter-spacing: .02em; color: var(--cb-ink2) }
.v-pos .total-value{ font-size: var(--cb-fs-20); font-weight: 640; font-variant-numeric: tabular-nums }
.v-pos .total-value.big{ font-size: var(--cb-fs-28); color: var(--cb-brand) }

.v-pos .checkout-btn{
  flex: 0 0 auto;
  width: 100%;
  margin-top: var(--cb-sp-8);
  padding: 14px;
  font-size: var(--cb-fs-16);
}
.v-pos .cost-stale-note{
  flex: 0 0 auto;
  margin-top: var(--cb-sp-8);
  color: var(--cb-bad-fg);
  font-size: var(--cb-fs-12);
  font-weight: 640;
}

.topbar .outlet-tag{
  font-size: var(--cb-fs-12);
  font-weight: 640;
  letter-spacing: .02em;
  padding: 3px 10px;
  border-radius: var(--cb-r-pill);
  background: var(--cb-panel-2);
  border: 1px solid var(--cb-divider);
  color: var(--cb-ink2);
}
.topbar .staff-name{ font-size: var(--cb-fs-13); color: var(--cb-ink2) }
.topbar .staff-name .staff-label{ font-weight: 640; color: var(--cb-ink3); margin-right: 4px }

.v-pos .shortcut-bar{
  background: var(--cb-panel);
  border-top: 1px solid var(--cb-divider);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px var(--cb-sp-20);
  font-size: 12.5px;
  color: var(--cb-ink2);
  flex-wrap: wrap;
}
.v-pos .shortcut-bar span{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-left: 1px solid var(--cb-divider);
  white-space: nowrap;
}
.v-pos .shortcut-bar span:first-child{ border-left: none; padding-left: 0 }

/* =============================================================================
   F4 customer picker -- rendered through ctx.modal.open() into
   #cb-modal-root, so it cannot be scoped under .v-pos (see file header);
   scoped instead under its own wrapper class .cust-modal, which nothing
   else in the app uses as a root class.
   ============================================================================= */
.cust-modal{ width: 420px }
.cust-modal .cust-modal-sub{ font-size: var(--cb-fs-12); color: var(--cb-ink2); margin-bottom: var(--cb-sp-8) }
.cust-modal .cust-filter-input{ width: 100%; font-size: var(--cb-fs-14); padding: 9px 12px; margin-bottom: var(--cb-sp-8) }
.cust-modal .cust-list{
  max-height: 362px;
  overflow: auto;
  border: 1px solid var(--cb-divider);
  border-radius: var(--cb-r-md);
}
.cust-modal .cust-row{
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--cb-divider-soft);
  cursor: pointer;
}
.cust-modal .cust-row:last-child{ border-bottom: none }
.cust-modal .cust-row .cust-row-name{ flex: 1; min-width: 0; font-weight: 590 }
.cust-modal .cust-row.selected{ background: rgba(11,97,87,.10) }
.cust-modal .cust-row.selected .cust-row-name{ color: var(--cb-brand); font-weight: 640 }

/* =============================================================================
   Checkout modal (approved Phase 0 Checkout screen) -- unique prefix .co- / #coModal,
   no further scoping needed.
   ============================================================================= */
#coModal{ width: 520px }
.co-head{ display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--cb-sp-4) }
.co-head h2{ margin: 0 }
.co-sub{ font-size: var(--cb-fs-13); color: var(--cb-ink2) }

.co-methods{ display: flex; gap: var(--cb-sp-8); margin: var(--cb-sp-16) 0 var(--cb-sp-4) }
.co-method{
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px;
  border-radius: var(--cb-r-md);
  border: 1.5px solid var(--cb-divider);
  background: var(--cb-panel-2);
  font-weight: 620; font-size: var(--cb-fs-16); color: var(--cb-ink2);
  cursor: pointer;
}
.co-method .co-method-label{ flex: 1 }
.co-method .co-check{ color: var(--cb-brand); opacity: 0; font-weight: 700 }
.co-method.selected{ border-color: var(--cb-brand); background: var(--cb-ok-bg); color: var(--cb-brand) }
.co-method.selected .co-check{ opacity: 1 }

.co-row{
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px solid var(--cb-divider-soft);
}
.co-row:last-of-type{ border-bottom: none }
.co-row .co-lbl{ color: var(--cb-ink2); font-size: var(--cb-fs-14) }
.co-row .co-val{ font-weight: 650; font-size: var(--cb-fs-16); font-variant-numeric: tabular-nums }

.co-field{ margin: var(--cb-sp-16) 0 0 }
.co-field label{ display: block; font-size: var(--cb-fs-13); font-weight: 600; color: var(--cb-ink2); margin-bottom: 6px }
.co-field input{ width: 100%; font-size: var(--cb-fs-20); font-weight: 650; text-align: right; padding: 10px 14px; font-variant-numeric: tabular-nums }

.co-big{ text-align: center; padding: var(--cb-sp-20) 0 var(--cb-sp-4) }
.co-big .co-biglbl{ font-size: var(--cb-fs-12); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--cb-ink2) }
.co-big .co-bigval{ font-size: 40px; font-weight: 760; letter-spacing: -.02em; color: var(--cb-brand); margin-top: 2px; font-variant-numeric: tabular-nums }
.co-big.owing .co-bigval{ color: var(--cb-warn-fg) }

.co-checking{ text-align: center; padding: 30px 6px 12px }
.co-spinner{
  width: 42px; height: 42px; margin: 0 auto 18px;
  border-radius: 50%; border: 4px solid var(--cb-divider); border-top-color: var(--cb-brand);
  animation: coSpin .8s linear infinite;
}
@keyframes coSpin{ to{ transform: rotate(360deg) } }
.co-checking h3{ font-size: var(--cb-fs-20); font-weight: 650; margin: 0 0 8px }
.co-checking p{ color: var(--cb-ink2); font-size: var(--cb-fs-13); max-width: 380px; margin: 0 auto; line-height: 1.5 }

.co-done{ text-align: center; padding: 6px 4px 2px }
.co-done .co-billno{ font-size: 36px; font-weight: 780; letter-spacing: -.01em; font-variant-numeric: tabular-nums }
.co-done .co-date{ color: var(--cb-ink2); font-size: var(--cb-fs-14); margin-top: 6px }
.co-done .co-printing{
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 6px 14px; border-radius: var(--cb-r-pill);
  background: var(--cb-info-bg); color: var(--cb-info-fg); font-weight: 640; font-size: var(--cb-fs-13);
}
.co-done .co-printing .co-spinner{ width: 14px; height: 14px; border-width: 2px; margin: 0 }

.co-failed{ text-align: center; padding: 10px 4px 2px }
.co-failed h3{ color: var(--cb-bad-fg); font-size: var(--cb-fs-20); font-weight: 700; margin: 0 }
.co-failed .co-reason{ color: var(--cb-ink2); font-size: var(--cb-fs-14); margin-top: 10px; line-height: 1.5 }

.co-choose{ text-align: center; padding: 4px 4px 0 }
.co-choose h3{ font-size: var(--cb-fs-20); font-weight: 700; margin: 0 }
.co-choose .co-reason{ color: var(--cb-ink2); font-size: var(--cb-fs-14); margin: 6px 0 0; line-height: 1.5 }
.co-grp{ margin: 10px 0 0; font-size: var(--cb-fs-12); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--cb-ink2) }
.co-grp ~ .co-row{ padding: 5px 2px }
.co-grp ~ .co-hint{ margin-top: 8px }

.co-hint{ margin-top: var(--cb-sp-12); text-align: center; font-size: var(--cb-fs-12); color: var(--cb-ink3) }

.co-stale{
  margin: 0 0 var(--cb-sp-12); padding: 7px 12px; border-radius: var(--cb-r-sm);
  background: var(--cb-bad-bg); color: var(--cb-bad-fg);
  font-size: var(--cb-fs-13); font-weight: 640;
}
