.bulk-lead-toolbar-action {
    flex: 0 0 auto;
}

.bulk-lead-search-component {
    order: 100;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    margin-top: 12px;
}

.bulk-lead-search-form {
    position: relative;
    width: 100%;
}

/* Keep the lead search and the three project controls in one compact row. */
:is(#main, .task-list-page, section.page) .project-header > .bulk-lead-search-component {
    order: 2 !important;
    flex: 1 1 280px !important;
    width: auto !important;
    margin: 12px 0 0 !important;
}

:is(#main, .task-list-page, section.page) .project-header > .filter-box-component {
    order: 3 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    margin: 12px 0 0 6px !important;
}

html[dir="rtl"] :is(#main, .task-list-page, section.page) .project-header > .filter-box-component {
    margin: 12px 6px 0 0 !important;
}

:is(#main, .task-list-page, section.page) .project-header > .dropdown-component {
    order: 4 !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    margin: 0 !important;
}

html[dir="rtl"] :is(#main, .task-list-page, section.page) .project-header > .dropdown-component {
    margin: 0 !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .filter-box,
:is(#main, .task-list-page, section.page) .project-header .filter-box-component form.search,
:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon {
    width: auto !important;
    height: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-field {
    display: none !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    flex: 0 0 40px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: #4f46e5 !important;
    color: #fff !important;
    box-shadow: 0 5px 14px rgba(79, 70, 229, .24) !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item:nth-of-type(2) {
    background: #4f46e5 !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item:nth-of-type(3) {
    background: #4f46e5 !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item .dropdown,
:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item .dropdown-menu,
:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item .dropdown-menu-link-icon,
:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item > a {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item i,
:is(#main, .task-list-page, section.page) .project-header .dropdown-component > .dropdown > .action-menu i {
    color: #fff !important;
    padding: 0 !important;
    padding-right: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

:is(#main, .task-list-page, section.page) .project-header-sales-role > .dropdown-component .fa-caret-down {
    display: none !important;
}

/* Fallback for sales accounts identified at the global header level. */
body:has(header.header-sales-role) :is(#main, .task-list-page, section.page) .project-header > .filter-box-component,
:is(#main, .task-list-page, section.page) .project-header-sales-role > .filter-box-component,
body:has(header.header-sales-role) :is(#main, .task-list-page, section.page) .project-header > .dropdown-component .fa-caret-down {
    display: none !important;
}

:is(#main, .task-list-page, section.page) .project-header > .dropdown-component > .dropdown,
:is(#main, .task-list-page, section.page) .project-header > .dropdown-component > .dropdown > .action-menu {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: #4f46e5 !important;
    color: #fff !important;
    box-shadow: 0 5px 14px rgba(79, 70, 229, .24) !important;
}

:is(#main, .task-list-page, section.page) .project-header .filter-box-component .input-addon-item:hover,
:is(#main, .task-list-page, section.page) .project-header > .dropdown-component > .dropdown > .action-menu:hover {
    background: #4338ca !important;
    filter: none !important;
    transform: translateY(-1px) !important;
}

@media (max-width: 420px) {
    :is(#main, .task-list-page, section.page) .project-header > .bulk-lead-search-component {
        flex-basis: 100% !important;
    }
}

@media (max-width: 767px) {
    html body :is(#main, .task-list-page, section.page) .project-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto !important;
        grid-template-areas:
            "views views views"
            "search filters settings" !important;
        column-gap: 6px !important;
        row-gap: 12px !important;
        align-items: center !important;
    }

    html body :is(#main, .task-list-page, section.page) .project-header > .views-switcher-component {
        grid-area: views !important;
        width: 100% !important;
        margin: 0 !important;
    }

    html body :is(#main, .task-list-page, section.page) .project-header > .bulk-lead-search-component {
        grid-area: search !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    html body :is(#main, .task-list-page, section.page) .project-header > .filter-box-component {
        grid-area: filters !important;
        width: auto !important;
        height: 54px !important;
        margin: 0 !important;
    }

    html body :is(#main, .task-list-page, section.page) .project-header > .dropdown-component {
        grid-area: settings !important;
        width: 40px !important;
        height: 54px !important;
        margin: 0 !important;
    }

    html body :is(#main, .task-list-page, section.page) .project-header-sales-role {
        grid-template-columns: minmax(0, 1fr) 54px !important;
        grid-template-areas:
            "views views"
            "search settings" !important;
        column-gap: 8px !important;
    }

    html body:has(header.header-sales-role) :is(#main, .task-list-page, section.page) .project-header {
        grid-template-columns: minmax(0, 1fr) 54px !important;
        grid-template-areas:
            "views views"
            "search settings" !important;
        column-gap: 8px !important;
    }

    html body:has(header.header-sales-role) :is(#main, .task-list-page, section.page) .project-header > .views-switcher-component,
    html body :is(#main, .task-list-page, section.page) .project-header-sales-role > .views-switcher-component {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

:is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-form input[type="search"] {
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 0 62px 0 18px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 17px !important;
    background: #fff !important;
    color: #64748b !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03) !important;
    appearance: none;
}

:is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-form input[type="search"]::placeholder {
    color: #7c899c !important;
    opacity: 1 !important;
}

html[dir="rtl"] :is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-form input[type="search"] {
    padding: 0 18px 0 62px !important;
}

:is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-form input[type="search"]:focus {
    border-color: #a5b4fc !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .11) !important;
}

:is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-component .bulk-lead-search-form > button[type="submit"] {
    position: absolute !important;
    inset-block-start: 50% !important;
    inset-inline-end: 7px !important;
    width: 40px !important;
    max-width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    flex: 0 0 40px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: #4f46e5 !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1 !important;
    box-shadow: 0 5px 14px rgba(79, 70, 229, .24) !important;
    transform: translateY(-50%) !important;
}

:is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-component .bulk-lead-search-form > button[type="submit"]:hover,
:is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-component .bulk-lead-search-form > button[type="submit"]:focus {
    background: #4338ca !important;
    transform: translateY(-50%) !important;
}

.bulk-lead-phone-field input[type="tel"] {
    width: 100% !important;
    min-height: 48px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--modern-border-strong, #cbd5e1) !important;
    border-radius: 16px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-family: inherit !important;
    font-size: 15px !important;
    direction: ltr;
    text-align: start;
    box-sizing: border-box !important;
}

.bulk-lead-toolbar-action a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.bulk-lead-heading {
    margin-bottom: 16px;
}

.bulk-lead-heading h2 {
    margin: 2px 0 4px;
}

.bulk-lead-heading p {
    margin: 0;
    color: var(--modern-muted, #64748b);
}

.bulk-lead-kicker {
    color: var(--modern-accent, #4f46e5);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.bulk-lead-form {
    display: grid;
    gap: 20px;
}

/* Form controls match the global design system / login inputs */
.bulk-lead-form label {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.bulk-lead-form input[type="text"],
.bulk-lead-form input[type="number"],
.bulk-lead-form select,
.bulk-lead-form textarea {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--modern-border-strong, #cbd5e1) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.bulk-lead-form input[type="text"]:focus,
.bulk-lead-form input[type="number"]:focus,
.bulk-lead-form select:focus,
.bulk-lead-form textarea:focus {
    border-color: var(--modern-accent, #4f46e5) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .14) !important;
    outline: none !important;
}

.bulk-lead-primary-field textarea {
    min-height: 180px !important;
    resize: vertical !important;
    font-family: inherit !important;
    line-height: 1.9 !important;
    letter-spacing: .02em !important;
}

.bulk-lead-options {
    display: grid !important;
    grid-template-columns: 1fr !important;   /* one column -> all fields equal width */
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--modern-border, #e2e8f0);
    border-radius: 14px;
    background: var(--modern-surface-muted, #f8fafc);
}

.bulk-lead-options > div,
.bulk-lead-tags {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.bulk-lead-options select,
.bulk-lead-tags .select2-container,
.bulk-lead-tags .select2-selection,
.bulk-lead-tags .select2-selection--multiple {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.bulk-lead-tags .select2-container {
    width: 100% !important;
}

.bulk-lead-tags .select2-selection--multiple {
    min-height: 44px !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    border: 1px solid var(--modern-border-strong, #cbd5e1) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.bulk-lead-tags .select2-selection__rendered {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.bulk-lead-tags .select2-search--inline,
.bulk-lead-tags .select2-search__field {
    min-height: 28px !important;
    margin: 0 !important;
    line-height: 28px !important;
}

.bulk-lead-upload {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: center;
    padding: 20px;
    border: 1px dashed var(--modern-border-strong, #cbd5e1);
    border-radius: 14px;
    background: var(--modern-surface-muted, #f8fafc);
}

.bulk-lead-upload > .fa {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 12px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 24px;
}

/* Hide browser native file input; use styled upload area instead */
.bulk-lead-upload input[type=file] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.bulk-lead-upload {
    position: relative;
    cursor: pointer;
}

.bulk-lead-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    pointer-events: none;
}

.bulk-lead-filename {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.bulk-lead-summary {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--modern-border, #e2e8f0);
    border-radius: 14px;
    background: #fff;
}

.bulk-lead-summary h3 {
    margin: 0 0 12px;
}

.bulk-lead-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.bulk-lead-summary-grid > div {
    display: grid;
    gap: 2px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
}

.bulk-lead-summary-grid strong {
    color: #0f172a;
    font-size: 22px;
}

.bulk-lead-summary-grid .is-success {
    background: #f0fdf4;
}

.bulk-lead-summary-grid .is-warning {
    background: #fffbeb;
}

.bulk-lead-summary-grid .is-error {
    background: #fef2f2;
}

.bulk-lead-summary details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--modern-border, #e2e8f0);
}

.bulk-lead-summary summary {
    cursor: pointer;
    font-weight: 700;
}

.bulk-lead-summary ul {
    margin: 10px 0 0;
}

.lead-call-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534 !important;
    font-weight: 750;
    text-decoration: none !important;
}

.lead-call-button:hover,
.lead-call-button:focus {
    border-color: #86efac;
    background: #dcfce7;
    color: #14532d !important;
}

.lead-call-button-compact {
    min-height: 28px;
    max-width: 100%;
    padding: 2px 8px;
    font-size: 12px;
}

.lead-call-button-compact span {
    direction: ltr;
    unicode-bidi: isolate;
}

.lead-call-button-list {
    min-height: 30px;
    padding-inline: 10px;
}

.lead-call-button-list span {
    direction: inherit;
}

/* Actions stacked: import button on top, cancel below; identical height */
.bulk-lead-form .form-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-top: 4px;
}

.bulk-lead-form .form-actions .btn,
.bulk-lead-form .form-actions .js-modal-close {
    flex: 0 0 auto !important;   /* never grow to fill column height */
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-sizing: border-box !important;
}

/* Primary import button */
.bulk-lead-form .form-actions .btn {
    order: 0 !important;
    background: var(--modern-accent, #4f46e5) !important;
    border: 1px solid var(--modern-accent, #4f46e5) !important;
    color: #fff !important;
}

.bulk-lead-form .form-actions .btn:hover {
    background: var(--modern-accent-strong, #4338ca) !important;
    border-color: var(--modern-accent-strong, #4338ca) !important;
    color: #fff !important;
}

/* Cancel below, secondary */
.bulk-lead-form .form-actions .js-modal-close {
    order: 1 !important;
    border: 1px solid var(--modern-border, #e2e8f0) !important;
    background: #fff !important;
    color: #334155 !important;
}

.bulk-lead-form .form-actions .js-modal-close:hover {
    border-color: #c7d2fe !important;
    background: #eef2ff !important;
    color: #4338ca !important;
}

.lead-contact-panel {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #bbf7d0;
    border-radius: 18px;
    background:
        radial-gradient(circle at 0 0, rgba(34, 197, 94, .18), transparent 36%),
        linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    box-sizing: border-box;
}

#task-summary > h2 {
    display: none !important;
}

.lead-contact-panel::after {
    content: "";
    position: absolute;
    inset-block-start: -28px;
    inset-inline-end: -22px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .14);
    pointer-events: none;
}

.lead-contact-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 197, 94, .22);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
    color: #16a34a;
    font-size: 23px;
    box-shadow: 0 8px 18px rgba(22, 163, 74, .12);
}

.lead-contact-identity {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
    min-width: 0;
}

.lead-contact-label {
    color: #15803d;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.4;
}

.lead-contact-identity strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.5;
    unicode-bidi: isolate;
}

.lead-contact-phone i {
    color: #16a34a;
}

.lead-contact-panel .lead-call-button {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
    padding: 0 !important;
    border: 0;
    border-radius: 14px;
    background: #16a34a;
    color: #fff !important;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 22px rgba(22, 163, 74, .22);
}

.lead-contact-panel .lead-call-button:hover,
.lead-contact-panel .lead-call-button:focus {
    background: #15803d;
    color: #fff !important;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .bulk-lead-options,
    .bulk-lead-summary-grid {
        grid-template-columns: 1fr;
    }

    .bulk-lead-upload {
        grid-template-columns: 1fr;
    }

    .bulk-lead-primary-field textarea {
        min-height: 220px;
    }

    .lead-contact-panel {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px;
        padding: 14px;
    }

    .lead-contact-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .bulk-lead-form .form-actions {
        gap: 8px !important;
    }
}

.bulk-lead-excel-import {
    width: min(100%, 940px) !important;
    margin: 0 auto !important;
    padding: 0 0 12px !important;
}

.bulk-lead-modern-excel-form {
    margin: 0 !important;
}

.bulk-lead-modern-excel-form .form-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
    margin: 0 !important;
}

.bulk-lead-modern-excel-form .form-actions .onboarding-import-primary {
    min-height: 50px !important;
    gap: 8px !important;
    font-size: 15px !important;
}

.bulk-lead-modern-options {
    display: grid !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
}

.bulk-lead-modern-options h4 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    line-height: 1.6 !important;
}

.bulk-lead-modern-options .bulk-lead-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 !important;
}

.bulk-lead-modern-options .bulk-lead-options > div,
.bulk-lead-modern-options .bulk-lead-tags {
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.bulk-lead-modern-options label {
    display: block !important;
    margin: 0 0 6px !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.bulk-lead-modern-options select,
.bulk-lead-modern-options input[type="text"] {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    border: 1px solid #dbe4f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    box-sizing: border-box !important;
}

.bulk-lead-modern-options .select2-container {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.bulk-lead-modern-options .select2-selection,
.bulk-lead-modern-options .select2-selection--multiple {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    border: 1px solid #dbe4f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    box-sizing: border-box !important;
}

.bulk-lead-modern-options .select2-selection__rendered {
    width: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
}

.bulk-lead-modern-options .select2-search--inline {
    flex: 1 1 auto !important;
    min-width: 90px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bulk-lead-modern-options .select2-search__field {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    color: #0f172a !important;
    font: inherit !important;
    line-height: 32px !important;
}

.bulk-lead-modern-options .select2-selection__choice {
    flex: 0 0 auto !important;
    max-width: 46% !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #eef2ff !important;
    color: #3730a3 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.bulk-lead-modern-options .form-help {
    margin: 6px 0 0 !important;
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
    line-height: 1.7 !important;
}

.bulk-lead-excel-import .onboarding-file-status-card > .onboarding-import-primary {
    align-self: center !important;
    white-space: nowrap !important;
}

.bulk-lead-excel-import .onboarding-duplicate-notice span {
    display: inline-flex !important;
    align-items: center !important;
    max-width: min(320px, 100%) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #92400e !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

@media (max-width: 767px) {
    .bulk-lead-modern-excel-form .form-actions,
    .bulk-lead-modern-options .bulk-lead-options,
    .bulk-lead-excel-import .onboarding-file-status-card {
        grid-template-columns: 1fr !important;
    }

    .bulk-lead-modern-excel-form .form-actions .onboarding-import-primary,
    .bulk-lead-modern-excel-form .form-actions .onboarding-import-secondary,
    .bulk-lead-excel-import .onboarding-file-status-card > .onboarding-import-primary {
        width: 100% !important;
    }
}

@media (min-width: 768px) {
    :is(#main, .task-list-page, section.page) .project-header {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    :is(#main, .task-list-page, section.page) .crm-search-board-section > .project-header {
        margin-inline: 0 !important;
    }

    :is(#main, .task-list-page, section.page) .project-header > *,
    :is(#main, .task-list-page, section.page) .project-header > .views-switcher-component,
    :is(#main, .task-list-page, section.page) .project-header > .bulk-lead-search-component,
    :is(#main, .task-list-page, section.page) .project-header > .filter-box-component,
    :is(#main, .task-list-page, section.page) .project-header > .dropdown-component {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    :is(#main, .task-list-page, section.page) .project-header > .views-switcher-component {
        flex: 0 1 auto !important;
        overflow: visible !important;
    }

    :is(#main, .task-list-page, section.page) .project-header .views {
        min-width: 0 !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }

    :is(#main, .task-list-page, section.page) .project-header .views li,
    :is(#main, .task-list-page, section.page) .project-header .views li a,
    :is(#main, .task-list-page, section.page) .project-header .bulk-lead-import-dropdown,
    :is(#main, .task-list-page, section.page) .project-header .bulk-lead-import-dropdown > .dropdown-menu {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    :is(#main, .task-list-page, section.page) .project-header .views li a,
    :is(#main, .task-list-page, section.page) .project-header .bulk-lead-import-dropdown-label {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    :is(#main, .task-list-page, section.page) .project-header > .bulk-lead-search-component {
        flex: 1 1 360px !important;
        width: auto !important;
        min-width: min(280px, 100%) !important;
    }

    :is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-form,
    :is(#main, .task-list-page, section.page) .project-header .bulk-lead-search-form input[type="search"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Mobile Excel/Text import modals are large bottom sheets; keep Bottom Nav behind them. */
@media (max-width: 767px) {
    body:has(#modal-box .bulk-lead-excel-import) .crm-mobile-bottom-nav,
    body:has(#modal-box .bulk-lead-form) .crm-mobile-bottom-nav,
    body:has(#modal-content .bulk-lead-excel-import) .crm-mobile-bottom-nav,
    body:has(#modal-content .bulk-lead-form) .crm-mobile-bottom-nav {
        display: flex !important;
        transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px) + 16px)) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: 1200 !important;
        transition: transform .22s ease, opacity .18s ease !important;
    }

    body:has(#modal-box .bulk-lead-excel-import),
    body:has(#modal-box .bulk-lead-form),
    body:has(#modal-content .bulk-lead-excel-import),
    body:has(#modal-content .bulk-lead-form) {
        overflow: hidden !important;
        touch-action: none !important;
        overscroll-behavior: none !important;
    }

    body:has(#modal-box .bulk-lead-excel-import) #modal-box,
    body:has(#modal-box .bulk-lead-form) #modal-box,
    body:has(#modal-content .bulk-lead-excel-import) #modal-box,
    body:has(#modal-content .bulk-lead-form) #modal-box {
        position: fixed !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: calc(100dvh - 8px) !important;
        margin: 0 !important;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 24px 24px 0 0 !important;
        transform: none !important;
        z-index: 3201 !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    body:has(#modal-box .bulk-lead-excel-import) #modal-overlay,
    body:has(#modal-box .bulk-lead-form) #modal-overlay,
    body:has(#modal-content .bulk-lead-excel-import) #modal-overlay,
    body:has(#modal-content .bulk-lead-form) #modal-overlay {
        z-index: 3200 !important;
    }
}
