        /* ملاحظة: كانت هناك قواعد .page-crumbs تحقن شارة مسار ثانية فوق
           الـtopbar. حُذفت — الـtopbar في كل صفحة يحوي .topbar-crumbs
           المرجعي مباشرة (forms.css)، ولا حاجة لنسخة مكرّرة. */

        .header-actions {
            order: 1;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        /* Meadows: إطار لافندر ناعم حول شعار المتجر داخل رأس الصفحة */
        .header-brand {
            order: 2;
            flex: 1 0 100%;
            display: flex;
            align-items: center;
            gap: 18px;
            min-width: 0;
            padding-top: 16px;
            border-top: 1px solid var(--border-main);
        }
        .header-logo-frame {
            width: 64px;
            height: 64px;
            border-radius: 12px;
            background: var(--bg-main);
            border: 1px solid var(--border-main);
            display: grid;
            place-items: center;
            padding: 6px;
            box-shadow: var(--shadow-sm);
            flex: none;
        }
        .header-logo-frame img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .notification-bell {
            position: relative;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 9px;
            border-radius: var(--control-radius);
            transition: background-color .2s ease, border-color .2s ease, color .2s ease;
            background: var(--surface-main);
            border: 1px solid var(--border-main);
        }

        .notification-bell:hover {
            background: color-mix(in srgb, var(--primary) 9%, transparent);
            border-color: color-mix(in srgb, var(--primary) 30%, transparent);
        }

        .notification-bell:active {
            background: color-mix(in srgb, var(--primary) 14%, transparent);
        }

        .notification-bell .bell-icon {
            width: 24px;
            height: 24px;
            transition: all 0.3s ease;
        }

        .notification-bell:hover .bell-icon {
            /* Meadows: لا رنين زخرفي — تغيّر خفيف فقط */
        }

        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            min-width: 18px;
            height: 18px;
            background: var(--danger);
            border-radius: 999px;
            display: none; /* Hidden by default */
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
            box-shadow: 0 4px 10px color-mix(in srgb, var(--danger) 30%, transparent);
            border: 2px solid var(--surface-main);
        }

         /* ===== لوحة «منتجات على وشك النفاذ» — مطابقة بصرياً لبطاقة الملف
            الشخصي (.mpc-menu): سطح معتم، حدّ ظاهر، زوايا 14px، وحركة دخول/خروج
            عبر opacity+transform تُفعَّل بتبديل صنف is-open (لا animation fadeIn).
            التخطيط الداخلي يتبع بنية mpc: رأس + فواصل + عناصر + تذييل-إجراء. */
         .notification-dropdown {
             display: flex; /* ثابتة؛ الإخفاء/الإظهار عبر visibility/class */
             position: absolute;
             top: calc(100% + 10px);
             /* الجرس يجلس على يسار الشاشة (RTL: الإجراءات في نهاية الترويسة)،
                فإذا ارتكزنا على inset-inline-start (right) يتمدّد اللوحة يساراً
                خارج الشاشة. نرتكز على inset-inline-end (left) لتُفتح باتجاه
                المحتوى وتبقى مرئية بالكامل. */
             inset-inline-end: 0;
             width: 288px;
             max-width: calc(100vw - 2rem);
             background: var(--surface-solid);
             border: 1px solid var(--border-main);
             border-radius: 14px;
             box-shadow: var(--shadow-lg);
             z-index: var(--z-dropdown);
             max-height: min(460px, 70vh);
             overflow: hidden;
             flex-direction: column;
             padding: 8px;
             opacity: 0;
             visibility: hidden;
             transform: translateY(-8px) scale(.96);
             transform-origin: top right;
             pointer-events: none;
             transition: opacity .18s cubic-bezier(.16, 1, .3, 1),
                         transform .18s cubic-bezier(.16, 1, .3, 1),
                         visibility 0s linear .18s;
         }
         [dir="rtl"] .notification-dropdown { transform-origin: top left; }
         .notification-dropdown.is-open {
             opacity: 1;
             visibility: visible;
             transform: translateY(0) scale(1);
             pointer-events: auto;
             transition: opacity .18s cubic-bezier(.16, 1, .3, 1),
                         transform .18s cubic-bezier(.16, 1, .3, 1),
                         visibility 0s linear 0s;
         }

         /* ---- رأس اللوحة (مثل .mpc-head): أيقونة مربّعة + عنوان + عنوان فرعي ---- */
         .notification-dropdown-header {
             display: flex;
             align-items: center;
             gap: 12px;
             flex-shrink: 0;
             padding: 6px 6px 12px;
             background: transparent;
         }
         .notification-dropdown-icon {
             position: relative;
             flex-shrink: 0;
             width: 44px; height: 44px;
             border-radius: 12px;
             display: grid; place-items: center;
             color: color-mix(in srgb, var(--warning) 72%, var(--text-title));
             background: color-mix(in srgb, var(--warning) 24%, var(--surface-solid));
             box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
         }
         .notification-dropdown-titles { display: flex; flex-direction: column; min-width: 0; }
         .notification-dropdown-title {
             font-size: 14px; font-weight: 700;
             line-height: 1.2;
             color: var(--text-title);
         }
         .notification-dropdown-sub {
             font-size: 12px; margin-top: 2px;
             color: var(--text-secondary);
         }

         /* فاصل بين أقسام اللوحة (مثل .mpc-sep) */
         .nt-sep { height: 1px; background: var(--border-main); margin: 4px 0; flex: none; }

         /* ===== قائمة العناصر (تُسل في وسط البطاقة) — بتباعد mpc ===== */
         .notification-items {
             flex: 1 1 auto; min-height: 0;
             overflow-y: auto;
             padding: 4px 0;
             display: flex; flex-direction: column;
             gap: 2px;
         }
         .notification-item {
             display: flex; align-items: center; gap: 12px;
             padding: 9px 10px;
             border-radius: 10px;
             position: relative;
             background: transparent;
             cursor: pointer;
             transition: background-color .15s ease;
         }
         .notification-item:hover,
         .notification-item:focus-visible {
             background: var(--surface-hover);
             outline: none;
         }

         .notification-item-thumb {
             position: relative;
             flex-shrink: 0;
             width: 40px; height: 40px;
             border-radius: 11px;
             overflow: hidden;
             display: grid; place-items: center;
             box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
         }
         .notification-item-thumb.t-purple {
             color: var(--primary);
             background: color-mix(in srgb, var(--primary) 18%, var(--surface-solid));
         }
         .notification-item-thumb.t-accent {
             color: var(--accent-hover);
             background: color-mix(in srgb, var(--accent) 30%, var(--surface-solid));
         }
         .notification-item-thumb .nt-icon {
             position: absolute; inset: 0; margin: auto;
             width: 20px; height: 20px;
         }
         .notification-item-img {
             position: absolute; inset: 0;
             width: 100%; height: 100%;
             object-fit: cover;
         }

         .notification-item-body { flex: 1 1 auto; min-width: 0; }
         .notification-item-name {
             font-size: 13px; font-weight: 600;
             color: var(--text-title);
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
         }
         .notification-item-meta {
             display: flex; align-items: center; gap: 6px;
             margin-top: 3px; font-size: 11px;
         }
         .notification-item-tag {
             display: inline-flex; align-items: center; gap: 4px;
             padding: 1px 8px;
             background: color-mix(in srgb, var(--danger) 16%, transparent);
             color: var(--notification-warning-text);
             font-size: 10px; font-weight: 700;
             border-radius: 999px; white-space: nowrap;
         }
         .notification-item-tag::before {
             content: ''; width: 5px; height: 5px;
             background: currentColor; border-radius: 50%;
         }
         .notification-item-sep { color: var(--border-main); }
         .notification-item-type {
             color: var(--text-secondary); font-weight: 500;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
         }
         .notification-item-right { flex-shrink: 0; display: flex; align-items: center; }
         .notification-item-count {
             min-width: 34px; height: 28px; padding: 0 9px;
             background: color-mix(in srgb, var(--danger) 18%, var(--surface-solid));
             color: var(--notification-warning-text);
             border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
             border-radius: 9px;
             font-size: 12.5px; font-weight: 800;
             font-variant-numeric: tabular-nums;
             display: inline-flex; align-items: center; justify-content: center;
         }

         /* حالة فارغة */
         .notification-empty {
             padding: 26px 16px; text-align: center;
             color: var(--text-secondary);
         }
         .notification-empty .ne-icon {
             width: 46px; height: 46px; margin: 0 auto 10px;
             border-radius: 50%;
             display: grid; place-items: center;
             background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid));
             color: var(--accent-hover);
         }
         .notification-empty .ne-title {
             font-size: 12.5px; font-weight: 600;
             color: var(--text-main); margin-bottom: 3px;
         }
         .notification-empty .ne-sub { font-size: 11px; opacity: .85; }

         /* ===== التذييل: إجراء كامل العرض بأسلوب .mpc-item (أيقونة + نص + سهم) ===== */
         .notification-dropdown-footer {
             flex-shrink: 0;
             padding: 0;
             background: transparent;
             border-top: none;
         }
         .notification-dropdown-link {
             font: inherit; font-family: inherit;
             width: 100%;
             display: flex; align-items: center; gap: 12px;
             padding: 9px 10px;
             border: none;
             background: transparent;
             border-radius: 10px;
             color: var(--text-title);
             font-size: 13.5px; font-weight: 600;
             cursor: pointer;
             text-align: start;
             transition: background-color .15s ease, color .15s ease;
         }
         .notification-dropdown-link:hover { background: var(--surface-hover); color: var(--primary); }
         .notification-dropdown-link .nt-lead { color: var(--text-secondary); flex: none; }
         .notification-dropdown-link .nt-link-main { flex: 1; min-width: 0; }
         .notification-dropdown-link:hover .nt-lead { color: var(--primary); }
         .nt-arrow { transition: transform .15s ease, color .15s ease; color: var(--text-secondary); flex: none; }
         .notification-dropdown-link:hover .nt-arrow { transform: translateX(-3px); color: var(--primary); }

        .search-box {
            display: flex;
            align-items: center;
            background: var(--surface-main);
            border: 1px solid var(--border-main);
            border-radius: var(--control-radius);
            padding: 9px 14px;
            gap: 10px;
            width: 220px; /* تصغير إضافي لعرض حقل البحث */
            transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
        }

        .search-box:focus-within {
            border-color: color-mix(in srgb, var(--primary) 50%, transparent);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
            background: var(--surface-main);
        }

        .search-box input {
            border: none;
            outline: none;
            background: transparent;
            flex: 1;
            font-size: 13px;
        }

        /* أزرار Modernize (.btn + المتغيرات + ‎.btn-sm) انتقلت إلى components.css
           (الطبقة الكنسية). القواعد هنا حُذفت لتفادي التكرار. */

        #notesPage .header-actions {
            flex-wrap: wrap;
        }

        .stats-tabs {
            display: flex;
            gap: 12px;
            margin-bottom: 32px;
            flex-wrap: wrap;
        }

        .stat-tab {
            background: var(--surface-main);
            padding: 9px 16px;
            border-radius: 999px;
            border: 1px solid var(--border-main);
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: background-color .2s ease, border-color .2s ease, color .2s ease;
            color: var(--text-main);
        }

        .stat-tab:hover {
            border-color: color-mix(in srgb, var(--primary) 40%, transparent);
            color: var(--primary);
        }

        .stat-tab.active {
            background: var(--primary);
            color: var(--text-light) !important;
            border-color: transparent;
            box-shadow: none;
        }

        .stat-tab[data-status="new"].active {
            background-color: var(--info-text);
            color: #ffffff !important;
            border-color: var(--info-text);
        }
        .stat-tab[data-status="ready"].active {
            background-color: var(--success-text);
            color: #ffffff !important;
            border-color: var(--success-text);
        }
        .stat-tab[data-status="delivering"].active {
            background-color: var(--delivering-text);
            color: #ffffff !important;
            border-color: var(--delivering-text);
        }
        .stat-tab[data-status="completed"].active {
            background-color: var(--completed-text);
            color: #ffffff !important;
            border-color: var(--completed-text);
        }
        .stat-tab[data-status="collected"].active {
            background-color: var(--collected-text);
            color: #ffffff !important;
            border-color: var(--collected-text);
        }
        .stat-tab[data-status="cancelled"].active {
            background-color: var(--cancelled-text);
            color: #ffffff !important;
            border-color: var(--cancelled-text);
        }
        .stat-tab[data-status="pending"].active {
            background-color: var(--pending-text);
            color: #ffffff !important;
            border-color: var(--pending-text);
        }
        .stat-tab[data-status="review"].active {
            background-color: var(--review-text);
            color: #ffffff !important;
            border-color: var(--review-text);
        }

        .stat-count {
            background: color-mix(in srgb, var(--text-title) 8%, transparent);
            padding: 1px 8px;
            border-radius: var(--control-radius);
            font-size: 11px;
            font-weight: 700;
            font-family: var(--app-mono-family);
            font-variant-numeric: tabular-nums;
        }

        .stat-tab.active .stat-count {
            background: rgba(255,255,255,0.18);
            color: inherit;
        }

        .orders-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 24px;
        }
        
        /* Hide grid view when list view is active */
        .orders-list ~ .orders-grid,
        .orders-list.orders-grid {
            display: none;
        }
        
        /* Hide list view when grid view is active */
        .orders-grid ~ .orders-list,
        .orders-grid.orders-list {
            display: none;
        }

        .orders-list {
            display: block;
            /* سطح صلب دائماً (--surface-solid) لا شفاف: جداول الطلبات سطح محتوى
               رئيسي كالبطاقات، فلا يجب أن تتبع شفافية البطاقات (--surface-main
               التي تُعاد كـ rgba) وإلا صارت «فاتحة» وغير بيضاء عند ضبط صورة
               خلفية/شفافية. مطابق لما يفعله الوضع الليلي. */
            background: var(--surface-solid);
            border-radius: var(--pane-radius);
            border: none;
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .orders-list table {
            width: 100%;
            border-collapse: collapse;
            font-size: var(--table-font-size);
        }

        .orders-list thead {
            background: var(--table-header-bg);
            color: var(--table-header-text);
        }

.orders-list thead th {
    padding: var(--table-header-padding);
    text-align: right;
    font-weight: 600;
    font-size: 13px;
    border: none;
    white-space: nowrap;
    color: var(--text-title);
}

.orders-list tbody tr {
    border-bottom: 1px solid var(--table-row-border);
    transition: background-color .18s ease;
    /* صفوف صلبة (--table-row-solid) لا تتبع شفافية البطاقات، كي يبقى الجدول
       أبيض ناصعاً ومتّسقاً مع البطاقات وخلفية الـ wrapper الصلبة. */
    background-color: var(--table-row-solid);
}
/* Modernize: صفوف مخطّطة ناعمة (#EAEFF4 = $table-striped-bg) — تناوب هادئ
    لا يخلق ضوضاء لأنه يقتصر على الأشرطة الزوجية على أرضية بيضاء. */
.orders-list tbody tr:nth-child(even) {
    background-color: var(--table-row-alt-bg);
}

.orders-list tbody tr:hover {
    background: var(--table-row-hover-bg);
}

.orders-list tbody tr:last-child {
    border-bottom: none;
}

.orders-list tbody td {
    padding: 14px 14px;
    text-align: right;
    color: var(--text-main);
    vertical-align: middle;
    font-size: 13.5px;
    /* خط الثيم نفسه في الجدول (Plus Jakarta Sans + Cairo) — يطابق جداول الثيم
       التي تستخدم خط الـ sans في كل شيء بلا monospace. */
    font-family: var(--app-font-family);
}

        .orders-list .order-id-cell {
            font-family: var(--app-font-family);
            font-weight: 700;
            color: var(--text-title);
            min-width: 100px;
            font-variant-numeric: tabular-nums;
        }

        .orders-list .customer-cell {
            min-width: 120px;
        }

        .orders-list .status-cell {
            min-width: 100px;
        }

        .orders-list .price-cell {
            font-weight: 600;
            color: var(--text-title);
            font-variant-numeric: tabular-nums;
            min-width: 80px;
        }

        .orders-list .actions-cell {
            min-width: 150px;
        }

        .orders-list .actions-cell .btn-sm {
            margin: 2px;
            font-size: 10px;
            padding: 6px 10px;
        }

        /* Responsive styles for list view */
        @media (max-width: 768px) {
            .orders-list {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            
            .orders-list table {
                min-width: 600px;
                font-size: 11px;
            }
            
            .orders-list thead th {
                padding: 10px 6px;
                font-size: 10px;
            }
            
            .orders-list tbody td {
                padding: 8px 6px;
                font-size: 11px;
            }
        }

        @media (max-width: 480px) {
            .orders-list table {
                min-width: 500px;
                font-size: 10px;
            }
            
            .orders-list thead th {
                padding: 8px 4px;
                font-size: 9px;
            }
            
            .orders-list tbody td {
                padding: 6px 4px;
                font-size: 10px;
            }
            
            .orders-list .actions-cell .btn-sm {
                font-size: 9px;
                padding: 4px 8px;
            }
        }
        
        /* Platform badge specific styles for advertising campaigns */
        .orders-grid .status-badge {
            width: auto;
            min-width: fit-content;
            max-width: 100%;
            text-align: center;
            font-size: 11px;
            padding: 6px 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.4;
            border-radius: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        /* Table view platform badge adjustments */
        .movements-table .status-badge {
            width: auto;
            min-width: fit-content;
            max-width: 150px;
            text-align: center;
            font-size: 10px;
            padding: 4px 10px;
            display: inline-block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.4;
        }
        
        /* Campaign name adjustments for table view */
        .campaign-name {
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 600;
            color: var(--text-title);
        }
        
        /* Responsive adjustments for platform badges */
        @media (max-width: 768px) {
            .orders-grid .status-badge {
                font-size: 10px;
                padding: 5px 12px;
            }
            
            .movements-table .status-badge {
                font-size: 9px;
                padding: 3px 6px;
                max-width: 100px;
            }
            
            .campaign-name {
                max-width: 120px;
            }
        }
        
        @media (max-width: 480px) {
            .orders-grid .status-badge {
                font-size: 9px;
                padding: 4px 10px;
            }
            
            .movements-table .status-badge {
                font-size: 9px;
                padding: 2px 4px;
                max-width: 80px;
            }
            
            .campaign-name {
                max-width: 80px;
            }
        }

        .order-card {
            background: var(--surface-main);
            border-radius: var(--pane-radius);
            padding: 22px;
            border: 1px solid var(--border-main);
            transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
            display: flex;
            flex-direction: column;
            box-shadow: none;
            position: relative;
            overflow: hidden;
        }

        .order-card::before {
            content: none;
        }

        .order-card:hover {
            border-color: color-mix(in srgb, var(--primary) 40%, transparent);
            background: color-mix(in srgb, var(--primary) 3%, transparent);
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .order-card:hover::before {
            opacity: 0;
        }

        .clickable-card {
            cursor: pointer;
        }

        .clickable-card:active {
            transform: none;
        }

        /* Enhanced clickable order card styles */
        .clickable-order-card {
            cursor: pointer;
            user-select: none;
        }

        .clickable-order-card:hover {
            border-color: color-mix(in srgb, var(--primary) 45%, transparent);
            background: color-mix(in srgb, var(--primary) 4%, transparent);
        }

        .clickable-order-card:hover::before {
            opacity: 0;
        }

        .clickable-order-card:active {
            background: color-mix(in srgb, var(--primary) 7%, transparent);
        }

        .clickable-order-card .order-header {
            transition: color .2s ease;
        }

        .clickable-order-card:hover .order-header {
            color: var(--primary);
        }

        /* Order clickable rows and cards styles */
        .orders-list tbody tr {
            cursor: pointer;
            transition: background-color .2s ease;
        }

        .orders-list tbody tr:hover {
            background: var(--table-row-hover-bg) !important;
        }

        .orders-list tbody tr:active {
            background: color-mix(in srgb, var(--primary) 6%, var(--table-row-hover-bg));
        }

        /* Order details modal styles */
        .order-details-content {
            max-height: 70vh;
            overflow-y: auto;
        }

        .order-details-section {
            margin-bottom: 24px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border-main);
        }

        .order-details-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .order-details-title {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-title);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .order-details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .order-detail-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .order-detail-label {
            font-size: 11px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .order-detail-value {
            font-size: 13px;
            color: var(--text-main);
            font-weight: 600;
        }

        .order-products-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .order-product-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: var(--bg-main);
            border-radius: 8px;
            border: 1px solid var(--border-main);
        }

        .order-product-name {
            font-weight: 600;
            color: var(--text-title);
        }

        .order-product-details {
            font-size: 11px;
            color: var(--text-secondary);
        }

        .order-product-price {
            font-weight: 700;
            color: var(--primary);
        }

        .order-customer-notes {
            background: var(--customer-notes-bg);
            padding: 12px;
            border-radius: 8px;
            color: var(--customer-notes-text);
            font-size: 13px;
            line-height: 1.5;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .order-details-actions {
            display: flex;
            gap: 12px;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid var(--border-main);
        }

        .order-details-actions .btn {
            flex: 1;
            font-weight: 600;
        }

        /* Responsive adjustments for order details modal */
        @media (max-width: 768px) {
            .order-details-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .order-details-actions {
                flex-direction: column;
            }

            .order-details-actions .btn {
                width: 100%;
            }
        }

        .order-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-main);
        }

        .order-id {
            font-size: 19px;
            font-weight: 700;
            color: var(--text-title);
            letter-spacing: -0.3px;
        }

        .status-badge {
            /* Modernize badge ($badge-*): padding 5px 10px، radius 4px، وزن خفيف.
               font 12px مناسب لكثافة الجداول مع الحفاظ على روح المصدر. */
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 400;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            min-width: fit-content;
            width: auto;
            line-height: 1.4;
        }

        .status-new { background: var(--info-bg); color: var(--info-text); }
        .status-ready { background: var(--success-bg); color: var(--success-text); }
        .status-delivering { background: var(--delivering-bg); color: var(--delivering-text); }
        .status-completed { background: var(--completed-bg); color: var(--completed-text); }
        .status-collected { background: var(--collected-bg); color: var(--collected-text); }
        .status-cancelled { background: var(--cancelled-bg); color: var(--cancelled-text); }
        .status-pending { background: var(--pending-bg); color: var(--pending-text); }
        .status-review { background: var(--review-bg); color: var(--review-text); }

        /* شارات الحالات في الوضع الليلي: تُرث لون النص المناسب من المتغيّرات الداكنة */

        .order-info {
            margin-bottom: 20px;
            flex: 1;
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            color: var(--text-secondary);
            font-size: 13px;
            padding: 4px 0;
        }

        .order-price {
            font-size: 23px;
            font-weight: 700;
            color: var(--text-title);
            margin-bottom: 20px;
            padding-top: 16px;
            border-top: 1px solid var(--border-main);
        }

        .order-actions {
            display: flex;
            gap: 8px;
            margin-top: auto;
            padding-top: 16px;
            border-top: 1px solid var(--border-main);
            flex-wrap: wrap;
        }

        /* Status dropdown — Meadows pill ناعم بلا تكبير */
        .status-select-dropdown {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='292.4' height='292.4' viewBox='0 0 292.4 292.4'%3e%3cpath fill='%23ffffff' d='M287 69.4a17.6 17.6 0 0 0-13.2-5.4H18.2c-5 0-9.3 1.8-13.2 5.4A17.6 17.6 0 0 0 0 82.6c0 4.8 1.8 9.3 5.4 13.2l128 127.9c3.9 3.9 8.4 5.7 13.2 5.7s9.3-1.8 13.2-5.7l128-127.9c3.6-3.9 5.4-8.4 5.4-13.2 0-4.8-1.8-9.3-5.4-13.2z'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: left 0.7em top 50%;
            background-size: 0.65em auto;
            padding-right: 2.2em;
            transition: background-color .2s ease, box-shadow .2s ease;
        }

        .status-select-dropdown:hover {
            background-color: var(--primary-hover);
        }

        .status-select-dropdown:focus {
            outline: none;
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
        }

        /* Custom dropdown arrow */
        .status-select-dropdown::-ms-expand {
            display: none;
        }

        .status-select-dropdown::-webkit-scrollbar {
            width: 6px;
        }

        .status-select-dropdown::-webkit-scrollbar-track {
            background: transparent;
        }

        .status-select-dropdown::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.3);
            border-radius: 3px;
        }

        /* Table view dropdown adjustments */
        .orders-list .status-select-dropdown {
            font-size: 10px;
            padding: 4px 10px;
            min-width: 100px;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .status-select-dropdown {
                font-size: 10px;
                padding: 5px 12px;
            }
        }

        @media (max-width: 480px) {
            .status-select-dropdown {
                font-size: 9px;
                padding: 4px 8px;
                min-width: 80px;
            }
        }

        .order-actions .btn {
            flex: 1;
            min-width: 80px;
            font-size: 11px;
            padding: 8px 12px;
            margin: 2px;
        }

        /* ‎.btn-sm انتقل إلى components.css. */

        .qty-stepper {
            display: flex;
            align-items: stretch;
            background: var(--surface-main);
            border: 1px solid var(--border-main);
            border-radius: 25px;
            overflow: hidden;
            flex-shrink: 0;
        }

        .qty-step-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 10px 16px;
            font-size: 19px;
            font-weight: 700;
            line-height: 1;
            color: var(--primary);
            min-width: 42px;
            transition: background-color 0.2s, color 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .qty-step-btn:hover {
            background: var(--primary);
            color: var(--text-light);
        }

        .qty-step-btn:active {
            transform: scale(0.95);
        }

        .qty-step-input {
            width: 60px;
            text-align: center;
            border: none;
            border-left: 1px solid var(--border-main);
            border-right: 1px solid var(--border-main);
            background: var(--surface-solid);
            color: var(--text-main);
            font-size: 15px;
            font-weight: 600;
        }

        .qty-step-input:focus {
            outline: none;
        }

        /* Hide native number spinners */
        .qty-step-input::-webkit-outer-spin-button,
        .qty-step-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .qty-step-input[type=number] {
            -moz-appearance: textfield;
        }

        .btn-sm:hover {
            /* ‎.btn-sm:hover انتقل إلى components.css. */
        }

        /* أزرار واتساب: إظهار لون الـ Hover عند التمرير (يتجاوز الـ inline) */
        .wa-action-btn:hover {
            background: var(--wa-hover, #1da851) !important;
        }

         /* ‎.btn-success/warning/danger/info انتقلت إلى components.css. */

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            z-index: var(--z-mobile-sheet);
            align-items: center;
            justify-content: center;
            animation: fadeIn .3s ease;
        }

        .modal-content {
            /* العتامة مضمونة بطبقتين: --modal-base لون صلب في الأسفل لا يصله
               أي ثيم محفوظ، وسطح الثيم يُطلى فوقه كصورة خلفية. حتى لو وصلت
               قيمة شفّافة إلى --surface-solid (ثيم قديم تسرّبت إليه قيمة
               مشتقّة من شفافية البطاقات) تبقى البطاقة مُعتِمة. */
            background-color: var(--modal-base);
            background-image: linear-gradient(var(--surface-solid), var(--surface-solid));
            padding: 28px;
            border-radius: var(--control-radius);
            width: 90%;
            max-width: 520px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-lg);
            animation: fadeIn .24s ease;
            /* Modernize: border-width 0 — الارتفاع عبر الظل وحده (لا بطاقة شبحية
               بحدّ + ظل معاً). */
            border: none;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-main);
        }

        .modal-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--text-title);
            letter-spacing: -0.01em;
        }

        .close-btn {
            background: var(--bg-main);
            border: 1px solid transparent;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            color: var(--text-secondary);
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color .2s ease, color .2s ease, border-color .2s ease;
        }

        .close-btn:hover {
            background: color-mix(in srgb, var(--danger) 12%, transparent);
            color: var(--danger);
            border-color: color-mix(in srgb, var(--danger) 28%, transparent);
        }

        /* حقول الإدخال (.form-group/.form-label/.form-input + select/textarea/
           .searchable-input) انتقلت إلى components.css. أُسقطت 7 أنماط Meadows
           ميتة (modern/minimal/neumorphic/glass/colorful/outlined/pill). */
        .dropdown-list {
            max-height: 250px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--primary) transparent;
        }

        .dropdown-list::-webkit-scrollbar {
            width: 6px;
        }

        .dropdown-list::-webkit-scrollbar-track {
            background: transparent;
        }

        .dropdown-list::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 3px;
            transition: background 0.3s ease;
        }

        .dropdown-list::-webkit-scrollbar-thumb:hover {
            background: var(--primary-hover);
        }

        .dropdown-list {
            border: 1px solid var(--border-main);
            border-top: none;
            border-radius: 0 0 var(--control-radius) var(--control-radius);
            box-shadow: var(--shadow-md);
            background: var(--surface-solid);
            margin-top: -1px;
        }

/* ============================================================
   Meadows legacy restoration — 1 light-mode rules
   restored from HEAD main.css. Translated to Meadows tokens.
   ============================================================ */

.customer-row:hover,
        .product-row:hover,
        .production-cost-row:hover,
        .notes-row:hover {
background-color: var(--surface-hover, rgba(0, 0, 0, 0.05));
}

/* ============================================================
   كثافة المودال على الجوال (≤768px)
   ============================================================
   المودال يأخذ 90% من العرض افتراضياً، لكن padding الداخلي 28px وحدّ
   radius 24px كان يلتهم المساحة على شاشة 5". التقليص:
   - padding: 28px → 16px
   - max-width: 520px → لا تغيير (الـwidth:90% هو الذي يحكم على الجوال)
   - modal-header margin-bottom: 24px → 12px + padding-bottom: 16px → 10px
   - modal-title font: 20px → 17px
   - close-btn: 34×34 → 30×30 (دائرة الإغلاق)
   - border-radius: var(--control-radius) (7px) → 12px (أخفّ من 24 الأصلي)
   - .order-card padding 22px → 14px + margins الداخلية 20/16px → 12/10px
   الشاشات الأصغر (≤420px): padding 16 → 12، border-radius 12 → 10. */
@media (max-width: 768px) {
    .modal-content { padding: 16px; border-radius: 12px; }
    .modal-header { margin-bottom: 12px; padding-bottom: 10px; }
    .modal-title { font-size: 17px; }
    .close-btn { width: 30px; height: 30px; font-size: 18px; }

    /* بطاقة الطلب في صفحة التقارير (تختلف عن .oc-card في orders-cards.css) */
    .order-card { padding: 14px; }
    .order-header { margin-bottom: 12px; padding-bottom: 10px; }
    .order-price { font-size: 19px; margin-bottom: 12px; padding-top: 10px; }
    .order-info { margin-bottom: 12px; }
    .order-actions { padding-top: 10px; gap: 6px; }
    .info-item { gap: 8px; margin-bottom: 6px; padding: 2px 0; font-size: 12.5px; }
    .order-actions .btn { font-size: 10.5px; padding: 6px 10px; min-width: 70px; }
}
@media (max-width: 420px) {
    .modal-content { padding: 12px; border-radius: 10px; }
    .order-card { padding: 12px; }
}

