/* Dashboard hero: data-driven action card */

#bbai-dashboard-main {
    --bbai-dashboard-section-gap: 24px;
    --bbai-dashboard-card-padding: 24px;
    --bbai-dashboard-card-radius: var(--bbai-card-radius, 16px);
    --bbai-dashboard-card-radius-sm: var(--bbai-radius-lg, 12px);
    --bbai-dashboard-card-border: rgba(148, 163, 184, 0.16);
    --bbai-dashboard-surface-bg: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    --bbai-dashboard-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 24px rgba(15, 23, 42, 0.04);
    --bbai-dashboard-card-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.035), 0 8px 18px rgba(15, 23, 42, 0.035);
    --bbai-dashboard-card-shadow-raised: 0 18px 38px rgba(15, 23, 42, 0.12), 0 6px 16px rgba(15, 23, 42, 0.08);
    --bbai-dashboard-card-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.88);
    --bbai-dashboard-button-height: var(--bbai-btn-height, 40px);
    --bbai-dashboard-button-radius: 8px;
    --bbai-dashboard-button-padding: 0 18px;
    --bbai-dashboard-button-font-size: var(--bbai-btn-font-size, 14px);
    --bbai-dashboard-button-font-weight: var(--bbai-font-semibold, 600);
    --bbai-dashboard-action-cta-min-width: 280px;
    --bbai-dashboard-button-shadow-secondary: 0 1px 2px rgba(15, 23, 42, 0.04);
    --bbai-dashboard-button-shadow-secondary-hover: 0 4px 10px rgba(15, 23, 42, 0.06);
    --bbai-dashboard-pill-shell-bg: rgba(248, 250, 252, 0.8);
    --bbai-dashboard-pill-shell-border: rgba(148, 163, 184, 0.16);
    --bbai-dashboard-support-color: #556579;
    --bbai-funnel-hero-column-gap: 22px;
    --bbai-funnel-hero-secondary-row-gap: 4px;
    --bbai-funnel-hero-donut-column-width: 170px;
    --bbai-funnel-hero-donut-label-width: 112px;
    --bbai-funnel-hero-max-width: 880px;
    --bbai-funnel-hero-content-width: 640px;
    --bbai-funnel-hero-content-flow-width: 520px;
    --bbai-funnel-hero-donut-size: 154px;
    --bbai-funnel-hero-donut-stroke: 12px;
    --bbai-funnel-hero-title-to-subtitle: 8px;
    --bbai-funnel-hero-subtitle-to-progress: 8px;
    --bbai-funnel-hero-subtitle-to-cta: 8px;
    --bbai-funnel-hero-progress-to-cta: 8px;
    --bbai-funnel-hero-secondary-gap: 5px;
    --bbai-funnel-hero-support-to-meta: 6px;
}

/* Anonymous trial: constrain dashboard width and add breathing room */
body:not(.bbai-dashboard--connected) .bbai-dashboard-shell #bbai-dashboard-main {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 24px 24px 40px !important;
}

.bbai-funnel-hero {
    width: 100%;
    margin-bottom: 12px;
}

.bbai-funnel-hero--hero-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--bbai-dashboard-surface-bg);
    border: 1px solid var(--bbai-dashboard-card-border);
    border-radius: var(--bbai-dashboard-card-radius);
    box-shadow: var(--bbai-dashboard-card-shadow);
    padding: 32px 24px 20px;
}

.bbai-funnel-hero--guest-preview.bbai-funnel-hero--hero-card,
.bbai-funnel-hero--trial-exhausted.bbai-funnel-hero--hero-card {
    background: var(--bbai-dashboard-surface-bg);
}

.bbai-funnel-hero--guest-preview .bbai-dashboard-hero-action__main,
.bbai-funnel-hero--trial-exhausted .bbai-dashboard-hero-action__main {
    row-gap: 10px;
}

.bbai-dashboard-hero-action {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.bbai-dashboard-hero-action__main {
    display: grid;
    grid-template-columns: var(--bbai-funnel-hero-donut-column-width) minmax(0, 1fr);
    grid-template-rows: minmax(var(--bbai-funnel-hero-donut-size), auto) auto;
    grid-template-areas:
        "visual primary"
        "label secondary";
    align-items: center;
    justify-content: center;
    column-gap: var(--bbai-funnel-hero-column-gap);
    row-gap: var(--bbai-funnel-hero-secondary-row-gap);
    width: min(100%, var(--bbai-funnel-hero-max-width));
    margin: 0 auto;
}

.bbai-dashboard-hero-action--transitioning {
    opacity: 0.98;
    transform: translateY(1px);
}

.bbai-dashboard-hero-action__status {
    grid-area: visual;
    align-self: stretch;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    gap: 0;
}

.bbai-dashboard-hero-action__donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.bbai-dashboard-hero-action__status-copy {
    grid-area: label;
    align-self: start;
    justify-self: center;
    display: grid;
    gap: 2px;
    max-width: var(--bbai-funnel-hero-donut-label-width);
    margin-top: 0;
    text-align: center;
}

.bbai-dashboard-hero-action__status-label,
.bbai-dashboard-hero-action__status-detail {
    margin: 0;
}

.bbai-dashboard-hero-action__status-label {
    font-size: 10px;
    line-height: 1.35;
    font-weight: 500;
    color: #64748b;
    opacity: 0.58;
}

.bbai-dashboard-hero-action__status-detail {
    font-size: 10px;
    line-height: 1.4;
    font-weight: 400;
    color: #64748b;
    opacity: 0.58;
}

.bbai-dashboard-hero-action__content {
    grid-area: primary;
    align-self: center;
    justify-self: start;
    min-width: 0;
    max-width: var(--bbai-funnel-hero-content-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    position: relative;
    isolation: isolate;
    padding: 0;
}

.bbai-dashboard-hero-action__content > * {
    position: relative;
    z-index: 1;
}

.bbai-dashboard-hero-action__content::before {
    content: '';
    position: absolute;
    left: calc((var(--bbai-funnel-hero-column-gap) / -2) - 1px);
    top: 50%;
    width: 1px;
    height: min(var(--bbai-funnel-hero-donut-size), 132px);
    transform: translateY(-50%);
    background: linear-gradient(
        180deg,
        rgba(148, 163, 184, 0) 0%,
        rgba(148, 163, 184, 0.08) 20%,
        rgba(148, 163, 184, 0.08) 80%,
        rgba(148, 163, 184, 0) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.bbai-dashboard-hero-action__footer {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__donut.bbai-command-donut--funnel {
    width: var(--bbai-funnel-hero-donut-size);
    height: var(--bbai-funnel-hero-donut-size);
    margin: 0;
    border-radius: 999px;
    position: relative;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.24s ease, box-shadow 0.24s ease;
}

.bbai-dashboard-hero-action__donut {
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
    will-change: transform;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__donut .bbai-command-donut__inner {
    position: absolute;
    inset: var(--bbai-funnel-hero-donut-stroke);
    border-radius: 999px;
    background: #ffffff;
}

.bbai-dashboard-hero-action__donut .bbai-command-donut__center {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    text-align: center;
}

.bbai-dashboard-hero-action__donut .bbai-command-donut__center-value {
    display: block;
    max-width: none;
    font-size: 36px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.bbai-dashboard-hero-action__donut .bbai-command-donut__center-label {
    margin-top: 4px;
    max-width: 9ch;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #94a3b8;
}

.bbai-dashboard-hero-action__donut .bbai-command-donut__center-label[hidden] {
    display: none;
}

.bbai-command-donut__center-value--neutral {
    color: #9aa8b8;
}

.bbai-command-donut__center-value--problem {
    color: #805112;
}

.bbai-command-donut__center-value--healthy {
    color: #08785c;
}

.bbai-command-donut__center-value--scanning,
.bbai-command-donut__center-value--fixing {
    color: #64748b;
}

.bbai-dashboard-hero-action__donut--idle {
    animation: bbai-dashboard-hero-idle 3.2s ease-in-out infinite;
}

.bbai-dashboard-hero-action__donut--complete-pulse {
    animation: bbai-dashboard-hero-complete-pulse 0.72s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-bbai-funnel-hero-state="scanning"] .bbai-dashboard-hero-action__donut {
    animation: bbai-dashboard-hero-scanning 1.8s ease-in-out infinite;
}

[data-bbai-funnel-hero-state="scanned_has_issues"] .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
[data-bbai-funnel-hero-state="logged_in_has_issues"] .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
.bbai-funnel-hero--guest-preview .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
.bbai-funnel-hero--trial-exhausted .bbai-dashboard-hero-action__donut.bbai-command-donut--problem {
    animation: bbai-dashboard-hero-missing-pulse 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s 1 both;
}

#bbai-dashboard-main[data-bbai-ui-state="SCANNING"] [data-bbai-funnel-hero-state="scanned_has_issues"] .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
#bbai-dashboard-main[data-bbai-ui-state="SCANNING"] [data-bbai-funnel-hero-state="logged_in_has_issues"] .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
#bbai-dashboard-main[data-bbai-ui-state="SCANNING"] .bbai-funnel-hero--guest-preview .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
#bbai-dashboard-main[data-bbai-ui-state="SCANNING"] .bbai-funnel-hero--trial-exhausted .bbai-dashboard-hero-action__donut.bbai-command-donut--problem {
    animation: bbai-dashboard-hero-missing-pulse 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s 1 both;
}

@keyframes bbai-dashboard-hero-idle {
    0%, 100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 0 0 0 rgba(148, 163, 184, 0.06);
    }
    50% {
        transform: scale(1.01);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18), 0 0 0 10px rgba(148, 163, 184, 0);
    }
}

@keyframes bbai-dashboard-hero-scanning {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes bbai-dashboard-hero-missing-pulse {
    0% {
        transform: scale(0.992);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 0 0 0 rgba(239, 68, 68, 0);
    }
    45% {
        transform: scale(1.01);
        box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18), 0 0 0 10px rgba(239, 68, 68, 0.06);
    }
    100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 0 0 16px rgba(239, 68, 68, 0);
    }
}

@keyframes bbai-dashboard-hero-complete-pulse {
    0% {
        transform: scale(1);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 0 0 0 rgba(34, 197, 94, 0);
    }
    50% {
        transform: scale(1.035);
        box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2), 0 0 0 14px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

#bbai-dashboard-main .bbai-dashboard-hero-action__title {
    margin: 0 0 var(--bbai-funnel-hero-title-to-subtitle);
    max-width: min(100%, 26ch);
    font-size: clamp(27px, 2.4vw, 32px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0;
    color: #0f172a;
}

.bbai-dashboard-hero-action__content-flow {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: var(--bbai-funnel-hero-content-flow-width);
}

#bbai-dashboard-main .bbai-dashboard-hero-action__description {
    margin: 0;
    max-width: none;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.bbai-dashboard-hero-action__cta-group {
    display: grid;
    justify-items: start;
    gap: 0;
    width: auto;
    max-width: 100%;
    margin-top: 0;
}

.bbai-dashboard-hero-action__progress-line[hidden] + .bbai-dashboard-hero-action__cta-group {
    margin-top: var(--bbai-funnel-hero-subtitle-to-cta);
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta-context {
    margin: var(--bbai-funnel-hero-subtitle-to-progress) 0 var(--bbai-funnel-hero-progress-to-cta);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0;
    color: #0f172a;
}

.bbai-dashboard-hero-action__actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    width: auto;
    max-width: 100%;
    margin-bottom: 0;
}

.bbai-dashboard-hero-action--exhausted-trial .bbai-dashboard-hero-action__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta,
#bbai-dashboard-main .bbai-dashboard-conversion-prompt__cta,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta,
#bbai-dashboard-main .bbai-dashboard-trial-preview__action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--bbai-dashboard-button-height);
    min-width: min(100%, var(--bbai-dashboard-action-cta-min-width));
    max-width: 100%;
    width: auto;
    padding: var(--bbai-dashboard-button-padding);
    border-radius: var(--bbai-dashboard-button-radius);
    font-size: var(--bbai-dashboard-button-font-size);
    font-weight: var(--bbai-dashboard-button-font-weight);
    line-height: 1.15;
    letter-spacing: 0;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta.bbai-btn,
#bbai-dashboard-main .bbai-dashboard-conversion-prompt__cta.bbai-btn,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta.bbai-btn,
#bbai-dashboard-main .bbai-dashboard-trial-preview__action.bbai-btn {
    min-height: 40px !important;
    padding: var(--bbai-dashboard-button-padding) !important;
    border-radius: var(--bbai-dashboard-button-radius) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta:focus-visible,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.34);
    outline-offset: 2px;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--primary {
    min-width: min(100%, var(--bbai-dashboard-action-cta-min-width));
    background: var(--bbai-admin-btn-primary-bg, var(--bbai-gradient-primary));
    border: 1px solid var(--bbai-admin-btn-primary-border, #10b981);
    box-shadow: var(--bbai-admin-btn-primary-shadow, 0 10px 24px rgba(16, 185, 129, 0.16));
    color: #ffffff;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta {
    min-width: 0;
    max-width: min(100%, 320px);
    width: fit-content;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary {
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary.bbai-btn-primary,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--primary.bbai-btn-primary {
    min-height: 40px !important;
    border-radius: var(--bbai-dashboard-button-radius) !important;
    box-shadow: var(--bbai-admin-btn-primary-shadow, 0 10px 24px rgba(16, 185, 129, 0.16)) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary.bbai-btn {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--secondary,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--secondary {
    min-width: 0;
    min-height: auto;
    display: inline-block;
    padding: 4px 6px;
    margin: -4px -6px;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-underline-offset: 2px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--secondary.bbai-btn-secondary,
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--secondary.bbai-btn-secondary {
    min-width: 0 !important;
    min-height: auto !important;
    padding: 4px 6px !important;
    margin: -4px -6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #374151 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    text-underline-offset: 2px;
}

.bbai-dashboard-hero-action__secondary {
    grid-area: secondary;
    align-self: start;
    justify-self: start;
    display: grid;
    gap: var(--bbai-funnel-hero-secondary-gap);
    align-content: start;
    justify-items: start;
    width: 100%;
    max-width: 26rem;
}

.bbai-dashboard-hero-action__secondary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}

.bbai-dashboard-hero-action__extras {
    display: grid;
    justify-items: start;
    width: min(100%, var(--bbai-funnel-hero-max-width));
    margin: 14px auto 0;
    padding-left: calc(var(--bbai-funnel-hero-donut-column-width) + var(--bbai-funnel-hero-column-gap));
}

#bbai-dashboard-main[data-bbai-has-connected-account="1"][data-bbai-is-guest-trial="0"] .bbai-dashboard-hero-action__extras {
    margin-top: 10px;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--primary:hover:not(:disabled):not(.is-loading) {
    background: var(--bbai-admin-color-primary-hover, #059669);
    border-color: var(--bbai-admin-color-primary-hover, #059669);
    box-shadow: 0 12px 26px rgba(16, 185, 129, 0.2), 0 4px 10px rgba(15, 23, 42, 0.08);
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary.bbai-btn-primary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--primary.bbai-btn-primary:hover:not(:disabled):not(.is-loading) {
    box-shadow: 0 12px 26px rgba(16, 185, 129, 0.2), 0 4px 10px rgba(15, 23, 42, 0.08) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--secondary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--secondary:hover:not(:disabled):not(.is-loading) {
    background: transparent;
    border-color: transparent;
    color: #111827;
    box-shadow: none;
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--secondary.bbai-btn-secondary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--secondary.bbai-btn-secondary:hover:not(:disabled):not(.is-loading) {
    border-color: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
    text-decoration: underline !important;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta:hover:not(:disabled):not(.is-loading) {
    transform: translateY(-1px);
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--secondary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--secondary:hover:not(:disabled):not(.is-loading) {
    transform: none;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta:active:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta:active:not(:disabled):not(.is-loading) {
    transform: translateY(0) scale(0.99);
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--secondary:active:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--secondary:active:not(:disabled):not(.is-loading) {
    transform: none;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary:active:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--primary:active:not(:disabled):not(.is-loading) {
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.12);
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta--primary.bbai-btn-primary:active:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta--primary.bbai-btn-primary:active:not(:disabled):not(.is-loading) {
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.12) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero-action__cta[disabled],
#bbai-dashboard-main .bbai-dashboard-locked-preview__cta[disabled] {
    pointer-events: none;
    opacity: 0.84;
}

#bbai-dashboard-main [data-action="show-dashboard-auth"].is-loading {
    cursor: progress;
    opacity: 0.92;
}

#bbai-dashboard-main [data-action="show-dashboard-auth"].is-opening {
    transform: scale(0.98);
}

#bbai-dashboard-main .bbai-dashboard-auth-label {
    display: inline-flex;
    align-items: center;
}

#bbai-dashboard-main .bbai-dashboard-auth-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.44);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: bbai-dashboard-auth-spin 0.72s linear infinite;
}

@keyframes bbai-dashboard-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.bbai-dashboard-credits {
    display: grid;
    gap: var(--bbai-funnel-hero-support-to-meta);
    max-width: 500px;
    margin-top: 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.bbai-dashboard-hero-action__extras .bbai-dashboard-credits {
    margin-top: 0;
}

.bbai-dashboard-hero-action__support {
    margin: 0;
    max-width: 26rem;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--bbai-dashboard-support-color);
}

.bbai-dashboard-credits--low .bbai-dashboard-credits__remaining {
    color: #b45309;
}

.bbai-dashboard-credits--low .bbai-dashboard-credits__progress {
    background: rgba(91, 110, 168, 0.14);
}

.bbai-dashboard-credits--low .bbai-dashboard-credits__progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6274b8 100%);
}

.bbai-dashboard-credits--exhausted .bbai-dashboard-credits__remaining {
    color: #4c5f9f;
}

.bbai-dashboard-credits--exhausted .bbai-dashboard-credits__progress {
    background: rgba(91, 110, 168, 0.16);
}

.bbai-dashboard-credits--exhausted .bbai-dashboard-credits__progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6a6fd1 100%);
}

.bbai-dashboard-credits__remaining {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 700;
    color: #0f172a;
}

.bbai-dashboard-credits__progress {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.bbai-dashboard-credits__progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    transition: width 0.28s ease;
}

.bbai-dashboard-credits__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.bbai-dashboard-credits__activity {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    color: #475569;
}

.bbai-dashboard-credits__usage,
.bbai-dashboard-credits__comparison,
.bbai-dashboard-credits__upgrade {
    font-size: 13px;
    line-height: 1.5;
    color: #556579;
}

.bbai-dashboard-credits__usage {
    font-weight: 700;
    color: #0f172a;
}

.bbai-dashboard-credits__upgrade {
    font-weight: 700;
    color: #15803d;
    text-decoration: none;
}

.bbai-dashboard-credits__upgrade:hover,
.bbai-dashboard-credits__upgrade:focus-visible {
    color: #166534;
    text-decoration: underline;
}

/* Guest trial: near-limit / exhausted (non-hero-card) conversion as viewport modal over blurred dashboard. */
.bbai-guest-conversion-modal {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.bbai-guest-conversion-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bbai-guest-conversion-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(560px, 100%);
    filter: none;
}

#bbai-guest-conversion-modal .bbai-dashboard-conversion-prompt {
    margin-top: 0;
    max-width: none;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

body.bbai-guest-conversion-modal-open {
    overflow: hidden;
}

.bbai-dashboard-conversion-prompt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    background: rgba(248, 250, 252, 0.92);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.bbai-dashboard-conversion-prompt--low {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.bbai-dashboard-conversion-prompt--exhausted {
    border-color: rgba(251, 146, 60, 0.26);
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.98) 0%, rgba(255, 255, 255, 0.97) 100%);
}

.bbai-dashboard-conversion-prompt__copy-wrap {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.bbai-dashboard-conversion-prompt__title,
.bbai-dashboard-conversion-prompt__copy,
.bbai-dashboard-conversion-prompt__note {
    margin: 0;
}

.bbai-dashboard-conversion-prompt__title {
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
    color: #0f172a;
}

.bbai-dashboard-conversion-prompt__copy {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.bbai-dashboard-conversion-prompt__note {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
    color: #64748b;
}

.bbai-dashboard-conversion-prompt__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.bbai-dashboard-conversion-prompt__cta {
    white-space: nowrap;
}

.bbai-dashboard-hero-action__microcopy {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.bbai-dashboard-hero-action__microcopy-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #556579;
    white-space: nowrap;
}

.bbai-dashboard-hero-action__microcopy-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 18px;
}

.bbai-header--trial-funnel {
    padding: 12px 24px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.bbai-header--trial-funnel .bbai-header-content {
    max-width: 1280px;
    align-items: center;
    gap: 16px;
}

.bbai-header--trial-funnel .bbai-logo {
    gap: 10px;
}

.bbai-header--trial-funnel .bbai-logo-icon {
    width: 34px;
    height: 34px;
}

.bbai-header--trial-funnel .bbai-logo-tagline {
    display: none;
}

.bbai-header--trial-funnel .bbai-logo-text {
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 0;
}

.bbai-header--trial-funnel .bbai-header-actions {
    margin-left: auto;
    align-items: center;
    gap: 12px;
    display: flex;
    flex-wrap: nowrap;
}

.bbai-header--trial-funnel .bbai-header-actions > * {
    flex-shrink: 0;
}

.bbai-header-trial-credits {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: 0;
    color: rgba(248, 250, 252, 0.9);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.bbai-header-trial-credits::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

.bbai-header-trial-credits--default {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.bbai-header-trial-credits--low {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(248, 250, 252, 0.9);
}

.bbai-header-trial-credits--low::before {
    content: none;
}

.bbai-header-trial-credits--exhausted {
    background: rgba(91, 110, 168, 0.16);
    border: 1px solid rgba(98, 116, 184, 0.32);
    color: #d9def5;
}

.bbai-header-trial-credits--exhausted::before {
    background: #6274b8;
    opacity: 0.9;
}

.bbai-header-trial-credits__value {
    color: #ffffff;
    font-weight: 700;
}

.bbai-header-trial-credits__cta {
    color: #ffffff;
    opacity: 0.92;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.35);
}

.bbai-header--trial-funnel .bbai-header-upgrade-btn,
.bbai-header--trial-funnel a.bbai-header-upgrade-btn,
.bbai-header--trial-funnel .bbai-header-login-btn,
.bbai-header--trial-funnel a.bbai-header-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px !important;
    border-radius: 11px !important;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.bbai-header--trial-funnel .bbai-header-upgrade-btn,
.bbai-header--trial-funnel a.bbai-header-upgrade-btn {
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(2, 8, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.bbai-header--trial-funnel .bbai-header-login-btn,
.bbai-header--trial-funnel a.bbai-header-login-btn {
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(248, 250, 252, 0.88) !important;
    box-shadow: none !important;
}

.bbai-header--trial-funnel .bbai-header-login-btn svg,
.bbai-header--trial-funnel a.bbai-header-login-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.84;
}

.bbai-header--trial-funnel .bbai-header-upgrade-btn:hover,
.bbai-header--trial-funnel a.bbai-header-upgrade-btn:hover {
    transform: translateY(-1px);
    background: #12c08d !important;
    border-color: rgba(52, 211, 153, 0.42) !important;
    box-shadow: 0 4px 10px rgba(2, 8, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.bbai-header--trial-funnel .bbai-header-login-btn:hover,
.bbai-header--trial-funnel a.bbai-header-login-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.bbai-header--trial-funnel .bbai-header-upgrade-btn:focus-visible,
.bbai-header--trial-funnel a.bbai-header-upgrade-btn:focus-visible,
.bbai-header--trial-funnel .bbai-header-login-btn:focus-visible,
.bbai-header--trial-funnel a.bbai-header-login-btn:focus-visible,
.bbai-header--trial-funnel .bbai-header-trial-credits:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.24);
    outline-offset: 2px;
}

.bbai-header--trial-funnel .bbai-header-trial-credits:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* ── Top navbar actions: premium contrast + hierarchy ────────────────────── */
.bbai-header--trial-funnel .bbai-header-guide-link,
.bbai-header--trial-funnel .bbai-header-trial-credits {
    height: 40px;
    min-height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* Help = ghost secondary */
.bbai-header--trial-funnel .bbai-header-guide-link {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bbai-header--trial-funnel .bbai-header-guide-link svg,
.bbai-header--trial-funnel .bbai-header-guide-link .bbai-header-guide-text {
    color: rgba(255, 255, 255, 0.82);
}

.bbai-header--trial-funnel .bbai-header-guide-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateY(-1px);
}

.bbai-header--trial-funnel .bbai-header-guide-link:hover svg,
.bbai-header--trial-funnel .bbai-header-guide-link:hover .bbai-header-guide-text {
    color: #ffffff;
}

/* Credits pill (trial exhausted) = primary monetisation CTA */
.bbai-header--trial-funnel .bbai-header-trial-credits {
    padding: 8px 18px;
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: #10b981;
    color: #ffffff;
    font-weight: 700;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.bbai-header--trial-funnel .bbai-header-trial-credits:hover {
    background: #059669;
    border-color: rgba(16, 185, 129, 0.65);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.24);
}

.bbai-header--trial-funnel .bbai-header-trial-credits:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}

.bbai-header--trial-funnel .bbai-header-guide-link:focus-visible,
.bbai-header--trial-funnel .bbai-header-trial-credits:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

.bbai-dashboard-trial-preview {
    margin: 0 0 var(--bbai-dashboard-section-gap);
    padding: var(--bbai-dashboard-card-padding);
    border: 1px solid var(--bbai-dashboard-card-border);
    border-radius: var(--bbai-dashboard-card-radius);
    background: #ffffff;
    box-shadow: var(--bbai-dashboard-card-shadow-soft);
}

.bbai-dashboard-trial-preview--guest-locked {
    margin-top: 24px;
}

/* Exhausted guest: real library cards under blur + centered conversion card (design reference). */
.bbai-dashboard-trial-preview--exhausted {
    isolation: isolate;
}

.bbai-dashboard-trial-preview--exhausted .bbai-dashboard-locked-preview__header {
    margin-bottom: 12px;
}

.bbai-dashboard-trial-preview__shell.bbai-dashboard-locked-preview__shell {
    min-height: 300px;
}

.bbai-dashboard-trial-preview--exhausted .bbai-dashboard-trial-preview__shell.bbai-dashboard-locked-preview__shell {
    max-height: 320px;
    min-height: 320px;
    overflow: hidden;
}

@media (max-width: 960px) {
    .bbai-dashboard-trial-preview--exhausted .bbai-dashboard-trial-preview__shell.bbai-dashboard-locked-preview__shell {
        max-height: 260px;
        min-height: 260px;
    }
    .bbai-dashboard-trial-preview--exhausted .bbai-dashboard-locked-preview__overlay {
        padding: 18px 16px;
    }
    .bbai-dashboard-trial-preview--exhausted .bbai-dashboard-locked-preview__overlay-card {
        padding: 18px;
    }
}

.bbai-dashboard-trial-preview__blur-wrap {
    position: relative;
    z-index: 0;
    display: grid;
    gap: 10px;
    padding: 10px 8px 12px;
    /* Soft lock: keep preview visible (intentional, not "broken"). */
    filter: blur(3px);
    opacity: 0.68;
    pointer-events: none;
    user-select: none;
    transform: scale(0.992);
    transform-origin: center top;
    width: 100%;
    height: 100%;
}

.bbai-dashboard-trial-preview--trial-available .bbai-dashboard-trial-preview__blur-wrap {
    filter: none;
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
    transform: none;
}

.bbai-dashboard-trial-preview__blur-header {
    display: grid;
    gap: 4px;
}

.bbai-dashboard-trial-preview__title--in-blur {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.bbai-dashboard-trial-preview__description--in-blur {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.bbai-dashboard-trial-preview__more--in-blur {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.bbai-dashboard-hero-action--exhausted-trial .bbai-dashboard-hero-action__content {
    gap: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-action--exhausted-trial .bbai-dashboard-hero-action__description {
    max-width: 28rem;
}

.bbai-dashboard-locked-preview-stack {
    display: grid;
    gap: var(--bbai-dashboard-section-gap);
    margin: 0 0 var(--bbai-dashboard-section-gap);
}

.bbai-dashboard-locked-preview {
    margin: 0;
    padding: 24px;
    border: 1px solid var(--bbai-dashboard-card-border);
    border-radius: inherit;
    background: var(--bbai-dashboard-surface-bg);
    box-shadow: var(--bbai-dashboard-card-shadow-soft);
    isolation: isolate;
    position: relative;
    overflow: hidden;
}

.bbai-dashboard-locked-preview__header {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.bbai-dashboard-locked-preview__title,
.bbai-dashboard-locked-preview__description,
.bbai-dashboard-locked-preview__overlay-title,
.bbai-dashboard-locked-preview__overlay-copy {
    margin: 0;
}

.bbai-dashboard-locked-preview__title {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
    color: #1e293b;
}

.bbai-dashboard-locked-preview__description {
    max-width: 28rem;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.bbai-dashboard-locked-preview__shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 320px;
    border-radius: var(--bbai-dashboard-card-radius-sm);
    border: 1px solid rgba(226, 232, 240, 0.96);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: var(--bbai-dashboard-card-shadow-inset), inset 0 -10px 18px rgba(248, 250, 252, 0.18);
}

.bbai-dashboard-locked-preview__mock {
    position: relative;
    z-index: 0;
    display: grid;
    gap: 8px;
    padding: 8px;
    pointer-events: none;
    user-select: none;
    filter: blur(2px);
    opacity: 0.78;
    transform: scale(0.995);
    transform-origin: center top;
}

.bbai-dashboard-locked-preview__row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--bbai-dashboard-card-radius-sm);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.bbai-dashboard-locked-preview__thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.bbai-dashboard-locked-preview__content {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.bbai-dashboard-locked-preview__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.bbai-dashboard-locked-preview__filename {
    display: block;
    width: min(34%, 160px);
    height: 11px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
}

.bbai-dashboard-locked-preview__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.bbai-dashboard-locked-preview__badge--missing {
    background: rgba(254, 242, 242, 0.95);
    color: #b91c1c;
}

.bbai-dashboard-locked-preview__badge--review {
    background: rgba(255, 247, 237, 0.96);
    color: #c2410c;
}

.bbai-dashboard-locked-preview__badge--optimized {
    background: rgba(240, 253, 244, 0.96);
    color: #166534;
}

.bbai-dashboard-locked-preview__alt-lines {
    display: grid;
    gap: 5px;
}

.bbai-dashboard-locked-preview__line {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
}

.bbai-dashboard-locked-preview__line--wide {
    width: 88%;
}

.bbai-dashboard-locked-preview__line--mid {
    width: 62%;
}

.bbai-dashboard-locked-preview__fade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.42) 42%, rgba(255, 255, 255, 0.84) 100%),
        radial-gradient(circle at center, rgba(255, 255, 255, 0) 18%, rgba(248, 250, 252, 0.18) 100%);
    box-shadow: inset 0 -10px 20px rgba(255, 255, 255, 0.24);
    z-index: 1;
    pointer-events: none;
}

/* Guest preview: keep it crisp-ish (no heavy blur), use dim + gradient instead. */
.bbai-dashboard-trial-preview--guest-locked .bbai-dashboard-locked-preview__fade {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.92) 100%),
        radial-gradient(circle at 48% 28%, rgba(255, 255, 255, 0.02) 0%, rgba(248, 250, 252, 0.22) 100%);
    box-shadow: inset 0 -12px 20px rgba(255, 255, 255, 0.26);
}

.bbai-dashboard-trial-preview__waiting-label {
    position: absolute;
    top: 16px;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    color: #334155;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

/* Conversion card: centered over blurred mock (design reference) */
.bbai-dashboard-locked-preview__overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    pointer-events: auto;
    padding-top: 12vh;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    filter: none;
}

.bbai-dashboard-locked-preview__overlay-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 30;
    display: block;
    padding: 28px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
    text-align: center;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    filter: none;
    transform: translateY(-4px);
    animation: bbaiModalIn 180ms ease-out;
}

#bbai-dashboard-main,
.bbai-dashboard-body {
    transform: none !important;
}

/* Premium modal entry */
@keyframes bbaiModalIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bbai-modal-card {
    animation: bbaiModalIn 0.25s ease;
}

/* Modal rhythm + CTA interaction polish */
.bbai-modal-card h2,
.bbai-modal-card h3 {
    margin-bottom: 10px;
}

.bbai-modal-card p {
    margin-bottom: 18px;
}

.bbai-modal-primary {
    margin-top: 10px;
    margin-bottom: 18px;
    transition: all 0.2s ease;
}

.bbai-modal-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.bbai-modal-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.bbai-modal-secondary {
    margin-bottom: 10px;
}

.bbai-modal-meta {
    margin-bottom: 16px;
    opacity: 0.75;
    font-weight: 500;
    font-size: 13px;
}

.bbai-modal-login {
    margin-top: 6px;
}

/* Trial-complete: small reassurance line under primary CTA */
#bbai-dashboard-main .bbai-guest-hero__cta-hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    color: #64748b;
    text-align: left;
}

#bbai-dashboard-main .bbai-guest-hero__secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 6px;
    opacity: 0.9;
}

/* Subtle donut value animation on load (guest funnel) */
@keyframes bbaiFunnelDonutEnter {
    from { opacity: 0; transform: translateY(3px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#bbai-dashboard-main [data-bbai-funnel-hero] [data-bbai-funnel-donut-value] {
    animation: bbaiFunnelDonutEnter 420ms ease-out both;
}

.bbai-dashboard-locked-preview__overlay-title {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0 0 8px;
}

.bbai-dashboard-locked-preview__overlay-card h3 {
    margin-bottom: 8px;
}

.bbai-dashboard-locked-preview__overlay-copy {
    margin-top: 8px;
    font-size: 15px;
    color: #475569;
}

.bbai-dashboard-locked-preview__overlay-subtext {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: #64748b;
}

.bbai-dashboard-locked-preview__overlay-copy {
    max-width: 22rem;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    margin: 0 0 12px;
}

.bbai-dashboard-locked-preview__actions {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 16px;
}

.bbai-dashboard-locked-preview__subtext {
    margin: -8px 0 0;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    color: #64748b;
    text-align: center;
}

.bbai-dashboard-locked-preview__microcopy {
    margin: -8px 0 0;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    opacity: 0.7;
}

/* Donut label micro-improvement for completion state */
#bbai-dashboard-main [data-bbai-funnel-donut-label] {
    opacity: 0.7;
    font-size: 13px;
    font-weight: 600;
}

/* Passive hero link for the final completion state */
#bbai-dashboard-main .bbai-secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(248, 250, 252, 0.55);
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

#bbai-dashboard-main .bbai-secondary-link:hover,
#bbai-dashboard-main .bbai-secondary-link:focus-visible {
    background: rgba(248, 250, 252, 0.85);
    border-color: rgba(100, 116, 139, 0.36);
    color: #0f172a;
    text-decoration: none;
}

.bbai-dashboard-locked-preview__cta {
    min-width: min(100%, var(--bbai-dashboard-action-cta-min-width));
    display: block;
    width: 100%;
    margin-top: 16px;
}

.bbai-dashboard-locked-preview__overlay-card .bbai-dashboard-locked-preview__cta {
    width: 100%;
    max-width: 340px;
    min-height: 48px;
    background: #10b981;
    color: #fff;
    border-radius: 12px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 1;
    visibility: visible;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.bbai-dashboard-locked-preview__overlay-card .bbai-dashboard-locked-preview__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}

.bbai-dashboard-locked-preview__subtext {
    margin-top: 12px;
    font-size: 14px;
    color: #64748b;
}

.bbai-dashboard-locked-preview__microcopy {
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.bbai-dashboard-locked-preview__signin {
    margin-top: 12px;
    font-size: 14px;
    color: #64748b;
}

.bbai-dashboard-locked-preview__cta--primary {
    min-width: min(100%, var(--bbai-dashboard-action-cta-min-width));
}

.bbai-dashboard-locked-preview__overlay-card .bbai-dashboard-locked-preview__cta {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbai-dashboard-locked-preview__signin {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
    color: #64748b;
}

.bbai-dashboard-trial-preview--exhausted .bbai-dashboard-locked-preview__signin {
    margin-top: -6px;
}

.bbai-dashboard-locked-preview__trust {
    margin: -2px 0 0;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    color: #64748b;
}

.bbai-dashboard-locked-preview__signin-link {
    color: #0f766e;
    font-weight: 600;
    text-decoration: none;
}

.bbai-dashboard-locked-preview__signin-link:hover,
.bbai-dashboard-locked-preview__signin-link:focus-visible {
    color: #065f46;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bbai-dashboard-locked-preview__benefits {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    width: min(100%, 440px);
}

.bbai-dashboard-locked-preview__benefits--conversion {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    justify-items: start;
    text-align: left;
}

.bbai-dashboard-locked-preview__benefits--conversion .bbai-dashboard-locked-preview__benefit:nth-child(3) {
    grid-column: auto;
    justify-self: start;
    text-align: left;
}

.bbai-dashboard-locked-preview__benefit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #475569;
}

.bbai-dashboard-locked-preview__benefit-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 16px;
}

.bbai-trust-grid,
.bbai-dashboard-value-strip,
.bbai-benefits-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 0;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--bbai-dashboard-card-radius-sm);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.bbai-trust-grid__item,
.bbai-dashboard-value-strip__item,
.bbai-benefit-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-width: 0;
    min-height: 56px;
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    text-align: left;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bbai-trust-grid__item:hover,
.bbai-dashboard-value-strip__item:hover,
.bbai-benefit-item:hover {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.bbai-trust-grid__icon,
.bbai-dashboard-value-strip__icon,
.bbai-benefit-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 20px;
}

.bbai-trust-grid__text,
.bbai-benefit-text {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
    white-space: normal;
}

.bbai-dashboard-trial-preview__copy {
    display: grid;
    gap: 12px;
}

.bbai-dashboard-trial-preview__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.bbai-dashboard-trial-preview__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0;
    color: #0f172a;
}

.bbai-dashboard-trial-preview__description {
    margin: 0;
    max-width: 44rem;
    font-size: 14px;
    line-height: 1.55;
    color: #556579;
}

.bbai-dashboard-trial-preview__more {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.bbai-dashboard-trial-preview__list {
    display: grid;
    gap: 12px;
}

.bbai-dashboard-trial-preview__row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--bbai-dashboard-card-radius-sm);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bbai-dashboard-trial-preview__row:hover,
.bbai-dashboard-trial-preview__row:focus-within {
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.bbai-dashboard-trial-preview__media {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.bbai-dashboard-trial-preview__thumb-button,
.bbai-dashboard-trial-preview__thumb-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 14px;
}

.bbai-dashboard-trial-preview__thumb-button {
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
}

.bbai-dashboard-trial-preview__thumb-button .bbai-library-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.bbai-dashboard-trial-preview__thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #64748b;
}

.bbai-dashboard-trial-preview__main {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.bbai-dashboard-trial-preview__row .bbai-library-card__filename {
    font-size: 15px;
    line-height: 1.45;
}

.bbai-dashboard-trial-preview__row .bbai-library-card__meta {
    font-size: 13px;
    line-height: 1.5;
}

.bbai-dashboard-trial-preview__status .bbai-library-status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bbai-dashboard-trial-preview__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.bbai-dashboard-trial-preview__row-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 120px;
}

#bbai-dashboard-main .bbai-dashboard-trial-preview__action {
    min-width: 116px;
    padding: 0 14px;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.bbai-dashboard-trial-preview__action:hover:not(:disabled):not(.is-loading) {
    transform: translateY(-1px);
}

.bbai-dashboard-trial-preview__action--generate {
    background: rgba(240, 253, 244, 0.98);
    border-color: rgba(34, 197, 94, 0.28);
    color: #166534;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.04);
}

.bbai-dashboard-trial-preview__action--review {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.28);
    color: #0f172a;
}

.bbai-dashboard-trial-preview__action--done {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.bbai-dashboard-trial-preview__action--locked {
    background: #fff7ed;
    border-color: rgba(249, 115, 22, 0.22);
    color: #c2410c;
}

.bbai-dashboard-trial-preview__action.is-loading {
    cursor: progress;
}

.bbai-dashboard-trial-preview__alt .bbai-alt-text-preview,
.bbai-dashboard-trial-preview__alt .bbai-alt-text-missing {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.bbai-dashboard-trial-preview__alt .bbai-library-alt-preview-card {
    min-height: 80px;
    padding: 16px;
    border-radius: 14px;
    border-color: rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.bbai-dashboard-trial-preview__empty {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: #556579;
}

.bbai-dashboard-trial-preview__empty-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #0f172a;
}

.bbai-dashboard-trial-preview__empty-copy {
    margin: 8px 0 0;
}

.bbai-dashboard-feedback {
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--bbai-dashboard-card-radius-sm);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
    animation: bbai-dashboard-feedback-in 0.2s ease-out;
}

.bbai-dashboard-feedback:not([hidden]) {
    display: block;
}

.bbai-dashboard-feedback--success {
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.98) 0%, #ffffff 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.bbai-dashboard-feedback--info {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, #ffffff 100%);
}

.bbai-dashboard-feedback--warning {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98) 0%, #ffffff 100%);
    border-color: rgba(245, 158, 11, 0.22);
}

.bbai-dashboard-feedback--error {
    background: linear-gradient(180deg, rgba(255, 241, 242, 0.98) 0%, #ffffff 100%);
    border-color: rgba(244, 63, 94, 0.2);
}

.bbai-dashboard-feedback__title {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.bbai-dashboard-feedback__detail {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
}

@keyframes bbai-dashboard-feedback-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    #bbai-dashboard-main {
        --bbai-funnel-hero-donut-size: 152px;
        --bbai-funnel-hero-donut-stroke: 12px;
    }

    .bbai-funnel-hero--hero-card {
        padding: 20px 24px;
    }

    .bbai-dashboard-hero-action__main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "visual"
            "label"
            "primary"
            "secondary";
        align-items: stretch;
        row-gap: 8px;
        column-gap: 0;
        justify-content: normal;
        width: 100%;
    }

    .bbai-funnel-hero--guest-preview .bbai-dashboard-hero-action__main,
    .bbai-funnel-hero--trial-exhausted .bbai-dashboard-hero-action__main {
        row-gap: 10px;
    }

    .bbai-dashboard-hero-action__status {
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .bbai-dashboard-hero-action__donut-wrap {
        justify-content: center;
    }

    .bbai-dashboard-hero-action__status-copy {
        text-align: center;
    }

    .bbai-dashboard-hero-action__content {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
        text-align: left;
    }

    .bbai-dashboard-hero-action__content::before {
        display: none;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-action__title {
        max-width: none;
    }

    .bbai-dashboard-hero-action__cta-group {
        justify-items: start;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .bbai-dashboard-hero-action__actions {
        justify-content: flex-start;
    }

    .bbai-dashboard-hero-action__support {
        max-width: none;
        text-align: left;
    }

    .bbai-dashboard-hero-action__secondary {
        width: 100%;
        max-width: none;
        justify-items: start;
    }

    .bbai-dashboard-hero-action__extras {
        width: 100%;
        margin-top: 14px;
        padding-left: 0;
    }

    .bbai-dashboard-credits {
        max-width: none;
    }

    .bbai-dashboard-credits__meta {
        justify-content: flex-start;
    }

    .bbai-dashboard-conversion-prompt {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .bbai-dashboard-hero-action__microcopy {
        justify-content: flex-start;
    }

    .bbai-header--trial-funnel .bbai-header-content {
        flex-wrap: wrap;
        gap: 12px;
    }

    .bbai-header--trial-funnel .bbai-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .bbai-dashboard-trial-preview__header {
        flex-direction: column;
    }

    .bbai-dashboard-locked-preview__overlay-card {
        width: min(100%, 420px);
    }

    .bbai-dashboard-locked-preview__actions,
    .bbai-dashboard-locked-preview__benefits:not(.bbai-dashboard-locked-preview__benefits--conversion) {
        justify-content: center;
        justify-items: center;
    }

    .bbai-dashboard-locked-preview__benefits--conversion {
        justify-items: start;
    }

    .bbai-dashboard-locked-preview__benefits--conversion .bbai-dashboard-locked-preview__benefit:nth-child(3) {
        justify-self: center;
    }

    .bbai-trust-grid,
    .bbai-dashboard-value-strip,
    .bbai-benefits-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bbai-dashboard-trial-preview__body {
        grid-template-columns: 1fr;
    }

    .bbai-dashboard-trial-preview__row-action {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    #bbai-dashboard-main {
        --bbai-funnel-hero-donut-size: 146px;
        --bbai-funnel-hero-donut-stroke: 12px;
    }

    .bbai-funnel-hero--hero-card {
        padding: 20px;
    }

    .bbai-dashboard-hero-action__donut .bbai-command-donut__center-value {
        font-size: 30px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-action__title {
        font-size: clamp(24px, 9vw, 28px);
    }

    #bbai-dashboard-main .bbai-dashboard-hero-action__description {
        font-size: 14px;
    }

    .bbai-dashboard-hero-action__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .bbai-dashboard-hero-action__cta-group {
        width: 100%;
    }

    .bbai-dashboard-hero-action__footer {
        margin-top: 0;
        padding-top: 0;
    }

    #bbai-dashboard-main .bbai-dashboard-conversion-prompt__cta,
    #bbai-dashboard-main .bbai-dashboard-trial-preview__action {
        width: 100%;
        min-width: 0;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-action__cta {
        width: fit-content;
        min-width: 0;
        max-width: 100%;
    }

    .bbai-dashboard-hero-action__microcopy {
        flex-direction: column;
        align-items: flex-start;
    }

    .bbai-trust-grid,
    .bbai-dashboard-value-strip,
    .bbai-benefits-row {
        grid-template-columns: 1fr;
    }

    .bbai-trust-grid,
    .bbai-dashboard-value-strip,
    .bbai-benefits-row {
        padding: 6px;
    }

    .bbai-trust-grid__item,
    .bbai-dashboard-value-strip__item,
    .bbai-benefit-item {
        justify-content: flex-start;
        text-align: left;
    }

    .bbai-trust-grid__text,
    .bbai-benefit-text {
        white-space: normal;
    }

    .bbai-header--trial-funnel .bbai-header-actions {
        align-items: stretch;
    }

    .bbai-header-trial-credits {
        width: 100%;
        justify-content: flex-start;
    }

    .bbai-dashboard-trial-preview {
        padding: 16px;
    }

    .bbai-dashboard-locked-preview {
        padding: 16px;
    }

    .bbai-dashboard-locked-preview__shell {
        min-height: 336px;
    }

    .bbai-dashboard-locked-preview__overlay {
        padding: 12px;
    }

    .bbai-dashboard-locked-preview__overlay-card {
        width: 100%;
        padding: 20px 18px;
    }

    .bbai-dashboard-locked-preview__benefits--conversion {
        grid-template-columns: 1fr;
    }

    .bbai-dashboard-locked-preview__benefits--conversion .bbai-dashboard-locked-preview__benefit:nth-child(3) {
        justify-self: start;
        text-align: left;
    }

    .bbai-dashboard-locked-preview__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-dashboard-locked-preview__benefits {
        width: 100%;
    }

    #bbai-dashboard-main .bbai-dashboard-locked-preview__cta {
        width: 100%;
        min-width: 0;
    }

    .bbai-dashboard-locked-preview__row {
        grid-template-columns: 1fr;
    }

    .bbai-dashboard-locked-preview__thumb {
        width: 64px;
        height: 64px;
    }

    .bbai-dashboard-trial-preview__row {
        grid-template-columns: 1fr;
    }

    .bbai-dashboard-trial-preview__media {
        justify-content: flex-start;
    }

}

@media (prefers-reduced-motion: reduce) {
    #bbai-dashboard-main [data-action="show-dashboard-auth"].is-opening {
        transform: none;
    }

    #bbai-dashboard-main .bbai-dashboard-auth-spinner {
        animation: none;
    }

    .bbai-dashboard-hero-action__donut,
    .bbai-dashboard-hero-action__donut--idle,
    .bbai-dashboard-hero-action__donut--complete-pulse,
    [data-bbai-funnel-hero-state="scanning"] .bbai-dashboard-hero-action__donut,
    [data-bbai-funnel-hero-state="scanned_has_issues"] .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
    .bbai-funnel-hero--guest-preview .bbai-dashboard-hero-action__donut.bbai-command-donut--problem,
    .bbai-funnel-hero--trial-exhausted .bbai-dashboard-hero-action__donut.bbai-command-donut--problem {
        animation: none;
    }
}

/* ─── Guest: top bar conversion + preview stats (locked funnel) ─── */
.bbai-header--trial-funnel .bbai-header-guest-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.bbai-header-guest-cta__primary {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.bbai-header-guest-cta__secondary {
    margin: 0;
    padding: 6px 4px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.92);
    background: transparent;
    border: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bbai-header-guest-cta__secondary:hover {
    color: #fff;
}

.bbai-dashboard-status-card--guest-preview {
    opacity: 0.97;
}

.bbai-dashboard-status-card--guest-preview .bbai-filter-group--filter .bbai-filter-group__item {
    cursor: default;
}

.bbai-dashboard-status-card--guest-preview .bbai-filter-group--filter .bbai-filter-group__item[disabled] {
    opacity: 0.75;
    pointer-events: none;
}

.bbai-dashboard-locked-preview__overlay-context {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

/* Logged-out ALT Library preview lock: keep overlay inside the preview card. */
.bbai-dashboard-trial-preview--locked-library .bbai-dashboard-trial-preview__shell.bbai-dashboard-locked-preview__shell,
.bbai-dashboard-trial-preview--guest-locked .bbai-dashboard-trial-preview__shell.bbai-dashboard-locked-preview__shell {
    min-height: 360px;
    max-height: 520px;
    overflow: hidden;
}

.bbai-dashboard-trial-preview--locked-library .bbai-dashboard-trial-preview__blur-wrap,
.bbai-dashboard-trial-preview--guest-locked .bbai-dashboard-trial-preview__blur-wrap {
    filter: blur(5px);
    opacity: 0.54;
    pointer-events: none;
    user-select: none;
    transform: scale(0.99);
}

.bbai-dashboard-trial-preview--locked-library .bbai-dashboard-locked-preview__overlay,
.bbai-dashboard-trial-preview--guest-locked .bbai-dashboard-locked-preview__overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(248, 250, 252, 0.76) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.bbai-dashboard-trial-preview--locked-library .bbai-dashboard-locked-preview__overlay-card,
.bbai-dashboard-trial-preview--guest-locked .bbai-dashboard-locked-preview__overlay-card {
    max-width: 390px;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    transform: none;
}

.bbai-dashboard-trial-preview--locked-library .bbai-dashboard-locked-preview__benefits,
.bbai-dashboard-trial-preview--locked-library .bbai-dashboard-locked-preview__waiting-label {
    display: none;
}
