/* Item catalogue + van (technician) stock. Logic: js/views-items.js, js/views-van.js */
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--navy); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.seg-n { font-weight: 500; opacity: .7; margin-left: 2px; }
.item-filters input[type=search] { flex: 1 1 220px; max-width: 360px; min-width: 0; }
.kind-seg { display: inline-flex; width: fit-content; max-width: 100%; }
.kind-seg label { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-weight: 600; border-right: 1px solid var(--line-2); cursor: pointer; }
.kind-seg label:last-child { border-right: 0; }
.kind-seg label:has(input:checked) { background: var(--navy); color: #fff; }
.kind-seg input { accent-color: #fff; }
.item-chem { display: grid; gap: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--hover); }
.item-chem[hidden] { display: none; }
.item-danger { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.modal-body .f2 > .f { min-width: 0; }
[data-item][hidden] { display: none !important; }

/* van stock tab */
.van-bar { justify-content: space-between; }
.van-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.van-ctl { align-items: flex-end; }
.van-ctl .f { min-width: 140px; }
.van-ctl .van-tsel { flex: 1 1 240px; max-width: 340px; }
.van-ctl .f input[type=date] { width: 100%; }
.van-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 2px 0 10px; }
.van-head b { font: 800 1.15rem/1.2 var(--display); letter-spacing: .02em; }
.van-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.van-sheet { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.van-sheet th, .van-sheet td { padding: 6px 9px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); white-space: nowrap; background: #fff; }
.van-sheet thead th { background: var(--hover); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); position: static; }
.van-sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.van-sheet .van-item { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 170px; max-width: 220px; white-space: normal; border-right: 2px solid var(--line); }
.van-sheet thead .van-item { z-index: 2; }
.van-sheet .van-day { text-align: center; background: var(--navy); color: #fff; border-right-color: var(--navy-3); }
.van-sheet .van-tot { background: #f3efe3; }
.van-sheet thead .van-tot { background: var(--navy-3); color: #fff; }
.van-sheet .van-in { color: var(--good); }
.van-sheet .van-out { color: var(--bad); }
.van-sheet .van-bal { font-weight: 700; }
.van-sheet td.zero { color: var(--muted); }
.van-sheet td.neg { color: var(--bad); font-weight: 700; }
.van-matrix th.num div { font-weight: 700; text-transform: none; letter-spacing: 0; }
.van-matrix .sub { text-transform: none; letter-spacing: 0; }
.van-h { margin: 18px 0 8px; }
.van-refs { display: grid; gap: 8px; }
.van-refday { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: start; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.van-refday > div { display: flex; flex-wrap: wrap; gap: 6px; }
.van-ref { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 6px; background: var(--line-2); font-size: 12.5px; }
.van-ref em { font-style: normal; font-weight: 700; }
.van-ref.use { background: var(--info-bg); }
.van-ref.return { background: var(--warn-bg); }
.van-ref a, .van-refkw { font: 600 12px var(--mono); }
.van-banner { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 12px; background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd49a; border-radius: var(--radius); font-weight: 500; }
.van-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--navy); color: #fff; border-radius: 10px; text-decoration: none; font-weight: 700; }
.van-link small { font-weight: 500; opacity: .8; }
.mem-veh input { text-transform: uppercase; }

/* modal lines */
.van-lines { display: grid; gap: 8px; margin: 10px 0; }
.van-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 36px; gap: 8px; align-items: center; }
.van-line .combo, .van-line select { min-width: 0; }
.van-line input { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; width: 100%; }
.van-cnt { grid-template-columns: minmax(0, 1fr) 110px; }
.van-cname { display: grid; line-height: 1.25; min-width: 0; }
.van-cname .sub { font-weight: 400; }

/* technician: My van stock (works on desktop too; the phone styles of m-list live in m-biz.css) */
.van-mine { display: grid; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.van-mine .m-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
.van-mine .m-row:last-child { border-bottom: 0; }
.van-mine .m-qty { font: 700 16px/1.2 var(--display); text-align: right; white-space: nowrap; }
.van-mine .m-qty small { display: block; font: 500 11px var(--body); color: var(--muted); }
.m-qty.out { color: var(--bad); }

@media (max-width: 900px) {
  .van-bar { flex-direction: column; align-items: stretch; }
  .van-acts .btn { flex: 1 1 calc(50% - 6px); }
  .van-refday { grid-template-columns: 1fr; }
  .van-ctl .f, .van-ctl .van-tsel { flex: 1 1 100%; max-width: none; }
  .item-filters .seg { width: 100%; }
  .item-filters .seg button { flex: 1; }
  .item-filters input[type=search] { flex: 1 0 100%; max-width: none; }
  .van-sheet .van-item { min-width: 128px; max-width: 150px; }
  .van-line { grid-template-columns: minmax(0, 1fr) 80px 36px; }
  .modal-body .kind-seg { width: 100%; }
  .modal-body .kind-seg label { flex: 1; justify-content: center; }
}
