/* 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,
        .cms-header ~ * .cms-theme-scope .cms-legal-sticky,
        body .cms-theme-scope .cms-legal-sticky { top: 6.5rem; max-height: calc(100vh - 7.5rem); }
    }
    /* Same horizontal track for hero + body cards */
    .cms-theme-scope .cms-legal-hero {
        padding: 2rem 0 0 !important;
    }
    .cms-theme-scope .cms-legal-body {
        padding-top: 2rem !important;
        padding-bottom: 4rem;
    }
    .cms-theme-scope .cms-legal-hero-card {
        padding: 1.75rem 1.5rem;
    }
    .cms-theme-scope .cms-legal-sticky {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    .cms-theme-scope .cms-legal-sidebar-gap {
        display: none;
        height: 2.75rem;
        flex: 0 0 2.75rem;
        width: 100%;
        pointer-events: none;
    }
    .cms-theme-scope .cms-legal-toc-shell:not(.hidden) ~ .cms-legal-sidebar-gap,
    .cms-theme-scope .cms-legal-toc-shell:not(.hidden) + .cms-legal-sidebar-gap {
        display: block !important;
    }
    .cms-theme-scope .cms-legal-toc-shell.hidden,
    .cms-theme-scope .cms-legal-toc-shell[hidden] {
        display: none !important;
        margin: 0 !important;
    }
    .cms-theme-scope .cms-legal-nav-card {
        margin-top: 0 !important;
    }
    .cms-theme-scope .cms-legal-hero__row {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: flex-end;
        justify-content: space-between;
        margin-top: 1rem;
    }
    .cms-theme-scope .cms-legal-hero__copy { max-width: 46rem; }
    .cms-theme-scope .cms-legal-hero__updated {
        margin: 0;
        font-size: 0.9rem;
        white-space: nowrap;
        color: var(--cms-muted, #64748b);
    }
    .cms-theme-scope .cms-legal-switch { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .cms-theme-scope .cms-legal-switch--stack { flex-direction: column; flex-wrap: nowrap; gap: 0.15rem; }
    .cms-theme-scope .cms-legal-switch--mobile { display: none !important; }
    .cms-theme-scope .cms-legal-sidebar { display: block; }
    .cms-theme-scope .cms-legal-toc { display: flex; flex-direction: column; gap: 0.15rem; }
    .cms-theme-scope .cms-legal-article { min-width: 0; }
    .cms-theme-scope .cms-legal-sidebar,
    .cms-theme-scope .cms-legal-article {
        align-self: start;
    }
    .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; text-decoration: none; }
    .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) !important; color: var(--cms-on-primary, #fff) !important; 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) !important; transition: all 0.15s ease; text-decoration: none; border: 1px solid transparent; background: transparent; }
    .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,
    .cms-theme-scope a.legal-switch-link.is-active.cms-card {
        background: var(--cms-primary, #0f172a) !important;
        color: var(--cms-on-primary, #fff) !important;
        border-color: transparent !important;
        font-weight: 600;
    }
    .cms-theme-scope .cms-legal-switch--mobile .legal-switch-link {
        flex: 1 1 12rem;
        text-align: center;
        border: 1px solid var(--cms-border, #e5e7eb);
        background: var(--cms-surface, #fff);
    }
    .cms-theme-scope .cms-legal-sidebar.hidden,
    .cms-theme-scope .cms-legal-toc-shell.hidden,
    .cms-theme-scope .hidden[data-legal-toc-shell],
    .cms-theme-scope .hidden[data-legal-sidebar] {
        display: none !important;
    }
    .cms-theme-scope .cms-legal-article.is-narrow {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 48rem;
    }

    /* 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 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: linear-gradient(180deg, color-mix(in srgb, var(--cms-primary) 8%, var(--cms-surface, #fff)), var(--cms-surface, #fff) 72%);
    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);
}
.cms-theme-scope .cms-dash-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cms-text-muted, #64748b); }
.cms-theme-scope .cms-dash-title { margin: 0.35rem 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--cms-heading, #0f172a); }
.cms-theme-scope .cms-dash-lead { margin: 0.65rem 0 0; color: var(--cms-text-muted, #64748b); line-height: 1.6; }
.cms-theme-scope .cms-dash-metrics { display: grid; gap: 0.85rem; grid-template-columns: repeat(1, minmax(0, 1fr)); margin-top: 1rem; }
@media (min-width: 640px) { .cms-theme-scope .cms-dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cms-theme-scope .cms-dash-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cms-theme-scope .cms-dash-metric,
.cms-theme-scope .cms-dash-panel,
.cms-theme-scope .cms-dash-tool {
    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-dash-metric__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cms-text-muted, #64748b); }
.cms-theme-scope .cms-dash-metric__value { margin-top: 0.45rem; font-size: 1.65rem; font-weight: 800; color: var(--cms-heading, #0f172a); }
.cms-theme-scope .cms-dash-panel__title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--cms-heading, #0f172a); }
.cms-theme-scope .cms-dash-panel__hint { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--cms-text-muted, #64748b); }

.portal-pack-shell--editorial .cms-dash-hero { border-radius: 0; box-shadow: none; border-width: 0 0 1px; }
.portal-pack-shell--editorial .cms-dash-metric,
.portal-pack-shell--editorial .cms-dash-panel { border-radius: 0; }
.portal-pack-shell--minimal-light .cms-dash-metric,
.portal-pack-shell--minimal-light .cms-dash-panel { border-radius: 999px; }
.portal-pack-shell--dark-panel .cms-dash-hero,
.portal-pack-shell--dark-panel .cms-dash-metric,
.portal-pack-shell--dark-panel .cms-dash-panel {
    background: rgba(18, 26, 43, 0.92);
    border-color: rgba(56, 189, 248, 0.18);
    color: #e2e8f0;
}
.portal-pack-shell--dark-panel .cms-dash-title,
.portal-pack-shell--dark-panel .cms-dash-metric__value,
.portal-pack-shell--dark-panel .cms-dash-panel__title { color: #f8fafc; }

/* ==========================================================================
   Shared data tables (payments / reports) + mobile payment cards.
   Kept for any remaining cms-table* markup; portal Blade views no longer
   depend on the CMS hydrator for these pages.
   ========================================================================== */
.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;
}
/* Footer must paint above any sticky docs chrome while scrolling. */
body:has(.cms-api-docs) footer,
body:has(.cms-api-docs) .cms-footer,
body:has(.cms-api-docs) .theme-footer {
    position: relative;
    z-index: 30;
}
.cms-theme-scope .cms-api-docs {
    padding: 1.25rem 0 3.5rem;
    color: var(--cms-text, #475569);
}
body:has(.tenant-chrome-nav.fixed-top) .cms-theme-scope .cms-api-docs,
body:has(.header.fixed-top) .cms-theme-scope .cms-api-docs {
    padding-top: 5.5rem;
}
.cms-theme-scope .cms-api-docs__shell {
    max-width: 80rem;
}
.cms-theme-scope .cms-api-docs__grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}
@media (min-width: 992px) {
    .cms-theme-scope .cms-api-docs__grid {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 1.25rem;
    }
    .cms-theme-scope .cms-api-docs__sidebar {
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
        min-width: 0;
        align-self: stretch;
    }
    .cms-theme-scope .cms-api-docs__main {
        flex: 1 1 auto;
        min-width: 0;
    }
    /* Sticky TOC stays inside the sidebar column; column spans full docs height
       so the sidebar scrolls away naturally before the footer. */
    .cms-theme-scope .cms-api-docs__sticky {
        position: sticky;
        top: 5.25rem;
        z-index: 20;
        max-height: calc(100vh - 6rem);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    body:has(.tenant-chrome-nav.fixed-top) .cms-theme-scope .cms-api-docs__sticky,
    body:has(.header.fixed-top) .cms-theme-scope .cms-api-docs__sticky {
        top: 5.25rem;
        max-height: calc(100vh - 6rem);
    }
    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__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-heading, #0f172a);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.cms-theme-scope .cms-api-docs .cms-eyebrow {
    color: var(--cms-primary, #0f172a);
    font-weight: 700;
}
.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,
.cms-custom-html-island .text-primary,
.cms-custom-html-island .text-success,
.cms-custom-html-island a.text-success,
.cms-custom-html-island 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));
}

/* Classic Bootstrap portal pages (profile, etc.) — center shell + dark-theme surfaces */
.cms-page-shell .cms-portal-classic {
    width: 100%;
}
.cms-page-shell .cms-portal-classic > section {
    width: 100%;
}
.cms-page-shell .cms-portal-classic .container {
    width: 100% !important;
    max-width: 72rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

body.theme-dark-panel .cms-portal-classic,
body.theme-dark-panel .cms-portal-classic .container,
body.theme-dark-panel .cms-portal-classic .row,
body.theme-dark-panel .cms-portal-classic .col-lg-3,
body.theme-dark-panel .cms-portal-classic .col-lg-9,
body.theme-dark-panel .cms-portal-classic .tab-content,
body.theme-dark-panel .cms-portal-classic .tab-pane {
    color: var(--cms-text, #cbd5e1);
}

body.theme-dark-panel .cms-portal-classic .nav-pills,
body.theme-dark-panel .cms-portal-classic .border.shadow,
body.theme-dark-panel .cms-portal-classic .bg-gray-05 {
    background: #121a2b !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    box-shadow: none !important;
    color: #e2e8f0;
    border-radius: var(--cms-radius, 16px) !important;
    overflow: hidden;
}

body.theme-dark-panel .cms-portal-classic .nav-pills .nav-link,
body.theme-dark-panel .cms-portal-classic .btn,
body.theme-dark-panel .cms-portal-classic .form-control,
body.theme-dark-panel .cms-portal-classic input,
body.theme-dark-panel .cms-portal-classic select,
body.theme-dark-panel .cms-portal-classic textarea,
body.theme-dark-panel .cms-portal-classic .badge {
    border-radius: var(--cms-radius, 16px) !important;
}

body.theme-dark-panel .cms-portal-classic .nav-pills .nav-link:not(.active) {
    color: #cbd5e1 !important;
}

body.theme-dark-panel .cms-portal-classic label,
body.theme-dark-panel .cms-portal-classic h1,
body.theme-dark-panel .cms-portal-classic h2,
body.theme-dark-panel .cms-portal-classic h3,
body.theme-dark-panel .cms-portal-classic h4,
body.theme-dark-panel .cms-portal-classic h5,
body.theme-dark-panel .cms-portal-classic p,
body.theme-dark-panel .cms-portal-classic .form-group,
body.theme-dark-panel .cms-portal-classic td,
body.theme-dark-panel .cms-portal-classic th,
body.theme-dark-panel .cms-portal-classic b,
body.theme-dark-panel .cms-portal-classic .table,
body.theme-dark-panel .cms-portal-classic hr {
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

body.theme-dark-panel .cms-portal-classic .table thead th {
    color: #94a3b8 !important;
    border-bottom-color: rgba(148, 163, 184, 0.35) !important;
    background: transparent !important;
}

body.theme-dark-panel .cms-portal-classic .table,
body.theme-dark-panel .cms-portal-classic .table td,
body.theme-dark-panel .cms-portal-classic .table th {
    background-color: transparent !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-dark-panel .cms-portal-classic .table-striped tbody tr:nth-of-type(odd),
body.theme-dark-panel .cms-portal-classic .table-hover tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.06) !important;
    color: #e2e8f0 !important;
}

body.theme-dark-panel .cms-portal-classic .table-striped tbody tr:nth-of-type(odd) td,
body.theme-dark-panel .cms-portal-classic .table-hover tbody tr:hover td {
    color: #e2e8f0 !important;
}

body.theme-dark-panel .cms-portal-classic a:not(.btn):not(.nav-link) {
    color: var(--cms-primary, #38bdf8) !important;
}

body.theme-dark-panel .cms-portal-classic .text-muted,
body.theme-dark-panel .cms-portal-classic .text-secondary {
    color: #94a3b8 !important;
}

body.theme-dark-panel .cms-portal-classic .form-control,
body.theme-dark-panel .cms-portal-classic input,
body.theme-dark-panel .cms-portal-classic select,
body.theme-dark-panel .cms-portal-classic textarea {
    background: #0a1120 !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #e2e8f0 !important;
}

body.theme-dark-panel .cms-portal-classic .form-control:focus,
body.theme-dark-panel .cms-portal-classic input:focus,
body.theme-dark-panel .cms-portal-classic select:focus,
body.theme-dark-panel .cms-portal-classic textarea:focus {
    border-color: rgba(56, 189, 248, 0.55) !important;
    box-shadow: 0 0 0 0.15rem rgba(56, 189, 248, 0.2) !important;
}

body.theme-dark-panel .cms-theme-scope .cms-api-docs__toc,
body.theme-dark-panel .cms-theme-scope .cms-api-docs__main.cms-card {
    background: #121a2b;
    border-color: rgba(56, 189, 248, 0.2);
}

body.theme-dark-panel .cms-theme-scope .cms-api-docs__table th,
body.theme-dark-panel .cms-theme-scope .cms-api-docs__table td {
    border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark-panel .cms-theme-scope .cms-api-docs__pre,
body.theme-dark-panel .cms-theme-scope .cms-api-docs pre {
    background: #0a1120;
    border-color: rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
}

