/* NextStore Cloud (موقع التاجر + الجرد بالموبايل): فوق nextstore-license.css — موبايل الأول، شريط تبويبات تحت، ونوافذ من تحت (sheet) */
[hidden] { display: none !important; }
body.cl { padding-bottom: 76px; -webkit-tap-highlight-color: transparent; }
.cl .lc-wrap { max-width: 900px; margin-top: 12px; gap: 12px; }
.cl-tabs { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.cl-tabs button { flex: 1; height: 62px; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 800; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.cl-tabs button i { font-size: 18px; }
.cl-tabs button.on { color: var(--green); }
.cl-stores { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cl-stores::-webkit-scrollbar { display: none; }
.cl-stores .chip { flex: none; }
.cl-list { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cl-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--soft); min-height: 54px; }
.cl-row:last-child { border-bottom: 0; }
.cl-row > div { min-width: 0; flex: 1; }
.cl-row b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row .v { font-family: Arial, sans-serif; font-weight: 800; font-size: 16px; direction: ltr; white-space: nowrap; }
.cl-row.tap { cursor: pointer; }
.cl-row.tap:active { background: #f1f5f9; }
.v.r, .txt-r { color: var(--red); } .v.g { color: var(--green); }
.cl-seg { display: flex; background: #e2e8f0; border-radius: 9px; padding: 3px; gap: 3px; }
.cl-seg button { flex: 1; height: 36px; border: 0; border-radius: 7px; background: none; font: inherit; font-weight: 800; font-size: 13.5px; color: #475569; cursor: pointer; }
.cl-seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.cl-bar { display: flex; gap: 8px; align-items: center; }
.cl-bar input[type=search] { flex: 1; height: 44px; font-size: 15px; }
.cl-more { width: 100%; height: 40px; border: 0; background: #f8fafc; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; }

/* نافذة من تحت */
.cl-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .45); display: none; align-items: flex-end; justify-content: center; }
.cl-sheet.on { display: flex; }
.cl-sheet > div { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 14px 14px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.cl-sheet form { display: grid; gap: 12px; }
.cl-sheet h3 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cl-sheet h3 button { margin-inline-start: auto; border: 0; background: #f1f5f9; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; color: #475569; }
.cl-sheet label { font-size: 12.5px; font-weight: 700; color: var(--muted); display: grid; gap: 4px; }
.cl-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cl-checks label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 13px; }
.cl-checks input { width: 18px; height: 18px; flex: none; }
.cl-sheet .btn-g, .cl-sheet .btn-w { height: 46px; font-size: 15px; }
.cl-toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 22px; font-weight: 800; font-size: 14px; display: none; max-width: 92vw; text-align: center; }
.cl-toast.err { background: var(--red); }

/* ===== شاشة الجرد ===== */
body.ct { padding-bottom: 0; }
.ct-head { position: sticky; top: 56px; z-index: 15; background: var(--bg); padding: 10px 12px 8px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.ct-prog { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.ct-prog i { display: block; height: 100%; background: var(--green); width: 0; transition: width .3s; }
.ct-scan { width: 52px; height: 44px; border-radius: 9px; border: 0; background: var(--navy); color: #fff; font-size: 19px; cursor: pointer; flex: none; }
.ct-scan.on { background: var(--green); }
.ct-cam { position: relative; background: #000; border-radius: 10px; overflow: hidden; height: 190px; display: none; }
.ct-cam.on { display: block; }
.ct-cam video { width: 100%; height: 100%; object-fit: cover; }
.ct-cam::after { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.ct-list { padding: 8px 12px 20px; }
.ct-item { text-align: center; display: grid; gap: 4px; }
.ct-item b { font-size: 21px; font-weight: 800; line-height: 1.4; }
.ct-item svg { margin: 0 auto; max-width: 100%; }
.ct-exp { display: flex; justify-content: space-around; background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.ct-exp span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.ct-exp b { font-family: Arial, sans-serif; font-size: 22px; }
.ct-qty { height: 64px !important; font-size: 30px !important; text-align: center; font-family: Arial, sans-serif !important; }
.ct-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ct-packs input { height: 48px; font-size: 20px; text-align: center; font-family: Arial, sans-serif; }
.ct-hist { font-size: 12.5px; color: #475569; font-weight: 700; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 10px; line-height: 1.8; }
.ct-off { background: #fef3c7; color: #92400e; font-weight: 800; text-align: center; padding: 6px; font-size: 13px; display: none; }
.ct-off.on { display: block; }
