/* =====================================================================
   [موديول المتجر] الشكل: نفس ألوان وكروت السيستم (gs-pages.css) + مكونات المتجر
   ===================================================================== */

/* ---------- شريط شاشات المتجر ---------- */
.sh-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 16px; padding: 4px; background: #fff; border: 1px solid var(--gs-border); border-radius: 14px; box-shadow: var(--gs-shadow-sm); }
.sh-nav::-webkit-scrollbar { display: none; }
.sh-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #4b5260 !important; text-decoration: none !important; transition: background .15s ease, color .15s ease; }
.sh-nav a .fa { color: var(--gs-red); }
.sh-nav a:hover { background: #f4f4f5; color: var(--gs-text) !important; }
.sh-nav a.is-on { background: #141414; color: #fff !important; box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
.sh-nav a.is-on .fa { color: #fff; }
.sh-nav a.is-cta { margin-inline-start: auto; background: var(--gs-red); color: #fff !important; }
.sh-nav a.is-cta .fa { color: #fff; }
.sh-nav a.is-cta:hover { background: var(--gs-red-dark); }

/* ---------- الفلاتر ---------- */
.sh-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.sh-filters .sh-grow { flex: 1 1 220px; min-width: 0; }
.sh-input, .sh-filters select, .sh-filters input[type=date] {
    height: 40px; border: 1px solid var(--gs-border); border-radius: 12px; background: #fff; padding: 0 12px; font-size: 13.5px; color: var(--gs-text); outline: none; min-width: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.sh-input:focus, .sh-filters select:focus, .sh-filters input[type=date]:focus { border-color: var(--gs-red); box-shadow: 0 0 0 4px var(--gs-accent-ring); }
.sh-search { position: relative; display: flex; align-items: center; }
.sh-search .fa { position: absolute; inset-inline-start: 13px; color: var(--gs-red); pointer-events: none; }
.sh-search input { width: 100%; padding-inline-start: 36px; }
.sh-check { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--gs-border); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 700; color: #4b5260; cursor: pointer; user-select: none; margin: 0; }
.sh-check input { accent-color: var(--gs-red); width: 16px; height: 16px; margin: 0; }
.sh-check.is-on { border-color: var(--gs-red); color: var(--gs-red); background: var(--gs-red-soft); }
.sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; text-decoration: none !important; }
.sh-btn:disabled { opacity: .55; cursor: default; }
.sh-btn.is-red { background: var(--gs-red); color: #fff !important; box-shadow: 0 8px 18px rgba(var(--gs-red-rgb, 213, 60, 65), .25); }
.sh-btn.is-red:hover:not(:disabled) { background: var(--gs-red-dark); transform: translateY(-1px); }
.sh-btn.is-dark { background: #141414; color: #fff !important; }
.sh-btn.is-dark:hover:not(:disabled) { background: #000; }
.sh-btn.is-light { background: #fff; border-color: var(--gs-border); color: var(--gs-text) !important; }
.sh-btn.is-light:hover:not(:disabled) { border-color: var(--gs-border-strong); background: #fafafa; }
.sh-btn.is-green { background: var(--gs-green); color: #fff !important; }
.sh-btn.is-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.sh-btn.is-block { width: 100%; }

/* ---------- ملخص الأرقام فوق القوايم ---------- */
.sh-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sh-sum { background: #fff; border: 1px solid var(--gs-border); border-radius: 14px; padding: 12px 16px; box-shadow: var(--gs-shadow-sm); }
.sh-sum span { display: block; font-size: 12px; font-weight: 700; color: var(--gs-muted); }
.sh-sum b { display: block; font-size: 20px; font-weight: 800; color: var(--gs-text); font-variant-numeric: tabular-nums; margin-top: 2px; }
.sh-sum.is-red b { color: var(--gs-red); }
.sh-sum.is-green b { color: #177245; }

/* ---------- الجداول (كروت على الموبايل) ---------- */
.sh-table-wrap { background: #fff; border: 1px solid var(--gs-border); border-radius: 14px; overflow: hidden; box-shadow: var(--gs-shadow-sm); }
.sh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sh-table th { background: #fafafa; color: #3a404a; font-weight: 700; font-size: 12.5px; padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid var(--gs-border); text-align: start; }
.sh-table td { padding: 11px 14px; border-bottom: 1px solid #f0f1f3; text-align: start; vertical-align: middle; }
.sh-table tbody tr:last-child td { border-bottom: 0; }
.sh-table tbody tr.is-click { cursor: pointer; transition: background .15s ease; }
.sh-table tbody tr.is-click:hover { background: #fcf5f5; }
.sh-table .is-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sh-table .is-end { text-align: end; }
.sh-table small { display: block; color: var(--gs-muted); font-size: 11.5px; margin-top: 1px; }
.sh-table b.is-due { color: var(--gs-red); }
.sh-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; color: #4b5260; background: #f3f4f6; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.sh-empty { text-align: center; padding: 40px 16px; color: var(--gs-muted); }
.sh-empty .fa { font-size: 30px; color: #d6d9de; display: block; margin-bottom: 8px; }
.sh-loading { text-align: center; padding: 34px; color: var(--gs-muted); }
.sh-qty { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 2px 9px; border-radius: 99px; font-weight: 800; font-size: 12.5px; background: var(--gs-green-soft); color: #177245; font-variant-numeric: tabular-nums; }
.sh-qty.is-low { background: var(--gs-orange-soft); color: #b35c00; }
.sh-qty.is-out { background: var(--gs-red-soft); color: #b3262b; }
.sh-plus { color: #177245; font-weight: 800; }
.sh-minus { color: #b3262b; font-weight: 800; }

@media (max-width: 767px) {
    .sh-table.is-cards thead { display: none; }
    .sh-table.is-cards, .sh-table.is-cards tbody { display: block; }
    .sh-table.is-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid #f0f1f3; }
    .sh-table.is-cards tbody tr:last-child { border-bottom: 0; }
    .sh-table.is-cards td { display: block; padding: 0; border: 0; min-width: 0; }
    .sh-table.is-cards td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: var(--gs-muted); margin-bottom: 1px; }
    .sh-table.is-cards td.is-main { grid-column: 1 / -1; font-size: 14.5px; }
    .sh-table.is-cards td.is-main::before { display: none; }
    .sh-table.is-cards td.is-end { text-align: start; }
    .sh-table.is-cards td:empty { display: none; }
}

/* ---------- الصفحات ---------- */
.sh-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 0; font-size: 13px; color: var(--gs-muted); }
.sh-pager[hidden] { display: none; }
.sh-pager div { display: flex; align-items: center; gap: 8px; }
.sh-pager button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--gs-border); background: #fff; cursor: pointer; color: var(--gs-text); }
.sh-pager button:hover:not(:disabled) { border-color: var(--gs-red); color: var(--gs-red); }
.sh-pager button:disabled { opacity: .4; cursor: default; }

/* ---------- المودالز ---------- */
.sh-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.sh-modal .modal-header { align-items: center; padding: 16px 20px; border-bottom: 1px solid #f0f1f3; }
.sh-modal .modal-title { font-size: 16.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.sh-modal .modal-title .fa { color: var(--gs-red); }
.sh-modal .modal-body { padding: 18px 20px; }
.sh-modal .modal-footer { padding: 12px 20px; border-top: 1px solid #f0f1f3; gap: 8px; flex-wrap: wrap; }
.sh-modal .modal-footer > * { margin: 0; }
.sh-modal .sh-foot-start { margin-inline-end: auto !important; display: flex; gap: 8px; flex-wrap: wrap; }
.sh-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.sh-form .is-full { grid-column: 1 / -1; }
.sh-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sh-field > span { font-size: 12.5px; font-weight: 700; color: #3a404a; }
.sh-field > span i { font-style: normal; color: var(--gs-muted); font-weight: 600; }
.sh-field .sh-input, .sh-field select, .sh-field textarea { width: 100%; }
.sh-field textarea { min-height: 70px; padding: 9px 12px; border: 1px solid var(--gs-border); border-radius: 12px; font-size: 13.5px; outline: none; resize: vertical; }
.sh-field textarea:focus, .sh-field select:focus { border-color: var(--gs-red); box-shadow: 0 0 0 4px var(--gs-accent-ring); }
.sh-field select { height: 40px; border: 1px solid var(--gs-border); border-radius: 12px; background: #fff; padding: 0 10px; font-size: 13.5px; outline: none; }
.sh-hint { font-size: 12px; color: var(--gs-muted); margin: 0; }
.sh-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #f4f4f5; border-radius: 12px; }
.sh-seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: #4b5260; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sh-seg button.is-on { background: #fff; color: var(--gs-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.sh-seg button.is-on .fa { color: var(--gs-red); }
.sh-seg.is-block { display: flex; }
.sh-seg.is-block button { flex: 1; justify-content: center; }
.sh-tabs { display: flex; gap: 4px; border-bottom: 1px solid #f0f1f3; margin: -6px -20px 16px; padding: 0 20px; overflow-x: auto; }
.sh-tabs button { border: 0; background: none; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--gs-muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.sh-tabs button.is-on { color: var(--gs-text); border-bottom-color: var(--gs-red); }

/* الفاتورة */
.sh-doc-head { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; background: #fafafa; border: 1px solid #f0f1f3; border-radius: 12px; margin-bottom: 14px; font-size: 13px; }
.sh-doc-head div { display: flex; flex-direction: column; min-width: 110px; }
.sh-doc-head span { font-size: 11.5px; font-weight: 700; color: var(--gs-muted); }
.sh-doc-head b { color: var(--gs-text); }
.sh-totals { margin-top: 12px; margin-inline-start: auto; max-width: 340px; font-size: 13.5px; }
.sh-totals div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.sh-totals div b { font-variant-numeric: tabular-nums; }
.sh-totals .is-total { border-top: 1px dashed var(--gs-border-strong); margin-top: 4px; padding-top: 9px; font-size: 15.5px; font-weight: 800; }
.sh-totals .is-due b { color: var(--gs-red); }
.sh-totals .is-profit b { color: #177245; }
.sh-sec-title { font-size: 13px; font-weight: 800; color: var(--gs-text); margin: 18px 0 8px; display: flex; align-items: center; gap: 7px; }
.sh-sec-title .fa { color: var(--gs-red); }
.sh-list { border: 1px solid #f0f1f3; border-radius: 12px; overflow: hidden; }
.sh-list-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f4f5f7; font-size: 13px; }
.sh-list-row:last-child { border-bottom: 0; }
.sh-list-row .sh-grow { flex: 1; min-width: 0; }
.sh-list-row small { color: var(--gs-muted); display: block; font-size: 11.5px; }
.sh-list-row.is-click { cursor: pointer; }
.sh-list-row.is-click:hover { background: #fcf5f5; }

/* سطور الأصناف (توريد / مرتجع / تحويل) */
.sh-lines { border: 1px solid var(--gs-border); border-radius: 12px; overflow: hidden; }
.sh-line { display: grid; grid-template-columns: minmax(0, 1fr) 92px 110px 100px 34px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #f0f1f3; }
.sh-line:last-child { border-bottom: 0; }
.sh-line.is-head { background: #fafafa; font-size: 12px; font-weight: 700; color: var(--gs-muted); }
.sh-line.is-3 { grid-template-columns: minmax(0, 1fr) 110px 34px; }
.sh-line.is-ret { grid-template-columns: minmax(0, 1fr) 80px 100px 90px; }
.sh-line input { width: 100%; height: 34px; border: 1px solid var(--gs-border); border-radius: 9px; padding: 0 8px; font-size: 13px; text-align: center; outline: none; font-variant-numeric: tabular-nums; }
.sh-line input:focus { border-color: var(--gs-red); }
.sh-line b { font-variant-numeric: tabular-nums; font-size: 13px; }
.sh-line .sh-name { font-weight: 700; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-line .sh-name small { display: block; font-weight: 600; color: var(--gs-muted); font-size: 11px; }
.sh-x { width: 30px; height: 30px; border-radius: 8px; border: 0; background: #f4f4f5; color: #6b7280; cursor: pointer; }
.sh-x:hover { background: var(--gs-red-soft); color: var(--gs-red); }
@media (max-width: 575px) {
    .sh-line, .sh-line.is-ret { grid-template-columns: 1fr 1fr 1fr 30px; }
    .sh-line.is-ret { grid-template-columns: 1fr 1fr 1fr; }
    .sh-line .sh-name { grid-column: 1 / -1; white-space: normal; }
    .sh-line.is-head { display: none; }
    .sh-line.is-3 { grid-template-columns: 1fr 30px; }
    .sh-form { grid-template-columns: 1fr; }
}

/* اختيار منتج (بحث بقايمة نتايج) */
.sh-pick { position: relative; }
.sh-pick-list { position: absolute; top: calc(100% + 4px); inset-inline-start: 0; inset-inline-end: 0; background: #fff; border: 1px solid var(--gs-border); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .14); z-index: 30; max-height: 280px; overflow-y: auto; }
.sh-pick-list[hidden] { display: none; }
.sh-pick-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f4f5f7; }
.sh-pick-item:last-child { border-bottom: 0; }
.sh-pick-item:hover, .sh-pick-item.is-on { background: #fcf5f5; }
.sh-pick-item .sh-grow { flex: 1; min-width: 0; }
.sh-pick-item small { display: block; color: var(--gs-muted); font-size: 11.5px; }
.sh-pick-none { padding: 12px; font-size: 13px; color: var(--gs-muted); text-align: center; }

/* ---------- نقطة البيع ---------- */
.sh-pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
.sh-pos-left { min-width: 0; }
.sh-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.sh-cats::-webkit-scrollbar { display: none; }
.sh-cats button { flex: 0 0 auto; height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--gs-border); background: #fff; font-size: 12.5px; font-weight: 700; color: #4b5260; cursor: pointer; }
.sh-cats button.is-on { background: #141414; border-color: #141414; color: #fff; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sh-card { position: relative; text-align: start; background: #fff; border: 1px solid var(--gs-border); border-radius: 14px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 112px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; box-shadow: var(--gs-shadow-sm); }
.sh-card:hover { transform: translateY(-2px); border-color: rgba(var(--gs-red-rgb, 213, 60, 65), .45); box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }
.sh-card:active { transform: scale(.98); }
.sh-card.is-out { opacity: .5; cursor: not-allowed; }
.sh-card-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--gs-red-soft); color: var(--gs-red); font-weight: 800; font-size: 14px; }
.sh-card-name { font-weight: 800; font-size: 13.5px; line-height: 1.35; color: var(--gs-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sh-card-price { font-weight: 800; font-size: 14px; color: var(--gs-red); font-variant-numeric: tabular-nums; }
.sh-card-in { position: absolute; top: 10px; inset-inline-end: 10px; min-width: 22px; height: 22px; border-radius: 99px; background: #141414; color: #fff; font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; animation: gsRise .3s ease both; }

.sh-cart { position: sticky; top: calc(var(--gs-top-h, 64px) + 12px); background: #fff; border: 1px solid var(--gs-border); border-radius: 18px; box-shadow: var(--gs-shadow-sm); display: flex; flex-direction: column; max-height: calc(100vh - var(--gs-top-h, 64px) - 28px); }
.sh-cart-head { padding: 14px 16px 10px; border-bottom: 1px solid #f0f1f3; display: flex; flex-direction: column; gap: 10px; }
.sh-cart-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 15.5px; }
.sh-cart-title .fa { color: var(--gs-red); }
.sh-cart-body { flex: 1; overflow-y: auto; min-height: 90px; }
.sh-cart-empty { text-align: center; color: var(--gs-muted); padding: 26px 12px; font-size: 13px; }
.sh-cart-empty .fa { font-size: 28px; color: #dcdfe4; display: block; margin-bottom: 6px; }
.sh-ci { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 16px; border-bottom: 1px solid #f4f5f7; animation: gsRise .25s ease both; }
.sh-ci-name { font-weight: 700; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-ci-total { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; text-align: end; }
.sh-ci-ctl { display: flex; align-items: center; gap: 6px; }
.sh-ci-ctl button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--gs-border); background: #fff; cursor: pointer; font-weight: 800; color: var(--gs-text); display: inline-flex; align-items: center; justify-content: center; }
.sh-ci-ctl button:hover { border-color: var(--gs-red); color: var(--gs-red); }
.sh-ci-ctl input { width: 52px; height: 28px; border: 1px solid var(--gs-border); border-radius: 8px; text-align: center; font-weight: 700; font-size: 13px; outline: none; }
.sh-ci-ctl .sh-ci-price { width: 76px; }
.sh-ci-ctl small { color: var(--gs-muted); font-size: 11.5px; }
.sh-ci-warn { grid-column: 1 / -1; font-size: 11.5px; color: #b3262b; font-weight: 700; }
.sh-cart-foot { border-top: 1px solid #f0f1f3; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.sh-cart-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.sh-cart-row input { width: 120px; height: 34px; border: 1px solid var(--gs-border); border-radius: 9px; text-align: center; font-weight: 700; outline: none; font-variant-numeric: tabular-nums; }
.sh-cart-row input:focus { border-color: var(--gs-red); }
.sh-cart-row.is-total { font-size: 18px; font-weight: 800; }
.sh-cart-row.is-total b { color: var(--gs-text); }
.sh-cart-row.is-due b { color: var(--gs-red); }
.sh-cart-row .sh-link { font-size: 12px; font-weight: 700; color: var(--gs-red); background: none; border: 0; padding: 0; cursor: pointer; }
.sh-who { display: flex; flex-direction: column; gap: 8px; }
.sh-who-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--gs-border); border-radius: 12px; background: #fafafa; font-size: 13px; }
.sh-who-card .gs-avatar, .sh-av { width: 34px; height: 34px; border-radius: 50%; background: #141414; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: 0 0 auto; }
.sh-who-card .sh-grow { flex: 1; min-width: 0; }
.sh-who-card small { display: block; color: var(--gs-muted); font-size: 11.5px; }
.sh-who-new { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-who-new input { height: 36px; }
.sh-cart-toggle { display: none; }
@media (max-width: 1199px) { .sh-pos { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 991px) {
    .sh-pos { grid-template-columns: 1fr; }
    .sh-cart { position: static; max-height: none; }
    .sh-cart-toggle { display: flex; position: fixed; inset-inline-start: 12px; inset-inline-end: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 40; height: 50px; border-radius: 14px; border: 0; background: #141414; color: #fff; font-weight: 800; align-items: center; justify-content: space-between; padding: 0 18px; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); }
    .sh-cart-toggle[hidden] { display: none; }
    .sh-cart-toggle b { background: var(--gs-red); border-radius: 99px; padding: 2px 10px; }
    .sh-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
}

/* الإيصال */
.sh-receipt { text-align: center; }
.sh-receipt-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--gs-green-soft); color: var(--gs-green); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin: 4px auto 10px; animation: gsRise .4s ease both; }
.sh-receipt h4 { font-weight: 800; margin: 0 0 4px; }

/* ---------- لوحة المتجر ---------- */
.sh-dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sh-dash-grid .gs-panel { margin-bottom: 0; }
.sh-top { display: flex; flex-direction: column; }
.sh-top-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f4f5f7; font-size: 13px; }
.sh-top-row:last-child { border-bottom: 0; }
.sh-top-row i { font-style: normal; width: 24px; height: 24px; border-radius: 8px; background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11.5px; }
.sh-top-row small { color: var(--gs-muted); display: block; font-size: 11.5px; }
.sh-top-row b { font-variant-numeric: tabular-nums; }
.sh-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-quick a { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--gs-border); background: #fff; color: var(--gs-text) !important; text-decoration: none !important; font-weight: 800; font-size: 13px; transition: transform .15s ease, border-color .15s ease; }
.sh-quick a .fa { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--gs-red-soft); color: var(--gs-red); font-size: 15px; }
.sh-quick a:hover { transform: translateY(-2px); border-color: rgba(var(--gs-red-rgb, 213, 60, 65), .45); }
@media (max-width: 1199px) { .sh-dash-grid { grid-template-columns: 1fr 1fr; } .sh-dash-grid .gs-span-2 { grid-column: 1 / -1; } }
@media (max-width: 767px) { .sh-dash-grid { grid-template-columns: 1fr; } }

/* ---------- الجرد ---------- */
.sh-count-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.sh-count-bar .sh-grow { flex: 1 1 200px; }
.sh-diff-up { color: #177245; font-weight: 800; }
.sh-diff-down { color: #b3262b; font-weight: 800; }
.sh-count-table { max-height: 55vh; overflow-y: auto; border: 1px solid var(--gs-border); border-radius: 12px; }
.sh-count-table .sh-table th { position: sticky; top: 0; z-index: 1; }
.sh-count-table input { width: 90px; height: 32px; border: 1px solid var(--gs-border); border-radius: 8px; text-align: center; font-weight: 700; outline: none; }
.sh-count-table input.is-reason { width: 150px; text-align: start; padding: 0 8px; font-weight: 500; }
.sh-count-table input:focus { border-color: var(--gs-red); }
.sh-count-table tr.is-diff { background: #fffaf2; }

/* ---------- المتجر في ملف العضو والداشبورد ---------- */
.sh-mm { margin-top: 14px; }
.sh-mm-sums { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sh-mm-sums span { font-size: 12.5px; color: var(--gs-muted); }
.sh-mm-sums b { color: var(--gs-text); }
.sh-mm-sums .is-due b { color: var(--gs-red); }

/* ---------- الطباعة ---------- */
@media print {
    .sh-nav, .sh-filters, .sh-pager, .sh-cart-toggle { display: none !important; }
}
.sh-form .gs-toggle-row { margin: 0 !important; align-self: end; min-height: 40px; padding: 0 12px; font-size: 13px; font-weight: 700; color: #3a404a; }
.gs-admin .sh-modal .modal-body label.sh-field { display: flex; margin: 0; font-weight: 400; }
.gs-admin .sh-modal .modal-body label.gs-toggle-row { display: flex !important; margin: 0 !important; }
.gs-admin .sh-modal .modal-body label.sh-check { display: inline-flex; margin: 0; }

/* رسالة نجاح صغيرة */
.sh-toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); inset-inline-start: 50%; transform: translateX(-50%); z-index: 3000; background: #141414; color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 13.5px; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); display: flex; align-items: center; gap: 8px; animation: gsRise .3s ease both; max-width: calc(100vw - 32px); }
html[dir="rtl"] .sh-toast { transform: translateX(50%); }
.sh-toast .fa { color: #4ade80; }
@media (max-width: 991px) { .sh-toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }
#shWhoSeg button { padding: 0 6px; font-size: 12px; white-space: nowrap; gap: 5px; }
.gs-admin .sh-modal .modal-body label.sh-search { display: flex; margin: 0; font-weight: 400; }
.sh-tabs button:focus { outline: none; }
.sh-tabs button:focus-visible { outline: 2px solid var(--gs-red); outline-offset: -2px; }

/* الـ labels العامة في السيستم (.gs-content label) بتغلب على مكونات المتجر: نثبّت شكلها */
.gs-admin .gs-content label.sh-search, .gs-admin .sh-modal label.sh-search { display: flex !important; align-items: center; position: relative; margin: 0 !important; font-weight: 400; }
.gs-admin label.sh-search > .fa { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 13px; margin: 0; line-height: 1; z-index: 1; }
.gs-admin label.sh-search > input { width: 100%; margin: 0; }
.gs-admin .gs-content label.sh-check, .gs-admin .sh-modal label.sh-check { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; height: 40px; line-height: 1; white-space: nowrap; }
.gs-admin label.sh-check input[type=checkbox] { position: static !important; margin: 0 !important; width: 16px; height: 16px; flex: 0 0 auto; vertical-align: middle; }
.gs-admin .gs-content label.sh-field { display: flex !important; margin: 0 !important; }

/* المودالز اللي جواها form: الجسم بيسكرول والزراير تفضل ظاهرة تحت */
.sh-modal .modal-dialog-scrollable .modal-content { max-height: calc(100vh - 3.5rem); overflow: hidden; display: flex; flex-direction: column; }
.sh-modal .modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.sh-modal .modal-dialog-scrollable .modal-content > form > .modal-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.sh-modal .modal-dialog-scrollable .modal-content > form > .modal-footer,
.sh-modal .modal-dialog-scrollable .modal-content > .modal-footer { flex: 0 0 auto; }
@media (max-width: 575px) { .sh-modal .modal-dialog-scrollable .modal-content { max-height: calc(100vh - 1rem); } }

/* العميل في نقطة البيع */
.sh-who-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.sh-who-tags .sh-link { font-size: 12px; font-weight: 800; color: var(--gs-red); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sh-phone-hit { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--gs-orange-soft); color: #7a4300; font-size: 12.5px; }
.sh-phone-hit[hidden] { display: none; }
.sh-phone-hit > .fa { color: var(--gs-orange); font-size: 16px; }
.sh-phone-hit .sh-grow { flex: 1; min-width: 0; }
#shWhoSeg button { font-size: 12.5px; }
/* [شكل] الموبايل: تابات المودال (زي "المخزون والحركات") كانت أعرض من المودال بـ 2px فالمحتوى كله بيتسحب يمين وشمال مع الصباع —
   دلوقتي بعرض المودال بالظبط، والمودال بيسكرول لفوق وتحت بس (التابات نفسها لو كتير بتسكرول بالعرض جوه نفسها) */
@media (max-width: 767.98px) {
    .gs-admin .sh-modal .modal-body > .sh-tabs { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
    .gs-admin .sh-modal .modal-body { overflow-x: hidden; }
}
/* [شكل] الموبايل: زراير آخر مودالات المتجر بعرض الشاشة زي باقي مودالات السيستم */
@media (max-width: 767.98px) {
    .gs-admin .sh-modal .modal-footer { display: flex; gap: 10px; }
    .gs-admin .sh-modal .modal-footer > .sh-btn:not([hidden]) { flex: 1 1 0; justify-content: center; min-height: 46px; margin: 0; }
}

/* [بيع الخدمات] تاب الخدمات في نقطة البيع + سؤال "دلوقتي ولا رصيد" + سطر الخدمة في السلة */
.sh-kind { flex-shrink: 0; }
.sh-card.is-svc .sh-card-ic { background: rgba(var(--gs-red-rgb, 213, 60, 65), .1); color: var(--gs-red); }
.sh-card-unit { color: #8a8f98; font-size: 11px; font-weight: 600; }
.sh-ci.is-svc .sh-ci-name small.sh-ci-mode { display: block; font-size: 11.5px; font-weight: 600; color: #6b7280; margin-top: 2px; }
.sh-ci.is-svc .sh-ci-mode .fa { color: var(--gs-red); }
.sh-ci.is-svc .sh-ci-mode .sh-link { font-size: 11.5px; }
.sh-ask .gs-ph-card { max-width: 440px; }
.sh-ask-body { padding: 16px 18px 4px; }
.sh-ask-q { margin: 0 0 12px; font-size: 13.5px; color: #3a3f47; }
.sh-ask-ch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-ask-ch button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; padding: 14px; border-radius: 14px; border: 1.5px solid #e3e6ea; background: #fff; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.sh-ask-ch button .fa { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #f2f3f5; color: #3a3f47; font-size: 15px; margin-bottom: 4px; }
.sh-ask-ch button b { font-size: 14px; color: #1b1d21; }
.sh-ask-ch button small { font-size: 11.5px; color: #8a8f98; line-height: 1.5; }
.sh-ask-ch button:hover { border-color: #c9cdd3; }
.sh-ask-ch button.is-on { border-color: var(--gs-red); background: rgba(var(--gs-red-rgb, 213, 60, 65), .04); }
.sh-ask-ch button.is-on .fa { background: var(--gs-red); color: #fff; }
.sh-ask-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sh-ask-f { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 700; color: #3a3f47; }
.sh-ask-f small { color: #8a8f98; font-weight: 600; }
.sh-ask-f .sh-input { width: 100%; }
@media (max-width: 420px) { .sh-ask-ch, .sh-ask-row { grid-template-columns: 1fr; } }
.sh-top-sep { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 12px; font-weight: 800; color: #8a8f98; text-transform: none; }
.sh-top-sep .fa { color: var(--gs-red); }
