/* ==========================================================================
   نظام نقاط البيع — الأنماط
   القسم 22: السرعة قبل الجمال · خط كبير وأزرار كبيرة · لا اعتماد على الفأرة.
   ========================================================================== */

/* ————————————————— الرموز (الوضع الفاتح) ————————————————— */
:root {
  color-scheme: light;

  --bg:            #f2f5f9;
  --surface:       #ffffff;
  --surface-2:     #f6f8fb;
  --surface-3:     #edf1f6;
  --ink:           #0b1b33;
  --ink-2:         #3b4b66;
  --muted:         #5f6f88;
  --line:          #dce3ec;
  --line-2:        #c3cedc;

  /* قبل تطبيق التصميم (أول إطار): ألوان التصميم الافتراضي «المخطّط الهندسي» الفاتح
     نفسها، فلا يومض لون آخر عند الفتح. */
  --brand:         #1f5eff;
  --brand-ink:     #ffffff;
  --brand-soft:    #e6edff;
  --brand-2:       #1849c9;
  --brand-grad:    linear-gradient(135deg, #1f5eff 0%, #0b3fd1 100%);

  --ok:            #0ca30c;
  --ok-soft:       #e3f6e3;
  --warn:          #b7791f;
  --warn-soft:     #fdf3e0;
  --danger:        #d03b3b;
  --danger-soft:   #fbe9e9;
  --info:          #2a78d6;
  --info-soft:     #e6f0fc;

  /* لوحة الرسوم البيانية — مُتحقَّق منها لعمى الألوان (فاتح) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  --chart-surface: #ffffff;
  --chart-grid:    #e6ebef;
  --chart-axis:    #c3ccd4;
  --chart-ink:     #0f172a;
  --chart-ink-2:   #475569;
  --chart-muted:   #7c8a9a;
  --chart-dim:     #cbd5e1;
  --st-good:       #0ca30c;
  --st-warning:    #fab219;
  --st-serious:    #ec835a;
  --st-critical:   #d03b3b;

  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 16px;
  --shadow:    0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.07);
  --shadow-lg: 0 10px 40px rgba(15,23,42,.16);
  --tap:       44px;

  /* IBM Plex Sans Arabic مُضمَّن مع النظام (css/fonts.css)؛ البقيّة احتياط فقط */
  --font: "IBM Plex Sans Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --fs:   15px;
}

/* ————————————————— الوضع الليلي ————————————————— */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:          #0b1220;
    --surface:     #131c2b;
    --surface-2:   #182234;
    --surface-3:   #1f2b40;
    --ink:         #f1f5f9;
    --ink-2:       #b6c2d1;
    --muted:       #8496aa;
    --line:        #263349;
    --line-2:      #35455e;

    --brand:       #A472FF;
    --brand-ink:   #0B0714;
    --brand-soft:  #241640;
    --brand-2:     #C9A6FF;
    --brand-grad:  linear-gradient(135deg, #8B4CFF 0%, #F53FC0 100%);

    --ok:          #34c759;
    --ok-soft:     #12301c;
    --warn:        #e0a944;
    --warn-soft:   #33270f;
    --danger:      #f87171;
    --danger-soft: #351717;
    --info:        #60a5fa;
    --info-soft:   #14263f;

    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --chart-surface: #131c2b;
    --chart-grid:    #22304a;
    --chart-axis:    #35455e;
    --chart-ink:     #f1f5f9;
    --chart-ink-2:   #b6c2d1;
    --chart-muted:   #8496aa;
    --chart-dim:     #33445e;

    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 4px 18px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 44px rgba(0,0,0,.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #0b1220;
  --surface:     #131c2b;
  --surface-2:   #182234;
  --surface-3:   #1f2b40;
  --ink:         #f1f5f9;
  --ink-2:       #b6c2d1;
  --muted:       #8496aa;
  --line:        #263349;
  --line-2:      #35455e;
  --brand:       #A472FF;
  --brand-ink:   #0B0714;
  --brand-soft:  #241640;
  --brand-2:     #C9A6FF;
  --brand-grad:  linear-gradient(135deg, #8B4CFF 0%, #F53FC0 100%);
  --ok:          #34c759;
  --ok-soft:     #12301c;
  --warn:        #e0a944;
  --warn-soft:   #33270f;
  --danger:      #f87171;
  --danger-soft: #351717;
  --info:        #60a5fa;
  --info-soft:   #14263f;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --chart-surface: #131c2b;
  --chart-grid:    #22304a;
  --chart-axis:    #35455e;
  --chart-ink:     #f1f5f9;
  --chart-ink-2:   #b6c2d1;
  --chart-muted:   #8496aa;
  --chart-dim:     #33445e;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 4px 18px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 44px rgba(0,0,0,.55);
}

/* ————————————————— الأساس ————————————————— */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: calc(var(--fs) * var(--scale, 1));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--ink);
  background-color: var(--bg);
  /* ملمس التصميم (شفق، نقاط، زخرفة…) — يضبطه محرّك التصاميم */
  background-image: var(--bg-image, none);
  background-size: var(--bg-size, auto);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; font-family: var(--font-display, var(--font)); }
h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .7em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.num, .a-left, td.a-left, th.a-left { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ————————————————— الهيكل العام ————————————————— */
html, body { overflow-x: hidden; }
#app { display: flex; flex-direction: column; height: 100dvh; min-width: 0; overflow-x: hidden; }

/*
 * المناطق الآمنة: داخل تطبيق أندرويد يتكفّل الغلاف نفسه بحواف النظام ويضع
 * حشوها حول الـWebView (وهو الأدقّ لأنه يتلقّى الحواف من النظام مباشرة)،
 * فنستثنيه هنا حتى لا يُحسب الحشو مرّتين. أما في المتصفّح وتطبيق الويب
 * المثبَّت على الجوّال فلا غلاف، فنأخذها من CSS وإلا اختفى التذييل وزرّ
 * الدفع خلف شريط التنقل. box-sizing:border-box فالارتفاع يبقى 100dvh.
 */
html:not(.native-shell) #app,
html:not(.native-shell) .login-wrap {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-inline-start: env(safe-area-inset-left, 0px);
  padding-inline-end: env(safe-area-inset-right, 0px);
}

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; height: 54px; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.topbar > * { flex: none; }
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.topbar .brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
.topbar .spacer { flex: 1 1 0; min-width: 0; }
/* صفّ الحالات يتقلّص ويمرَّر أفقياً بدل أن يدفع بقيّة الأزرار خارج الشاشة */
.topbar .chip-row {
  display: flex; align-items: center; gap: 6px;
  flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
}
.topbar .chip-row::-webkit-scrollbar { display: none; }
.topbar .chip-row > * { flex: none; }
.topbar .chip { max-width: 168px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { display: flex; flex: 1; min-height: 0; min-width: 0; position: relative; }

/* ————————————————— درج القائمة —————————————————
   مخفيّ دائمًا، وينزلق من جهة زرّ ☰ (يمين العربية) لوحًا بكامل ارتفاع الشاشة
   ملاصقًا لحافّتها، بزوايا قائمة لا مستديرة.
   الإغلاق يُخرجه عن الشاشة كاملاً مع visibility:hidden فلا يُلمس ولا يُركَّز. */
:root { --nav-ease: cubic-bezier(.22, 1, .36, 1); }

/* طبقة التعتيم — عنصر حقيقي لأن الضغط عليها يجب أن يغلق القائمة */
.nav-scrim {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(8, 10, 24, .38);
  -webkit-backdrop-filter: blur(3px) saturate(120%); backdrop-filter: blur(3px) saturate(120%);
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .32s ease, visibility 0s linear .32s;
}
body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .32s ease, visibility 0s; }

/* --nav-safe: الحافّة الآمنة من جهة القائمة (الشقّ في الجوّال الأفقي) — حشوة داخلها لا فراغ حولها */
.sidebar {
  --nav-safe: env(safe-area-inset-right, 0px);
  position: fixed; z-index: 500;
  inset-block: 0; inset-inline-start: 0;
  width: min(328px, calc(100vw - 52px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--ink);
  border: 0; border-inline-end: 1px solid var(--line); border-radius: 0;
  box-shadow: 0 0 60px -14px rgba(8, 10, 30, .5), 0 0 24px -16px rgba(8, 10, 30, .35);
  transform: translateX(calc(100% + 24px)); visibility: hidden;
  transition: transform .34s cubic-bezier(.4, 0, .7, .2), visibility 0s linear .34s;
}
[dir="ltr"] .sidebar { --nav-safe: env(safe-area-inset-left, 0px); transform: translateX(calc(-100% - 24px)); }
body.nav-open .sidebar { transform: none; visibility: visible; transition: transform .52s var(--nav-ease), visibility 0s; }

/* رأس القائمة: شعار المحل واسمه وزرّ الإغلاق */
.nav-head {
  flex: none; position: relative; display: flex; align-items: center; gap: 10px;
  padding-block: calc(16px + env(safe-area-inset-top, 0px)) 14px;
  padding-inline: calc(14px + var(--nav-safe)) 16px;
  border-bottom: 1px solid var(--line);
}
.nav-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background: var(--brand-grad);
}
.nav-brand { position: relative; display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.nav-brand img {
  width: 40px; height: 40px; flex: none; padding: 5px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35);
}
.nav-brand-tx { display: grid; min-width: 0; line-height: 1.3; }
.nav-brand-tx b { font-family: var(--font-display, var(--font)); font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-brand-tx small { color: var(--muted); font-size: .74rem; direction: ltr; text-align: start; letter-spacing: .04em; }
.nav-close { position: relative; flex: none; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--nav-ease), background .2s ease, color .2s ease; }
.nav-close:hover { transform: rotate(90deg); }

/* القائمة نفسها تُمرَّر، والرأس والتذييل ثابتان */
.nav-list {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 6px 10px 14px; padding-inline-start: calc(10px + var(--nav-safe)); scrollbar-width: thin;
}
.nav-list::-webkit-scrollbar { width: 8px; }
.nav-list::-webkit-scrollbar-thumb { border-width: 2px; border-color: var(--surface); }
.sidebar .nav-group {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 8px 5px; font-size: .72rem; color: var(--muted); font-weight: 700; letter-spacing: .06em;
}
.sidebar .nav-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, var(--line), transparent); }
[dir="ltr"] .sidebar .nav-group::after { background: linear-gradient(to right, var(--line), transparent); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 6px 8px; min-height: var(--tap); margin: 1px 0;
  background: none; border: 0; border-radius: 12px; color: var(--ink); font: inherit; font-size: .94rem;
  cursor: pointer; text-align: start;
  transition: background-color .2s ease, color .2s ease, transform .2s var(--nav-ease);
}
.nav-ic {
  flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .25s var(--nav-ease);
}
.nav-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-kbd {
  flex: none; font: 600 .68rem/1 var(--mono); color: var(--muted); padding: 4px 6px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface-2); direction: ltr;
}
.nav-item:hover { background: var(--surface-2); transform: translateX(-3px); }
[dir="ltr"] .nav-item:hover { transform: translateX(3px); }
.nav-item:hover .nav-ic { color: var(--brand-2); border-color: var(--line-2); transform: scale(1.06); }
.nav-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
.nav-item.on { background: var(--brand-soft); color: var(--brand-2); font-weight: 700; }
.nav-item.on .nav-ic { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 14px -6px var(--brand); }
html[data-grad="1"] .nav-item.on .nav-ic { background-image: var(--brand-grad); }
/* شريط صغير على حافّة القائمة يدلّ على الشاشة الحالية */
.nav-item.on::before {
  content: ""; position: absolute; inset-inline-start: -10px; top: 22%; bottom: 22%; width: 4px;
  border-start-end-radius: 4px; border-end-end-radius: 4px; background: var(--brand);
}
.nav-item .badge { margin-inline-start: auto; flex: none; }

/* تذييل القائمة: الحساب والوضع الليلي والقفل */
.nav-foot {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 10px; padding-inline-start: calc(10px + var(--nav-safe));
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.nav-user {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 5px 6px;
  background: none; border: 0; border-radius: 12px; font: inherit; color: var(--ink); cursor: pointer; text-align: start;
  transition: background-color .2s ease;
}
.nav-user:hover { background: var(--surface); }
.nav-user-tx { display: grid; min-width: 0; line-height: 1.3; }
.nav-user-tx b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-tx small { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-foot .icon-btn { border-radius: 10px; }

/* الرسائل العائمة لا تغطّي القائمة وهي مفتوحة */
@media (min-width: 561px) {
  body.nav-open .toasts { inset-inline-start: calc(min(328px, calc(100vw - 52px)) + 18px); transition: inset-inline-start .3s var(--nav-ease); }
}

/* عند الفتح تنزل عناصر القائمة تباعًا (التأخير من ترتيب كل عنصر --i) */
body.nav-open .nav-list > * { animation: navIn .42s var(--nav-ease) backwards; animation-delay: calc(var(--i, 0) * 16ms + 70ms); }
body.nav-open .nav-head, body.nav-open .nav-foot { animation: navIn .42s var(--nav-ease) backwards; animation-delay: 40ms; }
@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* زرّ ☰: ثلاثة خطوط تنساب إلى ✕ ما دامت القائمة مفتوحة */
.menu-btn .burger { position: relative; width: 20px; height: 14px; display: block; }
.menu-btn .burger i {
  position: absolute; inset-inline: 0; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s var(--nav-ease), opacity .2s ease, width .3s var(--nav-ease);
}
.menu-btn .burger i:nth-child(1) { top: 0; }
.menu-btn .burger i:nth-child(2) { top: 6px; width: 70%; }
.menu-btn .burger i:nth-child(3) { top: 12px; }
.menu-btn:hover .burger i:nth-child(2) { width: 100%; }
body.nav-open .menu-btn .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .menu-btn .burger i:nth-child(2) { opacity: 0; }
body.nav-open .menu-btn .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.content { flex: 1; min-width: 0; overflow: auto; padding: 14px; }
.content.flush { padding: 0; overflow: hidden; }

.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h2 { margin: 0; }
.page-head .spacer { flex: 1; }

button, input, select, textarea { font-family: inherit; }

/* ————————————————— الأزرار ————————————————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap); padding: 9px 16px;
  font: inherit; font-weight: 600; font-size: .95rem;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--btn-radius, var(--radius)); cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line); }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: .87rem; }
.btn-lg { min-height: 56px; padding: 12px 22px; font-size: 1.1rem; }
.btn-block, .btn.wide { width: 100%; }
.btn.no-perm { opacity: .45; }
.btn .kbd { font-size: .72rem; opacity: .7; font-family: var(--mono); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); padding: 0;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.sm { width: 32px; height: 32px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ————————————————— الحقول ————————————————— */
.inp, select.inp, textarea.inp {
  width: 100%; min-height: var(--tap); padding: 8px 12px;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
}
.inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inp:disabled { background: var(--surface-3); color: var(--muted); }
.inp.num { text-align: start; font-variant-numeric: tabular-nums; }
textarea.inp { min-height: 74px; resize: vertical; padding-top: 10px; }
select.inp { cursor: pointer; }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; margin-bottom: 5px; font-size: .87rem; font-weight: 600; color: var(--ink-2); }
.field-hint { display: block; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 180px; margin-bottom: 12px; }

.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 36px; }
.chk input { width: 19px; height: 19px; accent-color: var(--brand); cursor: pointer; flex: none; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }

/* ————————————————— اللوحات والبطاقات ————————————————— */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 14px; overflow: hidden; }
.panel-title { margin: 0; padding: 12px 16px; font-size: .98rem; font-weight: 700; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.panel-body { padding: 14px 16px; }
.panel-body.flush { padding: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: var(--brand); }
.stat-label { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.stat-value { font-size: 1.55rem; font-weight: 700; line-height: 1.25; word-break: break-word; }
.stat-sub { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat-ok    .stat-value { color: var(--ok); }
.stat-warn  .stat-value { color: var(--warn); }
.stat-danger .stat-value { color: var(--danger); }
.stat-brand .stat-value { color: var(--brand); }
.hero { font-size: 3rem; font-weight: 700; line-height: 1.05; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  background: var(--surface-3); color: var(--ink-2);
}
.badge-ok     { background: var(--ok-soft);     color: var(--ok); }
.badge-warn   { background: var(--warn-soft);   color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info   { background: var(--info-soft);   color: var(--info); }
.badge-brand  { background: var(--brand-soft);  color: var(--brand-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.chip-ok { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.chip-warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.chip-error { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.chip-muted { opacity: .8; }
.chip-info { border-color: var(--info); color: var(--info); background: var(--info-soft); }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--brand); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.toolbar .inp { width: auto; min-width: 190px; }

/* ————————————————— الجداول ————————————————— */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); font-weight: 700; font-size: .85rem; color: var(--ink-2);
  white-space: nowrap; border-bottom: 2px solid var(--line);
}
.table thead th.sortable { cursor: pointer; user-select: none; }
.table thead th.sortable:hover { color: var(--brand); }
.sort-mark { font-size: .65em; margin-inline-start: 4px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table tbody tr.row-danger { background: var(--danger-soft); }
.table tbody tr.row-warn { background: var(--warn-soft); }
.table tbody tr.row-muted { opacity: .6; }
.table .a-left { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .a-center { text-align: center; }
.table tfoot td { background: var(--surface-3); font-weight: 700; border-top: 2px solid var(--line-2); }
.table-wrap.dense .table th, .table-wrap.dense .table td { padding: 6px 9px; font-size: .88rem; }
/* كشف الحساب: أصناف كل فاتورة آجلة تحت بعضها — ما أخذه الزبون دَينًا */
.table td.stmt-items { min-width: 180px; max-width: 340px; white-space: normal; }
.stmt-lines { display: grid; gap: 2px; line-height: 1.45; }
.stmt-line { overflow-wrap: anywhere; }
.stmt-name { font-weight: 600; }
.stmt-qty { font-variant-numeric: tabular-nums; }
.table .empty, td.empty { text-align: center; color: var(--muted); padding: 30px 12px; }
.table-note { padding: 8px 12px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }
.pager { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.pager-info { color: var(--muted); font-size: .85rem; }

/* ————————————————— النوافذ ————————————————— */
.modal-back {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15,23,42,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; transition: opacity .16s;
}
.modal-back.in { opacity: 1; }
.modal-back.closing { pointer-events: none; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-height: 92dvh; display: flex; flex-direction: column;
  transform: translateY(10px) scale(.99); transition: transform .16s;
}
.modal-back.in .modal { transform: none; }
.modal-sm { max-width: 420px; }
.modal-md { max-width: 640px; }
.modal-lg { max-width: 920px; }
.modal-xl { max-width: 1200px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 1.05rem; flex: 1; }
.modal-x { flex: none; }
.modal-body { padding: 16px; overflow: auto; flex: 1; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.modal-text { font-size: 1rem; margin-bottom: 10px; }
.modal-detail { color: var(--ink-2); font-size: .9rem; margin-bottom: 10px; }
.modal-error { color: var(--danger); font-size: .88rem; min-height: 1.2em; margin-top: 6px; font-weight: 600; }
.modal .inp { margin-bottom: 8px; }

.pick-list { max-height: 46dvh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 8px; }
.pick-item { display: block; width: 100%; padding: 11px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: start; font: inherit; color: var(--ink); cursor: pointer; }
.pick-item:hover, .pick-item.on { background: var(--brand-soft); }
.pick-item:last-child { border-bottom: 0; }

/* ————————————————— الرسائل ————————————————— */
.toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-weight: 600; font-size: .95rem; max-width: 420px;
  transform: translateY(12px); opacity: 0; transition: .18s; pointer-events: auto; cursor: pointer;
}
.toast.in { transform: none; opacity: 1; }
.toast-ok    { border-inline-start: 4px solid var(--ok); }
.toast-error { border-inline-start: 4px solid var(--danger); }
.toast-warn  { border-inline-start: 4px solid var(--warn); }
.toast-info  { border-inline-start: 4px solid var(--info); }
.toast-ok .icon { color: var(--ok); } .toast-error .icon { color: var(--danger); }
.toast-warn .icon { color: var(--warn); } .toast-info .icon { color: var(--info); }

.busy { position: fixed; inset: 0; z-index: 1100; background: rgba(15,23,42,.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; }
.spinner { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy-msg { font-weight: 600; }

.route-error { padding: 30px; text-align: center; color: var(--danger); font-weight: 600; }
.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-state .icon { opacity: .4; margin-bottom: 10px; }
.empty-state h3 { color: var(--ink-2); }

/* ————————————————— شاشة الكاشير ————————————————— */
.pos { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(340px, 470px); height: 100%; min-height: 0; }
/* position:relative: قائمة نتائج البحث تُقاس من عمود الأصناف لا من الصفحة —
   كانت تمتدّ بعرض الشاشة كلّها فتغطّي الفاتورة والقائمة الجانبية */
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-inline-start: 1px solid var(--line); position: relative; }
.pos-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }

.scan-bar { display: flex; gap: 8px; padding: 10px; background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; }
.cam-btn { color: var(--brand-2); }
.cam-btn .icon { flex: none; }
.scan-bar > .btn { flex: none; }
.scan-input {
  /* min-width:0: بدونه لا تنكمش الخانة تحت عرضها الافتراضي، فيخرج زرّا البحث
     والإضافة من عمود الأصناف فوق رأس الفاتورة على الشاشات المتوسّطة */
  flex: 1; min-width: 0; min-height: 52px; font-size: 1.15rem; font-weight: 600;
  padding: 10px 14px; border: 2px solid var(--brand); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.scan-input:focus { outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.scan-input::placeholder { font-weight: 400; color: var(--muted); }

.search-results {
  position: absolute; z-index: 60; inset-inline: 10px; top: 64px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 52dvh; overflow: auto;
}
.search-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 13px; background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; color: var(--ink); text-align: start; cursor: pointer;
}
.search-row:hover, .search-row.on { background: var(--brand-soft); }
.search-row .nm { flex: 1; min-width: 0; font-weight: 600; }
.search-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.search-row .pr { font-weight: 700; color: var(--brand-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-row .qy { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.search-row .qy.out { color: var(--danger); font-weight: 700; }

.quick-grid {
  flex: 1; overflow: auto; padding: 10px; display: grid; gap: 8px; align-content: start;
  grid-template-columns: repeat(var(--quick-cols, 4), minmax(0, 1fr));
  /* الصفوف بارتفاع محتواها دائمًا. الشبكة ثابتة الارتفاع وأصنافها أكثر ممّا
     يتّسع، فكانت الصفوف تُحسب بحدّها الأدنى وينضغط الاسم إلى 8px فيختفي */
  grid-auto-rows: max-content;
}
.quick-btn {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  min-height: 82px; padding: 8px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink); cursor: pointer;
  line-height: 1.4; overflow: hidden;
}
/* الاسم سطران كحدّ أقصى ثم نقاط. ارتفاع السطر 1.4 لا أقل: حروف Plex العربية
   أطول من سطر 1.25 فكان أعلى الاسم يُقصّ */
.quick-btn .n { flex: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; line-height: 1.45; padding-block: 1px; }
.quick-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.quick-btn:active { transform: scale(.97); }
.quick-img { width: 34px; height: 34px; object-fit: contain; border-radius: 5px; }
.quick-btn .p { font-size: .85rem; font-weight: 700; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.quick-btn .q { font-size: .74rem; color: var(--muted); }
.quick-btn.out { opacity: .55; }
.quick-cats { display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; }
.quick-cats .chip { white-space: nowrap; }
.quick-cats .chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.cart-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.cart-head .who { font-weight: 700; font-size: .93rem; display: flex; align-items: center; gap: 6px; min-width: 0; }
.cart-head .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-head .spacer { flex: 1; }

.cart-lines { flex: 1; overflow: auto; min-height: 0; }
.cart-line {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.cart-line:hover { background: var(--surface-2); }
.cart-line.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.cart-line .nm { font-weight: 600; font-size: .96rem; }
.cart-line .tot { font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; font-size: 1rem; }
.cart-line .meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .83rem; color: var(--muted); flex-wrap: wrap; }
.cart-line .meta b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cart-line .meta .disc { color: var(--ok); font-weight: 700; }
.cart-line .meta .chg { color: var(--warn); font-weight: 700; }
.cart-line .qbox { display: flex; align-items: center; gap: 4px; }
.cart-line .qbtn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cart-line .qbtn:hover { background: var(--brand-soft); border-color: var(--brand); }
.cart-line .meta .sub { display: contents; }
.cart-line .meta-grow { flex: 1; }

.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted); gap: 8px; text-align: center; padding: 20px; }
.cart-empty .big { font-size: 1.05rem; font-weight: 600; color: var(--ink-2); }

.cart-foot { flex: none; border-top: 1px solid var(--line); background: var(--surface-2); }
.tot-rows { padding: 8px 14px; }
.tot-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; font-size: .93rem; }
.tot-row.big { font-size: 1.05rem; font-weight: 700; }
.tot-row b { font-variant-numeric: tabular-nums; }
.tot-row.disc b { color: var(--ok); }
.grand-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 14px; background: var(--brand); color: var(--brand-ink);
}
.grand-row .l { font-size: 1.05rem; font-weight: 700; }
.grand-row .v { font-size: 2.05rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
/* تسعة أزرار: بأربعة أعمدة كان «تفريغ» وحده في صفّ ثالث يأكل ~70px من أسطر
   الفاتورة؛ خمسة أعمدة حين يتّسع اللوح (صفّان)، وأربعة حين يضيق */
.pos-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; padding: 8px 8px 0; }
.pos-actions .btn { min-height: 46px; padding: 6px 4px; font-size: .84rem; flex-direction: column; gap: 2px; }
.pos-actions .btn .kbd { font-size: .68rem; }
.pay-row { padding: 8px; }
.pay-btn { width: 100%; min-height: 60px; font-size: 1.15rem; gap: 8px; }

/* لوحة الدفع */
.pay-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 7px; }
.pay-method { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; border: 2px solid var(--line-2); border-radius: var(--radius); background: var(--surface); font: inherit; font-weight: 600; font-size: .88rem; color: var(--ink); cursor: pointer; }
.pay-method.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); }
.pay-amount { font-size: 2rem; font-weight: 700; text-align: center; min-height: 62px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick-cash .btn { min-height: 44px; font-weight: 700; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.numpad-key { min-height: 52px; font: inherit; font-size: 1.25rem; font-weight: 700; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); cursor: pointer; }
.numpad-key:hover { background: var(--brand-soft); border-color: var(--brand); }
.numpad-key:active { transform: scale(.96); }
.numpad-key.del { color: var(--danger); }
.numpad-key.numpad-extra { grid-column: span 3; font-size: 1rem; }
.pay-lines { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.pay-line { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.pay-line:last-child { border-bottom: 0; }
.pay-line .m { font-weight: 700; flex: 1; }
.pay-line .a { font-variant-numeric: tabular-nums; font-weight: 700; }
.pay-summary { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.pay-summary .big { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.change-box { background: var(--ok-soft); border: 2px solid var(--ok); color: var(--ok); border-radius: var(--radius); padding: 12px; text-align: center; }
.change-box .v { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* زرّ الإتمام يملأ ذيل نافذة الدفع ويبقى ظاهرًا مهما طال محتواها */
.pay-modal .modal-foot { align-items: stretch; }
.pay-modal .modal-foot .pay-finish { flex: 1 1 260px; }
/* الشاشات القصيرة (1366×768 وما تحتها): لوحة أرقام أنحف فلا يحتاج الدفع تمريرًا */
@media (max-height: 820px) {
  .pay-modal .modal-body { padding: 12px 16px; }
  .pay-modal .numpad-key { min-height: 42px; font-size: 1.1rem; }
  .pay-modal .pay-amount { font-size: 1.7rem; min-height: 46px; }
  .pay-modal .quick-cash .btn { min-height: 38px; }
  .pay-modal .pay-method { min-height: 46px; }
}

/* ————————————————— الرسوم البيانية ————————————————— */
.chart { display: block; width: 100%; height: auto; background: transparent; direction: ltr; }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 12px; }
.chart-box h3 { font-size: .98rem; margin-bottom: 2px; }
.chart-box .sub { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: .85rem; color: var(--ink-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend-item b { font-variant-numeric: tabular-nums; color: var(--ink); }
.chart-tip {
  position: fixed; z-index: 1200; display: none; pointer-events: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px 11px; font-size: .85rem; max-width: 260px;
}
.chart-tip .tip-title { font-weight: 700; margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 7px; }
.chart-tip .tip-row i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.chart-tip .tip-row b { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.bar-mark, .donut-slice { transition: opacity .1s; }
.chart:hover .bar-mark:hover, .chart:hover .donut-slice:hover { opacity: .82; }
.meter { display: flex; align-items: center; gap: 8px; }
.meter .chart-meter { height: 10px; flex: 1; }
.meter-label { font-size: .82rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ————————————————— شاشة الدخول ————————————————— */
.login-wrap { display: flex; align-items: center; justify-content: center; height: 100dvh; padding: 20px; background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 55%, var(--bg) 55.1%); }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px; }
.login-card h1 { text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 18px; font-size: .9rem; }
.pin-dots { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); }
.pin-dot.on { background: var(--brand); border-color: var(--brand); }
.login-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.login-tabs .btn { flex: 1; }
.login-tabs .btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
/* القفل بخلفية الدخول نفسها: الانتقال بينهما لا يبدو كشاشة أخرى من نظام آخر */
.lock-screen { position: fixed; inset: 0; z-index: 1300; background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 55%, var(--bg) 55.1%); display: flex; align-items: center; justify-content: center; padding: 20px; }

/* ————————————————— متنوّع ————————————————— */
.kbd { display: inline-block; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface-2); font-family: var(--mono); font-size: .76rem; color: var(--ink-2); }
.hotkeys { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.hotkey { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.hotkey .kbd { flex: none; min-width: 42px; text-align: center; }

.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow small { display: block; color: var(--muted); font-size: .82rem; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 9px 16px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; min-height: 42px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--brand-2); border-bottom-color: var(--brand); }

.tree-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tree-row:hover { background: var(--surface-2); }

.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); transition: width .2s; }

.money-pos { color: var(--ok); font-weight: 700; }
.money-neg { color: var(--danger); font-weight: 700; }
.delta-up { color: var(--ok); font-weight: 700; }
.delta-down { color: var(--danger); font-weight: 700; }

.bell-dot {
  position: absolute; top: 4px; inset-inline-end: 4px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--surface); box-sizing: content-box;
}
.list-item.unread { border-inline-start: 3px solid var(--brand); }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }

.help-block { background: var(--info-soft); border: 1px solid var(--info); border-radius: var(--radius); padding: 10px 13px; color: var(--ink-2); font-size: .9rem; margin-bottom: 12px; }
.warn-block { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--radius); padding: 10px 13px; font-size: .9rem; margin-bottom: 12px; }
.danger-block { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--radius); padding: 10px 13px; font-size: .9rem; margin-bottom: 12px; }

/* ————————————————— الشاشات الصغيرة ————————————————— */
/* شاشة الكاشير تبقى عمودين حتى عرض 700px: حاسوب 1366×768 بتكبير ويندوز 125%
   عرضه الفعلي 1093px، وكان يتحوّل لعمود واحد فتصير قائمة الأصناف بارتفاع صفر
   ويخرج زرّ الدفع أسفل الشاشة. */
@media (max-width: 760px) {
  .pay-grid { grid-template-columns: 1fr; }
}
/* الشاشات القصيرة: كل بكسل لأسطر الفاتورة */
@media (max-height: 700px) {
  .scan-bar { padding: 7px 10px; }
  .scan-input { min-height: 44px; }
  .cart-head { padding: 6px 12px; }
  .tot-rows { padding: 4px 14px; }
  .grand-row { padding: 7px 14px; }
  .grand-row .v { font-size: 1.65rem; }
  .pos-actions { gap: 5px; padding: 6px 8px 0; }
  .pos-actions .btn { min-height: 36px; flex-direction: row; gap: 5px; padding: 4px 6px; }
  .pay-row { padding: 6px 8px 8px; }
  .pay-btn { min-height: 48px; }
  .quick-btn { min-height: 70px; }
}
/* عرض الجوّال: الأصناف فوق والفاتورة تحت وتأخذ المساحة الأكبر، والأزرار
   الثانوية صفّ واحد يُمرَّر أفقيًا — كانت ثلاثة صفوف تترك للأسطر 50px فقط.
   هذا كاشير ويندوز في نافذة ضيّقة كما هو منذ 1.4.0؛ الجوّال والمتصفّح (.pos-m) يغلبانه أدناه. */
@media (max-width: 700px) {
  .pos { grid-template-columns: 1fr; grid-template-rows: minmax(150px, 38%) minmax(0, 1fr); }
  .pos-right { border-top: 1px solid var(--line); }
  .pos-actions { display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px 8px 0; }
  .pos-actions::-webkit-scrollbar { display: none; }
  .pos-actions .btn { flex: 0 0 auto; min-width: 76px; min-height: 40px; flex-direction: row; gap: 5px; }
  .pay-btn { min-height: 52px; }
}
/* ————— الكاشير على الجوّال والشاشات القصيرة —————
   كانت الفاتورة تأخذ 38%–62% من الجوّال ولو فارغة، فتنقصّ شبكة الأصناف عند صفّ ونصف،
   وعشرة أزرار في صفّ يُمرَّر أفقيًا يختفي ستّة منها خارج الشاشة؛ وفي الجوّال الأفقي
   كانت أسطر الفاتورة 25px. الآن:
   • قسمة ثابتة من أوّل لحظة: الأصناف صفّان على الأقل والفاتورة الباقي، فلا يتحرّك شيء
     تحت الإصبع حين يُضاف أوّل صنف.
   • السطر صفّ واحد مضغوط: الاسم وتحته السعر، ثم الكمية ± والمجموع والحذف.
   • الإجمالي وزرّ «الدفع» متجاوران أسفل الفاتورة، والأزرار العشرة ظاهرة كلّها في صفّين
     (اختصاراتها في التلميح).
   القسم الأوّل مشترك بين الجوّال (≤700 عرضًا) والجوّال الأفقي (أقصر من 480).
   كلّه على .pos-m وحدها (pos.js: كل مكان إلا تطبيق ويندوز)، فكاشير ويندوز يبقى كما هو في
   أي حجم نافذة. ‎.pos-m بوزن .pos نفسه فتغلب سمات التصاميم (html[data-density] …) كما كانت. */
@media (max-width: 700px), (min-width: 701px) and (max-height: 480px) {
  .pos-m .scan-bar { padding: 8px 10px; gap: 6px; }
  .pos-m .scan-input { min-height: 46px; font-size: 1.05rem; padding-block: 8px; }
  .pos-m .scan-bar > .btn { width: 46px; min-height: 46px; padding: 0; }
  /* القائمة تبدأ تحت الخانة مباشرة (8 + 46) لا فوقها */
  .pos-m .search-results { top: 56px; }

  /* الأقسام تُمرَّر أفقيًا بلا شريط تمرير، وتتلاشى عند الحافّة دلالةً على البقيّة */
  .pos-m .quick-cats {
    padding: 6px 10px 0; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px);
    mask-image: linear-gradient(to right, transparent 0, #000 28px);
  }
  html[dir="ltr"] .pos-m .quick-cats {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px);
    mask-image: linear-gradient(to left, transparent 0, #000 28px);
  }
  .pos-m .quick-cats::-webkit-scrollbar { display: none; }
  .pos-m .quick-cats .chip { min-height: 34px; }
  .pos-m .quick-grid { padding: 8px 10px; gap: 7px; }
  .pos-m .quick-btn { min-height: 74px; padding: 6px; gap: 2px; }
  /* شريط تمرير رفيع لا يأكل من عرض الشبكة والأسطر (WebView يرسمه حقيقيًا) */
  .pos-m .quick-grid::-webkit-scrollbar, .pos-m .cart-lines::-webkit-scrollbar { width: 3px; }

  /* يلتفّ صفًّا ثانيًا عند الحاجة ولا تُقصّ الشارات: قصّ شارة الدين كان يُظهر 12,500.75 «2,500.75» */
  .pos-m .cart-head { padding: 6px 10px; min-height: 46px; gap: 4px 6px; }

  .pos-m .cart-empty { flex-direction: row; flex-wrap: wrap; align-content: center; gap: 2px 8px; padding: 10px 12px; font-size: .82rem; }
  .pos-m .cart-empty .icon { width: 20px; height: 20px; }
  .pos-m .cart-empty .big { font-size: .92rem; }

  .pos-m .cart-lines .cart-line {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas: "nm qty tot del" "sub qty tot del";
    align-items: center; gap: 0 8px; padding: 7px 10px;
  }
  .pos-m .cart-line .nm {
    grid-area: nm; font-size: .92rem; line-height: 1.35; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .pos-m .cart-line .meta { display: contents; }
  .pos-m .cart-line .qbox { grid-area: qty; }
  .pos-m .cart-line .qbtn { width: 34px; height: 34px; }
  .pos-m .cart-line .tot { grid-area: tot; min-width: 62px; font-size: .95rem; }
  .pos-m .cart-line .meta .sub { grid-area: sub; display: flex; flex-wrap: wrap; align-items: center; gap: 1px 6px; font-size: .78rem; line-height: 1.5; }
  .pos-m .cart-line .meta-grow { display: none; }
  .pos-m .cart-line .meta > .icon-btn { grid-area: del; width: 34px; height: 34px; }

  .pos-m .cart-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "rows rows" "act act" "grand pay";
  }
  .pos-m .tot-rows { grid-area: rows; padding: 4px 12px 0; }
  .pos-m .tot-row { font-size: .85rem; padding: 1px 0; }
  /* overflow و flex تُعاد لأصلها: قاعدة ويندوز الضيّقة أعلاه (صفّ يُمرَّر) لا تُورَّث للجوّال */
  .pos-m .pos-actions {
    grid-area: act; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px; padding: 6px 8px 0; overflow-x: visible; scrollbar-width: auto;
  }
  .pos-m .pos-actions .btn { min-width: 0; min-height: 38px; padding: 4px 2px; font-size: .78rem; flex-direction: row; gap: 3px; flex: 0 1 auto; }
  .pos-m .pos-actions .btn > span:first-child { overflow: hidden; text-overflow: ellipsis; }
  .pos-m .pos-actions .kbd { display: none; }
  /* الإجمالي لوحة عرض بإطار لا زرّ ثانٍ بلون «الدفع» بجانبه (ولا يُلمس، كما على الحاسوب) */
  .pos-m .cart-foot .grand-row {
    grid-area: grand; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
    margin: 8px 0; margin-inline-start: 8px; padding: 6px 12px; border-radius: var(--btn-radius, var(--radius));
    background: var(--surface); color: var(--ink); border: 2px solid var(--brand); box-shadow: none;
  }
  .pos-m .grand-row .l { font-size: .8rem; color: var(--muted); }
  .pos-m .grand-row .v { font-size: 1.45rem; }
  .pos-m .pay-row { grid-area: pay; padding: 8px; }
  .pos-m .pay-btn { height: 100%; min-height: 56px; padding-inline: 8px; }
}
/* شارة الحساب حرفها الأول وحده حتى 700px: كان اسم المستخدم يأخذ ~70px فتُقصّ «وردية مفتوحة»
   (وعلى 561–700 حالة المزامنة أيضًا)؛ الاسم في تلميحها وفي «حسابي» */
@media (max-width: 700px) {
  .topbar .brand span { display: none; }
  .topbar .only-wide { display: none; }   /* الثانوي يختفي: حالة المزامنة والوضع الليلي والقفل (في «حسابي») */
  .topbar .user-chip { padding: 3px; }
  .topbar .user-chip .user-name { display: none; }
}
/* أضيق الجوّالات (320px): الشارات أصغر قليلًا فتتّسع «وردية مفتوحة» بخطوط عريضة */
@media (max-width: 360px) {
  .topbar { gap: 4px; }
  .topbar .chip-row .chip { padding-inline: 8px; font-size: .8rem; gap: 4px; }
}
/* أضيق الجوّالات: «± الإجمالي» يتّسع في خُمس العرض */
@media (max-width: 380px) {
  .pos-m .pos-actions .btn { font-size: .72rem; }
}
/* الجوّال (عمود واحد): الأصناف فوق والفاتورة تحت، بقسمة ثابتة من أوّل لحظة. كانت الفاتورة
   الفارغة شريطًا رفيعًا ثم تتّسع مع أوّل صنف، فتنكمش الشبكة تحت إصبع الكاشير ويقع لمسه
   الثاني على سطر الفاتورة (نافذة «تعديل الكمية») بدل إضافة الصنف مرّة ثانية. */
@media (max-width: 700px) {
  .pos-m { grid-template-columns: 1fr; grid-template-rows: minmax(170px, 1fr) minmax(0, 1.15fr); }
  /* لوحة المفاتيح مفتوحة (.kb-open من pos.js، لا من الارتفاع وحده: جوّال صغير أو أفقي قصير
     أصلًا ولوحته مغلقة): الكتابة والأسطر والدفع أوّلًا، والبقيّة تعود حين تُغلق */
  .pos-m.kb-open { grid-template-rows: minmax(130px, .8fr) minmax(0, 1fr); }
  .pos-m.kb-open .quick-cats, .pos-m.kb-open .tot-rows, .pos-m.kb-open .pos-actions { display: none; }
}
/* جوّال قصير (≤700px ارتفاعًا): كل شيء أصغر قليلًا، والفاتورة أوسع قليلًا */
@media (max-width: 700px) and (max-height: 700px) {
  .pos-m { grid-template-rows: minmax(150px, .85fr) minmax(0, 1.15fr); }
  .pos-m .scan-bar { padding-block: 6px; }
  .pos-m .scan-input { min-height: 42px; }
  .pos-m .scan-bar > .btn { width: 42px; min-height: 42px; }
  .pos-m .search-results { top: 50px; }
  .pos-m .quick-btn { min-height: 66px; }
  .pos-m .cart-head { min-height: 40px; padding-block: 3px; }
  .pos-m .pos-actions .btn { min-height: 32px; }
  .pos-m .cart-foot .grand-row { margin-block: 6px; padding-block: 4px; }
  .pos-m .grand-row .v { font-size: 1.3rem; }
  .pos-m .pay-row { padding-block: 6px; }
  .pos-m .pay-btn { min-height: 48px; }
}
/* شاشة عمودية صغيرة جدًّا (جوّالات Android Go ‏320×497): الأزرار العشرة
   صفّ واحد يُمرَّر أفقيًا ويتلاشى عند الحافّة — كلّها في المتناول — لتتّسع أسطر الفاتورة */
@media (max-width: 700px) and (max-height: 560px) and (max-aspect-ratio: 3/2) {
  .pos-m { grid-template-rows: minmax(120px, .7fr) minmax(0, 1fr); }
  .pos-m .pos-actions {
    display: flex; overflow-x: auto; scrollbar-width: none; padding-top: 5px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px);
    mask-image: linear-gradient(to right, transparent 0, #000 24px);
  }
  html[dir="ltr"] .pos-m .pos-actions {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px);
    mask-image: linear-gradient(to left, transparent 0, #000 24px);
  }
  .pos-m .pos-actions::-webkit-scrollbar { display: none; }
  .pos-m .pos-actions .btn { flex: 0 0 auto; min-width: 64px; padding-inline: 8px; }
  .pos-m .tot-row { font-size: .8rem; }
}
/* الجوّال الأفقي — والصغير منه (640×360) أيضًا لا الأعرض من 700 وحده: عمودان كالحاسوب
   لكن مضغوطان. نسبة العرض 3:2 تفصله عن الجوّال العمودي ولوحته مفتوحة (412×400). */
@media (max-width: 700px) and (min-aspect-ratio: 3/2) and (max-height: 480px) {
  .pos-m, .pos-m.kb-open { grid-template-columns: minmax(0, 1fr) minmax(300px, 52%); grid-template-rows: minmax(0, 1fr); }
  .pos-m .pos-right { border-top: 0; }
  .pos-m .pos-actions .btn { font-size: .68rem; padding-inline: 1px; }
}
@media (min-width: 701px) and (max-height: 480px), (min-aspect-ratio: 3/2) and (max-height: 480px) {
  .pos-m .scan-bar { padding-block: 6px; }
  .pos-m .scan-input { min-height: 40px; font-size: 1rem; }
  .pos-m .scan-bar > .btn { width: 40px; min-height: 40px; }
  .pos-m .search-results { top: 48px; }
  .pos-m .quick-cats { padding-top: 5px; }
  .pos-m .quick-cats .chip { min-height: 30px; }
  .pos-m .quick-btn { min-height: 60px; }
  .pos-m .cart-head { min-height: 40px; padding-block: 3px; }
  .pos-m .cart-empty { padding-block: 6px; }
  .pos-m .pos-actions .btn { min-height: 30px; }
  .pos-m .cart-foot .grand-row { margin-block: 6px; padding-block: 3px; }
  .pos-m .grand-row .v { font-size: 1.25rem; }
  .pos-m .pay-row { padding-block: 6px; }
  .pos-m .pay-btn { min-height: 44px; }
}
/* شارات المفاتيح لا معنى لها على شاشة لمس بلا لوحة مفاتيح (تبقى في النصّ للاختبارات) */
@media (hover: none) and (pointer: coarse) {
  .pos-m .kbd { display: none; }
}
@media (max-width: 860px) {
  .content { padding: 10px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .stat-value { font-size: 1.3rem; }
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}
@media (max-width: 560px) {
  /* الجوّال: القائمة أضيق قليلًا، وتبقى بكامل الارتفاع وبزوايا قائمة */
  .sidebar { width: min(318px, 86vw); }
  .topbar { gap: 6px; padding: 0 8px; }
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .toolbar .inp { min-width: 130px; flex: 1; }
  .modal { max-height: 96dvh; }
  .grand-row .v { font-size: 1.7rem; }
}


/* شعار الهوية في شاشة الدخول */
.login-brand { display: grid; justify-items: center; gap: 8px; margin-bottom: 12px; }
.login-brand img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 20px rgba(243,18,176,.4)); }
.login-brand b { font-size: 1.05rem; font-weight: 700; letter-spacing: .16em; direction: ltr; color: var(--ink); }
.login-brand b i { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .brand img { width: 22px; height: 22px; object-fit: contain; flex: none; }

/* ————————————————— تذييل MADIX (أسفل كل صفحة) ————————————————— */
/* شاشة الدخول عمود واحد: البطاقة تملأ ما تبقّى ثم التذييل أسفلها.
   القاعدة الأصلية تضبط height:100dvh، ومعها كان التذييل يسقط تحت الطيّة. */
.login-wrap { flex: 1 1 auto; min-height: 0; height: auto; overflow: auto; }
.fx-foot {
  flex: none; display: flex; align-items: center; justify-content: center;
  padding: 4px 10px; min-height: 30px;
  background: var(--surface); border-top: 1px solid var(--line);
  min-width: 0;
}
.fx-foot-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap;
  border: 0; background: none; cursor: pointer; padding: 3px 10px; border-radius: 999px;
  color: var(--muted); font: inherit; font-size: .78rem; direction: ltr; line-height: 1.3;
  transition: color .15s ease, background .15s ease;
}
.fx-foot-btn:hover { color: var(--ink); background: var(--surface-2); }
.fx-foot-brand {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 700; letter-spacing: .06em;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fx-foot-brand img { width: 16px; height: 16px; filter: drop-shadow(0 1px 3px rgba(243,18,176,.45)); }
.fx-logo { object-fit: contain; }

/* ————————————————— نافذة «عن MADIX» ————————————————— */
/* تصميم مستقلّ تمامًا عن نوافذ النظام: داكن، إطار متدرّج، شعار في الزاوية. */
.fx-about-back {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 4, 10, .72); backdrop-filter: blur(6px);
  animation: fxFade .2s ease;
}
@keyframes fxFade { from { opacity: 0 } to { opacity: 1 } }
.fx-about {
  position: relative; width: min(450px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  border-radius: 24px; padding: 26px 22px 20px; color: #EAE9F5; direction: rtl;
  background:
    radial-gradient(120% 85% at 88% -10%, rgba(243,18,176,.34) 0%, transparent 58%),
    radial-gradient(110% 80% at 6% 108%, rgba(123,47,247,.34) 0%, transparent 60%),
    linear-gradient(168deg, #17121F 0%, #0A0910 64%);
  box-shadow: 0 34px 90px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.10);
  animation: fxPop .32s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes fxPop { from { transform: translateY(16px) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
.fx-about::before {
  content: ""; position: absolute; inset: 0; border-radius: 24px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(243,18,176,.85), rgba(123,47,247,.4) 46%, rgba(255,255,255,.10) 78%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.fx-about-logo {
  position: absolute; top: 20px; inset-inline-start: 24px; width: 52px; height: 52px;
  object-fit: contain; filter: drop-shadow(0 6px 18px rgba(243,18,176,.55));
}
.fx-about-x {
  position: absolute; top: 16px; inset-inline-end: 16px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #CFCEE4;
  cursor: pointer; display: grid; place-items: center; transition: background .15s ease, color .15s ease;
}
.fx-about-x:hover { background: rgba(255,255,255,.14); color: #fff; }
.fx-about h2 {
  margin: 50px 0 2px; font-size: 26px; font-weight: 700; letter-spacing: .14em;
  direction: ltr; text-align: center; color: #fff;
}
.fx-about h2 span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-about .fx-tag { margin: 0 0 6px; text-align: center; color: #9F9CBE; font-size: .84rem; }
.fx-about .fx-dev { margin: 0 0 18px; text-align: center; color: #EDEBFA; font-size: .92rem; font-weight: 600; direction: ltr; }
.fx-about .fx-dev small { display: block; color: #8C89AC; font-size: .68rem; font-weight: 500; letter-spacing: .18em; margin-top: 3px; }
.fx-sep { height: 1px; margin: 0 0 16px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); }
.fx-links { display: grid; gap: 9px; }
.fx-link {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 15px; cursor: pointer; text-align: start; color: #F2F1FA;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); font: inherit;
  transition: transform .14s ease, background .16s ease, border-color .16s ease;
}
.fx-link:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); transform: translateY(-1px); }
.fx-link:focus-visible { outline: 2px solid #F312B0; outline-offset: 2px; }
.fx-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.fx-link.wa .fx-ico { background: linear-gradient(140deg, #25D366, #128C7E); }
.fx-link.fb .fx-ico { background: linear-gradient(140deg, #1877F2, #0B4FB4); }
.fx-link.erp .fx-ico { background: var(--brand-grad); }
.fx-tx { min-width: 0; }
.fx-tx b { display: block; font-size: .95rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-tx small { display: block; font-size: .78rem; color: #9C99BC; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
.fx-go { color: #7E7BA0; display: grid; place-items: center; }
/* السهم يشير إلى جهة القراءة: يساراً في العربية */
[dir="rtl"] .fx-go svg { transform: scaleX(-1); }
.fx-about-foot { margin-top: 16px; text-align: center; color: #6F6C8E; font-size: .7rem; direction: ltr; letter-spacing: .05em; }

@media (max-width: 560px) {
  .fx-about { padding: 22px 16px 16px; border-radius: 20px; }
  .fx-about h2 { font-size: 22px; }
  .fx-link { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .fx-ico { width: 38px; height: 38px; border-radius: 11px; }
  .fx-foot-btn { font-size: .72rem; }
  /* سطر واحد دائمًا: كان ينكسر سطرين (51px) بخطوط عريضة مثل Alexandria */
  .fx-foot { min-height: 26px; padding-block: 2px; }
  .fx-foot-btn { flex-wrap: nowrap; white-space: nowrap; font-size: .68rem; gap: 4px; padding-inline: 6px; letter-spacing: 0; }
}
/* الشاشات القصيرة: التذييل يأخذ من مساحة البيع، فيُخفى */
@media (max-height: 520px) { .fx-foot { display: none; } }

/* ==========================================================================
   التصاميم — تُفعَّل بسمات على <html> يضعها محرّك التصاميم (js/core/themes.js):
   data-surface طبيعة الأسطح · data-radius الزوايا · data-density الكثافة ·
   data-grad تدرّج لون الهوية. الألوان والخطوط متغيّرات تُحقن في skin-style.
   ========================================================================== */
.modal-title, .panel-title, .stat-value, .login-card h1, .grand-row .l, .topbar .brand > span { font-family: var(--font-display, var(--font)); }

/* تبديل ناعم بين التصاميم (يُضاف لحظة المعاينة ثم يُزال) */
html.skin-anim, html.skin-anim body, html.skin-anim .topbar, html.skin-anim .sidebar, html.skin-anim .panel,
html.skin-anim .card, html.skin-anim .stat, html.skin-anim .btn, html.skin-anim .inp, html.skin-anim .pos-right,
html.skin-anim .quick-btn, html.skin-anim .cart-foot, html.skin-anim .grand-row, html.skin-anim .nav-item {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important;
}

/* — زجاجية: الأسطح الكبيرة شفّافة فوق ملمس الخلفية مع تغبيش — */
html[data-surface="glass"] .topbar, html[data-surface="glass"] .sidebar, html[data-surface="glass"] .fx-foot,
html[data-surface="glass"] .panel, html[data-surface="glass"] .card, html[data-surface="glass"] .stat,
html[data-surface="glass"] .table-wrap, html[data-surface="glass"] .pos-right, html[data-surface="glass"] .scan-bar,
html[data-surface="glass"] .login-card, html[data-surface="glass"] .chart-box {
  background-color: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-color: rgba(255, 255, 255, .22);
}
html[data-surface="glass"] .cart-head, html[data-surface="glass"] .cart-foot,
html[data-surface="glass"] .panel-title, html[data-surface="glass"] .table thead th { background-color: var(--glass-bg-2); }
html[data-surface="glass"] .quick-btn { background-color: var(--glass-bg); border-color: rgba(255, 255, 255, .28); }
html[data-surface="glass"] .panel, html[data-surface="glass"] .card, html[data-surface="glass"] .stat { box-shadow: var(--shadow); }
html[data-mode="dark"][data-surface="glass"] .panel, html[data-mode="dark"][data-surface="glass"] .card,
html[data-mode="dark"][data-surface="glass"] .stat, html[data-mode="dark"][data-surface="glass"] .quick-btn { border-color: rgba(255, 255, 255, .08); }

/* — ناعمة عائمة: بلا حدود، ظلال واسعة خفيفة بلون الهوية — */
html[data-surface="soft"] .panel, html[data-surface="soft"] .card, html[data-surface="soft"] .stat,
html[data-surface="soft"] .table-wrap, html[data-surface="soft"] .chart-box, html[data-surface="soft"] .quick-btn {
  border-color: transparent; box-shadow: var(--shadow);
}
html[data-surface="soft"] .btn:not(.btn-ghost):not(.btn-primary):not(.btn-danger) { border-color: var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
html[data-surface="soft"] .pos-right { box-shadow: var(--shadow); border-inline-start: 0; }

/* — بارزة: ظلال محدّدة كالورق فوق الطاولة — */
html[data-surface="elevated"] .panel, html[data-surface="elevated"] .card, html[data-surface="elevated"] .stat,
html[data-surface="elevated"] .table-wrap, html[data-surface="elevated"] .chart-box { box-shadow: var(--shadow); }
html[data-surface="elevated"] .quick-btn { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
html[data-surface="elevated"] .quick-btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

/* — محدّدة: خطوط واضحة بلا ظلال (بساطة إسكندنافية) — */
html[data-surface="outline"] .panel, html[data-surface="outline"] .card, html[data-surface="outline"] .stat,
html[data-surface="outline"] .table-wrap, html[data-surface="outline"] .quick-btn, html[data-surface="outline"] .chart-box { border-color: var(--line-2); box-shadow: none; }
html[data-surface="outline"] .quick-btn:hover { border-color: var(--ink); background: var(--surface); }
html[data-surface="outline"] .nav-item.on { background: transparent; color: var(--ink); }
html[data-surface="outline"] .nav-item.on .nav-ic { background: var(--ink); color: var(--surface); box-shadow: none; }
html[data-surface="outline"] .nav-item.on::before { background: var(--ink); }

/* — منحوتة (نيومورفيك): السطح بلون الخلفية، يبرز بالضوء والظل — */
html[data-surface="neu"] .panel, html[data-surface="neu"] .card, html[data-surface="neu"] .stat,
html[data-surface="neu"] .table-wrap, html[data-surface="neu"] .chart-box, html[data-surface="neu"] .quick-btn,
html[data-surface="neu"] .login-card { border-color: transparent; box-shadow: var(--neu-out); }
html[data-surface="neu"] .btn:not(.btn-ghost):not(.btn-primary):not(.btn-danger),
html[data-surface="neu"] .numpad-key, html[data-surface="neu"] .pay-method, html[data-surface="neu"] .qbtn {
  border-color: transparent; box-shadow: var(--neu-out-sm);
}
html[data-surface="neu"] .btn:active:not(:disabled), html[data-surface="neu"] .numpad-key:active,
html[data-surface="neu"] .pay-method.on { box-shadow: var(--neu-in); }
html[data-surface="neu"] .inp, html[data-surface="neu"] .scan-input { box-shadow: var(--neu-in); border-color: transparent; }
html[data-surface="neu"] .inp:focus, html[data-surface="neu"] .scan-input:focus { box-shadow: var(--neu-in), 0 0 0 3px var(--brand-soft); }
/* مسافة تتنفّس فيها الظلال — إلا شاشة الكاشير (flush) فهي تدير حوافها بنفسها */
html[data-surface="neu"] .quick-grid, html[data-surface="neu"] .content:not(.flush) { padding: 14px; }
html[data-surface="neu"] .quick-grid { gap: 12px; }

/* — متوهّجة: حدود بلون الهوية وتوهّج خفيف (نيون) — */
html[data-surface="glow"] .panel, html[data-surface="glow"] .card, html[data-surface="glow"] .stat,
html[data-surface="glow"] .table-wrap, html[data-surface="glow"] .chart-box, html[data-surface="glow"] .quick-btn { box-shadow: var(--shadow); border-color: transparent; }
html[data-surface="glow"] .scan-input:focus, html[data-surface="glow"] .inp:focus { box-shadow: 0 0 0 1px var(--brand), 0 0 18px -2px var(--brand); }
html[data-mode="dark"][data-surface="glow"] .grand-row .v { text-shadow: 0 0 18px rgba(255, 255, 255, .35); }
html[data-surface="glow"] .btn-primary { box-shadow: 0 0 20px -4px var(--brand); }

/* — تدرّج لون الهوية على الأزرار الرئيسية والإجمالي — */
html[data-grad="1"] .btn-primary, html[data-grad="1"] .grand-row, html[data-grad="1"] .login-tabs .btn.on,
html[data-grad="1"] .quick-cats .chip.on, html[data-grad="1"] .numpad-key.numpad-extra:hover {
  background-image: var(--brand-grad); border-color: transparent;
}
html[data-grad="1"] .btn-primary:hover:not(:disabled) { background-image: var(--brand-grad); filter: brightness(1.07) saturate(1.05); }

/* — كبسولات بظلّ مُزاح (pop): هوية صفحة صهيب شوقي — الزرّ الرئيسي كبسولة بظلّ صلب ملوّن
     مُزاح نحو بداية السطر (يسارًا في العربية كما في الصفحة)، والأسطح بظلال دافئة ناعمة.
     بعد قواعد التدرّج عمدًا: زرّ pop مصمت دائمًا مهما كان التصميم — */
html { --pop-x: 1; }
html[dir="rtl"] { --pop-x: -1; }
html[data-surface="pop"] .panel, html[data-surface="pop"] .card, html[data-surface="pop"] .stat,
html[data-surface="pop"] .table-wrap, html[data-surface="pop"] .chart-box, html[data-surface="pop"] .login-card { box-shadow: var(--shadow); }
html[data-surface="pop"] .quick-btn { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
html[data-surface="pop"] .quick-btn:hover { box-shadow: var(--shadow); }
html[data-surface="pop"] .btn-primary {
  background: var(--pop-btn); background-image: none; border-color: var(--pop-btn); color: var(--pop-btn-ink);
  box-shadow: calc(3px * var(--pop-x)) 4px 0 var(--pop-sh);
}
html[data-surface="pop"] .btn-primary:hover:not(:disabled) {
  background: var(--pop-btn); background-image: none; border-color: var(--pop-btn); filter: none;
  transform: translate(calc(-1px * var(--pop-x)), -1px); box-shadow: calc(4px * var(--pop-x)) 5px 0 var(--pop-sh);
}
html[data-surface="pop"] .btn-primary:active:not(:disabled) {
  transform: translate(calc(2px * var(--pop-x)), 3px); box-shadow: calc(1px * var(--pop-x)) 1px 0 var(--pop-sh);
}
html[data-surface="pop"] .btn-primary:disabled { box-shadow: none; }

/* ==========================================================================
   لوحة عصرية (surface: bento) — «نبض الليمون» و«مدار» و«مخطّط هندسي».
   بطاقات بنتو على خلفية هادئة، شريط علوي عائم بحبّات الأقسام، بطاقة إبراز بلون
   الهوية، بطاقة «مباشر» داكنة، ورسوم منحنية تُرسم عند فتح الشاشة.
   data-bento: solid (مصمتة) · glass (زجاجية) · line (خطوط شعرية بلا ظلال).
   ========================================================================== */

/* — عناصر مشتركة تعمل في كل التصاميم (بهيئة هادئة خارج اللوحة العصرية) — */
.stat-label { display: flex; align-items: center; gap: 6px; }
.stat-ic { display: inline-grid; place-items: center; flex: none; color: var(--muted); }
.stat .chart-spark { width: 100%; height: 30px; margin-top: 4px; }
.top-pills, .live-chip, .dash-eyebrow, .dash-hi, .dash-lead { display: none; }
.dash-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-kpis { margin-bottom: 12px; }
.dash-hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 12px; margin-bottom: 12px; }
.dash-hero > .chart-box { margin-bottom: 0; min-width: 0; }
@media (max-width: 900px) { .dash-hero { grid-template-columns: minmax(0, 1fr); } }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.chart-head-tx { min-width: 0; }
.chart-head .sub { margin-bottom: 0; }
.big-money { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin: 6px 0 8px; }
.big-num { display: inline-flex; align-items: baseline; gap: 1px; direction: ltr; unicode-bidi: isolate; }
.big-money b { font-family: var(--font-display, var(--font)); font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big-money small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.chart-box .chart-donut { max-width: 230px; margin: 4px auto 0; }
.chart-spot { display: flex; flex-direction: column; }
.chart-spot > .chart { margin-top: auto; }
.big-note { margin-inline-start: auto; font-size: .8rem; color: var(--muted); }
.spot-big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; }
.spot-big b { font-family: var(--font-display, var(--font)); font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.spot-big span { font-size: .85rem; color: var(--muted); }
.seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.seg-btn {
  min-height: 30px; padding: 4px 12px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* — الهيكل: خلفية هادئة، شريط علوي عائم زجاجي — */
html[data-surface="bento"] .topbar {
  margin: 10px 12px 0; height: 60px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 20px;
  background-color: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 16px 34px -26px rgba(0, 0, 0, .45);
  z-index: 3;
}
html[data-surface="bento"] .topbar .brand { font-family: var(--font-display, var(--font)); letter-spacing: -.01em; }
html[data-surface="bento"] .topbar .chip { background: var(--surface); }
html[data-surface="bento"] .topbar .icon-btn { border-radius: 50%; }
html[data-surface="bento"] .content:not(.flush) { padding: 18px 20px 20px; }
html[data-surface="bento"] .content.flush { padding-top: 10px; }

/* حبّات الأقسام (الشاشات العريضة) — المختارة كبسولة داكنة كما في لوحات SaaS */
@media (min-width: 1100px) {
  html[data-surface="bento"] .top-pills {
    display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto;
    margin-inline-start: 6px; padding: 4px; overflow-x: auto; scrollbar-width: none;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  }
  html[data-surface="bento"] .top-pills::-webkit-scrollbar { display: none; }
  html[data-surface="bento"] .topbar[data-route="pos"] .top-pills { display: none; }
}
.top-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 13px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.top-pill svg { color: var(--muted); transition: color .25s ease; }
.top-pill:hover { background: var(--surface); color: var(--ink); }
.top-pill:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.top-pill.on { background: var(--pill-on); color: var(--pill-on-ink); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .55); }
.top-pill.on svg { color: var(--pill-on-ic); }
@media (max-width: 1399px) { .top-pill:not(.on) span { display: none; } .top-pill:not(.on) { padding: 0 10px; } }

/* القائمة ☰ بالروح نفسها: المختار كبسولة داكنة */
html[data-surface="bento"] .nav-item { border-radius: 999px; }
html[data-surface="bento"] .nav-ic { border-radius: 50%; }
html[data-surface="bento"] .nav-item.on { background: var(--pill-on); color: var(--pill-on-ink); }
html[data-surface="bento"] .nav-item.on .nav-ic { background: transparent; background-image: none; color: var(--pill-on-ic); border-color: transparent; box-shadow: none; }
html[data-surface="bento"] .nav-item.on .nav-kbd { background: transparent; border-color: rgba(255, 255, 255, .2); color: inherit; }
html[data-surface="bento"] .nav-item.on::before { display: none; }

/* — البطاقات — */
html[data-surface="bento"] .panel, html[data-surface="bento"] .card, html[data-surface="bento"] .stat,
html[data-surface="bento"] .table-wrap, html[data-surface="bento"] .chart-box, html[data-surface="bento"] .login-card {
  border-color: var(--line); box-shadow: var(--shadow);
}
html[data-surface="bento"] .panel-title { background: transparent; font-family: var(--font-display, var(--font)); }
html[data-surface="bento"] .chart-box { padding: 16px 18px; }
html[data-surface="bento"] .chart-box h3 { font-family: var(--font-display, var(--font)); font-size: 1rem; }
html[data-surface="bento"] .quick-btn { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
html[data-surface="bento"] .quick-btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

/* بطاقات الأرقام: أيقونة في دائرة، رقم كبير، اتجاه في كبسولة، وسهم ↗ للقابلة للفتح */
html[data-surface="bento"] .stat { position: relative; overflow: hidden; padding: 15px 17px 14px; gap: 6px; }
html[data-surface="bento"] .stat-label { color: var(--ink-2); font-weight: 600; }
html[data-surface="bento"] .stat-ic {
  width: 28px; height: 28px; border-radius: 50%; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
}
html[data-surface="bento"] .stat-value { font-size: 1.85rem; letter-spacing: -.02em; line-height: 1.15; }
html[data-surface="bento"] .stat-sub { gap: 7px; flex-wrap: wrap; }
html[data-surface="bento"] .stat-sub .delta-up, html[data-surface="bento"] .stat-sub .delta-down {
  padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.6;
}
html[data-surface="bento"] .stat-sub .delta-up { background: var(--ok-soft); color: var(--ok); }
html[data-surface="bento"] .stat-sub .delta-down { background: var(--danger-soft); color: var(--danger); }
html[data-surface="bento"] .stat.clickable::after {
  content: ""; position: absolute; top: 15px; inset-inline-end: 15px; width: 16px; height: 16px;
  background: currentColor; color: var(--muted); opacity: .8; transition: transform .3s var(--nav-ease), opacity .2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[dir="rtl"][data-surface="bento"] .stat.clickable::after { transform: scaleX(-1); }
html[data-surface="bento"] .stat.clickable:hover { border-color: var(--line-2); transform: translateY(-2px); }
html[data-surface="bento"] .stat.clickable:hover::after { opacity: 1; transform: translate(2px, -2px); }
html[dir="rtl"][data-surface="bento"] .stat.clickable:hover::after { transform: scaleX(-1) translate(2px, -2px); }
html[data-surface="bento"] .stat { transition: transform .3s var(--nav-ease), box-shadow .3s ease, border-color .2s ease; }

/* بطاقة الإبراز: تدرّج لون الهوية وتوهّج حوله */
html[data-surface="bento"] .stat-brand {
  background-color: var(--brand); background-image: var(--brand-grad); border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 18px 36px -20px var(--brand-glow);
}
html[data-surface="bento"] .stat-brand .stat-value { color: var(--brand-ink); }
html[data-surface="bento"] .stat-brand .stat-label, html[data-surface="bento"] .stat-brand .stat-sub { color: inherit; opacity: .78; }
html[data-surface="bento"] .stat-brand .stat-ic { background: var(--brand-ink); color: var(--brand); border-color: transparent; }
html[data-surface="bento"] .stat-brand .stat-sub .delta-up, html[data-surface="bento"] .stat-brand .stat-sub .delta-down { background: rgba(255, 255, 255, .5); color: var(--brand-ink); }
html[data-surface="bento"] .stat-brand.clickable::after { color: var(--brand-ink); }
html[data-surface="bento"] .stat-brand.clickable:hover { border-color: transparent; }
html[data-surface="bento"] .stat-brand .chart-stroke { stroke: var(--brand-ink); }
html[data-surface="bento"] .stat-brand .chart-area { fill: var(--brand-ink); opacity: .08; }
html[data-surface="bento"] .stat-brand .chart-dot { fill: var(--brand-ink); stroke: var(--brand); }

/* بطاقة «مباشر» الداكنة وإجمالي الكاشير: ليل فاحم بتوهّج من لون الهوية */
html[data-surface="bento"] .chart-spot, html[data-surface="bento"] .grand-row {
  background-color: var(--spot-solid);
  background-image: radial-gradient(90% 70% at 85% -10%, var(--brand-glow) 0%, transparent 60%), var(--spot-img);
  color: var(--spot-ink); border-color: transparent;
}
html[dir="rtl"][data-surface="bento"] .chart-spot { background-image: radial-gradient(90% 70% at 15% -10%, var(--brand-glow) 0%, transparent 60%), var(--spot-img); }
html[data-surface="bento"] .chart-spot {
  box-shadow: 0 24px 48px -26px rgba(0, 0, 0, .7);
  --chart-surface: var(--spot-solid); --chart-grid: rgba(255, 255, 255, .07); --chart-axis: rgba(255, 255, 255, .14);
  --chart-ink: var(--spot-ink); --chart-ink-2: rgba(255, 255, 255, .75); --chart-muted: rgba(255, 255, 255, .5);
  --chart-dim: rgba(255, 255, 255, .16); --series-1: var(--spot-accent);
}
html[data-surface="bento"] .chart-spot h3 { color: var(--spot-ink); }
html[data-surface="bento"][data-mode="dark"] .chart-spot { border: 1px solid rgba(255, 255, 255, .07); }
html[data-surface="bento"] .chart-spot .sub, html[data-surface="bento"] .chart-spot .spot-big span { color: var(--spot-ink); opacity: .6; }
html[data-surface="bento"] .chart-spot .spot-big b { font-size: 3.1rem; letter-spacing: -.03em; color: var(--spot-ink); }
html[data-surface="bento"] .chart-spot .spot-go { color: var(--spot-ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; }
html[data-surface="bento"] .chart-spot .spot-go:hover { background: rgba(255, 255, 255, .16); }
html[data-surface="bento"] .chart-spot .chart-head-tx { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
html[data-surface="bento"] .live-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px;
  background: var(--spot-accent); color: var(--spot-solid); font-size: .74rem; font-weight: 800;
}
.live-chip i, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
html[data-surface="bento"] .live-chip i { animation: mxPulse 1.6s ease-in-out infinite; }
html[data-surface="bento"] .grand-row .v { color: var(--spot-accent); }
@keyframes mxPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* — رأس اللوحة: سطر حيّ، تحيّة باسم الموظف بخطّ نسخيّ مميَّز تحته ضوء الهوية — */
html[data-surface="bento"] .dash-head { align-items: flex-end; margin-bottom: 16px; gap: 14px; }
html[data-surface="bento"] .dash-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .78rem; font-weight: 600; color: var(--muted); }
html[data-surface="bento"] .dash-eyebrow .sep { opacity: .5; }
html[data-surface="bento"] .dash-eyebrow .live-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: mxPulse 2s ease-in-out infinite; }
html[data-surface="bento"] .dash-plain { display: none; }
html[data-surface="bento"] .dash-hi { display: inline; }
html[data-surface="bento"] .dash-head h2 {
  font-family: var(--font-display, var(--font)); font-size: clamp(1.55rem, 1rem + 1.9vw, 2.55rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -.01em;
}
html[data-surface="bento"] .dash-name {
  font-family: "Amiri", var(--font-display, var(--font)); font-style: normal; font-weight: 700; padding-inline: 3px;
  background-image: linear-gradient(transparent 60%, var(--brand-glow) 60%, var(--brand-glow) 88%, transparent 88%);
}
html[data-surface="bento"] .dash-lead { display: block; margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
html[data-surface="bento"] .page-head h2 { font-family: var(--font-display, var(--font)); font-size: 1.45rem; letter-spacing: -.01em; }

/* — الأزرار والحقول والتبويبات — */
html[data-surface="bento"] .btn-primary {
  background-color: var(--brand); background-image: var(--brand-grad); border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 10px 24px -12px var(--brand-glow);
}
html[data-surface="bento"] .btn-primary:hover:not(:disabled) {
  background-color: var(--brand); background-image: var(--brand-grad); border-color: transparent; filter: brightness(1.04) saturate(1.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 14px 30px -12px var(--brand-glow);
}
html[data-surface="bento"] .btn:not(.btn-primary):not(.btn-ghost):not(.btn-danger):not(.btn-ok) { border-color: var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
html[data-surface="bento"] .inp:focus, html[data-surface="bento"] .scan-input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-glow-soft); }
html[data-surface="bento"] .tabs {
  display: flex; width: max-content; max-width: 100%; gap: 2px; padding: 4px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface-2);
}
html[data-surface="bento"] .tab { min-height: 34px; padding: 6px 14px; border: 0; margin: 0; border-radius: 999px; transition: background-color .25s ease, color .25s ease; }
html[data-surface="bento"] .tab:hover { background: var(--surface); }
html[data-surface="bento"] .tab.on { background: var(--pill-on); color: var(--pill-on-ink); }
html[data-surface="bento"] .login-tabs .btn.on, html[data-surface="bento"] .quick-cats .chip.on {
  background: var(--pill-on); background-image: none; border-color: var(--pill-on); color: var(--pill-on-ink);
}
html[data-surface="bento"] .seg-btn.on { background: var(--pill-on); color: var(--pill-on-ink); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }
html[data-surface="bento"] .big-money b { font-size: 2.6rem; letter-spacing: -.03em; }
html[data-surface="bento"] .big-money small { font-size: 1.15rem; }

/* — الرسوم: خطّ منحنٍ بلون التصميم فوق تدرّج يذوب للأسفل — */
html[data-surface="bento"] .chart-line.single .chart-stroke, html[data-surface="bento"] .chart-spark .chart-stroke { stroke: var(--chart-stroke); stroke-width: 2.4; }
html[data-surface="bento"] .chart-line.single .chart-area, html[data-surface="bento"] .chart-spark .chart-area { fill: url(#mx-area); opacity: 1; }
html[data-surface="bento"] .chart-line.single .chart-dot { fill: var(--chart-stroke); }
html[data-surface="bento"] .stat .chart-spark { height: 34px; }

/* رسم متحرّك عند فتح الشاشة (يُضاف chart-draw من motion.drawing فقط) */
html[data-surface="bento"] .chart-draw .chart-stroke { stroke-dasharray: 1; animation: mxDraw 1.5s cubic-bezier(.65, 0, .35, 1) .2s both; }
html[data-surface="bento"] .chart-draw .chart-area { transform-box: fill-box; transform-origin: 50% 100%; animation: mxRise 1.1s cubic-bezier(.16, 1, .3, 1) .55s both; }
html[data-surface="bento"] .chart-draw .chart-dot { animation: mxFade .4s ease 1.45s both; }
html[data-surface="bento"] .chart-draw .bar-mark { transform-box: fill-box; transform-origin: 50% 100%; animation: mxGrow .85s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 32ms + 220ms); }
html[data-surface="bento"] .chart-draw .donut-slice { transform-box: view-box; transform-origin: 50% 50%; animation: mxSlice 1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 200ms); }
@keyframes mxDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mxRise { from { opacity: 0; transform: scaleY(.4); } to { opacity: 1; transform: none; } }
@keyframes mxGrow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes mxSlice { from { opacity: 0; transform: rotate(-24deg) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes mxFade { from { opacity: 0; } to { opacity: 1; } }

/* — زجاجية («مدار»): البطاقات شفّافة فوق التوهّج — */
html[data-bento="glass"] .panel, html[data-bento="glass"] .card, html[data-bento="glass"] .stat:not(.stat-brand),
html[data-bento="glass"] .table-wrap, html[data-bento="glass"] .chart-box:not(.chart-spot), html[data-bento="glass"] .login-card,
html[data-bento="glass"] .pos-right, html[data-bento="glass"] .scan-bar {
  background-color: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border-color: rgba(255, 255, 255, .55);
}
html[data-bento="glass"][data-mode="dark"] .panel, html[data-bento="glass"][data-mode="dark"] .card,
html[data-bento="glass"][data-mode="dark"] .stat:not(.stat-brand), html[data-bento="glass"][data-mode="dark"] .table-wrap,
html[data-bento="glass"][data-mode="dark"] .chart-box:not(.chart-spot), html[data-bento="glass"][data-mode="dark"] .topbar,
html[data-bento="glass"][data-mode="dark"] .pos-right, html[data-bento="glass"][data-mode="dark"] .scan-bar { border-color: rgba(255, 255, 255, .08); }
html[data-bento="glass"] .panel-title, html[data-bento="glass"] .table thead th, html[data-bento="glass"] .cart-head, html[data-bento="glass"] .cart-foot { background-color: var(--glass-bg-2); }
html[data-bento="glass"] .chart-spot { border: 1px solid rgba(255, 255, 255, .1); }

/* — خطوط شعرية («مخطّط هندسي»): بلا ظلال، حدود أوضح وعلامات قياس في الزاويتين السفليّتين — */
html[data-bento="line"] .panel, html[data-bento="line"] .card, html[data-bento="line"] .stat,
html[data-bento="line"] .table-wrap, html[data-bento="line"] .chart-box, html[data-bento="line"] .quick-btn { box-shadow: none; border-color: var(--line-2); }
html[data-bento="line"] .topbar { box-shadow: none; border-color: var(--line-2); }
html[data-bento="line"] .stat, html[data-bento="line"] .chart-box { position: relative; }
html[data-bento="line"] .stat::before, html[data-bento="line"] .chart-box::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none; opacity: .9;
  background:
    linear-gradient(var(--brand), var(--brand)) 0 100% / 10px 1.5px no-repeat,
    linear-gradient(var(--brand), var(--brand)) 0 100% / 1.5px 10px no-repeat,
    linear-gradient(var(--brand), var(--brand)) 100% 100% / 10px 1.5px no-repeat,
    linear-gradient(var(--brand), var(--brand)) 100% 100% / 1.5px 10px no-repeat;
}
html[data-bento="line"] .stat-brand::before, html[data-bento="line"] .chart-spot::before {
  background:
    linear-gradient(var(--spot-ink), var(--spot-ink)) 0 100% / 10px 1.5px no-repeat,
    linear-gradient(var(--spot-ink), var(--spot-ink)) 0 100% / 1.5px 10px no-repeat,
    linear-gradient(var(--spot-ink), var(--spot-ink)) 100% 100% / 10px 1.5px no-repeat,
    linear-gradient(var(--spot-ink), var(--spot-ink)) 100% 100% / 1.5px 10px no-repeat;
  opacity: .5;
}
html[data-bento="line"] .stat-brand, html[data-bento="line"] .btn-primary { box-shadow: none; }
html[data-bento="line"] .stat-value, html[data-bento="line"] .big-money b, html[data-bento="line"] .spot-big b { font-variant-numeric: tabular-nums; letter-spacing: 0; }
html[data-bento="line"] .chart-spot { box-shadow: none; }

/* — الجوّال — */
@media (max-width: 560px) {
  html[data-surface="bento"] .topbar { margin: 8px 8px 0; height: 54px; border-radius: 16px; padding: 0 6px 0 8px; }
  html[data-surface="bento"] .content:not(.flush) { padding: 12px 10px 14px; }
  html[data-surface="bento"] .stat-value { font-size: 1.5rem; }
  html[data-surface="bento"] .big-money b { font-size: 2rem; }
  html[data-surface="bento"] .chart-spot .spot-big b { font-size: 2.4rem; }
  html[data-surface="bento"] .dash-head { align-items: flex-start; }
  html[data-surface="bento"] .content.flush { padding-top: 8px; }
}

/* — بلا حركة: لا رسم متحرّك ولا نبض — */
html[data-motion="off"] .live-chip i, html[data-motion="off"] .live-dot { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .chart-draw .chart-stroke, .chart-draw .chart-area, .chart-draw .chart-dot, .chart-draw .bar-mark, .chart-draw .donut-slice { animation: none !important; }
  .chart-draw .chart-stroke { stroke-dasharray: none !important; }
  .live-chip i, .live-dot { animation: none !important; }
}

/* — الزوايا — */
html[data-radius="pill"] .inp:not(textarea), html[data-radius="pill"] .scan-input { border-radius: 999px; padding-inline: 18px; }
html[data-radius="pill"] .pos-actions .btn, html[data-radius="pill"] .numpad-key, html[data-radius="pill"] .pay-method,
html[data-radius="pill"] .quick-btn, html[data-radius="pill"] .pay-btn, html[data-radius="pill"] .btn-lg { border-radius: var(--radius-lg); }
html[data-radius="sharp"] .chip, html[data-radius="sharp"] .badge { border-radius: 4px; }
html[data-radius="sharp"] .cart-line .qbtn { border-radius: 3px; }

/* — الكثافة المضغوطة: صفوف أكثر في الشاشة نفسها — */
html[data-density="compact"] { --tap: 38px; --fs: 14px; }
html[data-density="compact"] .btn { padding: 6px 12px; }
html[data-density="compact"] .btn-lg { min-height: 48px; padding: 9px 16px; }
html[data-density="compact"] .table th, html[data-density="compact"] .table td { padding: 7px 10px; }
html[data-density="compact"] .nav-item { padding: 6px 14px; min-height: 36px; }
html[data-density="compact"] .cart-line { padding: 6px 12px; }
html[data-density="compact"] .content { padding: 10px; }
html[data-density="compact"] .panel-body { padding: 10px 13px; }
html[data-density="compact"] .quick-btn { min-height: 66px; padding: 6px; }
html[data-density="compact"] .quick-grid { gap: 6px; padding: 8px; }

/* ==========================================================================
   شاشة «التصاميم والألوان»
   كل بطاقة تحمل متغيّرات تصميمها في style فتُرسم معاينتها بألوانه وخطّه هو،
   بينما الإطار حولها (التحديد، الشارات) يبقى بألوان التصميم الحالي.
   ========================================================================== */
.th-page { max-width: 1480px; margin: 0 auto; }
.th-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 22px 24px;
  background: var(--brand-grad); color: var(--brand-ink); margin-bottom: 16px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.th-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: radial-gradient(40% 90% at 90% 0%, #fff 0%, transparent 60%), radial-gradient(35% 80% at 0% 100%, #fff 0%, transparent 60%);
}
.th-hero .grow { flex: 1 1 280px; min-width: 0; position: relative; z-index: 1; }
.th-hero h2 { margin: 0 0 4px; font-size: 1.55rem; color: inherit; }
.th-hero p { margin: 0; opacity: .92; font-size: .95rem; }
.th-hero .th-now { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28); padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.th-modes { position: relative; z-index: 1; display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.th-modes button { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.th-modes button.on { background: #fff; color: #1b1433; box-shadow: 0 4px 14px rgba(0,0,0,.18); }

.th-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.th-filters .chip { cursor: pointer; }
.th-filters .chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.th-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 18px; margin-bottom: 22px; }
.th-item { position: relative; border-radius: 20px; padding: 0; border: 0; background: none; cursor: pointer; text-align: start;
  font: inherit; color: inherit; outline-offset: 3px; transition: transform .2s ease; }
.th-item:hover { transform: translateY(-4px); }
.th-item:focus-visible { outline: 3px solid var(--brand); border-radius: 20px; }
.th-item.on::before, .th-item.previewing::before {
  content: ""; position: absolute; inset: -4px; border-radius: 23px; pointer-events: none;
  border: 3px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.th-item.previewing::before { border-style: dashed; }
.th-flag { margin-inline-start: auto; align-self: center; display: inline-flex; align-items: center; gap: 4px; flex: none;
  background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }

/* البطاقة نفسها — بألوان تصميمها */
.th-card { display: flex; flex-direction: column; height: 100%; border-radius: 20px; overflow: hidden;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-family: var(--font);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px -18px rgba(0,0,0,.35); transition: box-shadow .2s ease; }
.th-item:hover .th-card { box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 22px 44px -18px rgba(0,0,0,.45); }

.th-mock { position: relative; height: 176px; background-color: var(--bg); background-image: var(--bg-image, none); background-size: var(--bg-size, auto);
  display: flex; flex-direction: column; overflow: hidden; direction: rtl; }
.m-top { height: 26px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.m-logo { width: 12px; height: 12px; border-radius: 4px; background: var(--brand-grad); flex: none; }
.m-pill { height: 7px; width: 34px; border-radius: 99px; background: var(--surface-3); }
.m-pill.w2 { width: 22px; background: var(--brand-soft); }
.m-top .sp { flex: 1; }
.m-avatar { width: 14px; height: 14px; border-radius: 50%; background: var(--brand-soft); border: 1.5px solid var(--brand); }
.m-body { flex: 1; display: flex; min-height: 0; }
.m-side { width: 58px; flex: none; background: var(--surface); border-inline-start: 1px solid var(--line); padding: 8px 6px; display: flex; flex-direction: column; gap: 6px; }
.m-side b { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); }
.m-side b.on { background: var(--brand-soft); box-shadow: inset -3px 0 0 var(--brand); }
.m-main { flex: 1; min-width: 0; padding: 9px; display: flex; flex-direction: column; gap: 7px; }
.m-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 7px 9px; box-shadow: var(--shadow); }
.m-label { font-size: 9.5px; color: var(--muted); font-weight: 600; line-height: 1.2; }
.m-total { font-family: var(--font-display, var(--font)); font-size: 19px; font-weight: 700; color: var(--brand-2); line-height: 1.3; font-variant-numeric: tabular-nums; }
.m-chips { display: flex; gap: 4px; margin-top: 3px; }
.m-chips span { height: 11px; padding: 0 7px; border-radius: 99px; font-size: 7.5px; line-height: 11px; font-weight: 700; }
.m-chips .ok { background: var(--ok-soft); color: var(--ok); }
.m-chips .wr { background: var(--warn-soft); color: var(--warn); }
.m-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.m-tile { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); padding: 4px 5px; min-width: 0; }
.m-tile span { display: block; font-size: 8.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-tile b { display: block; font-size: 8.5px; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.m-pay { margin-top: auto; height: 22px; border-radius: var(--btn-radius, var(--radius)); background: var(--brand); color: var(--brand-ink);
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; }
.th-card[data-grad="1"] .m-pay, .th-card[data-grad="1"] .m-logo { background: var(--brand-grad); }
/* المعاينة المصغّرة تحاكي طبيعة أسطح التصميم */
.th-card[data-surface="glass"] .m-card, .th-card[data-surface="glass"] .m-tile, .th-card[data-surface="glass"] .m-top, .th-card[data-surface="glass"] .m-side {
  background: var(--glass-bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: rgba(255,255,255,.25); }
.th-card[data-surface="neu"] .m-card, .th-card[data-surface="neu"] .m-tile { border-color: transparent; box-shadow: var(--neu-out-sm); }
.th-card[data-surface="soft"] .m-card, .th-card[data-surface="soft"] .m-tile { border-color: transparent; box-shadow: var(--shadow); }
.th-card[data-surface="glow"] .m-card, .th-card[data-surface="glow"] .m-tile { border-color: transparent; box-shadow: var(--shadow); }
.th-card[data-surface="outline"] .m-card, .th-card[data-surface="outline"] .m-tile { border-color: var(--line-2); box-shadow: none; }
.th-card[data-surface="pop"] .m-card, .th-card[data-surface="pop"] .m-tile { box-shadow: var(--shadow); }
.th-card[data-surface="pop"] .m-pay { background: var(--pop-btn); color: var(--pop-btn-ink); box-shadow: -2px 3px 0 var(--pop-sh); margin-inline-end: 3px; }

.th-meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; border-top: 1px solid var(--line); }
.th-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.th-name b { font-family: var(--font-display, var(--font)); font-size: 1.12rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.th-name small { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); direction: ltr; font-weight: 600;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-tag { font-size: .84rem; color: var(--ink-2); line-height: 1.55; min-height: 2.6em; }
.th-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.th-dots { display: flex; }
.th-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); margin-inline-start: -6px; box-shadow: 0 0 0 1px var(--line); }
.th-dots i:first-child { margin-inline-start: 0; }
.th-font { margin-inline-start: auto; font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.th-font b { font-size: 1rem; color: var(--ink); font-weight: 700; }
.th-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.th-tags span { font-size: .7rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-2); }

/* لمساتك الخاصة */
.th-tune { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.th-tune .panel { margin: 0; }
.th-sub { font-size: .82rem; color: var(--muted); margin: -2px 0 10px; }
.th-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.th-sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; transition: transform .12s; }
.th-sw:hover { transform: scale(1.1); }
.th-sw.on { box-shadow: 0 0 0 2px var(--ink); }
.th-sw.auto { background: conic-gradient(from 0deg, #f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); }
.th-color { width: 44px; height: 34px; border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; background: var(--surface); cursor: pointer; }
.th-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.th-opt { position: relative; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  padding: 10px; cursor: pointer; font: inherit; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 74px; justify-content: center; transition: border-color .12s, background .12s, transform .12s; }
.th-opt:hover { border-color: var(--brand); transform: translateY(-1px); }
.th-opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); }
.th-opt.on::after { content: "✓"; position: absolute; top: 5px; inset-inline-end: 8px; font-size: .8rem; font-weight: 700; color: var(--brand); }
.th-opt small { font-size: .74rem; color: var(--muted); font-weight: 500; line-height: 1.35; }
.th-opt.on small { color: var(--brand-2); }
.th-fontopt { align-items: flex-start; text-align: start; }
.th-fontopt .sample { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.th-fontopt .nm { font-size: .78rem; font-weight: 600; }
.th-shape { width: 44px; height: 28px; border: 2px solid currentColor; opacity: .75; }
.th-swatch-pattern { width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--line); background-color: var(--bg); }
.th-range { display: flex; align-items: center; gap: 12px; }
.th-range input { flex: 1; accent-color: var(--brand); }
.th-range b { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }

.th-bar { position: sticky; bottom: 10px; z-index: 50; margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 18px 48px -12px rgba(0,0,0,.35); animation: thUp .22s ease; }
.th-bar .grow { flex: 1 1 200px; min-width: 0; font-weight: 600; }
.th-bar .grow small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
@keyframes thUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .th-hero { padding: 18px; }
  .th-hero h2 { font-size: 1.3rem; }
  .th-gallery { grid-template-columns: 1fr; }
  .th-tune { grid-template-columns: 1fr; }
}

/* ————————————————— الطباعة ————————————————— */
@media print {
  .topbar, .sidebar, .toolbar, .pos-actions, .toasts, .no-print, .fx-foot, .nav-scrim, .fx-about-back { display: none !important; }
  body { overflow: visible; background: #fff; }
  .content { overflow: visible; padding: 0; }
  .panel, .card, .table-wrap { box-shadow: none; border-color: #999; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* حقول الهاتف: «0599 123 456» كان يظهر «456 123 0599» داخل الحقل في
   الواجهة العربية. الرقم يُكتب يسار→يمين ويبقى محاذيًا لبقية النموذج. */
input[inputmode="tel"], input[type="tel"] { direction: ltr; text-align: right; }

/* زرّ شاشة الزبون في رأس الفاتورة: مضيء حين تكون الشاشة مفتوحة */
.cd-toggle.on { background: var(--brand-soft); color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--brand); }
.cd-master { padding: 12px 14px; border-radius: var(--radius); background: var(--brand-soft); margin-bottom: 12px; }
.cd-master .chk { font-weight: 700; font-size: 1.05rem; }
.cd-opts { transition: opacity .25s; }
.cd-opts.off { opacity: .5; }

/* المحافظ: اختيار المحفظة بشعارها تحت «طريقة الدفع» — بطاقة لكل محفظة، الشعار فوق والاسم تحته */
.wallet-box { margin-top: 12px; }
.wallet-box[hidden] { display: none; }
.wallet-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.wallet-chip { position: relative; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px 6px 8px; border: 2px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: .86rem; cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s, transform .1s; }
.wallet-chip img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .16); }
.wallet-chip span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.wallet-chip:hover { border-color: var(--brand); }
.wallet-chip:active { transform: scale(.97); }
.wallet-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.wallet-chip.on::after { content: '✓'; position: absolute; top: 6px; inset-inline-start: 6px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
/* في الإعدادات: البطاقة نفسها هي مربّع الاختيار */
.wallet-chip input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wallet-chip:focus-visible, .wallet-chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.wallet-set { max-width: 560px; }
/* محافظ المحل في الإعدادات: تعديل وحذف في زاوية البطاقة، وإضافة واقتراحات الدولة بجانبها */
.wallet-set .wallet-chip { padding-top: 24px; }
.wallet-set .wallet-chip .icon-btn { position: absolute; top: 3px; width: 26px; height: 26px; min-height: 0; padding: 0; }
.wallet-set .wallet-chip .icon-btn:nth-of-type(1) { inset-inline-end: 30px; }
.wallet-set .wallet-chip .icon-btn:nth-of-type(2) { inset-inline-end: 3px; }
.wallet-set > .btn { min-height: 84px; flex-direction: column; justify-content: center; gap: 6px; }
.wallet-set > .wallet-suggest img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; background: #fff; }
.logo-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wallet-pic { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--muted); overflow: hidden; flex: 0 0 auto; }
.wallet-pic img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
html[data-surface="neu"] .wallet-chip { border-color: transparent; box-shadow: var(--neu-out-sm); }
html[data-surface="neu"] .wallet-chip.on { box-shadow: var(--neu-in); }
html[data-radius="pill"] .wallet-chip { border-radius: 22px; }
img.wl { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; vertical-align: -5px; margin-inline-end: 6px; }
.pay-line .m { display: inline-flex; align-items: center; }
.tot-row.sub { padding-inline-start: 16px; font-size: .92em; color: var(--ink-2); }

/* ————————————————— الترخيص وربط الأجهزة ————————————————— */
.fx-foot { gap: 10px; flex-wrap: wrap; }
.fx-foot-lic { font-size: .78rem; color: var(--muted); }
.fx-foot-lic b { color: var(--ink-2); font-weight: 700; }
.fx-foot-lic { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
@media (max-width: 560px) { .fx-foot-lic { display: none; } }

/* نافذة «تأمين حسابك»: ما بقي على الإعداد الافتراضي */
/* ± الإجمالي: زيادة الفاتورة وإنقاصها */
.tot-row.plus b, .tot-row.plus span { color: var(--info, var(--brand)); }
.grand-row .adj-mark { font-size: .7em; opacity: .85; font-weight: 600; }
.adj-sum { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 6px; }
.adj-sum > div:not(.adj-arrow) { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.adj-sum small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 2px; }
.adj-sum b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.adj-sum .adj-new { color: var(--brand); font-size: 1.35rem; }
.adj-arrow { color: var(--muted); font-size: 1.3rem; }
.adj-delta-row { text-align: center; margin: 2px 0 10px; }
.adj-delta { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .84rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.adj-delta.up { background: var(--ok-soft, rgba(16, 185, 129, .14)); color: var(--ok, #047857); }
.adj-delta.down { background: var(--warn-soft); color: var(--warn); }
.adj-modes .btn { flex: 1; font-weight: 700; }
.adj-type { margin-top: 8px; }
.adj-modal .inp.num { margin-top: 8px; font-size: 1.25rem; text-align: center; }
.adj-modal .field { margin-top: 8px; }
.adj-pad { margin-top: 8px; gap: 6px; }
.adj-pad .numpad-key { min-height: 42px; padding: 6px; font-size: 1.05rem; }

.cred-list { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 8px; }
.cred-list li {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px;
  background: var(--warn-soft); color: var(--ink); font-size: .92rem;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.cred-list li svg { color: var(--warn); flex: none; }
.cred-list li b { direction: ltr; unicode-bidi: isolate; }

/* علامة التوثيق الزرقاء بجانب اسم المحل المرخّص (على طريقة إنستغرام) */
.fx-verified {
  flex: none; display: inline-block; vertical-align: -3px; margin-inline-start: 2px;
  filter: drop-shadow(0 1px 1.5px rgba(0, 110, 200, .35));
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.fx-verified-bg { fill: #0095f6; }
.fx-verified-tick { fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.fx-foot-lic:hover .fx-verified { transform: scale(1.18) rotate(-8deg); }
@media (prefers-reduced-motion: reduce) { .fx-verified { transition: none; } }

.pair-card { max-width: 480px; }
.pair-found { display: grid; gap: 8px; margin: 6px 0 12px; }
.pair-found:empty { display: none; }
.pair-main {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-align: start; cursor: pointer;
  border: 2px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit;
}
.pair-main span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pair-main small { color: var(--muted); direction: ltr; text-align: right; }
.pair-main:hover, .pair-main.on { border-color: var(--brand); background: var(--brand-soft); }
.inp.pair-code { font-size: 1.6rem; letter-spacing: .45em; text-align: center; font-weight: 700; }

.lan-code {
  text-align: center; padding: 18px 12px; border-radius: var(--radius-lg); background: var(--brand-soft);
  border: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent);
}
.lan-code .digits { direction: ltr; font-size: clamp(2.2rem, 7vw, 3.1rem); font-weight: 800; letter-spacing: .28em; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.lan-code .left { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.lan-addr { direction: ltr; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.lan-dev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lan-dev + .lan-dev { margin-top: 8px; }
.lan-dev .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.lan-dev .dot.on { background: var(--ok, #10a36b); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok, #10a36b) 22%, transparent); }
.lan-dev .grow { min-width: 0; }
.lan-dev small { display: block; color: var(--muted); }
.lan-dev.revoked { opacity: .55; }
.lic-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.lic-box > div { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.lic-box small { display: block; color: var(--muted); margin-bottom: 3px; }
.lic-box b { font-size: 1.02rem; }
.lic-dev { direction: ltr; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
/* بطاقة أطول من الشاشة (شاشة الربط على 768px): تُمرَّر ولا يُقصّ رأسها */
.login-wrap { align-items: safe center; }

/* ==========================================================================
   لمسات ناعمة — انتقالات قصيرة تُشعر بالرقّة دون أن تبطئ العمل.
   كل ما هنا مظهر فقط: الزرّ يعمل من أوّل نقرة والحركة ما زالت جارية.
   «بلا حركة» في «التصاميم والألوان» (data-motion=off) يوقفها كلّها.
   ========================================================================== */

/* لحظة رسم الشاشة الجديدة: تُخفى ثم تنزل عناصرها تباعًا (js/core/motion.js) */
.content.fx-enter { opacity: 0; }
/* النمط الضبابي: بطاقة تحت حافّة الشاشة تنتظر التمرير إليها (motion.js) */
html[data-motion-style="blur"] .fx-wait { opacity: 0; }
@media print { .fx-wait { opacity: 1 !important; } }

/* عنوان كل صفحة: شريط صغير بلون الهوية */
.page-head > h2 { display: inline-flex; align-items: center; gap: 10px; }
.page-head > h2::before {
  content: ""; flex: none; width: 5px; height: 1.05em; border-radius: 99px; background: var(--brand-grad);
}

.topbar { box-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 10px 24px -22px rgba(8, 10, 30, .55); position: relative; z-index: 2; }

.btn {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .24s ease,
    transform .2s var(--nav-ease), filter .18s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 22px -12px var(--brand); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(.985); box-shadow: none; }

.icon-btn { transition: background-color .18s ease, color .18s ease, transform .2s var(--nav-ease); }
.icon-btn:active { transform: scale(.92); }

.chip { transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .2s ease; }

.inp, .scan-input { transition: border-color .18s ease, box-shadow .22s ease, background-color .18s ease; }

.stat { transition: transform .25s var(--nav-ease), box-shadow .25s ease, border-color .2s ease; }
.stat.clickable:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(8, 10, 30, .45); }

.quick-btn { transition: transform .18s var(--nav-ease), box-shadow .22s ease, border-color .18s ease, background-color .18s ease; }
.quick-btn:active { transform: scale(.97); }

.table tbody tr { transition: background-color .16s ease; }
.list-item { transition: background-color .16s ease, border-color .16s ease; }

/* النوافذ: تعتيم أنعم ونافذة تستقرّ بانسياب */
.modal-back { transition: opacity .22s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal { transform: translateY(14px) scale(.975); transition: transform .3s var(--nav-ease); }

/* الرسائل العائمة تنساب من الأسفل */
.toast { transform: translateY(14px) scale(.98); transition: transform .32s var(--nav-ease), opacity .22s ease; }
/* الشاشات الضيّقة: زرّ «الدفع» في الأسفل — كانت الرسالة تغطّيه فتضيع لمسة الكاشير
   عليها (تُغلق الرسالة بدل الدفع). الرسائل هنا تنزل من الأعلى تحت الشريط العلوي. */
@media (max-width: 700px) {
  .toasts { top: calc(62px + env(safe-area-inset-top, 0px)); bottom: auto; inset-inline: 10px; }
  .toast { max-width: none; transform: translateY(-14px) scale(.98); }
  /* في كاشير الجوّال تنزل تحت خانة الباركود (فوق الأصناف) فلا تغطّي ما يُكتب؛ ويندوز كما كان */
  html:not(.desktop-shell) body[data-route="pos"] .toasts { top: calc(124px + env(safe-area-inset-top, 0px)); }
}

/* شاشة فتح الصفحة (js/core/loader.js) — مثل شاشة بداية الموقع: الشعار يتنفّس
   وحوله قوس دوّار بلوني الهوية، وتحته MADIX واسم الشاشة. تغطّي منطقة المحتوى
   وحدها؛ الشريط العلوي والتذييل ظاهران، والقائمة والنوافذ فوقها. */
.page-loader {
  position: absolute; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 16px;
  background: var(--bg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .32s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .32s;
}
.page-loader.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .14s ease, visibility 0s; }
.page-loader-box { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: -4vh; }
.page-loader-ring { position: relative; width: 110px; height: 110px; display: grid; place-items: center; }
.page-loader-ring img { width: 62px; height: 62px; object-fit: contain; }
.page-loader-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px;
  background: conic-gradient(transparent 0 55%, #7B2FF7, #F312B0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.page-loader-name {
  font: 800 1.35rem/1 var(--font-display, var(--font));
  letter-spacing: .34em; text-indent: .34em; direction: ltr;
  background: linear-gradient(120deg, #7B2FF7, #F312B0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-loader-title { min-height: 1.3em; color: var(--muted); font-size: .9rem; font-weight: 500; text-align: center; }
.page-loader-title:empty { display: none; }
.page-loader.on .page-loader-ring img { animation: fx-breathe 1.4s ease-in-out infinite; }
.page-loader.on .page-loader-ring::before { animation: spin 1.1s linear infinite; }
.page-loader.on .page-loader-name { animation: fx-rise .45s cubic-bezier(.22, 1, .36, 1) both; }
.page-loader.on .page-loader-title { animation: fx-rise .45s cubic-bezier(.22, 1, .36, 1) .07s both; }
@keyframes fx-breathe { 50% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(243, 18, 176, .35)); } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(6px); } }
@media print { .page-loader { display: none !important; } }

/* بلا حركة */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation-duration: .01ms !important; animation-delay: 0s !important;
  transition-duration: .01ms !important; transition-delay: 0s !important;
}

/* ————————————————— بوت التلجرام ————————————————— */
.tg-status { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; }
.tg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.tg-dot.tg-ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: tgPulse 2s ease-in-out infinite; }
.tg-dot.tg-warn { background: var(--warn); } .tg-dot.tg-danger { background: var(--danger); } .tg-dot.tg-info { background: var(--info); }
@keyframes tgPulse { 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .tg-dot.tg-ok { animation: none; } }
.tg-bot { direction: ltr; color: var(--muted); }
.tg-hero {
  display: flex; align-items: center; gap: 16px; padding: 18px; margin-bottom: 14px;
  border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(135deg, #229ed9 0%, #2a6fd6 100%);
  box-shadow: 0 16px 34px -18px #1f7fd0;
}
.tg-hero h3 { margin: 0 0 4px; font-size: 1.15rem; color: #fff; }
.tg-hero p { margin: 0; opacity: .95; line-height: 1.7; font-size: .92rem; }
.tg-hero-ic { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); }
.tg-steps { margin: 0 0 12px; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: .92rem; }
.tg-steps code, .tg-cmd code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .86em; }
.tg-token-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tg-token-row .field { flex: 1; min-width: 240px; margin: 0; }
.tg-token-wrap { display: flex; align-items: center; gap: 6px; }
.tg-token-wrap .inp { flex: 1; font-family: var(--mono); letter-spacing: .02em; }
.tg-switch { margin: 12px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.tg-switch small { color: var(--muted); font-weight: 400; }
.tg-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-top: 12px; }
.tg-person { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.tg-person.off { opacity: .65; }
.tg-person .avatar { width: 42px; height: 42px; font-size: 1.1rem; background: linear-gradient(135deg, #229ed9, #2a6fd6); color: #fff; }
.tg-person-tx { flex: 1; min-width: 150px; display: grid; gap: 2px; }
.tg-person-tx small { color: var(--muted); text-align: start; }
.tg-person-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.tg-invite { text-align: center; }
.tg-code { font: 800 2.2rem/1.2 var(--mono); letter-spacing: .3em; direction: ltr; margin: 10px auto; padding: 14px 10px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-2); border: 2px dashed var(--brand); user-select: all; }
.tg-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.tg-perm-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 10px; margin-bottom: 10px; background: var(--surface-2); }
.tg-perm-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tg-perm-head b { flex: 1; }
.tg-perm { display: flex; align-items: center; gap: 8px; padding: 5px 2px; }
.tg-perm span:first-of-type { flex: 1; }
.tg-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 14px; }
.tg-cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.tg-cmd { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: .9rem; }
.tg-cmd code { flex: none; min-width: 104px; text-align: center; }

/* ————————————————— الرسائل القصيرة (SMS) ————————————————— */
.sms-status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-2); }
.sms-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.sms-dot.sms-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.sms-dot.sms-warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.sms-sender { font: 600 .78rem/1 var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.sms-empty .icon { opacity: .5; }

/* المحرّر: المستلمون والرسالة جنبًا إلى جنب، وعمودًا واحدًا على الشاشات الضيّقة */
.sms-compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.sms-compose .panel { margin-bottom: 0; }
.sms-compose .panel-title { display: flex; align-items: center; gap: 6px; }
.sms-modal .sms-compose { gap: 12px; }
@media (max-width: 900px) { .sms-compose { grid-template-columns: minmax(0, 1fr); } }

.sms-pick { margin-bottom: 12px; }
.sms-pick-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.sms-pick-bar .inp { flex: 1; min-width: 160px; }
.sms-filter { display: flex; gap: 6px; }
.sms-filter .chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.sms-all { margin-bottom: 4px; font-size: .88rem; }
.sms-custs { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sms-cust { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sms-cust:last-child { border-bottom: 0; }
.sms-cust:hover { background: var(--surface); }
.sms-cust input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); cursor: pointer; }
.sms-cust.off { cursor: default; opacity: .65; }
.sms-cust-tx { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.sms-cust-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-cust-tx small { color: var(--muted); font-size: .8rem; text-align: start; }
.sms-why { color: var(--warn) !important; }
.sms-cust-bal { flex: none; font-size: .8rem; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.sms-none, .sms-more { padding: 14px 10px; text-align: center; color: var(--muted); font-size: .86rem; }
.sms-more { padding: 8px 10px; border-top: 1px solid var(--line); }

.sms-numbers { font-family: var(--mono); font-size: .9rem; }
.sms-typed { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 10px; }
.sms-bad { font-family: var(--mono); font-size: .8rem; color: var(--danger); overflow-wrap: anywhere; }
.sms-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sms-chips .chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.sms-chips .chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-2); }
.sms-summary span:not(.badge) { color: var(--ink-2); font-size: .86rem; }

.sms-text { font-size: 1rem; line-height: 1.6; }
.sms-ph { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 10px; }
.sms-ph .field-hint { margin: 0; }
.sms-counter { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.sms-counter b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sms-total { color: var(--brand-2); }
.sms-total b { color: var(--brand-2); }
.sms-note { display: grid; gap: 4px; margin: 8px 0; font-size: .84rem; color: var(--ink-2); }
.sms-note:empty { display: none; }
.sms-note span { display: flex; align-items: center; gap: 4px; }
.sms-warn { color: var(--warn); }

/* المعاينة: فقاعة كما تصل على هاتف الزبون */
.sms-preview { margin: 10px 0 12px; padding: 12px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px dashed var(--line-2); }
.sms-preview-head { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.sms-bubble {
  max-width: 100%; padding: 10px 13px; border-radius: 16px; border-start-start-radius: 4px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .06));
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: .94rem; color: var(--ink);
}
.sms-bubble.empty { color: var(--muted); font-style: italic; }
.sms-sched { padding-top: 10px; border-top: 1px solid var(--line); }
.sms-sched .chk { flex-wrap: wrap; }
.sms-sched-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.sms-sched-fields[hidden] { display: none; }
.sms-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.sms-send { min-width: 150px; }

/* التأكيد والنتيجة */
.sms-facts { display: grid; gap: 6px; margin-bottom: 12px; }
.sms-fact { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; }
.sms-fact b { font-variant-numeric: tabular-nums; text-align: end; }
.sms-fact-brand { background: var(--brand-soft); color: var(--brand-2); }
.sms-fact-ok { background: var(--ok-soft); color: var(--ok); }
.sms-fact-warn { background: var(--warn-soft); color: var(--warn); }
.sms-fact-danger { background: var(--danger-soft); color: var(--danger); }
.sms-progress { margin: 10px 0; }
.sms-stopped { margin: 4px 0 12px; }
.sms-res-sec { margin-top: 12px; }
.sms-res-sec h4, .sms-sub { margin: 12px 0 6px; font-size: .9rem; color: var(--ink-2); }
.sms-reason { color: var(--danger); font-size: .82rem; }
td.sms-reason { white-space: normal; }

/* السجلّ */
.sms-snip { max-width: 320px; white-space: normal; color: var(--ink-2); font-size: .88rem; }
.sms-names-snip { color: var(--muted); }
.sms-numlist { font-family: var(--mono); font-size: .84rem; padding: 10px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); max-height: 160px; overflow: auto; overflow-wrap: anywhere; }
.sms-raw { font-family: var(--mono); font-size: .78rem; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; margin: 6px 0 0; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); max-height: 180px; overflow: auto; }

/* القوالب */
.sms-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sms-tpl { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.sms-tpl-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sms-tpl-text { flex: 1; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: .9rem; line-height: 1.6; }
.sms-tpl-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.sms-tpl-foot .field-hint { margin: 0; }

/* الإعدادات */
.sms-steps { margin: 0 0 14px; padding-inline-start: 20px; color: var(--ink-2); font-size: .9rem; line-height: 1.8; }
.sms-keyrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.sms-key-wrap { display: flex; gap: 6px; align-items: center; }
.sms-key-wrap .inp { flex: 1; min-width: 0; font-family: var(--mono); }
.sms-keynow { display: grid; gap: 4px; padding-bottom: 12px; }
.sms-keymask { font: 600 1rem/1.4 var(--mono); letter-spacing: .08em; }
.sms-sender-btns { padding-bottom: 12px; }
.sms-names { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.sms-names:empty { display: none; }
.sms-names .chip { font-family: var(--mono); }
.sms-names .chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.sms-check { margin-top: 12px; }
.sms-check:empty { display: none; }
.sms-switch small { color: var(--muted); font-weight: 400; }
@media (max-width: 640px) {
  .sms-keyrow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sms-sched-fields { grid-template-columns: minmax(0, 1fr); }
  .sms-send { width: 100%; }
  .sms-actions { justify-content: stretch; }
}

/* الدعم الفني */
.support-item { width: 100%; text-align: start; cursor: pointer; border-inline: 0; border-top: 0; font: inherit; color: inherit; }
.support-item:hover { background: var(--surface-2); }
.support-item small { display: block; color: var(--muted); }
.support-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; flex: 0 0 auto; }
.support-dot.on { background: var(--brand); }
.support-thread { display: grid; gap: 10px; }
.support-msg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-width: 92%; justify-self: start; background: var(--surface); }
.support-msg.from-admin { justify-self: end; background: var(--brand-soft, var(--surface-2)); border-color: transparent; }
.support-msg-head { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.support-msg-head small { color: var(--muted); }
.support-msg-body { white-space: pre-line; line-height: 1.8; overflow-wrap: anywhere; }
.support-shot { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.support-shot img { max-width: min(100%, 420px); max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 640px) { .support-msg { max-width: 100%; } }

/* ————— مساعدك الذكي ————— */
.ai-panel .panel-body { display: flex; flex-direction: column; gap: 12px; }
.ai-chat { display: flex; flex-direction: column; gap: 10px; min-height: 240px; max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.ai-msg { border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; max-width: 86%; line-height: 1.85; overflow-wrap: anywhere; background: var(--surface); }
.ai-msg.ai-user { align-self: flex-start; background: var(--brand-soft, var(--surface-2)); border-color: transparent; }
.ai-msg.ai-bot { align-self: flex-end; }
.ai-msg.ai-error { border-color: var(--danger); color: var(--danger); }
.ai-text p { margin: 0 0 6px; }
.ai-text p:last-child, .ai-text ul:last-child, .ai-text ol:last-child { margin-bottom: 0; }
.ai-text ul, .ai-text ol { margin: 4px 0 8px; padding-inline-start: 22px; }
.ai-text li { margin: 2px 0; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips .chip { cursor: pointer; font: inherit; }
.ai-compose { display: flex; gap: 8px; align-items: flex-end; }
.ai-compose .ai-input { flex: 1; min-width: 0; resize: vertical; min-height: 46px; }
.ai-typing { display: inline-flex; gap: 5px; align-items: center; min-height: 40px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-typing span { animation: none; opacity: .6; } }
@media (max-width: 640px) {
  .ai-msg { max-width: 100%; }
  .ai-chat { max-height: calc(100dvh - 260px); }
  .ai-compose { flex-direction: column; align-items: stretch; }
}

/* ————————————————— أنماط شاشة الكاشير (التصاميم ← نمط شاشة الكاشير) —————————————————
   layouts.js: ويندوز .pos[data-layout] لشاشات الحاسوب، والجوّال .pos-m[data-layout].
   «الكلاسيكي» و«المتوازن» بلا قواعد هنا: هما الشاشة كما كانت.
   الحاسوب من 701px فما فوق فقط: نافذة ويندوز الضيّقة تبقى على ترتيبها الخاص أعلاه مهما كان النمط. */
@media (min-width: 701px) {
  /* الفاتورة يمينًا: الفاتورة أوّل عمود (يمين الشاشة بالعربية) والأصناف بجانبها */
  .pos[data-layout="mirror"] { grid-template-columns: minmax(340px, 470px) minmax(300px, 1fr); }
  .pos[data-layout="mirror"] .pos-right { order: -1; border-inline-end: 1px solid var(--line); }
  .pos[data-layout="mirror"] .pos-left { border-inline-start: 0; }

  /* فاتورة عريضة: قرابة نصف الشاشة، والسطر بخط أوضح */
  .pos[data-layout="wide"] { grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.15fr); }
  .pos[data-layout="wide"] .cart-line { padding-block: 11px; }
  .pos[data-layout="wide"] .cart-line .nm { font-size: 1.04rem; }
  .pos[data-layout="wide"] .cart-line .tot { font-size: 1.1rem; }

  /* شاشة لمس: كل ما يُلمس أكبر */
  .pos[data-layout="touch"] .scan-input { min-height: 58px; }
  .pos[data-layout="touch"] .scan-bar > .btn { min-width: 52px; min-height: 52px; }
  .pos[data-layout="touch"] .quick-cats { gap: 8px; }
  .pos[data-layout="touch"] .quick-cats .chip { min-height: 44px; padding-inline: 16px; font-size: .95rem; }
  .pos[data-layout="touch"] .quick-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .pos[data-layout="touch"] .quick-btn { min-height: 112px; font-size: 1rem; }
  .pos[data-layout="touch"] .quick-img { width: 44px; height: 44px; }
  .pos[data-layout="touch"] .cart-line { padding: 11px 14px; }
  .pos[data-layout="touch"] .cart-line .qbtn { width: 40px; height: 40px; font-size: 1.15rem; }
  .pos[data-layout="touch"] .pos-actions .btn { min-height: 58px; font-size: .9rem; }
  .pos[data-layout="touch"] .pay-btn { min-height: 72px; font-size: 1.3rem; }

  /* الباركود فقط: الخانة بعرض الشاشة فوق، والفاتورة تحتها بعرضها كلّه */
  .pos[data-layout="scan"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pos[data-layout="scan"] .pos-left { border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .pos[data-layout="scan"] .quick-cats, .pos[data-layout="scan"] .quick-grid { display: none; }
  .pos[data-layout="scan"] .scan-bar { border-bottom: 0; padding: 12px 16px; }
  .pos[data-layout="scan"] .scan-input { min-height: 58px; font-size: 1.3rem; }
  .pos[data-layout="scan"] .search-results { top: 76px; max-height: 60dvh; }
  .pos[data-layout="scan"] .cart-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    grid-template-areas: "rows grand" "act pay";
  }
  .pos[data-layout="scan"] .tot-rows { grid-area: rows; }
  .pos[data-layout="scan"] .grand-row { grid-area: grand; }
  .pos[data-layout="scan"] .pos-actions { grid-area: act; padding-bottom: 8px; }
  .pos[data-layout="scan"] .pay-row { grid-area: pay; }
  .pos[data-layout="scan"] .pay-btn { height: 100%; }
}
/* الشاشات القصيرة: نمط اللمس أصغر قليلًا لتبقى أسطر الفاتورة */
@media (min-width: 701px) and (max-height: 700px) {
  .pos[data-layout="touch"] .scan-input { min-height: 48px; }
  .pos[data-layout="touch"] .quick-btn { min-height: 90px; }
  .pos[data-layout="touch"] .cart-line { padding-block: 8px; }
  .pos[data-layout="touch"] .cart-line .qbtn { width: 36px; height: 36px; }
  .pos[data-layout="touch"] .pos-actions .btn { min-height: 44px; flex-direction: row; gap: 5px; }
  .pos[data-layout="touch"] .pay-btn { min-height: 56px; }
  .pos[data-layout="scan"] .scan-input { min-height: 48px; }
  .pos[data-layout="scan"] .search-results { top: 66px; }
}

/* ——— الجوّال واللوحيّ ——— */
/* أصناف كبيرة: عمودان على الجوّال */
.pos-m[data-layout="items"] .quick-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 9px; }
.pos-m[data-layout="items"] .quick-btn { min-height: 96px; font-size: .98rem; }
.pos-m[data-layout="items"] .quick-img { width: 42px; height: 42px; }
/* فاتورة أكبر: أصناف مضغوطة */
.pos-m[data-layout="invoice"] .quick-btn { min-height: 62px; padding-block: 4px; }
/* قائمة: كل صنف سطر — الاسم ثم الكمية والسعر */
.pos-m[data-layout="list"] .quick-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
.pos-m[data-layout="list"] .quick-btn {
  flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px;
  min-height: 50px; padding: 6px 12px; border-width: 0 0 1px; border-radius: 0; background: transparent; text-align: start;
}
.pos-m[data-layout="list"] .quick-btn .n { flex: 1 1 auto; -webkit-line-clamp: 1; text-align: start; }
.pos-m[data-layout="list"] .quick-btn .q { order: 2; flex: none; }
.pos-m[data-layout="list"] .quick-btn .p { order: 3; flex: none; min-width: 64px; text-align: end; }
.pos-m[data-layout="list"] .quick-img { width: 30px; height: 30px; flex: none; }
/* اللوحيّ والأفقي (عمودان): «فاتورة أكبر» تعطي الفاتورة العمود الأعرض */
@media (min-width: 701px) {
  .pos-m[data-layout="invoice"] { grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.2fr); }
}
/* الجوّال العمودي: قسمة الأصناف والفاتورة لكل نمط (الأفقي على قاعدته أعلاه) */
/* «أصناف كبيرة» تبقى على قسمة «المتوازن» (أزرارها أكبر وتُمرَّر) فلا تضيق الفاتورة */
@media (max-width: 700px) and (max-aspect-ratio: 3/2) {
  .pos-m[data-layout="invoice"] { grid-template-rows: minmax(124px, .62fr) minmax(0, 1.38fr); }
  .pos-m[data-layout="invoice"].kb-open { grid-template-rows: minmax(130px, .8fr) minmax(0, 1fr); }
}
@media (max-width: 700px) and (max-height: 700px) and (max-aspect-ratio: 3/2) {
  .pos-m[data-layout="items"] .quick-btn { min-height: 84px; }
  /* جوّال قصير: صفّ أصناف كامل يبقى ظاهرًا تحت الخانة والأقسام */
  .pos-m[data-layout="invoice"] { grid-template-rows: minmax(150px, .7fr) minmax(0, 1.3fr); }
  .pos-m[data-layout="invoice"] .quick-btn { min-height: 56px; }
}
@media (max-width: 700px) and (max-height: 560px) and (max-aspect-ratio: 3/2) {
  .pos-m[data-layout="items"] .quick-btn { min-height: 76px; }
  /* أصغر الجوّالات: صفّ أصناف كامل يبقى ظاهرًا، والفاتورة تكسب ما يتّسع */
  .pos-m[data-layout="invoice"] { grid-template-rows: minmax(124px, .6fr) minmax(0, 1fr); }
  .pos-m[data-layout="invoice"] .quick-btn { min-height: 52px; }
  .pos-m[data-layout="invoice"].kb-open { grid-template-rows: minmax(120px, .7fr) minmax(0, 1fr); }
}
/* الأفقي القصير (جوّال أفقي، لوحيّ قصير): الأصناف الكبيرة أقصر لتتّسع الفاتورة */
@media (max-height: 480px) {
  .pos-m[data-layout="items"] .quick-btn { min-height: 72px; }
  .pos-m[data-layout="invoice"] .quick-btn { min-height: 52px; }
  .pos-m[data-layout="list"] .quick-btn { min-height: 42px; }
}

/* ——— الرسم المصغّر للأنماط في «التصاميم» ——— */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pl-opt { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: start; padding: 10px; }
.pl-opt .nm { font-weight: 700; }
.pl-opt small { color: var(--muted); line-height: 1.5; }
.pl-mock {
  display: grid; gap: 3px; padding: 5px; height: 96px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line-2); direction: rtl;
}
.pl-mock.m { height: 132px; width: 76px; margin-inline: auto; border-radius: 12px; }
.pl-mock > i { display: block; min-width: 0; min-height: 0; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); }
.pl-mock > i.s { border: 1.5px solid var(--brand); }
.pl-mock > i.p { background: var(--brand); border-color: var(--brand); }
.pl-mock > i.a { background: var(--surface-2); }
.pl-mock > i.t { display: grid; gap: 2px; padding: 2px; align-content: start; background: transparent; border: 0; }
.pl-mock > i.t b { display: block; border-radius: 2px; background: var(--brand-soft); border: 1px solid var(--line); min-height: 9px; }
.pl-mock > i.t.big b { min-height: 18px; }
.pl-mock > i.t.list b { min-height: 6px; border-radius: 1px; }
.pl-mock > i.c { display: grid; gap: 2px; padding: 3px; align-content: start; }
.pl-mock > i.c b { display: block; height: 3px; border-radius: 2px; background: var(--line-2); }

/* الدخول بالبصمة (أندرويد): زرّ بارز فوق تبويبات الدخول وفي شاشة القفل */
.bio-btn { gap: 10px; margin-bottom: 12px; border-color: var(--brand); color: var(--brand-2); }
.bio-btn .icon { flex: none; }
.bio-btn small { font-weight: 500; opacity: .75; font-size: .85rem; }
.lock-screen .bio-btn { margin-bottom: 10px; }
