/* Accere OS · Stock counts module (count.js). Loaded by count.js itself if index.html doesn't link it. */
.cnt-ok { color: var(--ok); font-weight: 600; }
.cnt-bad { color: var(--bad); font-weight: 600; }
.cnt-sub { font-size: 15px; margin: 18px 0 8px; }
.cnt-lock { display: flex; align-items: center; gap: 6px; color: var(--ok); margin: -6px 0 12px; }
.cnt-lock svg { width: 16px; height: 16px; }
.cnt-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cnt-cards .card + .card { margin-top: 0; }
.cnt-form .card { margin-bottom: 14px; }
.cnt-form textarea { width: 100%; }

/* Status stepper */
.cnt-steps { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; }
.cnt-steps li { counter-increment: s; font-size: 12.5px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--neutral-bg); color: var(--muted); }
.cnt-steps li::before { content: counter(s) " "; font-weight: 700; }
.cnt-steps li.done { background: var(--ok-bg); color: var(--ok); }
.cnt-steps li.now { background: var(--blue); color: #fff; font-weight: 650; }

/* Set-up */
.cnt-locs { list-style: none; margin: 0; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cnt-locs li { font-size: 14px; }
.cnt-locpick { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px 2px; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.cnt-locpick legend { padding: 0 4px; }
.cnt-tol input { width: 110px; max-width: 100%; }
.cnt-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0 14px; }
.cnt-map select { width: 100%; }
.cnt-imp textarea { width: 100%; margin: 6px 0; }
.cnt-errs { max-height: 380px; overflow: auto; }
.cnt-layout { display: grid; gap: 6px; }
.cnt-lrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.cnt-lrow input, .cnt-lrow select { width: 100%; min-width: 0; }
.cnt-lbtns { display: inline-flex; gap: 2px; }
.cnt-recbar { background: var(--warn-bg); border-radius: var(--radius-sm); padding: 8px 10px; }
.cnt-recbar select { min-width: 0; max-width: 100%; }
.cnt-out { align-items: center; gap: 12px; }
.cnt-barcol { width: 22%; }
.cnt-bar { display: block; height: 10px; border-radius: 5px; background: var(--blue); min-width: 2px; }
.cnt-bar.neg { background: var(--magenta); }

/* Phone counting screen: big targets, no sideways scroll */
.cnt-phone { max-width: 680px; margin: 0 auto; overflow-wrap: anywhere; }
.cnt-top { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.cnt-top h1 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; line-height: 1.2; }
.cnt-top-t { min-width: 0; flex: 1 1 180px; }
.cnt-sync { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cnt-sync .btn { min-height: 44px; min-width: 44px; }
.cnt-offline { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.cnt-instr { margin: 0 0 12px; font-size: 14px; }
.cnt-instr summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--blue); }
.cnt-h { font-size: 17px; margin: 6px 0 10px; }
.cnt-locs-pick { display: grid; gap: 8px; }
.cnt-loc { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "c b" "n b"; align-items: center; text-align: left; width: 100%; min-height: 64px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font: inherit; cursor: pointer; color: var(--ink-strong); gap: 2px 10px; }
.cnt-loc b { grid-area: c; font-size: 18px; }
.cnt-loc > span:not(.badge) { grid-area: n; font-size: 13.5px; color: var(--muted); }
.cnt-loc .badge { grid-area: b; }
.cnt-loc.cnt-rec { border-color: var(--magenta); background: var(--magenta-tint); margin-bottom: 8px; grid-template-areas: "c" "n"; grid-template-columns: 1fr; }
.cnt-where { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 6px; }
.cnt-where .btn { min-height: 44px; }
.cnt-tabs { margin-bottom: 10px; }
.cnt-tabs button { min-height: 48px; padding: 8px 12px; font-size: 15px; flex: 1 0 auto; }
.cnt-search { width: 100%; min-height: 50px; font-size: 17px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 10px; box-sizing: border-box; }
.cnt-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.cnt-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; width: 100%; min-height: 60px; text-align: left; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; color: var(--ink-strong); cursor: pointer; }
.cnt-item:active, .cnt-loc:active { background: var(--blue-tint); }
.cnt-code { font-weight: 700; font-size: 15px; }
.cnt-desc { font-size: 15px; min-width: 0; }
.cnt-meta { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.cnt-flagrow { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 14.5px; }
.cnt-actions { display: grid; gap: 8px; margin: 14px 0 24px; }
.btn.cnt-big { min-height: 52px; font-size: 16px; width: 100%; white-space: normal; }
.cnt-desc-big { font-size: 17px; margin: 0 0 10px; color: var(--ink-strong); }
.cnt-entry { display: grid; gap: 10px; }
.cnt-entry .field { margin-bottom: 0; }
.cnt-entry input, .cnt-entry select { min-height: 48px; font-size: 16px; width: 100%; box-sizing: border-box; }
.cnt-qty { font-size: 30px !important; min-height: 64px !important; text-align: center; font-weight: 700; }
.cnt-units { display: flex; flex-wrap: wrap; gap: 8px; }
.cnt-unit { position: relative; }
.cnt-unit input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cnt-unit span { display: inline-flex; flex-direction: column; justify-content: center; min-height: 48px; min-width: 64px; padding: 4px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-weight: 650; font-size: 15px; cursor: pointer; text-align: center; }
.cnt-unit small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.cnt-unit input:checked + span { background: var(--blue); color: #fff; border-color: var(--blue); }
.cnt-unit input:checked + span small { color: #e8eaff; }
.cnt-unit input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 2px; }
.cnt-conv { min-height: 18px; }
.cnt-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.cnt-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }

@media (max-width: 860px) {
  .cnt-lrow { grid-template-columns: 1fr 1fr; }
  .cnt-lrow > span:empty { display: none; }
  .cnt-barcol { display: none; }
  .cnt-clip { max-width: none; white-space: normal; }
  .cnt-out { flex-wrap: wrap; }
  .modal .cnt-entry .grid-2 { grid-template-columns: 1fr 1fr; }
}
