/* ITKapocs v32.3 – Subscription Automation Enterprise UI */

.subAutoPage {
    width: min(1480px, calc(100% - 44px));
    margin: 32px auto 54px;
    color: #0f172a;
}

.subAutoHero {
    display: grid;
    grid-template-columns: 1.45fr .85fr;
    gap: 24px;
    align-items: stretch;
    border-radius: 32px;
    padding: 34px;
    background:
        radial-gradient(circle at 20% 0%, rgba(96, 165, 250, .32), transparent 35%),
        linear-gradient(135deg, #0f1d35 0%, #203a5f 55%, #2a4a75 100%);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
    border: 1px solid rgba(255,255,255,.18);
    overflow: hidden;
    position: relative;
}

.subAutoHero::after {
    content: "";
    position: absolute;
    inset: auto -90px -140px auto;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .28);
    filter: blur(8px);
}

.subHeroText,
.subHeroActionCard {
    position: relative;
    z-index: 1;
}

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

.subAutoHero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 4vw, 58px);
    line-height: .95;
    letter-spacing: -.055em;
}

.subAutoHero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(226, 232, 240, .94);
    font-size: 17px;
    line-height: 1.7;
}

.subHeroActionCard {
    border-radius: 26px;
    padding: 24px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    box-shadow: 0 24px 54px rgba(37, 99, 235, .35);
    color: #fff;
    display: grid;
    align-content: space-between;
    gap: 22px;
}

.subHeroActionCard strong {
    display: block;
    font-size: 22px;
    letter-spacing: -.03em;
}

.subHeroActionCard span {
    display: block;
    color: rgba(255,255,255,.86);
    margin-top: 6px;
}

.subPrimaryBtn {
    width: 100%;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: #1d4ed8;
    font-weight: 950;
    padding: 15px 18px;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(15,23,42,.16);
}

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

.subMetricCard,
.subPanel {
    border: 1px solid rgba(203, 213, 225, .82);
    border-radius: 26px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.subMetricCard {
    padding: 24px;
    display: flex;
    gap: 18px;
    align-items: center;
}

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

.subMetricIcon.blue,
.subTimelineIcon.blue { background: #dbeafe; color: #2563eb; }

.subMetricIcon.green,
.subTimelineIcon.green { background: #dcfce7; color: #16a34a; }

.subMetricIcon.orange,
.subTimelineIcon.orange { background: #ffedd5; color: #ea580c; }

.subMetricIcon.shield { background: #dcfce7; color: #15803d; }
.subTimelineIcon.red { background: #fee2e2; color: #dc2626; }
.subTimelineIcon.purple { background: #f3e8ff; color: #7c3aed; }

.subMetricCard b {
    display: block;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -.045em;
    color: #0f172a;
}

.subMetricCard span {
    display: block;
    margin-top: 8px;
    color: #334155;
    font-weight: 900;
}

.subMetricCard small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-weight: 700;
}

.subDashboardGrid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    margin-top: 24px;
}

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

.subPanel {
    padding: 26px;
}

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

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

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

.subTimeline {
    display: grid;
    gap: 14px;
}

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

.subTimelineItem strong,
.subEventItem strong {
    display: block;
    color: #0f172a;
    font-weight: 950;
}

.subTimelineItem span,
.subEventItem span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    line-height: 1.45;
}

.subStatusPill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-style: normal;
    font-weight: 950;
    font-size: 12px;
    white-space: nowrap;
}

.subStatusPill.success { background: #dcfce7; color: #166534; }
.subStatusPill.warning { background: #fef3c7; color: #92400e; }
.subStatusPill.danger { background: #fee2e2; color: #991b1b; }

.subEventList {
    display: grid;
}

.subEventItem {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.subEventItem:last-child {
    border-bottom: 0;
}

.subEventIcon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    font-size: 18px;
}

.subEventIcon.isSuccess { background: #dcfce7; color: #166534; }
.subEventIcon.isWarning { background: #ffedd5; color: #c2410c; }
.subEventIcon.isDanger { background: #fee2e2; color: #991b1b; }
.subEventIcon.isInfo { background: #dbeafe; color: #1d4ed8; }

.subEventItem time {
    color: #64748b;
    font-weight: 750;
    font-size: 13px;
}

.subEmptyState {
    min-height: 190px;
    border: 1px dashed #93c5fd;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border-radius: 22px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    color: #475569;
}

.subEmptyState div {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 950;
    font-size: 22px;
}

.subEmptyState strong {
    display: block;
    color: #0f172a;
    font-size: 18px;
    margin-top: 10px;
}

.subEmptyState span {
    max-width: 430px;
    line-height: 1.55;
}

.subEmptyState.compact {
    min-height: 120px;
}

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

.subMiniStats span {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 900;
}

.subTableWrap {
    overflow-x: auto;
}

.subEnterpriseTable {
    width: 100%;
    border-collapse: collapse;
}

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

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

.subCompanyCell {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

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

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

.subQuickGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.subQuickBtn {
    min-height: 124px;
    border: 0;
    border-radius: 22px;
    color: #fff;
    padding: 18px;
    text-decoration: none;
    display: grid;
    align-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 18px 42px rgba(15,23,42,.12);
    text-align: left;
    width: 100%;
    font: inherit;
}

.subQuickBtn span {
    font-size: 24px;
}

.subQuickBtn b {
    font-size: 16px;
}

.subQuickBtn small {
    color: rgba(255,255,255,.82);
    font-weight: 700;
}

.subQuickBtn.blue { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.subQuickBtn.green { background: linear-gradient(135deg, #059669, #16a34a); }
.subQuickBtn.purple { background: linear-gradient(135deg, #7c3aed, #9333ea); }
.subQuickBtn.orange { background: linear-gradient(135deg, #ea580c, #f59e0b); }

@media (max-width: 1180px) {
    .subAutoHero,
    .subDashboardGrid,
    .subLowerGrid {
        grid-template-columns: 1fr;
    }

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

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

    .subAutoHero,
    .subPanel {
        padding: 20px;
        border-radius: 24px;
    }

    .subMetricGrid,
    .subQuickGrid {
        grid-template-columns: 1fr;
    }

    .subTimelineItem,
    .subEventItem {
        grid-template-columns: 1fr;
    }
}
