/**
 * ConvertyBot — Admin Subscription page (V2.1 modern UI)
 *
 * Design tokens:
 *   - Brand:       --cb2-brand (deep indigo-blue)
 *   - Neutrals:    WP admin palette compatible
 *   - Radius:      8 / 12 / 16
 *   - Shadow:      soft, layered
 *
 * Uses system fonts (WP admin stack). No custom fonts. No build step.
 */

/* =====================================================================
 * Design tokens
 * ===================================================================== */
.cb2-page {
    --cb2-brand: #3b5bff;
    --cb2-brand-600: #2d49e6;
    --cb2-brand-50: #eef1ff;
    --cb2-brand-gradient: linear-gradient(135deg, #3b5bff 0%, #6b49ff 100%);

    --cb2-ink: #0f172a;
    --cb2-ink-2: #334155;
    --cb2-ink-3: #64748b;
    --cb2-line: #e2e8f0;
    --cb2-line-2: #cbd5e1;
    --cb2-surface: #ffffff;
    --cb2-surface-2: #f8fafc;
    --cb2-surface-3: #f1f5f9;

    --cb2-success: #16a34a;
    --cb2-success-50: #dcfce7;
    --cb2-info: #0ea5e9;
    --cb2-info-50: #e0f2fe;
    --cb2-warning: #f59e0b;
    --cb2-warning-50: #fef3c7;
    --cb2-danger: #dc2626;
    --cb2-danger-50: #fee2e2;

    --cb2-radius-sm: 8px;
    --cb2-radius-md: 12px;
    --cb2-radius-lg: 16px;

    --cb2-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --cb2-shadow-md: 0 4px 8px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
    --cb2-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.06);
    --cb2-shadow-brand: 0 8px 24px rgba(59, 91, 255, 0.25);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
                 Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--cb2-ink);
    margin: 16px 20px 40px 0;
    max-width: 1320px;
}

/* Respect WP dark admin color schemes that opt-in via prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    .cb2-page.cb2-auto-dark {
        --cb2-ink: #f1f5f9;
        --cb2-ink-2: #cbd5e1;
        --cb2-ink-3: #94a3b8;
        --cb2-line: #1e293b;
        --cb2-line-2: #334155;
        --cb2-surface: #0f172a;
        --cb2-surface-2: #111827;
        --cb2-surface-3: #1e293b;
    }
}

.cb2-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =====================================================================
 * Shared primitives
 * ===================================================================== */
.cb2-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--cb2-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none;
}
.cb2-btn .dashicons { font-size: 16px; width: 16px; height: 16px; line-height: 16px; }
.cb2-btn:focus { outline: 2px solid var(--cb2-brand); outline-offset: 2px; }

.cb2-btn--primary {
    background: var(--cb2-brand);
    color: #fff;
    box-shadow: var(--cb2-shadow-brand);
}
.cb2-btn--primary:hover { background: var(--cb2-brand-600); transform: translateY(-1px); color: #fff; }

.cb2-btn--ghost {
    background: transparent;
    color: var(--cb2-ink-2);
    border-color: var(--cb2-line-2);
}
.cb2-btn--ghost:hover { background: var(--cb2-surface-3); color: var(--cb2-ink); }

.cb2-btn--secondary {
    background: var(--cb2-surface);
    color: var(--cb2-ink);
    border-color: var(--cb2-line-2);
}
.cb2-btn--secondary:hover { border-color: var(--cb2-ink-3); box-shadow: var(--cb2-shadow-sm); }

.cb2-btn--block { width: 100%; justify-content: center; padding: 11px 16px; }

.cb2-btn[disabled], .cb2-btn.is-disabled {
    opacity: .6; cursor: not-allowed; pointer-events: none;
}

.cb-loading-state {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 32px; color: var(--cb2-ink-3); font-size: 14px;
}

/* =====================================================================
 * Alert banner (past_due / expired)
 * ===================================================================== */
.cb2-alert {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px;
    border-radius: var(--cb2-radius-md);
    margin: 0 0 20px;
    border: 1px solid;
    animation: cb2-pop-in .3s ease;
}
.cb2-alert__icon { font-size: 24px; width: 24px; height: 24px; flex-shrink: 0; }
.cb2-alert__body { flex: 1; }
.cb2-alert__title { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cb2-alert__text { margin: 0; font-size: 13px; line-height: 1.45; }
.cb2-alert--danger {
    background: var(--cb2-danger-50);
    border-color: rgba(220,38,38,.35);
    color: #7f1d1d;
}
.cb2-alert--danger .cb2-alert__icon { color: var(--cb2-danger); }
.cb2-alert--warning {
    background: var(--cb2-warning-50);
    border-color: rgba(245,158,11,.35);
    color: #78350f;
}
.cb2-alert--warning .cb2-alert__icon { color: var(--cb2-warning); }

/* Flash (success/cancelled) */
.cb2-flash {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 16px; margin: 0 0 16px;
    border-radius: var(--cb2-radius-md);
    border-left: 4px solid;
    background: var(--cb2-surface);
    box-shadow: var(--cb2-shadow-sm);
    font-size: 13px;
}
.cb2-flash .dashicons { font-size: 20px; width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.cb2-flash strong { display: block; font-weight: 700; margin-bottom: 2px; }
.cb2-flash span { color: var(--cb2-ink-2); }
.cb2-flash--success { border-left-color: var(--cb2-success); }
.cb2-flash--success .dashicons { color: var(--cb2-success); }
.cb2-flash--warning { border-left-color: var(--cb2-warning); }
.cb2-flash--warning .dashicons { color: var(--cb2-warning); }
.cb2-flash--error { border-left-color: var(--cb2-danger); }
.cb2-flash--error .dashicons { color: var(--cb2-danger); }

/* =====================================================================
 * 1. HERO — current plan card
 * ===================================================================== */
.cb2-hero {
    position: relative;
    background: var(--cb2-brand-gradient);
    color: #fff;
    border-radius: var(--cb2-radius-lg);
    padding: 28px 32px;
    box-shadow: var(--cb2-shadow-lg);
    overflow: hidden;
    margin-bottom: 24px;
    min-height: 120px;
}
.cb2-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 380px; height: 380px;
    background: radial-gradient(closest-side, rgba(255,255,255,.15), transparent);
    border-radius: 50%;
    pointer-events: none;
}
.cb2-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -8%;
    width: 280px; height: 280px;
    background: radial-gradient(closest-side, rgba(255,255,255,.08), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.cb2-hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.3fr 1fr auto;
    gap: 28px;
    align-items: center;
}

.cb2-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .85;
    margin-bottom: 6px;
}
.cb2-hero__eyebrow .dashicons { font-size: 14px; width: 14px; height: 14px; }

.cb2-hero__plan {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 8px;
}
.cb2-hero__plan-name {
    font-size: 36px; font-weight: 800; line-height: 1.1;
    margin: 0; letter-spacing: -0.01em; color: #fff;
}
.cb2-hero__tier-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
    color: #fff; padding: 5px 12px;
    font-size: 11px; font-weight: 700;
    border-radius: 999px; text-transform: uppercase; letter-spacing: .06em;
    border: 1px solid rgba(255,255,255,.25);
}
.cb2-hero__tier-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.cb2-hero__status-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-top: 4px;
}

.cb2-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
}
.cb2-pill .dashicons { font-size: 14px; width: 14px; height: 14px; }
.cb2-pill--active   { background: rgba(34,197,94,.25);  border-color: rgba(134,239,172,.5); }
.cb2-pill--trialing { background: rgba(14,165,233,.28); border-color: rgba(125,211,252,.55); }
.cb2-pill--pastdue  { background: rgba(239,68,68,.3);   border-color: rgba(252,165,165,.6); }
.cb2-pill--expired  { background: rgba(100,116,139,.45);border-color: rgba(203,213,225,.55); }
.cb2-pill--cancelled{ background: rgba(100,116,139,.45);border-color: rgba(203,213,225,.55); }

.cb2-hero__meta {
    display: flex; flex-direction: column; gap: 10px;
    font-size: 13px; color: rgba(255,255,255,.92);
}
.cb2-hero__meta-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--cb2-radius-md);
}
.cb2-hero__meta-row .dashicons { font-size: 18px; width: 18px; height: 18px; opacity: .85; }
.cb2-hero__meta-label { opacity: .8; margin-right: 4px; }
.cb2-hero__meta-value { font-weight: 600; color: #fff; }

.cb2-hero__actions {
    display: flex; flex-direction: column; gap: 8px; align-items: stretch;
}
.cb2-hero__actions .cb2-btn {
    background: #fff;
    color: var(--cb2-brand);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    justify-content: center;
    padding: 11px 18px;
}
.cb2-hero__actions .cb2-btn:hover {
    background: #fff;
    color: var(--cb2-brand-600);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.cb2-hero__actions .cb2-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.35);
    box-shadow: none;
}
.cb2-hero__actions .cb2-btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* =====================================================================
 * Sections
 * ===================================================================== */
.cb2-section {
    background: var(--cb2-surface);
    border: 1px solid var(--cb2-line);
    border-radius: var(--cb2-radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--cb2-shadow-sm);
}

.cb2-section__head { margin-bottom: 20px; }
.cb2-section__head--split {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
}
.cb2-section__title {
    font-size: 18px; font-weight: 700; margin: 0; color: var(--cb2-ink);
    display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.005em;
}
.cb2-section__title .dashicons { color: var(--cb2-brand); font-size: 22px; width: 22px; height: 22px; }
.cb2-section__desc {
    margin: 6px 0 0; color: var(--cb2-ink-3); font-size: 13px; line-height: 1.5;
    max-width: 640px;
}

/* =====================================================================
 * 2. USAGE — progress cards + quickstats
 * ===================================================================== */
.cb2-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.cb2-usage-card {
    background: var(--cb2-surface);
    border: 1px solid var(--cb2-line);
    border-radius: var(--cb2-radius-md);
    padding: 20px 22px;
    display: flex; flex-direction: column; gap: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cb2-usage-card:hover { border-color: var(--cb2-line-2); box-shadow: var(--cb2-shadow-sm); }

.cb2-usage-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cb2-usage-card__label {
    font-size: 12px; font-weight: 700; color: var(--cb2-ink-3);
    text-transform: uppercase; letter-spacing: .06em;
    display: flex; align-items: center; gap: 8px;
}
.cb2-usage-card__label .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--cb2-brand); }

.cb2-usage-card__pct {
    font-size: 13px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    background: var(--cb2-success-50); color: var(--cb2-success);
}
.cb2-usage-card__pct.is-info    { background: var(--cb2-info-50);    color: var(--cb2-info); }
.cb2-usage-card__pct.is-warning { background: var(--cb2-warning-50); color: #b45309; }
.cb2-usage-card__pct.is-danger  { background: var(--cb2-danger-50);  color: var(--cb2-danger); }

.cb2-usage-card__numbers {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.cb2-usage-card__used {
    font-size: 32px; font-weight: 800; color: var(--cb2-ink);
    letter-spacing: -0.01em; line-height: 1;
}
.cb2-usage-card__sep { color: var(--cb2-ink-3); font-size: 20px; }
.cb2-usage-card__limit { color: var(--cb2-ink-3); font-size: 16px; font-weight: 600; }
.cb2-usage-card__pack-extra {
    font-size: 12px; font-weight: 600;
    color: var(--cb2-brand);
    background: var(--cb2-brand-50);
    padding: 3px 8px; border-radius: 999px;
    margin-left: 4px;
}
.cb2-usage-card__unlimited {
    font-size: 13px; font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    padding: 4px 12px; border-radius: 999px;
    letter-spacing: .05em; text-transform: uppercase;
}

.cb2-progress {
    position: relative;
    height: 10px;
    background: var(--cb2-surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.cb2-progress__fill {
    height: 100%;
    background: var(--cb2-success);
    border-radius: 999px;
    transition: width .6s cubic-bezier(.4,0,.2,1), background-color .3s ease;
    position: relative;
}
.cb2-progress__fill.is-success { background: linear-gradient(90deg, #16a34a, #22c55e); }
.cb2-progress__fill.is-info    { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.cb2-progress__fill.is-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cb2-progress__fill.is-danger  { background: linear-gradient(90deg, #dc2626, #ef4444); animation: cb2-pulse 1.6s ease-in-out infinite; }

@keyframes cb2-pulse {
    0%,100% { opacity: 1; }
    50% { opacity: .7; }
}

.cb2-usage-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; font-size: 12px; color: var(--cb2-ink-3);
}
.cb2-usage-card__foot .dashicons { font-size: 14px; width: 14px; height: 14px; margin-right: 4px; vertical-align: middle; }

/* Quick stats line */
.cb2-quickstats {
    display: flex; flex-wrap: wrap; gap: 12px 28px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--cb2-line);
    font-size: 13px; color: var(--cb2-ink-2);
}
.cb2-quickstat {
    display: inline-flex; align-items: center; gap: 6px;
}
.cb2-quickstat strong { color: var(--cb2-ink); font-weight: 700; }
.cb2-quickstat .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--cb2-brand); }

/* =====================================================================
 * 3. PLANS GRID
 * ===================================================================== */

/* Segmented toggle */
.cb2-segmented {
    position: relative;
    display: inline-flex;
    padding: 4px;
    background: var(--cb2-surface-3);
    border-radius: 999px;
    border: 1px solid var(--cb2-line);
}
.cb2-segmented__opt {
    appearance: none;
    background: transparent;
    border: none;
    padding: 7px 16px;
    font-size: 13px; font-weight: 600;
    color: var(--cb2-ink-3);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.cb2-segmented__opt:hover { color: var(--cb2-ink); }
.cb2-segmented__opt.is-active {
    background: var(--cb2-surface);
    color: var(--cb2-brand);
    box-shadow: var(--cb2-shadow-sm);
}
.cb2-segmented__badge {
    background: var(--cb2-success);
    color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 999px;
    letter-spacing: .04em;
}

/* Grid */
.cb2-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* Individual plan card */
.cb2-plan-card {
    position: relative;
    background: var(--cb2-surface);
    border: 1px solid var(--cb2-line);
    border-radius: var(--cb2-radius-lg);
    padding: 24px 22px 22px;
    display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
}
.cb2-plan-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--cb2-plan-color, var(--cb2-brand));
    opacity: .9;
}
.cb2-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cb2-shadow-md);
    border-color: var(--cb2-line-2);
}

.cb2-plan-card--current {
    border-color: var(--cb2-brand);
    box-shadow: 0 0 0 3px var(--cb2-brand-50);
}

.cb2-plan-card--highlight {
    border-color: var(--cb2-brand);
    box-shadow: var(--cb2-shadow-md);
    transform: translateY(-2px);
}
.cb2-plan-card--highlight::before { height: 6px; }

.cb2-plan-card--downgrade {
    opacity: .72;
    background: var(--cb2-surface-2);
}

/* v2.2.4 — Free Trial locked state (for shops that have moved past it). */
.cb2-plan-card--locked {
    opacity: .55;
    background: repeating-linear-gradient(
        -45deg,
        var(--cb2-surface-2) 0,
        var(--cb2-surface-2) 10px,
        transparent 10px,
        transparent 20px
    );
    pointer-events: auto;
}
.cb2-plan-card--locked:hover {
    transform: none;
    box-shadow: var(--cb2-shadow-sm);
}
.cb2-plan-card--locked .cb2-plan-card__amount,
.cb2-plan-card--locked .cb2-plan-card__price-sub {
    text-decoration: line-through;
    text-decoration-color: var(--cb2-line-2);
}

.cb2-plan-card__ribbon {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--cb2-brand-gradient);
    color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 4px 10px; border-radius: 999px;
    letter-spacing: .06em; text-transform: uppercase;
    box-shadow: var(--cb2-shadow-brand);
}
.cb2-plan-card__ribbon--current {
    background: var(--cb2-ink);
    box-shadow: none;
}

.cb2-plan-card__head {
    display: flex; flex-direction: column; gap: 4px;
    margin-bottom: 14px;
    padding-top: 4px;
}
.cb2-plan-card__tier {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--cb2-plan-color, var(--cb2-brand));
}
.cb2-plan-card__tier-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cb2-plan-card__name {
    font-size: 22px; font-weight: 800; margin: 0;
    color: var(--cb2-ink); letter-spacing: -0.01em;
}

.cb2-plan-card__price {
    margin: 4px 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cb2-line);
    display: flex; flex-direction: column; gap: 4px;
}
.cb2-plan-card__price-row {
    display: flex; align-items: baseline; gap: 4px;
}
.cb2-plan-card__currency {
    font-size: 18px; font-weight: 700; color: var(--cb2-ink-2);
}
.cb2-plan-card__amount {
    font-size: 40px; font-weight: 800; color: var(--cb2-ink);
    line-height: 1; letter-spacing: -0.02em;
}
.cb2-plan-card__period {
    font-size: 14px; color: var(--cb2-ink-3); font-weight: 500;
}
.cb2-plan-card__price-note {
    font-size: 12px; color: var(--cb2-success); font-weight: 600;
    min-height: 16px;
}
.cb2-plan-card__price-sub {
    font-size: 12px; color: var(--cb2-ink-3);
}
.cb2-plan-card__price--custom .cb2-plan-card__amount {
    font-size: 26px; letter-spacing: 0;
}

.cb2-plan-card__features {
    list-style: none; padding: 0; margin: 0 0 20px;
    display: flex; flex-direction: column; gap: 9px;
    flex: 1;
}
.cb2-plan-card__features li {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 13px; color: var(--cb2-ink-2); line-height: 1.4;
}
.cb2-plan-card__features .dashicons {
    font-size: 16px; width: 16px; height: 16px;
    color: var(--cb2-success);
    flex-shrink: 0; margin-top: 1px;
}
.cb2-plan-card--downgrade .cb2-plan-card__features .dashicons { color: var(--cb2-ink-3); }

.cb2-plan-card__cta .cb2-btn { width: 100%; justify-content: center; padding: 11px 16px; }

/* Comparison matrix (collapsible) */
.cb2-matrix {
    margin-top: 22px;
    background: var(--cb2-surface-2);
    border: 1px solid var(--cb2-line);
    border-radius: var(--cb2-radius-md);
}
.cb2-matrix__summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; color: var(--cb2-ink);
}
.cb2-matrix__summary::-webkit-details-marker { display: none; }
.cb2-matrix__summary .dashicons:first-of-type { color: var(--cb2-brand); }
.cb2-matrix__chevron {
    margin-left: auto;
    transition: transform .2s ease;
}
.cb2-matrix[open] .cb2-matrix__chevron { transform: rotate(180deg); }
.cb2-matrix__body { padding: 4px 18px 18px; }

.cb2-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--cb2-surface);
    border-radius: var(--cb2-radius-sm);
    overflow: hidden;
    border: 1px solid var(--cb2-line);
}
.cb2-matrix-table th,
.cb2-matrix-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--cb2-line);
    white-space: nowrap;
}
.cb2-matrix-table th { background: var(--cb2-surface-3); font-weight: 700; color: var(--cb2-ink); }
.cb2-matrix-table th:first-child,
.cb2-matrix-table td:first-child { text-align: left; font-weight: 500; color: var(--cb2-ink-2); white-space: normal; }
.cb2-matrix-table tr:last-child td { border-bottom: none; }
.cb2-matrix-table .is-yes  { color: var(--cb2-success); font-weight: 700; }
.cb2-matrix-table .is-no   { color: var(--cb2-ink-3); }
.cb2-matrix-table .is-current-col { background: var(--cb2-brand-50); }

/* =====================================================================
 * 4. BOOST / PACKS
 * ===================================================================== */
.cb2-section--boost {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #fff;
    border-color: transparent;
}
.cb2-section--boost .cb2-section__title { color: #fff; letter-spacing: -0.01em; font-size: 22px; }
.cb2-section--boost .cb2-section__title .dashicons { color: #a5b4fc; }
.cb2-section--boost .cb2-section__desc { color: rgba(255,255,255,.75); }

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

.cb2-pack-card {
    position: relative;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--cb2-radius-md);
    padding: 22px;
    display: flex; flex-direction: column;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    backdrop-filter: blur(8px);
}
.cb2-pack-card:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.28);
    transform: translateY(-3px);
}
.cb2-pack-card--featured {
    background: rgba(139, 92, 246, .16);
    border-color: rgba(167, 139, 250, .5);
}
.cb2-pack-card__label {
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 8px;
}
.cb2-pack-card__count {
    font-size: 28px; font-weight: 800; color: #fff; line-height: 1;
    margin-bottom: 4px;
}
.cb2-pack-card__count-suffix { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.65); margin-left: 4px; }
.cb2-pack-card__price-row {
    display: flex; align-items: baseline; gap: 6px;
    margin: 14px 0 4px;
}
.cb2-pack-card__price {
    font-size: 32px; font-weight: 800; color: #fff; line-height: 1;
}
.cb2-pack-card__price-period { font-size: 13px; color: rgba(255,255,255,.6); }
.cb2-pack-card__per-conv {
    font-size: 12px; color: #c7d2fe; font-weight: 600;
    margin-bottom: 16px;
}
.cb2-pack-card__cta .cb2-btn {
    width: 100%; justify-content: center; padding: 11px 16px;
    background: #fff; color: var(--cb2-brand);
    border-color: transparent;
}
.cb2-pack-card__cta .cb2-btn:hover { background: var(--cb2-brand-50); color: var(--cb2-brand-600); }

.cb2-pack-card__ribbon {
    position: absolute;
    top: -10px; right: 16px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 4px 10px; border-radius: 999px;
    letter-spacing: .06em; text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .45);
}

/* =====================================================================
 * 5. What's New
 * ===================================================================== */
.cb2-section--whatsnew { background: var(--cb2-surface-2); }
.cb2-whatsnew { }
.cb2-whatsnew__summary {
    list-style: none;
    cursor: pointer;
    display: flex; align-items: center; gap: 12px;
    font-size: 15px; font-weight: 700; color: var(--cb2-ink);
    padding: 4px 0;
}
.cb2-whatsnew__summary::-webkit-details-marker { display: none; }
.cb2-whatsnew__summary .dashicons:first-of-type { color: var(--cb2-brand); font-size: 20px; width: 20px; height: 20px; }
.cb2-whatsnew__title { flex: 1; }
.cb2-whatsnew__badge {
    background: var(--cb2-brand);
    color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 3px 8px; border-radius: 999px;
    letter-spacing: .06em; text-transform: uppercase;
}
.cb2-whatsnew__list { margin: 16px 0 0; padding: 0; list-style: none; }
.cb2-whatsnew__entry {
    border-top: 1px solid var(--cb2-line);
    padding: 14px 0 6px;
}
.cb2-whatsnew__entry:first-child { border-top: none; padding-top: 4px; }
.cb2-whatsnew__entry-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px;
}
.cb2-whatsnew__version {
    font-size: 12px; font-weight: 800;
    background: var(--cb2-brand-50); color: var(--cb2-brand);
    padding: 3px 8px; border-radius: 6px;
}
.cb2-whatsnew__date { color: var(--cb2-ink-3); font-size: 12px; }
.cb2-whatsnew__entry-title { font-weight: 700; color: var(--cb2-ink); }
.cb2-whatsnew__notes {
    margin: 0; padding: 0 0 0 20px;
    font-size: 13px; color: var(--cb2-ink-2); line-height: 1.55;
}
.cb2-whatsnew__notes li { margin: 3px 0; }

/* =====================================================================
 * 6. API CONFIG
 * ===================================================================== */
.cb2-api { max-width: 820px; }
.cb2-api__label {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700;
    color: var(--cb2-ink-3);
    margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: .05em;
}
.cb2-api__label--spaced { margin-top: 20px; }
.cb2-api__label .dashicons { color: var(--cb2-brand); font-size: 15px; width: 15px; height: 15px; }
.cb2-api__row { display: flex; gap: 8px; align-items: stretch; }
.cb2-api__input {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--cb2-ink);
    background: var(--cb2-surface-2);
    border: 1px solid var(--cb2-line);
    border-radius: var(--cb2-radius-sm);
}
.cb2-api__input:focus { outline: 2px solid var(--cb2-brand); outline-offset: 0; border-color: var(--cb2-brand); }
.cb2-api__input:disabled { cursor: not-allowed; color: var(--cb2-ink-2); }
.cb2-api__result { display: block; margin-top: 8px; font-size: 12px; min-height: 16px; }

/* =====================================================================
 * Animations
 * ===================================================================== */
@keyframes cb2-pop-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
 * Modal (kept for cross-compat)
 * ===================================================================== */
.subscription-modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 999999 !important;
    animation: cb2-pop-in .2s ease;
}
.subscription-modal.show { display: flex; align-items: center; justify-content: center; }
.subscription-modal .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999 !important;
}
.subscription-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--cb2-radius-lg);
    padding: 36px;
    max-width: 480px; width: 90%;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
    text-align: center;
    z-index: 9999999 !important;
}
.subscription-modal .modal-icon {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.subscription-modal .modal-icon.success { background: var(--cb2-success-50); color: var(--cb2-success); }
.subscription-modal .modal-icon.error   { background: var(--cb2-danger-50);  color: var(--cb2-danger); }
.subscription-modal .modal-icon.confirm { background: var(--cb2-brand-50);   color: var(--cb2-brand); }
.subscription-modal .modal-icon .dashicons { font-size: 36px; width: 36px; height: 36px; }
.subscription-modal .modal-title { font-size: 22px; font-weight: 800; margin: 0 0 12px; color: var(--cb2-ink); }
.subscription-modal .modal-message { font-size: 14px; color: var(--cb2-ink-2); margin: 0 0 24px; line-height: 1.55; }
.subscription-modal .modal-button,
.subscription-modal .modal-buttons .button {
    padding: 11px 22px; font-size: 14px; font-weight: 600;
    border-radius: var(--cb2-radius-sm); cursor: pointer;
}
.subscription-modal .modal-buttons { display: flex; justify-content: center; gap: 10px; }
.subscription-modal .modal-buttons .button-cancel { background: var(--cb2-surface-3); border: 1px solid var(--cb2-line-2); color: var(--cb2-ink-2); }
.subscription-modal .modal-buttons .button-confirm { background: var(--cb2-brand); color: #fff; border: none; }

/* =====================================================================
 * Responsive
 * ===================================================================== */
@media (max-width: 1080px) {
    .cb2-plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cb2-packs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .cb2-hero__grid { grid-template-columns: 1fr; gap: 16px; }
    .cb2-hero__actions { flex-direction: row; }
    .cb2-section { padding: 20px; }
    .cb2-section__head--split { align-items: flex-start; }
    .cb2-packs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .cb2-page { margin: 12px 12px 32px 0; }
    .cb2-plans-grid { grid-template-columns: 1fr; }
    .cb2-hero { padding: 22px; }
    .cb2-hero__plan-name { font-size: 28px; }
    .cb2-hero__actions { flex-direction: column; }
    .cb2-alert { flex-direction: column; align-items: flex-start; gap: 10px; }
    .cb2-api__row { flex-direction: column; }
    .cb2-matrix-table { font-size: 12px; }
    .cb2-matrix-table th, .cb2-matrix-table td { padding: 8px 6px; }
}

/* =====================================================================
 * Backwards-compat shims for older class hooks used elsewhere
 * ===================================================================== */
.convertybot-subscription { /* retained for any older DOM still relying on it */
    background: transparent;
}
.cb-upgrade-btn, .cb-buy-pack-btn, .cb-open-portal-btn { /* retained class hooks */ }
