/* ITKapocs v33.1 – Customer Chart.js Responsive Enterprise UI */

.customerEnterprisePage {
    width: min(1420px, calc(100% - 44px));
    margin: 30px auto 56px;
    color: #0f172a;
}

.customerHero {
    border-radius: 34px;
    padding: 32px;
    background:
        radial-gradient(circle at 18% 0%, rgba(59,130,246,.28), transparent 32%),
        linear-gradient(135deg, #0f1d35 0%, #1e3a5f 52%, #2563eb 130%);
    box-shadow: 0 30px 80px rgba(15,23,42,.16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    position: relative;
}

.customerHero::after {
    content: "";
    position: absolute;
    right: -130px;
    bottom: -170px;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(14,165,233,.28);
    filter: blur(4px);
}

.customerHeroProfile,
.customerHeroActions {
    position: relative;
    z-index: 1;
}

.customerHeroProfile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.customerAvatar {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 950;
    box-shadow: 0 18px 42px rgba(37,99,235,.34);
}

.customerEyebrow,
.cxChartBadge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.customerHero h1 {
    margin: 12px 0 8px;
    color: #fff;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1;
    letter-spacing: -.055em;
}

.customerHero p {
    margin: 0;
    color: rgba(226,232,240,.92);
    font-size: 16px;
    line-height: 1.55;
}

.customerHeroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.cxBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 16px;
    padding: 0 18px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    box-shadow: 0 16px 36px rgba(37,99,235,.24);
}

.cxBtn.ghost {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(15,23,42,.14);
}

.customerKpiGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 20px;
    margin-top: 24px;
}

.cxKpiCard,
.cxPanel {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(203,213,225,.86);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15,23,42,.08);
}

.cxKpiCard {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    position: relative;
}

.cxKpiCard.primary {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
}

.cxKpiCard.primary b,
.cxKpiCard.primary small {
    color: #fff;
}

.cxKpiCard::after {
    content: "";
    position: absolute;
    right: -38px;
    top: -44px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(37,99,235,.10);
}

.cxKpiCard.primary::after {
    background: rgba(255,255,255,.18);
}

.cxIcon {
    width: 58px;
    height: 58px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 24px;
    flex: 0 0 auto;
}

.cxIcon.blue { background: #dbeafe; color: #2563eb; }
.cxIcon.amber { background: #fef3c7; color: #d97706; }
.cxIcon.green { background: #dcfce7; color: #16a34a; }
.cxIcon.purple { background: #f3e8ff; color: #7c3aed; }

.cxKpiCard b {
    display: block;
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.04em;
}

.cxKpiCard small {
    display: block;
    color: #64748b;
    font-weight: 850;
    margin-top: 7px;
}

.customerChartsGrid {
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 22px;
    margin-top: 24px;
}

.customerChartsGrid.secondary {
    grid-template-columns: .9fr 1.1fr;
}

.customerLowerGrid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 22px;
    margin-top: 24px;
}

.cxPanel {
    padding: 26px;
    min-width: 0;
}

.cxPanelHeader {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.cxPanelHeader h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    letter-spacing: -.035em;
}

.cxPanelHeader p {
    margin: 7px 0 0;
    color: #64748b;
    line-height: 1.55;
}

.cxChartBox {
    position: relative;
    min-height: 320px;
    height: clamp(280px, 30vw, 380px);
}

.cxChartBox.large {
    height: clamp(320px, 38vw, 440px);
}

.cxChartBox.doughnut {
    height: clamp(300px, 32vw, 400px);
}

.cxChartBox canvas {
    width: 100% !important;
    height: 100% !important;
}

.cxTableWrap {
    overflow-x: auto;
}

.cxTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.cxTable th {
    text-align: left;
    color: #475569;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.cxTable td {
    color: #334155;
    padding: 15px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 750;
}

.cxBadge {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 950;
    font-size: 12px;
}

.cxBadge.blue { background: #dbeafe; color: #1d4ed8; }
.cxBadge.indigo { background: #e0e7ff; color: #4338ca; }
.cxBadge.amber { background: #fef3c7; color: #92400e; }
.cxBadge.purple { background: #ede9fe; color: #7c3aed; }
.cxBadge.green { background: #dcfce7; color: #166534; }
.cxBadge.red { background: #fee2e2; color: #b91c1c; }
.cxBadge.slate { background: #e2e8f0; color: #334155; }

.cxTableBtn,
.cxMiniLink {
    color: #2563eb;
    font-weight: 950;
    text-decoration: none;
}

.cxProviderList {
    display: grid;
    gap: 12px;
}

.cxProviderCard {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 13px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    padding: 14px;
    text-decoration: none;
}

.cxProviderCard > span {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 950;
}

.cxProviderCard strong {
    display: block;
    color: #0f172a;
}

.cxProviderCard small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.cxProviderCard em {
    font-style: normal;
    color: #2563eb;
    font-weight: 950;
    font-size: 12px;
}

.cxEmpty {
    border: 1px dashed #93c5fd;
    border-radius: 22px;
    background: #f8fbff;
    padding: 34px;
    text-align: center;
    color: #64748b;
}

.cxEmpty strong {
    display: block;
    color: #0f172a;
    font-size: 18px;
}

.cxEmpty span {
    display: block;
    margin-top: 8px;
}

.cxEmpty.compact {
    padding: 24px;
}

@media (max-width: 1200px) {
    .customerChartsGrid,
    .customerChartsGrid.secondary,
    .customerLowerGrid {
        grid-template-columns: 1fr;
    }

    .customerKpiGrid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 720px) {
    .customerEnterprisePage {
        width: min(100% - 24px, 1420px);
        margin-top: 18px;
    }

    .customerHero {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 26px;
        padding: 22px;
    }

    .customerHeroProfile {
        align-items: flex-start;
        flex-direction: column;
    }

    .customerHeroActions,
    .cxBtn {
        width: 100%;
    }

    .customerKpiGrid {
        grid-template-columns: 1fr;
    }

    .cxPanel {
        padding: 20px;
        border-radius: 22px;
    }

    .cxTable {
        min-width: 0;
    }

    .cxTable thead {
        display: none;
    }

    .cxTable,
    .cxTable tbody,
    .cxTable tr,
    .cxTable td {
        display: block;
        width: 100%;
    }

    .cxTable tbody {
        display: grid;
        gap: 14px;
    }

    .cxTable tr {
        padding: 16px;
        border: 1px solid #dbe5f1;
        border-radius: 20px;
        background: linear-gradient(180deg, #fff, #f8fbff);
        box-shadow: 0 16px 42px rgba(15, 23, 42, .08);
    }

    .cxTable td {
        display: grid;
        grid-template-columns: minmax(110px, .42fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        border: none;
        border-bottom: 1px solid #eef2f7;
        padding: 11px 0;
    }

    .cxTable td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 900;
        line-height: 1.3;
        text-transform: uppercase;
    }

    .cxTable td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .cxTable td:last-child .cxTableBtn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        border-radius: 14px;
        background: #2563eb;
        color: #fff;
        box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
    }

    .cxChartBox,
    .cxChartBox.large,
    .cxChartBox.doughnut {
        height: 300px;
    }

    .cxProviderCard {
        grid-template-columns: 48px 1fr;
    }

    .cxProviderCard em {
        grid-column: 1 / -1;
    }
}
