/* ============================================================================
   طيف (tayf) — خلفية سوداء للهيدر والقائمة الجانبية
   ============================================================================
   يُحمَّل بعد theme.minc619.css و style.css و custom.css ليتغلّب عليها.

   تغيير الخلفية وحده لا يكفي: القالب الجاهز يلوّن النصوص والأيقونات بألوان
   داكنة مناسبة للخلفية البيضاء، فلو غيّرنا الخلفية فقط لصار نصٌّ داكن على
   أسود = غير مقروء. لذلك يقلب هذا الملف ألوان المحتوى معها.
   ============================================================================ */

:root {
    --tayf-nav-bg: #0e0e14;              /* أسود الهوية — نفس لون بنر الاشتراك */
    --tayf-nav-border: rgba(255, 255, 255, 0.08);
    --tayf-nav-text: rgba(255, 255, 255, 0.72);
    --tayf-nav-text-strong: #ffffff;
    --tayf-nav-hover-bg: rgba(255, 255, 255, 0.06);

    /* ذهبي الهوية — لون العنصر النشط وزر "قُمرة القيادة" داخل القائمة فقط.
       مستقل تمامًا عن --app-primary-color القادمة من إعدادات المتجر، فتغييره
       هنا لا يمسّ ألوان بقية اللوحة. */
    --tayf-nav-active: #f8cb25;
    --tayf-nav-active-bg: rgba(248, 203, 37, 0.12);
    --tayf-nav-active-ink: #0e0e14;
}

/* ==================== منع وميض ظهور/اختفاء القائمة ====================
   القائمة تُرسم داخل <div id="sidebarMain" class="d-none"> ثم ينسخها
   custom.js إلى <body> ويحذف الحاوية — أي أنها لا تظهر إلا بعد تنفيذ
   السكربت. الفجوة كانت موجودة دائمًا لكنها كانت غير مرئية حين كانت القائمة
   بيضاء على صفحة بيضاء؛ بعد تسويدها صارت ومضة واضحة عند كل انتقال.

   الحل: شريط أسود ثابت يشغل مكان القائمة منذ أول رسم للصفحة، فتظهر القائمة
   فوقه لاحقًا دون أن يلاحظ المستخدم شيئًا. لا يظهر إلا على الشاشات التي
   تُعرض فيها القائمة أصلًا (navbar-expand-xl ⇐ 1200px فأكثر). */
@media (min-width: 1200px) {
    body::before {
        content: "";
        position: fixed;
        top: 0;
        bottom: 0;
        /* inset-inline-start يطابق .navbar-vertical-fixed في القالب:
           يمين الشاشة بالعربية ويسارها بالإنجليزية */
        inset-inline-start: 0;
        width: 16.25rem;
        background-color: var(--tayf-nav-bg);
        z-index: 0;
        pointer-events: none;
    }

    /* الوضعان المطويّ والمضغوط: يضبطهما سكربت في <head> قبل الرسم،
       فيتطابق عرض الشريط مع عرض القائمة فورًا */
    body.navbar-vertical-aside-mini-mode::before {
        width: 5.25rem;
    }

    body.navbar-vertical-aside-compact-mode::before {
        width: 9rem;
    }

    /* المحتوى فوق الشريط الأسود حتى لا يغطّيه أثناء الفجوة.
       position:relative وحده يكفي: العنصر المموضَع يُرسم فوق إخوته
       الساكنة دون z-index.

       ولا يجوز إضافة z-index هنا — أي قيمة تصنع سياق تكديس يحبس بداخله
       كل نوافذ Bootstrap (‏z-index 1111‏)، بينما تُلحق الخلفية
       ‏.modal-backdrop‏ بـ <body> بقيمة 102، فتُرسم فوق السياق كلّه
       وتغطّي النافذة فيتعذّر النقر على حقولها.

       ولا يجوز إدراج #header هنا — القالب يعطيه position:fixed مع
       z-index:99، وإسناد position:relative له (بأولوية المعرّف) كان
       يُفقده التثبيت ويضعه تحت المحتوى. */
    .main {
        position: relative;
        z-index: auto;
    }

    /* إزاحة المحتوى مسبقًا بنفس عرض القائمة.
       القالب يطبّقها عبر `.navbar-vertical-aside-show .main`، وفئة
       navbar-vertical-aside-show يضيفها جافاسكربت بعد تحميل الصفحة — فكان
       المحتوى يُرسم بعرض الشاشة كاملًا وينزلق تحت الشريط ثم يقفز لمكانه.
       نطبّق الإزاحة الافتراضية هنا بأولوية أدنى (0,1,0) فيتغلّب عليها القالب
       (0,2,0) متى أضاف السكربت فئته، ولا يقع تعارض. */
    .main {
        padding-inline-start: 16.25rem;
    }

    body.navbar-vertical-aside-mini-mode .main {
        padding-inline-start: 5.25rem;
    }

    body.navbar-vertical-aside-compact-mode .main {
        padding-inline-start: 9rem;
    }
}

/* ============================ القائمة الجانبية ============================ */

/* إزالة البرتقالي (#FF7500) من القائمة نهائيًا.
   البرتقالي ليس مكتوبًا في أي قاعدة، بل هو القيمة الافتراضية لـ
   --app-primary-color التي يحقنها القالب في :root من إعدادات المتجر،
   وعشرات قواعد القالب داخل القائمة تقرأ منها (العنصر النشط، مؤشّر العنصر
   الفرعي، الشارات، مربّعات الاختيار، شريط التمرير...).

   بدل تجاوز كل قاعدة على حدة، نعيد تعريف المتغيّر *داخل القائمة فقط*.
   متغيّرات CSS تُورَّث، و var() تُحلّ عند العنصر المستهدف، فكل قاعدة تقرأ
   المتغيّر داخل القائمة ستحصل على الذهبي تلقائيًا — بينما تبقى قيمة :root
   كما هي لبقية اللوحة (الأزرار، التبويبات، الرسوم البيانية). */
.navbar-vertical-aside {
    --app-primary-color: var(--tayf-nav-active);
    --app-primary-color-rgb: 248, 203, 37;
    --c1: var(--tayf-nav-active);
    --c1-rgb: 248, 203, 37;
}

.navbar-vertical-aside,
.navbar-vertical-aside .navbar-vertical-container,
.navbar-vertical-aside .navbar-vertical-footer {
    background-color: var(--tayf-nav-bg) !important;
}

.navbar-vertical-aside,
.navbar-vertical-aside .navbar-vertical-footer {
    border-color: var(--tayf-nav-border) !important;
}

/* روابط القائمة وأيقوناتها */
.navbar-vertical-aside .nav-link,
.navbar-vertical-aside .nav-link .nav-icon,
.navbar-vertical-aside .nav-link .text-truncate,
.navbar-vertical-aside .navbar-vertical-footer .nav-link,
.navbar-vertical-aside .js-navbar-vertical-aside-toggle-invoker,
.navbar-vertical-aside .js-navbar-vertical-aside-toggle-invoker i {
    color: var(--tayf-nav-text) !important;
}

.navbar-vertical-aside .nav-link:hover,
.navbar-vertical-aside .nav-link:hover .nav-icon,
.navbar-vertical-aside .nav-link:hover .text-truncate {
    color: var(--tayf-nav-text-strong) !important;
}

.navbar-vertical-aside .nav-link:hover {
    background-color: var(--tayf-nav-hover-bg) !important;
}

/* ---------------------- الشعار واسم المتجر ----------------------
   style.css كان يثبّت الشعار على 26px. نكبّره هنا ونضع اسم المتجر تحته. */
/* الشعار واسم المتجر جنبًا إلى جنب: الشعار أولًا (يمينًا بالعربية) والاسم بعده */
.navbar-vertical-aside .navbar-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.navbar-vertical-aside .navbar-brand-logo,
#header .navbar-brand-logo {
    height: 52px !important;
    max-width: 100% !important;
    width: auto;
    flex: none;
    object-fit: contain;
}

.navbar-vertical-aside .navbar-brand-logo-mini,
#header .navbar-brand-logo-mini {
    width: 2.4rem !important;
    height: auto;
}

.tayf-brand-name {
    color: var(--tayf-nav-text-strong);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    min-width: 0;
    /* الاسم الطويل يلتفّ على سطرين كحدّ أقصى بدل أن يدفع الشعار خارج المساحة */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* في الوضع المطويّ يخفي القالب هذه الفئة، ونعيد الشعار لحجم الأيقونة */
.navbar-vertical-aside-mini-mode .navbar-vertical-aside .navbar-brand {
    align-items: center;
}

/* صندوق البحث داخل القائمة — كان أبيض على أبيض بعد تسويد الخلفية */
.navbar-vertical-aside #search-bar-input,
.navbar-vertical-aside .js-form-search {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--tayf-nav-border) !important;
    color: var(--tayf-nav-text-strong) !important;
}

.navbar-vertical-aside #search-bar-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.navbar-vertical-aside #search-bar-input:focus {
    border-color: var(--tayf-nav-active) !important;
    box-shadow: none !important;
}

.navbar-vertical-aside .input-group-prepend .btn,
.navbar-vertical-aside .input-group-prepend .btn i,
.navbar-vertical-aside .input-group-append .btn,
.navbar-vertical-aside .input-group-append .btn i {
    color: rgba(255, 255, 255, 0.45) !important;
    background-color: transparent !important;
    border-color: var(--tayf-nav-border) !important;
}

/* عناوين المجموعات ("الطلبات"، "المنتجات"، ...) */
.navbar-vertical-aside .nav-subtitle,
.navbar-vertical-aside .nav-subtitle-replacer {
    color: rgba(255, 255, 255, 0.38) !important;
}

/* الفواصل */
.navbar-vertical-aside hr,
.navbar-vertical-aside .dropdown-divider {
    border-color: var(--tayf-nav-border) !important;
}

/* العناوين الرئيسية (روابط المستوى الأول) عريضة، لتتميّز عن بنودها الفرعية.
   `> .nav-link` مباشرة حتى لا يرث العرض روابطُ القوائم الفرعية بداخلها. */
.navbar-vertical-aside .navbar-vertical-aside-has-menu > .nav-link,
.navbar-vertical-aside .navbar-nav > .nav-item > .nav-link {
    font-weight: 700 !important;
}

/* القوائم الفرعية — أغمق قليلًا لتُقرأ كطبقة داخلية */
.navbar-vertical-aside .nav-sub {
    background-color: rgba(0, 0, 0, 0.25) !important;
}

.navbar-vertical-aside .nav-sub .nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
}

.navbar-vertical-aside .nav-sub .nav-link:hover,
.navbar-vertical-aside .nav-sub .nav-link.active {
    color: var(--tayf-nav-text-strong) !important;
}

/* نقطة مؤشّر العنصر الفرعي */
.navbar-vertical-aside .nav-indicator-icon {
    color: rgba(255, 255, 255, 0.35) !important;
}

/* ---------------------- العنصر النشط: أزرق ----------------------
   القالب يلوّن العنصر النشط بـ --app-primary-color القادمة من إعدادات المتجر
   (البرتقالي حاليًا). نتجاوزها هنا **داخل القائمة الجانبية فقط** فلا يتأثر
   لون الإعدادات في بقية اللوحة (الأزرار، التبويبات، الرسوم البيانية...). */
.navbar-vertical-aside .navbar-vertical-aside-has-menu.active > .nav-link,
.navbar-vertical-aside .navbar-vertical-aside-has-menu > .nav-link.active,
.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link,
.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link-toggle,
.navbar-vertical-aside .nav-sub .nav-item.active > .nav-link,
.navbar-vertical-aside .nav-sub .nav-link.active {
    background-color: var(--tayf-nav-active-bg) !important;
    color: var(--tayf-nav-active) !important;
}

.navbar-vertical-aside .navbar-vertical-aside-has-menu.active > .nav-link .nav-icon,
.navbar-vertical-aside .navbar-vertical-aside-has-menu > .nav-link.active .nav-icon,
.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link .nav-icon,
.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link-toggle .nav-icon,
.navbar-vertical-aside .navbar-vertical-aside-has-menu.active > .nav-link .text-truncate,
.navbar-vertical-aside .navbar-vertical-aside-has-menu > .nav-link.active .text-truncate,
.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link .text-truncate,
.navbar-vertical-aside .nav-sub .nav-item.active > .nav-link .text-truncate,
.navbar-vertical-aside .nav-sub .nav-link.active .text-truncate,
.navbar-vertical-aside .nav-sub .nav-item.active .nav-indicator-icon,
.navbar-vertical-aside .nav-sub .nav-link.active .nav-indicator-icon {
    color: var(--tayf-nav-active) !important;
}

/* ---------------------- زر "قُمرة القيادة" ----------------------
   ذهبي ممتلئ دائمًا: لا يتغيّر بالتحويم ولا عند فتح شاشة اللوحة.

   الفئة .navbar-vertical-aside مكرّرة عمدًا (وليست معرّفًا): custom.js ينسخ
   القائمة من #sidebarMain إلى <body> مباشرة ثم يحذف #sidebarMain، فأي محدّد
   يعتمد على ذلك المعرّف لا يجد هدفًا وقت التشغيل. تكرار الفئة يرفع الأولوية
   بنفس القدر ويبقى صالحًا. والسبب في الحاجة لرفعها: القالب يحقن في <head> قاعدة
   `.navbar-vertical-aside .navbar-vertical-aside-has-menu.show>.nav-link .text-truncate`
   بلون --app-primary-color و !important، وأولويتها (0,5,0) كانت تتغلّب على
   قواعدنا فيصير نص الزر برتقاليًا على ذهبي = يختفي عند فتح اللوحة.
   المعرّف يرفع الأولوية إلى (1,x,0) فيحسم الأمر نهائيًا. */
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta,
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta:hover,
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta:focus,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.active > .nav-link.tayf-nav-cta,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link.tayf-nav-cta,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link.tayf-nav-cta:hover {
    background-color: var(--tayf-nav-active) !important;
    color: var(--tayf-nav-active-ink) !important;
    border-radius: 12px;
    margin: 10px 12px;
    padding: 13px 16px;
    font-weight: 700;
    box-shadow: none !important;
}

/* كل حالات النص والأيقونة داخل الزر — بما فيها .show التي كانت تُخفي الكلام */
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta .nav-icon,
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta .text-truncate,
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta:hover .nav-icon,
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta:hover .text-truncate,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.active > .nav-link.tayf-nav-cta .nav-icon,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.active > .nav-link.tayf-nav-cta .text-truncate,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link.tayf-nav-cta .nav-icon,
.navbar-vertical-aside.navbar-vertical-aside .navbar-vertical-aside-has-menu.show > .nav-link.tayf-nav-cta .text-truncate {
    color: var(--tayf-nav-active-ink) !important;
    opacity: 1 !important;
}

/* ترتيب المحتوى داخل الزر: الأيقونة أولًا (يمينًا بالعربية) ثم النص على يسارها.
   order صريح بدل الاعتماد على ترتيب الـ DOM وحده، ليبقى الترتيب مقصودًا
   وواضحًا لمن يعدّل لاحقًا. */
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta .nav-icon {
    order: 1;
    margin: 0 !important;
    font-size: 1.15rem;
}

.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta .text-truncate {
    order: 2;
    margin: 0 !important;
    font-size: 0.95rem;
}

/* أيقونة SVG داخل الزر — أبعاد صريحة لأن .nav-icon مصمّمة لخط أيقونات لا لـ SVG */
.navbar-vertical-aside.navbar-vertical-aside .nav-link.tayf-nav-cta .tayf-cta-icon {
    width: 20px;
    height: 20px;
    flex: none;
    display: block;
}

/* شريط تمرير القائمة */
.navbar-vertical-aside .navbar-vertical-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.18);
}

/* ================================ الهيدر ================================ */
#header.navbar,
.navbar-container.navbar-bordered {
    background-color: var(--tayf-nav-bg) !important;
    border-color: var(--tayf-nav-border) !important;
}

/* منطقة الشعار داخل الهيدر والقائمة */
.navbar-brand-wrapper {
    background-color: var(--tayf-nav-bg) !important;
    border-color: var(--tayf-nav-border) !important;
}

/* ---------------- أزرار الهيدر: دوائر داكنة + زر حساب ذهبي ----------------
   الأيقونات تصبح أزرارًا دائرية بخلفية داكنة فاتحة قليلًا عن الشريط، وبطاقة
   الحساب تصبح حبّة ذهبية مميّزة، مطابقةً للتصميم المعتمد. */
#header .navbar-nav-wrap-content-right .btn-icon,
#header .navbar-nav-wrap-content-right .btn-ghost-secondary {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.07) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease;
}

#header .navbar-nav-wrap-content-right .btn-icon:hover,
#header .navbar-nav-wrap-content-right .btn-ghost-secondary:hover {
    background-color: rgba(255, 255, 255, 0.14) !important;
}

/* أيقونات الهيدر بيضاء صريحة — القالب يلوّنها بلون داكن مناسب للخلفية
   البيضاء الأصلية، فتصير غير مقروءة على الشريط الأسود */
#header .navbar-nav-wrap-content-right .btn-icon,
#header .navbar-nav-wrap-content-right .btn-icon i,
#header .navbar-nav-wrap-content-right .btn-ghost-secondary,
#header .navbar-nav-wrap-content-right .btn-ghost-secondary i,
#header .navbar-nav-wrap-content-right .nav-link,
#header .navbar-nav-wrap-content-right .nav-link i {
    color: #ffffff !important;
}

/* أيقونتا اللغة والخروج تحملان الفئة nav-icon التي يعطيها القالب
   opacity: .7 — فتبدوان رماديتين رغم أن اللون أبيض. نعيد الشفافية للكامل. */
#header .navbar-nav-wrap-content-right .nav-icon,
#header .navbar-nav-wrap-content-right i {
    opacity: 1 !important;
}

#header .navbar-nav-wrap-content-right .btn-icon i,
#header .navbar-nav-wrap-content-right .btn-ghost-secondary i {
    font-size: 1.15rem;
}

/* قائمة البروفايل فوق كل شيء — ضمانة إضافية لو أنشأ عنصرٌ سياق تكديس جديدًا */
#header .hs-unfold-content,
#header .dropdown-menu,
#header .navbar-dropdown-menu {
    z-index: 1001 !important;
}

/* نقطة التنبيه الحمراء فوق الأيقونة */
#header .btn-status,
#header .btn-status-danger {
    background-color: #e11a2c !important;
    border-color: var(--tayf-nav-bg) !important;
    color: #ffffff !important;
}

/* ---------------- زر "حسابي" ----------------
   حبّة ذهبية بنص وأيقونة سوداء، تنقل مباشرة لشاشة إعدادات الحساب. */
#header .tayf-account-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background-color: var(--tayf-nav-active) !important;
    color: var(--tayf-nav-active-ink) !important;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    transition: filter 0.18s ease, transform 0.18s ease;
}

#header .tayf-account-btn:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    color: var(--tayf-nav-active-ink) !important;
}

#header .tayf-account-btn--static {
    cursor: default;
}

#header .tayf-account-btn--static:hover {
    filter: none;
    transform: none;
}

#header .tayf-account-btn-text {
    color: var(--tayf-nav-active-ink) !important;
}

#header .tayf-account-btn-icon {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--tayf-nav-active-ink);
}

/* بطاقة الحساب القديمة (إن بقيت في قوالب أخرى) — حبّة ذهبية عريضة بنص أسود */
#header .navbar-dropdown-account-wrapper {
    background-color: var(--tayf-nav-active) !important;
    border-radius: 999px !important;
    padding: 7px 10px 7px 20px !important;
    gap: 12px !important;
    min-width: 200px;
}

#header .navbar-dropdown-account-wrapper .media-body {
    display: block !important;
    min-width: 0;
}

#header .navbar-dropdown-account-wrapper:hover {
    filter: brightness(0.96);
}

/* كل نصوص البطاقة سوداء — بما فيها سطر الدور الصغير الذي كان فاتحًا فيختفي
   على الخلفية الذهبية */
#header .navbar-dropdown-account-wrapper,
#header .navbar-dropdown-account-wrapper .profile-name,
#header .navbar-dropdown-account-wrapper .media-body h5,
#header .navbar-dropdown-account-wrapper .media-body span,
#header .navbar-dropdown-account-wrapper .media-body span.fs-12,
#header .navbar-dropdown-account-wrapper::after {
    color: var(--tayf-nav-active-ink) !important;
}

#header .navbar-dropdown-account-wrapper .profile-name,
#header .navbar-dropdown-account-wrapper .media-body h5 {
    font-weight: 800 !important;
}

#header .navbar-dropdown-account-wrapper .avatar-img {
    border: 2px solid rgba(14, 14, 20, 0.15);
}

/* أيقونات الهيدر (الرسائل، الطلبات، اللغة) وزر طيّ القائمة */
#header .btn-ghost-secondary,
#header .btn-ghost-secondary i,
#header .nav-icon,
#header .js-navbar-vertical-aside-toggle-invoker,
#header .js-navbar-vertical-aside-toggle-invoker i {
    color: var(--tayf-nav-text) !important;
}

#header .btn-ghost-secondary:hover,
#header .btn-ghost-secondary:hover i {
    color: var(--tayf-nav-text-strong) !important;
    background-color: var(--tayf-nav-hover-bg) !important;
}

/* اسم المستخدم ودوره بجوار الصورة */
#header .profile-name,
#header .navbar-dropdown-account-wrapper .media-body h5,
#header .navbar-dropdown-account-wrapper .media-body span {
    color: var(--tayf-nav-text-strong) !important;
}

#header .navbar-dropdown-account-wrapper .media-body span.fs-12 {
    color: var(--tayf-nav-text) !important;
}

#header .dropdown-toggle::after {
    color: var(--tayf-nav-text) !important;
}

/* القوائم المنسدلة تبقى فاتحة — هي طبقة فوق الصفحة لا جزء من الشريط الأسود،
   وقلبها للأسود يجعل عناصرها غير مقروءة مع بقية تنسيقات القالب. */
#header .dropdown-menu,
#header .navbar-dropdown-menu {
    background-color: #ffffff !important;
}

#header .dropdown-menu .dropdown-item,
#header .navbar-dropdown-menu .dropdown-item,
#header .dropdown-item-text .card-title,
#header .dropdown-item-text .card-text {
    color: #1e2029 !important;
}

/* ============================================================================
   رمز الدرهم الإماراتي
   ============================================================================
   مضبوط على دليل هوية الرمز الرسمي:
     • الارتفاع يساوي ارتفاع النص  -> 1em لا قياس ثابت بالبكسل
     • مسافة كافية بين الرمز والرقم -> .28em (نحو ثلث عرض الرمز)
     • الحفاظ على النِّسب والشكل     -> viewBox ثابت وبلا تمديد
     • تباين لوني كافٍ              -> fill="currentColor" يرث لون النص
     • اتجاه الرمز يطابق اتجاه النص -> الكتلة LTR والرمز يسار الرقم دائمًا
   ============================================================================ */
.currency-symbol {
    width: 0.82em;
    height: 0.82em;
    display: inline-block;
    vertical-align: -0.06em;
    flex: none;
}

.currency-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28em;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.currency-amount .currency-symbol {
    align-self: center;
}

.currency-value {
    font-variant-numeric: tabular-nums;
}


/* ------------------------- مفاتيح التبديل في RTL ------------------------- */
/*
 * الثيم يضع المؤشّر بـ inset-inline-start (‏منطقي‏) ثم يزيحه عند
 * التحديد بـ translate3d(+X) (‏فيزيائي‏). في العربية يبدأ المؤشّر من
 * اليمين وتدفعه الإزاحة الموجبة يمينًا أكثر — فيخرج من إطار المفتاح.
 * نعكس اتجاه الإزاحة وحدها ليطابق اتجاه القراءة.
 */
[dir="rtl"] .toggle-switch-input:checked + .toggle-switch-label .toggle-switch-indicator {
    -webkit-transform: translate3d(-1.025rem, 50%, 0);
    transform: translate3d(-1.025rem, 50%, 0);
}

[dir="rtl"] .toggle-switch-sm .toggle-switch-input:checked + .toggle-switch-label .toggle-switch-indicator {
    -webkit-transform: translate3d(-.81094rem, 50%, 0);
    transform: translate3d(-.81094rem, 50%, 0);
}

/* عنوان قسم سلعة: شعار لا نصّ.
   الشفافية أعلى من بقيّة العناوين — الشعار شكل لا كلمة، وخفوته يجعله
   يختفي بدل أن يُقرأ. */
.navbar-vertical-aside .nav-subtitle--logo {
    display: block;
    padding-block: 2px;
    opacity: .72;
}

.navbar-vertical-aside .nav-subtitle--logo img {
    height: 18px;
    width: auto;
    display: block;
}

/* ==========================================================================
   طيّ مجموعات القائمة الجانبية
   ==========================================================================

   البنود إخوةٌ لعنوان المجموعة لا أبناءٌ له، فيُطوى كلّ بندٍ بصنفٍ عليه هو.
   وقاعدةُ إخوةٍ (`~`) كانت تبتلع المجموعة التالية بعنوانها معه. */
.navbar-vertical-content:not(.tayf-searching) li.tayf-collapsed {
    display: none !important;
}

/* في الوضع المضغوط تبقى الأيقونات ظاهرة: العناوين تصير نقاطًا لا تُقرأ،
   فطيُّ ما تحتها يترك القائمة نقاطًا بلا أبواب. */
body.navbar-vertical-aside-mini-mode .navbar-vertical-content li.tayf-collapsed {
    display: block !important;
}

.tayf-group-head {
    cursor: pointer;
    user-select: none;
}

.tayf-group-head .nav-subtitle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    transition: color .15s ease;
}

.tayf-group-caret {
    font-size: .7rem;
    opacity: .55;
    transition: transform .2s ease, opacity .15s ease;
}

.tayf-group-head.is-open .tayf-group-caret {
    transform: rotate(180deg);
    opacity: .9;
}

.tayf-group-head:hover .nav-subtitle,
.tayf-group-head:focus-visible .nav-subtitle {
    color: var(--tayf-nav-text-strong) !important;
}

/* **التركيز على الفعّالة**: المجموعة التي فيها الصفحة المفتوحة تُعلَّم بلون
   الإبراز وشريطٍ في طرفها، فتُعرف بلمحة لا بقراءة العناوين كلّها. */
/* البند المفتوح: شريطٌ في طرفه وخلفيةٌ خفيفة — «أنت هنا» بلمحة */
.tayf-current-item > .nav-link {
    background: rgba(255, 255, 255, .06);
    font-weight: 700;
    position: relative;
}

.tayf-current-item > .nav-link::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--tayf-accent, #ffc107);
}

.tayf-group-head.is-current .nav-subtitle {
    color: var(--tayf-nav-active) !important;
    font-weight: 700;
}

.tayf-group-head.is-current {
    position: relative;
    background-color: var(--tayf-nav-active-bg);
    border-radius: .35rem;
}

.tayf-group-head.is-current::before {
    content: "";
    position: absolute;
    inset-block: .35rem;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 2px;
    background-color: var(--tayf-nav-active);
}

/* النقاط البديلة للعنوان في الوضع المضغوط لا تُضغط ولا تُلوّن */
body.navbar-vertical-aside-mini-mode .tayf-group-head {
    cursor: default;
    background-color: transparent;
}

body.navbar-vertical-aside-mini-mode .tayf-group-caret {
    display: none;
}

/* ------------------------- أيقونة نقطة البيع في الشريط -------------------------
   صورةٌ بألوانها الأصلية **لا تتبع هوية المتجر** (طلب المالك 2026-09-21):
   أيقونات الشريط الأخرى حروفُ خطٍّ تأخذ لونها من `--tayf-nav-text`، وهذه
   `<img>` لا ترث لونًا أصلًا.

   والصورة دائرةٌ بذاتها، فهي الزرّ نفسه: تُنزع عنه الخلفية الشفّافة التي
   تتبدّل عند التحويم — وإلّا ظهرت حولها حلقةٌ باهتة تتغيّر. والحجم 42px
   كجاراتها فتصطفّ معها.

   والخصوصية أعلى من قواعد الشريط عمدًا (`a.` + الفئة): تلك بـ`!important`
   أيضًا، فالأعلى خصوصيةً هو الذي يحسم مهما كان ترتيب الملفّ. */
#header .navbar-nav-wrap-content-right a.tayf-pos-link,
#header .navbar-nav-wrap-content-right a.tayf-pos-link:hover,
#header .navbar-nav-wrap-content-right a.tayf-pos-link:focus,
#header .navbar-nav-wrap-content-right a.tayf-pos-link:active {
    background-color: transparent !important;
    padding: 0 !important;
    overflow: visible;
}

/* لا شيءَ يغيّر الصورة من خارجها: لا مرشّح ولا شفافية ولا مزج ولا تحويل */
#header .navbar-nav-wrap-content-right img.tayf-pos-icon {
    width: 42px !important;
    height: 42px !important;
    max-width: none !important;
    display: block;
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    transform: none !important;
    transition: none !important;
    pointer-events: none; /* النقر والتحويم على الرابط لا على الصورة */
    -webkit-user-drag: none;
    user-select: none;
}

/* ========================= شاشة نقطة البيع بعرض الشاشة =========================
   القائمة الجانبية تُخفى في شاشة البيع وحدها (طلب المالك 2026-09-21)، والعودة
   من أيقونة قُمرة القيادة في الشريط. العلامة `tayf-pos-fullscreen` على <body>
   تضعها الشاشة نفسها (`@section('body_class')`) فلا تمسّ شاشةً أخرى.

   والقالب يُزيح ثلاثة عناصر بعرض القائمة، وبثلاثة أوضاع (عاديّ ومصغّر ومضغوط):
   المحتوى `.main` والشريط `.navbar` والتذييل `.footer` — تُلغى الثلاثة.
   و`!important` لأنّ قواعد القالب أعلى خصوصيةً (حتى 0,3,0) ولا تحمله. */
body.tayf-pos-fullscreen .navbar-vertical-aside,
body.tayf-pos-fullscreen .navbar-vertical-aside-mobile-overlay,
body.tayf-pos-fullscreen .js-navbar-vertical-aside-toggle-invoker {
    display: none !important;
}

/* والشريط الأسود الذي يُرسم مكان القائمة قبل وصولها (`body::before` — «منع
   وميض ظهور/اختفاء القائمة» أعلى الملفّ) لا قائمة تغطّيه هنا، فكان يظهر
   عمودًا أسود بعرضها على حافّة الشاشة (كُشف برسم الصفحة الحيّة). */
body.tayf-pos-fullscreen::before {
    content: none !important;
}

body.tayf-pos-fullscreen .main {
    padding-inline-start: 0 !important;
}

body.tayf-pos-fullscreen .footer,
body.tayf-pos-fullscreen .navbar:not(.navbar-vertical) {
    margin-inline-start: 0 !important;
}

/* ============================ دوائر التصنيفات في البيع ============================
   التصنيفات ظاهرةً كلّها بدل قائمة منسدلة. ألوانها متغيّراتٌ تضعها الشاشة من
   هوية المتجر: غير المختارة بأسلوب الزرّ الثانويّ، والمختارة بالأساسيّ.

   والاسم في وسط الدائرة ويُقصّ على ثلاثة أسطر: «السيارات وقطع الغيار
   والملحقات» أطول من أن تسعه دائرة، والاسم كاملًا في `title`. */
.tayf-pos-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tayf-pos-cat {
    --pos-cat-size: 88px;
    width: var(--pos-cat-size);
    height: var(--pos-cat-size);
    flex: 0 0 var(--pos-cat-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    background: var(--pos-cat-bg, #e9ebee);
    color: var(--pos-cat-ink, #314555) !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tayf-pos-cat span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.tayf-pos-cat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.tayf-pos-cat:focus-visible {
    outline: 3px solid var(--pos-cat-active-bg, #2ed87b);
    outline-offset: 2px;
}

/* المختارة: لون الهوية الأساسيّ، وحلقةٌ بلونه تفصلها عن جاراتها */
.tayf-pos-cat.is-active {
    background: var(--pos-cat-active-bg, #2ed87b);
    color: var(--pos-cat-active-ink, #ffffff) !important;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--pos-cat-active-bg, #2ed87b);
}

/* الفروع تحت الرئيسيّ: أصغر، وبخطٍّ فاصل يربطها بأمّها بصريًّا */
.tayf-pos-subcats {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.tayf-pos-subcats .tayf-pos-cat {
    --pos-cat-size: 72px;
}

.tayf-pos-subcats .tayf-pos-cat span {
    font-size: 11px;
}

@media (max-width: 575.98px) {
    .tayf-pos-cat {
        --pos-cat-size: 72px;
    }

    .tayf-pos-subcats .tayf-pos-cat {
        --pos-cat-size: 62px;
    }
}

/* ============================== شريط نقطة البيع ==============================
   يحلّ محلّ محتوى الشريط في شاشة البيع (`_pos-header.blade.php`): اسم
   المستخدم وطريق العودة إلى قُمرة القيادة، ثمّ أدوات الكاشير في ثلاث مجموعات.
   ألوانه ثابتة بهوية طيف (الأسود والذهبيّ) كبقيّة الشريط، لا بهوية المتجر. */
/* ثلاثة أعمدة: [المستخدم] [الأدوات] [اللغة]. الطرفان متساويان (1fr) فتتوسّط
   الأدوات الشريطَ كلّه لا ما بقي منه (طلب المالك 2026-09-21). وفي الإنجليزية
   ينعكس الترتيب مع اتّجاه الصفحة تلقائيًّا. */
#header .tayf-pos-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
}

#header .tayf-pos-bar-start {
    justify-self: start;
}

#header .tayf-pos-tools {
    justify-self: center;
}

#header .tayf-pos-bar-end {
    justify-self: end;
    display: flex;
    align-items: center;
}

#header .tayf-pos-lang {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

#header .tayf-pos-lang:hover {
    background: rgba(255, 255, 255, 0.16);
}

#header .tayf-pos-lang:focus-visible {
    outline: 2px solid var(--tayf-nav-active);
    outline-offset: 2px;
}

#header .tayf-pos-bar-start {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* أيقونة العودة صورةٌ بألوان ثابتة كأيقونة نقطة البيع في الشريط العامّ */
#header .tayf-pos-bar-home {
    display: block;
    line-height: 0;
    border-radius: 50%;
}

#header .tayf-pos-bar-home img {
    width: 40px;
    height: 40px;
    display: block;
    filter: none !important;
    opacity: 1 !important;
}

#header .tayf-pos-bar-home:focus-visible {
    outline: 2px solid var(--tayf-nav-active);
    outline-offset: 2px;
}

#header .tayf-pos-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    min-width: 0;
}

#header .tayf-pos-user > i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-size: 1.1rem;
    opacity: 1 !important;
}

#header .tayf-pos-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

#header .tayf-pos-user-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

#header .tayf-pos-user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

/* ---------------------------------- الأدوات ---------------------------------- */
#header .tayf-pos-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

#header .tayf-pos-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#header .tayf-pos-tool i {
    font-size: 1.1rem;
    opacity: 1 !important;
    color: inherit !important;
}

#header .tayf-pos-tool:hover,
#header .tayf-pos-tool[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.15);
}

#header .tayf-pos-tool:focus-visible {
    outline: 2px solid var(--tayf-nav-active);
    outline-offset: 2px;
}

/* غلق الصندوق فعلُ نهاية الوردية: بذهبيّ طيف ليُرى ولا يُخلط بغيره */
#header .tayf-pos-tool.is-accent {
    background: rgba(248, 203, 37, 0.14);
    color: var(--tayf-nav-active) !important;
}

#header .tayf-pos-tool.is-accent:hover {
    background: rgba(248, 203, 37, 0.26);
}

#header .tayf-pos-tool.is-danger:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5 !important;
}

#header .tayf-pos-tools-sep {
    width: 1px;
    height: 24px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

/* ثمانية أزرار بنصوصها تحتاج ~900px: دون ذلك تبقى الأيقونات، والاسم في
   `title` يظهر عند الوقوف عليها */
@media (max-width: 1399.98px) {
    #header .tayf-pos-tool > span {
        display: none;
    }

    #header .tayf-pos-tool {
        width: 38px;
        padding: 0;
    }
}

@media (max-width: 767.98px) {
    #header .tayf-pos-user-role {
        display: none;
    }

    #header .tayf-pos-user-name {
        max-width: 110px;
    }

    #header .tayf-pos-tools {
        overflow-x: auto;
        scrollbar-width: none;
    }

    #header .tayf-pos-tools::-webkit-scrollbar {
        display: none;
    }
}

/* ------------------------------- الآلة الحاسبة -------------------------------
   نافذةٌ وسط الشاشة، كبيرةٌ بأزرارٍ دائرية، وفيها 00 و000 للمبالغ (طلب المالك
   2026-09-21). طبقةٌ خاصّة لا نافذة Bootstrap: خلفيّة Bootstrap تُلحق بـ<body>
   فوق كلّ سياق (§5 المزلق 6). وهي في جسم الصفحة (`.main` بلا z-index) فتعلو
   الشريط المثبَّت (99) بـz-index عاديّ. بألوان طيف لا بهوية المتجر. */
.tayf-calc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(14, 14, 20, 0.55);
}

.tayf-calc-overlay[hidden] {
    display: none;
}

.tayf-calc-card {
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(14, 14, 20, 0.35);
    outline: none;
}

.tayf-calc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 12px;
}

.tayf-calc-head h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #0e0e14;
}

.tayf-calc-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.tayf-calc-close:hover {
    background: #fecaca;
}

.tayf-calc-screen {
    margin: 0 22px 16px;
    padding: 14px 18px;
    background: #f7f8fa;
    border: 1px solid #eceef1;
    border-radius: 14px;
    text-align: right;
}

.tayf-calc-expr {
    min-height: 20px;
    font-size: 15px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tayf-calc-value {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    color: #0e0e14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.tayf-calc-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 22px 24px;
    background: #f7f8fa;
    border-radius: 0 0 20px 20px;
    justify-items: center;
}

.tayf-calc-keys button {
    width: 72px;
    height: 72px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #0e0e14;
    font-size: 26px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(14, 14, 20, 0.08);
    transition: background-color 0.12s ease, transform 0.06s ease;
}

.tayf-calc-keys button:hover {
    background: #f1f3f5;
}

.tayf-calc-keys button:active {
    transform: scale(0.94);
}

.tayf-calc-keys button:focus-visible {
    outline: 3px solid var(--tayf-nav-active);
    outline-offset: 2px;
}

.tayf-calc-keys .is-op {
    background: #e4e7eb;
}

.tayf-calc-keys .is-op:hover {
    background: #d8dce1;
}

.tayf-calc-keys .is-clear {
    background: var(--tayf-nav-active);
    color: #0e0e14;
}

.tayf-calc-keys .is-zeros {
    font-size: 21px;
}

/* «=» عريضٌ بعرض الصفّ في الأسفل: أكثر زرٍّ يُنقر فأكبرها هدفًا */
.tayf-calc-keys .is-eq {
    grid-column: 1 / -1;
    width: 100%;
    height: 64px;
    border-radius: 32px;
    background: #0e0e14;
    color: var(--tayf-nav-active);
    font-size: 30px;
}

.tayf-calc-keys .is-eq:hover {
    background: #22222c;
}

@media (max-width: 430px) {
    .tayf-calc-keys button {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    .tayf-calc-value {
        font-size: 34px;
    }
}

/* ======================= تخطيط شاشة البيع: فواتير ضيّقة =======================
   الفواتير بعرضٍ ثابت (420px) والمنتجات تأخذ الباقي، بدل تقسيم Bootstrap 7/5
   الذي كان يعطي الفواتير ~40% من الشاشة (طلب المالك 2026-09-21). العرض الثابت
   أصحّ من نسبةٍ أصغر: السلّة تحتاج مساحتها نفسها على كلّ شاشة، والمنتجات هي
   التي تستفيد من الشاشة الأعرض. ودون 992px يتكدّسان كما كانا. */
@media (min-width: 992px) {
    .tayf-pos-layout {
        flex-wrap: nowrap;
    }

    .tayf-pos-layout > .tayf-pos-products {
        flex: 1 1 0;
        max-width: none;
        min-width: 0;
    }

    .tayf-pos-layout > .tayf-pos-billing {
        flex: 0 0 420px;
        max-width: 420px;
    }
}

/* يبدأ من أعلى الشاشة: بلا العنوانين صار الفراغ فوق البطاقتين بلا معنى */
body.tayf-pos-fullscreen .content.container-fluid {
    padding-top: 12px !important;
}

/* إرشادٌ قبل اختيار الفرع — لا «لا بيانات»: الشاشة تنتظر اختيارًا */
.tayf-pos-pick-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    color: #64748b;
    text-align: center;
}

.tayf-pos-pick-hint i {
    font-size: 2.6rem;
    opacity: 0.45;
}

.tayf-pos-pick-hint p {
    font-size: 15px;
    font-weight: 600;
}

/* «أخرى» ليست فرعًا حقيقيًّا: حدٌّ متقطّع يفرّقها عن إخوتها */
.tayf-pos-cat.is-other:not(.is-active) {
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--pos-cat-bg, #e9ebee);
    border: 2px dashed var(--pos-cat-ink, #314555);
    opacity: 0.8;
}

/* التصنيفات في وسط قسم المنتجات (طلب المالك 2026-09-21) */
.tayf-pos-cats {
    justify-content: center;
}

/* =================== جدول السلّة داخل الفواتير الضيّقة (420px) ===================
   كان يتجاوز العرض فيُقصّ «السعر» ويختفي «الحذف» خلف تمرير أفقيّ: اسم الصنف
   بعرضٍ أدنى 120px فوق صورة 50px. الآن أعمدةٌ ثابتة للكمية والسعر والحذف،
   والصنف يأخذ الباقي ويقصّ اسمه (والاسم كاملًا في `title`). */
.tayf-pos-billing .pos-cart-table {
    overflow-x: visible;
}

.tayf-pos-billing .pos-cart-table table {
    table-layout: fixed;
    width: 100%;
}

.tayf-pos-billing .pos-cart-table th,
.tayf-pos-billing .pos-cart-table td {
    padding: 8px 6px !important;
    vertical-align: middle;
}

.tayf-pos-billing .pos-cart-table th:nth-child(2),
.tayf-pos-billing .pos-cart-table td:nth-child(2) {
    width: 62px;
}

.tayf-pos-billing .pos-cart-table th:nth-child(3),
.tayf-pos-billing .pos-cart-table td:nth-child(3) {
    width: 76px;
}

.tayf-pos-billing .pos-cart-table th:nth-child(4),
.tayf-pos-billing .pos-cart-table td:nth-child(4) {
    width: 46px;
}

.tayf-pos-billing .pos-cart-table .tayf-cart-item .media {
    min-width: 0;
}

.tayf-pos-billing .pos-cart-table .tayf-cart-item .media-body {
    min-width: 0;
}

.tayf-pos-billing .pos-cart-table .tayf-cart-item h5 {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tayf-pos-billing .pos-cart-table .tayf-cart-item small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tayf-pos-billing .pos-cart-table .qty {
    padding: 4px 2px;
    text-align: center;
    min-width: 0;
    height: 34px;
}

.tayf-pos-billing .pos-cart-table td:nth-child(4) .btn {
    padding: 4px 8px;
}

/* ================ قسم المنتجات: رأسٌ ثابت، والمنتجات وحدها تتمرّر ================
   البطاقة كانت بارتفاعٍ ثابت و`overflow-hidden`، وحاوية المنتجات بلا ارتفاعٍ
   محدود — فالمنتجات تُقصّ في الأسفل بلا تمرير. الآن البطاقة عمودٌ مرن: التصنيفات
   والبحث بارتفاعهما، والمنتجات تأخذ الباقي وتتمرّر (طلب المالك 2026-09-21).

   والارتفاع 100vh − 88px (الشريط 60 + فراغ أعلى 12 + أسفل 16)، للبطاقتين
   معًا فتتساويان. */
body.tayf-pos-fullscreen .tayf-pos-layout .card-h-100vh {
    height: calc(100vh - 88px) !important;
}

.tayf-pos-products > .card {
    display: flex;
    flex-direction: column;
}

.tayf-pos-products .tayf-pos-cats-wrap,
.tayf-pos-products .tayf-pos-search {
    flex: 0 0 auto;
}

.tayf-pos-products .tayf-pos-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 16px;
}

/* القالب يجعل الشبكة نفسها تتمرّر (`max-block-size:100%`) بلا ارتفاعٍ لأبيها —
   التمرير الآن للحاوية، فالشبكة تمتدّ بطولها */
.tayf-pos-products .tayf-pos-items .pos-item-wrap {
    max-block-size: none;
    overflow: visible;
    /* في الوسط (طلب المالك 2026-09-21): `auto-fill` في القالب يُبقي أعمدةً فارغة
       فتلتصق المنتجات القليلة بالحافّة. `auto-fit` يطوي الفارغة، والعرض الأقصى
       يمنع البطاقات من التمدّد لملئها، فتتوسّط الشبكة كلّها */
    grid-template-columns: repeat(auto-fit, minmax(150px, 170px));
    justify-content: center;
}

.tayf-pos-products > .card > .px-3 {
    flex: 0 0 auto;
    padding-block: 8px;
}

/* الإرشاد قبل اختيار الفرع يملأ الفراغ ويتوسّطه بدل أن يلتصق بالأسفل */
.tayf-pos-products .tayf-pos-pick-hint {
    flex: 1 1 auto;
}

/* ================================ العروض في البيع ================================
   دائرة «العروض» أوّل صفّ التصنيفات بذهبيّ طيف لتُرى قبل غيرها، وعدّادٌ عليها.
   وعلى البطاقة: شارة الخصم والسعر الأصليّ مشطوبًا (طلب المالك 2026-09-21). */
.tayf-pos-cat.is-offers {
    position: relative;
    flex-direction: column;
    gap: 2px;
    background: #fff7d6;
    color: #7a5d00 !important;
    box-shadow: inset 0 0 0 2px #f8cb25;
}

.tayf-pos-cat.is-offers i {
    font-size: 1.25rem;
}

.tayf-pos-cat.is-offers.is-active {
    background: #f8cb25;
    color: #0e0e14 !important;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #f8cb25;
}

.tayf-pos-cat-count {
    position: absolute;
    top: -2px;
    inset-inline-end: -2px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 24px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffffff;
}

.tayf-pos-discount-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 8px;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    direction: ltr;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.tayf-pos-old-price {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.2;
}


/* ============================ قسم الفواتير: تحسينات ============================ */

/* «حذف» بالإنجليزية أطول من العربية: 46px كانت تكسره «Dele|te» */
.tayf-pos-billing .pos-cart-table th:nth-child(4),
.tayf-pos-billing .pos-cart-table td:nth-child(4) {
    width: 58px;
}

/* الكلمات الطويلة في الدوائر تُقسَم بشَرطة لا وسط الكلمة («Organisatio|n») */
.tayf-pos-cat span {
    word-break: normal;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* حقل العميل أضيق وزرّ «+» بجانبه (طلب المالك 2026-09-21) */
.tayf-pos-customer .select2-container {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.tayf-pos-add-customer {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--tayf-nav-bg);
    color: var(--tayf-nav-active);
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.tayf-pos-add-customer:hover {
    background: #22222c;
}

.tayf-pos-add-customer:focus-visible {
    outline: 2px solid var(--tayf-nav-active);
    outline-offset: 2px;
}

/* ملاحظات على الطلب */
.tayf-pos-note label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.tayf-pos-note textarea {
    resize: vertical;
    min-height: 58px;
    font-size: 13px;
}

/* «المبلغ المدفوع» و«مبلغ التغيير» مخفيّان هنا ولا يُحذفان: الحقل المخفيّ
   `paid_amount` بقيمة الإجمالي هو ما يُسجَّل، وبه يُفعَّل «تأكيد الطلب».
   ينتقلان إلى الشاشة التالية (طلب المالك 2026-09-21). و`!important` لأنّ
   سكربت الدفع يُظهر القسم بـ`style="display:block"` مباشرةً. */
.tayf-pos-billing .tayf-pos-amounts {
    display: none !important;
}

/* الدفع برابط: ملاحظة «قيد الإعداد» تظهر حين يُختار وحده */
.tayf-pos-link-hint {
    display: none;
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7d6;
    color: #7a5d00;
    font-size: 12px;
    font-weight: 600;
}

.option-buttons:has(#pay-link:checked) + .tayf-pos-link-hint {
    display: block;
}

/* «العروض» (Flash Sale): أحمرُ الوقت المحدود، تمييزًا لها عن «الخصومات» الذهبية */
.tayf-pos-cat.is-flash {
    position: relative;
    flex-direction: column;
    gap: 2px;
    background: #fee2e2;
    color: #b91c1c !important;
    box-shadow: inset 0 0 0 2px #ef4444;
}

.tayf-pos-cat.is-flash i {
    font-size: 1.25rem;
}

.tayf-pos-cat.is-flash.is-active {
    background: #ef4444;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #ef4444;
}

.tayf-pos-flash-badge {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 8px;
    background: #0e0e14;
    color: #f8cb25;
    font-size: 11px;
    font-weight: 800;
}

/* ===================== قسم الفواتير: عميلٌ ثابت أعلى وأزرارٌ أسفل =====================
   يتمرّر ما بينهما وحده (طلب المالك 2026-09-21). الأزرار مثبّتة أصلًا بالقالب
   (`.pos-cart-bottom-btns { position:absolute; bottom:0 }` فوق البطاقة)، فيلزم
   هامشٌ سفليّ بقدرها — كان يحمله قسم «المبلغ المدفوع» (`pb-80`) الذي أُخفي. */
.tayf-pos-billing .tayf-pos-billing-scroll {
    padding-bottom: 160px !important; /* صفّا أزرار: حفظ/طباعة ثمّ إلغاء/تأكيد */
}

.tayf-pos-billing .tayf-pos-billing-scroll {
    padding-top: 12px !important;
}

/* يلتصق **فوق** حشوة الحاوية لا تحتها (`top` سالبٌ بقدرها): كانت الحشوة فوقه
   فجوةً تمرّ منها المنتجات عند التمرير (طلب المالك 2026-09-21). وخلفيّةٌ بيضاء
   تمتدّ فوقه وحوله فلا يظهر شيءٌ ممّا يمرّ خلفه. */
.tayf-pos-billing .tayf-pos-customer-box {
    position: sticky;
    top: -12px;
    z-index: 3;
    background: #ffffff !important;
    box-shadow: 0 -12px 0 8px #ffffff, 0 0 0 8px #ffffff, 0 10px 14px -10px rgba(15, 23, 42, 0.18);
}

/* الأزرار فوق خلفيّةٍ بيضاء كاملة فلا يظهر المحتوى المتمرّر من بينها */
.tayf-pos-billing .pos-cart-bottom-btns {
    z-index: 4;
}

/* أيقونة البحث في خانة البحث داخل قائمة العملاء المنسدلة، على طرفها الأيسر — حيث
   يُكتب (طلب المالك 2026-09-21). كانت على الحقل المغلق فبدت «مرتفعة» عن خانة الكتابة. */
.select2-search__field.tayf-pos-cust-search {
    padding-left: 34px !important;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat left 11px center !important;
}

/* طريقة الدفع في الوسط: عنوانها وأزرارها وملاحظة «رابط» (طلب المالك 2026-09-21) */
.tayf-pos-billing #order_place .option-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tayf-pos-billing #order_place .option-buttons li {
    margin: 0;
}

.tayf-pos-billing #order_place .mb-4 > .text-dark.d-flex {
    justify-content: center;
}

.tayf-pos-billing .tayf-pos-link-hint {
    text-align: center;
}

/* ================================ العرض باقةً ================================
   بطاقةٌ واحدة في وسط قسم المنتجات: اسم العرض وسعره ووقت انتهائه، ومنتجاته
   بصفر، وزرّ الإضافة. وفي السلّة: سطر العرض بشارة، ومنتجاته تحته أخفّ (2026-09-21). */
.tayf-pos-offer-wrap {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 16px;
}

.tayf-pos-offer {
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 0 0 2px #ef4444, 0 10px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.tayf-pos-offer.is-blocked {
    box-shadow: 0 0 0 2px #94a3b8, 0 10px 24px rgba(15, 23, 42, 0.06);
}

.tayf-pos-offer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fee2e2;
}

.tayf-pos-offer.is-blocked .tayf-pos-offer-head {
    background: #f1f5f9;
}

.tayf-pos-offer-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 auto;
}

.tayf-pos-offer-title {
    flex: 1 1 auto;
    min-width: 0;
}

.tayf-pos-offer-title h3 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.tayf-pos-offer-ends {
    font-size: 12px;
    color: #b91c1c;
}

.tayf-pos-offer-countdown {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

.tayf-pos-offer-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
}

.tayf-pos-offer-price del {
    font-size: 12px;
    color: #64748b;
}

.tayf-pos-offer-price strong {
    font-size: 20px;
    color: #b91c1c;
}

.tayf-pos-offer-items {
    list-style: none;
    margin: 0;
    padding: 8px 16px;
}

.tayf-pos-offer-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
}

.tayf-pos-offer-items li:last-child {
    border-bottom: 0;
}

.tayf-pos-offer-item-name small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.tayf-pos-offer-item-name em {
    display: block;
    color: #b91c1c;
    font-style: normal;
    font-size: 12px;
}

.tayf-pos-offer-items li.is-problem {
    background: #fef2f2;
}

.tayf-pos-offer-item-price {
    color: #94a3b8;
    flex: 0 0 auto;
}

.tayf-pos-offer-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 16px;
}

.tayf-pos-offer-add {
    background: #ef4444;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 999px;
    padding: 10px 28px;
}

.tayf-pos-offer-add:hover {
    background: #dc2626;
}

.tayf-pos-offer-problem {
    margin: 0;
    color: #b91c1c;
    font-weight: 600;
    text-align: center;
}

.tayf-cart-offer-badge {
    display: inline-block;
    margin-inline-end: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.tayf-pos-billing .pos-cart-table tr.tayf-cart-offer-item td {
    padding-top: 2px;
    padding-bottom: 2px;
    border-top: 0;
}

.tayf-pos-billing .pos-cart-table tr.tayf-cart-offer-item .tayf-cart-item h5 {
    font-weight: 400;
    font-size: 12px;
    color: #475569;
    padding-inline-start: 14px;
}

.tayf-pos-billing .pos-cart-table tr.tayf-cart-offer-item .tayf-cart-item small {
    padding-inline-start: 14px;
}

/* بطاقة العرض في نقطة البيع — كبطاقة المنتج، بإطارٍ أحمر العروض (2026-09-21) */
.tayf-pos-offer-card {
    cursor: pointer;
    box-shadow: 0 0 0 2px #ef4444;
}

.tayf-pos-offer-card.is-blocked {
    box-shadow: 0 0 0 2px #94a3b8;
    opacity: 0.8;
}

.tayf-pos-offer-card-icon {
    font-size: 2.6rem;
    color: #ef4444;
}

.tayf-pos-offer-card-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    direction: ltr;
}

.tayf-pos-offer-card-blocked {
    position: absolute;
    bottom: 8px;
    inset-inline: 8px;
    z-index: 2;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 11px;
    text-align: center;
}

#offer-cart-form .tayf-pos-offer-items {
    max-height: 40vh;
    overflow-y: auto;
}

/* رقم الطلب الجاري أعلى السلّة (2026-09-21) */
.tayf-pos-order-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #cbd5e1;
    font-size: 13px;
}

.tayf-pos-order-number b {
    color: #ffffff;
    font-size: 18px;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

/* صفّ «حفظ الطلب / طباعة» فوق «إلغاء / تأكيد» (2026-09-21) */
.tayf-pos-extra-btns .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
}

/* «المشتريات غير المنتهية»: عدّادٌ على الزرّ وصفوف الطلبات المعلَّقة (2026-09-21) */
.tayf-pos-tool-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.tayf-held-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid #eef2f7;
}

.tayf-held-row:last-child {
    border-bottom: 0;
}

.tayf-held-main {
    flex: 1 1 auto;
    min-width: 0;
}

.tayf-held-title {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 15px;
    color: #0f172a;
}

.tayf-held-meta,
.tayf-held-note {
    font-size: 12px;
    color: #64748b;
}

.tayf-held-total {
    font-weight: 700;
    white-space: nowrap;
}

.tayf-held-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

/* عنوان الطلب المعلَّق — أوّل ما تقع عليه العين في القائمة */
.tayf-held-label {
    display: inline-block;
    margin-bottom: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

/* بيانات العميل: العناوين في سطرٍ واحد بعرضٍ واحد («البريد الإلكتروني» كان ينكسر
   سطرين في 50px) — والقيمة الطويلة (البريد) تُقصّ بنقاط لا تكسر الصفّ (2026-09-21) */
.customer-details .tayf-pos-cust-label {
    min-width: 92px;
    white-space: nowrap;
}

.customer-details .pos-customer-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
}

/* ================= الباركود (2026-09-21) =================
   شريط البحث في نقطة البيع نصفان: الاسم والباركود — وعلى الشاشات الضيّقة فوق بعض */
.tayf-pos-search .tayf-pos-half {
    flex: 1 1 0;
    min-width: 0;
}

.tayf-pos-barcode {
    border-color: #0f172a !important;
}

.tayf-pos-barcode .form-control {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    letter-spacing: .12em;
}

@media (max-width: 767px) {
    .tayf-pos-search .tayf-pos-half {
        flex-basis: 100%;
    }
}

/* الرمز في قائمة المنتجات، وحقول تعديله */
.tayf-barcode-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
    letter-spacing: .06em;
    white-space: nowrap;
}

.tayf-barcode-input {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    letter-spacing: .1em;
}

/* نوافذ الكوبون والخصم: × كان مثبّتًا يمينًا (`style.css`) فغطّى العنوان في العربية —
   الآن على طرف السطر بحسب الاتّجاه، ولرأس النافذة مساحةٌ له (2026-09-21) */
.modal-custom-position .close {
    right: auto !important;
    inset-inline-end: 16px;
}

.modal-custom-position .modal-header {
    padding-inline-end: 56px;
}

/* رقم الطلب وبجانبه بلاطتا «كوبون» و«خصم» (طلب المالك 2026-09-22) */
.tayf-pos-order-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
}

.tayf-pos-order-row .tayf-pos-order-number {
    flex: 1 1 auto;
    margin-bottom: 0;
    min-width: 0;
}

.tayf-pos-tile {
    flex: 0 0 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.tayf-pos-tile i,
.tayf-pos-tile .tayf-pos-tile-glyph {
    font-size: 18px;
    line-height: 1;
}

.tayf-pos-tile:hover:not(:disabled) {
    background: #e2e8f0;
}

.tayf-pos-tile:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ================= نوافذ الصندوق والدفع (2026-09-22) — كلّ المحتوى في المنتصف ================= */
.tayf-pay-card {
    padding: 26px 26px 22px;
    border-radius: 20px;
    position: relative;
}

.tayf-pay-x {
    position: absolute;
    top: 14px;
    inset-inline-end: 16px;
}

.tayf-pay-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: #3730a3;
    font-size: 28px;
}

.tayf-pay-icon.is-ok {
    background: #dcfce7;
    color: #15803d;
}

.tayf-pay-total {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 14px;
}

.tayf-pay-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.tayf-pay-methods button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.tayf-pay-methods button i {
    font-size: 22px;
}

.tayf-pay-methods button.is-active {
    border-color: #1d4ed8;
    background: #eff6ff;
    color: #1d4ed8;
}

.tayf-pay-amount {
    height: 64px;
    font-size: 30px;
    font-weight: 800;
    text-align: center;
    border-radius: 14px;
}

.tayf-pay-suggest {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.tayf-pay-suggest button {
    height: 52px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 17px;
    font-weight: 700;
}

.tayf-pay-suggest button.is-active {
    border-color: #1d4ed8;
    background: #eff6ff;
}

.tayf-pay-suggest button.is-other {
    font-size: 14px;
    background: #f8fafc;
}

.tayf-pay-keypad {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.6fr;
    gap: 6px;
    margin-top: 12px;
}

.tayf-pay-keypad button {
    height: 54px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 20px;
    font-weight: 600;
}

.tayf-pay-keypad button.is-soft {
    font-size: 15px;
}

.tayf-pay-keypad button.is-pay {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    font-size: 15px;
}

.tayf-pay-keypad button.is-cancel {
    background: #f1f5f9;
    font-size: 15px;
}

.tayf-pay-change {
    margin-top: 10px;
    font-size: 16px;
    min-height: 24px;
}

.tayf-pay-soon {
    padding: 18px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    margin: 0;
}

.tayf-drawer-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 0 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
}

.tayf-drawer-line span {
    flex: 1 1 auto;
}

.tayf-drawer-line.is-grand {
    background: #f8fafc;
    font-size: 16px;
}

.tayf-drawer-line input {
    width: 18px;
    height: 18px;
}

/* اسم العميل في «طلباتي اليوم» (2026-09-22) */
.tayf-held-customer {
    font-size: 13px;
    color: #334155;
    margin: 2px 0;
}

/* إغلاق الصندوق: النقد المعدود من البيع، ورسالة العجز (2026-09-22) */
.tayf-drawer-line.is-count {
    cursor: default;
}

.tayf-drawer-line.is-count input {
    width: 140px;
    height: 38px;
    font-weight: 700;
    text-align: left;
}

.tayf-drawer-shortage {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-weight: 600;
}

.tayf-drawer-shortage .currency-symbol {
    fill: currentColor;
}

/* الإرجاع والاستبدال في نقطة البيع (2026-09-22) */
.tayf-rt-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.tayf-rt-head-info {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
}

.tayf-rt-history {
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.tayf-rt-lines td,
.tayf-rt-lines th {
    vertical-align: middle;
}

.tayf-rt-lines tr.is-picked {
    background: #eff6ff;
}

.tayf-rt-lines tr.is-done {
    opacity: .55;
}

.tayf-rt-lines input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.tayf-rt-qty {
    width: 80px;
    margin: 0 auto;
    text-align: center;
}

.tayf-rt-amount {
    max-width: 220px;
    font-weight: 700;
    text-align: left;
}

.tayf-rt-new {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.tayf-rt-suggest {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 20;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .12);
    max-height: 280px;
    overflow-y: auto;
}

.tayf-rt-suggest-item {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: none;
    text-align: start;
}

.tayf-rt-suggest-item:hover:not(:disabled) {
    background: #f8fafc;
}

.tayf-rt-suggest-item:disabled {
    opacity: .45;
}

.tayf-rt-suggest-item span:first-child {
    flex: 1 1 auto;
}

.tayf-rt-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 2;
}

.tayf-rt-diff {
    font-weight: 700;
    font-size: 17px;
}

.tayf-rt-diff.is-out {
    color: #b91c1c;
}

.tayf-rt-diff.is-in {
    color: #047857;
}

.tayf-rt-summary .currency-symbol,
.tayf-rt-suggest .currency-symbol {
    fill: currentColor;
}

/* أزرار القرار في الإرجاع: المختار ممتلئٌ بعلامة ✓ — كان المختار غير مقروء (2026-09-22) */
.tayf-rt-seg {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tayf-rt-seg label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 9px 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
}

.tayf-rt-seg label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tayf-rt-seg label i {
    display: none;
}

.tayf-rt-seg label.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.tayf-rt-seg label.is-active i {
    display: inline;
}

/* شاشات الإدارة: المرتجعات والاستبدال وحركات الصندوق */
.tayf-rp-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    height: 100%;
}

.tayf-rp-stat span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.tayf-rp-stat b {
    display: block;
    font-size: 20px;
    margin-top: 2px;
}

.tayf-rp-stat small {
    color: #047857;
}

.tayf-rp-stat.is-out b {
    color: #b91c1c;
}

.tayf-rp-stat.is-in b {
    color: #047857;
}

.tayf-rp-stat .currency-symbol {
    fill: currentColor;
}

.tayf-rp-stat b .currency-amount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* أحداث الوردية في «حركات الصندوق» (2026-09-22) */
.tayf-rp-events td {
    background: #f8fafc;
    white-space: normal;
}

.tayf-rp-event {
    padding: 8px 10px;
    border-bottom: 1px dashed #e2e8f0;
}

.tayf-rp-event:last-child {
    border-bottom: 0;
}

.tayf-rp-event .currency-amount {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* شاشة الإغلاق: كلّ ما حدث في الوردية (2026-09-22) */
.tayf-drawer-activity {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
}

.tayf-drawer-activity > div {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

/* حقل الهاتف في «إضافة عميل» بنقطة البيع: من اليسار إلى اليمين (2026-09-22).
   المكتبة ترى الصفحة عربية ([dir=rtl]) فتضع العلم يمينًا وتحشو الحقل من اليمين — يُعكس هنا. */
.tayf-phone-ltr .iti__flag-container {
    right: auto !important;
    left: 0 !important;
}

.tayf-phone-ltr .iti input.iti__tel-input,
.tayf-phone-ltr .iti input[type=tel] {
    direction: ltr;
    text-align: left;
    padding-right: 12px !important;
    padding-left: 104px !important;
}

.tayf-phone-ltr .iti__selected-flag {
    direction: ltr;
    padding: 0 8px 0 10px;
    border-radius: 6px 0 0 6px;
}

.tayf-phone-ltr .iti__arrow {
    margin-left: 6px;
    margin-right: 0;
}

.tayf-phone-ltr .iti__selected-dial-code {
    margin-left: 6px;
    margin-right: 0;
    font-size: 14px;
    font-weight: 600;
}

/* العلم: صورة SVG لكلّ دولة يضعها `js/tayf-flags.js` — وفي الحقل بعرضٍ ثابت */

.iti__selected-flag .iti__flag {
    width: 20px !important;
    min-width: 20px;
    flex: 0 0 20px;
    margin: 0 3px;
    transform: none;
}

/* نافذة فتح الصندوق: الخلفية ضبابية خلفها — لا بيع قبل فتحه (2026-09-22) */
#pos-drawer-open {
    background: rgba(15, 23, 42, .35);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
}

