/* ===== Поставщики: list cards, detail extras (builds on .skl-* from stock-locations-admin.css) ===== */
.sup-kpi-warn {
    color: #dc6803;
}

.sup-kpi-ok {
    color: #039855;
}

.sup-kpi-bad {
    color: #d92d20;
}

.sup-toolbar-right {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

.sup-stock-filter {
    flex: 0 0 200px;
    width: 200px;
}

.sup-toolbar-right .adm-search {
    flex: 0 0 260px;
}

@media (max-width: 640px) {
    .sup-toolbar-right {
        flex-wrap: wrap;
    }

    .sup-toolbar-right,
    .sup-stock-filter,
    .sup-toolbar-right .adm-search {
        width: 100%;
        flex: 1 1 100%;
    }
}

.sup-selectbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: -0.25rem 0 0.75rem;
}

.sup-selectall {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475467;
    cursor: pointer;
    user-select: none;
}

/* Card */
.sup-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.1rem 1.15rem 1.1rem;
    border: 1px solid #eaecf0;
    border-radius: 1.25rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.18s ease;
}

.sup-tile:hover {
    border-color: #c4b5fd;
    transform: translateY(-2px);
}

.sup-tile.is-selected {
    border-color: #7c3aed;
    background: #fbf9ff;
}

.sup-tile.is-menu-open {
    z-index: 5;
}

.sup-tile.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.sup-tile.is-removing {
    opacity: 0;
    transform: scale(0.97);
}

.sup-tile.is-off .sup-tile__avatar {
    background: #f2f4f7;
    color: #98a2b3;
}

.sup-tile__top {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.sup-tile__check {
    margin-top: 0.75rem;
    flex-shrink: 0;
}

.sup-tile__avatar,
.sup-hero__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 55%, #5b21b6 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
}

.sup-hero__avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 1.5rem;
}

.sup-tile__head {
    flex: 1;
    min-width: 0;
}

.sup-tile__name {
    display: block;
    font-size: 0.975rem;
    font-weight: 750;
    line-height: 1.3;
    color: #101828;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sup-tile__name:hover {
    color: #6d28d9;
}

.sup-tile__stock {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #7c3aed;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sup-tile__stock i {
    font-size: 0.72rem;
    line-height: 1;
    display: inline-flex;
}

.sup-tile__contacts {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 3.6rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: #f9fafb;
    font-size: 0.8rem;
    color: #344054;
}

.sup-tile__contacts span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sup-tile__contacts i {
    font-size: 0.72rem;
    line-height: 1;
    color: #98a2b3;
    display: inline-flex;
}

.sup-tile__contacts .is-empty {
    color: #98a2b3;
}

.sup-tile__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
}

.sup-tile__count {
    font-size: 0.8rem;
    color: #667085;
}

.sup-tile__count b {
    font-size: 1rem;
    font-weight: 800;
    color: #101828;
    font-variant-numeric: tabular-nums;
}

.sup-tile-add {
    min-height: 14rem;
    font: inherit;
    cursor: pointer;
}

/* Card menu */
.sup-menu {
    position: relative;
    flex-shrink: 0;
}

.sup-menu__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #98a2b3;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.sup-menu__btn svg {
    width: 18px;
    height: 18px;
}

.sup-menu__btn:hover,
.sup-menu.is-open .sup-menu__btn {
    background: #f4f0ff;
    color: #7c3aed;
}

.sup-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 210px;
    padding: 6px;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.22);
}

.sup-menu__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #344054;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.sup-menu__item i {
    width: 16px;
    font-size: 0.8rem;
    line-height: 1;
    color: #98a2b3;
    display: inline-flex;
    justify-content: center;
}

.sup-menu__item:hover {
    background: #f4f0ff;
    color: #6d28d9;
}

.sup-menu__item:hover i {
    color: #7c3aed;
}

.sup-menu__item.is-danger,
.sup-menu__item.is-danger i {
    color: #d92d20;
}

.sup-menu__item.is-danger:hover {
    background: #fef3f2;
}

.sup-menu__sep {
    height: 1px;
    margin: 4px 6px;
    background: #f2f4f7;
}

/* Bulk bar */
.sup-bulk {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 8500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem 0.55rem 1.1rem;
    border: 1px solid #eaecf0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.3);
    transform: translateX(-50%);
}

.sup-bulk__count {
    margin-right: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #101828;
    white-space: nowrap;
}

/* Create modal */
.sup-modal {
    position: fixed;
    inset: 0;
    z-index: 100040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.sup-modal.is-open {
    opacity: 1;
}

.sup-modal__box {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    padding: 1.4rem 1.5rem 1.5rem;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.35);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.16s ease;
}

.sup-modal.is-open .sup-modal__box {
    transform: none;
}

.sup-modal__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sup-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    color: #475467;
    cursor: pointer;
}

.sup-modal__close:hover {
    background: #e4e7ec;
    color: #101828;
}

.sup-modal__close svg {
    width: 18px;
    height: 18px;
}

.sup-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

body.sup-modal-open {
    overflow: hidden;
}

/* Price compare */
.sup-compare {
    margin-top: 1.5rem;
}

.sup-sums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
}

.sup-sum {
    display: block;
    padding: 0.9rem 1rem;
    border: 1px solid #ede9fe;
    border-radius: 14px;
    background: #fbf9ff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.sup-sum:hover {
    border-color: #c4b5fd;
}

.sup-sum__name {
    margin-bottom: 0.6rem;
    font-size: 0.875rem;
    font-weight: 800;
    color: #101828;
}

.sup-sum dl {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
}

.sup-sum dl > div {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.sup-sum dt {
    color: #667085;
}

.sup-sum dd {
    margin: 0;
    font-weight: 750;
    color: #101828;
    font-variant-numeric: tabular-nums;
}

.sup-sum dd.is-ok,
.sup-markup.is-ok,
.sup-collision__row em.is-ok {
    color: #039855;
}

.sup-sum dd.is-bad,
.sup-markup.is-bad,
.sup-collision__row em.is-bad {
    color: #d92d20;
}

.sup-collisions {
    margin-top: 1.1rem;
}

.sup-collisions__title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #7c3aed;
}

.sup-collision {
    margin-bottom: 0.5rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #fedf89;
    border-radius: 12px;
    background: #fffcf5;
}

.sup-collision__name {
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #93370d;
}

.sup-collision__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    font-size: 0.78rem;
    color: #475467;
}

.sup-collision__row b {
    min-width: 120px;
    color: #101828;
}

.sup-collision__row em {
    font-style: normal;
    font-weight: 700;
}

.sup-table-wrap {
    margin-top: 1.1rem;
    overflow-x: auto;
}

.sup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.sup-table th {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #eaecf0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: left;
    text-transform: uppercase;
    color: #98a2b3;
}

.sup-table td {
    padding: 0.6rem;
    border-bottom: 1px solid #f2f4f7;
    color: #344054;
}

.sup-table tr:last-child td {
    border-bottom: 0;
}

.sup-table .is-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.sup-table__name {
    font-weight: 650;
    color: #101828;
}

.sup-table__sku {
    font-size: 0.72rem;
    color: #98a2b3;
}

.sup-table__supplier {
    font-weight: 600;
    color: #475467;
}

/* Detail: products */
.sup-products-search {
    min-width: 0;
    width: 240px;
}

@media (max-width: 640px) {
    .skl-card__head:has(.sup-products-search) {
        flex-wrap: wrap;
    }

    .sup-products-search {
        width: 100%;
    }
}

.sup-products {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0 -0.5rem;
}

.sup-product {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 0.5rem;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: background 0.12s ease;
}

.sup-product:hover {
    background: #f9fafb;
}

.sup-product.is-off {
    opacity: 0.6;
}

.sup-product__thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f9fafb;
    object-fit: contain;
}

.sup-product__thumb.is-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
}

.sup-product__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.sup-product__name {
    font-size: 0.875rem;
    font-weight: 650;
    color: #101828;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sup-product__sku {
    font-size: 0.74rem;
    color: #98a2b3;
}

.sup-product__prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    white-space: nowrap;
}

.sup-product__prices b {
    font-size: 0.875rem;
    font-weight: 750;
    color: #101828;
    font-variant-numeric: tabular-nums;
}

.sup-product__prices small {
    font-size: 0.72rem;
    color: #98a2b3;
}

.sup-markup {
    flex-shrink: 0;
    min-width: 3.4rem;
    font-size: 0.78rem;
    font-weight: 750;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sup-markup.is-none {
    color: #d0d5dd;
}

@media (max-width: 520px) {
    .sup-markup {
        display: none;
    }
}
