/* mod-stock styles: inventory, daily sales, products, clients */

/* highlighted serial row (deep link ?serial=) */
.tbl tbody tr:has(.stk-mark) td { background: var(--warn-bg); }
.stk-mark { display: none; }
.stk-hl-card { border-color: var(--warn); }

/* date input in the sales toolbar keeps its natural width */
.toolbar input[type="date"].in { height: 38px; }

@media (max-width: 900px) {
  .tbl tbody tr:has(.stk-mark) { border-color: var(--warn); }
  .tbl tbody tr:has(.stk-mark) td { background: transparent; }
  .toolbar .seg { order: 3; }
}

/* unit sales vs service sales */
.stk-split { display: flex; }
.stk-split i, .stk-splitbar i { display: block; height: 100%; }
.stk-split i.u, .stk-splitbar i.u, .stk-legend i.u { background: var(--ink); }
.stk-split i.s, .stk-splitbar i.s, .stk-legend i.s { background: var(--muted); opacity: .45; }
.stk-split i.u { border-radius: 99px 0 0 99px; }
.stk-splitbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--neutral-bg); }
.stk-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; font-weight: 650; color: var(--text); }
.stk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stk-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ================= round 7 ================= */
/* shared: brand mark + small flags */
.stk-bm { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.stk-bm.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 17px; }
.stk-bm.xs { width: 18px; height: 18px; border-radius: 5px; font-size: 8.5px; margin-right: 2px; }
.stk-flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 750; padding: 3px 9px; border-radius: 99px; }
.stk-flag svg.i { width: 13px; height: 13px; }
.stk-flag.ok { background: var(--ok-bg); color: var(--ok); }
.stk-flag.warn { background: var(--warn-bg); color: var(--warn); }
.stk-flag.bad { background: var(--bad-bg); color: var(--bad); }
.stk-brands { margin: -4px 0 12px; }
.stk-brands .chip { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Units: product cards ---------- */
.stk-ugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.stk-uc { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stk-uc:hover { transform: translateY(-2px); border-color: var(--dim); box-shadow: 0 10px 26px rgba(11, 21, 51, .08); }
.stk-uc-h { display: flex; align-items: center; gap: 12px; }
.stk-uc-h > svg.i { margin-left: auto; color: var(--dim); flex: none; }
.stk-uc-t { min-width: 0; }
.stk-uc-t b { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.25; }
.stk-uc-t span { font-size: 12px; color: var(--muted); }
.stk-uc-n { display: flex; gap: 6px; }
.stk-uc-n > div { flex: 1; padding: 8px 6px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.stk-uc-n > div.big { background: #0b1533; }
.stk-uc-n b { display: block; font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stk-uc-n .big b, .stk-uc-n .big em { color: #fff; }
.stk-uc-n em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stk-uc-b { display: flex; flex-direction: column; gap: 6px; }
.stk-br { display: grid; grid-template-columns: 64px 1fr 22px; align-items: center; gap: 8px; font-size: 12px; }
.stk-br > span { color: var(--muted); font-weight: 650; }
.stk-br > b { text-align: right; color: var(--ink); }
.stk-track { display: flex; height: 7px; border-radius: 99px; background: var(--neutral-bg); overflow: hidden; }
.stk-track i { display: block; height: 100%; }
.stk-track i.s { background: var(--ok); }
.stk-track i.r { background: var(--warn); opacity: .7; }
.stk-uc-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); }

/* ---------- Unit profile ---------- */
.stk-up-hero { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px 16px; align-items: center; padding: 20px; border-radius: 22px; background: #0b1533; color: #fff; overflow: hidden; margin-bottom: 12px; }
.stk-up-hero::before { content: ""; position: absolute; right: -90px; top: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 184, 240, .3), transparent 65%); }
.stk-up-hero > * { position: relative; }
.stk-up-t h2 { color: #fff; font-size: 22px; letter-spacing: -.02em; }
.stk-up-t p { color: rgba(255, 255, 255, .7); font-size: 13px; margin-top: 2px; }
.stk-back { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.stk-back:hover { color: #fff; text-decoration: none; }
.stk-up-acts .btn { background: #fff; color: var(--ink); border-color: #fff; }
.stk-up-k { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stk-up-k > div { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.stk-up-k b { display: block; font-size: 20px; font-weight: 800; color: #fff; }
.stk-up-k em { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .65); font-weight: 650; }
.stk-up-br { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stk-up-bc { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stk-up-bc em { display: block; font-style: normal; font-size: 11.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stk-up-bc b { font-size: 24px; font-weight: 800; color: var(--ink); }
.stk-up-bc span { display: block; font-size: 12px; color: var(--muted); }
.stk-up-bc.warn b { color: var(--warn); }
.stk-up-bc.bad b { color: var(--bad); }
.stk-srs { display: flex; flex-direction: column; gap: 6px; }
.stk-sr { display: grid; grid-template-columns: minmax(150px, 1.3fr) auto minmax(90px, .7fr) minmax(150px, 1.3fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.stk-sr:hover { border-color: var(--ink); background: var(--surface-2); }
.stk-sr[hidden] { display: none; }
.stk-sr-sn b { display: block; font-size: 13.5px; color: var(--ink); }
.stk-sr-sn em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.stk-sr-m { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; min-width: 0; }
.stk-sr-m svg.i { width: 14px; height: 14px; color: var(--dim); flex: none; }
.stk-sr-d { font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.35; }

/* serial profile (modal) */
.stk-sp-h { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.stk-sp-h > div { flex: 1; min-width: 0; }
.stk-sp-h b { display: block; font-size: 17px; color: var(--ink); }
.stk-sp-h > div span { display: block; font-size: 13px; color: var(--muted); }
.stk-sp-h em { font-style: normal; font-size: 12.5px; color: var(--text); font-weight: 650; }
.stk-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.stk-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 0 6px; }
.stk-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stk-steps li:first-child::before { display: none; }
.stk-steps li.on::before { background: var(--ok); }
.stk-steps li > span { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); color: var(--dim); }
.stk-steps li.on > span { background: var(--ok); border-color: var(--ok); color: #fff; }
.stk-steps b { font-size: 13px; color: var(--ink); }
.stk-steps em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.stk-sp-c { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; line-height: 1.55; }
.stk-sp-c h4 { display: flex; align-items: center; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.stk-wr { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface); margin-bottom: 6px; font-size: 12.5px; }
.stk-wr.ok b { color: var(--ok); }
.stk-wr span { color: var(--muted); }

/* ---------- Receive units: scan textareas ---------- */
.stk-rule { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 1.45; }
.stk-rule svg.i { flex: none; margin-top: 2px; }
.stk-scan { display: grid; grid-template-columns: 1fr; gap: 10px; }
.stk-scan.two { grid-template-columns: 1fr 1fr; }
.stk-scanbox label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 12.5px; }
.stk-scanbox label span { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: #0b1533; color: #fff; }
.stk-scanbox textarea { width: 100%; height: auto; min-height: 150px; padding: 10px 12px; line-height: 1.6; resize: vertical; font-size: 13px; }
.stk-sum { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; padding: 9px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.stk-sum.ok { background: var(--ok-bg); color: var(--ok); }
.stk-sum.bad { background: var(--bad-bg); color: var(--bad); }
.stk-pairs { max-height: 200px; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.stk-pt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.stk-pt th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); padding: 6px 10px; }
.stk-pt td { padding: 5px 10px; border-top: 1px solid var(--line-2); }
.stk-pt td:first-child, .stk-pt th:first-child { width: 36px; color: var(--dim); }

/* ---------- Purchase order document (preview + print) ---------- */
.stk-pod-wrap { background: var(--surface-2); padding: 12px; border-radius: 14px; }
.stk-pod { background: #fff; color: #111827; padding: 26px 28px; border-radius: 10px; font-size: 13px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.stk-pod-h { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 14px; border-bottom: 2px solid #0b1533; }
.stk-pod-h img { height: 54px; width: auto; max-width: 150px; object-fit: contain; }
.stk-pod-co { display: flex; flex-direction: column; font-size: 12px; color: #4b5563; }
.stk-pod-co b { font-size: 16px; color: #0b1533; }
.stk-pod-no { margin-left: auto; text-align: right; display: flex; flex-direction: column; font-size: 12px; color: #4b5563; }
.stk-pod-no em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; }
.stk-pod-no b { font-size: 20px; color: #0b1533; }
.stk-pod-to { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.stk-pod-to > div { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 12.5px; color: #374151; }
.stk-pod-to em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; margin-bottom: 2px; }
.stk-pod-to b { color: #0b1533; font-size: 14px; }
.stk-pod-t { width: 100%; border-collapse: collapse; }
.stk-pod-t th { background: #0b1533; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 7px 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.stk-pod-t td { padding: 7px 8px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.stk-pod-t td span { display: block; font-size: 11px; color: #6b7280; }
.stk-pod-t .num { text-align: right; white-space: nowrap; }
.stk-pod-t tfoot td { font-weight: 800; font-size: 14px; color: #0b1533; border-bottom: 0; border-top: 2px solid #0b1533; }
.stk-pod-n { margin-top: 16px; font-size: 12px; color: #374151; }
.stk-pod-n ol { margin: 4px 0 0 18px; padding: 0; }
.stk-pod-s { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; font-size: 12px; text-align: center; color: #4b5563; }
.stk-pod-s > div { border-top: 1px solid #0b1533; padding-top: 4px; }
.stk-pod-s span { display: block; margin-top: -24px; margin-bottom: 8px; min-height: 16px; font-weight: 700; color: #0b1533; }
.stk-pod-f { margin-top: 18px; font-size: 10.5px; color: #9ca3af; text-align: center; }
#stk-print { display: none; }
@media print {
  body.stk-printing > *:not(#stk-print) { display: none !important; }
  body.stk-printing #stk-print { display: block !important; }
  body.stk-printing { background: #fff !important; }
  #stk-print .stk-pod { box-shadow: none; padding: 0; border-radius: 0; }
}

/* ---------- Daily Sales: From – To ---------- */
.stk-range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stk-range-in { display: flex; align-items: flex-end; gap: 6px; }
.stk-range-in label { display: flex; flex-direction: column; gap: 2px; }
.stk-range-in label em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.stk-range-in input.in { height: 38px; width: auto; }
.stk-range-to { padding-bottom: 9px; color: var(--dim); font-weight: 700; }
.stk-range-l { font-size: 13.5px; }

/* ---------- Clients: cards ---------- */
.stk-csum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stk-csum > div { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stk-csum b { display: block; font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.stk-csum em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.stk-csum .bad b { color: var(--bad); }
.stk-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stk-sort select { width: auto; }
.stk-cwrap .bulk-bar { border-radius: 12px; margin-bottom: 10px; }
.stk-cwrap.selecting .bulk-bar { display: flex; }
.stk-call { display: inline-flex; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.stk-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.stk-cc { position: relative; height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stk-cc:hover { transform: translateY(-2px); border-color: var(--dim); box-shadow: 0 10px 26px rgba(11, 21, 51, .08); }
.stk-ccw { position: relative; min-width: 0; }
.stk-ccw:has(.stk-csel input:checked) .stk-cc { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.stk-cc.owe { background: linear-gradient(180deg, var(--surface) 70%, var(--bad-bg)); }
.stk-csel { position: absolute; z-index: 2; top: 14px; right: 14px; display: flex; }
.stk-csel input { width: 19px; height: 19px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.stk-cc-h { display: flex; align-items: center; gap: 12px; padding-right: 26px; }
.stk-cc-h > div { min-width: 0; }
.stk-cc-h b { display: block; color: var(--ink); font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-av { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 14.5px; }
.stk-tag { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--neutral-bg); color: var(--muted); }
.stk-tag.biz { background: #efe9ff; color: #6a3fd1; }
.stk-cc-c { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.stk-cc-c a, .stk-cc-c span { display: inline-flex; align-items: center; gap: 6px; }
.stk-cc-c a { color: var(--ink); font-weight: 700; width: fit-content; }
.stk-cc-c svg.i { width: 14px; height: 14px; color: var(--dim); }
.stk-cc-n { display: grid; grid-template-columns: .7fr .7fr 1.4fr; gap: 6px; }
.stk-cc-n > div { padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.stk-cc-n b { display: block; font-size: 15px; font-weight: 800; color: var(--ink); }
.stk-cc-n em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stk-cc-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.stk-bal, .stk-paid { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; }
.stk-bal { color: var(--bad); }
.stk-paid { color: var(--ok); }
.stk-bal svg.i, .stk-paid svg.i { width: 14px; height: 14px; }

/* ---------- phone ---------- */
@media screen and (max-width: 900px) {
  .stk-ugrid, .stk-cgrid { grid-template-columns: minmax(0, 1fr); }
  .stk-utool .inp-search, .stk-up-list .toolbar .inp-search, .stk-ctool .inp-search { flex: 1 1 100%; }
  /* the PO preview keeps its paper layout and scrolls sideways inside the modal */
  .stk-pod-wrap { padding: 6px; overflow-x: auto; contain: inline-size; }
  .stk-pod-wrap .stk-pod { min-width: 580px; }
  .stk-utool .btn { width: 100%; }
  .stk-brands { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .stk-brands .chip, .stk-up-list .chips .chip { flex: none; }
  .stk-up-list .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .stk-up-hero { grid-template-columns: auto 1fr; padding: 16px; border-radius: 20px; }
  .stk-up-acts { grid-column: 1 / -1; }
  .stk-up-acts .btn { width: 100%; }
  .stk-up-k { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stk-up-k > div:last-child { grid-column: 1 / -1; }
  .stk-up-t h2 { font-size: 19px; }
  .stk-up-br { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .stk-up-bc { padding: 10px; }
  .stk-up-bc b { font-size: 20px; }
  .stk-up-bc span { font-size: 11px; }
  .stk-sr { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .stk-sr-m { grid-column: 1 / -1; }
  .stk-sr-d { grid-column: 1 / -1; text-align: left; }
  .stk-sr-d br { display: none; }
  .stk-steps b { font-size: 12px; }
  .stk-scan.two { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stk-scanbox textarea { min-height: 130px; font-size: 12px; padding: 8px; }
  .stk-pod { padding: 16px; }
  .stk-pod-h { flex-wrap: wrap; }
  .stk-pod-no { margin-left: 0; text-align: left; width: 100%; }
  .stk-pod-to { grid-template-columns: 1fr; }
  .stk-pod-s { gap: 12px; }
  .stk-pod-t { font-size: 12px; }
  .stk-range { gap: 8px; }
  .stk-range-in { width: 100%; }
  .stk-range-in label { flex: 1; min-width: 0; }
  .stk-range-in input.in { width: 100%; min-width: 0; padding: 0 6px; font-size: 13px; }
  .stk-range .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .stk-range .chips .chip { flex: none; }
  .stk-range-l { width: 100%; }
  .stk-range .btn { width: 100%; }
  .stk-csum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stk-csum b { font-size: 17px; }
  .stk-sort { width: 100%; justify-content: space-between; }
}

/* ---------- Customer details (client page): hero, stats, collapsible orders with J.O. log, transaction history ---------- */
.cd-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: 14px 16px; align-items: center; padding: 20px 22px; margin: 6px 0 14px; border-radius: 22px; color: #fff; background: #0b1533; box-shadow: 0 18px 40px rgba(11, 21, 51, .18); }
.cd-hero::before { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 184, 240, .35), transparent 65%); }
.cd-hero > * { position: relative; }
.cd-hero .stk-av { width: 56px; height: 56px; font-size: 19px; border: 2px solid rgba(255, 255, 255, .25); }
.cd-kick { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.cd-hero h1 { color: #fff; font-size: 24px; letter-spacing: -.02em; margin: 1px 0 3px; }
.cd-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.cd-hero-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cd-hero-a .btn:not(.grad) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.cd-contact { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr); gap: 8px; }
.cd-contact > div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.cd-contact em { display: block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 2px; }
.cd-contact b, .cd-contact a { font-size: 13.5px; color: #fff; overflow-wrap: anywhere; }
.cd-contact a { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.cd-contact .cd-waze { margin-left: 6px; font-size: 12px; color: #7fd9ff; }
.cd-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.cd-stats > div { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cd-stats em { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cd-stats b { display: block; font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 3px 0 1px; }
.cd-stats span { font-size: 11.5px; color: var(--dim); }
.cd-stats .ok b { color: #0f7a55; }
.cd-stats .bad b { color: var(--bad); }
.cd-sec-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 2px 10px; }
.cd-sec-h h2 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.cd-sec-h span { font-size: 12.5px; color: var(--muted); }
.cd-orders { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.cd-order { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.cd-order[open] { border-color: #c9cfdc; }
.cd-order.closed { opacity: .78; }
.cd-order > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.cd-order > summary::-webkit-details-marker { display: none; }
.cd-order > summary:hover { background: var(--surface-2); }
.cd-on { min-width: 0; }
.cd-on b { display: block; font-size: 15px; color: var(--ink); }
.cd-on em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.cd-oamt { text-align: right; font-weight: 800; color: var(--ink); font-size: 15px; white-space: nowrap; }
.cd-oamt em { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; }
.cd-obadges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cd-chev { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--muted); transition: transform .2s; }
.cd-order[open] .cd-chev { transform: rotate(180deg); }
.cd-obody { padding: 4px 16px 16px; border-top: 1px solid var(--line-2); }
.cd-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.cd-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cd-tile, .cd-block { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); min-width: 0; }
.cd-tile em, .cd-block > em, .cd-items > em { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.cd-tile b, .cd-block > b { display: block; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.cd-tile.ok b { color: #0f7a55; }
.cd-tile.bad b { color: var(--bad); }
.cd-block { margin-top: 8px; }
.cd-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-pays { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-pay { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--text); }
.cd-pay b { color: #0f7a55; }
.cd-pay svg.i { width: 12px; height: 12px; }
.cd-log { margin-top: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.cd-log-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cd-log-h b { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); }
.cd-log-h .btn { margin-left: auto; }
.cd-visit { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); }
.cd-visit + .cd-visit { margin-top: 8px; }
.cd-vn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #0b1533; color: #fff; font-size: 12px; font-weight: 800; }
.cd-visit.st-done .cd-vn { background: #0f7a55; }
.cd-vb { min-width: 0; flex: 1; }
.cd-vh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cd-first { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; }
.cd-vl { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text); }
.cd-vl span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.cd-vl svg.i { width: 13px; height: 13px; color: var(--muted); }
.cd-vl i { color: var(--dim); }
.cd-items { margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); font-size: 13px; }
.cd-items > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.cd-items-t { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 8px !important; font-weight: 800; color: var(--ink); }
.cd-items.empty { text-align: center; color: var(--dim); }
.cd-th { margin-bottom: 14px; }
.cd-thf { margin-bottom: 10px; }
.cd-thf .chip span { font-size: 10.5px; opacity: .65; margin-left: 2px; }
.cd-tht { width: 100%; border-collapse: collapse; font-size: 13px; }
.cd-tht th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cd-tht td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); }
.cd-tht .num { text-align: right; white-space: nowrap; }
.cd-th[data-f="order"] tbody tr:not([data-k="order"]), .cd-th[data-f="dr"] tbody tr:not([data-k="dr"]),
.cd-th[data-f="invoice"] tbody tr:not([data-k="invoice"]), .cd-th[data-f="quote"] tbody tr:not([data-k="quote"]) { display: none; }
.cd-rec { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.cd-rec.order { background: #e7efff; color: #1d4ed8; }
.cd-rec.dr { background: #fff1d6; color: #9a5b00; }
.cd-rec.invoice { background: #dff5ea; color: #0f7a55; }
.cd-rec.quote { background: #efe8ff; color: #6a3fd1; }
.cd-st { font-size: 12px; color: var(--muted); }
.cd-open a, .linkb { font-weight: 700; color: var(--ink); }
.linkb { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media screen and (max-width: 900px) {
  .cd-hero { grid-template-columns: auto 1fr; padding: 16px; border-radius: 20px; }
  .cd-hero h1 { font-size: 20px; }
  .cd-hero-a { grid-column: 1 / -1; justify-content: stretch; }
  .cd-hero-a .btn { flex: 1; }
  .cd-contact { grid-template-columns: 1fr 1fr; }
  .cd-contact .wide { grid-column: 1 / -1; }
  .cd-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cd-stats > div:last-child { grid-column: 1 / -1; }
  .cd-stats b { font-size: 18px; }
  .cd-order > summary { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "on chev" "amt amt" "bd bd"; row-gap: 6px; padding: 12px 14px; }
  .cd-on { grid-area: on; } .cd-chev { grid-area: chev; }
  .cd-oamt { grid-area: amt; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .cd-obadges { grid-area: bd; justify-content: flex-start; }
  .cd-obody { padding: 4px 12px 14px; }
  .cd-acts .btn { flex: 1 1 calc(50% - 8px); }
  .cd-tiles { grid-template-columns: 1fr 1fr; }
  .cd-2 { grid-template-columns: 1fr; }
  .cd-log { padding: 10px; }
  .cd-log-h .btn { margin-left: 0; width: 100%; }
  .cd-thf { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 10px; padding: 0 14px; }
  .cd-thf::-webkit-scrollbar { display: none; }
  .cd-thf .chip { flex: none; }
  .cd-tht thead { display: none; }
  .cd-tht, .cd-tht tbody, .cd-tht tr, .cd-tht td { display: block; width: 100%; }
  .cd-tht tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .cd-tht td { padding: 0; border: 0; }
  .cd-tht td[data-l="Date"] { grid-column: 1; font-size: 11.5px; color: var(--muted); }
  .cd-tht td[data-l="Record"] { grid-column: 2; grid-row: 1; text-align: right; }
  .cd-tht td[data-l="Reference"] { grid-column: 1; font-weight: 700; color: var(--ink); }
  .cd-tht td[data-l="Amount"] { grid-column: 2; grid-row: 2; font-weight: 800; }
  .cd-tht td[data-l="Status"] { grid-column: 1; }
  .cd-tht td.cd-open { grid-column: 2; grid-row: 3; text-align: right; }
}
/* customer details: items per J.O. visit */
.cd-vitems { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.cd-vitems > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.cd-vitems .t { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 5px; font-weight: 700; color: var(--ink); }
.cd-vitems.empty { color: var(--muted); }

/* ---------- Daily Sales: Installation | Cleaning | Repair & others ---------- */
:root { --sc-install: #0b1533; --sc-clean: #0e9f6e; --sc-other: #d98a00; }
.sc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.sc-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sc-card.sc-install { background: #0b1533; color: #fff; border-color: #0b1533; }
.sc-h { display: flex; align-items: center; gap: 8px; }
.sc-h b { font-size: 14px; }
.sc-h em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 650; opacity: .7; }
.sc-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.sc-install .sc-ic { background: rgba(255,255,255,.12); }
.sc-clean .sc-ic { background: #e3f6ee; color: var(--sc-clean); }
.sc-other .sc-ic { background: #fff3dc; color: var(--sc-other); }
.sc-big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 2px; }
.sc-big span { display: block; font-size: 11.5px; font-weight: 650; letter-spacing: 0; opacity: .65; }
.sc-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; border-top: 1px dashed var(--line-2); }
.sc-install .sc-row { border-top-color: rgba(255,255,255,.14); }
.sc-install .sc-row .bad-t { color: #ff9b9b; }
.sc-row.sc-inc b { font-size: 16px; color: var(--ok); }
.sc-install .sc-row.sc-inc b { color: #3fcf98; }
.sc-card .btn { margin-top: auto; align-self: flex-start; }
.sc-install .btn { color: #fff; border-color: rgba(255,255,255,.25); background: transparent; }
.sc-graphs { margin-bottom: 14px; }
.sc-chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; overflow-x: auto; padding-bottom: 2px; }
.sc-col { flex: 1 0 26px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.sc-col em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sc-col span { font-size: 10px; color: var(--dim); white-space: nowrap; }
.sc-stack { width: 100%; max-width: 34px; display: flex; flex-direction: column-reverse; border-radius: 7px 7px 3px 3px; overflow: hidden; background: var(--line-2); }
.sc-stack i, .sc-key i { display: block; }
i.install { background: var(--sc-install); } i.clean { background: var(--sc-clean); } i.other { background: var(--sc-other); }
.sc-key { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.sc-key.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 650; }
.sc-key span { display: flex; align-items: center; gap: 6px; }
.sc-key b { margin-left: auto; padding-left: 10px; }
.sc-key i { width: 10px; height: 10px; border-radius: 3px; }
.sc-mix { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sc-donut { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.sc-donut > div { width: 96px; height: 96px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sc-donut b { font-size: 13px; color: var(--ink); }
.sc-donut span { font-size: 10.5px; color: var(--muted); }
.sc-mix .sc-key { flex: 1; min-width: 160px; }
.sc-flow-bar { display: flex; height: 34px; border-radius: 10px; overflow: hidden; }
.sc-flow-bar i { display: flex; align-items: center; justify-content: center; min-width: 0; font-style: normal; color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; }
.sc-flow-bar i.net { background: #c94a4a; }
.sc-flow-bar i.inc { background: #0e9f6e; }
.sc-flow-eq { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.sc-flow-eq b { color: var(--ink); font-size: 15px; margin-left: 4px; }
.sc-flow-eq .ok-t b { color: var(--ok); }
@media screen and (max-width: 900px) {
  .sc-cards { grid-template-columns: minmax(0, 1fr); }
  .sc-chart { height: 170px; }
  .sc-donut { width: 130px; height: 130px; }
  .sc-donut > div { width: 84px; height: 84px; }
}
/* Daily Sales › Invoices */
.inv-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.inv-bar .btn { margin-left: auto; }
@media print { #wl-print .inv-page { page-break-after: always; break-after: page; } #wl-print .inv-page:last-child { page-break-after: auto; break-after: auto; } }
/* J.O. › Scan serials */
.sn-need { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sn-need span { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; }
.sn-need em { font-style: normal; font-weight: 800; color: var(--muted); }
.sn-need span.full { border-color: var(--ok); background: var(--ok-bg, #e7f7ef); }
.sn-need span.full em { color: var(--ok); }
.sn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
.sn-grid textarea { min-height: 220px; font-size: 13px; line-height: 1.7; }
.sn-out { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.sn-row { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; }
.sn-row.ok { background: #e7f7ef; } .sn-row.ok em { color: #0b7a4f; }
.sn-row.bad { background: #fdecec; } .sn-row.bad em { color: var(--bad); }
.sn-row em { font-style: normal; font-weight: 650; }
@media screen and (max-width: 900px) { .sn-grid { grid-template-columns: minmax(0, 1fr); } .sn-grid textarea { min-height: 150px; } }
.sn-row.dup { background: var(--surface-2); } .sn-row.dup em { color: var(--muted); }
