/* 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; }

/* ---- 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 .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; }
  .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-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; } }
