/* ITKapocs v29.1 – Enterprise Barion Billing UI */

.billingEnterpriseShell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 18px 64px;
}

.billingEnterpriseHero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 36px;
    border-radius: 34px;
    border: 1px solid #bfdbfe;
    background:
        radial-gradient(circle at 12% 12%, rgba(37,99,235,.16), transparent 30%),
        radial-gradient(circle at 92% 20%, rgba(14,165,233,.13), transparent 30%),
        linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 30px 80px rgba(15,23,42,.09);
    margin-bottom: 22px;
}

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

.billingEnterpriseHero h1 {
    margin: 14px 0 8px;
    color: #0f172a;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.billingEnterpriseHero p {
    margin: 0;
    max-width: 760px;
    color: #64748b;
    line-height: 1.65;
}

.billingConversionHero {
    background:
        radial-gradient(circle at 14% 16%, rgba(37,99,235,.18), transparent 28%),
        radial-gradient(circle at 86% 18%, rgba(16,185,129,.14), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #eff6ff 55%, #ecfdf5 100%);
}

.billingHeroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.billingAlert {
    margin-bottom: 20px;
    padding: 20px 22px;
    border-radius: 24px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 6px solid #f59e0b;
    box-shadow: 0 18px 48px rgba(15,23,42,.06);
}

.billingAlert strong {
    color: #9a3412;
    font-size: 18px;
}

.billingAlert p {
    margin: 8px 0 0;
    color: #7c2d12;
    line-height: 1.65;
}

.billingAlertAction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.billingSuccessPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 30px;
    border: 1px solid #bfdbfe;
    background:
        radial-gradient(circle at 88% 20%, rgba(37,99,235,.14), transparent 30%),
        #fff;
    box-shadow: 0 26px 70px rgba(15,23,42,.08);
}

.billingSuccessPanel h2 {
    margin: 12px 0 8px;
    color: #0f172a;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.billingSuccessPanel p {
    max-width: 780px;
    margin: 0 0 18px;
    color: #64748b;
    line-height: 1.65;
}

.billingSuccessPanel aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #172554, #2563eb);
    color: #fff;
    box-shadow: 0 22px 54px rgba(37,99,235,.2);
}

.billingSuccessPanel aside small {
    color: #bfdbfe;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.billingSuccessPanel aside b {
    margin: 8px 0;
    font-size: 28px;
    line-height: 1.12;
}

.billingSuccessPanel aside span {
    color: #dbeafe;
    font-weight: 800;
}

.billingUsageTrack {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e0f2fe;
}

.billingUsageTrack span {
    display: block;
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #2563eb);
}

.billingUsageMeta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    color: #64748b;
    font-size: 14px;
}

.billingUsageMeta strong {
    color: #0f172a;
}

.billingPathHeader {
    margin: 10px 0 18px;
    padding: 22px 4px 0;
}

.billingPathHeader h2 {
    margin: 10px 0 6px;
    color: #0f172a;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -.035em;
}

.billingPathHeader p {
    max-width: 820px;
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.billingKpiGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.billingKpiGrid article {
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #dbeafe;
    box-shadow: 0 18px 48px rgba(15,23,42,.06);
}

.billingKpiGrid small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.billingKpiGrid b {
    display: block;
    margin: 8px 0 6px;
    color: #0f172a;
    font-size: 26px;
    line-height: 1.12;
}

.billingKpiGrid span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.billingPlansGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    margin-bottom: 22px;
}

.billingPlanCard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255,255,255,.98);
    border: 1px solid #dbeafe;
    box-shadow: 0 22px 60px rgba(15,23,42,.07);
}

.billingPlansConversion .billingPlanCard {
    position: relative;
    overflow: hidden;
}

.billingPlansConversion .billingPlanCard::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -42px;
    top: -42px;
    border-radius: 999px;
    background: rgba(219,234,254,.8);
}

.billingPlanCard.isFeatured {
    border-color: #2563eb;
    background:
        radial-gradient(circle at 90% 6%, rgba(37,99,235,.16), transparent 26%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 30px 80px rgba(37,99,235,.2);
    transform: translateY(-4px);
}

.billingPlanCard.isCurrent {
    outline: 3px solid rgba(34,197,94,.18);
}

.billingPlanTop {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.billingPlanPitch {
    position: relative;
    z-index: 1;
    min-height: 118px;
}

.billingPlanPitch h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.16;
    letter-spacing: -.025em;
}

.billingPlanPitch p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
    font-size: 14px;
}

.billingPlanBadge,
.billingRecommended,
.billingCurrent {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.billingPlanBadge {
    background: #dbeafe;
    color: #1d4ed8;
}

.billingRecommended {
    background: #ede9fe;
    color: #6d28d9;
}

.billingCurrent {
    background: #dcfce7;
    color: #166534;
}

.billingPlanCard h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #0f172a;
    font-size: 26px;
    letter-spacing: -.03em;
}

.billingPlanCard ul {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.billingPlanCard li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
}

.billingPlanCard li b {
    color: #0f172a;
}

.billingPlanCard li.featureYes {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.billingPlanCard li.featureNo {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.billingPrimaryCta {
    background: linear-gradient(135deg, #16a34a, #2563eb);
    box-shadow: 0 16px 34px rgba(22,163,74,.24);
}

.billingPlanCard form,
.billingPlanCard a,
.billingPlanCard button {
    margin-top: auto;
}

.billingPlanCard button[disabled] {
    opacity: .56;
    cursor: not-allowed;
}

.billingNudgeGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 22px;
}

.billingNudgeGrid article {
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #dbeafe;
    box-shadow: 0 18px 46px rgba(15,23,42,.06);
}

.billingNudgeGrid b {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 18px;
}

.billingNudgeGrid h3 {
    margin: 14px 0 8px;
    color: #0f172a;
}

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

.billingCard {
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid #dbeafe;
    box-shadow: 0 24px 70px rgba(15,23,42,.07);
    margin-bottom: 22px;
}

.billingCompactTable {
    width: 100%;
}

.jsonBox {
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    border-radius: 18px;
    background: #0f172a;
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.barionLoadingOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .56);
    backdrop-filter: blur(10px);
}

.barionLoadingCard {
    width: min(420px, calc(100% - 32px));
    padding: 30px;
    border-radius: 26px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 80px rgba(15,23,42,.28);
}

.barionSpinner {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 999px;
    border: 5px solid #dbeafe;
    border-top-color: #2563eb;
    animation: barionSpin .9s linear infinite;
}

@keyframes barionSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1050px) {
    .billingPlansGrid,
    .billingKpiGrid,
    .billingNudgeGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 680px) {
    .billingEnterpriseShell {
        padding: 16px 12px 42px;
    }

    .billingPlansGrid,
    .billingKpiGrid,
    .billingNudgeGrid {
        grid-template-columns: 1fr;
    }

    .billingAlertAction,
    .billingUsageMeta {
        align-items: flex-start;
        flex-direction: column;
    }

    .billingEnterpriseHero,
    .billingSuccessPanel,
    .billingCard,
    .billingPlanCard {
        border-radius: 24px;
        padding: 20px;
    }

    .billingCard .sectionHead {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: start;
    }

    .billingCard .sectionHead h2 {
        font-size: clamp(30px, 9vw, 40px);
        line-height: 1.08;
    }

    .billingCard .sectionHead .btn {
        width: 100%;
        min-height: 52px;
    }

    .billingCompactTable {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .billingCompactTable thead {
        display: none;
    }

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

    .billingCompactTable tbody {
        display: grid;
        gap: 16px;
    }

    .billingCompactTable tr {
        position: relative;
        overflow: hidden;
        padding: 18px;
        border: 1px solid #bfdbfe;
        border-radius: 24px;
        background:
            radial-gradient(circle at 92% 0%, rgba(219, 234, 254, .9), transparent 118px),
            linear-gradient(180deg, #ffffff, #f8fbff);
        box-shadow: 0 18px 46px rgba(15, 23, 42, .07);
    }

    .billingCompactTable tr::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 6px;
        background: linear-gradient(90deg, #2563eb, #38bdf8, #172554);
    }

    .billingCompactTable td {
        position: relative;
        display: grid;
        grid-template-columns: minmax(94px, .38fr) minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        padding: 13px 0;
        border: 0;
        border-bottom: 1px solid #e2e8f0;
        color: #0f172a;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .billingCompactTable td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .055em;
        line-height: 1.25;
    }

    .billingCompactTable td:first-child {
        padding-top: 22px;
    }

    .billingCompactTable td:first-child b {
        display: inline-block;
        font-size: clamp(20px, 6vw, 28px);
        line-height: 1.14;
        color: #0f172a;
    }

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

    .billingCompactTable td:last-child .btn {
        width: 100%;
        min-height: 54px;
        border-radius: 18px;
        font-size: 18px;
    }

    .billingCompactTable .badge {
        justify-self: start;
        min-width: min(100%, 132px);
        justify-content: center;
        padding: 9px 12px;
    }
}
