.brxe-block,
.brxe-container,
.brxe-div {
    min-width: 0;
}

/* =========================
   INFOTILES
========================= */

.ps-crm-infotile {
    --ps-crm-infotile-bg: #2271b1;
    --ps-crm-infotile-color: #ffffff;
    --ps-crm-infotile-icon-color: #ffffff;
    --ps-crm-infotile-accent: #2271b1;
    --ps-crm-infotile-height: 120px;
    --ps-crm-infotile-width: 25%;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --tilt-x: 0deg;
    --tilt-y: 0deg;

    position: relative;
    display: block;
    width: var(--ps-crm-infotile-width) !important;
    flex: 0 0 var(--ps-crm-infotile-width) !important;
    max-width: var(--ps-crm-infotile-width) !important;
    min-width: 120px;
    min-height: var(--ps-crm-infotile-height);
    height: 100%;
    background-color: var(--ps-crm-infotile-bg) !important;
    color: #ffffff !important;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.3);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform .12s ease, box-shadow .18s ease;
}

.ps-crm-infotile:hover {
    text-decoration: none;
    color: var(--ps-crm-infotile-color) !important;
    transform:
        perspective(1200px)
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y))
        scale(1.005);
    box-shadow: 0 12px 12px rgba(15, 23, 42, 0.15);
}

.ps-crm-infotile::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .16s ease;
    background: radial-gradient(
        180px circle at var(--mouse-x) var(--mouse-y),
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0.09) 28%,
        rgba(255,255,255,0.00) 60%
    );
    z-index: 2;
}

.ps-crm-infotile:hover::after {
    opacity: 1;
}

.ps-crm-infotile-shine {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ps-crm-infotile-inner {
    z-index: 3;
    box-sizing: border-box;
    padding: 16px 16px;
}

.ps-crm-infotile-content {
    position: relative;
    z-index: 3;
    min-width: 0;
    max-width: 100%;
    padding-right: 12px;
}

.ps-crm-infotile-title,
.ps-crm-infotile-value {
    color: var(--ps-crm-infotile-color) !important;
}

.ps-crm-infotile-title {
    font-size: 14px;
    line-height: 1.15;
    font-weight: 500;
    margin-bottom: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: #ffffff !important;
    opacity: .9;
}

.ps-crm-infotile-value {
    font-size: clamp(22px, 4vw, 36px);
    line-height: .9;
    font-weight: 700;
    letter-spacing: -.03em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    position: relative;
    z-index: 4;
}

.ps-crm-infotile-icon-wrap,
.ps-crm-infotile-icon {
    color: var(--ps-crm-infotile-icon-color) !important;
}

.ps-crm-infotile-icon-wrap {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.ps-crm-infotile-icon,
.ps-crm-infotile-icon svg,
.ps-crm-infotile-icon i {
    color: var(--ps-crm-infotile-icon-color) !important;
    width: clamp(42px, calc(var(--ps-crm-infotile-height) * 0.6), 96px);
    height: clamp(42px, calc(var(--ps-crm-infotile-height) * 0.6), 96px);
    font-size: clamp(42px, calc(var(--ps-crm-infotile-height) * 0.6), 96px);
    opacity: .7;
    display: block;
}

.ps-crm-infotile-builder-placeholder {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
}

.ps-crm-infotile-title,
.ps-crm-infotile-value,
.ps-crm-infotile-icon,
.ps-crm-infotile-icon svg,
.ps-crm-infotile-icon i {
    backface-visibility: hidden;
    transform: translateZ(0);
}

@media (max-width: 420px) {
    .ps-crm-infotile {
        min-width: 0;
    }

    .ps-crm-infotile-value {
        font-size: clamp(18px, 7vw, 28px);
    }
}

/* =========================
   TABLE WIDGET
========================= */

.ps-crm-table-widget-shell {
    width: var(--ps-crm-table-widget-width, 100%) !important;
    flex: 0 0 var(--ps-crm-table-widget-width, 100%) !important;
    max-width: var(--ps-crm-table-widget-width, 100%) !important;
    min-width: 0;
}

.ps-crm-table-widget {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 240px;
    height: var(--ps-crm-table-widget-height, 50vh);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
}

.ps-crm-table-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    flex: 0 0 auto;
    min-width: 0;
}

.ps-crm-table-widget-header-left,
.ps-crm-table-widget-header-right,
.ps-crm-table-widget-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ps-crm-table-widget-header-left {
    flex: 1 1 auto;
    overflow: visible;
}

.ps-crm-table-widget-header-right {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.ps-crm-table-widget-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(34, 113, 177, 0.08);
    color: var(--crm-module-color, #2271b1);
    flex: 0 0 auto;
}

.ps-crm-table-widget-module-icon .ps-crm-icon {
    width: 20px;
    height: 20px;
}

.ps-crm-table-widget-title-wrap {
    flex: 1 1 auto;
    overflow: hidden;
}

.ps-crm-table-widget-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-crm-table-widget-meta-inline {
    font-size: 13px;
    opacity: .72;
    white-space: nowrap;
}

.ps-crm-table-widget-filter-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(34, 113, 177, 0.10);
    color: var(--crm-module-color, #2271b1);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ps-crm-table-widget-filter-badge.is-advanced {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.ps-crm-table-widget-filter-form {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.ps-crm-table-widget-filter-form,
.ps-crm-table-widget-filter-dropdown,
.ps-crm-table-widget-header,
.ps-crm-table-widget-header-left,
.ps-crm-table-widget-header-right {
    overflow: visible;
}

.ps-crm-table-widget-filter-dropdown {
    width: min(100%, 360px);
}

.ps-crm-table-widget-filter-select {
    width: min(100%, 360px);
}

.ps-crm-table-widget-fullscreen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
    flex: 0 0 auto;
}

.ps-crm-table-widget-fullscreen:hover {
    transform: scale(1.04);
    background: rgba(34, 113, 177, 0.06);
    border-color: rgba(34, 113, 177, 0.22);
}

.ps-crm-table-widget-fullscreen .ps-crm-icon {
    width: 18px;
    height: 18px;
}

.ps-crm-table-widget-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.ps-crm-table-widget-table-wrap,
.ps-crm-table-widget-list {
    display: flex;
    flex-direction: column;
    min-height: min-content;
}

.ps-crm-table-widget-list-item {
    display: block;
    padding: 10px 12px;
    margin: 5px 5px 0 5px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    min-width: 0;
}

.ps-crm-table-widget-list-item:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 113, 177, 0.22);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ps-crm-table-widget-list-main {
    min-width: 0;
}

.ps-crm-table-widget-list-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    color: var(--crm-module-color, #2271b1);
    margin-bottom: 4px;
}

.ps-crm-table-widget-list-title .ps-crm-relation-chip-wrap,
.ps-crm-table-widget-list-title .ps-crm-relation-chip,
.ps-crm-table-widget-list-title .ps-crm-related-record-chip {
    all: unset;
}

.ps-crm-table-widget-list-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    min-width: 0;
}

.ps-crm-table-widget-list-meta-piece {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.ps-crm-table-widget-list-separator {
    color: #94a3b8;
    flex: 0 0 auto;
}

.ps-crm-table-widget-list-meta-label {
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.ps-crm-table-widget-list-meta-value {
    color: #64748b;
    min-width: 0;
}

.ps-crm-table-widget-inline-link {
    color: inherit;
    text-decoration: none;
}

.ps-crm-table-widget-inline-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .ps-crm-table-widget-list {
        padding: 12px;
    }

    .ps-crm-table-widget-list-item {
        padding: 12px 14px;
    }

    .ps-crm-table-widget-list-meta {
        font-size: 11px;
        gap: 4px 8px;
    }

    .ps-crm-table-widget-list-separator {
        display: none;
    }
}

@media (max-width: 640px) {
    .ps-crm-table-widget-list-meta-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ps-crm-table-widget-list-meta-label {
        white-space: normal;
    }
}

.ps-crm-table-widget-empty,
.ps-crm-table-widget-placeholder {
    padding: 16px;
    font-size: 14px;
    opacity: .75;
}

.ps-crm-table-widget-pagination {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 6px 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    margin-top: auto;
}

.ps-crm-table-widget-pagination-info {
    font-size: 11px;
    color: #667085;
    margin: 2 2px;
}

.ps-crm-table-widget-pagination-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #fff;
    color: #101828;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.ps-crm-table-widget-pagination-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.ps-crm-table-widget-pagination-btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}

.ps-crm-table-widget-pagination-btn svg,
.ps-crm-table-widget-pagination-btn i {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

@media (max-width: 767px) {
    .ps-crm-table-widget-header {
        flex-wrap: wrap;
        align-items: center;
    }

    .ps-crm-table-widget-header-left {
        min-width: 0;
        flex: 1 1 100%;
    }

    .ps-crm-table-widget-header-right {
        width: auto;
        margin-left: 0;
    }

    .ps-crm-table-widget-filter-select {
        width: 100%;
    }
}

.ps-crm-table-widget-shell,
.ps-crm-table-widget,
.ps-crm-table-widget-body,
.ps-crm-table-widget-list,
.ps-crm-table-widget-table-wrap {
    min-height: 0;
}

.ps-crm-table-widget {
    max-height: var(--ps-crm-table-widget-height, 50vh);
}

.ps-crm-table-widget-body {
    max-height: 100%;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}