/* ════════════════════════════════════════════════════════════════════
   FS Theme — ألوان البرنامج كمتغيرات (ثيمين)
   ────────────────────────────────────────────────────────────────────
   ▸ الافتراضى: هوية FullScreen — تركوازى، وأزرار الأفعال كهرمانى.
   ▸ البرتقالى: الشكل القديم بالظبط — html[data-fs-theme="orange"].
     القيم تحت هى نفس الأرقام اللى كانت مكتوبة ثابتة فى الملفات قبل التحويل،
     فاختيار البرتقالى بيرجّع البرنامج زى ما كان حرفيًا.

   الاختيار بيتحفظ فى localStorage باسم fsUiTheme (App.razor بيقرأه قبل
   أول رسم عشان مايحصلش وميض). ماتستخدمش fs-theme — App.razor بيمسحه كل تحميل.

   أزرار الأفعال (حفظ / القائمة / btn-primary ...) بتستخدم نفس متغيرات
   --fs-primary، بس بنعيد تعريفها على الزرار نفسه لتبقى --fs-action
   (آخر الملف). كده الملفات القديمة مش محتاجة تعرف الفرق.

   ⚠ الألوان اللى ليها معنى (الأحمر للسالب/الحذف، الأخضر، أصفر التحذير
   #FFCA18، برتقالى التنبيه #E04F16) مش جزء من الثيم ومتسابة زى ما هى.
   ════════════════════════════════════════════════════════════════════ */

:root {
    /* اللون الأساسى (كان #FE9F43) */
    --fs-primary: #006780;
    --fs-primary-rgb: 0, 103, 128;
    --fs-primary-hover: #00566B;          /* كان #FE8510 / #FE8D1F */
    --fs-primary-soft: #4FA3B6;           /* كان #FFB370 / #FFA95B */
    /* الدرجة الأغمق — آخر التدرّجات (كان #F97316) */
    --fs-primary-deep: #004F63;
    --fs-primary-deep-rgb: 0, 79, 99;
    --fs-primary-deeper: #003F4F;         /* كان #EA580C / #EA6C00 */
    /* كلام بلون الثيم على خلفية فاتحة (كان #C2620A / #92400E) */
    --fs-primary-ink: #00495B;
    /* خلفيات فاتحة (كانت #FFF8F0 / #FFF7ED / #FFEDD5 / #FCD9A8 / #FED7AA) */
    --fs-tint-1: #F2F9FA;
    --fs-tint-2: #EEF7F9;
    --fs-tint-3: #DDEFF3;
    --fs-tint-4: #BFE0E8;
    /* درجات قليلة الاستخدام — كل درجة برتقالى قديمة ليها متغير لوحدها عشان البرتقالى يرجع بالظبط */
    --fs-primary-hover-2: #005E75;        /* كان #FE8D1F */
    --fs-primary-hover-3: #00627A;        /* كان #E8882A */
    --fs-primary-soft-2: #3E97AB;         /* كان #FFA95B */
    --fs-primary-deeper-2: #004556;       /* كان #EA6C00 */
    --fs-primary-ink-2: #003845;          /* كان #92400E */
    --fs-tint-5: #CFE6EC;                 /* كان #FED7AA */
    --fs-tint-6: #E6F3F6;                 /* كان #FCE8C4 */
    --fs-primary-vivid: #0B7A93;          /* كان #FF6B2B (زرار ملء الشاشة فى هيدر الفواتير) */
    --fs-primary-vivid-hover: #006780;    /* كان #E55A1C */
    /* المرحلة التانية (الفواتير) */
    --fs-primary-ink-3: #00495B;          /* كان #C2500A */
    --fs-primary-ink-4: #003D4C;          /* كان #C2410C */
    --fs-primary-soft-3: #8CC3D0;         /* كان #FBBF7A — placeholder */
    --fs-primary-soft-4: #3E97AB;         /* كان #FFB060 */
    --fs-primary-soft-5: #9BEFFA;         /* كان #FFCC80 — خط الليزر فى ماسح الباركود */
    --fs-primary-hover-4: #00627A;        /* كان #E67700 */
    --fs-primary-vivid-2: #0B7A93;        /* كان #FF8A2A — حدود فاتورة المشتريات */
    --fs-tint-7: #F2F9FA;                 /* كان #FFF3E0 — شريط إجماليات الجدول (أول التدرّج) */
    --fs-tint-8: #DDEFF3;                 /* كان #FFE8C4 — (آخر التدرّج) */
    --fs-grid-footer-rgb: 0, 103, 128;    /* كان 255,152,0 — GridStyleHelper.cs بيكتبه inline */
    --fs-primary-hover-5: #00627A;        /* كان #E08C3A — كلام الشارات فى صفحات القوائم */
    /* المرحلة التالتة (نقاط البيع) — درجات فاتحة جدًا */
    --fs-tint-9: #F2F9FA;                 /* كان #FFF8EE — المجموعة المختارة */
    --fs-tint-10: #E3F1F4;                /* كان #FFF3D6 */
    --fs-tint-11: #F5FAFB;                /* كان #FDF8F3 — صف العميل */
    /* المرحلة الرابعة (الرواتب والتقارير) */
    --fs-tint-12: #9FD0DC;                /* كان #FDBA74 */
    --fs-primary-soft-6: #2A8FA6;         /* كان #FB923C */
    --fs-primary-ink-5: #00495B;          /* كان #B45309 — رقم السنة فى هيدر الفواتير واسم المجموعة المختارة فى POS */
    --fs-kind-transfer: #006780;          /* كان #E07B00 — لون نوع «تحويل» فى تنبيهات الجرس */
    --fs-chip-bd: #CFE6EC;                /* كان #FCE8CC — إطار شرائح معلومات الصنف تحت الفاتورة */
    --fs-chip-v: #00495B;                 /* كان #7C3900 — قيمة الشريحة */

    /* أزرار الأفعال — كهرمانى */
    --fs-action: #D97726;
    --fs-action-rgb: 217, 119, 38;
    --fs-action-hover: #BF6519;
    --fs-action-deep: #C4651B;
    --fs-action-deep-rgb: 196, 101, 27;
    --fs-action-deeper: #A9561A;

    /* (2026-11-17) «الموضوع» — شارة الصنف/العميل اللى النافذة مفتوحة عليه (FsSubject): كهرمانى ، مختلف عن أزرار الأوامر التركواز */
    --fs-subject: #A9561A;
    --fs-subject-bg: #FDF1E4;
    --fs-subject-bd: #F2C28E;
    --fs-subject-ink: #6E3A0E;
}

html[data-fs-theme="orange"] {
    --fs-primary: #FE9F43;
    --fs-primary-rgb: 254, 159, 67;
    --fs-primary-hover: #FE8510;
    --fs-primary-soft: #FFB370;
    --fs-primary-deep: #F97316;
    --fs-primary-deep-rgb: 249, 115, 22;
    --fs-primary-deeper: #EA580C;
    --fs-primary-ink: #C2620A;
    --fs-tint-1: #FFF8F0;
    --fs-tint-2: #FFF7ED;
    --fs-tint-3: #FFEDD5;
    --fs-tint-4: #FCD9A8;
    --fs-primary-hover-2: #FE8D1F;
    --fs-primary-hover-3: #E8882A;
    --fs-primary-soft-2: #FFA95B;
    --fs-primary-deeper-2: #EA6C00;
    --fs-primary-ink-2: #92400E;
    --fs-tint-5: #FED7AA;
    --fs-tint-6: #FCE8C4;
    --fs-primary-vivid: #FF6B2B;
    --fs-primary-vivid-hover: #E55A1C;
    --fs-primary-ink-3: #C2500A;
    --fs-primary-ink-4: #C2410C;
    --fs-primary-soft-3: #FBBF7A;
    --fs-primary-soft-4: #FFB060;
    --fs-primary-soft-5: #FFCC80;
    --fs-primary-hover-4: #E67700;
    --fs-primary-vivid-2: #FF8A2A;
    --fs-tint-7: #FFF3E0;
    --fs-tint-8: #FFE8C4;
    --fs-grid-footer-rgb: 255, 152, 0;
    --fs-primary-hover-5: #E08C3A;
    --fs-tint-9: #FFF8EE;
    --fs-tint-10: #FFF3D6;
    --fs-tint-11: #FDF8F3;
    --fs-tint-12: #FDBA74;
    --fs-primary-soft-6: #FB923C;
    --fs-primary-ink-5: #B45309;
    --fs-kind-transfer: #E07B00;
    --fs-chip-bd: #FCE8CC;
    --fs-chip-v: #7C3900;

    /* فى البرتقالى الأزرار كانت نفس اللون الأساسى */
    --fs-action: #FE9F43;
    --fs-action-rgb: 254, 159, 67;
    --fs-action-hover: #FE8510;
    --fs-action-deep: #F97316;
    --fs-action-deep-rgb: 249, 115, 22;
    --fs-action-deeper: #EA580C;

    /* فى البرتقالى الأزرار برتقالى ← الموضوع تركواز عشان يفضل مختلف */
    --fs-subject: #006780;
    --fs-subject-bg: #E6F3F6;
    --fs-subject-bd: #A9D3DD;
    --fs-subject-ink: #00495B;
}

/* ── اختيار الفرع فى الهيدرين (HeaderLayout و PosHeader): كارت بإطار خفيف و«الفرع الحالي» فوق الاسم ──
   الهيدرين عندهم <style> خاص بيظهر بعد الملف ده فى الصفحة، فالـ selectors هنا أدق و!important
   على الحاجات اللى بتتعارض. الألوان من الثيم (فى البرتقالى بتبقى درجات برتقالى فاتح). */
.header .ssd-wrap .ssd-trigger {
    display: inline-flex !important; align-items: center; gap: 10px;
    height: 46px; padding: 0 10px 0 12px !important;
    border: 1px solid var(--fs-tint-5) !important; border-radius: 12px !important;
    background: var(--fs-tint-1) !important; box-shadow: 0 1px 2px rgba(4,37,45,.05) !important;
    text-decoration: none !important; transition: border-color .15s, background-color .15s;
}
.header .ssd-wrap .ssd-trigger:hover,
.header .ssd-wrap .ssd-trigger.show { border-color: var(--fs-tint-12) !important; background: #fff !important; }
.header .ssd-wrap .ssd-trigger::after { display: none !important; }   /* سهم bootstrap الافتراضى — عندنا ssd-caret */
.header .ssd-wrap .ssd-avatar { width: 34px !important; height: 34px !important; min-width: 34px; border-radius: 9px !important; overflow: hidden; }
.header .ssd-wrap .ssd-avatar-img,
.header .ssd-wrap .ssd-avatar-icon { width: 34px !important; height: 34px !important; border-radius: 9px !important; }
.header .ssd-wrap .ssd-avatar-icon { display: grid !important; place-items: center; font-size: 15px !important; }
.header .ssd-wrap .ssd-avatar-pulse { display: none !important; }
.header .ssd-wrap .ssd-text { display: flex !important; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.2; min-width: 0; }
.header .ssd-wrap .ssd-label { font-size: 11px; font-weight: 600; color: #6B7F86; white-space: nowrap; }
.header .ssd-wrap .ssd-name {
    display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 14px !important; font-weight: 700 !important; color: #04252D !important;
}
.header .ssd-wrap .ssd-caret { color: #6B7F86 !important; font-size: 15px !important; margin-inline-start: 4px; }

/* ── أيقونة اختيار الثيم (لوحة الألوان) — فى HeaderLayout و PosHeader ── */
.thm-trigger { color: var(--fs-primary) !important; }
.thm-trigger i { font-size: 18px; }
.thm-menu {
    width: 210px !important; padding: 0 0 6px !important; border: none !important; border-radius: 14px !important;
    box-shadow: 0 16px 48px rgba(0,0,0,.13), 0 3px 12px rgba(0,0,0,.07) !important; overflow: hidden;
}
.thm-menu-header {
    display: flex; align-items: center; gap: 7px; padding: 11px 14px 9px; margin-bottom: 6px;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-deep) 100%);
    font-size: 12px; font-weight: 700; color: #fff;
}
.thm-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin: 0 6px; border-radius: 9px;
    color: #1f2937 !important; font-size: 13.5px; font-weight: 600; text-decoration: none !important;
}
.thm-item:hover { background: var(--fs-tint-2); }
/* الدواير بألوان ثابتة — بتوصف الثيم نفسه، فمش بتتغير معاه */
.thm-swatch { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 0 0 1px rgba(0,0,0,.08); }
.thm-swatch--brand { background: linear-gradient(135deg, #006780 0 55%, #D97726 55% 100%); }
.thm-swatch--orange { background: #FE9F43; }
.thm-item-name { flex: 1; }
.thm-check { color: var(--fs-primary); font-size: 16px; visibility: hidden; }
html:not([data-fs-theme="orange"]) .thm-item--brand .thm-check,
html[data-fs-theme="orange"] .thm-item--orange .thm-check { visibility: visible; }
html:not([data-fs-theme="orange"]) .thm-item--brand,
html[data-fs-theme="orange"] .thm-item--orange { background: var(--fs-tint-2); }

/* ── زرار «الرئيسية» فى هيدر الفواتير: كان بنفسجى (btn-purple) ومالوش علاقة بأى ثيم.
      فى الهوية الجديدة بقى تركوازى، وفى البرتقالى بيفضل بنفسجى زى ما كان. ── */
html:not([data-fs-theme="orange"]) .pos-nav .btn-purple {
    background-color: var(--fs-primary) !important;
    border-color: var(--fs-primary) !important;
    color: #fff !important;
}
html:not([data-fs-theme="orange"]) .pos-nav .btn-purple:hover,
html:not([data-fs-theme="orange"]) .pos-nav .btn-purple:focus {
    background-color: var(--fs-primary-hover) !important;
    border-color: var(--fs-primary-hover) !important;
}

/* ── هيدر تطبيق الرواتب: كان رملى/بيج (Soft Sand) ومش ماشى مع التركوازى.
      فى الهوية الجديدة بقى نفس تدرّج لوحة شاشة الدخول والكلام فاتح، وفى البرتقالى بيفضل رملى زى ما كان. ── */
html:not([data-fs-theme="orange"]) .pr-hdr {
    background:
        linear-gradient(180deg, rgba(255,255,255,.06) 0%, transparent 60%),
        linear-gradient(135deg, #1E6B7E 0%, #124B59 60%, #0D3E4A 100%) !important;
    color: #fff;
}
html:not([data-fs-theme="orange"]) .pr-hdr-ttl,
html:not([data-fs-theme="orange"]) .pr-hdr-crumbs,
html:not([data-fs-theme="orange"]) .pr-hdr-menu { color: #fff; }
html:not([data-fs-theme="orange"]) .pr-hdr-ttl small { color: rgba(255,255,255,.75); }
html:not([data-fs-theme="orange"]) .pr-hdr-menu { background: rgba(255,255,255,.14); }
html:not([data-fs-theme="orange"]) .pr-hdr-back:hover,
html:not([data-fs-theme="orange"]) .pr-hdr-logout:hover,
html:not([data-fs-theme="orange"]) .pr-hdr-menu:hover { background: rgba(255,255,255,.24); color: #fff; }
html:not([data-fs-theme="orange"]) .pr-hdr-crumbs { border-top-color: rgba(255,255,255,.14); }
html:not([data-fs-theme="orange"]) .pr-hdr-crumb { color: rgba(255,255,255,.8); }
html:not([data-fs-theme="orange"]) .pr-hdr-crumb:hover,
html:not([data-fs-theme="orange"]) .pr-hdr-crumb.current { color: #fff; background: rgba(255,255,255,.16); }
html:not([data-fs-theme="orange"]) .pr-hdr-crumb-sep { color: rgba(255,255,255,.45); }
html:not([data-fs-theme="orange"]) .pr-hdr-menu-ico span { background: #fff; }

/* ── أزرار الأفعال: نفس متغيرات الأساسى، بقيمة «الفعل» ──
   أى قاعدة فى style.css أو غيره بتلوّن الزرار ده بـ var(--fs-primary...)
   هتطلع كهرمانى فى الهوية الجديدة، وبرتقالى فى البرتقالى. */
.btn-primary,
.btn-submit,
.btn-added,
.nav-item.link-nav > .btn,
.fs-mqm-btn,                /* زرار «القائمة» على الموبيل */
.fs-btmnav-fab,             /* زرار + (نقاط البيع) فى نص الشريط السفلى على الموبيل */
.inv-abtn.a-save,           /* «حفظ» فى الفواتير */
.rinv-abtn.a-save,          /* «حفظ» فى المرتجع */
.inv-tb-new,                /* «أدرج سطر» */
.rinv-tb-new,
.tbl-btn-confirm,           /* «تأكيد» فى نافذة الطاولات */
.rpt-add-btn,               /* «إنشاء فاتورة ...» فى صفحات القوائم */
.rpt-search-btn,            /* «بحث» فى صفحات القوائم والتقارير */
.a-save,                    /* «حفظ» فى نقاط البيع (POS) */
.pps-btn-save,              /* «حفظ» فى إعدادات طباعة نقاط البيع */
.fs-action {
    --fs-primary: var(--fs-action);
    --fs-primary-rgb: var(--fs-action-rgb);
    --fs-primary-hover: var(--fs-action-hover);
    --fs-primary-deep: var(--fs-action-deep);
    --fs-primary-deep-rgb: var(--fs-action-deep-rgb);
    --fs-primary-deeper: var(--fs-action-deeper);
    --fs-primary-hover-2: var(--fs-action-hover);
    --fs-primary-hover-3: var(--fs-action-hover);
    --fs-primary-deeper-2: var(--fs-action-deeper);
    --fs-primary-hover-4: var(--fs-action-hover);
    --fs-primary-soft-4: #E89A57;   /* hover أفتح من الكهرمانى (فى البرتقالى بيرجع لقيمته تحت) */
    /* report-pages.css عنده متغيرات محلية (--or/--or2) بتتحسب على .rpt-page وتوصل للزرار جاهزة،
       فلازم نعيد تعريفها هنا كمان */
    --or: var(--fs-action);
    --or2: var(--fs-action-hover);
}
html[data-fs-theme="orange"] .tbl-btn-confirm { --fs-primary-soft-4: #FFB060; }


/* ══════════════════════════════════════════════════════════════════════
   المنيو الجانبية (Sidebar)
   ▸ الأحجام (أيقونات 20px وسطر 44px) للثيمين
   ▸ الألوان: فى الثيم الافتراضى خلفية تركوازى فاتح ونص غامق؛ البرتقالى بيفضل أبيض
   ▸ الطى: علامة FullScreen بدل اللوجو العريض، أيقونات بس، والوقوف على قسم
     بيفتح لوح عائم (#fs-fly — fs-sidebar.js) بدل ما المنيو كلها تتفتح
   ══════════════════════════════════════════════════════════════════════ */
/* ديسكتوب بس: على الموبيل المنيو drawer ليه تصميمه الخاص (mobile-drawer.css: هيدر تركوازى بلوجو أبيض وأسهم FontAwesome) */
@media (min-width: 992px) {
#sidebar-menu > ul > li > ul > li > a {
    display: flex !important; align-items: center; gap: 12px;
    min-height: 44px; padding: 0 12px !important; margin-bottom: 2px;
    border: 0 !important; border-radius: 10px !important;
    font-size: 14.5px !important; font-weight: 600 !important;
}
/* هامش المنيو كان 24px من كل ناحية — قلّلناه عشان الأسماء الطويلة تاخد مساحة أكبر */
#sidebar #sidebar-menu { padding-left: 12px !important; padding-right: 12px !important; }
#sidebar-menu > ul > li > ul > li > a { gap: 10px !important; font-size: 14px !important; }
#sidebar-menu > ul > li > ul > li > a > i { font-size: 20px !important; width: 22px; min-width: 22px; text-align: center; line-height: 1; flex: 0 0 auto; margin: 0 !important; }
/* الاسم ياخد المساحة كلها، والطويل («التحويلات والاستقبالات») ينزل سطر بدل ما يدخل تحت السهم */
#sidebar-menu > ul > li > ul > li > a > span:not(.menu-arrow) { flex: 1 1 auto; width: auto !important; min-width: 0; white-space: normal !important; line-height: 1.35; padding: 6px 0; }
/* السهم كان position:absolute على مسافة ثابتة — بقى عنصر عادى فى آخر السطر */
/* relative (مش static) عشان السهم المرسوم بـ ::before يفضل جوّه العنصر بدل ما يطير على السطر؛
   ومن غير الدايرة الرمادى اللى كانت خلفه */
#sidebar-menu > ul > li > ul > li > a > .menu-arrow { position: relative !important; inset: auto !important; flex: 0 0 12px; width: 12px !important; height: 12px !important; margin: 0 !important; background: transparent !important; border-radius: 0 !important; }
/* القسم المفتوح: السهم لتحت */
#sidebar-menu > ul > li > ul > li > a > .menu-arrow { transition: transform .2s; }
#sidebar-menu > ul > li > ul > li > a.subdrop > .menu-arrow { transform: rotate(90deg) !important; }
/* ‎+4px للاسم — «الصلاحيات والمستخدمين» كانت محتاجة 2px عشان تبقى سطر واحد */
#sidebar-menu > ul > li > ul > li > a { padding: 0 10px !important; }
#sidebar-menu > ul > li > ul > li > a > .menu-arrow::before { top: 50% !important; left: 50% !important; right: auto !important; width: 7px !important; height: 7px !important; margin: -3.5px 0 0 -3.5px !important; border-width: 0 1.6px 1.6px 0 !important; }
#sidebar-menu li.submenu > ul > li > a { font-size: 13.5px !important; font-weight: 500 !important; }

html:not([data-fs-theme="orange"]) #sidebar.sidebar { background: #EEF7F9 !important; border-inline-start: 1px solid #D5E6EB !important; }
html:not([data-fs-theme="orange"]) #sidebar .sidebar-logo { background: #fff !important; border-bottom: 1px solid #D5E6EB !important; }
html:not([data-fs-theme="orange"]) #sidebar .submenu-hdr { color: #6B8A91 !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a { color: #0E2E36 !important; background: transparent !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a > span { color: inherit !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a > i { color: #006780 !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a:hover { background: #DDEFF3 !important; color: #04252D !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a.active,
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a.subdrop { background: #fff !important; color: #04252D !important; box-shadow: inset 3px 0 0 var(--fs-action, #D97726), 0 1px 3px rgba(4,37,45,.08) !important; }
html[dir="rtl"]:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a.active,
html[dir="rtl"]:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a.subdrop { box-shadow: inset -3px 0 0 var(--fs-action, #D97726), 0 1px 3px rgba(4,37,45,.08) !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a.active > i,
html:not([data-fs-theme="orange"]) #sidebar-menu > ul > li > ul > li > a.subdrop > i { color: var(--fs-action, #D97726) !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu li.submenu > ul { background: transparent !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu li.submenu > ul > li > a { color: #33535B !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu li.submenu > ul > li > a:hover,
html:not([data-fs-theme="orange"]) #sidebar-menu li.submenu > ul > li > a.active { color: #006780 !important; }
html:not([data-fs-theme="orange"]) #sidebar-menu .menu-arrow::before { border-color: #006780 !important; }
html:not([data-fs-theme="orange"]) #toggle_btn { background: #DDEFF3 !important; border-color: transparent !important; }
html[data-fs-theme="orange"] #toggle_btn { background: var(--fs-tint-3) !important; border-color: transparent !important; }
html:not([data-fs-theme="orange"]) #toggle_btn svg { color: #006780 !important; stroke: #006780 !important; }
#toggle_btn > i.ti { font-size: 16px; line-height: 1; color: var(--fs-primary); transition: transform .2s; }
html:not([data-fs-theme="orange"]) #toggle_btn > i.ti { color: #006780; }
} /* /desktop sidebar — الموبيل ليه تصميمه فى mobile-drawer.css */

/* موبيل (drawer): لوجو واحد أبيض فى الهيدر التركوازى (كانوا 3 فوق بعض)،
   والسهم أيقونة FontAwesome بس — كان بيترسم معاه سهم القالب بالـ border فيبان مكسور */
@media (max-width: 991.98px) {
    body #sidebar .sidebar-logo .logo-normal,
    body #sidebar .sidebar-logo .logo-small { display: none !important; }
    /* زرار الطى بتاع الديسكتوب ملوش لازمة فى الـ drawer (والمنيو بتتقفل بالضغط برّه) — كان راكب على اللوجو */
    body #sidebar .sidebar-logo #toggle_btn { display: none !important; }
    body #sidebar .sidebar-logo .logo-white img { height: 42px !important; max-width: 170px !important; }
    body #sidebar li.submenu > a .menu-arrow { background: transparent !important; width: 16px !important; height: 16px !important; }
    body #sidebar li.submenu > a .menu-arrow::before {
        border: 0 !important; transform: none !important; position: static !important;
        width: auto !important; height: auto !important; margin: 0 !important;
    }
    /* القسم المفتوح: السهم لتحت (كان بيلف لفوق فى العربى) */
    html[dir="rtl"] body #sidebar li.submenu > a.subdrop .menu-arrow,
    body.layout-mode-rtl #sidebar li.submenu > a.subdrop .menu-arrow { transform: scaleX(-1) rotate(90deg) !important; }
}

/* الطى — أيقونات بس، والمنيو ما بتتفتحش بالوقوف */
@media (min-width: 992px) {
    body.mini-sidebar #sidebar.sidebar, body.mini-sidebar.expand-menu #sidebar.sidebar { width: 80px !important; }
    body.mini-sidebar #sidebar .submenu-hdr { font-size: 0 !important; height: 1px; padding: 0 !important; margin: 10px 14px !important; background: #D5E6EB; }
    body.mini-sidebar #sidebar-menu > ul > li > ul > li > a { justify-content: center; padding: 0 !important; width: 52px; margin-inline: auto; }
    body.mini-sidebar #sidebar-menu > ul > li > ul > li > a > span,
    body.mini-sidebar #sidebar-menu > ul > li > ul > li > a > .menu-arrow { display: none !important; }
    body.mini-sidebar #sidebar-menu > ul > li > ul > li > a > i { font-size: 22px !important; }
    body.mini-sidebar #sidebar-menu li.submenu > ul { display: none !important; }
    body.mini-sidebar #sidebar .sidebar-logo { justify-content: center !important; padding: 0 !important; }
    body.mini-sidebar #sidebar .sidebar-logo .logo-normal,
    body.mini-sidebar #sidebar .sidebar-logo .logo-white { display: none !important; }
    body.mini-sidebar #sidebar .sidebar-logo .logo-small { display: flex !important; align-items: center; justify-content: center; width: 100%; }
    body.mini-sidebar #sidebar .sidebar-logo .logo-small img { width: 40px !important; height: 40px !important; max-width: none; }
    /* زرار الطى لازم يفضل ظاهر وهى مطويّة (القالب كان بيظهره بس لما المنيو تتفتح بالوقوف) */
    body.mini-sidebar #toggle_btn { opacity: 1 !important; visibility: visible !important; }
    body.mini-sidebar #toggle_btn svg, body.mini-sidebar #toggle_btn > i.ti { transform: rotate(180deg); }
    /* حالة الطى بتفضل على الـ body فى شاشات من غير منيو (الفاتورة/PosHeader) —
       لوجو الهيدر هناك لازم يفضل كامل */
    body.mini-sidebar .header.pos-header .header-left { flex-direction: row !important; }
    body.mini-sidebar .header.pos-header .header-left .logo-normal { display: inline-flex !important; }
    body.mini-sidebar .header.pos-header .header-left .logo-small,
    body.mini-sidebar .header.pos-header .header-left .logo-white { display: none !important; }
}

/* اللوح العائم فى حالة الطى */
/* شكل (أ): رأس بلون الهوية + جسم بلون المنيو الفاتح؛ العنصر تحت الماوس كارت أبيض بنقطة كهرمانية */
#fs-fly { position: fixed; z-index: 3000; display: none; min-width: 230px; max-width: 290px; padding: 0; background: var(--fs-tint-1); border-radius: 14px; box-shadow: 0 14px 34px rgba(4,37,45,.25), 0 0 0 1px rgba(var(--fs-primary-rgb), .18); }
html:not([data-fs-theme="orange"]) #fs-fly { background: #EEF7F9; }
#fs-fly::before { content: ''; position: absolute; top: 16px; inset-inline-start: -6px; width: 12px; height: 12px; background: var(--fs-primary-deep); transform: rotate(45deg); border-radius: 2px; }
#fs-fly .ff-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px 14px 0 0; background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep)); font-weight: 700; font-size: 14px; color: #fff; }
#fs-fly .ff-h i { font-size: 18px; color: rgba(255,255,255,.75); }
html:not([data-fs-theme="orange"]) #fs-fly .ff-h i { color: #9FE3F2; }
#fs-fly .ff-tip { padding: 11px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep)); font-weight: 700; font-size: 13.5px; color: #fff; }
#fs-fly a { position: relative; display: flex; align-items: center; gap: 8px; margin: 2px 6px; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: #0E2E36; text-decoration: none; }
#fs-fly .ff-h + a { margin-top: 6px; }
#fs-fly a:last-child { margin-bottom: 6px; }
#fs-fly a::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: rgba(var(--fs-primary-rgb), .45); }
#fs-fly a:hover, #fs-fly a.active { background: #fff; color: var(--fs-primary); box-shadow: 0 1px 3px rgba(4,37,45,.1); }
#fs-fly a:hover::before, #fs-fly a.active::before { background: var(--fs-action, #D97726); }
#fs-fly a:hover, #fs-fly a.active { background: var(--fs-tint-1, #EEF7F9); color: var(--fs-primary); }

/* ══ زر وقايمة المستخدم: أول حرف من اسم الموظف، ومعاها تغيير اللغة ══ */
html body .profile-nav .fs-avatar:not(#_) { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--fs-primary); color: #fff; font-size: 16px; font-weight: 800; line-height: 1; }
html body .profile-nav .fs-avatar:not(#_) i { color: #fff; }
html body .fs-um:not(#_) { width: 270px; padding: 0; overflow: hidden; border: 1px solid var(--fs-tint-4); border-radius: 14px; box-shadow: 0 14px 34px rgba(4, 37, 45, .18); }
html body .fs-um-head { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--fs-tint-1); border-bottom: 1px solid var(--fs-tint-4); }
html body .fs-um-av { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--fs-primary); color: #fff; font-size: 20px; font-weight: 800; }
html body .fs-um-who { min-width: 0; }
html body .fs-um-who b { display: block; overflow: hidden; font-size: 15px; font-weight: 800; color: #17333B; text-overflow: ellipsis; white-space: nowrap; }
html body .fs-um-who small { display: block; overflow: hidden; font-size: 12px; font-weight: 600; color: #64748b; text-overflow: ellipsis; white-space: nowrap; }
html body .fs-um-sec { padding: 12px 14px; }
html body .fs-um-lbl { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 12.5px; font-weight: 700; color: #475569; }
html body .fs-um-lbl i { color: var(--fs-primary); font-size: 15px; }
html body .fs-um-seg { display: flex; gap: 2px; padding: 3px; background: var(--fs-tint-2); border-radius: 10px; }
html body .fs-um-seg a:not(#_) { flex: 1; padding: 6px 0; border-radius: 8px; font-size: 13px; font-weight: 700; color: #475569; text-align: center; text-decoration: none; }
html body .fs-um-seg a.on:not(#_) { background: var(--fs-primary); color: #fff; }
html body .fs-um-out:not(#_) { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--fs-tint-4); font-size: 14px; font-weight: 700; color: #B42318; text-decoration: none; }
html body .fs-um-out:not(#_):hover { background: #FDECEA; color: #B42318; }
html body .fs-um-out i { font-size: 17px; color: inherit; }
html body .mobile-user-menu .fs-um-seg { margin: 2px 16px 8px; }

/* (2026-11-17) أيقونات بنستخدمها ومش موجودة فى نسخة Tabler عندنا (كانت بتظهر مربع فاضى)
   ← بديل قريب، فتتصلّح فى كل مكان مرة واحدة (المنيو، الكاشير، إعداد الطباعة، قائمة الاستقبالات) */
.ti-cash-register:before { content: "\f863"; }      /* = ti-device-desktop-dollar (جهاز كاشير) */
.ti-building-transfer:before { content: "\ef2f"; }  /* = ti-transfer-in (استقبال من فرع) */
