.leads-page {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 
.leads-page .ui-selectmenu-menu {
    max-height: 300px;
    overflow-y: auto;
} */
.leads-page .ui-state-active,
.leads-page .ui-widget-content .ui-state-active {
    color: var(--color-black) !important;
}


.leads {
    flex: 1;
    background: var(--leads-bg);
    color: var(--leads-text-color);
    margin-top: 53px;
    padding: 24px 0;
    overflow: hidden;
}

.leads__container {
    display: grid;
    grid-template-columns: 364fr 1080fr;
    gap: 16px;
    height: 100%;
}

.leads__main,
.leads__col {
    background: var(--leads-column-bg);
    border-radius: 20px;
    padding: 20px;
}

.leads__main {
    overflow: hidden;
    padding-left: 8px;
}

.leads__main-container {
    display: grid;
    grid-template-columns: 688fr 488fr;
    gap: 18px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.leads__main .leads__col::after {
    bottom: 0;
}

.leads__col {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.has-shadow::after {
    pointer-events: none;
    user-select: none;
    content: "";
    width: 100%;
    height: 34px;
    position: absolute;
    bottom: 20px;
    left: 0;
    z-index: 2;
    background: var(--leads-column-shadow);
}

.leads__col-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.leads__col-title {
    font-weight: 600;
    font-size: 20px;
}

.leads__col-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leads__search {
    flex: 0 1 333px;
    position: relative;
}

.leads__search input {
    width: 100%;
    font-size: 14px;
    font-family: "Poppins";
    line-height: 22px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--dropdown-border-color);
    height: 32px;
    background-color: transparent;
    color: var(--text-color);
    transition-property: transform, border;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}

.leads__search input:active {
    /* font-size: 16px; */
}

.leads__search label {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 40px;
    white-space: nowrap;
}

.leads__search input:hover,
.leads__search input:focus {
    border-color: var(--color-blue);
}

.leads__selectbox {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
}

.leads__selectbox-title {
    font-size: 12px;
    color: var(--leads-selectbox-title-color);
    white-space: nowrap;
}

.leads__selectbox .ui-selectmenu-button {
    max-width: 120px;
    height: 32px;
    border-color: var(--dropdown-border-color);
}

.leads__selectbox .ui-selectmenu-button,
.leads__selectbox .ui-selectmenu-button:hover,
.leads__selectbox .ui-selectmenu-button:focus {
    background: transparent;
}

.leads__selectbox .ui-selectmenu-text {
    line-height: 18px;
}

.leads__selectbox .custom-select .ui-selectmenu-button-closed .ui-icon {
    background-image: url(/icons/triangle-down.svg) !important;
}

.leads__selectbox .custom-select .ui-button.ui-selectmenu-button-open .ui-icon {
    background-image: url(/icons/triangle-up.svg) !important;
}

.leads__selectbox .custom-select .ui-selectmenu-text {
    font-weight: 500;
    font-size: 12px;
}



.custom-select .custom-multiselect,
.custom-select .custom-multiselect:hover,
.custom-select .custom-multiselect:focus,
.custom-select .custom-multiselect:active {
    color: var(--text-color);
    border-radius: 8px;
    border: 1px solid var(--sibebar-select-bg-color);
    transition-property: transform, background-color, border;
    transition-duration: .2s;
    transition-timing-function: ease-in-out;
}

.custom-select .custom-multiselect {
    min-width: 120px;
    width: fit-content;
    position: relative;
    font-family: "Poppins";
    font-style: normal;
    font-size: 14px;
    font-weight: 500;
    line-height: 15px;
    color: var(--text-color);
    display: inline-block;
    position: relative;
    line-height: normal;
    margin-right: .1em;
    cursor: pointer;
    vertical-align: middle;
    user-select: none;
    overflow: visible;
    background: transparent;
}

.custom-select .custom-multiselect-header {
    padding: .4em 2em .4em 1em;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select .custom-multiselect.active,
.custom-select .custom-multiselect:hover {
    border: 1px solid var(--color-blue);
}

.custom-select .custom-multiselect .custom-multiselect-icon {
    pointer-events: none;
    user-select: none;
    width: 16px;
    height: 16px;
    background-position: center;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-image: url("/icons/triangle-down.svg") !important;
    display: inline-block;
    vertical-align: middle;
    text-indent: -99999px;
    overflow: hidden;
    background-repeat: no-repeat;
}

.custom-select .custom-multiselect.active .custom-multiselect-icon {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select .custom-multiselect label {
    cursor: pointer;
    display: block;
    margin: 0;
    border: none !important;
    padding: 6px 8px;
    font-size: 13px;
    font-family: "Poppins";
    font-weight: 400;
    line-height: 1.2;
    border-radius: 8px;
}


.custom-select .custom-multiselect label:not(:last-child) {
    margin-bottom: 8px;
}

.custom-select .custom-multiselect label.active,
.custom-select .custom-multiselect label:hover {
    background-color: var(--table-border-color) !important;
    font-weight: 600;
    color: var(--color-black);
}

.custom-select .custom-multiselect input {
    display: none;
}

.custom-select .custom-multiselect-list {
    display: none;
    max-height: 300px;
    min-width: 100%;
    overflow-y: auto;
    white-space: nowrap;
    position: absolute;
    right: 0;
    border-radius: 8px;
    padding: 6px;
    margin-top: 4px;
    border: none;
    box-shadow: 0 0 9px rgba(0, 0, 0, 0.1);
    background: var(--ui-widget-bg);
    color: var(--text-color);
    z-index: 3;
}

.leads__export {
    height: 32px;
}

.leads__export .btn {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    padding: 6px 9px;
    border: 1px solid var(--dropdown-border-color);
    transition: all .3s ease-in-out;
    font-size: 12px;
}

html[theme="dark"] .leads__export .btn .btn__icon {
    filter: invert(1);
}


.leads__export .btn span {
    font-size: inherit;
}

.leads__export .btn:hover {
    border-color: var(--color-blue);
}

.leads__export .btn:hover span {
    transform: none;
}

/* news */

.leads__news-list {
    flex: 1;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    margin-right: -13px;
    padding-right: 7px;
}

.leads__news-item {
    flex: 0 0 72px;
}

.leads__news-itemLink {
    display: flex;
    border-radius: 6px;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: var(--leads-news-card-bg);
}


.leads__news-itemLink:hover .leads__news-itemImg img {
    transform: scale(1.1);
}

.leads__news-itemImg {
    position: relative;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
}

.leads__news-itemImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease-in-out;
}

.leads__news-itemContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leads__news-itemHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.leads__news-itemCategory {
    font-size: 10px;
    line-height: 2;
    background: var(--leads-news-item-category-bg);
    border-radius: 6px;
    padding: 0px 8px;
}

.leads__news-itemDate {
    font-size: 12px;
    color: var(--leads-news-item-date-color);
}

.leads__news-itemText {
    font-size: 13px;
    line-height: 123%;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* leads */

.leads__leads {
    padding: 0;
    border-radius: 0;
}

.leads__leads .leads__col-heading {
    padding-left: 12px;
}

.leads__content {
    overflow-x: auto;
    width: 100%;
    height: 100%;
    padding-left: 6px;
}

.leads__content.has-shadow::after {
    bottom: 0;
}


@property --gradient-end {
    syntax: '<color>';
    inherits: false;
    initial-value: #f6f6f6;
}

@property --gradient-start {
    syntax: '<color>';
    inherits: false;
    initial-value: rgba(246, 246, 246, 0);
}

.leads__content.has-shadow-horizontal .name::after {
    --gradient-start: var(--gradient-start-color);
    --gradient-end: var(--gradient-end-color);

    opacity: 0;
    pointer-events: none;
    user-select: none;
    content: "";
    width: 12px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 2;
    background: linear-gradient(-90deg,
            var(--gradient-start) 0%,
            var(--gradient-end) 100%);
    transition:
        --gradient-start 0.3s ease-in-out,
        --gradient-end 0.3s ease-in-out;
}

.leads__content.has-shadow-horizontal .leads__table-row:hover .leads__table-cell.name::after {
    --gradient-start: var(--gradient-start-color-hover);
    --gradient-end: var(--gradient-end-color-hover);
}

.leads__content.has-shadow-horizontal .name::after {
    opacity: 1;
}

.leads__table {
    display: grid;
    grid-template-columns:
        6px minmax(228px, auto) max-content 72px max-content 80px 6px;
    gap: 0;
    font-size: 12px;
    line-height: normal;
}

.leads__table.primary .leads__table-cell:not(.empty):hover .leads__table-cell-content {
    border: 1px solid var(--dropdown-border-color);
}

.leads__table.primary .leads__table-cell:hover .leads__item-dropdown-arrow {
    opacity: 1;
}

.leads__table-head,
.leads__table-body {
    display: grid;
    grid-template-columns: subgrid;
    /* 💥 наследуют структуру от .table */
    grid-column: 1 / -1;
}

.leads__table-head {
    position: sticky;
    top: 0;
    z-index: 3;
    margin-bottom: 6px;
}

/* строки */
.leads__table-row {
    cursor: pointer;
    display: grid;
    grid-template-columns: subgrid;
    /* 💥 наследуют ширины колонок */
    grid-column: 1 / -1;

}

.leads__table-head .leads__table-cell {
    height: auto;
    color: var(--leads-table-th-color);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--leads-table-th-border);
}

.leads__table-head .leads__table-cell:not(.name, .owner) {
    text-align: center;
}

.leads__table-head .leads__table-cell.owner {
    padding-left: 12px;
}

.leads__table-head .leads__table-cell.empty {
    border-bottom-color: transparent;
}

.leads__table-body .leads__table-cell {
    border-left: none;
    border-right: none;
    display: flex;
    align-items: center;
}

.leads__table-body .leads__table-cell:last-child {
    border-right: 1px solid transparent;
}

.leads__table-body .leads__table-cell.empty {
    border-left: 1px solid transparent;
}

.leads__table-body .leads__table-row:hover .leads__table-cell {
    background-color: var(--leads-table-cell-hover-bg);
}

.leads__table-body .leads__table-row.active .leads__table-cell {
    background-color: var(--leads-table-cell-hover-bg);
    border-color: var(--color-blue);
}

.leads__table-cell {
    white-space: nowrap;
    height: 46px;
    background: var(--leads-column-bg);
    border: none;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    transition: all .3s ease-in-out;
}

.leads__table-cell-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-inline: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all .3s ease-in-out;
}


.leads__table-cell.empty,
.leads__table-cell.name {
    position: sticky;
    z-index: 1;
}

.leads__table-body .leads__table-cell.empty {
    border-radius: 8px 0 0 8px;
}

.leads__table-cell.empty {
    left: 0;
}

.leads__table-body .leads__table-cell:last-child {
    border-radius: 0 8px 8px 0;
}

.leads__table-cell.name {
    left: 6px;
}

.leads__item-info {
    position: relative;
    width: 100%;
    padding-left: 36px;
}

.leads__item-flag {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
}

.leads__item-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leads__item-property {
    display: block;
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leads__item-dropdown {
    width: 100%;
}

.leads__item-dropdown-arrow {
    opacity: 0;
    margin-left: auto;
    margin-right: 0;
    width: 16px;
    height: 16px;
    background: url(/icons/triangle-down.svg) center center no-repeat;
    transition: all .3s ease-in-out;
}

.leads__item-dropdown-arrow.active {
    transform: rotate(180deg);
}

.leads__item-dropdown-options {
    min-width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: var(--leads-table-dropdown);
    border-radius: 6px;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: fit-content;
    z-index: 2;
    box-shadow: 0px 0px 15px 2px var(--leads-bg);
}

.leads__item-dropdown-options.open-up {
    bottom: 100%;
    top: auto;
}

.leads__item-dropdown-options-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 252px;
}

.leads__item-dropdown-options-content:not(:first-child) {
    margin-top: 8px;
}

.leads__item-dropdown-option,
.leads__item-dropdown-no-results {
    font-size: 14px;
    padding: 6px;
    border-radius: 6px;
    transition: all .3s ease-in-out;
}

.leads__item-dropdown-option:hover {
    background: var(--leads-table-cell-hover-bg);
}

.leads__item-dropdown-option:not(:last-child) {
    margin-bottom: 5px;
}

.leads__item-dropdown-current,
.leads__item-dropdown-option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.leads__item-avatar {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 50%;
    color: var(--color-white);
}


.leads__item-avatar.not-assigned {
    background: var(--leads-table-th-border);
    color: var(--text-color);
}

.leads__item-avatar.not-assigned::before {
    background: transparent;
}

.leads__item-avatar::before {
    content: attr(data-value);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.leads__item-priority {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.leads__item-priority:hover .leads__item-priority-tooltip {
    opacity: 1;
}

.leads__item-priority-tooltip {
    pointer-events: none;
    user-select: none;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 100%;
    box-shadow: 0px 0px 15px 2px var(--leads-bg);
}

.leads__item-priority-tooltip::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--leads-news-card-bg);
    border-radius: 2px;
    box-shadow: 0px 0px 15px 2px var(--leads-bg);
}

.leads__item-priority-tooltip-wrapper {
    position: relative;
    z-index: 1;
    background: var(--leads-news-card-bg);
    border-radius: 6px;
    white-space: nowrap;
    text-align: center;
    transition: all .3s ease-in-out;
    padding: 6px;
}

.leads__item-status {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: 32px;
    padding: 4px 8px;
    border: 1px solid black;
    height: 28px;
    margin: 0 auto;
}

.leads__item-status.pending-review {
    border-color: rgba(105, 214, 254, 0.64);
}

.leads__item-status.qualified {
    border-color: rgba(76, 157, 255, 0.64);
}

.leads__item-status.disqualified {
    border-color: rgba(255, 146, 146, 0.64);
}

.leads__item-status.contact-made {
    border-color: rgba(244, 200, 74, 0.64);
}

.leads__item-status.demo-scheduled {
    border-color: rgba(137, 89, 240, 0.64);
}

.leads__item-status.proposal-made {
    border-color: rgba(178, 89, 226, 0.64);
}

.leads__item-status.deal-won {
    border-color: rgba(146, 197, 62, 0.64);
}

.leads__item-status.deal-lost {
    border-color: rgba(217, 83, 79, 0.64);
}

.leads__item-score {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(238, 238, 238, 0.15);
    border-color: #ababab;
    border: 1px solid;
    font-weight: 500;
}

.leads__item-score.high {
    background: rgba(106, 199, 98, 0.15);
    border-color: #6ac762;
}

.leads__item-score.normal {
    background: rgba(99, 170, 222, 0.15);
    border-color: #63aade;
}

.leads__item-score.low {
    background: rgba(238, 238, 238, 0.15);
    border-color: #ababab;
}

/* details */

.lead {
    display: flex;
    flex-direction: column;
    gap: 17px;
    background: var(--leads-details-bg);
    padding-right: 4px;
    font-size: 14px;
    line-height: normal;
}

.lead__wrap {
    display: flex;
    flex-direction: column;
    gap: 17px;
    overflow-y: auto;
    padding-right: 8px;
}

.lead__heading {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead__map {
    width: 100%;
    height: 224px;
    border-radius: 8px;
    background: #ff0;
}

.lead__property {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lead__flag {
    position: relative;
}

.lead__flag::before {
    content: "";
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 14px;
    height: 14px;
    background-color: #f00;
    background-image: url("../../icons/singleoperation.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 50%;
    border: 1px solid #fff;
}

.lead__property-name {
    font-size: 22px;
    font-weight: 600;
}

.lead__wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lead__wrapper-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead__wrapper-item-title {
    font-weight: 700;
    font-size: 22px;
}

.lead__wrapper-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead__block {
    padding: 12px;
    border-radius: 14px;
    background: var(--lead-block-bg);
}

.lead__block-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lead__block-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05);
}

.lead__block-title {
    font-weight: 500;
    font-size: 13px;
}