/* GENERATED by tools/build-css.py — do not edit by hand.
   Part 1: TARA design system shared with the approved POS (tokens + components).
   Part 2: back-office shell (css/erp-shell.css). */
:root {
  /* ---- TARA brand colours (from project asset: brand-palette.jpg) ---- */
  --tara-teal:      #037171;   /* primary */
  --tara-teal-700:  #025A5A;
  --tara-teal-900:  #013F3F;
  --tara-teal-50:   #E7F2F2;
  --tara-teal-100:  #CDE6E6;
  --tara-gold:      #ECAC01;   /* accent */
  --tara-gold-50:   #FDF4D8;
  --tara-coral:     #FF6D60;   /* accent / alerts (fills only) */
  --tara-coral-txt: #B1372A;   /* darker coral for readable text */
  --tara-coral-50:  #FFECEA;
  --tara-sky:       #C0D3EE;
  --tara-sky-50:    #EEF3FB;
  --tara-sky-700:   #2B4E7E;   /* sky, dark enough for text / small marks */
  --tara-ink:       #3D4850;   /* brand dark */
  --tara-ink-900:   #252D32;
  --tara-cream:     #FFFAEA;

  /* ---- UI neutrals & semantic ---- */
  --bg:            #E9EEEE;
  --surface:       #FFFFFF;
  --surface-2:     #F6F8F8;
  --border:        #D3DCDC;
  --border-strong: #AFBEBE;
  --text:          #1E282D;
  --text-2:        #4F5E65;
  --text-3:        #75848A;
  --ok:            #0A7146;
  --ok-50:         #E2F3EA;
  --warn:          #7D5800;
  --warn-50:       #FFF3D1;
  --row-sel:       #DDEFEF;
  --row-hover:     #F1F7F7;

  /* ---- Typography (PLACEHOLDER — no official brand font found in project) ---- */
  --font-ui:    "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-brand: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-mono:  "Cascadia Mono", "Consolas", "SF Mono", Menlo, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px;
  --fs-xl: 22px; --fs-2xl: 30px; --fs-3xl: 42px;

  /* ---- Spacing & sizing ---- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --radius: 8px; --radius-lg: 12px;
  --header-h: 60px;
  --search-h: 58px;
  --row-h: 48px;
  --bar-btn-h: 54px;
  --tab-h: 36px;
  --focus-ring: 0 0 0 3px rgba(236,172,1,.65);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-ui); font-size: var(--fs-md); color: var(--text);
  background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd {
  font-family: var(--font-mono); font-size: .78em; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text); white-space: nowrap;
}

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface); font-weight: 700; color: var(--text); white-space: nowrap;
}
.btn:hover { border-color: var(--tara-teal); background: var(--tara-teal-50); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--border-strong); background: var(--surface); }
.btn-sm { height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
.btn-lg { height: 52px; padding: 0 22px; font-size: var(--fs-lg); }
.btn-primary { background: var(--tara-teal); border-color: var(--tara-teal); color: #fff; }
.btn-primary:hover { background: var(--tara-teal-700); border-color: var(--tara-teal-700); }
.btn-primary:disabled:hover { background: var(--tara-teal); border-color: var(--tara-teal); }
.btn-gold { background: var(--tara-gold); border-color: #D69C00; color: var(--tara-ink-900); }
.btn-gold:hover { background: #F7BC1A; border-color: #C08B00; }
.btn-danger { background: var(--surface); border-color: var(--tara-coral); color: var(--tara-coral-txt); }
.btn-danger:hover { background: var(--tara-coral-50); border-color: var(--tara-coral-txt); }
.btn kbd { font-size: .72em; }
.btn-primary kbd, .btn-gold kbd { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); color: inherit; }
.btn-gold kbd { background: rgba(0,0,0,.08); border-color: rgba(0,0,0,.2); }

/* ============================ MODALS ============================ */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(18,28,32,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgba(0,0,0,.3);
  display: flex; flex-direction: column; max-height: calc(100vh - 40px); width: 640px; max-width: 100%;
}
.modal-sm { width: 480px; } .modal-md { width: 640px; } .modal-lg { width: 900px; } .modal-xl { width: 1120px; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.modal-h h2 { margin: 0; font-size: var(--fs-xl); font-weight: 800; flex: 1; }
.modal-h .demo-badge { font-size: 10px; }
.modal-x { border: 1px solid var(--border); background: var(--surface-2); border-radius: 6px; height: 34px; padding: 0 10px; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--text-2); }
.modal-x:hover { border-color: var(--tara-teal); color: var(--tara-teal); }
.modal-b { padding: 18px 20px; overflow: auto; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-f .spacer { flex: 1; }

.overlay-full { padding: 0; background: var(--bg); }
.overlay-full .modal { width: 100%; height: 100%; max-height: none; border-radius: 0; background: var(--bg); box-shadow: none; }
.overlay-full .modal-b { flex: 1; min-height: 0; padding: 0; overflow: hidden; }
.overlay-full .modal-h { background: var(--surface); border-bottom: 3px solid var(--tara-teal); min-height: var(--header-h); }

/* form bits */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .lbl-sm { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.inp {
  height: 48px; padding: 0 14px; border: 2px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); font-size: var(--fs-lg); font-weight: 600; outline: none; width: 100%;
}
.inp:focus { border-color: var(--tara-teal); box-shadow: 0 0 0 3px rgba(3,113,113,.16); }
.inp.big { height: 60px; font-size: var(--fs-2xl); font-weight: 800; text-align: end; font-variant-numeric: tabular-nums; }
.inp.err { border-color: var(--tara-coral); }
select.inp { font-weight: 500; }
.err-text { color: var(--tara-coral-txt); font-weight: 700; font-size: var(--fs-sm); min-height: 1.2em; }
.row { display: flex; gap: 12px; align-items: center; }
.row > * { min-width: 0; }
.grow { flex: 1; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick .btn { height: 38px; min-width: 56px; }
.seg { display: inline-flex; border: 2px solid var(--tara-teal); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 0 18px; height: 44px; font-weight: 800; color: var(--tara-teal); }
.seg button[aria-pressed="true"] { background: var(--tara-teal); color: #fff; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--text-2); border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; gap: 8px; align-items: center; }
.tabs button[aria-selected="true"] { color: var(--tara-teal); border-bottom-color: var(--tara-teal); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.info-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.info-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.info { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.info .k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); font-weight: 700; }
.info .v { font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.info.hl { background: var(--tara-teal-50); border-color: var(--tara-teal-100); }
.info.hl .v { color: var(--tara-teal); font-size: var(--fs-xl); }
.info.neg .v { color: var(--tara-coral-txt); }
.notice { border-radius: var(--radius); padding: 10px 14px; font-size: var(--fs-sm); line-height: 1.45; margin-bottom: 14px; }
.notice.demo { background: var(--tara-gold-50); border: 1px solid #EBCB72; color: #5E4300; }
.notice.warn { background: var(--warn-50); border: 1px solid #E8BE57; color: var(--warn); font-weight: 700; }
.notice.info { background: var(--tara-sky-50); border: 1px solid var(--tara-sky); color: #2B4E7E; }
.notice.danger { background: var(--tara-coral-50); border: 1px solid #F3A79F; color: var(--tara-coral-txt); font-weight: 700; }
.prod-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.prod-head .nm { font-size: var(--fs-xl); font-weight: 800; }
.prod-head .cd { color: var(--text-2); font-family: var(--font-mono); font-size: var(--fs-sm); margin-top: 3px; }
.action-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.action-tile {
  border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius);
  padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; text-align: center;
}
.action-tile:hover { border-color: var(--tara-teal); background: var(--tara-teal-50); }
.action-tile.danger { color: var(--tara-coral-txt); }
.action-tile.danger:hover { border-color: var(--tara-coral); background: var(--tara-coral-50); }
.list { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.list-item { display: grid; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #EEF2F2; cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--row-hover); }
.list-item.active { background: var(--row-sel); box-shadow: inset 4px 0 0 var(--tara-teal); }
.menu-list { display: grid; gap: 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: start; font-weight: 700; }
.menu-item:hover, .menu-item.active { border-color: var(--tara-teal); background: var(--tara-teal-50); }
.menu-item .d { font-weight: 400; color: var(--text-2); font-size: var(--fs-sm); margin-inline-start: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: var(--fs-xs); text-transform: uppercase; color: var(--text-3); letter-spacing: .5px; padding: 8px 10px; border-bottom: 2px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #EEF2F2; }
.tbl tr.active td { background: var(--row-sel); }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl .r { text-align: end; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: var(--fs-xs); font-weight: 800; padding: 3px 8px; border-radius: 10px; white-space: nowrap; letter-spacing: .2px; }
.b-ok { background: var(--ok-50); color: var(--ok); border: 1px solid #A8D8BF; }
.b-pend { background: var(--warn-50); color: var(--warn); border: 1px solid #E8BE57; }
.b-sim { background: var(--tara-teal-50); color: var(--tara-teal-700); border: 1px dashed var(--tara-teal); }
.b-bad { background: var(--tara-coral-50); color: var(--tara-coral-txt); border: 1px solid #F3A79F; }
.b-grey { background: #EEF1F2; color: var(--text-2); border: 1px solid var(--border); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface-2); }
.tile .n { font-size: var(--fs-2xl); font-weight: 800; color: var(--tara-teal); font-variant-numeric: tabular-nums; }
.tile .k { color: var(--text-2); font-weight: 700; font-size: var(--fs-sm); }
.check-row { display: grid; grid-template-columns: 28px 1fr 100px 120px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #EEF2F2; }
.check-row input { width: 20px; height: 20px; accent-color: var(--tara-teal); }

/* ---- Receipt (demo) ---- */
.receipt { position: relative; width: 380px; margin: 0 auto; background: #fff; border: 1px solid var(--border); padding: 18px; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; overflow: hidden; }
.receipt::after { content: attr(data-watermark); position: absolute; top: 45%; inset-inline-start: -10%; inset-inline-end: -10%; text-align: center; transform: rotate(-24deg); font-size: 26px; font-weight: 900; color: rgba(255,109,96,.22); pointer-events: none; font-family: var(--font-ui); }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt .ln { display: flex; justify-content: space-between; gap: 8px; }
/* Bilingual customer receipt (owner feedback phase 5): English over Arabic, amounts in one right-hand column; 72 mm thermal paper.
   Arabic always gets the bundled Arabic font (css/arabic-font.css), whatever the screen language. */
.receipt [lang=ar] { font-family: "TARA Arabic", var(--font-ui); }
.receipt.rcpt-bi { direction: ltr; text-align: left; }
.receipt.rcpt-bi .c { text-align: center; }
.receipt.rcpt-bi .ln { align-items: center; }
.receipt .bi { display: inline-flex; flex-direction: column; line-height: 1.25; }
.receipt .bi [lang=ar] { font-size: .95em; }
.receipt.rcpt-bi .rc-name { font-size: 14px; }
.receipt.rcpt-bi .rc-title { font-size: 13px; margin: 2px 0 6px; }
.receipt.rcpt-bi .rc-total { font-size: 15px; margin-top: 2px; }
.receipt.rcpt-bi .rc-item { margin-bottom: 4px; }
/* "A Message from TARA" — quieter than the legal and money details */
.receipt .rcpt-msg { margin-top: 8px; padding-top: 6px; border-top: 1px dotted #bbb; text-align: center; font-size: 11px; color: #444; }
.receipt .rcpt-msg-t { font-size: 9.5px; color: #777; margin-bottom: 2px; }
.receipt .rcpt-msg [lang=ar] { font-size: 12px; }

/* ---- Payment screen ---- */
.pay { display: grid; grid-template-columns: minmax(300px, 25%) 1fr minmax(380px, 32%); gap: 16px; padding: 16px; height: 100%; min-height: 0; }
.pay-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.pay-methods { display: grid; grid-template-columns: 1fr; gap: 8px; overflow: auto; }
.pm {
  display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; text-align: start;
  border: 2px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 9px 12px;
}
.pm:hover { border-color: var(--tara-teal); }
.pm[aria-pressed="true"] { border-color: var(--tara-teal); background: var(--tara-teal-50); box-shadow: inset 5px 0 0 var(--tara-teal); }
.pm kbd { justify-self: start; }
.pm .n { font-weight: 800; font-size: var(--fs-lg); }
.pm .d { color: var(--text-2); font-size: var(--fs-xs); }
.pay-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.pay-card h3 { margin: 0 0 12px; font-size: var(--fs-lg); display: flex; align-items: center; gap: 10px; }
.big-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.fig { border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); }
.fig .k { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); }
.fig .v { font-size: var(--fs-2xl); font-weight: 800; font-variant-numeric: tabular-nums; text-align: end; }
.fig.change { background: var(--tara-gold-50); border-color: #EBCB72; }
.fig.change .v { color: var(--tara-ink-900); font-size: var(--fs-3xl); }
.tot-stack { display: grid; gap: 8px; }
.tot { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.tot .k { font-weight: 700; color: var(--text-2); }
.tot .v { font-weight: 800; font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.tot.due { background: var(--tara-ink); border-color: var(--tara-ink); }
.tot.due .k, .tot.due .v { color: #fff; }
.tot.due .v { font-size: var(--fs-3xl); }
.tot.rem { border: 2px solid var(--tara-teal); }
.tot.rem .v { color: var(--tara-teal); font-size: var(--fs-2xl); }
.tot.rem.zero { background: var(--ok-50); border-color: var(--ok); }
.tot.rem.zero .v { color: var(--ok); }
.tot.pend .v { color: var(--warn); }
.ledger { flex: 1; min-height: 120px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ledger-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 14px; border-bottom: 1px solid #EEF2F2; }
.ledger-row .m { font-weight: 800; }
.ledger-row .a { font-weight: 800; font-size: var(--fs-lg); text-align: end; font-variant-numeric: tabular-nums; }
.ledger-row .meta { color: var(--text-2); font-size: var(--fs-xs); }
.ledger-row .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.ledger-empty { padding: 20px; color: var(--text-3); text-align: center; }
.complete-reason { font-size: var(--fs-sm); color: var(--text-2); text-align: center; min-height: 1.3em; }
.done { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 14px; text-align: center; padding: 20px; }
.done .ic { width: 84px; height: 84px; border-radius: 50%; background: var(--tara-teal); color: #fff; display: flex; align-items: center; justify-content: center; }
.done h2 { margin: 0; font-size: var(--fs-3xl); }
.done .chg { font-size: 56px; font-weight: 900; color: var(--tara-ink-900); font-variant-numeric: tabular-nums; }

/* ---- Toasts ---- */
.toasts { position: fixed; top: calc(var(--header-h) + 10px); inset-inline-end: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 460px; padding: 11px 16px; border-radius: var(--radius); background: var(--tara-ink-900); color: #fff; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,.25); border-inline-start: 5px solid var(--tara-teal); animation: tin .15s ease-out; }
.toast.warn { border-inline-start-color: var(--tara-gold); }
.toast.error { border-inline-start-color: var(--tara-coral); }
.toast.ok { border-inline-start-color: #3BC48A; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- Customer intelligence & digital receipts ---- */
.chip-int { display: inline-block; font-size: var(--fs-xs); font-weight: 800; padding: 2px 9px; border-radius: 10px; white-space: nowrap; letter-spacing: .2px; text-transform: none;
  background: var(--tara-teal-50); color: var(--tara-teal-700); border: 1px solid var(--tara-teal-100); }
.chip-int.multi { background: var(--tara-gold-50); color: var(--warn); border-color: #EBCB72; }
.chip-int.none { background: #EEF1F2; color: var(--text-2); border-color: var(--border); }
.chip-seg { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.done-card { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 10px; width: min(820px, 100%); }
.done-card .info .v { font-size: var(--fs-xl); }
.done h2.ok { color: var(--tara-teal); letter-spacing: 1px; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.receipt-actions .btn { height: 58px; padding: 0 22px; font-size: var(--fs-lg); }
.pdf-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.pdf-card .ic { width: 38px; height: 46px; border-radius: 4px; background: var(--tara-coral); color: #fff; font-weight: 900; font-size: 11px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; flex: none; }
.pdf-card .nm { font-weight: 800; word-break: break-all; }
.pdf-card .d { font-size: var(--fs-xs); color: var(--text-2); }
.steps { margin: 0 0 12px; padding-inline-start: 20px; font-size: var(--fs-sm); line-height: 1.6; }
.deliv-log { width: min(820px, 100%); font-size: var(--fs-sm); color: var(--text-2); }
.deliv-log .ln { display: flex; gap: 10px; justify-content: space-between; padding: 6px 10px; border-bottom: 1px dashed var(--border); }
textarea.inp.msg { height: 230px; padding: 12px 14px; font-size: var(--fs-md); font-weight: 500; line-height: 1.45; resize: vertical; font-family: var(--font-ui); }
.email-prev { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.email-prev .eh { background: var(--tara-teal); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 12px; font-weight: 800; }
.email-prev .eh img { height: 34px; background: #fff; border-radius: 6px; padding: 2px 4px; }
.email-prev .meta { padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); }
.email-prev .eb { padding: 14px 16px; font-size: var(--fs-sm); line-height: 1.55; }
.email-prev table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.email-prev td { padding: 5px 0; border-bottom: 1px solid #EEF2F2; }
.email-prev td.r { text-align: end; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { text-align: start; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; }
.kpi:hover { border-color: var(--tara-teal); }
.kpi[aria-pressed="true"] { border-color: var(--tara-teal); background: var(--tara-teal-50); box-shadow: inset 0 -4px 0 var(--tara-teal); }
.kpi .n { font-size: var(--fs-2xl); font-weight: 800; color: var(--tara-teal); font-variant-numeric: tabular-nums; }
.kpi .k { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.filters button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 16px; padding: 4px 12px; font-weight: 700; font-size: var(--fs-sm); }
.filters button[aria-pressed="true"] { background: var(--tara-teal); border-color: var(--tara-teal); color: #fff; }
.sharebar { height: 8px; background: #EEF1F2; border-radius: 4px; overflow: hidden; min-width: 90px; }
.sharebar > span { display: block; height: 100%; background: var(--tara-teal); }
.tbl td.mono { white-space: nowrap; }
.tbl tr.excluded td { color: var(--text-3); }
.tbl tr.excluded td b { text-decoration: line-through; }
.consent-box { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.consent-box label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin-inline-end: 18px; }
.consent-box input, .chk { width: 20px; height: 20px; accent-color: var(--tara-teal); }
details.rules summary { cursor: pointer; font-weight: 700; color: var(--tara-teal); margin-top: 10px; }
details.rules pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; font-size: 12px; white-space: pre-wrap; }

/* =====================================================================
   TARA ERP — back-office shell & components (appended after the shared
   POS design tokens/components in build-css.py → css/erp.css)
   ===================================================================== */
body.erp { overflow: auto; height: auto; min-height: 100%; font-size: 14px; }
body.erp.modal-open { overflow: hidden; }
.demo-strip { background: var(--tara-gold-50); border-bottom: 1px solid #EBCB72; color: #5E4300; font-size: 12px; padding: 5px 16px; text-align: center; font-weight: 600; }
.erp-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 0 16px; height: 60px; background: var(--surface); border-bottom: 3px solid var(--tara-teal); }
.erp-top .hdr-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.erp-top .hdr-brand img { height: 44px; }
.erp-title { font-family: var(--font-brand); font-weight: 800; font-size: 20px; color: var(--tara-teal); white-space: nowrap; }
.hamb { display: none; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; height: 38px; width: 42px; align-items: center; justify-content: center; }
.gsearch { position: relative; flex: 1; max-width: 680px; margin-inline-start: 12px; }
.gsearch input { width: 100%; height: 40px; border: 2px solid var(--tara-teal); border-radius: 8px; padding-block: 0 0; padding-inline: 38px 12px; font-size: 14px; font-weight: 600; outline: none; }
.gsearch input:focus { box-shadow: 0 0 0 3px rgba(3,113,113,.16); }
.gsearch .ic { position: absolute; inset-inline-start: 11px; top: 11px; color: var(--tara-teal); }
.gsearch kbd { position: absolute; inset-inline-end: 10px; top: 10px; }
.gs-results { display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; inset-inline-end: -220px; z-index: 80; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 16px 40px rgba(20,35,40,.2); max-height: 70vh; overflow: auto; }
.gs-results.open { display: block; }
.gs-head { padding: 7px 12px; font-size: 12px; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.gs-item { display: grid; grid-template-columns: 42px minmax(220px, 1fr) repeat(5, 74px); gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #EEF2F2; text-decoration: none; color: inherit; }
.gs-item:hover, .gs-item.active { background: var(--row-sel); }
.gs-main small { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.gs-num { text-align: end; font-variant-numeric: tabular-nums; font-size: 13px; }
.gs-num small { display: block; font-size: 10px; color: var(--text-3); text-transform: uppercase; }
.top-r { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.top-r select { height: 36px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 8px; font-size: 13px; font-weight: 600; max-width: 240px; background: var(--surface); }
.erp-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.erp-side { background: var(--tara-ink-900); position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; padding: 12px 10px 20px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; color: #CBD5D5; text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.nav a:hover { background: #3A464D; color: #fff; }
.nav a.active { background: var(--tara-teal); color: #fff; }
.nav a.locked { opacity: .5; }
.nav a .badge-n, .subtabs .badge-n { margin-inline-start: auto; background: var(--tara-gold); color: var(--tara-ink-900); border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 800; }
.nav a .ext { margin-inline-start: auto; font-size: 12px; }
.nav a.pos-link { background: var(--tara-gold); color: var(--tara-ink-900); }
.nav a.pos-link:hover { background: #F7BC1A; }
.nav .sep { height: 1px; background: #3A464D; margin: 8px 4px; }
.side-foot { color: #93A3A8; font-size: 11px; padding: 14px 8px 0; line-height: 1.5; }
.erp-main { padding: 20px 26px 60px; min-width: 0; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.2px; }
.page-h .sub { color: var(--text-2); margin-top: 3px; }
.page-h .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; margin-bottom: 4px; }
.crumb a { color: var(--tara-teal); text-decoration: none; font-weight: 700; }
.subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
.subtabs a { padding: 9px 13px; font-weight: 700; color: var(--text-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.subtabs a.active { color: var(--tara-teal); border-bottom-color: var(--tara-teal); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card h3 .card-r { font-size: 12px; font-weight: 600; color: var(--text-3); }
.card h3 a { color: var(--tara-teal); text-decoration: none; }
.g2, .g3, .g4, .g21, .g12 { display: grid; gap: 14px; margin-bottom: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; text-decoration: none; color: inherit; min-width: 0; }
a.kcard:hover { border-color: var(--tara-teal); }
.kcard .k { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); }
.kcard .v small { font-size: 12px; font-weight: 700; opacity: .7; margin-inline-end: 1px; }
a.btn { text-decoration: none; }
.kcard .v { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .d { font-size: 12px; color: var(--text-2); margin-top: 2px; min-height: 1.2em; }
.kcard.hl { background: var(--tara-teal); border-color: var(--tara-teal); color: #fff; }
.kcard.hl .k, .kcard.hl .d { color: rgba(255,255,255,.85); }
.kcard.warn { border-inline-start: 4px solid var(--tara-gold); }
.kcard.bad { border-inline-start: 4px solid var(--tara-coral); }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); max-width: 100%; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); padding: 9px 10px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.dt td { padding: 8px 10px; border-bottom: 1px solid #EEF2F2; vertical-align: middle; }
.dt tr:last-child td { border-bottom: 0; }
.dt tr.click { cursor: pointer; }
.dt tr.click:hover td { background: var(--row-hover); }
.dt tr.sel td { background: var(--row-sel); }
.dt tr.muted td { color: var(--text-3); }
.dt .r { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt .c { text-align: center; }
.dt td.mono, .dt .nowrap { white-space: nowrap; }
.dt tfoot td { font-weight: 800; background: var(--surface-2); border-top: 2px solid var(--border); }
.dt .sub { font-size: 12px; color: var(--text-3); }
.dt a { color: var(--tara-teal); font-weight: 700; text-decoration: none; }
.cell-p { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.thumb { width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 120px; height: 120px; font-size: 26px; border-radius: 12px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .inp { height: 38px; font-size: 14px; font-weight: 500; width: auto; min-width: 150px; border-width: 1px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar .count { color: var(--text-3); font-size: 13px; margin-inline-start: auto; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; background: var(--tara-teal-50); border: 1px solid var(--tara-teal-100); border-radius: 10px; }
.empty { padding: 28px; text-align: center; color: var(--text-3); }
.neg { color: var(--tara-coral-txt); }
.pos { color: var(--ok); }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #E3E9E9; stroke-width: 1; }
.chart .ax { font-size: 11px; fill: #75848A; font-family: var(--font-ui); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend.v { flex-direction: column; gap: 6px; }
.legend.v small { color: var(--text-3); }
.donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut .d-k { font-size: 11px; fill: #75848A; }
.donut .d-v { font-size: 18px; font-weight: 800; fill: #1E282D; }
.alert-list { display: grid; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); text-decoration: none; color: inherit; font-size: 13px; }
.alert:hover { border-color: var(--tara-teal); }
.alert .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--tara-gold); }
.alert.bad .dot { background: var(--tara-coral); } .alert.info .dot { background: var(--tara-sky); }
.steps-h { display: flex; flex-wrap: wrap; gap: 0; margin: 4px 0 14px; }
.steps-h span { padding-block: 6px 6px; padding-inline: 18px 14px; background: #EEF1F2; color: var(--text-3); font-weight: 700; font-size: 12px; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); margin-inline-end: -4px; }
.steps-h span:first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); padding-inline-start: 12px; }
.steps-h span.done { background: var(--tara-teal-100); color: var(--tara-teal-700); }
.steps-h span.cur { background: var(--tara-teal); color: #fff; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--text-3); font-weight: 700; }
.dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.form-grid .span2 { grid-column: span 2; }
.field .inp { font-size: 15px; height: 42px; border-width: 1px; }
.field textarea.inp { height: auto; min-height: 80px; padding: 10px 12px; font-weight: 500; }
.lines-tbl input.inp, .lines-tbl select.inp { height: 36px; font-size: 14px; border-width: 1px; padding: 0 8px; }
.tg-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-weight: 600; cursor: pointer; }
input.tg { appearance: none; width: 40px; height: 22px; border-radius: 12px; background: #C9D3D3; position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
input.tg::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
input.tg:checked { background: var(--tara-teal); }
input.tg:checked::after { inset-inline-start: 21px; }
.perm td { text-align: center; }
.perm td:first-child { text-align: start; font-weight: 700; white-space: nowrap; }
.perm .yes { color: var(--ok); font-weight: 900; } .perm .no { color: #C2CCCC; }
.status-tile { display: flex; gap: 12px; align-items: center; }
.status-tile .light { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(0,0,0,.05); }
.light.ok { background: #19A06A; } .light.warn { background: var(--tara-gold); } .light.bad { background: var(--tara-coral); } .light.off { background: #B7C4C4; }
.int-card { display: flex; flex-direction: column; gap: 8px; }
.int-card .row { justify-content: space-between; }
.label-sheet { display: flex; flex-wrap: wrap; gap: 10px; }
.label { border: 1px dashed var(--border-strong); border-radius: 6px; padding: 8px 10px; width: 210px; background: #fff; text-align: center; }
.label .nm { font-size: 11px; font-weight: 700; height: 28px; overflow: hidden; }
.label .lbl-int { font-size: 8px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }   /* TARA internal barcode (1.20): never a registered GTIN */
.label .pr { font-size: 15px; font-weight: 900; }
.ean { max-width: 100%; height: auto; }
.mini-bar { height: 8px; background: #EEF1F2; border-radius: 4px; overflow: hidden; min-width: 70px; }
.mini-bar > span { display: block; height: 100%; background: var(--tara-teal); }
.wf-list { display: grid; gap: 6px; font-size: 13px; }
.wf-list a { color: var(--tara-teal); font-weight: 700; text-decoration: none; }
details.box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface); margin-bottom: 12px; }
details.box summary { cursor: pointer; font-weight: 700; color: var(--tara-teal); }
.storage-note { background: var(--tara-coral-50); color: var(--tara-coral-txt); padding: 6px 16px; font-size: 12px; text-align: center; font-weight: 700; }
.modal .lines-tbl td { padding: 6px 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gs-results { inset-inline-end: 0; } .gs-item { grid-template-columns: 42px minmax(160px, 1fr) repeat(3, 70px); } .gs-item .gs-num:nth-of-type(3), .gs-item .gs-num:nth-of-type(5) { display: none; } }
@media (max-width: 1000px) {
  .erp-body { grid-template-columns: 1fr; }
  .erp-side { position: fixed; top: 60px; inset-inline-start: -270px; width: 252px; z-index: 70; transition: inset-inline-start .2s; box-shadow: 8px 0 24px rgba(0,0,0,.25); }
  body.nav-open .erp-side { inset-inline-start: 0; }
  .hamb { display: inline-flex; }
  .g2, .g3, .g21, .g12 { grid-template-columns: 1fr; }
  .erp-main { padding: 14px 12px 50px; }
}
@media (max-width: 640px) {
  .erp-title, .erp-top .demo-badge, .top-r .btn-reset-l { display: none; }
  .erp-top { gap: 8px; padding: 0 10px; }
  .gsearch { margin-inline-start: 0; }
  .gsearch kbd { display: none; }
  .top-r select { max-width: 92px; }
  .top-r { gap: 6px; }
  .top-r .lang-sw button { padding: 0 7px; font-size: 12px; }
  /* 1.5.1: the server header (bell, language, user, switch workspace, documentation, sign out) wraps instead of widening the page */
  .erp-top { flex-wrap: wrap; height: auto; min-height: 60px; row-gap: 6px; padding-block: 6px; }
  .top-r { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
  .top-r .btn { padding-inline: 8px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kcard { padding: 10px 12px; } .kcard .v { font-size: 18px; }
  .g4 { grid-template-columns: 1fr; }
  .page-h h1 { font-size: 20px; }
  .page-h .actions { margin-inline-start: 0; }
  .gs-item { grid-template-columns: 38px 1fr 70px; } .gs-item .gs-num { display: none; } .gs-item .gs-num:nth-of-type(1) { display: block; }
  .form-grid .span2 { grid-column: auto; }
  .dl { grid-template-columns: 1fr; } .dl dt { margin-top: 6px; }
}
@media print { .erp-top, .erp-side, .demo-strip, .page-h .actions, .subtabs, .toolbar { display: none !important; } .erp-body { display: block; } }

/* ---------- link & id polish ---------- */
.erp-main .card a:not(.btn):not(.kcard):not(.alert), .erp-main .dl a, .erp-main .notice a, .erp-main .lbl-sm a { color: var(--tara-teal); font-weight: 700; text-decoration: none; }
.erp-main .card a:not(.btn):hover, .erp-main .dl a:hover { text-decoration: underline; }
.dt .mono, .dt b.mono { white-space: nowrap; }
.dl dd.mono { overflow-wrap: normal; white-space: nowrap; }

/* ---------- service jobs & shared sheets ---------- */
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid figure { margin: 0; width: 140px; }
.photo-grid img { width: 140px; height: 105px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.photo-grid figcaption { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; min-height: 180px; padding: 6px; }
.cal-day.today { border-color: var(--tara-teal); box-shadow: inset 0 3px 0 var(--tara-teal); }
.cal-h { font-weight: 800; font-size: 12px; text-transform: uppercase; color: var(--text-2); padding: 2px 4px 6px; }
.cal-job { display: block; text-decoration: none; color: inherit; font-size: 12px; padding: 6px 7px; border-radius: 6px; margin-bottom: 5px; background: var(--tara-teal-50); border-inline-start: 3px solid var(--tara-teal); }
.cal-job span { display: block; color: var(--text-2); font-size: 11px; }
.cal-job.st-Cancelled { background: var(--tara-coral-50); border-inline-start-color: var(--tara-coral); opacity: .7; }
.cal-job.st-Scheduled, .cal-job.st-Draft { background: var(--tara-gold-50); border-inline-start-color: var(--tara-gold); }
.cal-job.st-New { background: var(--surface); border: 1px dashed var(--tara-gold); border-inline-start: 3px solid var(--tara-gold); }   /* service request: no team yet */
.cal-job.st-Invoiced, .cal-job.st-Completed { background: var(--ok-50); border-inline-start-color: var(--ok); }
.ps-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.ps-methods .btn { height: 46px; }
.ps-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #EEF2F2; flex-wrap: wrap; }
.ps-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.sig-pad { width: 100%; height: 160px; border: 2px dashed var(--border-strong); border-radius: 10px; background: #fff; touch-action: none; display: block; }
@media (max-width: 1000px) { .cal { grid-template-columns: 1fr; } .cal-day { min-height: 0; } }

/* summary tiles (shared with the POS look) wrap on narrow screens */
.erp .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.erp .tile { min-width: 0; }

/* ---------- product thumbnails (small files, lazy, never cropped) ---------- */
.pthumb { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid var(--border); vertical-align: middle; }
.pthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pthumb.ph, .pthumb.noimg { background: var(--tara-teal-50); color: var(--tara-teal); font-weight: 800; font-size: 11px; border-color: transparent; }
.thumb.pthumb { border-radius: 8px; }

/* ---------- universal product picker ---------- */
.picker { position: relative; }
.pk-in, .toolbar .pk-in { width: 100%; }
.pk-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 90; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.18); max-height: 360px; overflow: auto; }
.pk-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.pk-tbl th { position: sticky; top: 0; background: var(--surface-2); color: var(--text-3); font-size: 11px; text-transform: uppercase; text-align: start; padding: 6px 8px; font-weight: 700; }
.pk-tbl td { padding: 5px 8px; border-top: 1px solid #EEF2F2; vertical-align: middle; }
.pk-tbl .r { text-align: end; white-space: nowrap; }
.pk-tbl tr[data-i] { cursor: pointer; }
.pk-tbl tr.on td { background: var(--row-sel); }
.pk-tbl tr[data-i]:hover td { background: var(--row-hover); }
.pk-name b { display: block; } .pk-tbl small { display: block; color: var(--text-3); font-size: 11px; font-weight: 600; }
.pk-empty, .pk-more { padding: 10px 12px; color: var(--text-3); font-size: 13px; }
.pk-msg { min-height: 0; font-size: 13px; margin-top: 4px; } .pk-msg.bad { color: var(--tara-coral-txt); font-weight: 700; }
.modal .pk-host .pk-list { position: static; margin-top: 8px; box-shadow: none; max-height: 52vh; }
@media (max-width: 700px) { .pk-tbl th:nth-child(4), .pk-tbl td:nth-child(4) { display: none; } .pk-list { max-height: 60vh; } }

/* ---- Searchable selector (UI.combo) — long category lists ---- */
.cbx { position: relative; min-width: 220px; }
.cbx-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: start; cursor: pointer; background: var(--surface); }
.cbx-btn .cbx-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbx-btn .cbx-c { color: var(--text-2); font-size: 12px; }
.cbx-n { flex: none; margin-inline-start: auto; font-size: var(--fs-xs); font-weight: 800; color: var(--text-2); background: #EEF1F2; border-radius: 10px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.cbx-pop { position: absolute; z-index: 60; top: calc(100% + 4px); inset-inline-start: 0; width: max(100%, 320px); max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 8px; }
.cbx-q { width: 100%; margin-bottom: 6px; }
.cbx-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.cbx-o { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.cbx-o:hover, .cbx-o.act { background: var(--tara-teal-50); }
.cbx-o.cur { font-weight: 800; color: var(--tara-teal-700); }
.cbx-o.cbx-in { padding-inline-start: 24px; }
.cbx-o.cbx-h { font-weight: 800; border-top: 1px solid var(--border); margin-top: 4px; }
.cbx-g { padding: 8px 10px 4px; font-size: var(--fs-xs); font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .3px; border-top: 1px solid var(--border); margin-top: 4px; }
.cbx-note { font-size: var(--fs-xs); color: var(--text-2); padding: 6px 4px 0; border-top: 1px solid var(--border); margin-top: 6px; }

/* ---- Quick stock filters (company-wide on-hand) ---- */
.qf { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; }
.qf button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 18px; padding: 0 14px; height: 34px; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.qf button[aria-pressed="true"] { background: var(--tara-teal); border-color: var(--tara-teal); color: #fff; }
.qf button[aria-pressed="true"] .cbx-n { background: rgba(255,255,255,.22); color: #fff; }
.qf .qf-note { font-size: var(--fs-xs); color: var(--text-2); }

/* ---- Stock by location (product detail) ---- */
.stock-loc { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.stock-loc th:nth-child(2), .stock-loc td:nth-child(2) { width: 22%; }
.stock-loc th:nth-child(3), .stock-loc td:nth-child(3) { width: 34%; font-size: var(--fs-xs); }
.stock-loc td:first-child { overflow-wrap: anywhere; }
.stock-loc th, .stock-loc td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: start; }
.stock-loc td.r, .stock-loc th.r { text-align: end; font-variant-numeric: tabular-nums; }
.stock-loc tr.stk-tot td { font-weight: 800; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.stock-loc td.neg { color: var(--tara-coral-txt, #B1372A); font-weight: 800; }
.stock-loc .muted { color: var(--text-2); }

/* ---- Product photo (detail) ---- */
.pimg-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pimg-box .pimg { width: 120px; height: 120px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.pimg-box .pimg img { width: 100%; height: 100%; object-fit: contain; }
.pimg-prev { display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; min-height: 220px; }
.pimg-prev img { max-width: 100%; max-height: 360px; object-fit: contain; }

/* ---- In-app notifications (bell + list) ---- */
.ntf-bell { position: relative; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; height: 38px; min-width: 42px; padding: 0 8px; font-size: 17px; cursor: pointer; }
.ntf-bell .badge-n[hidden] { display: none; }
.ntf-bell .badge-n { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--tara-coral, #B1372A); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.ntf-pop { position: fixed; z-index: 9000; width: min(380px, calc(100vw - 16px)); max-height: min(70vh, 520px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.18); }
.ntf-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ntf-list { overflow-y: auto; }
.ntf-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; line-height: 1.4; }
.ntf-item:hover { background: var(--tara-teal-50); }
.ntf-item .ntf-dot { width: 8px; height: 8px; border-radius: 4px; margin-top: 6px; flex: none; background: transparent; }
.ntf-item.unread { font-weight: 700; }
.ntf-item.unread .ntf-dot { background: var(--tara-teal); }
.ntf-at { display: block; font-size: var(--fs-xs); color: var(--text-2); font-weight: 400; }
.ntf-empty { padding: 18px 14px; color: var(--text-2); }
.m-bell { height: 34px; min-width: 38px; margin-inline-end: 6px; }
/* release 1.8.0 — "fix" jumps highlight the invoice line that needs attention */
tr.flash > td { animation: rowflash 1.6s ease-out; }
@keyframes rowflash { from { background: var(--warn-50, #fff3cd); box-shadow: inset 3px 0 0 var(--warn, #b7791f); } to { background: transparent; } }
/* My e-mail & notifications (js/shared/mynotify.js, 1.11) */
.me-prefs { width: 100%; border-collapse: collapse; } .me-prefs th, .me-prefs td { padding: 8px 4px; border-bottom: 1px solid var(--border); text-align: center; } .me-prefs td:first-child, .me-prefs th:first-child { text-align: start; }

/* ---- product catalogue enrichment (release 1.13): completeness figures + VAT-not-confirmed price mark ---- */
.enr-q { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 4px 0 10px; background: var(--card, #fff); }
.enr-q-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.enr-bar { height: 6px; border-radius: 3px; background: var(--border); margin: 8px 0; overflow: hidden; }
.enr-bar span { display: block; height: 100%; background: var(--tara-teal, #037171); }
.enr-ks { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.enr-k { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 104px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: transparent; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.enr-k b { font-size: 1.1em; }
.enr-k span { font-size: .8em; opacity: .8; }
.enr-k.warn b { color: var(--warn); }
.enr-k.ok b { color: var(--tara-teal, #037171); }
.enr-k:hover, .enr-k:focus-visible { border-color: var(--tara-teal, #037171); }
.vat-pend { display: inline-block; font-size: .72em; font-weight: 600; color: var(--warn); white-space: nowrap; }
.enr-file { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 10px; }
@media (max-width: 640px) { .enr-k { min-width: calc(50% - 6px); } }
/* release 1.14 — TARA Smart Product Search: browse bar (empty field), shared-code notice, progressive loading */
.pk-bh { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: inherit; z-index: 1; }
.pk-bh .pk-cat { max-width: 60%; min-width: 0; }
.pk-bn { font-size: 12px; color: var(--text-3); }
.pk-amb { padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--warn); background: var(--warn-50); }
.pk-load { margin: 8px 12px; }

/* release 1.16 — three stock figures on the product page (reference · actual · available to sell) */
.stk3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stk3-c { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px 12px; background: var(--card, #fff); }
.stk3-c .v { font-size: var(--fs-xl, 22px); font-weight: 700; margin: 2px 0; }
.stk3-c.ref { background: var(--surface-2, #f8fafc); border-style: dashed; }
.stk3-c.ref .v { color: var(--muted, #64748b); }

/* release 1.17 — product record dates and the price calculator */
.pb-record { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; background: var(--surface-2, #f8fafc); }
.pc-out { margin-top: 10px; }
.pc-dl { grid-template-columns: max-content 1fr; }
.pc-dl dd[data-pc="price"], .pc-dl dd[data-pc="incl"] { font-size: var(--fs-lg, 17px); }

/* release 1.27: Supplier Invoices & Expenses — declared payment situation */
.decl { border: 1px solid var(--border); border-radius: var(--radius, 10px); padding: 10px 14px; margin: 8px 0; }
.decl legend { font-weight: 800; padding: 0 6px; }
.decl-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; }
.decl-opt { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.decl-quick { flex-wrap: wrap; margin: 4px 0 6px; }
.decl-quick .btn.on { background: var(--tara-teal, #037171); border-color: var(--tara-teal, #037171); color: #fff; }
.decl [data-ddue] .lbl-sm { display: block; margin-top: 2px; }
.decl [hidden], .field[hidden] { display: none !important; }
/* release 1.27.1: read → review → submit */
.rv-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; counter-reset: rv; flex-wrap: wrap; }
.rv-steps li { counter-increment: rv; padding: 4px 10px; border-radius: 999px; background: var(--surface-2, #eef2f2); color: var(--text-2); font-weight: 700; font-size: 13px; }
.rv-steps li::before { content: counter(rv) ". "; }
.rv-steps li.on { background: var(--tara-teal, #037171); color: #fff; }
.rv-reading { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 8px; text-align: center; }
.rv-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.rv-doc { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: #e3f2f2; color: var(--tara-teal, #037171); margin-inline-start: 4px; }
.rv-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rv-warn { margin: 8px 0; }
.rv input[hidden] { display: none !important; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #d7e6e6; border-top-color: var(--tara-teal, #037171); animation: tara-spin 0.9s linear infinite; margin: 0 auto; }
@keyframes tara-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---------- Supplier Payments (release 1.29.0) ---------- */
.sp-card { padding: 14px 16px; }
.sp-h { font-size: 15px; font-weight: 800; margin: 16px 0 6px; }
.sp-sum { margin: 8px 0; font-weight: 700; min-height: 1.4em; }
.sp-confirm { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; padding: 10px 12px; border: 2px solid var(--tara-teal, #037171); border-radius: var(--radius, 10px); background: var(--surface-2); font-weight: 700; cursor: pointer; }
.sp-confirm input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.sp-alloc .sp-q { flex-wrap: nowrap; gap: 4px; }
.sp-alloc td { vertical-align: middle; }
.inp.ro { background: var(--surface-2); color: var(--text); display: flex; align-items: center; }
.kvs { display: grid; gap: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.kv > span { color: var(--muted, #5b6b6b); }
.kv > b { text-align: end; font-weight: 700; }
.sp-actions { margin-top: 14px; }
.sp-stedit { gap: 8px; flex-wrap: wrap; align-items: center; }
.fin-alerts { display: grid; gap: 6px; }
.fin-alerts .fa { border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--surface); }
.fin-alerts .fa.on { border-color: var(--warn); }
.fin-alerts summary { display: flex; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; font-weight: 700; list-style: none; }
.fin-alerts summary::-webkit-details-marker { display: none; }
.fin-alerts .fa-n { min-width: 30px; text-align: center; border-radius: 999px; padding: 2px 8px; background: var(--surface-2); font-weight: 800; }
.fin-alerts .fa.on .fa-n { background: var(--warn-50); color: var(--warn); }
.fin-alerts .fa-list { display: grid; gap: 2px; padding: 0 10px 10px; }
.fin-alerts .fa-row { display: flex; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.fin-alerts .fa-row:hover { background: var(--surface-2); }
.fin-alerts .fa-list .btn { justify-self: start; margin-top: 6px; }
@media (max-width: 700px) {
  .sp-alloc thead { display: none; }
  .sp-alloc tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .sp-alloc td { border: 0; padding: 0; }
  .sp-alloc td:nth-child(2), .sp-alloc td:nth-child(3) { font-size: 12px; color: var(--muted, #5b6b6b); }
  .sp-alloc td:nth-child(5) { grid-column: 1 / -1; }
  .sp-alloc .sp-amt { width: 100% !important; }
  .kv { flex-direction: column; gap: 2px; }
  .kv > b { text-align: start; }
}
.warn-text { color: var(--warn); font-weight: 700; }

/* 1.31: version line, CRM analytics, card reconciliation */
.tara-ver .stage { font-weight: 800; padding: 1px 6px; border-radius: 4px; margin-inline-start: 4px; }
.tara-ver .stage.STAGING, .tara-ver .stage.TEST, .tara-ver .stage.DEVELOPMENT { background: #fff3d1; color: #7d5800; } .tara-ver .stage.PRODUCTION { background: #e2f3ea; color: #0a7146; }
.crm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }
.crm-kpi { border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--surface); padding: 10px 12px; cursor: pointer; text-align: start; color: inherit; font: inherit; }
.crm-kpi:hover, .crm-kpi:focus-visible { border-color: var(--tara-teal, #037171); }
.crm-kpi .k { font-size: 12px; color: var(--muted, #5b6b6b); font-weight: 700; } .crm-kpi .v { font-size: 22px; font-weight: 800; margin-top: 2px; }
.crm-kpi .d { font-size: 12px; } .crm-kpi .d.up { color: var(--ok); } .crm-kpi .d.down { color: var(--tara-coral-txt, #b1372a); }
.crm-chart { width: 100%; height: 180px; } .crm-bars rect.c { fill: var(--tara-teal, #037171); } .crm-bars rect.o { fill: #b9d9d9; }
.crm-split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); } .crm-split > span { display: block; height: 100%; }
.crm-defs { font-size: 12px; color: var(--muted, #5b6b6b); }
.cr-cat { white-space: nowrap; }

/* 1.34 live fish mortality (back office) */
.mr-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mr-grid .card h3 { margin: 0 0 8px; font-size: var(--fs-md); }
.mr-trend { display: flex; align-items: flex-end; gap: 3px; height: 140px; direction: ltr; }
.mr-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.mr-bar span { display: block; width: 100%; min-height: 2px; background: var(--tara-teal); border-radius: 3px 3px 0 0; }
.mr-bar small { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.mr-li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 900px) { .mr-grid { grid-template-columns: 1fr; } }

/* 1.35 live-fish review (back office + phone) */
.lf-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lf-tab { border: 1px solid var(--border); background: var(--surface); border-radius: 20px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; min-height: 40px; }
.lf-tab.on { background: var(--tara-teal); border-color: var(--tara-teal); color: #fff; }
.lf-tab.on .badge-n { background: #fff; color: var(--tara-teal); }
.lf-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.lf-tools .inp { flex: 1 1 220px; min-width: 0; }
.lf-note { margin-bottom: 8px; }
.lf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.lf-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; min-width: 0; }
.lf-card.on { border-color: var(--tara-teal); background: var(--tara-teal-50); }
.lf-card.off { cursor: default; opacity: .8; }
.lf-card .chk { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.lf-x { width: 22px; text-align: center; color: var(--text-3); flex: none; }
.lf-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lf-main b { overflow-wrap: anywhere; }
.lf-sub { font-size: var(--fs-sm); color: var(--text-2); overflow-wrap: anywhere; }
.lf-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
.lf-count { font-weight: 700; }
.lf-confirm-list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin: 8px 0; font-size: var(--fs-sm); }
@media (max-width: 700px) { .lf-list { grid-template-columns: 1fr; } .lf-bar .btn { width: 100%; justify-content: center; } }

/* 1.38 product Overview reference photo: natural size, only scaled down to fit, centred, never enlarged */
.pov-img { margin: 0; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; }
.pov-frame { width: 152px; height: 152px; max-width: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.pov-frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; image-rendering: auto; }
.pov-img figcaption { max-width: 152px; text-align: center; color: var(--text-3); }
/* 1.38.1: the details never get squeezed — beside the photo when there is room, below it otherwise */
.pov-row { flex-wrap: wrap; }
.pov-row > .dl { flex: 1 1 170px; min-width: 170px; }

/* 1.40 Retail X finance history (Accounting › Retail X finance history) — reuses the Inventory Intelligence (.ii-*) pieces */
.rf-hist { font-size: 14px; }
.rf-srcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.rf-src { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 13px; min-width: 0; }
.rf-src.missing { border-style: dashed; opacity: .75; }
.rf-src .ok-t { color: #0A7146; font-weight: 600; }
.rf-pb { margin: 4px 0 10px; }
.rf-pb-h { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rf-pb .ii-stack { display: flex; height: 16px; border-radius: 6px; overflow: hidden; }
.rf-pb-l { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; margin-top: 6px; }
.rf-pb-l i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.rf-party { background: none; border: 0; padding: 0; color: var(--tara-teal); font: inherit; font-weight: 600; cursor: pointer; text-align: start; }
.rf-party:hover { text-decoration: underline; }
.rf-flag, .rf-rate, .rf-match, .rf-cmp { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.rf-flag { background: #FFF4D6; border-color: #ECAC01; color: #6B4E00; }
.rf-flag.creditBalance, .rf-flag.badTrn, .rf-flag.rate { background: #FDE8E6; border-color: #E0A39C; color: #8A2318; }
.rf-rate.inc, .rf-rate.exc { background: #E3F2EC; border-color: #9CCBB4; color: #0A5A39; }
.rf-rate.mixed, .rf-rate.zero { background: #FFF4D6; border-color: #ECAC01; color: #6B4E00; }
.rf-rate.high, .rf-rate.odd { background: #FDE8E6; border-color: #E0A39C; color: #8A2318; }
.rf-match.matched, .rf-cmp.same { background: #E3F2EC; border-color: #9CCBB4; color: #0A5A39; }
.rf-match.review, .rf-cmp.differs { background: #FFF4D6; border-color: #ECAC01; color: #6B4E00; }
.rf-match.rejected, .rf-match.unmatched, .rf-cmp.notInHistory { color: var(--muted, #667); }
.rf-mini .ii-k .v { font-size: 16px; }
.rf-exl { margin: 0; padding-inline-start: 18px; }
.rf .g2 > *, .modal .g2 > * { min-width: 0; }   /* a wide table scrolls inside its card instead of widening the page */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rf-flag, :root:not([data-theme="light"]) .rf-rate, :root:not([data-theme="light"]) .rf-match, :root:not([data-theme="light"]) .rf-cmp { filter: brightness(.9); } }
#rfExport, #rbExport { width: auto; max-width: 280px; font-size: 14px; }
/* 1.41 Retail X books, cash & bank, VAT 201 */
.rf-views { margin-bottom: 10px; align-items: center; }
.rf-abc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.rf-abc > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.rf-abc h4 { margin: 0 0 6px; }
.rf-flow .rf-bar { cursor: pointer; } .rf-flow .rf-bar:hover { opacity: .8; }
.rf-spark { width: 90px; height: 22px; display: block; }
.rf-landlord { padding: 8px 10px; border: 1px solid #B98ED6; border-radius: 8px; margin-bottom: 8px; background: color-mix(in srgb, #B98ED6 10%, transparent); }
.rf-vbars { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding: 6px 0; }
.rf-vb { flex: 1 0 54px; text-align: center; }
.rf-vb .bars { height: 120px; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.rf-vb .bars span { width: 12px; border-radius: 2px 2px 0 0; }
.rf-vb small { font-size: 10.5px; color: var(--muted, #667); }
@media print { .side, .topbar, .tabs, .subtabs, .no-print, #rfExport, #rbExport, .toolbar, .qf, .pageheader .btn { display: none !important; } .rf .card { break-inside: avoid; box-shadow: none; } body { background: #fff; } }
.rf .hx-pm { gap: 2px; overflow: hidden; }   /* 1.41.1: 24 monthly columns shrink to fit the card */
.rf .hx-pmc { flex: 1 1 0; min-width: 0; }
.rf .hx-pmc small { left: 0; font-size: 8px; }
/* ===== 1.42 TARA PULSE 360 — Owner Command Center (back office #/pulse and mobile.html#/owner) ===== */
.pcc { --pcc-good: #0A7146; --pcc-bad: #B1372A; --pcc-warn: #B07A00; display: flex; flex-direction: column; gap: 14px; }
.m-view:has(> .pcc) { max-width: 1480px; }
.pcc-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.pcc-title h1 { margin: 0; font-size: 24px; letter-spacing: .2px; } .pcc-title { display: flex; flex-direction: column; }
.pcc-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcc-meta { flex-basis: 100%; }
.pcc-h2 { margin: 6px 0 -4px; font-size: 17px; }
.pcc-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 14px; align-items: start; }
.pcc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pcc-fin { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pcc-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pcc-sales { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pcc-sales .pcc-wide { grid-column: 1 / -1; }
.pcc .card { margin: 0; min-width: 0; }
.pcc .card h3 { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 0; }
.pcc-be { border-top: 4px solid #AFBEBE; } .pcc-be.green { border-top-color: #0A7146; } .pcc-be.amber { border-top-color: #ECAC01; } .pcc-be.red { border-top-color: #B1372A; }
.pcc-be-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .pcc-be-h h3 { margin: 0; }
.pcc-state { padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12.5px; background: #E9EEEE; color: #3D4850; }
.pcc-state.green { background: #E3F2EC; color: #0A5A39; } .pcc-state.amber { background: #FFF4D6; color: #6B4E00; } .pcc-state.red { background: #FDE8E6; color: #8A2318; }
.pcc-be-grid { display: flex; flex-direction: column; gap: 10px; }
.pcc-kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pcc-kv { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.pcc-kv small { font-size: 11.5px; color: var(--muted, #667); text-transform: uppercase; letter-spacing: .3px; } .pcc-kv b { font-size: 16px; } .pcc-kv span { font-size: 12px; color: var(--muted, #667); }
.pcc-kv.main { border-color: #037171; } .pcc-kv.main b { font-size: 18px; } .pcc-kv.good b { color: var(--pcc-good); } .pcc-kv.bad b { color: var(--pcc-bad); }
.pcc-gauge { width: 100%; max-width: 360px; display: block; margin: 0 auto; }
.pcc-gauge .g-v { font: 800 34px system-ui, sans-serif; fill: var(--text, #1f2a30); } .pcc-gauge .g-k, .pcc-gauge .g-t { font: 600 11px system-ui, sans-serif; fill: #667; }
.pcc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: 12.5px; }
.pcc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; } .pcc-legend i.act { background: #037171; } .pcc-legend i.nd { background: #1f2a30; }
.pcc-dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: 14px; } .pcc-dl dt { color: var(--muted, #667); } .pcc-dl dd { margin: 0; text-align: end; }
.pcc-dl.sm { font-size: 13px; gap: 4px 10px; }
.pcc-formula { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.pcc-reasons { margin: 6px 0 0; padding-inline-start: 18px; font-size: 12.5px; color: var(--muted, #667); }
.pcc-wi { margin-top: 10px; } .pcc-wi summary { cursor: pointer; font-weight: 700; }
.pcc-wi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 8px 0; } .pcc-wi-grid label { display: flex; flex-direction: column; font-size: 13px; } .pcc-wi-grid input[type=range] { width: 100%; }
.good-t { color: var(--pcc-good); } .bad-t { color: var(--pcc-bad); } .warn-t { color: var(--pcc-warn); }
.pcc-att-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .pcc-att-h h3 { margin: 0; }
.pcc-al { border: 1px solid var(--border); border-inline-start: 4px solid #037171; border-radius: 10px; padding: 9px 12px; margin-top: 8px; background: var(--surface); }
.pcc-al.medium { border-inline-start-color: #ECAC01; } .pcc-al.low, .pcc-al.unc { border-inline-start-color: #AFBEBE; }
.pcc-al-h { display: flex; gap: 8px; align-items: baseline; } .pcc-al-h b { flex: 1; }
.pcc-rank { width: 22px; height: 22px; border-radius: 50%; background: #037171; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.pcc-imp { font-weight: 800; white-space: nowrap; } .pcc-imp small { font-weight: 500; color: var(--muted, #667); margin-inline-start: 4px; font-size: 11px; }
.pcc-al p { margin: 4px 0; font-size: 13.5px; } .pcc-unc { color: var(--pcc-warn); }
.pcc-al-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pcc-calm { padding: 18px; text-align: center; color: var(--pcc-good); font-weight: 700; }
.pcc-muted { padding: 6px 0; border-top: 1px solid var(--border); }
.pcc-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #E9EEEE; color: #3D4850; white-space: nowrap; }
.pcc-st.current { background: #E3F2EC; color: #0A5A39; } .pcc-st.provisional { background: #FFF4D6; color: #6B4E00; } .pcc-st.historical { background: #E8EEF7; color: #2B4E7E; }
.pcc-st.stale, .pcc-st.unavailable { background: #FDE8E6; color: #8A2318; } .pcc-st.test { background: #F1E9F7; color: #6B3E8F; }
.pcc-big { font-size: 24px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pcc-chg { font-size: 13px; font-weight: 700; } .pcc-chg.up { color: var(--pcc-good); } .pcc-chg.down { color: var(--pcc-bad); }
.pcc-cmp { display: grid; grid-template-columns: minmax(70px, auto) 1fr auto; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0; }
.pcc-cmp .track { height: 10px; background: #E9EEEE; border-radius: 5px; overflow: hidden; display: flex; } .pcc-cmp .track i { display: block; height: 100%; }
.pcc-rings { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; } .pcc-rings .pcc-dl { flex: 1; min-width: 150px; }
.pcc-ring { display: flex; flex-direction: column; align-items: center; } .pcc-ring svg { width: 80px; height: 80px; } .pcc-ring text { font: 700 15px system-ui, sans-serif; fill: var(--text, #1f2a30); } .pcc-ring small { font-size: 11.5px; color: var(--muted, #667); }
.pcc-wf { display: flex; height: 18px; border-radius: 6px; overflow: hidden; margin: 8px 0; background: #E9EEEE; } .pcc-wf i { display: block; }
.pcc-wf .cash, .sw.cash { background: #0A7146; } .pcc-wf .card, .sw.card { background: #037171; } .pcc-wf .bank, .sw.bank { background: #2B4E7E; } .pcc-wf .later { background: #8E5CC2; } .pcc-wf .open, .sw.open { background: #ECAC01; } .sw.bad { background: #B1372A; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-inline-end: 5px; }
.pcc-hist { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--border); font-size: 13px; }
.pcc-test { color: #6B3E8F; }
.pcc-fc-l { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pcc-ch { margin: 0; padding: 0; list-style: none; } .pcc-ch li { border-bottom: 1px solid var(--border); } .pcc-ch li.good .pcc-chl::before { content: '▲ '; color: var(--pcc-good); } .pcc-ch li.bad .pcc-chl::before { content: '▼ '; color: var(--pcc-bad); }
.pcc-chl { background: none; border: 0; padding: 8px 0; font: inherit; color: inherit; text-align: start; width: 100%; cursor: pointer; } .pcc-chl:hover { color: var(--tara-teal); }
.pcc-src { display: flex; flex-direction: column; gap: 6px; } .pcc-srow { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 13px; } .pcc-srow .nm { font-weight: 600; flex: 1 1 200px; } .pcc-act { flex-basis: 100%; color: var(--tara-teal); }
.pcc .pcc-bar, .pcc .pcc-seg { cursor: pointer; } .pcc .pcc-bar:hover { opacity: .75; }
.pcc-cols { display: flex; gap: 3px; align-items: flex-end; height: 140px; padding-bottom: 18px; } .pcc-cols .c { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; position: relative; }
.pcc-cols .c i { display: block; width: 100%; background: #037171; border-radius: 3px 3px 0 0; min-height: 1px; } .pcc-cols .c small { position: absolute; bottom: -17px; left: 0; right: 0; text-align: center; font-size: 9.5px; color: var(--muted, #667); white-space: nowrap; overflow: hidden; }
.pcc-donut { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .pcc-donut svg { width: 140px; height: 140px; flex: none; } .pcc-donut .ii-legend { flex: 1; min-width: 160px; }
.pcc-lm { list-style: none; margin: 0; padding: 0; } .pcc-lm li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; } .pcc-lm li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcc-spark { display: flex; gap: 2px; align-items: flex-end; height: 46px; cursor: pointer; } .pcc-spark i { flex: 1 1 0; background: #B1372A; border-radius: 2px 2px 0 0; min-height: 2px; }
.pcc-skel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .pcc-skel i { height: 140px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: pccsk 1.2s infinite; }
@keyframes pccsk { to { background-position: -200% 0; } }
#pccBody.busy { opacity: .55; transition: opacity .2s; }
.pcc-foot { margin-top: 4px; }
@media (max-width: 1280px) { .pcc-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .pcc-hero, .pcc-two { grid-template-columns: minmax(0, 1fr); } .pcc-sales, .pcc-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pcc-kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pcc-fin, .pcc-sales, .pcc-ops, .pcc-wi-grid { grid-template-columns: minmax(0, 1fr); } .pcc-title h1 { font-size: 20px; } .pcc-big { font-size: 21px; } .pcc-skel { grid-template-columns: 1fr; }
  .pcc-al-a .btn { min-height: 40px; } .pcc-ctl .qf button { min-height: 40px; } }
@media print { .pcc-ctl, .pcc-al-a, .pcc-fc-l { display: none !important; } }
.pcc-recon { margin-top: 8px; } .pcc-recon summary { cursor: pointer; font-weight: 700; } .pcc-rct td { padding: 4px 6px; } .pcc-rct tr.tot td { border-top: 1px solid var(--border); } .pcc-rct tr.main td { background: var(--surface-2); }
.pcc-fresh { margin-top: 8px; font-size: 13px; } #pccLosses tr.hl td { background: color-mix(in srgb, #B1372A 6%, transparent); }
/* ===== 1.45 reporting date ranges (shared/daterange.js) ===== */
.dr-sel { width: auto; height: 38px; font-size: 14px; max-width: 100%; }
.dr-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dr-print { display: none; }
.dr-dlg input[type="date"] { min-width: 0; width: 100%; }
input[type="date"][aria-invalid="true"] { border-color: var(--danger, #B1372A); box-shadow: 0 0 0 2px color-mix(in srgb, #B1372A 25%, transparent); }
@media print { .dr-print { display: block !important; margin: 0 0 10px; font-size: 13px; } .dr-tools { display: none !important; } }
@media (max-width: 640px) { .toolbar .dr-sel { flex: 1 1 100%; } }
.pl-filters .dr-sel { flex: 0 1 auto; min-width: 0; max-width: 48vw; height: 34px; font-size: 13px; }
