/* ============================================================================
   صفحة الحملات الإعلانية — مطابقة تامة لصفحة الطلبات (orders-cards.css)
   البادئة .ac-* معزولة (Ac = Advertising Campaign) عن .oc-* (Orders Cards).
   لون «الهوية» لكل بطاقة هو المنصة (--ac-band) بدل حالة الطلب. بقية التوكنز
   والبنية والشريط (.ot-*) مطابقة لصفحة الطلبات كي تبدو الصفحتان منتجاً واحداً.
   ============================================================================ */

/* ===== الشبكة: مطابقة لـ .oc-grid ===== */
.ac-grid {
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 14px;
}

/* ===== البطاقة (مرآة .oc-card) ===== */
.ac-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface-solid);
    border: none;
    --ac-r-big: 40px;
    --ac-r: 16px;
    border-start-end-radius: var(--ac-r-big);
    border-start-start-radius: var(--ac-r);
    border-end-start-radius: var(--ac-r);
    border-end-end-radius: var(--ac-r);
    padding: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow 0.22s ease;
}
.ac-card:hover {
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px color-mix(in srgb, var(--ac-band, var(--primary)) 32%, transparent),
        0 18px 40px -14px color-mix(in srgb, var(--ac-band, var(--primary)) 48%, transparent);
}
.clickable-ac-card {
    cursor: pointer;
    user-select: none;
}
.clickable-ac-card:hover {
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px color-mix(in srgb, var(--ac-band, var(--primary)) 32%, transparent),
        0 18px 40px -14px color-mix(in srgb, var(--ac-band, var(--primary)) 48%, transparent);
    transform: none;
}
.clickable-ac-card:active {
    transform: none;
}

/* هوية المنصة: chip المنصة وهالة hover تستخدمان --ac-band. ألوان مشبعة قابلة
   للقراءة فوق --surface-solid، ومرافقة خفيفة --ac-band-bg للرقاقة. */
.ac-card[data-platform='Facebook'] {
    --ac-band: #1877f2;
    --ac-band-bg: var(--platform-facebook-bg);
}
.ac-card[data-platform='Instagram'] {
    --ac-band: #e1306c;
    --ac-band-bg: var(--platform-instagram-bg);
}
.ac-card[data-platform='Website'] {
    --ac-band: #16a34a;
    --ac-band-bg: var(--platform-website-bg);
}
.ac-card[data-platform='Tiktok'] {
    --ac-band: #6d28d9;
    --ac-band-bg: var(--platform-tiktok-bg);
}
.ac-card[data-platform='Other'] {
    --ac-band: #4f46e5;
    --ac-band-bg: var(--platform-other-bg);
}

/* ===== الرأس: اسم الحملة + تاريخ + chip المنصة ===== */
.ac-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-inline-start: 10px;
}
.ac-id {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: -0.01em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ac-id-meta {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}
.ac-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    color: var(--text-title);
    background: color-mix(in srgb, var(--ac-band, var(--primary)) 24%, var(--surface-solid));
    white-space: nowrap;
}
.ac-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ac-band, var(--primary));
}
.ac-top .ac-chip {
    padding: 4px 9px;
    font-size: 11px;
    gap: 5px;
}
.ac-top .ac-chip::before {
    width: 5px;
    height: 5px;
}
/* modifiers المنصة للرقاقة (خارج سياق البطاقة، مثل الجدول) */
.ac-chip.s-Facebook {
    --ac-band: #1877f2;
}
.ac-chip.s-Instagram {
    --ac-band: #e1306c;
}
.ac-chip.s-Website {
    --ac-band: #16a34a;
}
.ac-chip.s-Tiktok {
    --ac-band: #6d28d9;
}
.ac-chip.s-Other {
    --ac-band: #4f46e5;
}

/* ===== سطر الربحية (مرآة .oc-name) ===== */
.ac-name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
    padding-inline-start: 10px;
}
.ac-profit-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1;
}
.ac-profit-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.ac-profit-badge.is-profit {
    color: var(--ready-text, var(--success));
    background: var(--ready-bg, var(--success-bg));
}
.ac-profit-badge.is-profit::before {
    background: var(--ready-text, var(--success));
}
.ac-profit-badge.is-loss {
    color: var(--danger);
    background: var(--danger-bg);
}
.ac-profit-badge.is-loss::before {
    background: var(--danger);
}

/* ===== صفوف المعلومات (مرآة .oc-rows / .oc-row) ===== */
.ac-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding-inline-start: 10px;
}
.ac-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-main);
    min-width: 0;
}
.ac-row .ico {
    width: 14px;
    flex-shrink: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ac-row .ico svg {
    width: 14px;
    height: 14px;
}
.ac-row .value {
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-row .value.num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.ac-row .value.muted {
    color: var(--text-secondary);
}
.ac-row .cur {
    color: var(--text-muted);
    font-size: 10px;
    margin-inline-start: 1px;
}
.ac-sep {
    color: var(--text-muted);
    margin: 0 1px;
    font-size: 10px;
}
.ac-date-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ===== الملاحظات (مرآة .oc-notes) ===== */
.ac-notes {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 8px 0 2px 10px;
    padding: 8px 10px;
    background: var(--surface-hover);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 11.5px;
    color: var(--text-main);
    line-height: 1.5;
}
.ac-notes .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 5px;
    flex-shrink: 0;
}

/* ===== التذييل: صافي الربح + زر التعديل (مرآة .oc-foot) ===== */
.ac-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-main);
}
.ac-total-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ac-total-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.ac-total-val {
    font-family: var(--app-font-family);
    font-size: 24px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}
.ac-total-val.is-profit {
    color: var(--ready-text, var(--success));
}
.ac-total-val.is-loss {
    color: var(--danger);
}
.ac-total-val .cur {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-inline-start: 2px;
}
.ac-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* ============================================================================
   عرض القائمة (الجدول) — مطابق لصفحة الطلبات: شريط منصة بارز + رأس مكتوب
   بأحرف متباعدة + فواصل رفيعة + أرقام tabular + hover ناعم. محصور بـ #advertisingPage.
   ============================================================================ */
#advertisingPage .ads-list {
    border-radius: var(--pane-radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--surface-solid);
}
#advertisingPage .ads-list table {
    table-layout: fixed;
    width: 100%;
    min-width: 640px;
}
#advertisingPage .ads-list thead th {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-title);
    background: var(--table-header-bg);
    padding: var(--table-header-padding);
    border-bottom: 1px solid var(--table-header-border);
    /* محاذاة الرأس مع محتوى الخلايا (بداية السطر في RTL): الافتراضي للمتصفح
       توسيط th فلا يجيء اسم العمود فوق محتواه — مرآة .orders-list في layout.css. */
    text-align: right;
    white-space: nowrap;
}
#advertisingPage .ads-list tbody td {
    padding: var(--table-cell-padding);
    font-size: 13.5px;
    border-bottom: 1px solid var(--table-row-border);
    color: var(--table-row-text, var(--text-main));
    vertical-align: middle;
}
#advertisingPage .ads-list tbody tr {
    border-bottom: none;
}
#advertisingPage .ads-list tbody tr:nth-child(even) {
    background: var(--table-row-alt-bg, transparent);
}
#advertisingPage .ads-list tbody tr:hover {
    background: var(--table-row-hover-bg);
}

/* خلية اسم الحملة */
#advertisingPage .ads-list .ac-name-cell {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--text-title);
    padding-inline-start: 16px;
}
#advertisingPage .ads-list .ac-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
#advertisingPage .ads-list .ac-id-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
/* شريط المنصة المدمج بجوار اسم الحملة (مرآة .oc-band) */
.ac-band {
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--primary);
}
.ac-band.s-Facebook {
    background: #1877f2;
}
.ac-band.s-Instagram {
    background: #e1306c;
}
.ac-band.s-Website {
    background: #16a34a;
}
.ac-band.s-Tiktok {
    background: #6d28d9;
}
.ac-band.s-Other {
    background: #4f46e5;
}

/* خلية المنصة */
#advertisingPage .ads-list .platform-cell {
    white-space: nowrap;
}
#advertisingPage .ads-list .platform-cell .ac-chip {
    margin-inline-start: 0;
    font-weight: 700;
    font-size: 11px;
    gap: 5px;
    padding: 4px 9px;
    background: color-mix(in srgb, var(--ac-band, var(--primary)) 28%, var(--surface-solid));
}
#advertisingPage .ads-list .platform-cell .ac-chip::before {
    width: 5px;
    height: 5px;
}

/* خلايا الأرقام */
#advertisingPage .ads-list .price-cell,
#advertisingPage .ads-list .profit-cell {
    font-weight: 700;
    color: var(--text-title);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
#advertisingPage .ads-list .profit-cell.is-profit {
    color: var(--ready-text, var(--success));
}
#advertisingPage .ads-list .profit-cell.is-loss {
    color: var(--danger);
}
#advertisingPage .ads-list .num-cell {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    white-space: nowrap;
}
#advertisingPage .ads-list .notes-cell {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ===== الصفوف القابلة للتوسيع (design-5، مرآة .ot-main / .ot-detail) ===== */
#advertisingPage .ads-list .ac-main {
    cursor: pointer;
}
#advertisingPage .ads-list .ot-toggle-th[aria-label='توسيع'] {
    width: 48px;
}
.ot-toggle-cell {
    width: 48px;
}
.ot-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        transform 0.2s ease,
        color 0.15s ease;
}
.ot-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-title);
}
.ot-toggle.is-open {
    transform: rotate(90deg);
    color: var(--primary);
}
.ot-detail {
    display: none;
}
.ot-detail.is-open {
    display: table-row;
}
.ot-detail > td {
    padding: 0 !important;
    border-bottom: 1px solid var(--table-row-border) !important;
}
.ac-detail-inner {
    padding: 16px 18px;
    background: var(--table-row-alt-bg, var(--surface-hover));
}
.ac-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px 18px;
    margin-bottom: 14px;
}
.ac-dt-item {
    min-width: 0;
}
.ac-dt-lbl {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.ac-dt-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-title);
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ac-dt-val .cur {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}
.ac-dt-val.is-profit {
    color: var(--ready-text, var(--success));
}
.ac-dt-val.is-loss {
    color: var(--danger);
}
.ac-dt-sub {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}
.ac-dt-item--note {
    grid-column: 1 / -1;
}
.ac-dt-item--note .ac-dt-val {
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.6;
    padding: 8px 10px;
    background: var(--surface-hover);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}
.ac-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

/* ============================================================================
   شريط الأدوات v2 — مطابق لصفحة الطلبات. القواعد العامة (.ot-view-menu /
   .ot-view-item / ...) غير مقيّدة بصفحة في orders-cards.css فتعمل هنا مباشرة؛
   نعيد تقييد عناصر الزناد تحت #advertisingPage فقط.
   ============================================================================ */
#advertisingPage .ads-toolbar-v2 {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}
#advertisingPage .ot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- حقل البحث الذكي (Dock) --- */
#advertisingPage .ot-search {
    flex: 1 1 320px;
    min-width: 280px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 12px 0 14px;
    background: color-mix(in srgb, var(--bg-main) 70%, var(--surface-solid));
    border: 1px solid var(--border-main);
    border-radius: 10px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}
#advertisingPage .ot-search:hover,
#advertisingPage .ot-search:focus-within {
    background: color-mix(in srgb, var(--bg-main) 70%, var(--surface-solid));
    border-color: var(--border-main);
}
#advertisingPage .ot-search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex: 0 0 18px;
}
#advertisingPage .ot-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--text-title);
    padding: 0;
}
#advertisingPage .ot-search input::placeholder {
    color: var(--text-secondary);
}

/* Dock مطوي/موسّع — مطابق لصفحة الطلبات */
#advertisingPage .ot-search[data-collapsed='true'] {
    flex: 0 0 42px;
    min-width: 42px;
    width: 42px;
    padding: 0;
    gap: 0;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    border-radius: 999px;
    transition:
        flex-basis 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        min-width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        padding 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-radius 0.25s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
#advertisingPage .ot-search[data-collapsed='true']:hover {
    background: color-mix(in srgb, var(--bg-main) 70%, var(--surface-solid));
    border-color: var(--border-main);
    color: var(--text-title);
}
#advertisingPage .ot-search .ot-search-trigger {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: inherit;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}
#advertisingPage .ot-search[data-collapsed='false'] .ot-search-trigger {
    pointer-events: none;
}
#advertisingPage .ot-search[data-collapsed='true'] #adsSearchInput {
    width: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}
#advertisingPage .ot-search[data-collapsed='false'] {
    flex: 0 0 300px;
    min-width: 260px;
    max-width: 360px;
    width: auto;
    padding: 0 16px 0 18px;
    justify-content: flex-start;
    cursor: text;
    border-radius: 999px;
    transition:
        flex-basis 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        min-width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        padding 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-radius 0.25s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
#advertisingPage .ot-search[data-collapsed='false'] #adsSearchInput {
    width: auto;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease 0.1s;
}
#advertisingPage .ot-search .ot-search-icon {
    transition: transform 0.25s ease;
}
#advertisingPage .ot-search .ot-search-clear {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 26px;
    padding: 0;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}
#advertisingPage .ot-search .ot-search-clear svg {
    width: 14px;
    height: 14px;
}
#advertisingPage .ot-search .ot-search-clear:hover {
    background: color-mix(in srgb, var(--text-title) 8%, transparent);
    color: var(--text-title);
}
#advertisingPage .ot-search .ot-search-clear:active {
    transform: scale(0.92);
}
#advertisingPage .ot-search[data-collapsed='false'] .ot-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}
#advertisingPage .ot-search[data-collapsed='false'] .ot-search-clear.is-visible {
    display: inline-flex;
}
@media (prefers-reduced-motion: reduce) {
    #advertisingPage .ot-search,
    #advertisingPage .ot-search[data-collapsed='true'],
    #advertisingPage .ot-search[data-collapsed='false'],
    #advertisingPage .ot-search .ot-search-icon,
    #advertisingPage .ot-search #adsSearchInput {
        transition: none !important;
    }
}

/* --- زر الفلاتر + الزر العام --- */
#advertisingPage .ot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-main);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-main) 70%, var(--surface-solid));
    color: var(--text-title);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
    white-space: nowrap;
}
#advertisingPage .ot-btn:hover {
    background: var(--surface-hover);
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border-main));
}
#advertisingPage .ot-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
#advertisingPage .ot-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex: 0 0 16px;
}
#advertisingPage .ot-btn[aria-expanded='true'] {
    background: color-mix(in srgb, var(--primary) 10%, var(--surface-main));
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border-main));
    color: var(--primary);
}
#advertisingPage .ot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-family: var(--app-mono-family);
}
/* display:inline-flex أعلاه يطغى على [hidden] الافتراضي — الصفر لا شارة له
   إطلاقاً، والشارة الفارغة لا تُرسم حتى لو فُقدت hidden (مرآة الطلبات). */
#advertisingPage .ot-badge[hidden] {
    display: none !important;
}
#advertisingPage .ot-badge:empty {
    display: none !important;
}
#advertisingPage .ot-btn-filter {
    width: 42px;
    padding: 0;
    flex: 0 0 42px;
    justify-content: center;
    border-radius: 999px;
    position: relative;
}
#advertisingPage .ot-btn-filter:hover {
    background: color-mix(in srgb, var(--bg-main) 70%, var(--surface-solid));
    border-color: var(--border-main);
    color: var(--text-title);
}
#advertisingPage .ot-btn-filter .ot-badge {
    position: absolute;
    top: -5px;
    inset-inline-start: -5px;
}

/* --- قائمة العرض (Dropdown trigger) --- */
#advertisingPage .ot-view-wrap {
    position: relative;
}
#advertisingPage .ot-view-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 42px;
    padding: 0 12px;
    min-width: 168px;
    background: color-mix(in srgb, var(--bg-main) 70%, var(--surface-solid));
    border: 1px solid var(--border-main);
    border-radius: 999px;
    color: var(--text-title);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
#advertisingPage .ot-view-trigger:hover {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border-main));
}
#advertisingPage .ot-view-trigger[aria-expanded='true'] {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}
#advertisingPage .ot-view-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
#advertisingPage .ot-view-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#advertisingPage .ot-view-left svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    stroke-width: 2;
    flex: 0 0 16px;
}
/* زر طريقة العرض الأيقوني فقط (#adsViewTrigger) */
#advertisingPage #adsViewTrigger {
    justify-content: center;
    gap: 0;
    width: 42px;
    min-width: 0;
    padding: 0;
    flex: 0 0 42px;
    border-radius: 999px;
}
#advertisingPage #adsViewTrigger .ot-view-left {
    justify-content: center;
    gap: 0;
}
#advertisingPage #adsViewTrigger .ot-view-left svg {
    color: inherit;
}
#advertisingPage #adsViewTrigger:hover {
    background: var(--surface-hover);
}
#advertisingPage #adsViewTrigger[aria-expanded='true'] {
    background: color-mix(in srgb, var(--primary) 10%, var(--surface-main));
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border-main));
    color: var(--primary);
    box-shadow: none;
}

/* زر «الأعمدة» (#adsColTrigger): أيقونة دائرية (42×42) مطابقة لزر الفلترة/
   العرض — بلا نص ظاهر ولا سهم (التسمية sr-only للوصولية). */
#advertisingPage #adsColTrigger {
    justify-content: center;
    gap: 0;
    width: 42px;
    min-width: 0;
    padding: 0;
    flex: 0 0 42px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
}
#advertisingPage #adsColTrigger .ot-view-left {
    justify-content: center;
    gap: 0;
}

/* --- قائمة الأعمدة (إظهار/إخفاء) --- */
#advertisingPage .ot-col-wrap {
    position: relative;
}
#advertisingPage .ot-col-menu .ot-col-item {
    gap: 9px;
}
#advertisingPage .ot-col-menu .ot-col-box {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1.5px solid var(--border-main, #d4d4d4);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-solid, #fff);
    color: #fff;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}
#advertisingPage .ot-col-menu .ot-col-item.active .ot-col-box {
    background: var(--primary, #6b5dd3);
    border-color: var(--primary, #6b5dd3);
}
#advertisingPage .ot-col-menu .ot-col-box svg {
    width: 12px;
    height: 12px;
}
#advertisingPage .ot-col-menu .ot-col-label {
    flex: 1 1 auto;
}

/* --- الفلاتر النشطة كـ chips --- */
#advertisingPage .ot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
#advertisingPage .ot-chips[hidden] {
    display: none;
}
.ot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 10px;
    background: var(--surface-solid);
    border: 1px solid var(--border-main);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-title);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.04));
}
.ot-chip-ico {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    flex: 0 0 14px;
}
.ot-chip-label {
    color: var(--text-secondary);
    font-weight: 600;
}
.ot-chip-op {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--surface-hover);
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
}
.ot-chip-op svg {
    width: 10px;
    height: 10px;
}
.ot-chip-val {
    font-weight: 700;
    color: var(--text-title);
}
.ot-chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}
.ot-chip-x:hover {
    background: var(--danger-bg);
    color: var(--danger);
}
.ot-chip-x svg {
    width: 12px;
    height: 12px;
}

/* --- الكثافة — ثلاث درجات بمرآة صفحة الطلبات: مريح · متوسط · مضغوط --- */
#advertisingPage .ads-grid.ot-density-medium .ac-card {
    padding: 13px 16px 12px;
}
#advertisingPage .ads-grid.ot-density-compact .ac-card {
    padding: 8px 11px 7px;
}
/* الكثافة تمسّ صفوف البيانات فقط — الترويسة ثابتة دائماً بحجم الافتراضي. */
#advertisingPage .ads-list.ot-density-medium tbody td {
    padding: 10px 14px;
}
#advertisingPage .ads-list.ot-density-compact tbody td {
    padding: 5px 10px;
    font-size: 12.5px;
}

/* ============================================================================
   popover الفلاتر (نمط shadcn) — قائمة أوامر قابلة للبحث + منظر قيم.
   مشابه لـ .otf-popover في صفحة الطلبات لكن ببادئة .acf- مستقلة.
   ============================================================================ */
.acf-popover {
    position: fixed;
    width: 320px;
    max-width: calc(100vw - 16px);
    max-height: 420px;
    display: flex;
    flex-direction: column;
    background: var(--surface-solid, #fff);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-popover);
    overflow: hidden;
    animation: acf-in 0.12s ease-out;
}
.acf-popover[hidden] {
    display: none;
}
@keyframes acf-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.acf-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
}
.acf-search svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex: 0 0 16px;
}
.acf-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    color: var(--text-title);
    padding: 0;
}
.acf-search input::placeholder {
    color: var(--text-secondary);
}
.acf-list {
    overflow-y: auto;
    padding: 6px;
    flex: 1;
}
.acf-group-label {
    padding: 8px 10px 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.acf-cmd {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-title);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: start;
    transition: background-color 0.12s ease;
}
.acf-cmd:hover {
    background: var(--surface-hover);
}
.acf-cmd-ico {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex: 0 0 16px;
}
.acf-cmd-label {
    flex: 1;
}
.acf-cmd-chev {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}
.acf-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.acf-back:hover {
    color: var(--text-title);
}
.acf-value-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 10px;
    border-bottom: 1px solid var(--border-light);
}
.acf-value-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-title);
}
.acf-options {
    padding: 6px;
    overflow-y: auto;
    flex: 1;
}
.acf-opt {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-title);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: start;
    transition: background-color 0.12s ease;
}
.acf-opt:hover {
    background: var(--surface-hover);
}
.acf-opt-box {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1.5px solid var(--border-main, #d4d4d4);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-solid, #fff);
    color: #fff;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}
.acf-opt.active .acf-opt-box {
    background: var(--primary, #6b5dd3);
    border-color: var(--primary, #6b5dd3);
}
.acf-opt-box svg {
    width: 12px;
    height: 12px;
}
.acf-opt-label {
    flex: 1;
}
.acf-range {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.acf-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.acf-range-row label {
    font-size: 12px;
    color: var(--text-secondary);
    width: 36px;
    flex-shrink: 0;
}
.acf-range-row input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    background: var(--surface-solid);
    color: var(--text-title);
    font: inherit;
    font-size: 13px;
    outline: none;
}
.acf-range-row input:focus {
    border-color: var(--primary);
}
.acf-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-light);
}
.acf-reset {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
}
.acf-reset:hover {
    background: var(--surface-hover);
    color: var(--text-title);
}

/* ============================================================================
   الجوال — مطابق لصفحة الطلبات
   ============================================================================ */
@media (max-width: 768px) {
    .ac-grid {
        gap: 10px;
    }
    .ac-card {
        padding: 12px;
        --ac-r-big: 30px;
        --ac-r: 14px;
    }
    .ac-id {
        font-size: 13px;
    }
    .ac-foot {
        flex-wrap: nowrap;
        gap: 10px;
        margin-top: 10px;
        padding-top: 10px;
    }
    .ac-total-block {
        min-width: 0;
        flex: 1 1 auto;
    }
    .ac-total-val {
        white-space: nowrap;
    }
    .ac-actions {
        flex: 0 0 auto;
    }
    #advertisingPage .ads-toolbar-v2 {
        gap: 8px;
    }
    /* إخفاء أعمدة ثانوية على الجوال */
    #advertisingPage .ads-list .col-startDate,
    #advertisingPage .ads-list .col-endDate,
    #advertisingPage .ads-list .col-notes,
    #advertisingPage .ads-list .col-actions {
        display: none;
    }
}
@media (max-width: 420px) {
    .ac-card {
        padding: 10px;
        --ac-r-big: 24px;
        --ac-r: 12px;
    }
    #advertisingPage .ads-list .col-orders {
        display: none;
    }
}

/* ===== منتقي فترة الحملة (مودال إضافة/تعديل حملة) =====
   نفس تصميم منتقي نطاق التاريخ في الصفحة الرئيسية: شبكة ‎.cal وأزرار
   ‎.cal-day ونافذة ‎.range-pop تأخذ أنماطها من forms.css — هنا فقط
   موضعها داخل المودال وشكل حقلّي التاريخ. */
.cal-range-host { position: relative; }

/* حقلّا البدء/الانتهاء بهيئة باقي حقول المودال (مرآة ‎.ao-field-wrap):
   كبسولة بحواف دائرية وحدّ 1.5px يتحوّل إلى ‎--primary عند التركيز/الفتح */
.cal-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: start;
    background: var(--surface-solid);
    border: 1.5px solid var(--border-main);
    border-radius: 22px;
    padding: 11px 14px;
    color: var(--text-title);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease;
}
.cal-trigger > span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-trigger svg {
    color: var(--text-muted);
    flex: none;
    transition: color .15s ease;
}
.cal-trigger:hover { border-color: color-mix(in srgb, var(--text-title) 30%, var(--border-main)); }
.cal-trigger.is-open { border-color: var(--primary); }
.cal-trigger.is-open svg { color: var(--primary); }

/* التسمية الطافية على حقلّي التاريخ (مرآة نظام ‎.ao-float في order-add.css):
   وسط الحقل، وتطير فوق حدّه عند التركيز أو عند وجود قيمة ‎.is-filled */
.cal-range-host .ao-field-label {
    position: absolute;
    inset-inline-start: 26px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0 4px;
    max-width: calc(100% - 40px);
    background: transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    transition: top .16s ease, transform .16s ease, color .15s ease, background .15s ease;
    z-index: 2;
}
.cal-range-host .ao-field:focus-within .ao-field-label,
.cal-range-host .ao-field:has(.is-filled) .ao-field-label {
    top: 0;
    transform: translateY(-50%) scale(0.82);
    background: var(--surface-solid);
    color: var(--primary);
}
.cal-range-host .ao-field:has(.is-filled):not(:focus-within) .ao-field-label {
    color: var(--text-secondary);
}
/* النافذة المشتركة تُثبَّت تحت صفّ الحقلين (الوعاء position:relative) */
.cal-range-host .range-pop {
    top: calc(100% + 8px);
    inset-inline-end: auto;
    inset-inline-start: 0;
    width: 320px;
    max-width: calc(100vw - 32px);
    z-index: 30;
}
/* على الجوال تمتد بعرض الصف كي لا تخرج عن الشاشة */
@media (max-width: 480px) {
    .cal-range-host .range-pop { width: 100%; }
}

/* قائمتا السنة والشهر المنسدلتان فوق الشبكة — مرآة SelectYear/SelectMonth
   في المكوّن المرجعي (dropdown-range-date-picker)، بحقل ‎.form-input
   فيتكيّفان مع الثيم تلقائياً */
.cal-range-picks {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.cal-range-picks .form-input {
    min-width: 0;
    flex: 1 1 0;
    font-size: 13px;
    padding: 7px 10px;
    height: auto;
}
/* تذييل النافذة: مسح / تطبيق — مرآة زرّي ghost/default في المكوّن المرجعي */
.cal-range-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 2px;
}
.cal-foot-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}
.cal-foot-btn:hover {
    background: var(--surface-hover);
    color: var(--text-title);
}
.cal-foot-btn--primary {
    background: var(--primary);
    color: #fff;
}
.cal-foot-btn--primary:hover {
    background: color-mix(in srgb, var(--primary) 88%, #000);
    color: #fff;
}

/* ================================================================
   ترويسة التابات الممدّدة (xtabs) — نسخة من ترويسة الطلبات v2
   (orders-cards.css §xtabs) مقيّدة بـ #advertisingPage: مجموعة البحث + الفترة +
   زر الفلترة (يمين)، ومجموعة طريقة العرض قائمة/بطاقات (يسار).
   ================================================================ */
#advertisingPage .xtabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-main);
    background: var(--surface-main);
    border-radius: 16px;
    padding: 4px;
    box-shadow: var(--shadow-sm);
    width: fit-content;
    max-width: 100%;
}
#advertisingPage .xtab {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 999px;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        padding 0.45s cubic-bezier(0.32, 0.72, 0, 1),
        box-shadow 0.3s ease;
    white-space: nowrap;
    position: relative;
}
/* أيقونات أرقّ من عتبة 2 الافتراضية — مرآة الطلبات */
#advertisingPage .xtab svg {
    flex: none;
    width: 16px;
    height: 16px;
    stroke-width: 1.7;
}
#advertisingPage .xtab:hover {
    background: var(--nav-bg-hover, var(--surface-hover));
    color: var(--text-title);
}
#advertisingPage .xtab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}
/* التسمية مطوية (عرض صفر) إلا في التاب الممدّد — قلب مكوّن ExpandableTabs */
#advertisingPage .xtab .xtab-label {
    display: inline-block;
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition:
        width 0.5s cubic-bezier(0.32, 0.72, 0, 1) 0.05s,
        opacity 0.3s ease 0.1s;
}
#advertisingPage .xtab[aria-pressed='true'] {
    background: var(--surface-hover);
    color: var(--primary);
    padding: 7px 13px;
    gap: 7px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
#advertisingPage .xtab[aria-pressed='true'] .xtab-label {
    width: auto;
    opacity: 1;
}
#advertisingPage .xsep {
    width: 1.2px;
    height: 22px;
    background: var(--border-main);
    margin: 0 4px;
    flex: none;
}
#advertisingPage .xsep[hidden] {
    display: none;
}
/* شريط التحكم بشقّين: مجموعة يمنى (بحث+فترة+فلترة) وفاصل مرن ومجموعة يسرى (عرض) */
#advertisingPage .xcontrols {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
#advertisingPage .xspacer {
    flex: 1;
}
/* «تعديلات القائمة»: تسكن مجموعة العرض نفسها وتظهر عند اختيار قائمة فقط.
   قاعدة [hidden] صريحة كي لا يغلبها display:flex الصريح أعلاه. */
#advertisingPage .xlist-adjust {
    display: flex;
    align-items: center;
    gap: 4px;
}
#advertisingPage .xlist-adjust[hidden] {
    display: none;
}
#advertisingPage .xtabs .ot-col-wrap {
    display: contents;
}

/* --- البحث (dock) داخل المجموعة: يذوب في وعاء .xtabs — مطويّ كأيقونة صامتة
   بنفس مقاس التاب، وممدّد كحقل محدَّد بحدّ ظاهر (مرآة الطلبات) --- */
#advertisingPage .xtabs .ot-search {
    flex: 0 1 auto;
    min-width: 0;
    height: 32px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
#advertisingPage .xtabs .ot-search[data-collapsed='true'] {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    padding: 0;
    gap: 0;
    justify-content: center;
}
#advertisingPage .xtabs .ot-search[data-collapsed='true']:hover {
    background: var(--nav-bg-hover, var(--surface-hover));
    border-color: transparent;
}
#advertisingPage .xtabs .ot-search[data-collapsed='false'] {
    flex: 0 1 230px;
    min-width: 170px;
    max-width: 300px;
    padding: 0 12px;
    background: var(--surface-main);
    border-color: var(--border-main);
}

/* --- زرّ الفلترة كأيقونة تاب: نلغي التنسيق الدائري المستقل --- */
#advertisingPage .xtabs .ot-btn {
    height: auto;
    min-width: 0;
    width: auto;
    flex: 0 0 auto;
    padding: 7px;
    gap: 0;
    border: 0;
    background: transparent;
    border-radius: 999px;
    box-shadow: none;
    font-size: 0.8125rem;
    font-weight: 500;
}
#advertisingPage .xtabs .ot-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.7;
    color: var(--text-secondary);
}
#advertisingPage .xtabs .ot-btn:hover {
    background: var(--nav-bg-hover, var(--surface-hover));
    border-color: transparent;
    color: var(--text-title);
}
#advertisingPage .xtabs .ot-btn svg {
    color: inherit;
}
/* الحالة المفتوحة (popover): صبغة أساسية خفيفة كالتاب الممدّد */
#advertisingPage .xtabs .ot-btn[aria-expanded='true'] {
    background: var(--surface-hover);
    border-color: transparent;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}
#advertisingPage .xtabs .ot-btn[aria-expanded='true'] svg {
    color: var(--primary);
}
/* شارة عدّاد الفلاتر خارج جسم الأيقونة بزاوية سفلية بعيدة — بحلقة سطح */
#advertisingPage .xtabs .ot-btn-filter {
    position: relative;
}
#advertisingPage .xtabs .ot-btn-filter .ot-badge {
    position: absolute;
    bottom: auto;
    inset-inline-end: auto;
    top: -8px;
    inset-inline-start: -10px;
    box-shadow:
        0 0 0 2px var(--surface-main),
        0 2px 6px color-mix(in srgb, var(--text-title) 18%, transparent);
}
/* وفي الفلاتر النشطة: الزر بوهج «المضغوط» نفسه (مرآة الطلبات) */
#advertisingPage .xtabs .ot-btn-filter.is-active {
    background: var(--surface-hover);
    color: var(--primary);
}
/* --- زر الأعمدة كأيقونة تاب (مرآة الطلبات): نلغي التنسيق الدائري المستقل
   (42px بئر محايد بعرض 168px) ليجلس داخل الوعاء كأيقونة بمقاس التاب نفسه --- */
#advertisingPage .xtabs .ot-view-trigger {
    height: auto;
    min-width: 0;
    width: auto;
    justify-content: center;
    flex: 0 0 auto;
    padding: 7px;
    gap: 0;
    border: 0;
    background: transparent;
    border-radius: 999px;
    box-shadow: none;
    font-size: 0.8125rem;
    font-weight: 500;
}
#advertisingPage .xtabs .ot-view-trigger svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.7;
    color: var(--text-secondary);
}
#advertisingPage .xtabs .ot-view-trigger:hover {
    background: var(--nav-bg-hover, var(--surface-hover));
    border-color: transparent;
    color: var(--text-title);
}
/* الحالة المفتوحة (قائمة الأعمدة): صبغة أساسية خفيفة كالتاب الممدّد */
#advertisingPage .xtabs .ot-view-trigger[aria-expanded='true'] {
    background: var(--surface-hover);
    border-color: transparent;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}
#advertisingPage .xtabs .ot-view-trigger[aria-expanded='true'] svg {
    color: var(--primary);
}
/* بنود قائمة الكثافة بنمط بنود الأعمدة نفسه (مرآة الطلبات) */
#advertisingPage .ot-density-menu .ot-view-item {
    padding: 7px 10px;
    gap: 8px;
    font-size: 12.5px;
    border-radius: 7px;
}

/* --- الجوال: صفّ واحد قابل للسحب لكل شريط (مرآة الطلبات) --- */
@media (max-width: 720px) {
    #advertisingPage .xtabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        width: 100%;
        padding: 3px;
        gap: 2px;
    }
    #advertisingPage .xtabs::-webkit-scrollbar {
        display: none;
    }
    #advertisingPage .xtab {
        padding: 5px;
        font-size: 0.75rem;
        scroll-snap-align: start;
    }
    #advertisingPage .xtab svg {
        width: 15px;
        height: 15px;
    }
    #advertisingPage .xtab[aria-pressed='true'] {
        padding: 5px 10px;
        gap: 6px;
    }
    #advertisingPage .xsep {
        height: 18px;
        margin: 0 2px;
    }
    #advertisingPage .xtabs .ot-btn,
    #advertisingPage .xtabs .ot-view-trigger {
        padding: 5px;
    }
    #advertisingPage .xtabs .ot-btn svg,
    #advertisingPage .xtabs .ot-view-trigger svg {
        width: 15px;
        height: 15px;
    }
    #advertisingPage .xtabs .ot-search {
        height: 27px;
    }
    #advertisingPage .xtabs .ot-search[data-collapsed='true'] {
        flex: 0 0 27px;
        width: 27px;
        min-width: 27px;
    }
    #advertisingPage .xtabs .ot-search[data-collapsed='false'] {
        flex: 1 1 100%;
        min-width: 140px;
    }
    #advertisingPage .xcontrols {
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    #advertisingPage .xcontrols::-webkit-scrollbar {
        display: none;
    }
    #advertisingPage .xcontrols [data-xtgroup='mainA'] {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
    }
    #advertisingPage .xcontrols [data-xtgroup='viewA'] {
        flex: 0 0 auto;
        width: auto;
        margin-inline-start: auto;
    }
    /* حين يتمدّد البحث تُخفى مجموعة العرض مؤقتاً ليتنفس الحقل */
    #advertisingPage .xcontrols:has(.ot-search[data-collapsed='false']) [data-xtgroup='viewA'] {
        display: none;
    }
    /* تعديلات القائمة (الكثافة/الأعمدة) تختبئ على الجوال لتوفير الصف */
    #advertisingPage #otListAdjustA,
    #advertisingPage #otListAdjustSepA {
        display: none !important;
    }
    #advertisingPage .xspacer {
        display: none;
    }
}

/* احترام تفضيل تقليل الحركة: تمدّد التسمية فوري بلا انتقال */
@media (prefers-reduced-motion: reduce) {
    #advertisingPage .xtab,
    #advertisingPage .xtab .xtab-label {
        transition: none;
    }
}
