:root {
    --cx-primary: #4a6cf7;
    --cx-primary-dark: #2f4ad0;
    --cx-accent: #16c79a;
    --cx-dark: #0f1729;
    --cx-darker: #0a0f1f;
    --cx-muted: #6b7280;
    --cx-light: #f7f9fc;
    --cx-gradient: linear-gradient(135deg, #4a6cf7 0%, #16c79a 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: #1f2937;
    background-color: #fff;
}

a {
    text-decoration: none;
}

/* Navbar */
.cx-navbar {
    backdrop-filter: saturate(180%) blur(12px);
    background-color: rgba(255, 255, 255, 0.9);
    transition: box-shadow .2s ease, background-color .2s ease;
}

.cx-navbar.scrolled {
    box-shadow: 0 4px 24px rgba(15, 23, 41, 0.08);
}

.cx-brand {
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--cx-dark);
    font-size: 1.35rem;
}

.cx-brand span {
    background: var(--cx-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero */
.cx-hero {
    background: radial-gradient(1200px 600px at 70% -10%, rgba(74, 108, 247, 0.18), transparent 60%),
                radial-gradient(900px 500px at 10% 10%, rgba(22, 199, 154, 0.12), transparent 55%),
                var(--cx-light);
    padding: 9rem 0 6rem;
    overflow: hidden;
}

.cx-hero h1 {
    font-weight: 800;
    font-size: clamp(2.1rem, 4vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--cx-dark);
}

.cx-hero .lead {
    color: var(--cx-muted);
    font-size: 1.2rem;
    max-width: 38rem;
}

.cx-gradient-text {
    background: var(--cx-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero product mockup */
.cx-hero-mockup {
    background: #fff;
    border: 1px solid rgba(15, 23, 41, 0.06);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 30px 70px rgba(15, 23, 41, 0.12);
    animation: cx-float 6s ease-in-out infinite;
}

.cx-mockup-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}

.cx-mockup-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(15, 23, 41, 0.12);
}

.cx-mockup-bar span:first-child { background: #ff5f56; }
.cx-mockup-bar span:nth-child(2) { background: #ffbd2e; }
.cx-mockup-bar span:nth-child(3) { background: #27c93f; }

.cx-mockup-body {
    background: var(--cx-light);
    border-radius: 14px;
    padding: 1.25rem;
}

.cx-mockup-row {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.cx-mockup-kpi {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: .85rem .5rem;
    text-align: center;
    box-shadow: 0 4px 14px rgba(15, 23, 41, 0.05);
}

.cx-mockup-kpi-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.cx-mockup-kpi-label {
    display: block;
    font-size: .7rem;
    color: var(--cx-muted);
    margin-top: .25rem;
}

.cx-mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    height: 90px;
    margin-bottom: 1.25rem;
}

.cx-mockup-chart span {
    flex: 1;
    background: var(--cx-gradient);
    border-radius: 6px 6px 0 0;
    opacity: .85;
}

.cx-mockup-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.cx-mockup-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #fff;
    border-radius: 10px;
    padding: .6rem .75rem;
    box-shadow: 0 4px 14px rgba(15, 23, 41, 0.04);
}

.cx-mockup-item span {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(15, 23, 41, 0.08);
}

@keyframes cx-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Stats */
.cx-stat {
    padding: 1rem 0;
    position: relative;
}

.cx-stat-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.5px;
}

@media (min-width: 992px) {
    .cx-stat::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        height: 48px;
        width: 1px;
        background: rgba(15, 23, 41, 0.08);
    }

    .col-lg-3:last-child .cx-stat::after {
        display: none;
    }
}

/* Buttons */
.btn-cx-primary {
    background: var(--cx-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .75rem 1.6rem;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(74, 108, 247, 0.28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-cx-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(74, 108, 247, 0.36);
}

.btn-cx-outline {
    border: 1.5px solid rgba(15, 23, 41, 0.15);
    color: var(--cx-dark);
    font-weight: 600;
    padding: .75rem 1.6rem;
    border-radius: 12px;
    background: #fff;
}

.btn-cx-outline:hover {
    border-color: var(--cx-primary);
    color: var(--cx-primary);
}

/* Sections */
.cx-section {
    padding: 5.5rem 0;
}

.cx-section-title {
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--cx-dark);
}

.cx-eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--cx-primary);
}

/* Feature cards */
.cx-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 41, 0.06);
    border-radius: 18px;
    padding: 2rem;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cx-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 41, 0.08);
}

.cx-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    background: var(--cx-gradient);
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(74, 108, 247, 0.22);
    transition: transform .25s ease;
}

.cx-card:hover .cx-icon {
    transform: scale(1.08) rotate(-3deg);
}

/* Pricing */
.cx-price-card {
    border: 1px solid rgba(15, 23, 41, 0.08);
    border-radius: 18px;
    padding: 2rem;
    height: 100%;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cx-price-card.popular {
    border-color: var(--cx-primary);
    box-shadow: 0 18px 50px rgba(74, 108, 247, 0.18);
    transform: scale(1.02);
}

.cx-price-card .price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--cx-dark);
}

.cx-badge-popular {
    background: var(--cx-gradient);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: .3rem .7rem;
    border-radius: 999px;
}

/* Dark section */
.cx-dark-section {
    background: var(--cx-dark);
    color: #cdd5e6;
}

.cx-dark-section h2, .cx-dark-section h3 {
    color: #fff;
}

/* Footer */
.cx-footer {
    background: var(--cx-darker);
    color: #9aa4bd;
    padding: 3.5rem 0 2rem;
}

.cx-footer a {
    color: #c4cce0;
}

.cx-footer a:hover {
    color: #fff;
}

/* FAQ accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(74, 108, 247, 0.08);
    color: var(--cx-primary-dark);
}

.accordion-button:focus {
    box-shadow: none;
}

/* Live chat widget */
.cx-chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--cx-gradient);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(74, 108, 247, 0.4);
    z-index: 1050;
}

.cx-chat-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 48px);
    height: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 41, 0.25);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Scroll reveal animation */
.cx-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
    will-change: opacity, transform;
}

.cx-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Accessible focus ring */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid rgba(74, 108, 247, 0.45);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Legal modal — pure Blazor controlled overlay (no Bootstrap JS) */
.cx-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(15, 23, 41, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.cx-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.cx-modal-card {
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(15, 23, 41, 0.07);
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(15, 23, 41, 0.18);
    transform: translateY(12px) scale(.98);
    transition: transform .2s ease;
}

.cx-modal-overlay.is-open .cx-modal-card {
    transform: translateY(0) scale(1);
}

.cx-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.75rem 2rem 1rem;
}

.cx-modal-body {
    padding: 0 2rem 1rem;
    overflow-y: auto;
}

.cx-modal-body h6 {
    font-weight: 700;
    letter-spacing: -.2px;
}

.cx-modal-footer {
    padding: .75rem 2rem 1.75rem;
    display: flex;
    justify-content: flex-end;
}

.cx-modal-close {
    background: none;
    border: none;
    color: var(--cx-muted, #6b7280);
    font-size: 1.1rem;
    line-height: 1;
    padding: .35rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.cx-modal-close:hover {
    background: rgba(15, 23, 41, 0.06);
    color: var(--cx-dark, #0f1729);
}

/* Inline link-button inside checkbox label */
.cx-legal-link {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--cx-primary);
    font-size: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    line-height: inherit;
    vertical-align: baseline;
}

.cx-legal-link:hover {
    color: var(--cx-primary-dark);
}

.cx-legal-link:focus-visible {
    outline: 2px solid rgba(74, 108, 247, 0.5);
    border-radius: 3px;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }

    .cx-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================
   Identity / Account pages — branded auth experience
   ============================================================ */
.cx-auth-page {
    display: flex;
    min-height: 100vh;
    background-color: var(--cx-light);
}

/* Left brand panel */
.cx-auth-brand-side {
    flex: 1 1 45%;
    position: relative;
    display: none;
    background: radial-gradient(900px 600px at 20% 0%, rgba(255, 255, 255, 0.12), transparent 60%),
                var(--cx-gradient);
    color: #fff;
    overflow: hidden;
}

.cx-auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
    margin: auto;
    padding: 4rem 3.5rem;
}

.cx-auth-logo {
    color: #fff;
    font-size: 1.6rem;
    display: inline-block;
    margin-bottom: 2.5rem;
}

.cx-auth-logo span {
    -webkit-text-fill-color: #fff;
    background: none;
}

.cx-auth-tagline {
    font-weight: 800;
    letter-spacing: -.5px;
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.cx-auth-subtagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cx-auth-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cx-auth-points li {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .45rem 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.cx-auth-points i {
    color: #fff;
    opacity: .9;
}

/* Right form panel */
.cx-auth-form-side {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.cx-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid rgba(15, 23, 41, 0.06);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 41, 0.08);
    padding: 2.5rem;
}

.cx-auth-logo-mobile {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 1.75rem;
    color: var(--cx-dark);
}

.cx-auth-footer {
    margin-top: 1.5rem;
    color: var(--cx-muted);
    font-size: .875rem;
}

.cx-auth-footer a {
    color: var(--cx-primary);
    font-weight: 500;
}

/* Auth typography */
.cx-auth-card h1,
.cx-auth-card h2 {
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--cx-dark);
    font-size: 1.6rem;
    margin-bottom: .35rem;
}

.cx-auth-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.cx-auth-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cx-dark);
}

.cx-auth-card hr {
    border-color: rgba(15, 23, 41, 0.08);
    margin: 1.25rem 0;
}

/* Form controls within auth + manage cards */
.cx-auth-card .form-control,
.cx-auth-card .form-select {
    border-radius: 12px;
    padding: .85rem 1rem;
    border: 1px solid rgba(15, 23, 41, 0.12);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cx-auth-card .form-control:focus,
.cx-auth-card .form-select:focus {
    border-color: var(--cx-primary);
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.12);
}

.cx-auth-card .form-floating > label {
    color: var(--cx-muted);
}

.cx-auth-card .btn-primary,
.cx-auth-card .btn-lg.btn-primary {
    background: var(--cx-gradient);
    border: none;
    font-weight: 600;
    padding: .8rem 1.6rem;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(74, 108, 247, 0.28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.cx-auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(74, 108, 247, 0.36);
}

.cx-auth-card .btn-link {
    color: var(--cx-primary);
    font-weight: 500;
    text-decoration: none;
}

.cx-auth-card .btn-link:hover {
    color: var(--cx-primary-dark);
    text-decoration: underline;
}

.cx-auth-card a {
    color: var(--cx-primary);
    font-weight: 500;
}

.cx-auth-card a:hover {
    color: var(--cx-primary-dark);
}

.cx-auth-card .row > [class^="col-"] section + section,
.cx-auth-card .col-lg-4 {
    margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .cx-auth-brand-side {
        display: block;
    }

    .cx-auth-logo-mobile {
        display: none;
    }
}

.cx-auth-external {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 41, 0.08);
}

/* ---- Loading indicator (serverless cold-start friendly) ---- */
.cx-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1rem;
    width: 100%;
}

.cx-loading-spinner {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 3px solid rgba(74, 108, 247, 0.15);
    border-top-color: var(--cx-primary);
    animation: cx-spin 0.8s linear infinite;
}

.cx-loading-text {
    margin-top: 0.9rem;
    margin-bottom: 0;
    color: var(--cx-muted);
    font-size: 0.95rem;
}

.cx-skeleton-group {
    width: 100%;
    max-width: 640px;
    margin-top: 1.75rem;
}

.cx-skeleton-row {
    height: 1rem;
    border-radius: 6px;
    margin-bottom: 0.85rem;
    background: linear-gradient(90deg, rgba(15, 23, 41, 0.06) 25%, rgba(15, 23, 41, 0.12) 37%, rgba(15, 23, 41, 0.06) 63%);
    background-size: 400% 100%;
    animation: cx-shimmer 1.4s ease infinite;
}

.cx-skeleton-row:nth-child(2) { width: 85%; margin-left: auto; margin-right: auto; }
.cx-skeleton-row:nth-child(3) { width: 70%; margin-left: auto; margin-right: auto; }

@keyframes cx-spin {
    to { transform: rotate(360deg); }
}

@keyframes cx-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .cx-loading-spinner { animation-duration: 2s; }
    .cx-skeleton-row { animation: none; }
}


