/* ===== APP SHELL: side navigation (visual only) ===== */
/* Classic, neutral palette. The store color is used only as a small accent. */

.app-shell-row {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
    background: #f7f7f8;
}

.app-sidebar {
    --sc: var(--store-color, #111827);
    --sb-width: 248px;
    --sb-border: #ececef;
    --sb-text: #52525b;
    --sb-text-strong: #18181b;
    --sb-muted: #a1a1aa;
    --sb-hover: #f4f4f5;
    width: var(--sb-width);
    flex-shrink: 0;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid var(--sb-border);
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
    overflow: hidden;
}
.app-sidebar.is-collapsed { --sb-width: 76px; }

/* Brand */
.sb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 64px;
    padding: 0 16px;
    flex-shrink: 0;
}
.sb-brand__logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #18181b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sb-brand__text { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.sb-brand__name { font-size: 15px; font-weight: 700; color: var(--sb-text-strong); letter-spacing: -0.3px; }
.sb-brand__ver { font-size: 10px; color: var(--sb-muted); }

.app-sidebar .sb-toggle {
    margin-right: auto;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 1px solid var(--sb-border) !important;
    color: var(--sb-muted);
    flex-shrink: 0;
    padding: 0 !important;
}
.app-sidebar .sb-toggle:hover { background: var(--sb-hover) !important; color: var(--sb-text-strong); transform: none !important; box-shadow: none !important; }
.app-sidebar.is-collapsed .sb-toggle svg { transform: scaleX(-1); }

/* Store chip */
.app-sidebar .sb-store {
    margin: 0 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px !important;
    border-radius: 9px;
    background: #fafafa !important;
    border: 1px solid var(--sb-border) !important;
    color: var(--sb-text-strong);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}
.app-sidebar .sb-store:hover { background: var(--sb-hover) !important; transform: none !important; box-shadow: none !important; }
.sb-store__badge {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    flex-shrink: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sb-store__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-store__chev { color: var(--sb-muted); flex-shrink: 0; }

/* Nav: never shows a scrollbar */
.sb-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 10px 6px;
    scrollbar-width: none;
}
.app-sidebar .sb-nav::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none; }

.sb-section { margin-bottom: 6px; }
.sb-section__title {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--sb-muted);
    letter-spacing: 0.3px;
    padding: 10px 10px 4px;
    white-space: nowrap;
}
.app-sidebar.is-collapsed .sb-section__title { padding: 0; height: 1px; background: var(--sb-border); margin: 8px 14px; }

/* Nav item */
.app-sidebar .sb-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px !important;
    margin-bottom: 1px;
    border-radius: 8px;
    background: transparent !important;
    border: none !important;
    color: var(--sb-text);
    font-size: 13.5px !important;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    position: relative;
}
.sb-item__icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; color: #a1a1aa; transition: color 0.15s; }
.sb-item__icon svg { width: 17px; height: 17px; }
.sb-item__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar .sb-item:hover:not(:disabled) { background: var(--sb-hover) !important; color: var(--sb-text-strong); transform: none !important; box-shadow: none !important; }
.app-sidebar .sb-item:hover:not(:disabled) .sb-item__icon { color: var(--sb-text-strong); }

.app-sidebar .sb-item--active,
.app-sidebar .sb-item--active:hover:not(:disabled) {
    background: var(--sb-hover) !important;
    color: var(--sb-text-strong) !important;
    font-weight: 600;
}
.app-sidebar .sb-item--active .sb-item__icon { color: var(--sb-text-strong); }
.app-sidebar .sb-item--active::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: var(--sc);
}

.sb-item__badge {
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #18181b;
    color: #fff;
}

/* Primary CTA (new campaign) */
.app-sidebar .sb-item--primary {
    background: #18181b !important;
    color: #fff !important;
    font-weight: 600;
    justify-content: center;
    padding: 9px 10px !important;
    margin: 0 0 4px;
}
.app-sidebar .sb-item--primary .sb-item__label { flex: 0 1 auto; }
.app-sidebar .sb-item--primary .sb-item__icon { color: #fff; width: auto; }
.app-sidebar .sb-item--primary:hover:not(:disabled) { background: #27272a !important; color: #fff !important; }
.app-sidebar .sb-item--primary:hover:not(:disabled) .sb-item__icon { color: #fff; }

.app-sidebar .sb-item--warning { background: #fafaf9 !important; color: #92400e; border: 1px solid #f1e7d0 !important; }
.app-sidebar .sb-item--warning .sb-item__icon { color: #b45309; }
.app-sidebar .sb-item--warning .sb-item__badge { background: #b45309; }
.app-sidebar .sb-item--warning:hover:not(:disabled) { background: #fffbeb !important; color: #78350f; }

/* Footer: user row with a compact logout button */
.sb-footer {
    border-top: 1px solid var(--sb-border);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.sb-user { flex: 1; display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; min-width: 0; }
.sb-user__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f4f4f5;
    border: 1px solid var(--sb-border);
    color: #3f3f46;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sb-user__meta { display: flex; flex-direction: column; min-width: 0; }
.sb-user__hello { font-size: 11px; color: var(--sb-muted); }
.sb-user__name { font-size: 13px; font-weight: 600; color: var(--sb-text-strong); overflow: hidden; text-overflow: ellipsis; }
.app-sidebar .sb-footer .sb-item { width: auto; margin: 0; padding: 7px !important; }
.app-sidebar .sb-footer .sb-item__label { display: none; }
.app-sidebar .sb-item--danger:hover:not(:disabled) { background: #fef2f2 !important; }
.app-sidebar .sb-item--danger:hover:not(:disabled) .sb-item__icon { color: #dc2626; }

/* Collapsed state: icons only, store name still visible */
/* Same row height in both states, so the toggle never moves up or down */
.app-sidebar.is-collapsed .sb-brand { justify-content: center; padding: 0; }
.app-sidebar.is-collapsed .sb-brand__logo { display: none; }
.app-sidebar.is-collapsed .sb-toggle { margin: 0; width: 34px; height: 34px; border-radius: 9px; }
.app-sidebar.is-collapsed .sb-brand__text,
.app-sidebar.is-collapsed .sb-item__label,
.app-sidebar.is-collapsed .sb-store__name,
.app-sidebar.is-collapsed .sb-store__chev,
.app-sidebar.is-collapsed .sb-user__meta { display: none; }
/* Collapsed store: just the colored initial (full name on hover) */
.app-sidebar.is-collapsed .sb-store {
    margin: 0 auto 10px;
    width: 44px;
    justify-content: center;
    padding: 9px 0 !important;
}
.app-sidebar.is-collapsed .sb-store__badge { width: 26px; height: 26px; }
.app-sidebar.is-collapsed .sb-item { justify-content: center; padding: 9px 0 !important; }
.app-sidebar.is-collapsed .sb-item__badge { position: absolute; top: 1px; left: 8px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
.app-sidebar.is-collapsed .sb-footer { flex-direction: column; padding: 10px 0; }
.app-sidebar.is-collapsed .sb-user { flex: none; justify-content: center; }

/* Short screens: tighten spacing so everything fits without scrolling */
@media (max-height: 820px) {
    .sb-brand { height: 56px; }
    .app-sidebar .sb-item { padding: 6px 10px !important; }
    .sb-section__title { padding: 6px 10px 2px; }
    .sb-footer { padding: 6px 12px; }
}
@media (max-height: 700px) {
    .sb-section__title { display: none; }
    .sb-brand__ver { display: none; }
}

/* Main content area next to the sidebar */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 16px;
}

/* Gantt (desktop): fill the page down to the bottom instead of a fixed height */
@media (min-width: 769px) {
    .app-main > #gantt-chart-container { flex: 1 1 0; height: auto !important; min-height: 0; margin-bottom: 12px; }
    #gantt-chart-container > .flex-1 { display: flex; flex-direction: column; min-height: 0; }
    #gantt-chart-container .gantt-scroll { flex: 1 1 0; max-height: none !important; min-height: 0; }
}

/* ===== PHONES: top bar + slide-in drawer menu ===== */
.m-topbar, .sb-backdrop { display: none; }
@media (max-width: 768px) {
    .m-topbar {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 56px;
        padding: 0 12px;
        background: #fff;
        border-bottom: 1px solid #ececef;
        flex-shrink: 0;
    }
    .m-topbar__title { flex: 1; font-size: 16px; font-weight: 700; color: #18181b; letter-spacing: -0.3px; }
    html body .m-topbar .m-topbar__menu {
        width: 40px;
        height: 40px;
        padding: 0 !important;
        border-radius: 10px;
        background: #fff;
        border: 1px solid #e4e4e7 !important;
        color: #18181b;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .m-topbar__store {
        width: 32px; height: 32px; border-radius: 9px;
        color: #fff; font-size: 13px; font-weight: 700;
        display: flex; align-items: center; justify-content: center;
    }

    /* Drawer */
    html body .app-sidebar {
        position: fixed !important;
        top: 0; right: 0; bottom: 0;
        width: 84vw !important;
        max-width: 300px;
        z-index: 10050;
        transform: translateX(0);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -12px 0 32px rgba(0,0,0,0.18);
    }
    html body .app-sidebar.is-collapsed { transform: translateX(105%); box-shadow: none; }
    .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(24,24,27,0.42); z-index: 10040; }
    /* On phones "collapsed" only means "slid away" — keep the full look while it slides */
    html body .app-sidebar.is-collapsed .sb-brand { justify-content: flex-start; padding: 0 16px; }
    html body .app-sidebar.is-collapsed .sb-brand__logo,
    html body .app-sidebar.is-collapsed .sb-brand__text,
    html body .app-sidebar.is-collapsed .sb-user__meta { display: flex; }
    html body .app-sidebar.is-collapsed .sb-item__label,
    html body .app-sidebar.is-collapsed .sb-store__name,
    html body .app-sidebar.is-collapsed .sb-store__chev { display: block; }
    html body .app-sidebar.is-collapsed .sb-toggle { margin-right: auto; width: 32px; height: 32px; }
    html body .app-sidebar.is-collapsed .sb-store { margin: 0 12px 10px; width: auto; justify-content: flex-start; }
    html body .app-sidebar.is-collapsed .sb-item { justify-content: flex-start; }
    html body .app-sidebar.is-collapsed .sb-section__title { height: auto; background: none; margin: 0; padding: 6px 10px 2px; }
    html body .app-sidebar.is-collapsed .sb-footer { flex-direction: row; padding: 10px 12px; }
    html body .app-sidebar.is-collapsed .sb-user { flex: 1; justify-content: flex-start; }

    /* The old mobile stylesheet forces "padding: 8px 14px" on every button — restore ours */
    html body .app-sidebar .sb-toggle { padding: 0 !important; width: 32px; height: 32px; }
    html body .app-sidebar .sb-item { padding: 8px 10px !important; font-size: 14.5px !important; }
    html body .app-sidebar .sb-section__title { padding: 6px 10px 2px; }
    html body .app-sidebar .sb-item--primary { padding: 11px 10px !important; }
    html body .app-sidebar .sb-store { padding: 9px 10px !important; font-size: 14px !important; }
    html body .app-sidebar .sb-footer .sb-item { padding: 8px !important; }

    .app-main { padding: 0 10px; }

    /* Restore the intended padding on the new buttons (old stylesheet forces 8px 14px on all buttons) */
    html body .acc-page .acc-back,
    html body .um-page .um-close { padding: 0 !important; }
    html body .acc-page .pg-btn { padding: 0 12px !important; }
    html body .acc-page .pg-seg__item { padding: 0 10px !important; font-size: 12.5px !important; }
    html body .cv-toolbar .cv-fav { padding: 0 12px !important; }
    html body .rw-overlay .rw-btn { padding: 0 12px !important; height: 36px; }
    html body .rw-overlay .rw-back { padding: 0 12px !important; }
    html body .um-page .um-btn-primary,
    html body .um-page .um-btn-ghost { padding: 0 14px !important; }
    html body .cm-card .cm-btn { padding: 0 12px !important; }

    /* Pages: the whole page scrolls; table keeps a comfortable height.
       ("html body" prefix: these must beat the base rules defined later in this file) */
    html body .acc-page { overflow-y: auto; gap: 10px; padding: 12px 0 16px; }
    html body .acc-title { font-size: 19px; }
    html body .acc-subtitle { font-size: 12px; }
    html body .acc-table-card { flex: none !important; max-height: 72vh; min-height: 200px; }
    html body .acc-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    html body .acc-kpi { padding: 10px 12px; border-radius: 11px; }
    html body .acc-kpi::before { top: 14px; right: 12px; }
    html body .acc-kpi__label { font-size: 11px; padding-right: 12px; }
    html body .acc-kpi__value { font-size: 17px; }
    html body .acc-money { width: 100%; justify-content: space-between; padding: 8px 14px; gap: 10px; }
    html body .acc-money__value { font-size: 16px; }
    html body .acc-kpis--3 .acc-kpi { padding: 10px 10px; }
    html body .acc-kpis--3 .acc-kpi__value { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html body .acc-toolbar .acc-select { flex: 1 1 calc(50% - 4px); min-width: 0; }
    html body .acc-count { flex-basis: 100%; }

    /* Campaigns toolbar: title / search + favorites / 3 filters / 3 counters */
    html body .cv-toolbar { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 12px 0 10px; }
    html body .cv-toolbar__group { display: contents; }
    html body .cv-toolbar__title { grid-column: 1 / -1; order: 1; font-size: 20px; margin: 0; }
    html body .cv-search { grid-column: span 4; order: 2; }
    html body .cv-toolbar__end { grid-column: span 2; order: 3; margin: 0 !important; display: flex; }
    html body .cv-toolbar .cv-fav { width: 100%; height: 42px; justify-content: center; }
    html body .cv-toolbar .cv-select { grid-column: span 2; order: 4; width: 100%; min-width: 0; height: 40px !important; }
    html body .cv-stats { grid-column: 1 / -1; order: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    html body .cv-toolbar .cv-input { width: 100% !important; height: 42px !important; font-size: 16px !important; }
    html body .cv-stat { justify-content: center; padding: 0 8px; height: 40px; }

    /* Campaigns page: no extra mobile-only statistics block; the page scrolls to the end */
    html body .mobile-stats-grid { display: none !important; }
    html body .app-main { overflow-y: auto !important; }

    /* Campaigns on phones: the full desktop table shown as cards (every column, same buttons),
       instead of the limited mobile cards */
    html body .app-main .mobile-cards { display: none !important; }
    html body .app-main .desktop-table-wrapper {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        border: none !important;
        background: transparent !important;
        margin: 0 0 24px !important;
        flex: none !important;
    }
    html body .app-main .desktop-table { display: block !important; min-height: 0 !important; }
    html body .app-main .desktop-table > table,
    html body .app-main .desktop-table > table > tbody { display: block !important; width: 100% !important; min-width: 0 !important; background: transparent !important; box-shadow: none !important; }
    html body .app-main .desktop-table > table > thead { display: none !important; }
    /* Card = two-column grid of fields; label above value */
    html body .app-main .desktop-table > table > tbody > tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        border: 1px solid #ececef !important;
        border-radius: 14px;
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(16,24,40,0.05);
    }
    html body .app-main .desktop-table > table > tbody > tr > td {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 9px 12px !important;
        border: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: right !important;
        white-space: normal !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        font-size: 13px !important;
    }
    html body .app-main .desktop-table > table > tbody > tr > td::before {
        content: attr(data-label);
        color: #71717a;
        font-size: 11.5px;
        font-weight: 600;
    }
    html body .app-main .desktop-table > table > tbody > tr > td > * { min-width: 0; text-align: right; }
    /* Wide fields span the whole card */
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(5),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(8),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(9),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(10),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(11),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(12),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(13),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(14),
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(16) { grid-column: 1 / -1; }
    /* Card title = promo type (campaigns have no name field) */
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(4) {
        order: -2;
        grid-column: 1 / -1;
        font-size: 16px !important;
        font-weight: 700;
        color: #18181b;
        padding: 14px 14px 6px !important;
        border-bottom: none !important;
    }
    html body .app-main .desktop-table > table > tbody > tr > td:nth-child(4)::before { display: none; }
    /* Action icons (favourite / publish / edit / delete) as a bar under the title, all one size */
    html body .app-main .desktop-table > table > tbody > tr > td:first-child {
        order: -1;
        grid-column: 1 / -1;
        padding: 2px 10px 10px !important;
    }
    html body .app-main .desktop-table > table > tbody > tr > td:first-child::before { display: none; }
    html body .app-main .desktop-table > table > tbody > tr > td:first-child > div { flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; gap: 6px !important; }
    html body .app-main .desktop-table td:first-child button {
        width: 36px; height: 36px;
        padding: 0 !important;
        display: flex !important; align-items: center; justify-content: center;
        border: 1px solid #ececef !important;
        border-radius: 9px;
        background: #fff !important;
    }
    html body .app-main .desktop-table td:first-child button svg { width: 17px; height: 17px; }
    html body .app-main .desktop-table td:first-child .star-btn { font-size: 21px !important; line-height: 1 !important; }
    /* Closed-campaign revenue button: green */
    html body .app-main .desktop-table tr td button[title="מלא נתוני הכנסות"][class][title],
    html body .app-main .desktop-table tr.row-completed td button[title="מלא נתוני הכנסות"][class][title] { background: #16a34a !important; color: #fff !important; border-color: #16a34a !important; }

    /* Page back button: the ☰ menu replaces it on phones */
    html body .acc-page .acc-back { display: none !important; }

    /* Page tables → cards: every value visible with its column name */
    html body .acc-page .acc-table-card { background: transparent; border: none; box-shadow: none; max-height: none; overflow: visible; min-height: 0; }
    html body .acc-page table.acc-table,
    html body .acc-page .acc-table tbody,
    html body .acc-page .acc-table tfoot { display: block !important; width: 100% !important; min-width: 0 !important; position: static !important; }
    html body .acc-page .acc-table thead { display: none !important; }
    html body .acc-page .acc-table tr {
        display: block !important;
        background: #fff !important;
        border: 1px solid #ececef !important;
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 4px 0;
        box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    }
    html body .acc-page .acc-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 14px !important;
        border: none !important;
        border-bottom: 1px solid #f4f4f5 !important;
        position: static !important;
        background: transparent !important;
        text-align: left !important;
        white-space: normal !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        font-size: 13px;
    }
    html body .acc-page .acc-table td:last-child { border-bottom: none !important; }
    html body .acc-page .acc-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        max-width: 45%;
        color: #71717a;
        font-size: 12px;
        font-weight: 500;
        text-align: right;
    }
    html body .acc-page .acc-table td[data-label=""]::before { display: none; }
    html body .acc-page .acc-table td > div { max-width: 60%; }
    /* Totals row → dark summary card; skip empty / placeholder cells */
    html body .acc-page .acc-table tfoot tr { background: #18181b !important; border-color: #18181b !important; color: #fff !important; }
    html body .acc-page .acc-table tfoot td { color: #fff !important; border-bottom-color: rgba(255,255,255,0.08) !important; }
    html body .acc-page .acc-table tfoot td::before { color: #a1a1aa; }
    html body .acc-page .acc-table tfoot td:empty,
    html body .acc-page .acc-table tfoot td[style*="opacity: 0.5"] { display: none !important; }

    /* ===== Gantt on phones: list view as date cards ===== */
    html body #gantt-chart-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 4px 0 24px !important;
        border: 1px solid #ececef !important;
        border-radius: 14px !important;
        box-shadow: none !important;
    }
    html body #gantt-chart-container > div:first-child { padding: 12px !important; gap: 10px !important; }
    html body #gantt-chart-container > div:first-child > h2 { flex: 1 1 100%; font-size: 18px !important; padding: 0 !important; }
    html body #gantt-chart-container .gv-btn--weekly,
    html body #gantt-chart-container .gv-btn--monthly { display: none !important; }
    html body #gantt-chart-container .gv-btn { padding: 7px 14px !important; font-size: 13px !important; }
    html body #gantt-chart-container > div:first-child > div:last-child button { width: 38px !important; height: 38px !important; padding: 0 !important; font-size: 16px !important; }
    html body #gantt-chart-container > div:nth-child(2) { padding: 8px 12px !important; gap: 8px 12px !important; }
    html body #gantt-chart-container .gantt-scroll {
        max-height: none !important;
        overflow: visible !important;
        border: none !important;
        padding: 10px !important;
        background: transparent !important;
    }
    html body #gantt-chart-container table.gv-list,
    html body #gantt-chart-container table.gv-list > tbody { display: block !important; min-width: 0 !important; width: 100% !important; font-size: 13px !important; }
    html body #gantt-chart-container table.gv-list > thead { display: none !important; }
    html body #gantt-chart-container table.gv-list > tbody > tr {
        display: block !important;
        border: 1px solid #ececef;
        border-radius: 12px;
        margin-bottom: 8px;
        overflow: hidden;
        background: #fff;
    }
    /* Date header of each card: weekday, day number, month / holiday badges on one line */
    html body #gantt-chart-container table.gv-list td:first-child {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        position: static !important;
        padding: 10px 12px !important;
        border: none !important;
        text-align: right !important;
        font-size: 13px !important;
    }
    html body #gantt-chart-container table.gv-list td:first-child > div { margin: 0 !important; font-size: 13px !important; }
    html body #gantt-chart-container table.gv-list td:first-child > .text-lg { font-size: 17px !important; }
    /* Only the campaigns actually happening that day */
    html body #gantt-chart-container table.gv-list td:not(:first-child) {
        display: block !important;
        padding: 8px 12px !important;
        border: none !important;
        border-top: 1px solid #f4f4f5 !important;
        background: #fff !important;
        font-size: 13px !important;
    }
    html body #gantt-chart-container table.gv-list td:not(:first-child):empty { display: none !important; }
    html body #gantt-chart-container table.gv-list td:not(:first-child) .text-xs { font-size: 12.5px !important; }
    html body #gantt-chart-container table.gv-list td:not(:first-child) > div { padding: 6px 10px !important; border-radius: 8px; }
    /* Days with nothing scheduled: one quiet line */
    html body #gantt-chart-container table.gv-list > tbody > tr:not(:has(td:not(:first-child):not(:empty))) { opacity: 0.6; }

    /* Tasks page: the three columns stack and the page scrolls */
    html body .tk-cols { flex-direction: column !important; overflow-y: auto !important; padding: 12px 10px !important; }
    html body .tk-col { flex: none !important; min-height: auto !important; background: #fff; border: 1px solid #ececef; border-radius: 12px; padding-bottom: 6px; }
    html body .tk-col > div:last-child { overflow: visible !important; }

    /* Promo types timeline: full-width cards with the date on top */
    html body .ph-filters { display: grid !important; grid-template-columns: 1fr 1fr; padding: 10px !important; }
    html body .ph-filters > input[type="text"] { grid-column: 1 / -1; min-width: 0 !important; height: 40px; font-size: 16px !important; }
    html body .ph-filters > select { width: 100%; height: 38px; }
    html body .ph-filters > div { grid-column: 1 / -1; flex-wrap: wrap; }
    html body .ph-line, html body .ph-dot { display: none !important; }
    html body .ph-row { flex-direction: column !important; gap: 6px !important; margin-bottom: 14px !important; }
    html body .ph-date { min-width: 0 !important; text-align: right !important; padding-top: 0 !important; display: flex; gap: 8px; align-items: baseline; }
    html body .ph-card { padding: 12px !important; }
    html body .ph-card__inner { flex-direction: column !important; }
    html body .ph-card__inner > button { width: 100%; margin-top: 8px; }
}

/* ===== CAMPAIGNS PAGE TOOLBAR (visual only) ===== */

.cv-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 2px 10px;
}
.cv-toolbar__group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-toolbar__title {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
    margin-left: 8px;
}
.cv-toolbar__end { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }

.cv-search { position: relative; display: flex; align-items: center; }
.cv-search__icon { position: absolute; right: 10px; pointer-events: none; color: #9ca3af; }
.cv-toolbar .cv-input,
.cv-toolbar .cv-select {
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    font-size: 12.5px;
    color: #374151;
    background: #fff;
    outline: none;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cv-toolbar .cv-input { padding: 0 32px 0 10px; width: 180px; }
.cv-toolbar .cv-select { padding: 0 10px; cursor: pointer; }
.cv-toolbar .cv-input:focus,
.cv-toolbar .cv-select:focus { border-color: #9ca3af; box-shadow: 0 0 0 3px rgba(17,24,39,0.06); }

.cv-stats { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cv-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 500;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.cv-stat__num { font-size: 16px; font-weight: 700; }
.cv-stat__num { color: #18181b; }

.cv-toolbar .cv-fav {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 12.5px;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.cv-toolbar .cv-fav:hover { background: #f9fafb; transform: none; }
.cv-toolbar .cv-fav.is-on { background: #fef3c7; color: #92400e; font-weight: 600; border-color: #fbbf24 !important; }

@media (max-width: 1400px) {
    .cv-toolbar { display: flex; flex-wrap: wrap; }
    .cv-toolbar__end { margin-right: auto; }
}

/* ===== CAMPAIGNS TABLE: fill height, fit columns (visual only) ===== */
@media (min-width: 769px) {
    /* The old fixed height (100vh - 148px) was sized for the removed top header */
    .app-main .desktop-table-wrapper {
        flex: 1 1 0 !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        margin: 6px 0 12px !important;
        border: 1px solid #e4e4e7 !important;
        border-radius: 12px !important;
    }
    /* Let the columns decide the width instead of a forced 1920/2200px */
    .app-main .desktop-table-wrapper .desktop-table > table { min-width: 0 !important; }

    /* Columns 3-16 share the visible width so the table ends exactly at
       "הושלם לגמרי"; the financial columns are reached by scrolling.
       Each column keeps a minimum (--u px). Columns 1-2 are pinned: untouched. */
    .app-main .desktop-table-wrapper { container-type: inline-size; }
    .app-main .desktop-table > table > thead th:nth-child(3)  { --u: 70; }
    .app-main .desktop-table > table > thead th:nth-child(4)  { --u: 92; }
    .app-main .desktop-table > table > thead th:nth-child(5)  { --u: 122; }
    .app-main .desktop-table > table > thead th:nth-child(6)  { --u: 72; }
    .app-main .desktop-table > table > thead th:nth-child(7)  { --u: 92; }
    .app-main .desktop-table > table > thead th:nth-child(8)  { --u: 122; }
    .app-main .desktop-table > table > thead th:nth-child(9)  { --u: 128; }
    .app-main .desktop-table > table > thead th:nth-child(10) { --u: 150; }
    .app-main .desktop-table > table > thead th:nth-child(11) { --u: 122; }
    .app-main .desktop-table > table > thead th:nth-child(12) { --u: 100; }
    .app-main .desktop-table > table > thead th:nth-child(13) { --u: 95; }
    .app-main .desktop-table > table > thead th:nth-child(14) { --u: 108; }
    .app-main .desktop-table > table > thead th:nth-child(15) { --u: 80; }
    .app-main .desktop-table > table > thead th:nth-child(16) { --u: 92; }
    .app-main .desktop-table > table > thead th:nth-child(n+3):nth-child(-n+16) {
        --cw: max(calc(var(--u) * 1px), calc((100cqw - 156px) * var(--u) / 1445));
        width: var(--cw) !important;
        min-width: var(--cw) !important;
        max-width: var(--cw) !important;
    }
    .app-main .desktop-table > table > tbody td:nth-child(10) { width: auto !important; max-width: none !important; }
}

/* ===== ACCOUNTING PAGE (visual only) ===== */

.acc-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 2px 12px;
    min-height: 0;
    overflow: hidden;
}

.acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.acc-header__titles { display: flex; align-items: center; gap: 12px; }
.acc-title { font-size: 21px; font-weight: 700; color: #111827; margin: 0; letter-spacing: -0.4px; }
.acc-subtitle { font-size: 12.5px; color: #9ca3af; margin-top: 1px; }
.acc-page .acc-back {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #e5e7eb !important;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
}
.acc-page .acc-back:hover { background: #f3f4f6; color: #111827; transform: none; box-shadow: none; }

.acc-money {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 12px;
    padding: 8px 18px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.acc-money__store { font-weight: 700; font-size: 13px; color: #374151; padding-left: 16px; border-left: 1px solid #eceef1; }
.acc-money__item { text-align: center; }
.acc-money__label { font-size: 11px; color: #9ca3af; }
.acc-money__value { font-size: 18px; font-weight: 700; }
.acc-money__sep { width: 1px; height: 30px; background: #eceef1; }
/* Accounting: the store summary sits in the middle of the header */
@media (min-width: 769px) {
    .acc-header:has(> .acc-money) { display: grid; grid-template-columns: 1fr auto 1fr; }
    .acc-header > .acc-money { grid-column: 2; }
}

.acc-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    flex-shrink: 0;
}
.acc-kpi {
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    position: relative;
    overflow: hidden;
}
.acc-kpi::before { content: ''; position: absolute; top: 18px; right: 16px; width: 7px; height: 7px; border-radius: 50%; background: #d4d4d8; }
.acc-kpi__label { font-size: 12px; color: #71717a; font-weight: 500; padding-right: 14px; }
.acc-kpi__value { font-size: 24px; font-weight: 700; color: #18181b; margin-top: 2px; line-height: 1.2; }
.acc-kpi--red::before { background: #e11d48; }
.acc-kpi--orange::before { background: #f59e0b; }
.acc-kpi--green::before { background: #16a34a; }

.acc-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.acc-search { position: relative; display: flex; align-items: center; }
.acc-search__icon { position: absolute; right: 10px; pointer-events: none; color: #9ca3af; }
.acc-page .acc-input,
.acc-page .acc-select {
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    font-size: 12.5px;
    color: #374151;
    background: #fff;
    outline: none;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.acc-page .acc-input { padding: 0 32px 0 10px; width: 220px; }
.acc-page .acc-select { padding: 0 10px; cursor: pointer; }
.acc-page .acc-input:focus,
.acc-page .acc-select:focus { border-color: #9ca3af; box-shadow: 0 0 0 3px rgba(17,24,39,0.06); }
.acc-count { font-size: 12px; color: #9ca3af; margin-right: 4px; }

.acc-table-card {
    flex: 0 1 auto;
    min-height: 0;
    overflow: auto;
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.acc-empty { text-align: center; padding: 64px 0; color: #9ca3af; font-size: 15px; }

.acc-page table.acc-table { box-shadow: none; border-radius: 0; }
.acc-page .acc-table thead { background: transparent; }
.acc-page .acc-table thead th {
    background: #f8f9fb;
    color: #6b7280 !important;
    font-size: 12px;
    font-weight: 600 !important;
    text-transform: none;
    letter-spacing: 0;
    border-right: none !important;
    border-bottom: 1px solid #eceef1 !important;
}
/* Emphasised header cells (e.g. "סה"כ לתשלום") had an inline dark background */
.acc-page .acc-table thead th[style*="background"] { background: #f0f0f2 !important; color: #18181b !important; font-weight: 700 !important; }
.acc-page .acc-table tbody td { border-right: none !important; border-bottom: 1px solid #e4e4e7 !important; background: transparent; }
.acc-page .acc-table tbody tr:hover { background: #f4f4f5 !important; }
.acc-page .acc-tfoot-row { background: #111827; color: #fff; font-weight: 700; }

.acc-page .acc-status {
    width: 100%;
    height: 28px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    outline: none;
}
.acc-page .acc-status--static { display: inline-flex; align-items: center; width: auto; cursor: default; }
.acc-page .acc-status--unpaid { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.acc-page .acc-status--paid_waiting_invoice { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.acc-page .acc-status--paid { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

.acc-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 80px 0;
    color: #6b7280;
    font-size: 13px;
}
.acc-loading__spinner { width: 34px; height: 34px; border: 3px solid #e5e7eb; border-top-color: #111827; border-radius: 50%; animation: app-spin 0.8s linear infinite; }

@media (max-width: 900px) {
    .acc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Pages that are in the side menu don't need a back button ===== */
.acc-page .acc-back { display: none !important; }
/* ...sub-screens (e.g. a brand's details) keep theirs */
html body .acc-page .acc-back.acc-back--keep { display: flex !important; padding: 0 !important; }

/* Brand details: info chips */
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.sd-chips:empty { display: none; }
.sd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e4e4e7;
    font-size: 12.5px;
    color: #3f3f46;
}
.rw-overlay .rw-header__actions .rw-btn--ghost { display: none !important; }

/* ===== Store names: capital first letter everywhere ===== */
.sb-store__name, .store-pick__name, .acc-money__store, .sm-name,
.acc-table td[data-label="אתר"],
.um-table td[data-label="חנויות"] span,
.pm-store .font-medium,
.ph-card span[style*="border-radius: 20px"],
.ph-filters select option { text-transform: capitalize; }
/* Promo types: the store badge stays on one line */
.ph-card span[style*="border-radius: 20px"] { white-space: nowrap; flex-shrink: 0; }

/* ===== TASKS PAGE (visual only) ===== */
.tk-page .tk-cols { padding: 0 !important; }
.tk-page .tk-col {
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    overflow: hidden;
}
.tk-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ececef;
    position: relative;
}
.tk-col__head::after {
    content: '';
    position: absolute;
    right: 16px;
    bottom: -1px;
    width: 36px;
    height: 2px;
    border-radius: 2px;
    background: var(--tk-color, #18181b);
}
.tk-col__title { font-size: 14.5px; font-weight: 700; color: #18181b; }
.tk-col__count { font-size: 11.5px; color: #71717a; background: #f4f4f5; border: 1px solid #ececef; padding: 2px 9px; border-radius: 20px; }
.tk-page .tk-col > div:last-child { padding: 0 12px 12px !important; }
.tk-page .tk-col { background: #fafafa; }
.tk-page .tk-col__head { background: #fff; }

/* Task cards */
.tk-page .tk-card {
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    border-color: #ececef !important;
    box-shadow: 0 1px 2px rgba(16,24,40,0.05);
    transition: box-shadow 0.15s, transform 0.15s;
    position: relative;
}
.tk-page .tk-card:hover { box-shadow: 0 8px 20px -10px rgba(0,0,0,0.18); transform: translateY(-1px); }
.tk-page .tk-card.is-alert { border-color: #fecaca !important; }
.tk-page .tk-card.is-alert::before {
    content: '';
    position: absolute;
    top: 10px; bottom: 10px; right: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: #ef4444;
}
.tk-page .tk-card.is-done { box-shadow: none; }
.tk-page .tk-card span[style*="font-size: 13px"] { font-size: 14px !important; }
.tk-page .tk-card input[type="checkbox"] { width: 16px !important; height: 16px !important; }
.tk-page .tk-card button { padding: 4px !important; border-radius: 7px; }
.tk-page .tk-card button:hover { background: #f4f4f5 !important; transform: none; box-shadow: none; }
.tk-page .tk-card button svg { width: 14px; height: 14px; }
/* Empty column */
.tk-page .tk-col > div:last-child > div[style*="text-align: center"] {
    margin-top: 6px;
    padding: 36px 12px !important;
    border: 1px dashed #e4e4e7;
    border-radius: 12px;
    color: #a1a1aa !important;
    font-size: 13px !important;
    background: #fff;
}

/* ===== PROMO TYPES PAGE (visual only) ===== */
.ph-page .ph-filters { justify-content: flex-start; }
.ph-dates { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #71717a; }
.acc-page .acc-input.acc-input--date { width: auto; padding: 0 10px; }
.ph-timeline { padding: 4px 2px 24px; }
.ph-page .ph-card { border: 1px solid #ececef !important; box-shadow: 0 1px 2px rgba(16,24,40,0.04) !important; border-radius: 14px !important; padding: 14px 18px !important; }
.ph-page .ph-dot { background: #18181b !important; }
.acc-page .pg-btn.ph-view-btn { height: 32px; font-size: 12.5px; font-weight: 600; flex-shrink: 0; }

.acc-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 768px) { .acc-kpis--3 { grid-template-columns: 1fr; } }

/* ===== SHARED PAGE PIECES (influencers, UGC, brands...) ===== */
.pg-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-page .pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    background: #fff;
    color: #3f3f46;
    border: 1px solid #e4e4e7 !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.acc-page .pg-btn:hover { background: #f4f4f5; color: #18181b; transform: none; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.acc-page .pg-btn--primary { background: #18181b; color: #fff; border-color: #18181b !important; font-weight: 600; }
.acc-page .pg-btn--primary:hover { background: #27272a; color: #fff; }

.pg-seg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: #f4f4f5;
    border: 1px solid #ececef;
    border-radius: 10px;
}
.acc-page .pg-seg__item {
    height: 28px;
    padding: 0 12px;
    border-radius: 7px;
    background: transparent;
    border: none !important;
    color: #71717a;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.acc-page .pg-seg__item:hover { color: #18181b; transform: none; box-shadow: none; }
.acc-page .pg-seg__item.is-active { background: #fff; color: #18181b; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pg-seg__count { font-weight: 700; margin-right: 3px; color: inherit; opacity: 0.75; }

.pg-empty { text-align: center; padding: 72px 16px; }
.pg-empty__title { font-size: 20px; font-weight: 700; color: #a1a1aa; }
.pg-empty__sub { font-size: 14px; color: #a1a1aa; margin-top: 6px; }

@media (max-width: 768px) {
    .acc-page { padding: 10px 0; }
    .acc-header { align-items: flex-start; }
    .pg-actions { width: 100%; }
    .acc-page .acc-input { width: 100%; }
    .acc-search { flex: 1 1 100%; }
    .pg-seg { width: 100%; overflow-x: auto; }
}

/* ===== REPORTS WORKSPACE (visual only) ===== */

.rw-overlay {
    background: #f7f7f8;
    display: flex;
    animation: rw-in 0.18s ease-out;
}
/* Open in the content area, next to the side menu (menu stays visible) */
@media (min-width: 769px) {
    .rw-overlay { right: 248px !important; }
    body:has(.app-sidebar.is-collapsed) .rw-overlay { right: 76px !important; }
}
@keyframes rw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.rw-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

/* Header */
.rw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #eceef1;
    flex-shrink: 0;
}
.rw-header__titles { display: flex; align-items: center; gap: 12px; }
.rw-header__icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: #111827; color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.rw-header__title { font-size: 18px; font-weight: 700; color: #111827; margin: 0; letter-spacing: -0.3px; }
.rw-header__sub { font-size: 12px; color: #9ca3af; margin: 2px 0 0; }
.rw-header__actions { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.rw-overlay .rw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.rw-overlay .rw-btn--ghost { background: #fff; color: #374151; border: 1px solid #e5e7eb !important; }
.rw-overlay .rw-btn--ghost:hover { background: #f3f4f6; transform: none; box-shadow: none; }
.rw-overlay .rw-btn--success { background: #18181b; color: #fff; border: 1px solid #18181b !important; }
.rw-overlay .rw-btn--success:hover { background: #27272a; }
.rw-overlay .rw-btn--primary {
    background: #111827; color: #fff; border: 1px solid #111827 !important;
    padding: 11px 26px; font-size: 14px; font-weight: 700;
    box-shadow: 0 4px 14px rgba(17,24,39,0.18);
}
.rw-overlay .rw-btn--primary:hover { background: #1f2937; }

/* Body: list + main */
.rw-body {
    flex: 1;
    min-height: 0;
    display: flex;
}

.rw-list {
    width: 268px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid #eceef1;
    overflow-y: auto;
    padding: 12px 12px 20px;
}
.rw-list::-webkit-scrollbar { width: 4px; }
.rw-list::-webkit-scrollbar-thumb { background: #e5e7eb; border: none; }
.rw-list::-webkit-scrollbar-track { background: transparent; }
.rw-list__group { margin-bottom: 10px; }
.rw-list__label {
    font-size: 10.5px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.4px;
    padding: 10px 10px 6px;
}
.rw-overlay .rw-list__item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 9px;
    background: transparent;
    border: none !important;
    text-align: right;
    cursor: pointer;
    color: #374151;
}
.rw-overlay .rw-list__item:hover { background: #f4f5f7; transform: none; box-shadow: none; }
.rw-overlay .rw-list__item.is-active,
.rw-overlay .rw-list__item.is-active:hover { background: #111827; color: #fff; }
.rw-list__title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.rw-list__desc { font-size: 11px; opacity: 0.55; line-height: 1.3; }
.rw-list__item.is-active .rw-list__desc { opacity: 0.7; }

.rw-main {
    padding: 20px 24px 32px;
    min-width: 0;
}

/* Two screens: tiles (pick a report) → selected report (fields + generate) */
.rw-body:not(.is-picked) .rw-main { display: none; }
.rw-body.is-picked .rw-tiles { display: none; }

.rw-tiles {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px 32px;
}
.rw-tiles__group { margin-bottom: 22px; }
.rw-tiles__label {
    font-size: 12px;
    font-weight: 600;
    color: #71717a;
    letter-spacing: 0.3px;
    margin: 0 2px 10px;
}
.rw-tiles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.rw-overlay .rw-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 96px;
    padding: 16px 16px 16px 44px;
    text-align: right;
    background: #fff;
    border: 1px solid #ececef !important;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.rw-overlay .rw-tile:hover {
    border-color: #d4d4d8 !important;
    box-shadow: 0 8px 22px -12px rgba(0,0,0,0.22);
    transform: translateY(-2px);
}
.rw-tile__title { font-size: 15px; font-weight: 700; color: #18181b; line-height: 1.3; }
.rw-tile__desc { font-size: 12.5px; color: #71717a; line-height: 1.4; }
.rw-tile__go {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    color: #a1a1aa;
    transition: background 0.15s, color 0.15s;
}
.rw-overlay .rw-tile:hover .rw-tile__go { background: #18181b; color: #fff; }

.rw-overlay .rw-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: #fff;
    color: #52525b;
    border: 1px solid #e4e4e7 !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.rw-overlay .rw-back:hover { background: #f4f4f5; color: #18181b; transform: none; box-shadow: none; }

@media (max-width: 768px) {
    .rw-tiles { padding: 14px 12px 24px; }
    .rw-tiles__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    html body .rw-overlay .rw-tile { min-height: 84px; padding: 12px 12px 12px 36px !important; font-size: inherit !important; }
    .rw-tile__title { font-size: 14px; }
    .rw-tile__desc { font-size: 12px; }
    .rw-tile__go { left: 10px; }
}

/* Controls card */
.rw-controls {
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.rw-controls__head { margin-bottom: 12px; }
.rw-controls__crumb { font-size: 11px; color: #9ca3af; font-weight: 600; margin-bottom: 2px; }
.rw-controls__title { font-size: 18px; font-weight: 700; color: #111827; margin: 0; }
.rw-controls__desc { font-size: 12.5px; color: #6b7280; margin-top: 2px; }
.rw-controls__fields { max-width: 720px; }
.rw-controls__fields:empty { display: none; }
.rw-controls__actions { display: flex; justify-content: flex-start; margin-top: 14px; }

/* Results paper */
.rw-paper {
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    min-height: 240px;
}
.rw-results__title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eceef1;
}
.rw-paper table { box-shadow: none; border-radius: 10px; overflow: hidden; }

.rw-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 260px;
    color: #d1d5db;
    text-align: center;
}
.rw-empty__title { font-size: 15px; font-weight: 600; color: #6b7280; margin-top: 6px; }
.rw-empty__sub { font-size: 12.5px; color: #9ca3af; }

/* Mobile: list becomes a horizontal strip on top */
@media (max-width: 768px) {
    .rw-body { flex-direction: column; }
    .rw-list {
        width: auto;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        border-left: none;
        border-bottom: 1px solid #eceef1;
        padding: 8px;
        flex-shrink: 0;
    }
    .rw-list__group { display: flex; gap: 4px; margin: 0; }
    .rw-list__label, .rw-list__desc { display: none; }
    .rw-overlay .rw-list__item { width: auto; white-space: nowrap; padding: 7px 12px !important; }
    .rw-main { padding: 12px; }
    .rw-header { padding: 10px 12px; }
    .rw-header__sub { display: none; }
}

/* ===== Closed campaigns in the table: calm and readable, one consistent button style ===== */
html body .desktop-table tr.row-completed > td:not(.financial-cell) { background: #f6f6f7 !important; color: #71717a; }
html body .desktop-table tr.row-completed > td:first-child { box-shadow: inset -3px 0 0 #e5a3a3, -2px 0 4px rgba(0,0,0,0.06) !important; }
/* Inner buttons, status chips and dropdowns: quiet outline, all the same */
html body .desktop-table tr.row-completed button:not(.reopen-campaign-btn):not(.star-btn):not(.icon-btn):not(.copy-btn):not([title="מלא נתוני הכנסות"]),
html body .desktop-table tr.row-completed select,
html body .desktop-table tr.row-completed .status-badge,
html body .desktop-table tr.row-completed > td:not(:first-child) .icon-btn,
html body .desktop-table tr.row-completed > td:not(:first-child) .copy-btn {
    background: #fff !important;
    color: #71717a !important;
    border: 1px solid #e4e4e7 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}
html body .desktop-table tr.row-completed button:not(.reopen-campaign-btn):not(.star-btn):not(.icon-btn):not(.copy-btn):not([title="מלא נתוני הכנסות"]):hover { background: #fafafa !important; color: #3f3f46 !important; }
html body .desktop-table tr.row-completed .content-preview { background: #fff !important; border-color: #ececef !important; color: #71717a !important; }
html body .desktop-table tr.row-completed input:not([type="checkbox"]),
html body .desktop-table tr.row-completed textarea { background: #fff !important; border-color: #ececef !important; color: #71717a !important; }
/* The two real actions on a closed campaign */
html body .desktop-table tr.row-completed .reopen-campaign-btn {
    background: #fff !important;
    color: #18181b !important;
    border: 1px solid #d4d4d8 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(16,24,40,0.05) !important;
}
html body .desktop-table tr.row-completed .reopen-campaign-btn:hover { background: #f4f4f5 !important; border-color: #a1a1aa !important; }
html body .desktop-table tr.row-completed.row-completed.row-completed button[title="מלא נתוני הכנסות"][class] {
    background: #16a34a !important;
    color: #fff !important;
    border: 1px solid #16a34a !important;
    border-radius: 8px !important;
}
/* "Closed campaign" band along the bottom of the whole row (desktop) */
@media (min-width: 769px) {
    html body .desktop-table tr.row-completed > td { padding-bottom: 30px !important; }
    html body .desktop-table tr.row-completed > td:nth-child(n+3) { position: relative; }
    html body .desktop-table tr.row-completed > td:first-child { z-index: 201 !important; }
    /* Keep the sticky header above the band (rows 200/201) and below the two corner headers (300) */
    html body .desktop-table thead th:nth-child(n+3) { z-index: 250 !important; }
    html body .desktop-table tr.row-completed > td::after {
        content: "";
        position: absolute;
        right: 0; left: 0; bottom: 0;
        height: 22px;
        background: #fbe9e9;
        border-top: 1px solid #f1caca;
        pointer-events: none;
    }
    /* The label band hangs off the sticky first cell and spans the visible table width,
       so "קמפיין סגור" stays centred while the table scrolls sideways */
    html body .desktop-table tr.row-completed > td:first-child::after {
        content: "קמפיין סגור";
        left: auto;
        right: 0;
        width: 100cqw;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.3px;
        color: #b91c1c;
        white-space: nowrap;
        z-index: 3;
    }
}
html body .desktop-table tr.row-completed.row-completed.row-completed button[title="מלא נתוני הכנסות"][class]:hover { background: #15803d !important; border-color: #15803d !important; }
