/* Shared structural styles + CMS content vocabulary. Color/font identity is
   supplied by each theme skin via CSS variables, and tenant colors come from
   the inline --cms-primary/--cms-secondary set on the .cms-theme-scope wrapper.
   CMS page content only ever uses these cms-* classes, so the same stored
   content re-skins automatically when the tenant switches template. */
    html { scroll-behavior: smooth; }
    main:has(.cms-theme-scope) { overflow: visible !important; }
    html:has(.cms-legal), body:has(.cms-legal) { overflow-x: clip !important; overflow-y: visible !important; }

    /* Tenant-configured background_color (--cms-background) wins over the theme
       skin's own --cms-bg default, so the reseller can recolor the whole template.
       The scope fills the viewport (min-h-screen), so this backs the whole page. */
    .cms-theme-scope {
        font-family: var(--cms-font-body, inherit);
        background: var(--cms-background, var(--cms-bg, transparent));
        color: var(--cms-text, #475569);
        /* Long unbroken CMS strings (URLs, pasted spam) must wrap inside the frame. */
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Page shell carries tenant CSS variables + canvas background without theming text. */
    .cms-page-shell {
        background: var(--cms-background, var(--cms-bg, transparent));
        min-height: 100vh;
    }
    .cms-page-shell__main {
        background: transparent;
    }

    /* Custom HTML island: break inheritance only — never restyle author markup.
       Restore CMS color tokens after `all: revert` so classic Bootstrap portal
       pages (profile, etc.) can map btn-success / nav-pills to tenant colors. */
    .cms-custom-html-island {
        all: revert;
        display: block;
        --cms-primary: inherit;
        --cms-secondary: inherit;
        --cms-on-primary: inherit;
        --cms-on-secondary: inherit;
        --cms-background: inherit;
        --cms-bg: inherit;
        --cms-heading: inherit;
        --cms-text: inherit;
        --cms-muted: inherit;
        --cms-border: inherit;
        --cms-surface: inherit;
    }

    /* Site chrome (shared nav + footer) — neutral light defaults; each theme
       skin can override the --cms-chrome-* vars (e.g. Atlas goes dark). */
    .cms-theme-scope {
        --cms-chrome-bg: var(--cms-chrome-bg-override, #ffffff);
        --cms-chrome-heading: var(--cms-chrome-heading-override, #0f172a);
        --cms-chrome-text: var(--cms-chrome-text-override, #334155);
        --cms-chrome-muted: var(--cms-chrome-muted-override, #64748b);
        --cms-chrome-border: var(--cms-chrome-border-override, #e2e8f0);
    }

    /* Layout */
    .cms-theme-scope .cms-section { padding: 4rem 0; }
    @media (min-width: 640px) { .cms-theme-scope .cms-section { padding: 5rem 0; } }
    .cms-theme-scope .cms-section--tint { background: var(--cms-tint, rgba(15, 23, 42, 0.03)); }
    .cms-theme-scope .cms-container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
    @media (min-width: 640px) { .cms-theme-scope .cms-container { padding: 0 1.5rem; } }
    .cms-theme-scope .cms-narrow { max-width: 48rem; }
    .cms-theme-scope .cms-grid { display: grid; gap: 1.5rem; }
    .cms-theme-scope .cms-grid-2, .cms-theme-scope .cms-grid-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    @media (min-width: 768px) {
        .cms-theme-scope .cms-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .cms-theme-scope .cms-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    .cms-theme-scope .cms-split { display: grid; gap: 3rem; grid-template-columns: 1fr; }
    @media (min-width: 1024px) { .cms-theme-scope .cms-split { grid-template-columns: 1.1fr 0.9fr; align-items: center; } }
    .cms-theme-scope .cms-mt-sm { margin-top: 1rem; }
    .cms-theme-scope .cms-mt { margin-top: 2rem; }
    .cms-theme-scope .cms-mt-lg { margin-top: 3rem; }

    /* Typography */
    .cms-theme-scope .cms-eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--cms-eyebrow-color, var(--cms-primary, #0f172a)); }
    .cms-theme-scope .cms-title { font-family: var(--cms-font-head, inherit); color: var(--cms-heading, #0f172a); font-size: 2.25rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
    @media (min-width: 640px) { .cms-theme-scope .cms-title { font-size: 3rem; } }
    .cms-theme-scope .cms-heading { font-family: var(--cms-font-head, inherit); color: var(--cms-heading, #0f172a); font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
    .cms-theme-scope .cms-subheading { font-family: var(--cms-font-head, inherit); color: var(--cms-heading, #0f172a); font-size: 1.15rem; font-weight: 600; }
    .cms-theme-scope .cms-lead { font-size: 1.125rem; line-height: 1.7; color: var(--cms-muted, #64748b); max-width: 100%; }
    .cms-theme-scope .cms-text { color: var(--cms-text, #475569); }
    .cms-theme-scope .cms-muted { color: var(--cms-muted, #64748b); }
    .cms-theme-scope .cms-title,
    .cms-theme-scope .cms-heading,
    .cms-theme-scope .cms-subheading,
    .cms-theme-scope .cms-lead,
    .cms-theme-scope .cms-prose,
    .cms-theme-scope p {
        overflow-wrap: anywhere;
        word-break: break-word;
        max-width: 100%;
    }

    /* Surfaces */
    .cms-theme-scope .cms-card { background: var(--cms-surface, #fff); border: 1px solid var(--cms-border, #e5e7eb); border-radius: var(--cms-radius, 1rem); padding: 1.5rem; box-shadow: var(--cms-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.05)); }
    .cms-theme-scope .cms-stat-value { font-family: var(--cms-font-head, inherit); font-size: 2rem; font-weight: 700; color: var(--cms-heading, #0f172a); }
    .cms-theme-scope .cms-stat-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cms-muted, #64748b); margin-top: 0.35rem; }

    /* Buttons */
    .cms-theme-scope .cms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: var(--cms-btn-radius, var(--cms-radius, 0.6rem)); padding: 0.8rem 1.6rem; font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: all 0.18s ease; border: 1px solid transparent; cursor: pointer; }
    .cms-theme-scope .cms-btn--primary { background: var(--cms-primary, #0f172a); color: var(--cms-on-primary, #fff); }
    .cms-theme-scope .cms-btn--primary:hover { filter: brightness(0.94); }
    .cms-theme-scope .cms-btn--outline { background: transparent; border-color: var(--cms-primary, #0f172a); color: var(--cms-primary, #0f172a); }
    .cms-theme-scope .cms-btn--outline:hover { background: var(--cms-tint, rgba(15, 23, 42, 0.05)); }

    /* Hero — by default it blends into the active theme's own background
       (no forced colored band). A theme can opt into a distinct hero look by
       setting --cms-hero-bg / --cms-hero-text / --cms-hero-muted. */
    .cms-theme-scope .cms-hero { background: var(--cms-hero-bg, transparent); color: var(--cms-hero-text, var(--cms-text, #475569)); padding: 4rem 0; }
    @media (min-width: 640px) { .cms-theme-scope .cms-hero { padding: 5rem 0; } }
    .cms-theme-scope .cms-hero .cms-title, .cms-theme-scope .cms-hero .cms-heading { color: var(--cms-hero-text, var(--cms-heading, #0f172a)); }
    .cms-theme-scope .cms-hero .cms-lead { color: var(--cms-hero-muted, var(--cms-muted, #64748b)); }
    .cms-theme-scope .cms-hero .cms-eyebrow { color: var(--cms-hero-eyebrow, var(--cms-eyebrow-color, var(--cms-primary, #0f172a))); }

    /* Rich text (editable content) */
    .cms-theme-scope .cms-prose { color: var(--cms-text, #475569); font-size: 15px; line-height: 1.8; }
    .cms-theme-scope .cms-prose > :first-child { margin-top: 0; }
    .cms-theme-scope .cms-prose h2 { font-family: var(--cms-font-head, inherit); color: var(--cms-heading, #0f172a); font-size: 1.5rem; font-weight: 700; margin-top: 2.5rem; scroll-margin-top: 7rem; }
    .cms-theme-scope .cms-prose h3 { font-family: var(--cms-font-head, inherit); color: var(--cms-heading, #0f172a); font-size: 1.2rem; font-weight: 600; margin-top: 1.75rem; scroll-margin-top: 7rem; }
    .cms-theme-scope .cms-prose p { margin-top: 1rem; }
    .cms-theme-scope .cms-prose ul { margin-top: 1rem; list-style: disc; padding-left: 1.5rem; }
    .cms-theme-scope .cms-prose ol { margin-top: 1rem; list-style: decimal; padding-left: 1.5rem; }
    .cms-theme-scope .cms-prose li { margin-top: 0.4rem; }
    .cms-theme-scope .cms-prose a { color: var(--cms-primary, #0f172a); text-decoration: underline; text-underline-offset: 2px; }

    /* Legal layout + table of contents */
    .cms-theme-scope .cms-legal-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
    @media (min-width: 1024px) { .cms-theme-scope .cms-legal-grid { grid-template-columns: 260px minmax(0, 1fr); } }
    @media (min-width: 1024px) {
        .cms-theme-scope .cms-legal-sticky { position: sticky; top: 1.5rem; z-index: 20; max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
        header.sticky ~ main .cms-theme-scope .cms-legal-sticky { top: 6.5rem; max-height: calc(100vh - 7.5rem); }
    }
    .cms-theme-scope .legal-toc-link { display: block; border-radius: var(--cms-radius, 0.5rem); padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: var(--cms-font-body, inherit); color: var(--cms-muted, #64748b); transition: all 0.15s ease; }
    .cms-theme-scope .legal-toc-link:hover { background: var(--cms-tint, rgba(15, 23, 42, 0.05)); color: var(--cms-heading, #0f172a); }
    .cms-theme-scope .legal-toc-link.is-active { background: var(--cms-primary, #0f172a); color: var(--cms-on-primary, #fff); font-weight: 600; }
    .cms-theme-scope .legal-switch-link { display: block; border-radius: var(--cms-radius, 0.5rem); padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: var(--cms-font-body, inherit); color: var(--cms-text, #475569); transition: all 0.15s ease; }
    .cms-theme-scope .legal-switch-link:hover { background: var(--cms-tint, rgba(15, 23, 42, 0.05)); }
    .cms-theme-scope .legal-switch-link.is-active { background: var(--cms-primary, #0f172a); color: var(--cms-on-primary, #fff); }

    /* FAQ accordion (static <details> in CMS home sections) */
    .cms-theme-scope .cms-faq details { border-radius: var(--cms-radius, 1rem); }
    .cms-theme-scope .cms-faq summary { cursor: pointer; list-style: none; }
    .cms-theme-scope .cms-faq summary::-webkit-details-marker { display: none; }

    /* ===== Products / pricing table (store products section) ===== */
    .cms-theme-scope .cms-products-table-wrap {
        width: 100%;
        overflow-x: auto;
        background: var(--cms-surface, #fff);
        border: 1px solid var(--cms-border, #e5e7eb);
        border-radius: var(--cms-radius, 1rem);
        box-shadow: var(--cms-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.05));
        -webkit-overflow-scrolling: touch;
    }
    .cms-theme-scope .cms-products-table {
        width: 100%;
        min-width: 640px;
        border-collapse: collapse;
        font-size: 0.925rem;
    }
    .cms-theme-scope .cms-products-table thead th {
        text-align: left;
        padding: 1rem 1.25rem;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--cms-muted, #64748b);
        border-bottom: 1px solid var(--cms-border, #e5e7eb);
        white-space: nowrap;
    }
    .cms-theme-scope .cms-products-table tbody td {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--cms-border, #e5e7eb);
        color: var(--cms-text, #475569);
        vertical-align: middle;
    }
    .cms-theme-scope .cms-products-table tbody tr:last-child td { border-bottom: 0; }
    .cms-theme-scope .cms-products-table tbody tr:hover td { background: var(--cms-tint, rgba(15, 23, 42, 0.03)); }

    .cms-theme-scope .cms-products-table__product { width: 40%; }
    .cms-theme-scope .cms-products-table__product-cell {
        display: flex;
        align-items: center;
        gap: 0.85rem;
    }
    .cms-theme-scope .cms-products-table__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: var(--cms-radius, 0.75rem);
        overflow: hidden;
        background: var(--cms-tint, rgba(15, 23, 42, 0.05));
        color: var(--cms-muted, #94a3b8);
    }
    .cms-theme-scope .cms-products-table__icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .cms-theme-scope .cms-products-table__icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    .cms-theme-scope .cms-products-table__name {
        font-weight: 600;
        color: var(--cms-heading, #0f172a);
        text-decoration: none;
    }
    a.cms-theme-scope .cms-products-table__name:hover,
    .cms-theme-scope a.cms-products-table__name:hover { color: var(--cms-primary, #0f172a); }

    .cms-theme-scope .cms-products-table__price {
        font-weight: 700;
        color: var(--cms-heading, #0f172a);
    }
    .cms-theme-scope .cms-products-table__price-alt {
        font-weight: 500;
        color: var(--cms-muted, #64748b);
    }
    .cms-theme-scope .cms-products-table__metric {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-weight: 600;
        color: var(--cms-heading, #0f172a);
        white-space: nowrap;
    }
    .cms-theme-scope .cms-products-table__metric svg {
        width: 1.05rem;
        height: 1.05rem;
        flex: 0 0 auto;
        color: var(--cms-primary, #16a34a);
    }
    .cms-theme-scope .cms-products-table__metric--speed svg { color: var(--cms-muted, #64748b); }

    /* ===== Site chrome (nav + footer) re-skinned by the active theme ===== */
    .cms-theme-scope header,
    .cms-theme-scope footer { font-family: var(--cms-font-body, inherit); }
    .cms-theme-scope header { background: var(--cms-chrome-bg) !important; border-color: var(--cms-chrome-border) !important; }
    .cms-theme-scope footer { background: var(--cms-chrome-bg) !important; border-color: var(--cms-chrome-border) !important; color: var(--cms-chrome-text); }

    /* Headings / brand text */
    .cms-theme-scope header h1, .cms-theme-scope footer h1,
    .cms-theme-scope header h2, .cms-theme-scope footer h2,
    .cms-theme-scope header h3, .cms-theme-scope footer h3 { font-family: var(--cms-font-head, inherit); }
    .cms-theme-scope header .text-slate-900,
    .cms-theme-scope footer .text-slate-900,
    .cms-theme-scope footer h3 { color: var(--cms-chrome-heading) !important; }

    /* Body / link text */
    .cms-theme-scope header .text-slate-700, .cms-theme-scope footer .text-slate-700 { color: var(--cms-chrome-text) !important; }
    .cms-theme-scope header .text-slate-400, .cms-theme-scope header .text-slate-500,
    .cms-theme-scope footer .text-slate-400, .cms-theme-scope footer .text-slate-500,
    .cms-theme-scope footer .text-slate-600 { color: var(--cms-chrome-muted) !important; }

    /* Borders + tinted surfaces inside the chrome */
    .cms-theme-scope header .border-slate-200, .cms-theme-scope header .border-slate-300,
    .cms-theme-scope footer .border-slate-200, .cms-theme-scope footer .border-slate-300,
    .cms-theme-scope header .border-slate-200\/80 { border-color: var(--cms-chrome-border) !important; }

    /* Primary (solid) chrome buttons follow the theme accent */
    .cms-theme-scope header .bg-slate-900 { background: var(--cms-primary, #0f172a) !important; color: var(--cms-on-primary, #fff) !important; }
    .cms-theme-scope header .bg-slate-900 * { color: var(--cms-on-primary, #fff) !important; }
    /* Outline (light) chrome buttons blend into the chrome surface */
    .cms-theme-scope header .bg-white { background: var(--cms-chrome-bg) !important; color: var(--cms-chrome-heading) !important; }

    /* Active nav underline uses the theme accent */
    .cms-theme-scope header .border-slate-900 { border-color: var(--cms-primary, #0f172a) !important; }

    /* ===== Auth pages (login / register / password) re-skinned by theme ===== */
    .cms-auth { min-height: 100vh; background: var(--cms-auth-bg, var(--cms-bg, #0f172a)); color: var(--cms-text, #475569); font-family: var(--cms-font-body, inherit); }
    .cms-auth-brand { color: var(--cms-muted, #64748b); }
    .cms-auth-card { background: var(--cms-surface, #ffffff); border: 1px solid var(--cms-border, #e2e8f0); border-radius: var(--cms-radius, 1rem); box-shadow: var(--cms-card-shadow, 0 24px 60px -30px rgba(0, 0, 0, 0.4)); }
    .cms-auth-badge { color: var(--cms-eyebrow-color, var(--cms-primary, #0f172a)); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
    .cms-auth-title { font-family: var(--cms-font-head, inherit); color: var(--cms-heading, #0f172a); }
    .cms-auth-sub, .cms-auth-foot { color: var(--cms-muted, #64748b); }
    .cms-auth label { color: var(--cms-text, #475569) !important; }
    .cms-auth input[type="text"], .cms-auth input[type="email"], .cms-auth input[type="password"] {
        background: var(--cms-auth-field-bg, transparent) !important;
        border-color: var(--cms-border, #e2e8f0) !important;
        color: var(--cms-heading, #0f172a) !important;
    }
    .cms-auth input::placeholder { color: var(--cms-muted, #94a3b8) !important; }
    .cms-auth input:focus { border-color: var(--cms-primary, #0f172a) !important; }
    .cms-auth button[type="submit"] { background: var(--cms-primary, #0f172a) !important; color: var(--cms-on-primary, #fff) !important; }
    /* Secondary copy ("Remember me", "New here?", ...) reads as muted text */
    .cms-auth .text-white\/80, .cms-auth .text-white\/70, .cms-auth .text-white\/60 { color: var(--cms-muted, #64748b) !important; }
    /* Inline links pick up the theme accent */
    .cms-auth a, .cms-auth a.text-white { color: var(--cms-primary, #0f172a) !important; text-decoration-color: currentColor; }
    /* Keep validation alerts readable on any (light or dark) card */
    .cms-auth .text-red-100 { color: #dc2626 !important; }
    .cms-auth .text-emerald-100 { color: #059669 !important; }

/* ==========================================================================
   Chrome CTA color helpers — drive nav/footer buttons & accents from the
   reseller's chosen primary/secondary colors (injected as CSS vars on the
   theme scope). Plain CSS (not Tailwind) so they apply without a build step
   and support :hover. Used by every template's nav/footer.
   ========================================================================== */
.cms-cta-primary { background: var(--cms-primary) !important; color: var(--cms-on-primary, #fff) !important; }
.cms-cta-primary:hover { filter: brightness(1.08); }
.cms-cta-secondary { background: var(--cms-secondary) !important; color: var(--cms-on-secondary, #fff) !important; }
.cms-cta-secondary:hover { filter: brightness(1.06); }
.cms-cta-gradient { background: var(--cms-primary) !important; color: var(--cms-on-primary, #fff) !important; }
.cms-cta-gradient:hover { filter: brightness(1.06); }
.cms-cta-outline { border-color: var(--cms-secondary) !important; color: var(--cms-secondary) !important; }
.cms-cta-outline:hover { filter: brightness(1.12); }
.cms-accent-text { color: var(--cms-primary) !important; }
.cms-accent-hover:hover { color: var(--cms-primary) !important; }
.cms-accent-border-hover:hover { border-color: var(--cms-primary) !important; color: var(--cms-primary) !important; }
.cms-accent-decoration { text-decoration-color: var(--cms-primary) !important; }

/* ==========================================================================
   Customer dashboard / authenticated CMS portal sections (cms-dash*).
   ========================================================================== */
.cms-theme-scope .cms-dash { padding: clamp(1.25rem, 3vw, 2rem) 0; }
.cms-theme-scope .cms-dash--hero { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.cms-theme-scope .cms-dash--workspace { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.cms-theme-scope .cms-dash-shell { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.cms-theme-scope .cms-dash-hero {
    display: grid;
    gap: 1.25rem;
    align-items: stretch;
    background:
        radial-gradient(1200px 280px at 10% -20%, color-mix(in srgb, var(--cms-primary) 18%, transparent), transparent 60%),
        linear-gradient(180deg, color-mix(in srgb, var(--cms-primary) 6%, #fff), #fff 70%);
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: calc(var(--cms-radius, 0.75rem) * 1.2);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
@media (min-width: 900px) {
    .cms-theme-scope .cms-dash-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
        gap: 1.75rem;
    }
}
.cms-theme-scope .cms-dash-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cms-primary);
    margin-bottom: 0.55rem;
}
.cms-theme-scope .cms-dash-title {
    margin: 0;
    font-family: var(--cms-font-head, inherit);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.2;
    font-weight: 750;
    color: var(--cms-heading, #0f172a);
}
.cms-theme-scope .cms-dash-email {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--cms-muted, #64748b);
    word-break: break-all;
}
.cms-theme-scope .cms-dash-lead {
    margin: 0.75rem 0 0;
    max-width: 36rem;
    color: var(--cms-text, #475569);
    font-size: 0.95rem;
    line-height: 1.6;
}
.cms-theme-scope .cms-dash-hero__wallet {
    background: var(--cms-surface, #fff);
    border: 1px solid color-mix(in srgb, var(--cms-primary) 22%, var(--cms-border, #e5e7eb));
    border-radius: calc(var(--cms-radius, 0.75rem) * 1);
    padding: 1.15rem 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}
.cms-theme-scope .cms-dash-wallet-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-dash-wallet-value {
    margin: 0;
    font-family: var(--cms-font-head, inherit);
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    font-weight: 750;
    color: var(--cms-primary);
    line-height: 1.1;
}
.cms-theme-scope .cms-dash-wallet-cta {
    margin-top: 0.65rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.cms-theme-scope .cms-dash-metrics {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .cms-theme-scope .cms-dash-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cms-theme-scope .cms-dash-metric--wide { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
    .cms-theme-scope .cms-dash-metrics {
        grid-template-columns: 1fr 1fr 1.4fr;
    }
    .cms-theme-scope .cms-dash-metric--wide { grid-column: auto; }
}
.cms-theme-scope .cms-dash-metric {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: var(--cms-surface, #fff);
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: calc(var(--cms-radius, 0.75rem) * 1);
    padding: 1.05rem 1.15rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    min-width: 0;
}
.cms-theme-scope .cms-dash-metric__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--cms-primary) 12%, #fff);
    color: var(--cms-primary);
    font-size: 1.25rem;
}
.cms-theme-scope .cms-dash-metric__label {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-dash-metric__value {
    margin: 0;
    font-family: var(--cms-font-head, inherit);
    font-size: 1.65rem;
    font-weight: 750;
    color: var(--cms-heading, #0f172a);
    line-height: 1.15;
}
.cms-theme-scope .cms-dash-metric__body { min-width: 0; flex: 1; }
.cms-theme-scope .cms-dash-apikey {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
@media (min-width: 640px) {
    .cms-theme-scope .cms-dash-apikey { flex-direction: row; align-items: stretch; }
}
.cms-theme-scope .cms-dash-apikey__input {
    width: 100%;
    min-width: 0;
    border-radius: 0.7rem;
    border: 1px solid var(--cms-border, #e5e7eb);
    background: var(--cms-tint, #f8fafc);
    color: var(--cms-heading, #0f172a);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    padding: 0.7rem 0.85rem;
}
.cms-theme-scope .cms-dash-apikey__copy { white-space: nowrap; flex-shrink: 0; }
.cms-theme-scope .cms-dash-link {
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cms-primary);
    text-decoration: none;
}
.cms-theme-scope .cms-dash-link:hover { text-decoration: underline; }

.cms-theme-scope .cms-dash-workspace {
    display: grid;
    gap: 1.15rem;
}
@media (min-width: 980px) {
    .cms-theme-scope .cms-dash-workspace {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 1.35rem;
        align-items: start;
    }
}
.cms-theme-scope .cms-dash-panel {
    background: var(--cms-surface, #fff);
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: calc(var(--cms-radius, 0.75rem) * 1);
    padding: 1.15rem 1.2rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}
.cms-theme-scope .cms-dash-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 750;
    color: var(--cms-heading, #0f172a);
}
.cms-theme-scope .cms-dash-panel__hint {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-dash-panel__header { margin-bottom: 1rem; }
.cms-theme-scope .cms-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.85rem;
}
.cms-theme-scope .cms-dash-nav a,
.cms-theme-scope .cms-dash-logout button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
    color: var(--cms-text, #475569);
    text-decoration: none;
    background: transparent;
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.cms-theme-scope .cms-dash-nav a i,
.cms-theme-scope .cms-dash-logout button i {
    width: 1.1rem;
    text-align: center;
    color: var(--cms-primary);
    font-size: 1.1rem;
}
.cms-theme-scope .cms-dash-nav a:hover,
.cms-theme-scope .cms-dash-logout button:hover {
    background: color-mix(in srgb, var(--cms-primary) 8%, #fff);
    color: var(--cms-heading, #0f172a);
}
.cms-theme-scope .cms-dash-logout { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--cms-border, #e5e7eb); }
.cms-theme-scope .cms-dash-logout button { border: 1px solid var(--cms-border, #e5e7eb); }

.cms-theme-scope .cms-dash-tools {
    display: grid;
    gap: 0.75rem;
}
@media (min-width: 720px) {
    .cms-theme-scope .cms-dash-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cms-theme-scope .cms-dash-tool {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: 0.8rem;
    padding: 0.95rem 1rem;
    color: var(--cms-heading, #0f172a);
    text-decoration: none;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cms-theme-scope .cms-dash-tool:hover {
    border-color: color-mix(in srgb, var(--cms-primary) 45%, var(--cms-border, #e5e7eb));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}
.cms-theme-scope .cms-dash-tool__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--cms-primary) 12%, #fff);
    color: var(--cms-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.cms-theme-scope .cms-dash-tool__copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.cms-theme-scope .cms-dash-tool__copy strong { font-size: 0.92rem; font-weight: 700; }
.cms-theme-scope .cms-dash-tool__copy small { color: var(--cms-muted, #64748b); font-size: 0.78rem; line-height: 1.35; }
.cms-theme-scope .cms-dash-tool__chevron { color: var(--cms-muted, #64748b); font-size: 1.1rem; }

/* Legacy dashboard helpers still used by older stored HTML */
.cms-theme-scope .cms-dash-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    border-radius: var(--cms-btn-radius, var(--cms-radius, 0.6rem));
    background: var(--cms-tint); color: var(--cms-heading); border: 1px solid var(--cms-border);
    padding: 0.55rem 1.15rem; font-weight: 700; font-size: 0.95rem;
}
.cms-theme-scope .cms-dash-stat { font-family: var(--cms-font-head, inherit); color: var(--cms-heading); }

/* Classic 10Captcha / compact / workspace dashboard skins */
.cms-theme-scope .cms-portal-dash--classic_10cap .cms-portal-dash__stat--balance {
    background: linear-gradient(160deg, var(--cms-primary) 0%, color-mix(in srgb, var(--cms-primary) 75%, #000) 100%);
    color: var(--cms-on-primary, #fff);
}
.cms-theme-scope .cms-portal-dash--classic_10cap .cms-portal-dash__pills .nav-link {
    color: var(--cms-text, #475569);
    border-radius: 0.5rem;
    margin-bottom: 0.2rem;
}
.cms-theme-scope .cms-portal-dash--classic_10cap .cms-portal-dash__pills .nav-link.active,
.cms-theme-scope .cms-portal-dash--classic_10cap .cms-portal-dash__pills .nav-link:hover {
    background: color-mix(in srgb, var(--cms-primary) 12%, #fff);
    color: var(--cms-primary);
}
.cms-theme-scope .cms-portal-dash--classic_10cap .btn-success {
    background: var(--cms-primary);
    border-color: var(--cms-primary);
}
.cms-theme-scope .cms-dash-compact__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.cms-theme-scope .cms-dash-compact__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
    .cms-theme-scope .cms-dash-compact__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cms-theme-scope .cms-dash-compact__stats > div {
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--cms-surface, #fff);
}
.cms-theme-scope .cms-dash-compact__stats span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-dash-compact__stats strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.25rem;
    color: var(--cms-heading, #0f172a);
}
.cms-theme-scope .cms-dash-compact__apikey { margin-bottom: 1.25rem; }
.cms-theme-scope .cms-dash-compact__apikey > label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-dash-compact__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    align-items: center;
}
.cms-theme-scope .cms-dash-compact__links a,
.cms-theme-scope .cms-dash-compact__logout button {
    color: var(--cms-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.cms-theme-scope .cms-dash-compact__links a:hover,
.cms-theme-scope .cms-dash-compact__logout button:hover { text-decoration: underline; }

/* ==========================================================================
   Portal data tables (payments / reports) + mobile payment cards.
   Hydrator emits cms-table* / cms-pay-* classes; without these rules the
   thead can stretch full-width while tbody cells collapse into one text run
   (especially under Tailwind's display utilities on the wrap).
   ========================================================================== */
.cms-theme-scope .cms-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: var(--cms-radius, 0.75rem);
    background: var(--cms-surface, #fff);
}
/* Payments: desktop table + mobile cards */
.cms-theme-scope .cms-table-wrap--desktop-only { display: none; }
@media (min-width: 768px) {
    .cms-theme-scope .cms-table-wrap--desktop-only { display: block; }
}
.cms-theme-scope .cms-table {
    display: table;
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.9rem;
}
.cms-theme-scope .cms-table thead { display: table-header-group; }
.cms-theme-scope .cms-table tbody { display: table-row-group; }
.cms-theme-scope .cms-table tr { display: table-row; }
.cms-theme-scope .cms-table th,
.cms-theme-scope .cms-table td {
    display: table-cell;
    vertical-align: middle;
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--cms-border, #e5e7eb);
}
.cms-theme-scope .cms-table thead th,
.cms-theme-scope .cms-table__head {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cms-muted, #64748b);
    white-space: nowrap;
    background: var(--cms-tint, rgba(15, 23, 42, 0.03));
}
.cms-theme-scope .cms-table tbody td,
.cms-theme-scope .cms-table__cell {
    color: var(--cms-text, #475569);
    word-break: break-word;
}
.cms-theme-scope .cms-table__cell--nowrap { white-space: nowrap; }
.cms-theme-scope .cms-table__cell--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
}
.cms-theme-scope .cms-table tbody tr:last-child td { border-bottom: 0; }
.cms-theme-scope .cms-table tbody tr:hover td { background: var(--cms-tint, rgba(15, 23, 42, 0.03)); }

.cms-theme-scope .cms-pay-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid var(--cms-border, #e5e7eb);
    color: var(--cms-muted, #64748b);
    text-decoration: none;
    font-size: 0.8rem;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cms-theme-scope .cms-pay-tab:hover {
    border-color: var(--cms-primary, #0f172a);
    color: var(--cms-primary, #0f172a);
}
.cms-theme-scope .cms-pay-tab--active {
    background: var(--cms-primary, #0f172a);
    border-color: var(--cms-primary, #0f172a);
    color: var(--cms-on-primary, #fff);
}
.cms-theme-scope .cms-pay-tab__count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.cms-theme-scope .cms-pay-cards {
    display: grid;
    gap: 0.85rem;
}
@media (min-width: 768px) {
    .cms-theme-scope .cms-pay-cards { display: none; }
}
.cms-theme-scope .cms-pay-card {
    border: 1px solid var(--cms-border, #e5e7eb);
    border-radius: var(--cms-radius, 0.75rem);
    background: var(--cms-surface, #fff);
    padding: 1rem 1.1rem;
}
.cms-theme-scope .cms-pay-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.cms-theme-scope .cms-pay-card__ref {
    margin: 0;
    font-weight: 600;
    color: var(--cms-heading, #0f172a);
    word-break: break-all;
    font-size: 0.85rem;
}
.cms-theme-scope .cms-pay-card__type {
    margin: 0.25rem 0 0;
    color: var(--cms-muted, #64748b);
    font-size: 0.8rem;
}
.cms-theme-scope .cms-pay-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
    margin: 0.9rem 0 0;
}
.cms-theme-scope .cms-pay-card__grid dt {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-pay-card__grid dd {
    margin: 0.2rem 0 0;
    color: var(--cms-heading, #0f172a);
    font-size: 0.875rem;
}

.cms-theme-scope .cms-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid var(--cms-border, #e5e7eb);
    color: var(--cms-heading, #0f172a);
    background: var(--cms-tint, rgba(15, 23, 42, 0.04));
}
.cms-theme-scope .cms-badge--ok {
    color: #059669;
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.12);
}
.cms-theme-scope .cms-badge--warn {
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
}
.cms-theme-scope .cms-badge--danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
}
.cms-theme-scope .cms-badge--muted {
    color: var(--cms-muted, #64748b);
}
.cms-theme-scope .cms-empty {
    padding: 1.25rem;
    border: 1px dashed var(--cms-border, #e5e7eb);
    border-radius: var(--cms-radius, 0.75rem);
    color: var(--cms-muted, #64748b);
    font-size: 0.9rem;
}
.cms-theme-scope .cms-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.cms-theme-scope .cms-pagination a,
.cms-theme-scope .cms-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.35rem 0.65rem;
    border-radius: calc(var(--cms-radius, 0.75rem) * 0.5);
    border: 1px solid var(--cms-border, #e5e7eb);
    color: var(--cms-text, #475569);
    text-decoration: none;
    font-size: 0.8rem;
}
.cms-theme-scope .cms-pagination a:hover {
    border-color: var(--cms-primary, #0f172a);
    color: var(--cms-primary, #0f172a);
}
.cms-theme-scope .cms-pagination .is-active {
    background: var(--cms-primary, #0f172a);
    border-color: var(--cms-primary, #0f172a);
    color: var(--cms-on-primary, #fff);
}

/* ===== API docs (sidebar + content) ===== */
html:has(.cms-api-docs),
body:has(.cms-api-docs) {
    overflow: visible !important;
}
.cms-theme-scope .cms-api-docs {
    padding: 2rem 0 3.5rem;
    color: var(--cms-text, #475569);
}
.cms-theme-scope .cms-api-docs__shell {
    max-width: 80rem;
}
.cms-theme-scope .cms-api-docs__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 992px) {
    .cms-theme-scope .cms-api-docs__grid {
        grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
        gap: 2rem;
    }
    .cms-theme-scope .cms-api-docs__sidebar {
        min-width: 0;
        align-self: start;
    }
    /*
      Pin TOC below fixed Atlas header. Prefer sticky; JS below upgrades to fixed
      if an ancestor overflow still blocks sticky.
    */
    .cms-theme-scope .cms-api-docs__sticky {
        position: sticky;
        top: 7.25rem;
        z-index: 40;
        max-height: calc(100vh - 8rem);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    body.marketplace-live-chrome .cms-theme-scope .cms-api-docs__sticky {
        top: 6.75rem;
        max-height: calc(100vh - 7.5rem);
    }
    .cms-theme-scope .cms-api-docs__sticky.is-fixed-pin {
        position: fixed;
        top: 6.75rem;
        max-height: calc(100vh - 7.5rem);
        z-index: 40;
    }
}
.cms-theme-scope .cms-api-docs__toc {
    padding: 1.1rem 1rem;
    background: var(--cms-surface, #fff);
    border: 1px solid var(--cms-border, #e5e7eb);
    box-shadow: var(--cms-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.05));
}
.cms-theme-scope .cms-api-docs__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cms-theme-scope .cms-api-docs__nav > li {
    margin: 0.2rem 0;
}
.cms-theme-scope .cms-api-docs .cms-nav-link {
    display: block;
    border-radius: var(--cms-radius, 0.5rem);
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
    color: var(--cms-muted, #64748b);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.cms-theme-scope .cms-api-docs .cms-nav-link:hover,
.cms-theme-scope .cms-api-docs .cms-nav-link.is-active {
    background: var(--cms-tint, rgba(15, 23, 42, 0.05));
    color: var(--cms-heading, #0f172a);
}
.cms-theme-scope .cms-api-docs .cms-collapse {
    display: none;
    list-style: none;
    margin: 0.15rem 0 0.35rem;
    padding: 0 0 0 0.35rem;
}
.cms-theme-scope .cms-api-docs .cms-collapse.is-open {
    display: block;
}
.cms-theme-scope .cms-api-docs .cms-collapse .cms-nav-link {
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
}
.cms-theme-scope .cms-api-docs__main {
    min-width: 0;
    padding: 1.35rem 1.25rem 1.75rem;
}
@media (min-width: 768px) {
    .cms-theme-scope .cms-api-docs__main {
        padding: 1.75rem 1.75rem 2.25rem;
    }
}
.cms-theme-scope .cms-api-docs__section {
    scroll-margin-top: 7rem;
}
.cms-theme-scope .cms-api-docs__section + hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--cms-border, #e5e7eb);
}
.cms-theme-scope .cms-api-docs h3 {
    font-family: var(--cms-font-head, inherit);
    color: var(--cms-heading, #0f172a);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    scroll-margin-top: 7rem;
}
.cms-theme-scope .cms-api-docs .cms-accent {
    color: var(--cms-primary, #0f172a);
}
.cms-theme-scope .cms-api-docs p,
.cms-theme-scope .cms-api-docs li {
    color: var(--cms-text, #475569);
    line-height: 1.7;
}
.cms-theme-scope .cms-api-docs a {
    color: var(--cms-primary, #0f172a);
}
.cms-theme-scope .cms-api-docs__table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.cms-theme-scope .cms-api-docs__table th,
.cms-theme-scope .cms-api-docs__table td {
    border: 1px solid var(--cms-border, #e5e7eb);
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.cms-theme-scope .cms-api-docs__table th {
    background: var(--cms-tint, #f8fafc);
    color: var(--cms-heading, #0f172a);
    font-weight: 600;
}
.cms-theme-scope .cms-api-docs__pre,
.cms-theme-scope .cms-api-docs pre {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--cms-radius, 0.5rem);
    padding: 0.9rem 1rem;
    margin: 0.85rem 0;
    font-size: 0.8rem;
    line-height: 1.55;
}
.cms-theme-scope .cms-api-docs__pre code,
.cms-theme-scope .cms-api-docs pre code {
    color: inherit;
    background: transparent;
    padding: 0;
    white-space: pre;
}

/* --------------------------------------------------------------------------
   Classic Bootstrap portal skin → tenant CMS tokens
   Profile / payments / top-up / etc. still use btn-success + nav-pills.
   Map those accents to --cms-primary so every tenant matches its theme.
   -------------------------------------------------------------------------- */
.cms-page-shell .btn-primary,
.cms-page-shell .btn-success,
.cms-page-shell .btn-primary-brand,
.cms-page-shell .badge-primary,
.cms-page-shell .badge-success {
    background-color: var(--cms-primary, #0f172a) !important;
    border-color: var(--cms-primary, #0f172a) !important;
    color: var(--cms-on-primary, #fff) !important;
}

.cms-page-shell .btn-primary:hover,
.cms-page-shell .btn-primary:focus,
.cms-page-shell .btn-success:hover,
.cms-page-shell .btn-success:focus,
.cms-page-shell .btn-primary-brand:hover,
.cms-page-shell .btn-primary-brand:focus {
    background-color: var(--cms-secondary, var(--cms-primary, #0f172a)) !important;
    border-color: var(--cms-secondary, var(--cms-primary, #0f172a)) !important;
    color: var(--cms-on-secondary, var(--cms-on-primary, #fff)) !important;
    filter: none;
}

.cms-page-shell .btn-outline-primary,
.cms-page-shell .btn-outline-success {
    color: var(--cms-primary, #0f172a) !important;
    border-color: var(--cms-primary, #0f172a) !important;
    background-color: transparent !important;
}

.cms-page-shell .btn-outline-primary:hover,
.cms-page-shell .btn-outline-success:hover {
    color: var(--cms-on-primary, #fff) !important;
    background-color: var(--cms-primary, #0f172a) !important;
    border-color: var(--cms-primary, #0f172a) !important;
}

.cms-page-shell .text-primary,
.cms-page-shell .text-success,
.cms-page-shell a.text-success,
.cms-page-shell a.text-primary {
    color: var(--cms-primary, #0f172a) !important;
}

.cms-page-shell .bg-primary,
.cms-page-shell .bg-success {
    background-color: var(--cms-primary, #0f172a) !important;
}

.cms-page-shell .border-primary,
.cms-page-shell .border-success {
    border-color: var(--cms-primary, #0f172a) !important;
}

.cms-page-shell .nav-pills .nav-link.active,
.cms-page-shell .nav-pills .show > .nav-link {
    background-color: var(--cms-primary, #0f172a) !important;
    color: var(--cms-on-primary, #fff) !important;
}

.cms-page-shell .nav-pills .nav-link:not(.active) {
    color: var(--cms-text, #666);
}

.cms-page-shell .nav-pills .nav-link:not(.active):hover {
    color: var(--cms-heading, #000);
}

.cms-page-shell .custom-control-input:checked ~ .custom-control-label::before,
.cms-page-shell .custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--cms-primary, #0f172a) !important;
    border-color: var(--cms-primary, #0f172a) !important;
}

.cms-page-shell .page-item.active .page-link,
.cms-page-shell .pagination .page-item.active .page-link {
    background-color: var(--cms-primary, #0f172a) !important;
    border-color: var(--cms-primary, #0f172a) !important;
    color: var(--cms-on-primary, #fff) !important;
}

.cms-page-shell .page-link {
    color: var(--cms-primary, #0f172a);
}

.cms-page-shell .page-link:hover {
    color: var(--cms-secondary, var(--cms-primary, #0f172a));
}

