/* =========================================================
   CRM UI SYSTEM LAYER
   Purpose: stable cross-device/cross-browser overrides
   Loaded after legacy custom.css
   ========================================================= */

/* -------- Design Tokens -------- */
:root {
    --crm-font-sans: "Inter", "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --crm-icon-font: "Material Symbols Outlined", "Material Icons", "Segoe UI Symbol", sans-serif;

    --crm-color-bg: #f7fbff;
    --crm-color-surface: #eef5fc;
    --crm-color-surface-strong: #e4eef8;
    --crm-color-border: #cfe0f2;
    --crm-color-border-strong: #a9c6e3;
    --crm-color-text: #345778;
    --crm-color-text-muted: #6a87a5;
    --crm-color-danger-bg: #fff1f1;
    --crm-color-danger-border: #f1c8c8;
    --crm-color-danger-text: #a54d4d;

    --crm-radius-pill: 9999px;
    --crm-radius-card: 22px;
    --crm-radius-inner: 16px;

    --crm-space-1: 6px;
    --crm-space-2: 10px;
    --crm-space-3: 14px;
    --crm-space-4: 18px;
    --crm-space-5: 24px;

    --crm-control-height: 52px;
    --crm-control-height-sm: 44px;
    --crm-header-height: 62px;

    --crm-search-max: 760px;
    --crm-table-gap: 10px;
}

/* CRM-wide sticky top header. Keep the outer Unfold header pinned while page content scrolls. */
html body:not(.login) #main > .bg-white.border-b,
html body:not(.login) #main > .bg-white.border-b.border-base-200 {
    position: sticky !important;
    top: 0 !important;
    z-index: 160 !important;
    overflow: visible !important;
    background: transparent !important;
    border-color: transparent !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none !important;
}

html body:not(.login) #header-inner {
    position: relative !important;
    z-index: 161 !important;
}

html body:not(.login) #header-inner,
html body:not(.login) #header-inner > .flex.items-center.w-full,
html body:not(.login) #header-inner .ml-auto,
html body:not(.login) #header-inner .ml-auto > div,
html body:not(.login) #header-inner .crm-user-menu-wrap {
    overflow: visible !important;
}

html body:not(.login):not(.crm-header-card) #header-inner > .flex.items-center.w-full {
    box-sizing: border-box !important;
    min-height: 54px !important;
    min-width: 0 !important;
    padding: 6px 50px !important;
    border: 1px solid #d6e3f1 !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, rgba(252, 254, 255, 0.96) 0%, rgba(243, 249, 255, 0.90) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 2px 10px rgba(31, 73, 117, 0.08) !important;
}

html.dark body:not(.login):not(.crm-header-card) #header-inner > .flex.items-center.w-full,
html.dark[data-crm-theme="dark"] body:not(.login):not(.crm-header-card) #header-inner > .flex.items-center.w-full {
    border-color: #2b4058 !important;
    background: linear-gradient(180deg, rgba(17, 28, 43, 0.95) 0%, rgba(11, 21, 34, 0.92) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 22px rgba(2, 7, 13, 0.42) !important;
}

html.dark body:not(.login) #main > .bg-white.border-b,
html.dark[data-crm-theme="dark"] body:not(.login) #main > .bg-white.border-b,
html.dark body:not(.login) #main > .bg-white.border-b.border-base-200,
html.dark[data-crm-theme="dark"] body:not(.login) #main > .bg-white.border-b.border-base-200 {
    background: rgba(15, 23, 36, 0.86) !important;
    border-color: rgba(52, 70, 95, 0.82) !important;
    box-shadow: 0 14px 34px rgba(2, 8, 18, 0.38) !important;
}

@media (min-width: 1025px) {
    body.model-client.change-list #result_list td.field-display_comment .js-inline-comment {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-height: 30px !important;
        cursor: text !important;
    }
}

body:is(.model-client, .model-subscriber).change-list #result_list td.field-display_comment .js-inline-comment:has(.js-comment-toggle) {
    align-items: flex-start !important;
    display: block !important;
}

body:is(.model-client, .model-subscriber).change-list #result_list td.field-display_comment .js-inline-comment .comment.comment-collapsible {
    max-height: 3.75em !important;
    overflow: hidden !important;
}

body:is(.model-client, .model-subscriber).change-list #result_list td.field-display_comment .js-inline-comment.is-expanded .comment.comment-collapsible {
    max-height: none !important;
}

/* Client quality chips: selected state keeps semantic color (danger/warning/success) with higher contrast. */
body.model-client.change-list .client-quality-banner .client-quality-chip.crm-state--selected.client-quality-chip--base-danger {
    --crm-state-border-color: #cc8f8f !important;
    --crm-state-bg-color: linear-gradient(180deg, #f1b8b8 0%, #d99494 100%) !important;
    --crm-state-text-color: #5f1f1f !important;
    border-color: #cc8f8f !important;
    background: linear-gradient(180deg, #f1b8b8 0%, #d99494 100%) !important;
    color: #5f1f1f !important;
    -webkit-text-fill-color: #5f1f1f !important;
}

body.model-client.change-list .client-quality-banner .client-quality-chip.crm-state--selected.client-quality-chip--base-warning {
    --crm-state-border-color: #d5ad66 !important;
    --crm-state-bg-color: linear-gradient(180deg, #f2d799 0%, #e0be72 100%) !important;
    --crm-state-text-color: #5f4518 !important;
    border-color: #d5ad66 !important;
    background: linear-gradient(180deg, #f2d799 0%, #e0be72 100%) !important;
    color: #5f4518 !important;
    -webkit-text-fill-color: #5f4518 !important;
}

body.model-client.change-list .client-quality-banner .client-quality-chip.crm-state--selected.client-quality-chip--base-success {
    --crm-state-border-color: #87b89d !important;
    --crm-state-bg-color: linear-gradient(180deg, #bce3ca 0%, #9fccb1 100%) !important;
    --crm-state-text-color: #17492f !important;
    border-color: #87b89d !important;
    background: linear-gradient(180deg, #bce3ca 0%, #9fccb1 100%) !important;
    color: #17492f !important;
    -webkit-text-fill-color: #17492f !important;
}

html.dark body.crm-core-theme.model-client.change-list .client-quality-banner .client-quality-chip.crm-state--selected.client-quality-chip--base-danger {
    --crm-state-border-color: #a56572 !important;
    --crm-state-bg-color: linear-gradient(180deg, #643340 0%, #542b36 100%) !important;
    --crm-state-text-color: #ffd6de !important;
    border-color: #a56572 !important;
    background: linear-gradient(180deg, #643340 0%, #542b36 100%) !important;
    color: #ffd6de !important;
    -webkit-text-fill-color: #ffd6de !important;
}

html.dark body.crm-core-theme.model-client.change-list .client-quality-banner .client-quality-chip.crm-state--selected.client-quality-chip--base-warning {
    --crm-state-border-color: #a48454 !important;
    --crm-state-bg-color: linear-gradient(180deg, #5f4827 0%, #503d22 100%) !important;
    --crm-state-text-color: #ffe5b2 !important;
    border-color: #a48454 !important;
    background: linear-gradient(180deg, #5f4827 0%, #503d22 100%) !important;
    color: #ffe5b2 !important;
    -webkit-text-fill-color: #ffe5b2 !important;
}

html.dark body.crm-core-theme.model-client.change-list .client-quality-banner .client-quality-chip.crm-state--selected.client-quality-chip--base-success {
    --crm-state-border-color: #5d9576 !important;
    --crm-state-bg-color: linear-gradient(180deg, #2d5844 0%, #264b3a 100%) !important;
    --crm-state-text-color: #c9f0da !important;
    border-color: #5d9576 !important;
    background: linear-gradient(180deg, #2d5844 0%, #264b3a 100%) !important;
    color: #c9f0da !important;
    -webkit-text-fill-color: #c9f0da !important;
}

/* Subscriber chips: selected state keeps semantic color (warning/success/neutral), no blue override. */
body.model-subscriber.change-list .subscriber-sync-panel .subscriber-sync-chip.crm-state--selected.subscriber-sync-chip--base-warning {
    --crm-state-border-color: #d5ad66 !important;
    --crm-state-bg-color: linear-gradient(180deg, #f2d799 0%, #e0be72 100%) !important;
    --crm-state-text-color: #5f4518 !important;
    border-color: #d5ad66 !important;
    background: linear-gradient(180deg, #f2d799 0%, #e0be72 100%) !important;
    color: #5f4518 !important;
    -webkit-text-fill-color: #5f4518 !important;
}

body.model-subscriber.change-list .subscriber-sync-panel .subscriber-sync-chip.crm-state--selected.subscriber-sync-chip--base-success {
    --crm-state-border-color: #87b89d !important;
    --crm-state-bg-color: linear-gradient(180deg, #bce3ca 0%, #9fccb1 100%) !important;
    --crm-state-text-color: #17492f !important;
    border-color: #87b89d !important;
    background: linear-gradient(180deg, #bce3ca 0%, #9fccb1 100%) !important;
    color: #17492f !important;
    -webkit-text-fill-color: #17492f !important;
}

body.model-subscriber.change-list .subscriber-sync-panel .subscriber-sync-chip.crm-state--selected.subscriber-sync-chip--base-neutral {
    --crm-state-border-color: #9eb5cb !important;
    --crm-state-bg-color: linear-gradient(180deg, #d8e4f0 0%, #c8d7e6 100%) !important;
    --crm-state-text-color: #28455f !important;
    border-color: #9eb5cb !important;
    background: linear-gradient(180deg, #d8e4f0 0%, #c8d7e6 100%) !important;
    color: #28455f !important;
    -webkit-text-fill-color: #28455f !important;
}

html.dark body.crm-core-theme.model-subscriber.change-list .subscriber-sync-panel .subscriber-sync-chip.crm-state--selected.subscriber-sync-chip--base-warning {
    --crm-state-border-color: #a48454 !important;
    --crm-state-bg-color: linear-gradient(180deg, #5f4827 0%, #503d22 100%) !important;
    --crm-state-text-color: #ffe5b2 !important;
    border-color: #a48454 !important;
    background: linear-gradient(180deg, #5f4827 0%, #503d22 100%) !important;
    color: #ffe5b2 !important;
    -webkit-text-fill-color: #ffe5b2 !important;
}

html.dark body.crm-core-theme.model-subscriber.change-list .subscriber-sync-panel .subscriber-sync-chip.crm-state--selected.subscriber-sync-chip--base-success {
    --crm-state-border-color: #5d9576 !important;
    --crm-state-bg-color: linear-gradient(180deg, #2d5844 0%, #264b3a 100%) !important;
    --crm-state-text-color: #c9f0da !important;
    border-color: #5d9576 !important;
    background: linear-gradient(180deg, #2d5844 0%, #264b3a 100%) !important;
    color: #c9f0da !important;
    -webkit-text-fill-color: #c9f0da !important;
}

html.dark body.crm-core-theme.model-subscriber.change-list .subscriber-sync-panel .subscriber-sync-chip.crm-state--selected.subscriber-sync-chip--base-neutral {
    --crm-state-border-color: #617995 !important;
    --crm-state-bg-color: linear-gradient(180deg, #30465f 0%, #283c53 100%) !important;
    --crm-state-text-color: #d3e6fa !important;
    border-color: #617995 !important;
    background: linear-gradient(180deg, #30465f 0%, #283c53 100%) !important;
    color: #d3e6fa !important;
    -webkit-text-fill-color: #d3e6fa !important;
}

@media (min-width: 1025px) {
    /* Desktop: domain chip color must follow source channel palette, not bot/channel meta label. */
    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-enigma,
    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-enigma.domain-chip-has-meta {
        border-color: #e6db9f !important;
        background: #f7f0c9 !important;
        color: #5f4b00 !important;
        -webkit-text-fill-color: #5f4b00 !important;
    }

    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-cryptolab,
    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-cryptolab.domain-chip-has-meta {
        border-color: #d4c0ff !important;
        background: #eee6ff !important;
        color: #5f3a9b !important;
        -webkit-text-fill-color: #5f3a9b !important;
    }

    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-shark,
    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-shark.domain-chip-has-meta {
        border-color: #b8d4ff !important;
        background: #e6f0ff !important;
        color: #1f4f99 !important;
        -webkit-text-fill-color: #1f4f99 !important;
    }

    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-space,
    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-space.domain-chip-has-meta {
        border-color: #8fcfcd !important;
        background: #d9f5f2 !important;
        color: #1d706d !important;
        -webkit-text-fill-color: #1d706d !important;
    }

    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-pulse,
    body:is(.model-client, .model-subscriber).change-list #result_list td:is(.field-display_domain, .field-display_invite_link) .domain-chip.domain-chip-pulse.domain-chip-has-meta {
        border-color: #e2c45f !important;
        background: #ffefab !important;
        color: #7a5c00 !important;
        -webkit-text-fill-color: #7a5c00 !important;
    }
}

/* ===== Header user menu + admin index link stability (clients/subscribers/admin site) ===== */
html body:not(.login) #header-inner .ml-auto .crm-user-menu-wrap {
    position: relative !important;
    z-index: 140 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1 !important;
    text-decoration: none !important;
    color: #3f6283 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-trigger .material-symbols-outlined {
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    font-size: 20px !important;
    line-height: 1 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown {
    margin-top: 10px !important;
    min-width: 248px !important;
    width: 248px !important;
    max-width: min(92vw, 320px) !important;
    padding: 8px !important;
    border: 1px solid #d2e1ef !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(243, 250, 255, 0.96) 100%) !important;
    box-shadow: 0 12px 24px rgba(41, 77, 120, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
    z-index: 150 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-head {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-head > span {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #345879 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown :is(a, button).crm-user-menu-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #345879 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown :is(a, button).crm-user-menu-item:hover {
    border-color: #d5e6f5 !important;
    background: linear-gradient(180deg, #f8fcff 0%, #edf5ff 100%) !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown :is(button).crm-user-menu-item-danger {
    color: #d73a47 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown :is(button).crm-user-menu-item-danger:hover {
    border-color: #f4d2d7 !important;
    background: linear-gradient(180deg, #fff6f7 0%, #ffeef0 100%) !important;
}

html.dark body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown {
    border-color: #364c63 !important;
    background: linear-gradient(180deg, rgba(20, 32, 45, 0.98) 0%, rgba(16, 26, 36, 0.97) 100%) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) {
    border-color: #39516b !important;
    background: linear-gradient(180deg, rgba(21, 33, 47, 0.99) 0%, rgba(14, 23, 34, 0.98) 100%) !important;
    box-shadow: 0 20px 44px rgba(2, 8, 18, 0.52), inset 0 1px 0 rgba(179, 213, 248, 0.08) !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) .crm-user-menu-head {
    margin-bottom: 6px !important;
    border: 1px solid rgba(103, 140, 181, 0.28) !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, rgba(36, 57, 80, 0.92) 0%, rgba(27, 43, 62, 0.96) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(214, 233, 255, 0.06) !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) .crm-user-menu-head > span {
    color: #e7f1ff !important;
    -webkit-text-fill-color: #e7f1ff !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) .crm-user-menu-divider {
    border-color: rgba(86, 121, 158, 0.34) !important;
    opacity: 1 !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) :is(a, button).crm-user-menu-item {
    border-color: transparent !important;
    background: transparent !important;
    color: #d8e7f8 !important;
    -webkit-text-fill-color: #d8e7f8 !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) :is(a, button).crm-user-menu-item:hover {
    border-color: #4d6b8c !important;
    background: linear-gradient(180deg, rgba(46, 70, 96, 0.72) 0%, rgba(34, 54, 76, 0.78) 100%) !important;
    color: #f4f8ff !important;
    -webkit-text-fill-color: #f4f8ff !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) :is(button).crm-user-menu-item-danger {
    color: #ffb8bf !important;
    -webkit-text-fill-color: #ffb8bf !important;
}

html.dark body:not(.login) #header-inner .ml-auto :is(.crm-user-menu, .crm-user-menu-dropdown) :is(button).crm-user-menu-item-danger:hover {
    border-color: #7d4750 !important;
    background: linear-gradient(180deg, rgba(72, 31, 39, 0.92) 0%, rgba(54, 23, 30, 0.96) 100%) !important;
    color: #ffe7ea !important;
    -webkit-text-fill-color: #ffe7ea !important;
}

html.dark body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown :is(a, button).crm-user-menu-item {
    color: #d5e4f5 !important;
}

html.dark body:not(.login) #header-inner .ml-auto .crm-user-menu-head > span {
    color: #d5e4f5 !important;
}

html.dark body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown :is(a, button).crm-user-menu-item:hover {
    border-color: #45627f !important;
    background: linear-gradient(180deg, rgba(46, 70, 96, 0.50) 0%, rgba(38, 59, 82, 0.55) 100%) !important;
}

@media (max-width: 768px) {
    html body:not(.login) #header-inner .ml-auto .crm-user-menu-dropdown {
        right: 0 !important;
        left: auto !important;
        min-width: 220px !important;
        width: min(92vw, 260px) !important;
    }
}

/* Dark theme: keep sidebar "Аналитика" special look only when the item is active. */

html.dark body:not(.login) #nav-sidebar :is(a[href*="/admin/analytics"], a[href*="/admin/analitycs"])[aria-current="page"],
html.dark body:not(.login) #nav-sidebar .current-model :is(a[href*="/admin/analytics"], a[href*="/admin/analitycs"]),
html.dark body:not(.login) #nav-sidebar .active :is(a[href*="/admin/analytics"], a[href*="/admin/analitycs"]) {
    border-color: #7ba7d2 !important;
    background:
        radial-gradient(120% 140% at 15% 100%, rgba(125, 170, 214, 0.25) 0%, rgba(125, 170, 214, 0) 60%),
        linear-gradient(180deg, rgba(62, 96, 131, 0.92) 0%, rgba(46, 76, 106, 0.94) 100%) !important;
    color: #f2f8ff !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

/* Keep sidebar brand title link always clickable in admin section pages */
html body:not(.login) #nav-sidebar-inner > div.border-b > div.bg-transparent {
    position: relative !important;
    z-index: 1 !important;
}

html body:not(.login) #nav-sidebar-inner > div.border-b > div.bg-transparent :is(a, #site-name a, .text-important a) {
    position: relative !important;
    z-index: 2 !important;
    pointer-events: auto !important;
}

html body:not(.login) #nav-sidebar-inner > div.border-b > div.bg-transparent .crm-side-brand-icon {
    color: #486580 !important;
}

html.dark body:not(.login) #nav-sidebar-inner > div.border-b > div.bg-transparent .crm-side-brand-icon {
    color: #d5e4f5 !important;
}

/* ===== Analytics page: remove global top divider + top glow artifacts ===== */
html body.crm-analytics #main > .crm-navigation-header {
    border-bottom: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

html body.crm-analytics #main > .crm-navigation-header::before,
html body.crm-analytics #main > .crm-navigation-header::after {
    border: 0 !important;
    box-shadow: none !important;
}

html body.crm-analytics .analytics-head {
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html body.crm-analytics .analytics-head :is(.back-btn, .theme-switch, .period-switch) {
    box-shadow: none !important;
}

/* Dashboard parity: do not clip user dropdown in header on /admin/ */
html body.crm-dashboard #header-inner,
html body.crm-dashboard #header-inner > .flex.items-center.w-full,
html body.crm-dashboard #header-inner .ml-auto,
html body.crm-dashboard #header-inner .ml-auto > div,
html body.crm-dashboard #header-inner .crm-user-menu-wrap {
    overflow: visible !important;
}

html body.crm-dashboard #header-inner .crm-user-menu-wrap,
html body.crm-dashboard #header-inner .crm-user-menu-trigger,
html body.crm-dashboard #header-inner .crm-user-menu-dropdown {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 180 !important;
}

html body.crm-dashboard #header-inner .crm-user-menu-dropdown {
    position: absolute !important;
    z-index: 190 !important;
}

/* ===== Theme Completeness Layer (CRM-wide) ===== */
.client-quality-chip {
    border-color: #d6e4f3 !important;
    background: #f7fbff !important;
    color: #5f7896 !important;
    box-shadow: none !important;
}

.client-quality-chip:hover {
    border-color: #b9d0e8 !important;
    background: #edf5ff !important;
}

.client-quality-chip.is-active {
    border-color: #9fc8e8 !important;
    background: #e6f3ff !important;
    color: #285681 !important;
    box-shadow: 0 0 0 3px rgba(125, 172, 215, 0.18) !important;
}

.client-quality-chip.is-idle {
    border-color: #d9e5f2 !important;
    background: #f6fbff !important;
    color: #667f99 !important;
}

.client-quality-chip.is-alert {
    border-color: #efc2c9 !important;
    background: #fdeff1 !important;
    color: #a34252 !important;
}

.client-quality-chip.is-alert-active {
    border-color: #de7d8f !important;
    background: #fce2e6 !important;
    color: #8f2d3f !important;
    box-shadow: 0 0 0 3px rgba(222, 125, 143, 0.18) !important;
}

.client-quality-chip.is-ok {
    border-color: #bfe4d0 !important;
    background: #eefaf4 !important;
    color: #1d764e !important;
}

.subscriber-sync-chip-ok {
    border-color: #bfe4d0 !important;
    background: #eefaf4 !important;
    color: #1d764e !important;
}

/* Keep "Google Sheets в порядке" in the same green metric style
   as "Без даты подписки: 0" on the clients banner. */
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-ok {
    border-color: #bfe4d0 !important;
    background: #eefaf4 !important;
    color: #1d764e !important;
    box-shadow: none !important;
}

.subscriber-sync-chip-muted {
    border-color: #cddceb !important;
    background: #f4f9ff !important;
    color: #5f7896 !important;
}

.subscriber-sync-chip-alert,
.subscriber-sync-chip-error,
.subscriber-sync-chip-problem {
    border-color: #efc2c9 !important;
    background: #fdeff1 !important;
    color: #a34252 !important;
}

.subscriber-sync-chip-link {
    border-color: #c6d8ea !important;
    background: #f7fbff !important;
    color: #3b5b7d !important;
}

.subscriber-sync-chip-link:hover {
    border-color: #aec4dd !important;
    background: #edf5ff !important;
    color: #2d4e72 !important;
}

.subscriber-sync-chip-alert-active {
    border-color: #de7d8f !important;
    background: #fce2e6 !important;
    color: #8f2d3f !important;
    box-shadow: 0 0 0 3px rgba(222, 125, 143, 0.18) !important;
}

.subscriber-sync-chip-idle-active {
    border-color: #c6d6e7 !important;
    background: #f4f8fc !important;
    color: #3a536f !important;
}

html.dark body:not(.login) {
    color-scheme: dark;
}

html.dark body:not(.login) #modal-overlay {
    background: rgba(7, 12, 22, 0.68) !important;
    backdrop-filter: blur(2px);
}

html.dark body:not(.login) :is(.alert, .messagelist li, .help, .errornote) {
    border-color: #3b526f !important;
    background: #1c283a !important;
    color: #d0dceb !important;
}

html.dark body:not(.login) .messagelist li.success {
    border-color: #3f7a61 !important;
    background: #1d3a2f !important;
    color: #a4d9c0 !important;
}

html.dark body:not(.login) .messagelist li.warning {
    border-color: #816948 !important;
    background: #3a2f1f !important;
    color: #e6c58e !important;
}

html.dark body:not(.login) .messagelist li.error,
html.dark body:not(.login) .errornote {
    border-color: #7c4455 !important;
    background: #3a222c !important;
    color: #efbfca !important;
}

html.dark body:not(.login) :is(input[type="text"], input[type="number"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="datetime-local"], textarea, select):not(#searchbar):not([type="submit"]):not([type="button"]) {
    border-color: #3a4f67 !important;
    background: #1d2a3e !important;
    color: #d4e1f3 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html.dark body:not(.login) :is(input[type="text"], input[type="number"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="datetime-local"], textarea, select):not(#searchbar):not([type="submit"]):not([type="button"]):focus {
    border-color: #6a8ebf !important;
    box-shadow: 0 0 0 3px rgba(106, 142, 191, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    outline: none !important;
}

html.dark body:not(.login) :is(input, textarea)::placeholder {
    color: #8ea4c0 !important;
}

html.dark body:not(.login) :is(input[disabled], select[disabled], textarea[disabled], button[disabled]) {
    opacity: 0.64;
    cursor: not-allowed;
}

html.dark body:not(.login) :is(input[type="checkbox"], input[type="radio"]) {
    accent-color: #76a9ee;
}

html.dark body:not(.login) .select2-container--default .select2-selection--single,
html.dark body:not(.login) .select2-container--default .select2-selection--multiple {
    border-color: #3a4f67 !important;
    background: #1d2a3e !important;
    color: #d6e3f4 !important;
}

html.dark body:not(.login) .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #d6e3f4 !important;
}

html.dark body:not(.login) .select2-dropdown {
    border-color: #3a4f67 !important;
    background: #1b2739 !important;
    color: #d2deef !important;
}

html.dark body:not(.login) .select2-container--default .select2-results__option {
    color: #cddbed !important;
}

html.dark body:not(.login) .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #29415f !important;
    color: #e5eefc !important;
}

html.dark body.change-list :is(.paginator, .pagination, #changelist .pagination) {
    color: #b8cde6 !important;
}

html.dark body.change-list :is(.paginator a, .pagination a, #changelist .pagination a) {
    border-color: #3a5069 !important;
    background: #1d2a3d !important;
    color: #cdddf2 !important;
}

html.dark body.change-list :is(.paginator .this-page, .pagination .this-page, #changelist .pagination .this-page) {
    border-color: #6f93c4 !important;
    background: #274164 !important;
    color: #edf4ff !important;
}

.crm-bulk-actions-rail {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.crm-bulk-actions-surface {
    background: linear-gradient(180deg, rgba(246, 252, 255, 0.97) 0%, rgba(231, 243, 253, 0.94) 100%) !important;
    border: 1px solid #c7d8e8 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
}

html.dark :is(body.model-client, body.model-domain, body.model-subscriber).change-list #changelist-actions-wrapper,
html.dark :is(body.model-client, body.model-domain, body.model-subscriber).change-list #changelist-actions,
html.dark :is(body.model-client, body.model-domain, body.model-subscriber).change-list #changelist-actions .crm-bulk-actions-surface {
    background: linear-gradient(180deg, #1c283b 0%, #182334 100%) !important;
    border-color: #334a62 !important;
    box-shadow: 0 10px 22px rgba(5, 12, 23, 0.36) !important;
}

html.dark :is(body.model-client, body.model-domain, body.model-subscriber).change-list #changelist-actions select[name="action"] {
    border-color: #3b516a !important;
    background: #213046 !important;
    color: #d2dff1 !important;
}

html.dark :is(body.model-client, body.model-domain, body.model-subscriber).change-list #changelist-actions button[name="index"] {
    background: #6fa5f4 !important;
    border-color: #6fa5f4 !important;
    color: #10243c !important;
}

html.dark body:not(.login) :is(.calendarbox, .clockbox, #calendarbox, #clockbox) {
    border-color: #38506b !important;
    background: #162133 !important;
    color: #cfdbec !important;
    box-shadow: 0 14px 24px rgba(4, 10, 20, 0.5) !important;
}

html.dark body:not(.login) :is(.calendarbox table, .clockbox table, #calendarbox table, #clockbox table) {
    background: transparent !important;
    color: #cfdbec !important;
}

html.dark body:not(.login) :is(.calendarbox caption, #calendarbox caption) {
    color: #dbe6f5 !important;
}

html.dark body:not(.login) :is(.calendarbox th, .calendarbox td, #calendarbox th, #calendarbox td) {
    border-color: #2d4159 !important;
    color: #c6d6ea !important;
}

html.dark body:not(.login) :is(.calendarbox td.selected, #calendarbox td.selected) {
    background: #284365 !important;
}

html.dark .client-quality-chip {
    border-color: #3c5270 !important;
    background: #1d2b3f !important;
    color: #a9c0db !important;
}

html.dark .client-quality-chip:hover {
    border-color: #58779f !important;
    background: #24354d !important;
}

html.dark .client-quality-chip.is-active {
    border-color: #5f84b5 !important;
    background: #2a3f5d !important;
    color: #d6e6fa !important;
    box-shadow: 0 0 0 3px rgba(95, 132, 181, 0.22) !important;
}

html.dark .client-quality-chip.is-idle {
    border-color: #3a5069 !important;
    background: #1d2a3d !important;
    color: #9fb4ce !important;
}

html.dark .client-quality-chip.is-alert {
    border-color: #7f4d5e !important;
    background: #3a242d !important;
    color: #f0bcc7 !important;
}

html.dark .client-quality-chip.is-alert-active {
    border-color: #a06175 !important;
    background: #472a34 !important;
    color: #ffd1db !important;
    box-shadow: 0 0 0 3px rgba(160, 97, 117, 0.24) !important;
}

html.dark .client-quality-chip.is-ok,
html.dark .subscriber-sync-chip-ok {
    border-color: #3f7a61 !important;
    background: #1f3b30 !important;
    color: #9ad2b9 !important;
}

html.dark .subscriber-sync-chip-alert-active {
    border-color: #a06175 !important;
    background: #472a34 !important;
    color: #ffd1db !important;
    box-shadow: 0 0 0 3px rgba(160, 97, 117, 0.24) !important;
}

html.dark .subscriber-sync-chip-idle-active {
    border-color: #4a6382 !important;
    background: #22344d !important;
    color: #b8cce5 !important;
}

html.dark .subscriber-sync-chip-muted {
    border-color: #4a6382 !important;
    background: #22344d !important;
    color: #b8cce5 !important;
}

html.dark .subscriber-sync-chip-alert,
html.dark .subscriber-sync-chip-error,
html.dark .subscriber-sync-chip-problem {
    border-color: #7f4d5e !important;
    background: #3a242d !important;
    color: #f0bcc7 !important;
}

html.dark .subscriber-sync-panel .subscriber-sync-chip-link {
    border-color: #425b78 !important;
    background: #213046 !important;
    color: #cbddf2 !important;
}

html.dark .subscriber-sync-panel .subscriber-sync-chip-link:hover {
    border-color: #597ca6 !important;
    background: #29415f !important;
    color: #e5eefc !important;
}

html.dark .subscriber-sync-panel .subscriber-sync-chip.border-red-200.bg-red-50,
html.dark .subscriber-sync-panel .subscriber-sync-chip-problem {
    border-color: #7f4d5e !important;
    background: #3a242d !important;
    color: #f0bcc7 !important;
}

html.dark .subscriber-sync-panel .subscriber-sync-chip.border-base-200.bg-base-50 {
    border-color: #445c79 !important;
    background: #23354d !important;
    color: #bed0e6 !important;
}

html.dark .subscriber-diagnostics-shell .bg-white {
    background: #182334 !important;
}

html.dark .subscriber-diagnostics-shell .bg-base-50 {
    background: #1f2d42 !important;
}

html.dark .subscriber-diagnostics-shell .border-base-200 {
    border-color: #30445d !important;
}

html.dark .subscriber-diagnostics-shell .border-base-100 {
    border-color: #2a3c53 !important;
}

html.dark .subscriber-diagnostics-shell .text-base-500,
html.dark .subscriber-diagnostics-shell .text-base-400 {
    color: #97aec8 !important;
}

html.dark .subscriber-diagnostics-shell .bg-yellow-50 {
    background: #3a3120 !important;
}

html.dark .subscriber-diagnostics-shell .border-yellow-200 {
    border-color: #7a6945 !important;
}

html.dark .subscriber-diagnostics-shell .text-yellow-800 {
    color: #e4c790 !important;
}

html.dark .subscriber-diagnostics-shell .bg-red-50 {
    background: #3a242d !important;
}

html.dark .subscriber-diagnostics-shell .border-red-200 {
    border-color: #7f4d5e !important;
}

html.dark .subscriber-diagnostics-shell .text-red-800,
html.dark .subscriber-diagnostics-shell .text-red-700 {
    color: #f0bcc7 !important;
}

html.dark .subscriber-diagnostics-shell .bg-primary-600 {
    background: #6fa5f4 !important;
    border-color: #6fa5f4 !important;
    color: #10243c !important;
}

html.dark .subscriber-diagnostics-shell .bg-red-600 {
    background: #a06175 !important;
    border-color: #a06175 !important;
    color: #fde8ec !important;
}

/* ===== Global Theme Toggle (Header + Mobile User Menu) ===== */
.crm-theme-toggle-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.crm-theme-switch {
    position: relative;
    width: 72px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #c3d4e9;
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fd 100%);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0 10px;
    cursor: pointer;
    transition: border-color .2s ease, background .25s ease, box-shadow .25s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90), 0 6px 16px rgba(58, 91, 130, 0.18);
}

.crm-theme-switch:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 123, 186, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.crm-theme-switch__icon {
    width: 16px;
    height: 16px;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease, transform .2s ease, color .2s ease;
}

.crm-theme-switch__icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-theme-switch__icon--sun {
    color: #f2a334;
    opacity: .98;
}

.crm-theme-switch__icon--moon {
    color: #6f7f9b;
    opacity: .45;
}

.crm-theme-switch__thumb {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #f2f7fe 100%);
    border: 1px solid rgba(185, 203, 225, 0.9);
    box-shadow: 0 7px 15px rgba(48, 78, 114, 0.23);
    transition: transform .26s cubic-bezier(.33, 1, .68, 1), background .22s ease, border-color .22s ease;
}

.crm-theme-switch.is-dark {
    border-color: #405477;
    background: linear-gradient(180deg, #1f2d43 0%, #1a2639 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 18px rgba(4, 10, 21, 0.44);
}

.crm-theme-switch.is-dark .crm-theme-switch__icon--sun {
    color: #7a8da8;
    opacity: .5;
    transform: scale(.95);
}

.crm-theme-switch.is-dark .crm-theme-switch__icon--moon {
    color: #c7d6f0;
    opacity: 1;
    transform: scale(1.02);
}

.crm-theme-switch.is-dark .crm-theme-switch__thumb {
    transform: translateX(36px);
    background: linear-gradient(180deg, #d7e4f7 0%, #bdcde7 100%);
    border-color: #8da7cb;
    box-shadow: 0 8px 16px rgba(2, 8, 19, 0.48);
}

.crm-theme-switch__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Protect theme switch from legacy icon-reset rules in header actions */
html body:not(.login) #header-inner .ml-auto .crm-theme-toggle-slot .crm-theme-switch {
    width: 72px !important;
    height: 36px !important;
    min-width: 72px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    border: 1px solid #c3d4e9 !important;
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fd 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90), 0 6px 16px rgba(58, 91, 130, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
}

html body:not(.login) #header-inner .ml-auto .crm-theme-toggle-slot .crm-theme-switch.is-dark {
    border-color: #405477 !important;
    background: linear-gradient(180deg, #1f2d43 0%, #1a2639 100%) !important;
}

html body:not(.login) #header-inner .ml-auto .crm-hard-reload-button {
    align-items: center !important;
    background: radial-gradient(circle at 30% 24%, #ffffff 0%, #f4f9ff 42%, #e7f1fd 100%) !important;
    border: 1px solid #c5d7eb !important;
    border-radius: 999px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 8px 18px rgba(52, 86, 125, 0.18) !important;
    color: #426a95 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    height: 36px !important;
    justify-content: center !important;
    min-height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    position: relative !important;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, color .14s ease !important;
    width: 36px !important;
}

html body:not(.login) #header-inner .ml-auto .crm-hard-reload-button:hover {
    border-color: #8fb6de !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 10px 22px rgba(52, 100, 158, 0.26) !important;
    color: #2468a7 !important;
    transform: translateY(-1px) !important;
}

html body:not(.login) #header-inner .ml-auto .crm-hard-reload-button:active {
    transform: translateY(0) scale(0.96) !important;
}

html body:not(.login) #header-inner .ml-auto .crm-hard-reload-button svg {
    fill: none !important;
    height: 20px !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 2.15 !important;
    width: 20px !important;
}

html.dark body:not(.login) #header-inner .ml-auto .crm-hard-reload-button,
html.dark[data-crm-theme="dark"] body.crm-core-theme #header-inner .ml-auto .crm-hard-reload-button {
    background: radial-gradient(circle at 32% 20%, #30445f 0%, #213149 44%, #172338 100%) !important;
    border-color: #405477 !important;
    box-shadow:
        inset 0 1px 0 rgba(214, 233, 255, 0.10),
        0 9px 20px rgba(2, 8, 18, 0.34) !important;
    color: #a9c9ee !important;
}

html.dark body:not(.login) #header-inner .ml-auto .crm-hard-reload-button:hover,
html.dark[data-crm-theme="dark"] body.crm-core-theme #header-inner .ml-auto .crm-hard-reload-button:hover {
    border-color: #6488b5 !important;
    color: #d8ebff !important;
}

@media (max-width: 768px) {
    .crm-theme-switch {
        width: 60px;
        height: 32px;
        padding: 0 8px;
    }

    .crm-theme-switch__thumb {
        width: 24px;
        height: 24px;
    }

    .crm-theme-switch.is-dark .crm-theme-switch__thumb {
        transform: translateX(28px);
    }
}

/* ===== Unified Dark Theme Layer ===== */
html.dark body:not(.login) {
    background: radial-gradient(980px 420px at 14% -12%, rgba(83, 115, 162, 0.20) 0%, transparent 65%), #0f1622 !important;
    color: #d7e2f1 !important;
}

html.dark body:not(.login) #header-inner {
    border-color: #33465f !important;
    background: linear-gradient(180deg, #1d2738 0%, #192232 100%) !important;
    box-shadow: 0 10px 22px rgba(4, 10, 21, 0.38) !important;
}

html.dark body:not(.login) #header-inner :is(h1, h1 a, h1 span) {
    color: #dce6f5 !important;
}

html.dark body.change-list :is(#changelist-search form, #toolbar form) {
    border-color: #3b4e67 !important;
    background: linear-gradient(180deg, #1d2838 0%, #1a2332 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html.dark body.change-list :is(#changelist-search form, #toolbar form):focus-within {
    border-color: #628abf !important;
    box-shadow: 0 0 0 2px rgba(108, 156, 224, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

html.dark body.change-list :is(#searchbar, input[name="q"]) {
    color: #d8e3f2 !important;
}

html.dark body.change-list :is(#searchbar-submit, button#searchbar-submit)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%239cb9de' stroke-width='2.3'/%3E%3Cpath d='M16 16L21 21' stroke='%239cb9de' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

html.dark body.change-list #changelist a[x-on\:click="filterOpen = true"],
html.dark body.change-list #header-inner :is(.object-tools, .ml-auto) :is(a.addlink, button.addlink) {
    border-color: #3b4e67 !important;
    background: linear-gradient(180deg, #222f43 0%, #1d2838 100%) !important;
    color: #d2dff1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

html.dark body.change-list #header-inner :is(.object-tools, .ml-auto) :is(a.addlink, button.addlink):hover,
html.dark body.change-list #changelist a[x-on\:click="filterOpen = true"]:hover {
    border-color: #6f92c2 !important;
    color: #e5edf8 !important;
}

html.dark :is(.id-chip, .data-wrapper, .date-chip, .date-chip-empty, .geo-chip, .geo-chip-empty, .user-chip, .domain-chip, .channel-chip, .comment-chip, .capital-chip) {
    border-color: #3a4f68 !important;
    background: linear-gradient(180deg, rgba(35, 47, 66, 0.95) 0%, rgba(29, 40, 57, 0.95) 100%) !important;
    color: #c9d7ea !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 14px rgba(2, 8, 18, 0.34) !important;
}

html.dark :is(.user-chip-sub, .geo-city, .comment-empty) {
    color: #95aac4 !important;
}

html.dark :is(.status_unknown, .status_afk, .status_double) {
    border-color: #46556d !important;
    background: #2a3548 !important;
    color: #b4c2d7 !important;
}

html.dark .status_new {
    border-color: #4d6689 !important;
    background: #24364f !important;
    color: #afc8e7 !important;
}

html.dark .status_deposit {
    border-color: #3d718f !important;
    background: #1f3f54 !important;
    color: #8dc8ec !important;
}

html.dark .status_understanding {
    border-color: #8d7540 !important;
    background: #41351f !important;
    color: #e4c88a !important;
}

html.dark .status_work {
    border-color: #3f7a58 !important;
    background: #1f3d2d !important;
    color: #96d5ae !important;
}

html.dark .status_register {
    border-color: #8e6a3b !important;
    background: #43311f !important;
    color: #e6bf8c !important;
}

html.dark tbody tr:hover {
    background: linear-gradient(82deg, rgba(0, 0, 0, 0) 0%, rgba(98, 140, 202, 0.21) 52%, rgba(137, 180, 228, 0.11) 100%);
}

/* ===== Subscriber Changelist: desktop dark polish (no mobile/analytics/traffic) ===== */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme.model-subscriber.change-list {
        --crm-state-border-neutral: #445c77;
        --crm-state-bg-neutral: linear-gradient(180deg, #2a394d 0%, #233145 100%);
        --crm-state-text-neutral: #d3e1f2;
        --crm-state-border-info: #4f6f97;
        --crm-state-bg-info: linear-gradient(180deg, #27415f 0%, #203753 100%);
        --crm-state-text-info: #c9ddf4;
        --crm-state-border-success: #3f7458;
        --crm-state-bg-success: linear-gradient(180deg, #214334 0%, #1a372a 100%);
        --crm-state-text-success: #b7e4ca;
        --crm-state-border-warning: #846b3e;
        --crm-state-bg-warning: linear-gradient(180deg, #43361f 0%, #382d1a 100%);
        --crm-state-text-warning: #e6cb90;
        --crm-state-border-danger: #87505a;
        --crm-state-bg-danger: linear-gradient(180deg, #6f3a46 0%, #5d3039 100%);
        --crm-state-text-danger: #f9dde2;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #page > .bg-base-50.relative.z-30 {
        background: transparent !important;
        background-image: none !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #main > .bg-white.border-b,
    html.dark body.crm-core-theme.model-subscriber.change-list #main > .bg-white.border-b.border-base-200 {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        margin-top: 8px !important;
        margin-bottom: 10px !important;
        padding-top: 0 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #main > .bg-white.border-b > .container,
    html.dark body.crm-core-theme.model-subscriber.change-list #main > .bg-white.border-b.border-base-200 > .container {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 14px rgba(2, 8, 18, 0.34) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist a[x-on\:click="openFilters()"] {
        border-color: #3b4e67 !important;
        background: linear-gradient(180deg, #222f43 0%, #1d2838 100%) !important;
        color: #d2dff1 !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist a[x-on\:click="openFilters()"]:hover {
        border-color: #6f92c2 !important;
        color: #e5edf8 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip.geo-chip-empty {
        border-color: rgba(121, 173, 224, 0.46) !important;
        background: linear-gradient(180deg, rgba(43, 66, 92, 0.46) 0%, rgba(35, 55, 77, 0.52) 100%) !important;
        color: #c8ddf2 !important;
        -webkit-text-fill-color: #c8ddf2 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-channel {
        border-color: rgba(120, 214, 166, 0.45) !important;
        background: linear-gradient(180deg, rgba(28, 78, 52, 0.36) 0%, rgba(24, 65, 44, 0.42) 100%) !important;
        color: #a9e5c4 !important;
        -webkit-text-fill-color: #a9e5c4 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-bot {
        border-color: #8d7540 !important;
        background: linear-gradient(180deg, #41351f 0%, #362c1a 100%) !important;
        color: #e4c88a !important;
        -webkit-text-fill-color: #e4c88a !important;
    }
}

html.dark table tr.selected td,
html.dark table tr.selected th {
    background-color: rgba(95, 143, 210, 0.24) !important;
}

html.dark body.model-client #result_list tbody tr td,
html.dark body.model-subscriber #result_list tbody tr td,
html.dark body.model-domain #result_list tbody tr td {
    background: linear-gradient(180deg, rgba(31, 43, 60, 0.94) 0%, rgba(25, 35, 49, 0.94) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

html.dark :is(.inline-edit-control, .inline-edit-control:focus) {
    background: #1a2638 !important;
    border-color: #435974 !important;
    color: #d6e2f2 !important;
}

html.dark .js-inline-copy-id,
html.dark .js-inline-copy-username {
    color: #9eb9db !important;
}

html.dark .js-inline-copy-id:hover,
html.dark .js-inline-copy-username:hover {
    background: rgba(110, 154, 216, 0.16) !important;
    color: #d6e7fb !important;
}

/* -------- Status chip fit fix: keep only "Регистрация" in one line -------- */
html body.model-client.change-list #result_list td.field-display_status .status-chip.status_register {
    width: 122px !important;
    min-width: 122px !important;
    max-width: 122px !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

/* -------- Subscriber diagnostics: mismatch chip must stay red -------- */
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem,
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:link,
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:visited,
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:hover,
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:focus,
body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:active {
    border-color: #f4b6be !important;
    background: linear-gradient(180deg, #fff4f5 0%, #ffecef 100%) !important;
    color: #345879 !important;
    -webkit-text-fill-color: #345879 !important;
}

html.dark body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem,
html.dark body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:link,
html.dark body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:visited,
html.dark body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:hover,
html.dark body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:focus,
html.dark body.model-subscriber .subscriber-sync-panel .subscriber-sync-chip.subscriber-sync-chip-problem:active {
    border-color: #7f4d5e !important;
    background: #3a242d !important;
    color: #f0bcc7 !important;
    -webkit-text-fill-color: #f0bcc7 !important;
}

/* -------- Client date hierarchy: remove double border on back-year chip -------- */
body.model-client .toplinks li.date-back,
body.model-client .date-hierarchy li.date-back,
body.model-client .date_hierarchy li.date-back {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* -------- Base Stability -------- */
[x-cloak]:not(html):not(body) {
    display: none !important;
}

html[x-cloak],
body[x-cloak] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

html,
body {
    max-width: 100%;
}

body:not(.login) {
    font-family: var(--crm-font-sans) !important;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.material-symbols-outlined {
    font-family: var(--crm-icon-font) !important;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    white-space: nowrap;
    text-transform: none;
}

@supports (font-variation-settings: normal) {
    .material-symbols-outlined {
        font-variation-settings:
            "FILL" 0,
            "wght" 400,
            "GRAD" 0,
            "opsz" 24;
    }
}

/* -------- Shared Search Component (one capsule with icon) -------- */
html body.change-list :is(#changelist-search, #toolbar),
html body.change-list :is(#changelist-search, #toolbar) > div {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    width: min(100%, 280px) !important;
    max-width: 280px !important;
}

html body.change-list :is(#changelist-search form, #toolbar form) {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 36px !important;
    border: 1.5px solid #b9d1e8 !important;
    border-radius: var(--crm-radius-pill) !important;
    background: linear-gradient(180deg, #f2f8ff 0%, #eaf3fc 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    overflow: hidden !important;
    padding: 0 6px !important;
}

/* Single clean capsule contour on focus (no inner duplicate ring) */
html body.change-list :is(#changelist-search form, #toolbar form):focus-within {
    border-color: #9dbede !important;
    box-shadow: 0 0 0 2px rgba(157, 190, 222, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    outline: none !important;
}

/* Unfold inner wrapper: disable its own focus ring to avoid double capsule */
html body.change-list :is(#changelist-search > div, #toolbar form > div) {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

html body.change-list :is(#changelist-search > div, #toolbar form > div):focus-within {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Balance right icon with an invisible left slot so text stays truly centered */
html body.change-list :is(form#changelist-search, #toolbar form)::before {
    content: "" !important;
    flex: 0 0 22px !important;
    width: 22px !important;
}

html body.change-list :is(#searchbar, input[name="q"]) {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--crm-color-text) !important;
    padding: 0 10px !important;
    text-align: center !important;
    line-height: 36px !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

html body.change-list :is(#searchbar, input[name="q"])::placeholder {
    text-align: center !important;
}

html body.change-list :is(#searchbar, input[name="q"]):focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Keep search capsule clean: no extra shortcut badge inside */
html body.change-list :is(#changelist-search, #toolbar) kbd {
    display: none !important;
}

html body.change-list :is(#searchbar-submit, button#searchbar-submit) {
    position: static !important;
    transform: none !important;
    order: 2 !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--crm-color-text-muted) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-self: center !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body.change-list :is(#searchbar-submit, button#searchbar-submit):focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Beat older model-specific width:100% overrides from legacy custom.css */
html body:is(.model-client, .model-domain, .model-subscriber, .model-user, .model-group).change-list
  :is(#changelist-search, #toolbar, #toolbar form, #changelist-search form, #changelist-search > div) {
    width: min(100%, 180px) !important;
    max-width: 180px !important;
    min-width: 0 !important;
}

html body.change-list :is(#searchbar-submit, button#searchbar-submit) .material-symbols-outlined {
    display: none !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #5b7fa3 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html body.change-list :is(#searchbar-submit, button#searchbar-submit)::before {
    content: none !important;
}

html body.change-list :is(#searchbar-submit, button#searchbar-submit)::after {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    transform: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6.5' stroke='%235b7fa3' stroke-width='2.3'/%3E%3Cpath d='M16 16L21 21' stroke='%235b7fa3' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

/* Strong selectors to beat old model-specific !important rules in custom.css */
html body.change-list #changelist-search form #searchbar,
html body.change-list #toolbar form #searchbar,
html body.change-list #changelist-search form input[name="q"],
html body.change-list #toolbar form input[name="q"] {
    order: 1 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 10px !important;
    text-align: center !important;
    line-height: 36px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

html body.change-list #changelist-search form #searchbar-submit,
html body.change-list #toolbar form #searchbar-submit {
    position: static !important;
    transform: none !important;
    order: 2 !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
}

/* Keep desktop search compact but never narrower than safe control geometry */
@media (min-width: 1025px) {
    html body.change-list :is(#changelist-search, #toolbar, #toolbar form, #changelist-search form, #changelist-search > div) {
        width: min(100%, 180px) !important;
        min-width: 0 !important;
        max-width: 180px !important;
        box-sizing: border-box !important;
    }
}

/* -------- Shared Action Buttons -------- */
html body.change-list #changelist a[x-on\:click="filterOpen = true"],
html body.change-list #changelist a[x-on\:click="openFilters()"],
html body.change-list #header-inner :is(.object-tools, .ml-auto) :is(a.addlink, button.addlink) {
    border: 1px solid #b9d1e8 !important;
    border-radius: var(--crm-radius-pill) !important;
    min-height: var(--crm-control-height-sm) !important;
    color: var(--crm-color-text) !important;
    background: linear-gradient(180deg, #f2f8ff 0%, #eaf3fc 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html body.change-list #header-inner :is(.object-tools, .ml-auto) :is(a.addlink, button.addlink) {
    width: var(--crm-control-height-sm) !important;
    min-width: var(--crm-control-height-sm) !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body.change-list #header-inner :is(.object-tools, .ml-auto) :is(a.addlink, button.addlink) .material-symbols-outlined {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #5b7fa3 !important;
}

html.dark body.change-list #header-inner :is(.object-tools, .ml-auto) :is(a.addlink, button.addlink) .material-symbols-outlined {
    color: #9cb9de !important;
}

/* -------- Missing ID visual parity -------- */
html body.model-client.change-list #result_list td.field-display_id .id-chip {
    min-width: clamp(78px, 8.5vw, 108px) !important;
    justify-content: center !important;
}

html body.model-client.change-list #result_list td.field-display_id .id-chip.is-empty,
html body.model-client.change-list #result_list td.field-display_id .id-chip[data-empty="1"] {
    background: var(--crm-color-danger-bg) !important;
    border-color: var(--crm-color-danger-border) !important;
    color: var(--crm-color-danger-text) !important;
}

/* -------- Sidebar mobile title: force single "Панель" -------- */
@media (max-width: 768px) {
    #nav-sidebar-inner > div.border-b > div.bg-transparent #site-name {
        display: block !important;
        margin: 0 !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent .text-important > span.truncate::after {
        content: none !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent #site-name a {
        font-size: 0 !important;
        line-height: 0 !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent #site-name a::after {
        content: "Панель";
        font-size: 14px;
        line-height: 1.1;
        font-weight: 700;
        color: #4a6683;
    }
}

/* -------- Breakpoints: 1280 / 1024 / 768 / 390 / 360 -------- */
@media (max-width: 1280px) {
    :root {
        --crm-search-max: 680px;
    }
}

@media (max-width: 1024px) {
    :root {
        --crm-search-max: 620px;
    }

    /* Shared header component only for tablet/mobile to avoid desktop drift */
    html body:not(.login) #main > .bg-white.border-b {
        background: transparent !important;
        border-color: transparent !important;
        margin-top: var(--crm-space-3) !important;
        padding-top: 0 !important;
    }

    html body:not(.login) #header-inner {
        min-height: var(--crm-header-height) !important;
        border: 1px solid var(--crm-color-border) !important;
        border-radius: var(--crm-radius-card) !important;
        background: linear-gradient(180deg, #f2f8ff 0%, #edf5fd 100%) !important;
        padding: var(--crm-space-2) var(--crm-space-4) !important;
    }

    html body:not(.login) #header-inner h1,
    html body:not(.login) #header-inner h1 :is(a, span) {
        color: var(--crm-color-text) !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }

    /* Single mobile strategy for tables: horizontal scroll */
    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list {
        --crm-table-min-width: 900px;
    }

    html body.model-client.change-list {
        --crm-table-min-width: clamp(980px, 126vw, 1320px);
    }

    html body.model-subscriber.change-list {
        --crm-table-min-width: clamp(940px, 122vw, 1260px);
    }

    html body.model-domain.change-list {
        --crm-table-min-width: clamp(760px, 108vw, 980px);
    }

    html body.model-user.change-list {
        --crm-table-min-width: clamp(820px, 114vw, 1060px);
    }

    html body.model-group.change-list {
        --crm-table-min-width: clamp(660px, 104vw, 880px);
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #changelist-form > div[data-simplebar] {
        overflow-x: auto !important;
        overflow-y: visible !important;
        margin-inline: 0 !important;
        padding-inline: 0 !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list {
        display: table !important;
        width: max(100%, var(--crm-table-min-width)) !important;
        min-width: var(--crm-table-min-width) !important;
        border-collapse: separate !important;
        border-spacing: 0 var(--crm-table-gap) !important;
        table-layout: fixed !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list > thead {
        display: table-header-group !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list > tbody {
        display: table-row-group !important;
        background: transparent !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list > tbody > tr {
        display: table-row !important;
        background: transparent !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list > tbody > tr > :is(th, td) {
        display: table-cell !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        vertical-align: middle !important;
    }

    /* Clients mobile: dates must not render trailing ".." from cell ellipsis */
    html body.model-client.change-list #result_list > tbody > tr > td.field-display_created_date,
    html body.model-client.change-list #result_list > tbody > tr > td.field-display_subscribed_date {
        text-overflow: clip !important;
        overflow: visible !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list > :is(thead, tbody) > tr > th.action-checkbox-column,
    html body:is(.model-client, .model-subscriber, .model-domain, .model-user, .model-group).change-list #result_list > tbody > tr > :is(td, th).action-checkbox {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
    }

    html body:not(.login) #header-inner {
        padding-inline: var(--crm-space-3) !important;
    }

    /* Legacy mobile card rows (fallback only; crm-core-theme uses custom_mobile_v2.css) */
    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #changelist-form > div[data-simplebar] {
        overflow: visible !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
        border-spacing: 0 !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > thead {
        display: none !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody {
        display: block !important;
        background: transparent !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr {
        display: block !important;
        margin: 0 0 12px !important;
        border: 1.5px solid #c8dbef !important;
        border-radius: 16px !important;
        background: linear-gradient(180deg, rgba(253, 255, 255, 0.98) 0%, rgba(241, 248, 255, 0.92) 100%) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 6px 16px rgba(27, 56, 92, 0.10) !important;
        overflow: hidden !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr:last-child {
        margin-bottom: 0 !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > :is(th, td) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        min-height: 46px !important;
        padding: 10px 12px !important;
        border: 0 !important;
        border-bottom: 1px solid #dbe8f4 !important;
        background: transparent !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        vertical-align: middle !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > :is(th, td):last-child {
        border-bottom: 0 !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > td.action-checkbox,
    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > th.action-checkbox {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        justify-content: flex-start !important;
    }
}

/* ===== Subscribers Desktop Premium Dark (single final layer) ===== */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme.model-subscriber.change-list {
        --sub-premium-surface-1: #1a2638;
        --sub-premium-surface-2: #162133;
        --sub-premium-surface-3: #213149;
        --sub-premium-border: rgba(108, 147, 193, 0.34);
        --sub-premium-border-strong: rgba(130, 172, 221, 0.52);
        --sub-premium-text: #d9e8fb;
        --sub-premium-text-soft: #a9bfd8;
        --sub-premium-glow: 0 10px 22px rgba(3, 10, 20, 0.42);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > thead > tr > th {
        background: linear-gradient(180deg, rgba(37, 54, 78, 0.96) 0%, rgba(30, 45, 66, 0.98) 100%) !important;
        border-top-color: var(--sub-premium-border) !important;
        border-bottom-color: var(--sub-premium-border) !important;
        color: var(--sub-premium-text-soft) !important;
        font-size: 12px !important;
        letter-spacing: 0.02em !important;
        text-transform: uppercase !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td) {
        background: linear-gradient(180deg, rgba(30, 44, 64, 0.96) 0%, rgba(24, 36, 53, 0.98) 100%) !important;
        border-top-color: rgba(95, 130, 171, 0.42) !important;
        border-bottom-color: rgba(95, 130, 171, 0.42) !important;
        color: var(--sub-premium-text) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td):first-child {
        border-left-color: rgba(95, 130, 171, 0.42) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td):last-child {
        border-right-color: rgba(95, 130, 171, 0.42) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td) {
        background: linear-gradient(180deg, rgba(39, 59, 86, 0.96) 0%, rgba(31, 48, 71, 0.98) 100%) !important;
        border-top-color: var(--sub-premium-border-strong) !important;
        border-bottom-color: var(--sub-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td):first-child {
        border-left-color: var(--sub-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td):last-child {
        border-right-color: var(--sub-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td :is(.id-chip, .user-chip, .date-chip, .date-chip-empty, .geo-chip, .geo-chip-empty, .domain-chip, .channel-chip) {
        border-width: 1px !important;
        border-color: rgba(124, 164, 211, 0.38) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--sub-premium-glow) !important;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .id-chip {
        background: linear-gradient(180deg, rgba(86, 63, 138, 0.44) 0%, rgba(70, 51, 117, 0.52) 100%) !important;
        border-color: rgba(174, 145, 241, 0.52) !important;
        color: #dfceff !important;
        -webkit-text-fill-color: #dfceff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip {
        background: linear-gradient(180deg, rgba(45, 68, 98, 0.52) 0%, rgba(37, 56, 81, 0.56) 100%) !important;
        border-color: rgba(130, 175, 222, 0.48) !important;
        color: #d3e6fa !important;
        -webkit-text-fill-color: #d3e6fa !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip .user-chip-main-text {
        color: #e1eeff !important;
        -webkit-text-fill-color: #e1eeff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip .user-chip-sub {
        color: #9eb8d4 !important;
        -webkit-text-fill-color: #9eb8d4 !important;
        font-weight: 700 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip.geo-chip-empty {
        background: linear-gradient(180deg, rgba(45, 69, 95, 0.52) 0%, rgba(36, 56, 79, 0.58) 100%) !important;
        border-color: rgba(127, 177, 227, 0.52) !important;
        color: #d4e8ff !important;
        -webkit-text-fill-color: #d4e8ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip .geo-country {
        color: #e0efff !important;
        -webkit-text-fill-color: #e0efff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip .geo-city {
        color: #abc4de !important;
        -webkit-text-fill-color: #abc4de !important;
        font-weight: 700 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td :is(.date-chip, .date-chip-empty) {
        background: linear-gradient(180deg, rgba(42, 63, 90, 0.5) 0%, rgba(33, 51, 73, 0.56) 100%) !important;
        border-color: rgba(124, 165, 211, 0.45) !important;
        color: #cfe4fb !important;
        -webkit-text-fill-color: #cfe4fb !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-main {
        color: #d7ebff !important;
        -webkit-text-fill-color: #d7ebff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-meta {
        color: #a9c2dd !important;
        -webkit-text-fill-color: #a9c2dd !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-channel {
        background: linear-gradient(180deg, rgba(31, 83, 57, 0.40) 0%, rgba(25, 69, 47, 0.46) 100%) !important;
        border-color: rgba(130, 220, 176, 0.46) !important;
        color: #b4ecd0 !important;
        -webkit-text-fill-color: #b4ecd0 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-bot {
        background: linear-gradient(180deg, rgba(83, 66, 36, 0.44) 0%, rgba(68, 54, 30, 0.50) 100%) !important;
        border-color: rgba(233, 200, 132, 0.48) !important;
        color: #efd59f !important;
        -webkit-text-fill-color: #efd59f !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_username .js-inline-copy-username,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_id .js-inline-copy-id {
        color: #9ec2ea !important;
        -webkit-text-fill-color: #9ec2ea !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_username .js-inline-copy-username:hover,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_id .js-inline-copy-id:hover {
        background: rgba(114, 161, 221, 0.22) !important;
        color: #e4f0ff !important;
        -webkit-text-fill-color: #e4f0ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_channel :is(img, .avatar, .channel-avatar) {
        filter: saturate(1.08) contrast(1.08);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist-search :is(#searchbar, input[name="q"]) {
        border-color: rgba(108, 147, 193, 0.42) !important;
        background: linear-gradient(180deg, rgba(26, 39, 57, 0.95) 0%, rgba(21, 32, 48, 0.96) 100%) !important;
        color: #dbe9fb !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist-search :is(#searchbar, input[name="q"])::placeholder {
        color: #8ea8c4 !important;
        opacity: 1 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist .paginator,
    html.dark body.crm-core-theme.model-subscriber.change-list #changelist .pagination {
        color: #9fb6d1 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist .pagination a {
        background: linear-gradient(180deg, rgba(30, 46, 68, 0.96) 0%, rgba(23, 36, 54, 0.98) 100%) !important;
        border-color: rgba(97, 132, 171, 0.45) !important;
        color: #d2e4f8 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist .pagination .this-page {
        background: linear-gradient(180deg, rgba(78, 118, 168, 0.98) 0%, rgba(66, 102, 148, 0.98) 100%) !important;
        border-color: rgba(131, 172, 223, 0.72) !important;
        color: #f4f9ff !important;
    }
}

@media (max-width: 768px) {
    :root {
        --crm-search-max: 100%;
        --crm-control-height: 50px;
        --crm-control-height-sm: 42px;
    }

    html body:not(.login) #header-inner {
        margin-top: var(--crm-space-2) !important;
        min-height: 54px !important;
        border-radius: 18px !important;
        padding: var(--crm-space-2) var(--crm-space-3) !important;
    }

    html body:not(.login) #header-inner h1,
    html body:not(.login) #header-inner h1 :is(a, span) {
        font-size: 18px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }

    html body:is(.model-user, .model-group).change-list #result_list {
        table-layout: auto !important;
        min-width: 640px !important;
    }

    /* iOS/webview safe-area: prevent top content overlap with status bar */
    html body:not(.login) {
        padding-top: max(0px, env(safe-area-inset-top)) !important;
    }

    /* Legacy mobile client table layout (fallback only; crm-core-theme uses cards layer) */
    html body.model-client.change-list:not(.crm-core-theme) #changelist-form > div[data-simplebar] {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        padding-inline: 0 !important;
    }

    html body.model-client.change-list:not(.crm-core-theme) #changelist-form > div[data-simplebar] #result_list {
        display: table !important;
        width: max-content !important;
        min-width: 900px !important;
        table-layout: fixed !important;
    }

    /* Override older mobile rules that hide columns on phones */
    html body.model-client.change-list:not(.crm-core-theme) #result_list > :is(thead, tbody) > tr > :is(th, td) {
        display: table-cell !important;
    }

    html body.model-client.change-list:not(.crm-core-theme) #result_list > :is(thead, tbody) > tr > :is(th, td) {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body.model-client.change-list:not(.crm-core-theme) #result_list > :is(thead, tbody) > tr > :is(th, td):first-child {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
    }

    /* Clients mobile: make ID capsule slightly smaller to prevent clipping */
    html body.model-client.change-list:not(.crm-core-theme) #result_list > tbody > tr > :is(th, td).field-display_id .id-chip {
        min-width: 0 !important;
        min-height: 28px !important;
        padding-inline: 6px !important;
        gap: 4px !important;
        font-size: 11px !important;
    }

    html body.model-client.change-list:not(.crm-core-theme) #result_list > tbody > tr > :is(th, td).field-display_id .id-chip .js-inline-id-value {
        margin-right: 4px !important;
    }

    html body.model-client.change-list:not(.crm-core-theme) #result_list > tbody > tr > :is(th, td).field-display_id .id-chip .js-inline-copy-id .material-symbols-outlined {
        font-size: 14px !important;
    }

}

@media (max-width: 390px) {
    html body:not(.login) #header-inner h1,
    html body:not(.login) #header-inner h1 :is(a, span) {
        font-size: 16px !important;
    }

    html body.change-list :is(#searchbar, input[name="q"]) {
        padding-inline: 8px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 360px) {
    html body:not(.login) #header-inner {
        border-radius: 16px !important;
    }

    html body.change-list :is(#searchbar-submit, button#searchbar-submit) {
        width: 22px !important;
        min-width: 22px !important;
        height: 22px !important;
        min-height: 22px !important;
        flex-basis: 22px !important;
    }
}

/* -------- Desktop readability: Geo/Domain chips -------- */
@media (min-width: 1025px) {
    /* Give more room to geo + domain columns on desktop views */
    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(2) {
        width: 10% !important;
    }

    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(3) {
        width: 13% !important;
    }

    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(4) {
        width: 8% !important;
    }

    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(7) {
        width: 12% !important;
    }

    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(8) {
        width: 8% !important;
    }

    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(11) {
        width: 16% !important;
    }

    html body.model-client.change-list #result_list > :is(thead, tbody) > tr > :is(th, td):nth-child(12) {
        width: 11% !important;
    }

    /* Keep geo chip readable inside compact rows */
    html body.model-client.change-list #result_list td .geo-chip {
        max-width: 100% !important;
        min-height: 42px !important;
        padding: 6px 9px !important;
        line-height: 1.08 !important;
    }

    html body.model-client.change-list #result_list td .geo-chip .geo-country,
    html body.model-client.change-list #result_list td .geo-chip .geo-city {
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Keep domain in 2 lines total: domain + meta (Канал/Бот) */
    html body.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta {
        max-width: 100% !important;
        min-height: 42px !important;
        padding: 6px 8px !important;
        gap: 1px !important;
    }

    html body.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-main {
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 12.25px !important;
        line-height: 1.05 !important;
    }

    html body.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-meta {
        font-size: 11.1px !important;
        line-height: 1 !important;
    }

    html body.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta {
        max-width: 100% !important;
        padding-left: 9px !important;
        padding-right: 9px !important;
        gap: 1px !important;
    }

    html body.model-subscriber.change-list #result_list td.field-display_invite_link .domain-chip {
        width: 100% !important;
        max-width: 100% !important;
    }

    html body.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-main {
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 11.9px !important;
        line-height: 1.05 !important;
    }

    html body.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-meta {
        font-size: 11.7px !important;
        line-height: 1 !important;
    }
}

/* -------- User chip typography parity -------- */
html body.model-client.change-list #result_list td.field-display_username .user-chip .user-chip-main-text {
    font-size: 13px !important;
    line-height: 1.1 !important;
}

html body.model-subscriber.change-list #result_list td.field-display_username .user-chip .user-chip-main-text {
    font-size: 13px !important;
    line-height: 1.1 !important;
}

html body.model-subscriber.change-list #result_list td.field-display_username .user-chip .js-inline-copy-username .material-symbols-outlined {
    font-size: 13px !important;
}

/* -------- Desktop column lock: no capsule clipping (clients/subscribers) -------- */
@media (min-width: 1025px) {
    html body.model-client.change-list #result_list {
        min-width: 1660px !important;
        table-layout: fixed !important;
    }

    html body.model-client.change-list #result_list th.action-checkbox-column,
    html body.model-client.change-list #result_list td.action-checkbox {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
    }

    html body.model-client.change-list #result_list th.column-display_id,
    html body.model-client.change-list #result_list td.field-display_id {
        width: 144px !important;
        min-width: 144px !important;
        max-width: 144px !important;
    }

    html body.model-client.change-list #result_list th.column-display_username,
    html body.model-client.change-list #result_list td.field-display_username {
        width: 188px !important;
        min-width: 188px !important;
        max-width: 188px !important;
    }

    html body.model-client.change-list #result_list th.column-display_client_welcome_segment,
    html body.model-client.change-list #result_list td.field-display_client_welcome_segment {
        width: 126px !important;
        min-width: 126px !important;
        max-width: 126px !important;
        line-height: 1.25 !important;
        overflow: visible !important;
    }

    html body.model-client.change-list #result_list th.column-display_status,
    html body.model-client.change-list #result_list td.field-display_status {
        width: 128px !important;
        min-width: 128px !important;
        max-width: 128px !important;
    }

    html body.model-client.change-list #result_list th.column-display_deposit,
    html body.model-client.change-list #result_list td.field-display_deposit {
        width: 86px !important;
        min-width: 86px !important;
        max-width: 86px !important;
    }

    html body.model-client.change-list #result_list th.column-display_geo,
    html body.model-client.change-list #result_list td.field-display_geo {
        width: 164px !important;
        min-width: 164px !important;
        max-width: 164px !important;
    }

    html body.model-client.change-list #result_list th.column-display_comment,
    html body.model-client.change-list #result_list td.field-display_comment {
        width: 158px !important;
        min-width: 158px !important;
        max-width: 158px !important;
    }

    html body.model-client.change-list #result_list th.column-display_created_date,
    html body.model-client.change-list #result_list td.field-display_created_date,
    html body.model-client.change-list #result_list th.column-display_subscribed_date,
    html body.model-client.change-list #result_list td.field-display_subscribed_date {
        width: 108px !important;
        min-width: 108px !important;
        max-width: 108px !important;
    }

    html body.model-client.change-list #result_list th.column-display_domain,
    html body.model-client.change-list #result_list td.field-display_domain {
        width: 184px !important;
        min-width: 184px !important;
        max-width: 184px !important;
    }

    html body.model-client.change-list #result_list th.column-display_channel,
    html body.model-client.change-list #result_list td.field-display_channel {
        width: 176px !important;
        min-width: 176px !important;
        max-width: 176px !important;
    }

    html body.model-client.change-list #result_list th.column-display_created_date,
    html body.model-client.change-list #result_list th.column-display_subscribed_date {
        padding-inline: 12px !important;
        white-space: nowrap !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #changelist-form > div[data-simplebar] .simplebar-content,
    html body.model-client.change-list.crm-view-mode-compact #result_list {
        min-width: 1280px !important;
        width: max(1280px, 100%) !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list th.column-display_geo,
    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_geo {
        width: 156px !important;
        min-width: 156px !important;
        max-width: 156px !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list th.column-display_created_date,
    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_created_date,
    html body.model-client.change-list.crm-view-mode-compact #result_list th.column-display_subscribed_date,
    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_subscribed_date {
        width: 102px !important;
        min-width: 102px !important;
        max-width: 102px !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list th.column-display_domain,
    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_domain {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list th.column-display_channel,
    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_channel {
        width: 128px !important;
        min-width: 128px !important;
        max-width: 128px !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list th.column-display_comment,
    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_comment {
        display: table-cell !important;
        width: 192px !important;
        min-width: 192px !important;
        max-width: 192px !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_channel .channel-chip {
        gap: 6px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 14px !important;
    }

    html body.model-client.change-list.crm-view-mode-compact #result_list td.field-display_channel .channel-chip img {
        flex: 0 0 22px !important;
        width: 22px !important;
        height: 22px !important;
    }

    html body.model-client.change-list #result_list td :is(.id-chip, .user-chip, .status-chip, .date-chip, .date-chip-empty, .domain-chip, .channel-chip, .welcome-segment-chip) {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    html body.model-client.change-list #result_list td.field-display_client_welcome_segment .welcome-segment-chip {
        width: 100% !important;
        justify-content: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Subscriber table geometry is defined once in the canonical block below. */
}

html body:is(.model-client, .model-subscriber).change-list #result_list td .welcome-segment-empty {
    display: inline-block !important;
    color: #34597b !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

html body:is(.model-client, .model-subscriber).change-list #result_list td .welcome-segment-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    max-width: 100% !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    border: 1.5px solid #bcd4ea !important;
    background: linear-gradient(180deg, #f5faff 0%, #e9f3ff 100%) !important;
    color: #224b76 !important;
    -webkit-text-fill-color: #224b76 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 2px 8px rgba(33, 66, 103, 0.10) !important;
}

/* ===== User menu recovery: keep profile dropdown rows clean and aligned ===== */
html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 {
    margin-top: 8px !important;
    min-width: 248px !important;
    border: 1px solid #d2e1ef !important;
    border-radius: 14px !important;
    padding: 8px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(243, 250, 255, 0.96) 100%) !important;
    box-shadow: 0 12px 24px rgba(41, 77, 120, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
}

html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav > a,
html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav form button,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52 > a,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52 form button,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52 > a,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52 form button,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52 > a,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52 form button,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52 > a,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52 form button,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 > a,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 form button {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #345879 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav > a:hover,
html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav form button:hover,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52 > a:hover,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52 form button:hover,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52 > a:hover,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52 form button:hover,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52 > a:hover,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52 form button:hover,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52 > a:hover,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52 form button:hover,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 > a:hover,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 form button:hover {
    border-color: #d5e6f5 !important;
    background: linear-gradient(180deg, #f8fcff 0%, #edf5ff 100%) !important;
}

html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav > .border-t,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52 > .border-t,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52 > .border-t,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52 > .border-t,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52 > .border-t,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 > .border-t {
    border-color: #dbe8f4 !important;
    margin: 8px 0 6px !important;
    padding-top: 6px !important;
}

html body:not(.login) #header-inner .ml-auto [x-data*="openUserLinks"] > nav form,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.w-52 form,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-7.w-52 form,
html body:not(.login) #header-inner .ml-auto .relative > nav.absolute.top-10.w-52 form,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.w-52 form,
html body:not(.login) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute.top-10.w-52 form {
    margin: 0 !important;
}

/* Client hard-lock: ensure account dropdown rows keep normal spacing/height. */
html body.model-client #header-inner .ml-auto #user-tools nav > a,
html body.model-client #header-inner .ml-auto #user-tools nav form button,
html body.model-client #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute > a,
html body.model-client #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute form button {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 40px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transform: none !important;
}

/* ===== Canonical header user menu (template: templates/unfold/helpers/userlinks.html) ===== */
html body:not(.login) #header-inner .ml-auto .crm-user-menu-trigger {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    color: #456789 !important;
    text-decoration: none !important;
    position: relative !important;
    z-index: 2 !important;
    pointer-events: auto !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu-trigger .material-symbols-outlined {
    font-size: 22px !important;
    line-height: 1 !important;
    width: 22px !important;
    height: 22px !important;
    color: #456789 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu {
    min-width: 250px !important;
    margin-top: 8px !important;
    padding: 8px !important;
    border: 1px solid #d2e1ef !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(243, 250, 255, 0.96) 100%) !important;
    box-shadow: 0 12px 24px rgba(41, 77, 120, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
    z-index: 70 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu .crm-user-menu-head {
    margin: 0 0 6px !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu :is(a, button) {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 40px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #345879 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu :is(a, button):hover {
    border-color: #d5e6f5 !important;
    background: linear-gradient(180deg, #f8fcff 0%, #edf5ff 100%) !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu #logout-form button {
    color: #d73a47 !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu #logout-form button:hover {
    border-color: #f4d2d7 !important;
    background: linear-gradient(180deg, #fff6f7 0%, #ffeef0 100%) !important;
}

html body:not(.login) #header-inner .ml-auto .crm-user-menu .border-t {
    border-color: #dbe8f4 !important;
    margin: 8px 0 6px !important;
    padding-top: 6px !important;
}

/* Keep dropdown visible above header capsule (not clipped by overflow locks) */
html body:not(.login) #header-inner,
html body:not(.login) #header-inner > .flex.items-center.w-full,
html body:not(.login) #header-inner .ml-auto,
html body:not(.login) #header-inner .ml-auto > div {
    overflow: visible !important;
}

/* Hard lock for default Unfold user menu in Clients and Dashboard. */
html body:is(.model-client, .crm-dashboard) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute > a,
html body:is(.model-client, .crm-dashboard) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute form button {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 42px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    padding: 9px 14px !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    text-align: left !important;
    border-radius: 10px !important;
}

html body:is(.model-client, .crm-dashboard) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute {
    z-index: 120 !important;
}

html body.crm-dashboard #header-inner .ml-auto .group.items-center.leading-none.relative > a,
html body.crm-dashboard #header-inner .ml-auto .group.items-center.leading-none.relative > button,
html body.crm-dashboard #header-inner .ml-auto .group.items-center.leading-none.relative > a .material-symbols-outlined,
html body.crm-dashboard #header-inner .ml-auto .group.items-center.leading-none.relative > button .material-symbols-outlined {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 121 !important;
}

/* Dashboard safety lock: keep user menu trigger/dropdown clickable above header layers. */
html body:is(.crm-dashboard, .dashboard, .dashboard-home, .app-index) #header-inner > .flex.items-center.w-full,
html body:is(.crm-dashboard, .dashboard, .dashboard-home, .app-index) #header-inner .ml-auto,
html body:is(.crm-dashboard, .dashboard, .dashboard-home, .app-index) #header-inner .ml-auto > div {
    overflow: visible !important;
}

html body:is(.crm-dashboard, .dashboard, .dashboard-home, .app-index) #header-inner .ml-auto .group.items-center.leading-none.relative {
    position: relative !important;
    pointer-events: auto !important;
    z-index: 122 !important;
}

html body:is(.crm-dashboard, .dashboard, .dashboard-home, .app-index) #header-inner .ml-auto .group.items-center.leading-none.relative > nav.absolute {
    pointer-events: auto !important;
    z-index: 130 !important;
}

/* Final icon parity: Clients must look exactly like Subscribers. */
html body:is(.model-client, .model-subscriber).change-list #header-inner .ml-auto .group.items-center.leading-none.relative > :is(a, button):has(> .material-symbols-outlined) {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

html body:is(.model-client, .model-subscriber).change-list #header-inner .ml-auto .group.items-center.leading-none.relative > :is(a, button):has(> .material-symbols-outlined) .material-symbols-outlined {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

html body:is(.model-client, .model-subscriber).change-list #result_list td :is(.js-inline-copy-id, .js-inline-copy-username) .material-symbols-outlined {
    font-size: 13px !important;
    width: 13px !important;
    height: 13px !important;
    line-height: 1 !important;
}

@media (max-width: 1279px) {
    html body.model-subscriber.change-list #header-inner h1 > span.font-medium.ml-2.text-subtle {
        display: none !important;
    }
}

/* Client hard parity: user icon trigger must be plain (same as Subscribers), "+" stays capsule. */
html body.model-client.change-list #header-inner .ml-auto #user-tools :is(a, button):has(.material-symbols-outlined),
html body.model-client.change-list #header-inner .ml-auto .group.items-center.leading-none.relative > :is(a, button):has(> .material-symbols-outlined):not(.addlink) {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

html body.model-client.change-list #header-inner .ml-auto #user-tools :is(a, button):has(.material-symbols-outlined) .material-symbols-outlined,
html body.model-client.change-list #header-inner .ml-auto .group.items-center.leading-none.relative > :is(a, button):has(> .material-symbols-outlined):not(.addlink) .material-symbols-outlined {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #111111 !important;
}

/* Fallback for legacy/unexpected header DOM in Clients: keep user icon plain. */
html body.model-client.change-list #header-inner .ml-auto > :is(a, button):not(.addlink):has(.material-symbols-outlined),
html body.model-client.change-list #header-inner .ml-auto > div > :is(a, button):not(.addlink):has(.material-symbols-outlined),
html body.model-client.change-list #header-inner .ml-auto :is(#user-tools, .object-tools, .group.items-center.leading-none.relative) :is(a, button):not(.addlink):has(.material-symbols-outlined) {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

html body.model-client.change-list #header-inner .ml-auto > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html body.model-client.change-list #header-inner .ml-auto > div > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html body.model-client.change-list #header-inner .ml-auto :is(#user-tools, .object-tools, .group.items-center.leading-none.relative) :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #111111 !important;
}

/* Header right-side parity: lift profile icon to the same baseline as "+" */
html body.change-list #header-inner .ml-auto :is(#user-tools, .group.items-center.leading-none.relative) > :is(a, button):not(.addlink):has(.material-symbols-outlined),
html body.change-list #header-inner .ml-auto :is(#user-tools, .group.items-center.leading-none.relative) > div > :is(a, button):not(.addlink):has(.material-symbols-outlined),
html body.change-list #header-inner .ml-auto .object-tools > :is(a, button).viewsitelink:not(.addlink):has(.material-symbols-outlined) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    margin-top: -2px !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}

html body.change-list #header-inner .ml-auto :is(#user-tools, .group.items-center.leading-none.relative) > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html body.change-list #header-inner .ml-auto :is(#user-tools, .group.items-center.leading-none.relative) > div > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html body.change-list #header-inner .ml-auto .object-tools > :is(a, button).viewsitelink:not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined {
    position: relative !important;
    top: -1px !important;
}

/* Final fix: Clients user icon is rendered as object-tools li > a.viewsitelink in some pages. */
html body.model-client #header-inner .ml-auto .object-tools li > :is(a, button):not(.addlink):has(.material-symbols-outlined),
html body.model-client #header-inner .ml-auto .object-tools > :is(a, button):not(.addlink):has(.material-symbols-outlined) {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

html body.model-client #header-inner .ml-auto .object-tools li > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html body.model-client #header-inner .ml-auto .object-tools > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #111111 !important;
}

html.dark body.model-client.change-list #header-inner .ml-auto #user-tools :is(a, button):has(.material-symbols-outlined) .material-symbols-outlined,
html.dark body.model-client.change-list #header-inner .ml-auto .group.items-center.leading-none.relative > :is(a, button):has(> .material-symbols-outlined):not(.addlink) .material-symbols-outlined,
html.dark body.model-client.change-list #header-inner .ml-auto > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html.dark body.model-client.change-list #header-inner .ml-auto > div > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html.dark body.model-client.change-list #header-inner .ml-auto :is(#user-tools, .object-tools, .group.items-center.leading-none.relative) :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html.dark body.model-client #header-inner .ml-auto .object-tools li > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined,
html.dark body.model-client #header-inner .ml-auto .object-tools > :is(a, button):not(.addlink):has(.material-symbols-outlined) .material-symbols-outlined {
    color: #cddcf0 !important;
}

/* Ensure icon ligature text does not render as wide plain text in copy buttons */
html body.change-list #result_list td :is(.js-inline-copy-id, .js-inline-copy-username) .material-symbols-outlined,
html body.change-list #result_list th :is(.js-inline-copy-id, .js-inline-copy-username) .material-symbols-outlined {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 13px !important;
    min-width: 13px !important;
    height: 13px !important;
    min-height: 13px !important;
    overflow: hidden !important;
    line-height: 1 !important;
}

/* ===== Subscribers canonical table geometry (single source of truth) ===== */
html body.model-subscriber.change-list {
    --sub-col-check: 56px;
    --sub-col-main: calc((100% - var(--sub-col-check)) / 8);
    --sub-table-total: 1440px;
}

@media (max-width: 1024px) {
    html body.model-subscriber.change-list {
        --crm-table-min-width: var(--sub-table-total);
    }
}

@media (min-width: 1025px) {
    html body.model-subscriber.change-list #changelist-form #result_list {
        width: max(100%, var(--sub-table-total)) !important;
        min-width: var(--sub-table-total) !important;
        table-layout: fixed !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > :is(thead, tbody) > tr > :is(th, td) {
        box-sizing: border-box !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        vertical-align: middle !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.action-checkbox-column,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > :is(th, td).action-checkbox {
        width: var(--sub-col-check) !important;
        min-width: var(--sub-col-check) !important;
        max-width: var(--sub-col-check) !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_id,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > th.field-display_id,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_id {
        width: var(--sub-col-main) !important;
        min-width: var(--sub-col-main) !important;
        max-width: var(--sub-col-main) !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_username,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_username,
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_fullname,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_fullname,
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_welcome_segment,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_welcome_segment,
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_geo,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_geo,
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_invite_link,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_invite_link,
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_date_chip,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_date_chip,
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_channel,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_channel {
        width: var(--sub-col-main) !important;
        min-width: var(--sub-col-main) !important;
        max-width: var(--sub-col-main) !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th:is(.column-display_welcome_segment, .column-display_geo, .column-display_invite_link, .column-display_date_chip, .column-display_channel),
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td:is(.field-display_welcome_segment, .field-display_geo, .field-display_invite_link, .field-display_date_chip, .field-display_channel) {
        text-align: center !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_welcome_segment,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_welcome_segment {
        width: 136px !important;
        min-width: 136px !important;
        max-width: 136px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_geo,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_geo {
        width: 172px !important;
        min-width: 172px !important;
        max-width: 172px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_invite_link,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_invite_link {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th.column-display_date_chip,
    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td.field-display_date_chip {
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th:is(.column-display_welcome_segment, .column-display_geo) {
        text-align: left !important;
        padding-left: 16px !important;
        padding-right: 6px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td:is(.field-display_welcome_segment, .field-display_geo) {
        text-align: left !important;
        padding-left: 12px !important;
        padding-right: 8px !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > td:is(.field-display_welcome_segment, .field-display_geo) > * {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    /* Subscriber table: keep header labels exactly over centered capsule content */
    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th:is(.column-display_welcome_segment, .column-display_geo, .column-display_invite_link, .column-display_date_chip, .column-display_channel) > div.flex.items-center {
        width: 100% !important;
        justify-content: center !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th:is(.column-display_welcome_segment, .column-display_geo, .column-display_invite_link, .column-display_date_chip, .column-display_channel) > div.flex.items-center > .text {
        margin-left: 0 !important;
        text-align: center !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th:is(.column-display_welcome_segment, .column-display_geo) > div.flex.items-center {
        justify-content: flex-start !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > thead > tr > th:is(.column-display_welcome_segment, .column-display_geo) > div.flex.items-center > .text {
        text-align: left !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > :is(th, td).field-display_id .id-chip {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        max-width: none !important;
        min-width: 118px !important;
        overflow: visible !important;
        white-space: nowrap !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list > tbody > tr > :is(th, td).field-display_id .js-inline-id-value {
        min-width: max-content !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    html body.model-subscriber.change-list #changelist-form #result_list td :is(.id-chip, .user-chip, .date-chip, .domain-chip, .channel-chip, .geo-chip, .geo-chip-empty) {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

}

/* ===== FINAL MOBILE LOCK (LAST): Clients ID capsule compact ===== */
@media (max-width: 1024px) {
    html body.model-client.change-list #changelist-form #result_list > tbody > tr > :is(th, td).field-display_id .id-chip {
        min-width: 118px !important;
        min-height: 24px !important;
        height: auto !important;
        padding: 0 4px !important;
        gap: 2px !important;
        font-size: 10px !important;
        line-height: 1 !important;
        max-width: none !important;
        overflow: visible !important;
        white-space: nowrap !important;
    }

    html body.model-client.change-list #changelist-form #result_list > tbody > tr > :is(th, td).field-display_id .js-inline-id-value {
        margin-right: 1px !important;
        min-width: max-content !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    html body.model-client.change-list #changelist-form #result_list > tbody > tr > :is(th, td).field-display_id .js-inline-copy-id {
        padding: 0 !important;
    }

    html body.model-client.change-list #changelist-form #result_list > tbody > tr > :is(th, td).field-display_id .js-inline-copy-id .material-symbols-outlined {
        font-size: 11px !important;
    }
}

/* ===== Desktop: restore sidebar brand icon in "Панель управления" ===== */
@media (min-width: 1025px) {
    #nav-sidebar-inner > div.border-b > div.bg-transparent .shrink-0,
    #nav-sidebar-inner > div.border-b > div.bg-transparent .shrink-0 > span,
    #nav-sidebar-inner > div.border-b > div.bg-transparent .shrink-0 > a,
    #nav-sidebar-inner > div.border-b > div.bg-transparent .shrink-0 img {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent .shrink-0 img {
        display: block !important;
        height: 38px !important;
        width: auto !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent {
        justify-content: flex-start !important;
        gap: 12px !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent .flex.flex-col {
        align-items: flex-start !important;
    }

    #nav-sidebar-inner > div.border-b > div.bg-transparent .text-important,
    #nav-sidebar-inner > div.border-b > div.bg-transparent #site-name,
    #nav-sidebar-inner > div.border-b > div.bg-transparent #site-name a,
    #nav-sidebar-inner > div.border-b > div.bg-transparent .text-important :is(span, a, strong, b) {
        justify-content: flex-start !important;
        text-align: left !important;
    }
}

/* ===== Filter Drawer cleanup: one source of truth (no stacked contour rules) ===== */
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter,
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter #changelist-filter-close {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter {
    align-items: flex-start !important;
    z-index: 1000 !important;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    box-sizing: border-box !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter #changelist-filter-close {
    flex: 1 1 auto !important;
    align-self: stretch !important;
    min-height: 100% !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 61 !important;
    background: rgba(0, 0, 0, 0.001) !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child {
    position: relative !important;
    z-index: 62 !important;
}

html body:is(.model-client, .model-subscriber).change-list #changelist-filter > div:last-child {
    outline: 0 !important;
    box-shadow: 0 0 0 1px #cfe0f2, 0 10px 22px rgba(33, 62, 96, 0.14) !important;
}

html.dark body:is(.model-client, .model-subscriber).change-list #changelist-filter > div:last-child {
    box-shadow: 0 0 0 1px #3b4e67, 0 12px 24px rgba(0, 0, 0, 0.45) !important;
}

/* Force border on the same specificity level as legacy custom.css reset. */
body.model-client #changelist-filter > div:last-child,
body.model-subscriber #changelist-filter > div:last-child {
    box-shadow: 0 0 0 1px #cfe0f2, 0 10px 22px rgba(33, 62, 96, 0.14) !important;
}

html.dark body.model-client #changelist-filter > div:last-child,
html.dark body.model-subscriber #changelist-filter > div:last-child {
    box-shadow: 0 0 0 1px #3b4e67, 0 12px 24px rgba(0, 0, 0, 0.45) !important;
}

html body.model-domain.change-list #changelist-filter > div:last-child {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: 0 10px 22px rgba(33, 62, 96, 0.14) !important;
}

html.dark body.model-domain.change-list #changelist-filter > div:last-child {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45) !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter :is(
    .simplebar-mask,
    .simplebar-content-wrapper,
    .simplebar-content,
    [data-simplebar],
    .group.relative,
    .group.mb-4
) {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter :is(a, button, input, select, textarea):focus {
    outline: none !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter :is(a, button, input, select, textarea):focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(151, 188, 224, 0.26) !important;
}

/* Keep filter drawer fully inside viewport on small/tall screens.
   This prevents the bottom action row ("Apply Filters") from being clipped. */
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child {
    height: min(1050px, calc(100dvh - 120px)) !important;
    max-height: min(1050px, calc(100dvh - 120px)) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative {
    min-height: 0 !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative > :is(form, div).flex.flex-col.h-full {
    min-height: 0 !important;
    height: 100% !important;
    flex: 1 1 auto !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child [data-simplebar] {
    min-height: 0 !important;
    padding-top: 6px !important;
    flex: 1 1 auto !important;
}

/* Subscribers can have long filter lists: keep action row always reachable.
   We make the list area scrollable and pin the action block to panel bottom. */
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative > :is(form, div).flex.flex-col.h-full {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative > :is(form, div).flex.flex-col.h-full > [data-simplebar] {
    min-height: 0 !important;
    max-height: 100% !important;
}

html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative > :is(form, div).flex.flex-col.h-full > div:last-child {
    position: static !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
}

/* Restore reliable scrolling inside filter drawer content */
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter
  .simplebar-content-wrapper {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 768px) {
    html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child {
        margin: 8px !important;
        max-width: calc(100vw - 16px) !important;
        height: min(1050px, calc(100dvh - 140px)) !important;
        max-height: calc(100vh - 140px) !important;
        max-height: calc(100dvh - 140px) !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative > :is(form, div).flex.flex-col.h-full > div:last-child {
        padding-bottom: 70px !important;
    }
}

/* Restore pre-regression look: when filter drawer is open, hide top decorative frames
   on Clients/Subscribers (they become too visible over dimmed background). */
html body.filters-open:is(.model-client, .model-subscriber).change-list #header-inner > .flex.items-center.w-full,
html body.filters-open:is(.model-client, .model-subscriber).change-list #main > .bg-white.border-b.border-base-200,
html body.filters-open:is(.model-client, .model-subscriber).change-list #header,
html body.filters-open:is(.model-client, .model-subscriber).change-list #content-main,
html body.filters-open:is(.model-client, .model-subscriber).change-list #nav-sidebar-inner > div.border-b > div.bg-transparent {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

/* Desktop-only geometry fix for Clients/Subscribers filter drawer.
   Do not affect mobile/tablet layouts. */
@media (min-width: 1025px) {
    html body:not(.login) #nav-sidebar-inner > div.border-b {
        border-bottom: 0 !important;
    }

    html body:is(.model-client, .model-subscriber).change-list #changelist > .result-list-wrapper > .grow > div:has(#changelist-search) {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    html body:is(.model-client, .model-subscriber).change-list #changelist-filter {
        align-items: flex-start !important;
        padding: 0 !important;
    }

    html body:is(.model-client, .model-subscriber).change-list #changelist-filter > div:last-child {
        position: fixed !important;
        right: 8px !important;
        left: auto !important;
        top: 82px !important;
        bottom: 80px !important;
        width: min(100vw - 24px, 380px) !important;
        max-width: calc(100vw - 24px) !important;
        margin: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    html body:is(.model-client, .model-subscriber).change-list #changelist-filter > div:last-child > .grow.h-full.overflow-auto.relative > :is(form, div).flex.flex-col.h-full > div:last-child {
        padding-bottom: 0 !important;
    }
}

/* Final parity override: dark filter drawer geometry must match white behavior */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme:is(.model-client, .model-subscriber).change-list #changelist-filter {
        align-items: flex-start !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    html.dark body.crm-core-theme:is(.model-client, .model-subscriber).change-list #changelist-filter > div:last-child {
        position: relative !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        margin: 12px !important;
        width: 360px !important;
        max-width: calc(100vw - 24px) !important;
        height: min(1050px, calc(100dvh - 120px)) !important;
        max-height: min(1050px, calc(100dvh - 120px)) !important;
        transform: none !important;
    }
}

/* Final lock: sidebar geometry in dark must match white theme exactly */
@media (min-width: 769px) {
    html.dark body.crm-core-theme #nav-sidebar :is(a, .module td a, .module th a, li a, nav a) {
        min-height: 44px !important;
        margin: 0 0 8px !important;
        padding: 0 14px !important;
        border-radius: 14px !important;
        gap: 9px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease !important;
        transform: none !important;
    }

    html.dark body.crm-core-theme #nav-sidebar .material-symbols-outlined,
    html.dark body.crm-core-theme #nav-sidebar svg {
        font-size: 20px !important;
    }

    html.dark body.crm-core-theme #nav-sidebar-inner > div.border-b {
        margin-bottom: 12px !important;
        padding: 8px 10px !important;
    }

    html.dark body.crm-core-theme #nav-sidebar-inner > div.border-b > div.bg-transparent {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        min-height: 56px !important;
        padding: 10px 14px !important;
        border-radius: 16px !important;
    }
}

/* Clients table: align "Пользователь" header with inner text of user capsule. */
@media (min-width: 1025px) {
    html body.model-client.change-list #result_list th.column-display_username .text {
        padding-left: 11px !important;
    }
}

/* Multi-select drawer filters: capsule style (channel/domain/status). */
.crm-filter-pill-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crm-filter-pill-item {
    margin: 0;
    padding: 0;
}

.crm-filter-pill-option {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid #c5d9ec;
    background: linear-gradient(180deg, rgba(244, 249, 255, 0.95) 0%, rgba(238, 245, 253, 0.90) 100%);
    color: #466285;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease, background .15s ease;
}

.crm-filter-pill-option:hover {
    border-color: #9fc2e4;
    color: #2f5f96;
}

.crm-filter-pill-option.is-selected,
.crm-filter-pill-option:has(.crm-filter-pill-checkbox:checked) {
    border-color: #8cb8e3;
    background: linear-gradient(180deg, rgba(225, 240, 255, 0.96) 0%, rgba(214, 234, 255, 0.92) 100%);
    color: #245f9f;
    box-shadow: inset 0 0 0 1px rgba(140, 184, 227, 0.45);
}

.crm-filter-pill-checkbox {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid #b6cde4;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fc 100%);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.crm-filter-pill-checkbox::after {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg);
    margin-top: -1px;
}

.crm-filter-pill-checkbox:checked {
    border-color: #79aee2;
    background: linear-gradient(180deg, #2d87de 0%, #2579c7 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.crm-filter-pill-checkbox:checked::after {
    border-left-color: #ffffff;
    border-bottom-color: #ffffff;
}

.crm-filter-pill-checkbox:focus-visible {
    box-shadow: 0 0 0 2px rgba(45, 135, 222, 0.25);
}

.crm-filter-pill-text {
    display: block;
    min-width: 0;
    padding-right: 10px;
}

/* Filter drawer action buttons should always show pointer cursor. */
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter form > div:last-child :is(button, a),
html body:is(.model-client, .model-subscriber, .model-domain).change-list #changelist-filter #changelist-filter-extra-actions :is(button, a) {
    cursor: pointer !important;
}

/* ===== ABSOLUTE LAST LOCK (legacy fallback): mobile card rows for Clients/Subscribers ===== */
@media (max-width: 1024px) {
    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #changelist-form > div[data-simplebar] {
        overflow: visible !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
        border-spacing: 0 !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > thead {
        display: none !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody {
        display: block !important;
        background: transparent !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr {
        display: block !important;
        margin: 0 0 12px !important;
        border: 1.5px solid #c8dbef !important;
        border-radius: 16px !important;
        background: linear-gradient(180deg, rgba(253, 255, 255, 0.98) 0%, rgba(241, 248, 255, 0.92) 100%) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 6px 16px rgba(27, 56, 92, 0.10) !important;
        overflow: hidden !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr:last-child {
        margin-bottom: 0 !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > :is(th, td) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        min-height: 46px !important;
        padding: 10px 12px !important;
        border: 0 !important;
        border-bottom: 1px solid #dbe8f4 !important;
        background: transparent !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        vertical-align: middle !important;
        max-width: none !important;
        width: auto !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > :is(th, td):last-child {
        border-bottom: 0 !important;
    }

    html body:not(.crm-core-theme):is(.model-client, .model-subscriber).change-list #result_list > tbody > tr > :is(th, td).action-checkbox {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        justify-content: flex-start !important;
    }
}

/* ===== FINAL OVERRIDE: Subscribers desktop premium dark polish ===== */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme.model-subscriber.change-list {
        --sub-premium-border: rgba(108, 147, 193, 0.34);
        --sub-premium-border-strong: rgba(130, 172, 221, 0.52);
        --sub-premium-text: #d9e8fb;
        --sub-premium-text-soft: #a9bfd8;
        --sub-premium-glow: 0 10px 22px rgba(3, 10, 20, 0.42);
        --sub-chip-border: rgba(133, 175, 223, 0.46);
        --sub-chip-text: #d7e9ff;
        --sub-chip-bg: linear-gradient(180deg, rgba(44, 66, 94, 0.56) 0%, rgba(34, 52, 76, 0.62) 100%);
        --sub-chip-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 18px rgba(3, 10, 20, 0.44);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list :is(
        .crm-state,
        .subscriber-sync-chip,
        #result_list td .id-chip,
        #result_list td .user-chip,
        #result_list td .status-chip,
        #result_list td .capital-chip,
        #result_list td .date-chip,
        #result_list td .date-chip-empty,
        #result_list td .geo-chip,
        #result_list td .geo-chip-empty,
        #result_list td .domain-chip,
        #result_list td .channel-chip,
        #result_list td .comment-chip,
        #result_list td .data-wrapper
    ) {
        border: 1px solid var(--sub-chip-border) !important;
        background: var(--sub-chip-bg) !important;
        color: var(--sub-chip-text) !important;
        -webkit-text-fill-color: var(--sub-chip-text) !important;
        box-shadow: var(--sub-chip-shadow) !important;
        text-rendering: geometricPrecision;
        transition: border-color .18s ease, box-shadow .18s ease, filter .18s ease;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list :is(
        .crm-state.crm-state--interactive:hover,
        #result_list td .id-chip:hover,
        #result_list td .user-chip:hover,
        #result_list td .date-chip:hover,
        #result_list td .geo-chip:hover,
        #result_list td .domain-chip:hover,
        #result_list td .channel-chip:hover
    ) {
        border-color: rgba(162, 199, 242, 0.64) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 12px 24px rgba(4, 12, 24, 0.52) !important;
        filter: saturate(1.05) brightness(1.03);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > thead > tr > th {
        background: linear-gradient(180deg, rgba(37, 54, 78, 0.96) 0%, rgba(30, 45, 66, 0.98) 100%) !important;
        border-top-color: var(--sub-premium-border) !important;
        border-bottom-color: var(--sub-premium-border) !important;
        color: var(--sub-premium-text-soft) !important;
        font-size: 12px !important;
        letter-spacing: 0.02em !important;
        text-transform: uppercase !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td) {
        background: linear-gradient(180deg, rgba(30, 44, 64, 0.96) 0%, rgba(24, 36, 53, 0.98) 100%) !important;
        border-top-color: rgba(95, 130, 171, 0.42) !important;
        border-bottom-color: rgba(95, 130, 171, 0.42) !important;
        color: var(--sub-premium-text) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td):first-child {
        border-left-color: rgba(95, 130, 171, 0.42) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td):last-child {
        border-right-color: rgba(95, 130, 171, 0.42) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td) {
        background: linear-gradient(180deg, rgba(39, 59, 86, 0.96) 0%, rgba(31, 48, 71, 0.98) 100%) !important;
        border-top-color: var(--sub-premium-border-strong) !important;
        border-bottom-color: var(--sub-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td):first-child {
        border-left-color: var(--sub-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td):last-child {
        border-right-color: var(--sub-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td :is(.id-chip, .user-chip, .date-chip, .date-chip-empty, .geo-chip, .geo-chip-empty, .domain-chip, .channel-chip) {
        border-width: 1px !important;
        border-color: rgba(124, 164, 211, 0.38) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--sub-premium-glow) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--neutral {
        --crm-state-border-color: rgba(128, 171, 220, 0.54);
        --crm-state-bg-color: linear-gradient(180deg, rgba(43, 67, 96, 0.60) 0%, rgba(35, 55, 80, 0.66) 100%);
        --crm-state-text-color: #d8e9ff;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--info {
        --crm-state-border-color: rgba(130, 183, 235, 0.58);
        --crm-state-bg-color: linear-gradient(180deg, rgba(38, 72, 110, 0.62) 0%, rgba(31, 59, 93, 0.68) 100%);
        --crm-state-text-color: #d4ecff;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--success {
        --crm-state-border-color: rgba(122, 217, 173, 0.56);
        --crm-state-bg-color: linear-gradient(180deg, rgba(28, 86, 59, 0.56) 0%, rgba(24, 71, 50, 0.64) 100%);
        --crm-state-text-color: #bcf1d5;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--warning {
        --crm-state-border-color: rgba(237, 201, 133, 0.58);
        --crm-state-bg-color: linear-gradient(180deg, rgba(91, 72, 37, 0.58) 0%, rgba(74, 58, 30, 0.66) 100%);
        --crm-state-text-color: #f5dfb1;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--danger {
        --crm-state-border-color: rgba(227, 132, 152, 0.58);
        --crm-state-bg-color: linear-gradient(180deg, rgba(106, 47, 64, 0.62) 0%, rgba(88, 39, 53, 0.70) 100%);
        --crm-state-text-color: #ffdbe4;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .id-chip {
        background: linear-gradient(180deg, rgba(86, 63, 138, 0.44) 0%, rgba(70, 51, 117, 0.52) 100%) !important;
        border-color: rgba(174, 145, 241, 0.52) !important;
        color: #dfceff !important;
        -webkit-text-fill-color: #dfceff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip {
        background: linear-gradient(180deg, rgba(45, 68, 98, 0.52) 0%, rgba(37, 56, 81, 0.56) 100%) !important;
        border-color: rgba(130, 175, 222, 0.48) !important;
        color: #d3e6fa !important;
        -webkit-text-fill-color: #d3e6fa !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip .user-chip-main-text {
        color: #e1eeff !important;
        -webkit-text-fill-color: #e1eeff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip .user-chip-sub {
        color: #9eb8d4 !important;
        -webkit-text-fill-color: #9eb8d4 !important;
        font-weight: 700 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip.geo-chip-empty {
        background: linear-gradient(180deg, rgba(45, 69, 95, 0.52) 0%, rgba(36, 56, 79, 0.58) 100%) !important;
        border-color: rgba(127, 177, 227, 0.52) !important;
        color: #d4e8ff !important;
        -webkit-text-fill-color: #d4e8ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip .geo-country {
        color: #e0efff !important;
        -webkit-text-fill-color: #e0efff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip .geo-city {
        color: #abc4de !important;
        -webkit-text-fill-color: #abc4de !important;
        font-weight: 700 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td :is(.date-chip, .date-chip-empty) {
        background: linear-gradient(180deg, rgba(42, 63, 90, 0.5) 0%, rgba(33, 51, 73, 0.56) 100%) !important;
        border-color: rgba(124, 165, 211, 0.45) !important;
        color: #cfe4fb !important;
        -webkit-text-fill-color: #cfe4fb !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-main {
        color: #d7ebff !important;
        -webkit-text-fill-color: #d7ebff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta .domain-chip-meta {
        color: #a9c2dd !important;
        -webkit-text-fill-color: #a9c2dd !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-channel {
        background: linear-gradient(180deg, rgba(31, 83, 57, 0.40) 0%, rgba(25, 69, 47, 0.46) 100%) !important;
        border-color: rgba(130, 220, 176, 0.46) !important;
        color: #b4ecd0 !important;
        -webkit-text-fill-color: #b4ecd0 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-bot {
        background: linear-gradient(180deg, rgba(83, 66, 36, 0.44) 0%, rgba(68, 54, 30, 0.50) 100%) !important;
        border-color: rgba(233, 200, 132, 0.48) !important;
        color: #efd59f !important;
        -webkit-text-fill-color: #efd59f !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_username .js-inline-copy-username,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_id .js-inline-copy-id {
        color: #9ec2ea !important;
        -webkit-text-fill-color: #9ec2ea !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_username .js-inline-copy-username:hover,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_id .js-inline-copy-id:hover {
        background: rgba(114, 161, 221, 0.22) !important;
        color: #e4f0ff !important;
        -webkit-text-fill-color: #e4f0ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist-search :is(#searchbar, input[name="q"]) {
        border-color: rgba(108, 147, 193, 0.42) !important;
        background: linear-gradient(180deg, rgba(26, 39, 57, 0.95) 0%, rgba(21, 32, 48, 0.96) 100%) !important;
        color: #dbe9fb !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #changelist-search :is(#searchbar, input[name="q"])::placeholder {
        color: #8ea8c4 !important;
        opacity: 1 !important;
    }

}

/* ===== FINAL FINAL: Subscribers desktop luxury chips ===== */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme.model-subscriber.change-list {
        --sub-luxe-chip-radius: 999px;
        --sub-luxe-chip-text-main: #e6f1ff;
        --sub-luxe-chip-text-soft: #b4c9e2;
        --sub-luxe-chip-border: rgba(156, 192, 236, 0.44);
        --sub-luxe-chip-bg: linear-gradient(180deg, rgba(43, 66, 97, 0.62) 0%, rgba(31, 50, 74, 0.72) 100%);
        --sub-luxe-chip-shadow: 0 14px 28px rgba(4, 12, 24, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr > :is(th, td) {
        background: linear-gradient(180deg, rgba(28, 42, 63, 0.98) 0%, rgba(20, 31, 47, 0.99) 100%) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list > tbody > tr:hover > :is(th, td) {
        background: linear-gradient(180deg, rgba(34, 53, 78, 0.98) 0%, rgba(25, 40, 60, 0.99) 100%) !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list :is(
        .crm-state,
        .subscriber-sync-chip,
        #result_list td .id-chip,
        #result_list td .user-chip,
        #result_list td .date-chip,
        #result_list td .date-chip-empty,
        #result_list td .geo-chip,
        #result_list td .geo-chip-empty,
        #result_list td .domain-chip,
        #result_list td .channel-chip
    ) {
        border-radius: var(--sub-luxe-chip-radius) !important;
        border-color: var(--sub-luxe-chip-border) !important;
        background: var(--sub-luxe-chip-bg) !important;
        color: var(--sub-luxe-chip-text-main) !important;
        -webkit-text-fill-color: var(--sub-luxe-chip-text-main) !important;
        box-shadow: var(--sub-luxe-chip-shadow) !important;
        letter-spacing: 0.01em !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list :is(
        .crm-state.crm-state--interactive:hover,
        #result_list td .id-chip:hover,
        #result_list td .user-chip:hover,
        #result_list td .date-chip:hover,
        #result_list td .geo-chip:hover,
        #result_list td .domain-chip:hover,
        #result_list td .channel-chip:hover
    ) {
        border-color: rgba(184, 213, 247, 0.72) !important;
        box-shadow: 0 18px 30px rgba(3, 10, 22, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
        filter: saturate(1.08) brightness(1.05);
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .id-chip {
        background: linear-gradient(180deg, rgba(98, 70, 160, 0.70) 0%, rgba(72, 51, 124, 0.80) 100%) !important;
        border-color: rgba(193, 166, 255, 0.62) !important;
        color: #efe3ff !important;
        -webkit-text-fill-color: #efe3ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip {
        background: linear-gradient(180deg, rgba(54, 86, 126, 0.70) 0%, rgba(40, 64, 96, 0.80) 100%) !important;
        border-color: rgba(161, 199, 242, 0.62) !important;
        color: #e3f1ff !important;
        -webkit-text-fill-color: #e3f1ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip .user-chip-main-text {
        color: #f0f7ff !important;
        -webkit-text-fill-color: #f0f7ff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .user-chip .user-chip-sub {
        color: #b3cbe6 !important;
        -webkit-text-fill-color: #b3cbe6 !important;
        font-weight: 700 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip,
    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td.field-display_geo .geo-chip.geo-chip-empty {
        background: linear-gradient(180deg, rgba(47, 80, 116, 0.72) 0%, rgba(34, 60, 90, 0.82) 100%) !important;
        border-color: rgba(151, 196, 242, 0.62) !important;
        color: #e4f1ff !important;
        -webkit-text-fill-color: #e4f1ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .date-chip {
        background: linear-gradient(180deg, rgba(57, 87, 124, 0.68) 0%, rgba(40, 65, 96, 0.78) 100%) !important;
        border-color: rgba(165, 203, 244, 0.56) !important;
        color: #e8f2ff !important;
        -webkit-text-fill-color: #e8f2ff !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .date-chip.date-chip-empty {
        background: linear-gradient(180deg, rgba(110, 63, 71, 0.66) 0%, rgba(90, 49, 58, 0.76) 100%) !important;
        border-color: rgba(230, 156, 171, 0.58) !important;
        color: #ffdfe7 !important;
        -webkit-text-fill-color: #ffdfe7 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-channel {
        background: linear-gradient(180deg, rgba(35, 98, 69, 0.72) 0%, rgba(27, 78, 56, 0.82) 100%) !important;
        border-color: rgba(145, 233, 189, 0.62) !important;
        color: #d6ffe9 !important;
        -webkit-text-fill-color: #d6ffe9 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-bot {
        background: linear-gradient(180deg, rgba(120, 92, 38, 0.72) 0%, rgba(95, 72, 30, 0.82) 100%) !important;
        border-color: rgba(246, 208, 132, 0.62) !important;
        color: #ffe8b8 !important;
        -webkit-text-fill-color: #ffe8b8 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .channel-chip {
        background: linear-gradient(180deg, rgba(52, 74, 108, 0.66) 0%, rgba(39, 57, 84, 0.76) 100%) !important;
        border-color: rgba(175, 205, 242, 0.62) !important;
        color: #e7f1ff !important;
        -webkit-text-fill-color: #e7f1ff !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip .domain-chip-main {
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list #result_list td .domain-chip .domain-chip-meta {
        color: var(--sub-luxe-chip-text-soft) !important;
        -webkit-text-fill-color: var(--sub-luxe-chip-text-soft) !important;
        font-weight: 700 !important;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--neutral {
        --crm-state-border-color: rgba(157, 194, 239, 0.56);
        --crm-state-bg-color: linear-gradient(180deg, rgba(56, 84, 121, 0.68) 0%, rgba(41, 64, 95, 0.78) 100%);
        --crm-state-text-color: #e5f2ff;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--info {
        --crm-state-border-color: rgba(151, 201, 248, 0.62);
        --crm-state-bg-color: linear-gradient(180deg, rgba(46, 90, 136, 0.70) 0%, rgba(33, 68, 106, 0.80) 100%);
        --crm-state-text-color: #def1ff;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--success {
        --crm-state-border-color: rgba(145, 233, 189, 0.62);
        --crm-state-bg-color: linear-gradient(180deg, rgba(33, 98, 68, 0.70) 0%, rgba(25, 79, 55, 0.80) 100%);
        --crm-state-text-color: #d9ffe9;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--warning {
        --crm-state-border-color: rgba(247, 209, 134, 0.62);
        --crm-state-bg-color: linear-gradient(180deg, rgba(119, 91, 38, 0.70) 0%, rgba(94, 71, 30, 0.80) 100%);
        --crm-state-text-color: #ffeac0;
    }

    html.dark body.crm-core-theme.model-subscriber.change-list .crm-state.crm-state--danger {
        --crm-state-border-color: rgba(238, 162, 178, 0.62);
        --crm-state-bg-color: linear-gradient(180deg, rgba(122, 58, 72, 0.72) 0%, rgba(101, 46, 59, 0.82) 100%);
        --crm-state-text-color: #ffe0e8;
    }
}

body.model-domain.change-list #result_list td.field-tracking_upload_link .tracking-copy-chip.tracking-copy-done .material-symbols-outlined {
    color: #15803d !important;
    -webkit-text-fill-color: #15803d !important;
    transform: scale(1.08);
}

html.dark[data-crm-theme="dark"] body.crm-core-theme.model-domain.change-list #result_list td.field-tracking_upload_link .tracking-copy-chip.tracking-copy-done .material-symbols-outlined {
    color: #dcfce7 !important;
    -webkit-text-fill-color: #dcfce7 !important;
    transform: scale(1.08);
}

/* ===== CRM app index: themed per-application admin model list ===== */
body.crm-app-index #content {
    padding-top: 8px !important;
}

body.crm-app-index .crm-app-index-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

body.crm-app-index .crm-app-index-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 86px;
    padding: 18px 20px;
    border: 1px solid #d6e4f2;
    border-radius: 22px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(173, 209, 242, 0.30) 0%, rgba(173, 209, 242, 0) 58%),
        linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    box-shadow: 0 12px 28px rgba(41, 77, 120, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.crm-app-index .crm-app-index-hero-main {
    min-width: 0;
}

body.crm-app-index .crm-app-index-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    margin-bottom: 8px;
    border: 1px solid #c9dced;
    border-radius: 999px;
    background: linear-gradient(180deg, #f6fbff 0%, #e7f3ff 100%);
    color: #3b6388;
    font-size: 12px;
    font-weight: 760;
    line-height: 1;
}

body.crm-app-index .crm-app-index-hero h2 {
    margin: 0;
    color: #213b59;
    font-size: 24px;
    font-weight: 760;
    line-height: 1.15;
    letter-spacing: 0;
}

body.crm-app-index .crm-app-index-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #cbdff1;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8fcff 0%, #e9f4ff 100%);
    color: #365d82;
    font-size: 14px;
    font-weight: 720;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body.crm-app-index .crm-app-index-meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #42a5f5;
    box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.14);
}

body.crm-app-index .crm-app-index-layout {
    display: block !important;
}

body.crm-app-index .crm-app-index-main {
    width: 100% !important;
    max-width: none !important;
}

body.crm-app-index .crm-dashboard-main .module {
    overflow: hidden !important;
}

body.crm-app-index .crm-dashboard-main .module caption {
    display: none !important;
}

body.crm-app-index .crm-dashboard-main .module table {
    border-spacing: 0 10px !important;
}

body.crm-app-index .crm-dashboard-main .module tr > th,
body.crm-app-index .crm-dashboard-main .module tr > td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

body.crm-app-index .crm-dashboard-main .module tr th a,
body.crm-app-index .crm-dashboard-main .module tr th {
    color: #253f5c !important;
    font-size: 16px !important;
    font-weight: 720 !important;
}

body.crm-app-index .crm-dashboard-main .module tr:hover > th,
body.crm-app-index .crm-dashboard-main .module tr:hover > td {
    border-color: #b7d3ef !important;
    background: linear-gradient(180deg, #f9fdff 0%, #edf7ff 100%) !important;
}

body.crm-app-index .crm-dashboard-main .module .addlink {
    color: transparent !important;
    font-size: 0 !important;
    text-decoration: none !important;
}

body.crm-app-index .crm-dashboard-main .module .addlink::before {
    content: "add";
    font-family: var(--crm-icon-font);
    color: #4f7190;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

body.crm-app-index .crm-dashboard-main .module .addlink:hover::before {
    color: #285f95;
}

html.dark[data-crm-theme="dark"] body.crm-app-index .crm-app-index-hero,
html.dark body.crm-app-index .crm-app-index-hero {
    border-color: #2b4058;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(87, 134, 190, 0.20) 0%, rgba(87, 134, 190, 0) 58%),
        linear-gradient(180deg, #17283d 0%, #101b2b 100%);
    box-shadow: 0 20px 42px rgba(2, 8, 18, 0.30), inset 0 1px 0 rgba(178, 215, 255, 0.10);
}

html.dark[data-crm-theme="dark"] body.crm-app-index .crm-app-index-kicker,
html.dark body.crm-app-index .crm-app-index-kicker,
html.dark[data-crm-theme="dark"] body.crm-app-index .crm-app-index-meta,
html.dark body.crm-app-index .crm-app-index-meta {
    border-color: rgba(125, 170, 214, 0.42);
    background: linear-gradient(180deg, rgba(48, 76, 109, 0.72) 0%, rgba(35, 58, 86, 0.78) 100%);
    color: #dcecff;
    -webkit-text-fill-color: #dcecff;
}

html.dark[data-crm-theme="dark"] body.crm-app-index .crm-app-index-hero h2,
html.dark body.crm-app-index .crm-app-index-hero h2 {
    color: #eef6ff;
    -webkit-text-fill-color: #eef6ff;
}

html.dark[data-crm-theme="dark"] body.crm-app-index .crm-dashboard-main .module tr:hover > th,
html.dark[data-crm-theme="dark"] body.crm-app-index .crm-dashboard-main .module tr:hover > td,
html.dark body.crm-app-index .crm-dashboard-main .module tr:hover > th,
html.dark body.crm-app-index .crm-dashboard-main .module tr:hover > td {
    border-color: rgba(126, 170, 218, 0.58) !important;
    background: linear-gradient(180deg, rgba(35, 54, 78, 0.96) 0%, rgba(25, 40, 60, 0.98) 100%) !important;
}

html.dark[data-crm-theme="dark"] body.crm-app-index .crm-dashboard-main .module .addlink::before,
html.dark body.crm-app-index .crm-dashboard-main .module .addlink::before {
    color: #dcecff;
}

@media (max-width: 768px) {
    body.crm-app-index .crm-app-index-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
        border-radius: 18px;
    }

    body.crm-app-index .crm-app-index-hero h2 {
        font-size: 20px;
    }

    body.crm-app-index .crm-dashboard-main .module {
        padding: 10px !important;
        border-radius: 18px !important;
    }

    body.crm-app-index .crm-dashboard-main .module table {
        border-spacing: 0 8px !important;
    }
}

/* Desktop dark sidebar: use one CRM navy/slate surface on every admin page. */
@media (min-width: 769px) {
    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar,
    html.dark[data-crm-theme="dark"] body.crm-core-theme div.bg-base-50.relative.z-30:has(> #nav-sidebar) {
        background: linear-gradient(180deg, #172334 0%, #121d2d 100%) !important;
        border-color: #2b4058 !important;
        box-shadow: none !important;
    }

    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar-inner,
    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar-apps,
    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar :is(nav, ul, li, table, tbody, tr, th, td, .module, .bg-base-50, .bg-base-100, .bg-base-200, .dark\:bg-base-800, .dark\:bg-base-900) {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar-inner > div.border-b,
    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar-inner > div.border-b > div.bg-transparent {
        background: transparent !important;
        background-image: none !important;
        border-color: rgba(83, 116, 151, 0.34) !important;
        box-shadow: none !important;
    }

    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar :is(a, .module td a, .module th a, li a, nav a) {
        background: transparent !important;
        background-image: none !important;
        border-color: rgba(95, 126, 159, 0.16) !important;
        box-shadow: none !important;
    }

    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar :is(a, .module td a, .module th a, li a, nav a):hover {
        background: rgba(35, 54, 78, 0.48) !important;
        border-color: rgba(113, 151, 190, 0.36) !important;
    }

    html.dark[data-crm-theme="dark"] body.crm-core-theme #nav-sidebar :is(.current-model a, tr.current-model a, .active a, a[aria-current="page"]) {
        background: linear-gradient(180deg, rgba(48, 76, 109, 0.72) 0%, rgba(35, 58, 86, 0.78) 100%) !important;
        border-color: rgba(125, 170, 214, 0.58) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    }
}

/* Final subscribers dark shell override. Keep last so it beats legacy dark layers. */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme.model-subscriber.change-list,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-subscriber.change-list,
    html.dark body.crm-core-theme.model-subscriber.change-list :is(#container, #page, #main, #content, #header, #header-inner, #header-inner > .flex.items-center.w-full, #content-main),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-subscriber.change-list :is(#container, #page, #main, #content, #header, #header-inner, #header-inner > .flex.items-center.w-full, #content-main),
    html.dark body.crm-core-theme.model-subscriber.change-list #main > :not(#content),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-subscriber.change-list #main > :not(#content),
    html.dark body.crm-core-theme.model-subscriber.change-list #content > :not(#content-main),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-subscriber.change-list #content > :not(#content-main) {
        background: #142235 !important;
        background-color: #142235 !important;
        background-image: none !important;
        box-shadow: none !important;
    }
}

/* Final clients dark polish. Keep last so it beats legacy client layers. */
@media (min-width: 1025px) {
    html.dark body.crm-core-theme.model-client.change-list #main > .bg-white.border-b,
    html.dark body.crm-core-theme.model-client.change-list #main > .bg-white.border-b.border-base-200,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #main > .bg-white.border-b,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #main > .bg-white.border-b.border-base-200 {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        margin-top: 8px !important;
        margin-bottom: 10px !important;
        padding-top: 0 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #main > .bg-white.border-b > .container,
    html.dark body.crm-core-theme.model-client.change-list #main > .bg-white.border-b.border-base-200 > .container,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #main > .bg-white.border-b > .container,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #main > .bg-white.border-b.border-base-200 > .container {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list,
    html.dark body.crm-core-theme.model-client.change-list :is(#container, #page, #main, #content, #header, #header-inner, #header-inner > .flex.items-center.w-full, #content-main),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list :is(#container, #page, #main, #content, #header, #header-inner, #header-inner > .flex.items-center.w-full, #content-main) {
        background: #142235 !important;
        background-color: #142235 !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #main > :not(#content),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #main > :not(#content),
    html.dark body.crm-core-theme.model-client.change-list #content > :not(#content-main),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #content > :not(#content-main) {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    html.dark body.crm-core-theme.model-client.change-list {
        --client-premium-border: rgba(108, 147, 193, 0.34);
        --client-premium-border-strong: rgba(130, 172, 221, 0.52);
        --client-premium-text: #d9e8fb;
        --client-premium-text-soft: #a9bfd8;
        --client-luxe-chip-radius: 999px;
        --client-luxe-chip-text-main: #e6f1ff;
        --client-luxe-chip-text-soft: #b4c9e2;
        --client-luxe-chip-border: rgba(156, 192, 236, 0.44);
        --client-luxe-chip-bg: linear-gradient(180deg, rgba(43, 66, 97, 0.62) 0%, rgba(31, 50, 74, 0.72) 100%);
    }

    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list {
        --client-premium-border: rgba(108, 147, 193, 0.34);
        --client-premium-border-strong: rgba(130, 172, 221, 0.52);
        --client-premium-text: #d9e8fb;
        --client-premium-text-soft: #a9bfd8;
        --client-luxe-chip-radius: 999px;
        --client-luxe-chip-text-main: #e6f1ff;
        --client-luxe-chip-text-soft: #b4c9e2;
        --client-luxe-chip-border: rgba(156, 192, 236, 0.44);
        --client-luxe-chip-bg: linear-gradient(180deg, rgba(43, 66, 97, 0.62) 0%, rgba(31, 50, 74, 0.72) 100%);
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > thead > tr > th,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > thead > tr > th {
        background: linear-gradient(180deg, rgba(37, 54, 78, 0.96) 0%, rgba(30, 45, 66, 0.98) 100%) !important;
        border-top-color: var(--client-premium-border) !important;
        border-bottom-color: var(--client-premium-border) !important;
        color: var(--client-premium-text-soft) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > tbody > tr > :is(th, td),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > tbody > tr > :is(th, td) {
        background: linear-gradient(180deg, rgba(28, 42, 63, 0.98) 0%, rgba(20, 31, 47, 0.99) 100%) !important;
        border-top-color: rgba(95, 130, 171, 0.42) !important;
        border-bottom-color: rgba(95, 130, 171, 0.42) !important;
        color: var(--client-premium-text) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > tbody > tr > :is(th, td):first-child,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > tbody > tr > :is(th, td):first-child {
        border-left-color: rgba(95, 130, 171, 0.42) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > tbody > tr > :is(th, td):last-child,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > tbody > tr > :is(th, td):last-child {
        border-right-color: rgba(95, 130, 171, 0.42) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > tbody > tr:hover > :is(th, td),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > tbody > tr:hover > :is(th, td) {
        background: linear-gradient(180deg, rgba(34, 53, 78, 0.98) 0%, rgba(25, 40, 60, 0.99) 100%) !important;
        border-top-color: var(--client-premium-border-strong) !important;
        border-bottom-color: var(--client-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > tbody > tr:hover > :is(th, td):first-child,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > tbody > tr:hover > :is(th, td):first-child {
        border-left-color: var(--client-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list > tbody > tr:hover > :is(th, td):last-child,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list > tbody > tr:hover > :is(th, td):last-child {
        border-right-color: var(--client-premium-border-strong) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list :is(.crm-state, #result_list td .id-chip, #result_list td .user-chip, #result_list td .status-chip, #result_list td .capital-chip, #result_list td .date-chip, #result_list td .date-chip-empty, #result_list td .geo-chip, #result_list td .geo-chip-empty, #result_list td .domain-chip, #result_list td .channel-chip, #result_list td .comment-chip, #result_list td .data-wrapper),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list :is(.crm-state, #result_list td .id-chip, #result_list td .user-chip, #result_list td .status-chip, #result_list td .capital-chip, #result_list td .date-chip, #result_list td .date-chip-empty, #result_list td .geo-chip, #result_list td .geo-chip-empty, #result_list td .domain-chip, #result_list td .channel-chip, #result_list td .comment-chip, #result_list td .data-wrapper) {
        border-radius: var(--client-luxe-chip-radius) !important;
        border-color: var(--client-luxe-chip-border) !important;
        background: var(--client-luxe-chip-bg) !important;
        color: var(--client-luxe-chip-text-main) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list :is(#result_list td .domain-chip .domain-chip-meta, #result_list td .user-chip .user-chip-sub, #result_list td .geo-chip .geo-city, #result_list td .comment-empty),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list :is(#result_list td .domain-chip .domain-chip-meta, #result_list td .user-chip .user-chip-sub, #result_list td .geo-chip .geo-city, #result_list td .comment-empty) {
        color: var(--client-luxe-chip-text-soft) !important;
        -webkit-text-fill-color: var(--client-luxe-chip-text-soft) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .id-chip,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .id-chip {
        background: linear-gradient(180deg, rgba(98, 70, 160, 0.70) 0%, rgba(72, 51, 124, 0.80) 100%) !important;
        border-color: rgba(193, 166, 255, 0.62) !important;
        color: #efe3ff !important;
        -webkit-text-fill-color: #efe3ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .user-chip,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .user-chip {
        background: linear-gradient(180deg, rgba(54, 86, 126, 0.70) 0%, rgba(40, 64, 96, 0.80) 100%) !important;
        border-color: rgba(161, 199, 242, 0.62) !important;
        color: #e3f1ff !important;
        -webkit-text-fill-color: #e3f1ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .user-chip .user-chip-main-text,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .user-chip .user-chip-main-text {
        color: #f0f7ff !important;
        -webkit-text-fill-color: #f0f7ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td.field-display_geo .geo-chip,
    html.dark body.crm-core-theme.model-client.change-list #result_list td.field-display_geo .geo-chip.geo-chip-empty,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td.field-display_geo .geo-chip,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td.field-display_geo .geo-chip.geo-chip-empty {
        background: linear-gradient(180deg, rgba(47, 80, 116, 0.72) 0%, rgba(34, 60, 90, 0.82) 100%) !important;
        border-color: rgba(151, 196, 242, 0.62) !important;
        color: #e4f1ff !important;
        -webkit-text-fill-color: #e4f1ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td :is(.date-chip, .date-chip-empty),
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td :is(.date-chip, .date-chip-empty) {
        background: linear-gradient(180deg, rgba(57, 87, 124, 0.68) 0%, rgba(40, 65, 96, 0.78) 100%) !important;
        border-color: rgba(165, 203, 244, 0.56) !important;
        color: #e8f2ff !important;
        -webkit-text-fill-color: #e8f2ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .capital-chip.capital-chip-positive,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .capital-chip.capital-chip-positive {
        background: linear-gradient(180deg, rgba(34, 111, 74, 0.80) 0%, rgba(24, 82, 54, 0.90) 100%) !important;
        border-color: rgba(132, 226, 178, 0.64) !important;
        color: #dcffec !important;
        -webkit-text-fill-color: #dcffec !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .capital-chip.capital-chip-risk,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .capital-chip.capital-chip-risk {
        background: linear-gradient(180deg, rgba(114, 60, 34, 0.82) 0%, rgba(84, 42, 22, 0.90) 100%) !important;
        border-color: rgba(241, 166, 122, 0.62) !important;
        color: #ffe4cc !important;
        -webkit-text-fill-color: #ffe4cc !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .capital-chip.capital-chip-zero,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .capital-chip.capital-chip-zero {
        background: linear-gradient(180deg, rgba(57, 87, 124, 0.68) 0%, rgba(40, 65, 96, 0.78) 100%) !important;
        border-color: rgba(165, 203, 244, 0.56) !important;
        color: #e8f2ff !important;
        -webkit-text-fill-color: #e8f2ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-channel,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-channel {
        background: linear-gradient(180deg, rgba(35, 98, 69, 0.72) 0%, rgba(27, 78, 56, 0.82) 100%) !important;
        border-color: rgba(145, 233, 189, 0.62) !important;
        color: #d6ffe9 !important;
        -webkit-text-fill-color: #d6ffe9 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-bot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-has-meta.domain-chip-meta-bot {
        background: linear-gradient(180deg, rgba(120, 92, 38, 0.72) 0%, rgba(95, 72, 30, 0.82) 100%) !important;
        border-color: rgba(246, 208, 132, 0.62) !important;
        color: #ffe8b8 !important;
        -webkit-text-fill-color: #ffe8b8 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-enigma.domain-chip-has-meta,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-enigma.domain-chip-has-meta {
        background: linear-gradient(180deg, rgba(138, 106, 34, 0.82) 0%, rgba(105, 78, 22, 0.90) 100%) !important;
        border-color: rgba(246, 208, 132, 0.66) !important;
        color: #ffe8b8 !important;
        -webkit-text-fill-color: #ffe8b8 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-cryptolab.domain-chip-has-meta,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-cryptolab.domain-chip-has-meta {
        background: linear-gradient(180deg, rgba(92, 63, 144, 0.82) 0%, rgba(70, 46, 113, 0.90) 100%) !important;
        border-color: rgba(203, 170, 255, 0.64) !important;
        color: #f0e2ff !important;
        -webkit-text-fill-color: #f0e2ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-shark.domain-chip-has-meta,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-shark.domain-chip-has-meta {
        background: linear-gradient(180deg, rgba(50, 92, 139, 0.82) 0%, rgba(34, 67, 105, 0.90) 100%) !important;
        border-color: rgba(159, 205, 255, 0.64) !important;
        color: #e4f2ff !important;
        -webkit-text-fill-color: #e4f2ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-space.domain-chip-has-meta,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-space.domain-chip-has-meta {
        background: linear-gradient(180deg, rgba(35, 98, 69, 0.82) 0%, rgba(27, 78, 56, 0.90) 100%) !important;
        border-color: rgba(145, 233, 189, 0.64) !important;
        color: #d6ffe9 !important;
        -webkit-text-fill-color: #d6ffe9 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-pulse.domain-chip-has-meta,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .domain-chip.domain-chip-pulse.domain-chip-has-meta {
        background: linear-gradient(180deg, rgba(138, 106, 34, 0.82) 0%, rgba(105, 78, 22, 0.90) 100%) !important;
        border-color: rgba(246, 208, 132, 0.66) !important;
        color: #ffe8b8 !important;
        -webkit-text-fill-color: #ffe8b8 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .channel-chip,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .channel-chip {
        background: linear-gradient(180deg, rgba(52, 74, 108, 0.66) 0%, rgba(39, 57, 84, 0.76) 100%) !important;
        border-color: rgba(175, 205, 242, 0.62) !important;
        color: #e7f1ff !important;
        -webkit-text-fill-color: #e7f1ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip {
        border-radius: 999px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
        font-weight: 800 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip .status-dot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip .status-dot {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04) !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_new,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_new {
        border-color: rgba(126, 166, 208, 0.54) !important;
        background: linear-gradient(180deg, rgba(46, 78, 115, 0.72) 0%, rgba(33, 58, 90, 0.82) 100%) !important;
        color: #dcecff !important;
        -webkit-text-fill-color: #dcecff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_new .status-dot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_new .status-dot {
        background: #86b9ee !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_understanding,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_understanding {
        border-color: rgba(234, 194, 121, 0.64) !important;
        background: linear-gradient(180deg, rgba(109, 82, 35, 0.82) 0%, rgba(79, 57, 22, 0.90) 100%) !important;
        color: #ffe7b8 !important;
        -webkit-text-fill-color: #ffe7b8 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_understanding .status-dot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_understanding .status-dot {
        background: #ffd071 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_work,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_work {
        border-color: rgba(129, 226, 178, 0.62) !important;
        background: linear-gradient(180deg, rgba(28, 94, 64, 0.80) 0%, rgba(20, 71, 48, 0.88) 100%) !important;
        color: #d9ffe9 !important;
        -webkit-text-fill-color: #d9ffe9 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_work .status-dot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_work .status-dot {
        background: #7ce1ae !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_register,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_register {
        border-color: rgba(194, 150, 94, 0.62) !important;
        background: linear-gradient(180deg, rgba(92, 66, 31, 0.80) 0%, rgba(66, 46, 20, 0.88) 100%) !important;
        color: #f7ddb1 !important;
        -webkit-text-fill-color: #f7ddb1 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_register .status-dot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_register .status-dot {
        background: #f1bb70 !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_deposit,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_deposit {
        border-color: rgba(123, 196, 255, 0.72) !important;
        background: linear-gradient(180deg, rgba(36, 104, 152, 0.86) 0%, rgba(23, 72, 111, 0.94) 100%) !important;
        color: #e3f5ff !important;
        -webkit-text-fill-color: #e3f5ff !important;
    }

    html.dark body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_deposit .status-dot,
    html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td .status-chip.status_deposit .status-dot {
        background: #8fd7ff !important;
    }

}


@media (min-width: 1025px) {
    html body.model-subscriber.change-list #result_list > thead > tr > th.column-display_welcome_segment,
    html body.model-subscriber.change-list #result_list > tbody > tr > td.field-display_welcome_segment {
        display: table-cell !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

html.dark body.crm-core-theme.model-client.change-list #result_list td.field-display_subscribed_date .date-chip.date-chip-empty,
html.dark[data-crm-theme="dark"] body.crm-core-theme.model-client.change-list #result_list td.field-display_subscribed_date .date-chip.date-chip-empty {
    border-color: rgba(248, 113, 113, 0.62) !important;
    background: linear-gradient(180deg, rgba(127, 45, 58, 0.72) 0%, rgba(98, 34, 47, 0.82) 100%) !important;
    color: #ffd6d6 !important;
    -webkit-text-fill-color: #ffd6d6 !important;
}

.crm-capi-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.crm-capi-chip--success {
    border-color: #bbf7d0;
    background: #dcfce7;
    color: #166534;
}

.crm-capi-chip--warning {
    border-color: #fde68a;
    background: #fef3c7;
    color: #92400e;
}

.crm-capi-chip--danger {
    border-color: #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}

html.dark .crm-capi-chip,
html.dark[data-crm-theme="dark"] .crm-capi-chip {
    border-color: rgba(128, 171, 220, 0.50);
    background: linear-gradient(180deg, rgba(43, 67, 96, 0.62) 0%, rgba(35, 55, 80, 0.70) 100%);
    color: #d8e9ff;
    -webkit-text-fill-color: #d8e9ff;
}

html.dark .crm-capi-chip--success,
html.dark[data-crm-theme="dark"] .crm-capi-chip--success {
    border-color: rgba(122, 217, 173, 0.60);
    background: linear-gradient(180deg, rgba(28, 86, 59, 0.68) 0%, rgba(24, 71, 50, 0.76) 100%);
    color: #d9ffe9;
    -webkit-text-fill-color: #d9ffe9;
}

html.dark .crm-capi-chip--warning,
html.dark[data-crm-theme="dark"] .crm-capi-chip--warning {
    border-color: rgba(237, 201, 133, 0.60);
    background: linear-gradient(180deg, rgba(91, 72, 37, 0.68) 0%, rgba(74, 58, 30, 0.76) 100%);
    color: #ffe7b8;
    -webkit-text-fill-color: #ffe7b8;
}

html.dark .crm-capi-chip--danger,
html.dark[data-crm-theme="dark"] .crm-capi-chip--danger {
    border-color: rgba(227, 132, 152, 0.60);
    background: linear-gradient(180deg, rgba(106, 47, 64, 0.70) 0%, rgba(88, 39, 53, 0.78) 100%);
    color: #ffdbe4;
    -webkit-text-fill-color: #ffdbe4;
}

/* Keep client channel chips visually aligned with domain chips. */
html body.model-client.change-list #result_list td.field-display_channel .channel-chip {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    gap: 7px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 12.5px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
}

html body.model-client.change-list #result_list td.field-display_channel .channel-chip > span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
}

html body.model-client.change-list #result_list td.field-display_channel .channel-chip img {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
    border-radius: 999px !important;
}
