/**
 * Logged-in Dashboard State System
 *
 * Styles for the authenticated-user dashboard:
 * hero, donut, stat strip (pills + usage bar), and surface shells.
 *
 * RULES
 * ─────
 * • Uses --bbai-* design tokens from bbai-admin-foundation-tokens.css where available.
 * • Falls back to literal values so this file works standalone.
 * • No marketing-page visual styles. This is a control panel.
 * • Animation is limited to the PROCESSING donut sweep and CTA busy state.
 *
 * @package BeepBeep_AI
 * @since   5.2.0
 */

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT WRAPPER
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--section-spacing, 24px);
    margin-top: 0;
}

/* Logged-in shell (hero + stat strip + surface) — same vertical rhythm as other plugin pages */
.bbai-logged-in-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--section-spacing, 18px);
    margin-top: 0;

    /* Inline token fallbacks — ensure these resolve even without global token sheet */
    --bbai-brand:          #2563eb;
    --bbai-border:         #d1d5db;
    --bbai-border-subtle:  #e5e7eb;
    --bbai-surface-subtle: #f9fafb;
    --bbai-text-primary:   #111827;
    --bbai-text-secondary: #374151;
    --bbai-text-muted:     #6b7280;
}

/* ── WP admin resets ────────────────────────────────────────────────────────
   WordPress admin.css adds margins/padding/sizes to h1-h3, p, ul, li, a,
   and box-shadows to certain block elements. Scope resets to our namespace.
───────────────────────────────────────────────────────────────────────────── */

/* The outer <section> element */
section.bbai-logged-in-dashboard {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    margin-top: 0;
}

.bbai-logged-in-dashboard *,
.bbai-logged-in-dashboard *::before,
.bbai-logged-in-dashboard *::after {
    box-sizing: border-box;
}

.bbai-logged-in-dashboard h2,
.bbai-logged-in-dashboard h3,
.bbai-logged-in-dashboard h4 {
    margin: 0;
    padding: 0;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
    border: none;
    box-shadow: none;
    background: none;
}

.bbai-logged-in-dashboard p {
    margin: 0;
    padding: 0;
}

.bbai-logged-in-dashboard ul,
.bbai-logged-in-dashboard ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bbai-logged-in-dashboard a {
    text-decoration: none;
    box-shadow: none;
}

.bbai-logged-in-dashboard button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.bbai-logged-in-dashboard img {
    max-width: none;
}

/* Flex gap owns inter-child spacing — neutralise any margin-bottom on bbai-hero-full
   and .bbai-command-hero-host so the status banner doesn't double-space. */
.bbai-logged-in-dashboard .bbai-hero-full,
.bbai-logged-in-dashboard .bbai-command-hero-host {
    margin-bottom: 0 !important;
}


/* ─────────────────────────────────────────────────────────────────────────────
   IN-HERO USAGE BARS  (current plan + pro phantom — inside the donut column)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-hero-usage {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    width: 100%;
    max-width: 26rem; /* match __secondary max-width */
}

.bbai-li-hero-usage__bar {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
    color: inherit;
}

.bbai-li-hero-usage__track {
    height: 7px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.62);
    overflow: hidden;
}

.bbai-li-hero-usage__track--pro {
    background: #f0fdf4; /* subtle green tint for the pro track */
}

.bbai-li-hero-usage__fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.bbai-li-hero-usage__bar--green  .bbai-li-hero-usage__fill { background: #22b573; }
.bbai-li-hero-usage__bar--amber  .bbai-li-hero-usage__fill { background: #c97a00; }
.bbai-li-hero-usage__bar--red    .bbai-li-hero-usage__fill { background: #6274b8; }

.bbai-li-hero-usage__fill--pro {
    background: #86efac; /* lighter green — ghost/phantom */
    opacity: 0.55;
}

.bbai-li-hero-usage__label {
    font-size: 10px;
    color: var(--bbai-text-muted, #6b7280);
    white-space: nowrap;
    line-height: 1.2;
}

.bbai-li-hero-usage__label--pro {
    color: #16a34a;
    opacity: 0.75;
}

.bbai-li-hero-usage__bar--current:hover .bbai-li-hero-usage__fill {
    filter: brightness(0.92);
}

/* ── Pills inside hero content column ─────────────────────────────────────── */

.bbai-li-hero-pills {
    margin-top: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO SUMMARY STRIP  (missing · to-review · credits — beneath CTAs)
   Uses <dl> / <dt> / <dd> for accessible label-value semantics.
───────────────────────────────────────────────────────────────────────────── */

/* ── Summary metric strip ─────────────────────────────────────────────────── */

.bbai-li-hero-summary {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    list-style: none;
}

.bbai-li-hero-summary__item {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    padding: 0 20px 0 0;
    margin: 0;
}

.bbai-li-hero-summary__item + .bbai-li-hero-summary__item {
    padding-left: 20px;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.bbai-li-hero-summary__label {
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

.bbai-li-hero-summary__value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Colour modifiers — only on values that carry semantic meaning */
.bbai-li-hero-summary__item--alert .bbai-li-hero-summary__value { color: #805112; }
.bbai-li-hero-summary__item--warn  .bbai-li-hero-summary__value { color: #9a5f08; }
.bbai-li-hero-summary__item--ok    .bbai-li-hero-summary__value { color: #16a34a; }
.bbai-li-hero-summary__item--muted .bbai-li-hero-summary__value { color: #475569; }

/* ─────────────────────────────────────────────────────────────────────────────
   STAT STRIP  (pills + usage bar — sits directly under the existing hero)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-stat-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 14px 24px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PILLS
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bbai-li-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Semantic colors — match the resolver contract */
.bbai-li-pill--red {
    background: #fffbeb;
    color: #805112;
    border-color: rgba(201, 130, 24, 0.18);
}

.bbai-li-pill--amber {
    background: #fffbeb;
    color: #9a5f08;
    border-color: rgba(216, 139, 18, 0.18);
}

.bbai-li-pill--green {
    background: #f0fdf4;
    color: #166534;
    border-color: rgba(34, 197, 94, 0.18);
}

.bbai-li-pill--blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.16);
}

.bbai-li-pill__count {
    font-weight: 700;
}

.bbai-li-pill__label {
    font-weight: 400;
}

/* Processing pill — subtle pulse on the dot */
.bbai-li-pill--processing::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: bbai-li-pill-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes bbai-li-pill-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   USAGE BAR
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-usage-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 180px;
    max-width: 320px;
}

.bbai-li-usage-bar:hover .bbai-li-usage-bar__fill {
    filter: brightness(0.92);
}

.bbai-li-usage-bar__track {
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.62);
    overflow: hidden;
}

.bbai-li-usage-bar__fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.bbai-li-usage-bar--green  .bbai-li-usage-bar__fill { background: #22b573; }
.bbai-li-usage-bar--amber  .bbai-li-usage-bar__fill { background: #c97a00; }
.bbai-li-usage-bar--red    .bbai-li-usage-bar__fill { background: #6274b8; }

.bbai-li-usage-bar__label {
    font-size: 11px;
    color: var(--bbai-text-muted, #6b7280);
    white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SURFACE HOST
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-surface-host {
    min-height: 200px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHARED SURFACE SHELL
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-surface {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.026), 0 4px 10px rgba(15, 23, 42, 0.026);
}

.bbai-li-surface__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.bbai-li-surface__header-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bbai-li-surface__heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--bbai-text-primary, #111827);
    margin: 0;
}

.bbai-li-surface__subheading,
.bbai-li-surface__meta {
    font-size: 12px;
    color: var(--bbai-text-muted, #6b7280);
    margin: 0;
    max-width: 52ch;
    line-height: 1.45;
}

.bbai-li-surface__message {
    font-size: 13px;
    margin: 0 0 16px;
}

.bbai-li-surface__message--error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 10px 14px;
}

.bbai-li-surface__header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bbai-li-surface__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Surface CTAs — minimal, control-panel style */
.bbai-li-surface__cta {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.bbai-li-surface__cta--primary {
    background: var(--bbai-brand, #2563eb) !important;
    color: #fff !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.bbai-li-surface__cta--primary:hover,
.bbai-li-surface__cta--primary:focus {
    background: #1d4ed8 !important;
    color: #fff !important;
}

.bbai-li-surface__cta--secondary {
    background: transparent !important;
    color: var(--bbai-text-secondary, #374151) !important;
    border: 1px solid var(--bbai-border, #d1d5db) !important;
    box-shadow: none !important;
}

.bbai-li-surface__cta--secondary:hover,
.bbai-li-surface__cta--secondary:focus {
    background: var(--bbai-surface-subtle, #f9fafb) !important;
    color: var(--bbai-text-secondary, #374151) !important;
}

.bbai-li-surface__cta[disabled],
.bbai-li-surface__cta[aria-busy="true"] {
    opacity: 0.6;
    pointer-events: none;
}

[data-action="approve-all"] .bbai-btn-content,
[data-bbai-li-action="approve-all"] .bbai-btn-content {
    display: inline-block;
}

[data-action="approve-all"] .bbai-btn-loading-label,
[data-bbai-li-action="approve-all"] .bbai-btn-loading-label,
[data-action="approve-all"] .bbai-btn-spinner,
[data-bbai-li-action="approve-all"] .bbai-btn-spinner {
    display: none;
}

[data-action="approve-all"].is-loading,
[data-bbai-li-action="approve-all"].is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

[data-action="approve-all"].is-loading .bbai-btn-content,
[data-bbai-li-action="approve-all"].is-loading .bbai-btn-content {
    display: none;
}

[data-action="approve-all"].is-loading .bbai-btn-loading-label,
[data-bbai-li-action="approve-all"].is-loading .bbai-btn-loading-label {
    display: inline-block;
}

[data-action="approve-all"].is-loading .bbai-btn-spinner,
[data-bbai-li-action="approve-all"].is-loading .bbai-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bbai-approve-all-spin 0.6s linear infinite;
    flex-shrink: 0;
}

[data-action="approve-all"].is-loading::before,
[data-bbai-li-action="approve-all"].is-loading::before,
[data-action="approve-all"].is-loading::after,
[data-bbai-li-action="approve-all"].is-loading::after {
    content: none !important;
    display: none !important;
}

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

.bbai-li-surface__action-link {
    font-size: 13px;
    color: var(--bbai-brand, #2563eb);
    text-decoration: underline;
}

/* Progress label in surface header (e.g. "54%") */
.bbai-li-surface__progress-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bbai-text-secondary, #374151);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   JOB PROGRESS BAR  (ActivityLog deterministic bar)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-job-progress {
    height: 7px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.62);
    overflow: hidden;
    margin-bottom: 16px;
}

.bbai-li-job-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: #16b981;
    transition: width 0.6s ease;
}

[data-bbai-li-job-status="paused"] .bbai-li-job-progress__fill {
    background: #d9a441;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FEED LIST  (ActivityLog + RecentActivity)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.bbai-li-feed__empty {
    font-size: 13px;
    color: var(--bbai-text-muted, #6b7280);
    padding: 12px 0;
}

.bbai-li-feed__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    background: var(--bbai-surface-subtle, #f9fafb);
}

.bbai-li-feed__item--error {
    background: #fef2f2;
    color: #991b1b;
}

/* ─────────────────────────────────────────────────────────────────────────────
   IMAGE TABLE  (MissingAltTable + ReviewQueue)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-image-table__loading {
    font-size: 13px;
    color: var(--bbai-text-muted, #6b7280);
    padding: 16px 0;
}

.bbai-li-image-table__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bbai-li-image-table__table th {
    text-align: left;
    font-weight: 600;
    color: var(--bbai-text-secondary, #374151);
    padding: 8px 10px;
    border-bottom: 1px solid var(--bbai-border-subtle, #e5e7eb);
}

.bbai-li-image-table__table td {
    padding: 10px 10px;
    vertical-align: middle;
    border-bottom: 1px solid var(--bbai-border-subtle, #f3f4f6);
    color: var(--bbai-text-primary, #111827);
}

.bbai-li-image-table__table tbody tr:hover td {
    background: var(--bbai-surface-subtle, #f9fafb);
}

.bbai-li-image-table__error {
    font-size: 13px;
    color: #991b1b;
    padding: 12px 0;
    margin: 0;
}

.bbai-li-image-table__error-retry {
    color: var(--bbai-brand, #2563eb);
    text-decoration: underline;
    cursor: pointer;
}

.bbai-li-image-table__empty {
    font-size: 13px;
    color: var(--bbai-text-muted, #6b7280);
    padding: 16px 0;
    margin: 0;
}

.bbai-li-image-table__col-thumb {
    width: 52px;
}

.bbai-li-image-table__thumb {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--bbai-border-subtle, #e5e7eb);
}

.bbai-li-image-table__thumb-placeholder {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--bbai-surface-subtle, #f1f5f9);
    border: 1px solid var(--bbai-border-subtle, #e5e7eb);
}

.bbai-li-image-table__col-file {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--bbai-text-primary, #111827);
}

.bbai-li-image-table__col-status {
    width: 110px;
}

.bbai-li-image-table__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.bbai-li-image-table__badge--missing {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.bbai-li-image-table__badge--review {
    background: #fffbeb;
    color: #9a5f08;
    border: 1px solid rgba(216, 139, 18, 0.18);
}

.bbai-li-image-table__col-action {
    width: 90px;
    text-align: right;
}

.bbai-li-image-table__row-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--bbai-brand, #2563eb);
    background: transparent;
    border: 1px solid rgba(37, 99, 235, 0.24);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.bbai-li-image-table__row-btn:hover {
    background: var(--bbai-brand, #2563eb);
    color: #fff;
}

.bbai-li-image-table__row-btn[disabled],
.bbai-li-image-table__row-btn[aria-busy="true"] {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CHECKLIST  (QuickStartChecklist)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-checklist {
    margin: 0;
    padding: 0 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bbai-li-checklist__item {
    font-size: 13px;
}

.bbai-li-checklist__link {
    color: var(--bbai-brand, #2563eb);
    text-decoration: none;
}

.bbai-li-checklist__link:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CREDIT PLANS  (CreditTopUp)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-credit-plans__loading {
    font-size: 13px;
    color: var(--bbai-text-muted, #6b7280);
    padding: 8px 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   STATE-SPECIFIC OVERRIDES
   Target [data-bbai-logged-in-dashboard][data-state="X"]
───────────────────────────────────────────────────────────────────────────── */

/* ALL_CLEAR — surface gets a subtle green tint on the border */
[data-bbai-logged-in-dashboard][data-state="ALL_CLEAR"] .bbai-li-surface {
    border-color: rgba(34, 197, 94, 0.18);
}

/* ERROR — surface border is amber */
[data-bbai-logged-in-dashboard][data-state="ERROR"] .bbai-li-surface {
    border-color: rgba(239, 68, 68, 0.2);
}

/* QUOTA_EXHAUSTED — surface border is amber */
[data-bbai-logged-in-dashboard][data-state="QUOTA_EXHAUSTED"] .bbai-li-surface {
    border-color: rgba(239, 68, 68, 0.2);
}

/* PROCESSING — usage bar pct change is smooth */
[data-bbai-logged-in-dashboard][data-state="PROCESSING"] .bbai-li-usage-bar__fill {
    transition: width 0.8s ease;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO — logged-in two-card layout
   Left card = donut + pills, right card = badge + headline + CTAs + summary
───────────────────────────────────────────────────────────────────────────── */

/* Two-card grid: wider left for breathing room, right fills remainder */
.bbai-li-hero-grid {
    display: grid;
    grid-template-columns: 30fr 70fr;
    gap: 24px;
    align-items: stretch;
}

/* NEEDS_REVIEW: subtle informational frame on donut card (blue accent, not alert red) */
.bbai-li-hero-grid.bbai-li-hero--needs-review .bbai-li-card--donut {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.026), inset 0 0 0 1px rgba(216, 139, 18, 0.12);
}

.bbai-li-hero-grid .bbai-li-card,
.bbai-li-activity-strip,
.bbai-li-impact-line {
    transition: transform 160ms ease, opacity 160ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bbai-li-hero-grid.bbai-li-hero--state-transition .bbai-li-card,
.bbai-li-dashboard--state-transition .bbai-li-activity-strip,
.bbai-li-dashboard--state-transition .bbai-li-impact-line {
    transform: translateY(-2px) scale(0.996);
    opacity: 0.96;
}

.bbai-li-hero-grid[data-bbai-li-live-progress="1"] .bbai-li-card--donut {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(59, 130, 246, 0.08);
}

@media (prefers-reduced-motion: no-preference) {
    .bbai-li-hero-grid.bbai-li-hero--transition-success .bbai-li-card--content,
    .bbai-li-dashboard--transition-success .bbai-li-activity-strip {
        animation: bbai-li-success-highlight 1.7s ease;
    }
}

@keyframes bbai-li-success-highlight {
    0% {
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
        transform: translateY(0) scale(1);
    }
    35% {
        box-shadow: 0 10px 28px rgba(34, 197, 94, 0.14), 0 4px 10px rgba(15, 23, 42, 0.06);
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
        transform: translateY(0) scale(1);
    }
}

/* ALL_CLEAR — completion shell: primary = library (solid green), secondary = re-scan (outline) */
body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-li-btn-primary {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.14);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-li-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    background: #15803d;
    border-color: #15803d;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-li-btn-secondary {
    background: transparent;
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-li-btn-secondary:hover {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(100, 116, 139, 0.55);
    color: #334155;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-li-btn-secondary--subtle-rescan {
    align-self: flex-start;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin-top: 10px;
    background: transparent !important;
    border: 0 !important;
    color: #64748b !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(100, 116, 139, 0.35);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-li-btn-secondary--subtle-rescan:hover {
    background: transparent !important;
    color: #475569 !important;
    text-decoration-color: rgba(71, 85, 105, 0.55);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-all-clear-rescan-link {
    display: inline-block;
    align-self: flex-start;
    margin-top: 10px;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(100, 116, 139, 0.35);
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: pointer;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-state .bbai-all-clear-rescan-link:hover {
    color: #475569;
    text-decoration-color: rgba(71, 85, 105, 0.55);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback {
    position: static !important;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    height: auto !important;
    margin-top: 8px;
    padding: 4px 9px;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback[hidden] {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 999px;
    background: currentColor;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback--pending {
    border-color: rgba(37, 99, 235, 0.18);
    background: #eff6ff;
    color: #2563eb;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback--success {
    border-color: rgba(16, 185, 129, 0.22);
    background: #ecfdf5;
    color: #047857;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback--attention {
    border-color: rgba(180, 83, 9, 0.2);
    background: #fffbeb;
    color: #b45309;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-scan-inline-feedback--error {
    border-color: rgba(185, 28, 28, 0.2);
    background: #fef2f2;
    color: #b91c1c;
}

@media (prefers-reduced-motion: no-preference) {
    .bbai-all-clear-state {
        animation: bbai-all-clear-hero-fade 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .bbai-all-clear-state--entered .bbai-li-donut__value--center-clear {
        animation: bbai-all-clear-check-enter 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.06s 1 both;
    }

    .bbai-all-clear-state--entered .bbai-li-donut.bbai-command-donut--healthy {
        animation: bbai-all-clear-donut-glow 1s ease-out 1 both;
    }
}

@keyframes bbai-all-clear-hero-fade {
    from {
        transform: scale(0.985);
    }
    to {
        transform: scale(1);
    }
}

@keyframes bbai-all-clear-check-enter {
    0% {
        opacity: 0.88;
        transform: scale(0.96);
    }
    55% {
        opacity: 1;
        transform: scale(1.07);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bbai-all-clear-donut-glow {
    0% {
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12), 0 0 0 0 rgba(34, 197, 94, 0);
    }
    45% {
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12), 0 0 26px rgba(34, 197, 94, 0.22);
    }
    100% {
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12), 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbai-all-clear-state {
        animation: none;
    }
}

/* ── Shared card shell ────────────────────────────────────────────────────── */
.bbai-li-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
}

/* ── Left card: donut card — tighter padding ─────────────────────────────── */
.bbai-li-card--donut {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
}

@media (prefers-reduced-motion: no-preference) {
    [data-bbai-li-hero][data-bbai-li-variant="queued"] .bbai-li-card--donut {
        animation: bbai-li-queued-card-pulse 3.2s ease-in-out infinite;
    }
}

@keyframes bbai-li-queued-card-pulse {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
    }
    50% {
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 22px rgba(15, 23, 42, 0.08);
    }
}

/* Donut area — label close to ring */
.bbai-li-donut-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-bottom: 0;
}

/* Donut ring — ~13% larger, tighter to label */
.bbai-li-donut {
    width: 158px;
    height: 158px;
    border-radius: 999px;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .bbai-li-donut:not(.bbai-li-donut--animated) {
        animation: bbai-donut-ring-appear 0.42s ease both;
    }
}

@keyframes bbai-donut-ring-appear {
    from {
        opacity: 0.88;
    }
    to {
        opacity: 1;
    }
}

/* Faster transition when a chip is being hovered — feel instant/responsive */
.bbai-li-donut[data-bbai-chip-hover] {
    transition: background 220ms ease-out;
}

/* Donut inner white fill */
.bbai-li-donut__inner {
    position: absolute;
    inset: 18px;
    border-radius: 999px;
    background: #ffffff;
}

/* Missing state: very subtle emphasis on the donut ring (no heavy animation) */
@media (prefers-reduced-motion: no-preference) {
    .bbai-li-hero-grid.bbai-li-hero--missing .bbai-li-donut:not(.bbai-li-donut--animated) {
        animation: bbai-missing-donut-pulse 6s ease-in-out infinite;
    }
}
@keyframes bbai-missing-donut-pulse {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); }
    50% { filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.14)); }
}

/* Center container */
.bbai-li-donut__center {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
}

/* Large center number */
.bbai-li-donut__value {
    display: block;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    transition: color 0.25s ease, opacity 0.2s ease;
    /* Entrance — value slides up gently from center */
    animation: bbai-donut-value-enter 300ms cubic-bezier(0.2, 0, 0.1, 1) both;
}

@keyframes bbai-donut-value-enter {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Tone colour modifiers */
.bbai-li-donut__value--neutral  { color: #9aa8b8; }
.bbai-li-donut__value--problem  { color: #9a5f08; }
.bbai-li-donut__value--healthy  { color: #22c55e; }
.bbai-li-donut__value--scanning { color: #3b82f6; }

/* Segment-priority centre emphasis (missing → review → cleared) */
.bbai-li-donut__value--center-missing { color: #805112; }
.bbai-li-donut__value--center-review { color: #9a5f08; }
.bbai-li-donut__value--center-clear   { color: #16a34a; }

/* Sub-label below donut ("images left") */
.bbai-li-donut__sub-label {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
    transition: opacity 180ms ease;
}
.bbai-donut-label.bbai-li-donut__sub-label {
    max-width: 14rem;
    white-space: normal;
    line-height: 1.4;
}
.bbai-li-donut__helper {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
    max-width: 220px;
    text-align: center;
    line-height: 1.35;
}

.bbai-li-donut__helper-main,
.bbai-li-donut__helper-meta {
    display: block;
}

.bbai-li-donut__helper-meta {
    margin-top: 2px;
    font-size: 11px;
    opacity: 0.72;
}

.bbai-li-donut__helper-meta--stack {
    display: grid;
    gap: 4px;
    margin-top: 6px;
}

.bbai-li-donut__helper-meta-line {
    display: block;
}

/* Review-ready donut: calm label + secondary text CTA (NEEDS_REVIEW) */
.bbai-li-donut__sub-label--review-ready {
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #9a5f08;
}
.bbai-li-donut__review-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    max-width: 16rem;
    text-align: center;
}
.bbai-li-donut__review-block[hidden] {
    display: none !important;
}
.bbai-li-donut__review-prompt {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
}
.bbai-li-donut__text-cta {
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(37, 99, 235, 0.35);
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}
.bbai-li-donut__text-cta:hover,
.bbai-li-donut__text-cta:focus {
    color: #1d4ed8;
    text-decoration-color: rgba(29, 78, 216, 0.55);
}
.bbai-li-donut__text-cta:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}


/* Processing spin animation */
.bbai-li-donut--animated {
    animation: bbai-li-donut-spin 2s linear infinite;
}
@keyframes bbai-li-donut-spin {
    from { --bbai-donut-angle: 0deg; }
    to   { --bbai-donut-angle: 360deg; }
}

/* ── Right card: content card ─────────────────────────────────────────────── */
.bbai-li-card--content {
    display: flex;
    flex-direction: column;
    padding: 24px;
    justify-content: flex-start;
    gap: 0;
}

/* Headline — explicit override of WP admin h1 sizing */
.bbai-li-headline {
    font-size: 21px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    letter-spacing: -0.018em !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 46ch;
}

/* Un-hide aria-live on headline */
.bbai-li-headline[aria-live] {
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    white-space: normal !important;
}

/* Support copy */
.bbai-li-support {
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
    margin: 0;
    max-width: 54ch;
}

/* Un-hide aria-live on support */
.bbai-li-support[aria-live] {
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    white-space: normal !important;
}

/* Headline + support rhythm (16px) */
.bbai-li-card--content .bbai-li-headline {
    margin-bottom: 16px;
    max-width: 520px;
    line-height: 1.28 !important;
}
.bbai-li-card--content .bbai-li-support {
    max-width: 520px;
}

/* Merged: CTAs, dot status, Generate → Review → Done */
.bbai-action-block {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
}
.bbai-action-block .bbai-li-cta-row {
    margin-top: 0;
}
.bbai-li-cta-primary-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    flex: 1 1 0;
}
.bbai-hero-cta-hint {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #6b7280;
}
.bbai-hero-review-inline-link {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(37, 99, 235, 0.35);
    align-self: flex-start;
}
.bbai-hero-review-inline-link:hover,
.bbai-hero-review-inline-link:focus {
    color: #1d4ed8;
    text-decoration-color: rgba(29, 78, 216, 0.55);
}
.bbai-hero-review-inline-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}
.bbai-hero-review-inline-link[hidden] {
    display: none !important;
}
.bbai-hero-cta-plan-context {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #9ca3af;
    font-weight: 400;
}
.bbai-li-donut-context {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
    gap: 10px;
}

.bbai-logged-in-dashboard .bbai-li-card--donut .bbai-status-summary {
    display: flex;
    gap: 10px 14px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border: none;
}

.bbai-logged-in-dashboard .bbai-li-card--donut .bbai-progress-flow {
    margin-top: 0;
    justify-content: center;
}

.bbai-logged-in-dashboard .bbai-li-card--donut .bbai-status-item--readout {
    background: transparent;
    border: 1px solid transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.bbai-logged-in-dashboard .bbai-li-card--donut .bbai-status-item--readout:hover {
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bbai-logged-in-dashboard .bbai-li-card--donut .bbai-status-text .bbai-count {
    font-weight: 600;
    color: #475569;
}
.bbai-dot.red {
    background: #c97a00;
}
.bbai-dot.orange {
    background: #d9a441;
}
.bbai-progress-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-top: 0;
    max-width: 100%;
}
.bbai-progress-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.bbai-progress-step::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    box-sizing: border-box;
    border: 1px solid currentColor;
    opacity: 0.55;
    flex-shrink: 0;
}
.bbai-progress-flow .bbai-progress-step.is-active,
.bbai-progress-flow .is-active {
    color: #2563eb;
    font-weight: 600;
}
.bbai-progress-flow .bbai-progress-step.is-active::before,
.bbai-progress-flow .is-active::before {
    background: currentColor;
    border-color: currentColor;
    opacity: 1;
}
.bbai-progress-flow .bbai-progress-step.is-inactive,
.bbai-progress-flow .is-inactive {
    color: #9ca3af;
    font-weight: 500;
    opacity: 0.9;
}
.bbai-progress-flow .bbai-progress-step.is-inactive::before,
.bbai-progress-flow .is-inactive::before {
    background: transparent;
    border-color: currentColor;
    opacity: 0.5;
}

/* Completed step — subtle success tone, not competing with the active step */
.bbai-progress-flow .bbai-progress-step.is-done,
.bbai-progress-flow .is-done {
    color: #6b7280;
    font-weight: 600;
    opacity: 0.95;
}
.bbai-progress-flow .bbai-progress-step.is-done::before,
.bbai-progress-flow .is-done::before {
    background: currentColor;
    border-color: currentColor;
    opacity: 0.85;
}

/* Small transition so step changes feel intentional */
.bbai-progress-step,
.bbai-progress-step::before {
    transition: color 160ms ease, opacity 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.bbai-progress-flow__arrow {
    opacity: 0.5;
    user-select: none;
}
/* Legacy arrow class in case older markup is cached */
.bbai-progress-flow .bbai-arrow {
    opacity: 0.5;
    user-select: none;
}

/* CTA row — primary + secondary; hint nests under primary */
.bbai-li-cta-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 0;
    width: 100%;
    max-width: 520px;
}
.bbai-action-block .bbai-li-cta-row {
    margin-top: 0;
}
/* Equal-width primary/secondary in hero action block */
.bbai-logged-in-dashboard .bbai-action-block .bbai-li-cta-row > .bbai-li-cta-primary-col,
.bbai-logged-in-dashboard .bbai-action-block .bbai-li-cta-row > a {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: auto;
    box-sizing: border-box;
}
.bbai-logged-in-dashboard .bbai-action-block .bbai-li-cta-row > a {
    padding: 0 16px !important;
}
.bbai-logged-in-dashboard .bbai-action-block .bbai-li-cta-row > .bbai-li-cta-primary-col .bbai-li-btn-primary {
    padding: 0 16px !important;
}

/* Primary button */
.bbai-li-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 22px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: transform 120ms ease, box-shadow 120ms ease !important;
}
.bbai-li-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28), 0 2px 4px rgba(15, 23, 42, 0.08) !important;
}
.bbai-li-btn-primary:active:not([disabled]):not([aria-busy="true"]) {
    transform: scale(0.98);
    transition-duration: 80ms !important;
}
.bbai-li-btn-primary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.bbai-li-btn-primary[disabled],
.bbai-li-btn-primary[aria-busy="true"],
.bbai-li-btn-primary[aria-disabled="true"],
.bbai-li-btn-primary.is-loading,
.bbai-li-btn-primary.is-busy {
    opacity: 0.65;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}
.bbai-li-btn-primary[aria-busy="true"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Generation CTA busy state: JS injects ONE .bbai-button-spinner element. */
.bbai-button-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 999px;
    animation: bbai-spin 0.65s linear infinite;
    flex: 0 0 auto;
}

.bbai-button-label {
    display: inline-flex;
    align-items: center;
}

.is-busy {
    cursor: not-allowed;
}

.bbai-generate-button.is-busy,
[data-bbai-generation-action].is-busy {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.75;
}

/* Approve-all keeps its separate loading markup. */
.bbai-li-btn-primary .bbai-btn-spinner {
    display: none;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bbai-li-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.bbai-li-btn-primary .bbai-btn-loading-label {
    display: none;
}

.bbai-li-btn-primary[aria-busy="true"] .bbai-btn-content {
    display: none;
}

.bbai-li-btn-primary[aria-busy="true"] .bbai-btn-loading-label {
    display: inline;
}

.bbai-li-btn-primary[aria-busy="true"] .bbai-btn-spinner {
    display: inline-block;
}

/* Hero primary CTA: solid green (SaaS-style) */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid .bbai-li-btn-primary {
    background: #16a34a !important;
    border: 1px solid #15803d !important;
    color: #fff !important;
    box-shadow: none !important;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid .bbai-li-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    background: #15803d !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35) !important;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid .bbai-li-btn-primary:focus-visible {
    outline-color: #16a34a;
}

/* Secondary link button */
.bbai-li-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 16px !important;
    background: none !important;
    border: 1px solid rgba(148, 163, 184, 0.38) !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: background 120ms ease, border-color 120ms ease !important;
}
.bbai-li-btn-secondary:hover {
    background: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
    color: #0f172a !important;
}
.bbai-li-btn-secondary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ── Summary metrics row ──────────────────────────────────────────────────── */
.bbai-li-summary {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0;
    margin: 8px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    list-style: none;
}

.bbai-li-summary__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 24px 0 0;
    margin: 0;
}

.bbai-li-summary__item + .bbai-li-summary__item {
    padding-left: 24px;
    border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.bbai-li-summary__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

.bbai-li-summary__value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: -0.015em;
    transition: opacity 160ms ease-out, transform 160ms ease-out;
    display: inline-block;
}

.bbai-li-summary__item--alert   .bbai-li-summary__value { color: #805112; }
.bbai-li-summary__item--warn    .bbai-li-summary__value { color: #9a5f08; }
.bbai-li-summary__item--ok      .bbai-li-summary__value { color: #16a34a; }
.bbai-li-summary__item--primary .bbai-li-summary__value { color: #1d4ed8; font-weight: 700; }
.bbai-li-summary__item--muted   .bbai-li-summary__value { color: #94a3b8; font-weight: 400; font-size: 0.85em; }
.bbai-li-summary__item--muted   .bbai-li-summary__label { color: #cbd5e1; }

/* Dim + micro-slide up when JS toggles this during optimistic updates */
.bbai-li-summary__value--updating {
    opacity: 0.25;
    transform: translateY(-2px);
    transition: opacity 80ms ease-in, transform 80ms ease-in;
}

/* Clickable status summary: missing + review (hero, dashboard tab) */
.bbai-logged-in-dashboard .bbai-status-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    flex-wrap: wrap;
}

.bbai-logged-in-dashboard .bbai-status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
    font-family: inherit;
    line-height: 1.3;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bbai-logged-in-dashboard .bbai-status-item:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.bbai-logged-in-dashboard .bbai-status-item:focus {
    outline: none;
}

.bbai-logged-in-dashboard .bbai-status-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.bbai-logged-in-dashboard .bbai-status-item:disabled,
.bbai-logged-in-dashboard .bbai-status-item[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

.bbai-logged-in-dashboard .bbai-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bbai-logged-in-dashboard .bbai-status-item.is-missing .bbai-dot { background: #c97a00; }
.bbai-logged-in-dashboard .bbai-status-item.is-review .bbai-dot { background: #d9a441; }
.bbai-logged-in-dashboard .bbai-status-text { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bbai-logged-in-dashboard .bbai-count { font-weight: 600; color: #111827; }
.bbai-logged-in-dashboard .bbai-status-item.is-missing .bbai-count { color: #9a5f08; }
.bbai-logged-in-dashboard .bbai-status-item.is-review .bbai-count { color: #9a5f08; }
.bbai-logged-in-dashboard .bbai-status-item.is-active { background: #f3f4f6; border-color: #d1d5db; }

.bbai-logged-in-dashboard .bbai-status-summary .bbai-count.bbai-li-summary__value--updating {
    opacity: 0.25;
    transform: translateY(-2px);
    transition: opacity 80ms ease-in, transform 80ms ease-in;
}

/* ─────────────────────────────────────────────────────────────────────────────
   STATE BADGE  (small contextual label above headline in hero)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-state-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
    border: 1px solid transparent;
    line-height: 1.4;
    width: fit-content;
    /* Entrance: fade in slightly from below — same language as the strip */
    animation: bbai-badge-enter 220ms ease both;
}

@keyframes bbai-badge-enter {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* PROCESSING badge: extremely subtle opacity breath — not a shimmer, just alive */
.bbai-li-state-badge--blue {
    animation: bbai-badge-enter 220ms ease both, bbai-badge-breath 3s ease-in-out 300ms infinite;
}

@keyframes bbai-badge-breath {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.72; }
}

.bbai-li-state-badge--amber {
    background: #fffbeb;
    color: #9a5f08;
    border-color: rgba(216, 139, 18, 0.18);
}

.bbai-li-state-badge--blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.bbai-li-state-badge--green {
    background: #f0fdf4;
    color: #166534;
    border-color: rgba(34, 197, 94, 0.18);
}

.bbai-li-state-badge--red {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.bbai-li-state-badge--gray {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ACTIVITY STRIP — thin contextual row below the two-card hero
   Not a card. No background. No border. Inline text only.
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-activity-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 14px 0 0;
    padding: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #6b7280;
}

/* ─────────────────────────────────────────────────────────────────────────────
   META ROW (inside left hero card)
   Wrap the activity strip so it feels attached to the donut card.
───────────────────────────────────────────────────────────────────────────── */

.bbai-card-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--bbai-text-muted, #6b7280);
    font-size: 12.5px;
    line-height: 1.5;
}

.bbai-card-meta-row .bbai-li-activity-strip {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    animation: none;
}

.bbai-card-meta-row .bbai-li-activity-strip__sep {
    margin: 0 10px;
}

/* Coloured dot at the start */
.bbai-li-activity-strip__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-right: 8px;
    flex-shrink: 0;
    position: relative;
    top: -0.5px;
}

.bbai-li-activity-strip--scanning .bbai-li-activity-strip__dot { background: #3b82f6; }
.bbai-li-activity-strip--queued .bbai-li-activity-strip__dot { background: #3b82f6; }
.bbai-li-activity-strip--alert    .bbai-li-activity-strip__dot { background: #c97a00; }
.bbai-li-activity-strip--warn     .bbai-li-activity-strip__dot { background: #d9a441; }
.bbai-li-activity-strip--ok       .bbai-li-activity-strip__dot { background: #20b26c; }

/* Scanning state: dot pulses softly while generation is in progress */
.bbai-li-activity-strip--scanning .bbai-li-activity-strip__dot {
    animation: bbai-strip-pulse 2s ease-in-out infinite;
}

.bbai-li-activity-strip--queued .bbai-li-activity-strip__dot {
    animation: bbai-strip-queued-pulse 1.8s ease-in-out infinite;
}

@keyframes bbai-strip-pulse {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.8); }
}

@keyframes bbai-strip-queued-pulse {
    0%, 100% {
        opacity: 0.95;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(100, 116, 139, 0.2);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
        box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.06);
    }
}

/* Strip items fade in on load — staggered for a composed feel */
.bbai-li-activity-strip {
    animation: bbai-strip-fadein 280ms ease both;
}

@keyframes bbai-strip-fadein {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Inline separator between items */
.bbai-li-activity-strip__sep {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
    margin: 0 8px;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.bbai-li-activity-strip__item {
    white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SURFACE: tighter table rows for a denser, more information-rich feel
───────────────────────────────────────────────────────────────────────────── */

/* Slightly more compact row padding — still readable, more Stripe-like density */
.bbai-li-image-table__table td {
    padding: 9px 10px;
}

/* Add a hover fill that feels less stark */
.bbai-li-image-table__table tbody tr:hover td {
    background: #f8fafc;
}

/* "Open full library" link in surface header — style as a quiet text link */
.bbai-li-surface__header-actions .bbai-li-surface__cta--secondary {
    font-size: 12px;
    color: var(--bbai-text-muted, #6b7280);
    background: transparent !important;
    border-color: transparent !important;
    padding: 6px 8px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bbai-li-surface__header-actions .bbai-li-surface__cta--secondary:hover {
    color: var(--bbai-text-secondary, #374151) !important;
    background: transparent !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO CTA POLISH
   Primary: stronger visual weight via shadow; consistent 36px height.
   Secondary: ghost / text link — clearly subordinate.
   Both: matching height so the row baseline aligns.
───────────────────────────────────────────────────────────────────────────── */

/* Primary button — solid, substantial, the clear first action */
[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta] {
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25), 0 1px 2px rgba(15, 23, 42, 0.06) !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease !important;
    will-change: transform;
}

[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta]:hover:not([disabled]):not([aria-busy="true"]) {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28), 0 2px 4px rgba(15, 23, 42, 0.08) !important;
    transform: translateY(-1px);
}

[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta]:active:not([disabled]):not([aria-busy="true"]) {
    transform: scale(0.98) translateY(0);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15) !important;
    transition-duration: 80ms !important;
}

[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta]:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: none !important;
    transition: outline-offset 80ms ease !important;
}

[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta][disabled],
[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta][aria-busy="true"] {
    opacity: 0.65;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

/* Secondary link in actions row — focus ring only, no hover fill */
[data-bbai-logged-in-dashboard] [data-bbai-li-secondary-cta] {
    transition: color 120ms ease !important;
}

[data-bbai-logged-in-dashboard] [data-bbai-li-secondary-cta]:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUSY / LOADING STATE  (primary CTA while generation is in-flight)
───────────────────────────────────────────────────────────────────────────── */

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

/* Generation buttons use real spinner markup; no pseudo-element spinner. */
[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta][aria-busy="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

[data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta][aria-busy="true"]:not([data-bbai-li-action="approve-all"])::before {
    content: none !important;
    display: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   STATUS LINE  (ephemeral feedback beneath support text)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-hero-status-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
    color: var(--bbai-text-muted, #6b7280);
    margin-top: -4px;   /* pull up — visually connected to description */
    animation: bbai-li-fade-in 180ms ease both;
}

.bbai-li-hero-status-line::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    animation: bbai-li-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

.bbai-li-hero-status-line--queued::before {
    background: #64748b;
    animation-duration: 1.6s;
}

.bbai-li-hero-status-line--scanning::before {
    background: #2563eb;
}

.bbai-li-hero-status-line--success {
    color: #166534;
}

.bbai-li-hero-status-line--success::before {
    background: #20b26c;
    animation: none;
    box-shadow: 0 0 0 4px rgba(32, 178, 108, 0.14);
}

@keyframes bbai-li-fade-in {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bbai-li-pulse {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SUMMARY STRIP — value transition on live update
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-hero-summary__value {
    transition: opacity 160ms ease-out;
    display: inline-block; /* keep layout stable during opacity change */
}

/* Class toggled by JS during an optimistic update — dim then restore */
.bbai-li-hero-summary__value--updating {
    opacity: 0.3;
    transition: opacity 80ms ease-in; /* dim fast, restore slower (ease-out above) */
}

/* ─────────────────────────────────────────────────────────────────────────────
   PROGRESS STEPS ROW  (Generate → Review → Done workflow stepper)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    flex-wrap: nowrap;
}

/* Each step: dot + label side by side */
.bbai-li-progress-steps__step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: #b0bec9;
    white-space: nowrap;
    line-height: 1;
    padding: 0;
    transition: color 140ms ease;
}

/* The dot marker */
.bbai-li-progress-steps__dot {
    display: inline-block;
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: transparent;
    flex-shrink: 0;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

/* Checkmark for done state */
.bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 6px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Active step — filled dot, darker text */
.bbai-li-progress-steps__step--active {
    color: #1e40af;
    font-weight: 600;
}
.bbai-li-progress-steps__step--active .bbai-li-progress-steps__dot {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Done step — solid green dot, muted label */
.bbai-li-progress-steps__step--done {
    color: #64748b;
}
.bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot {
    background: #20b26c;
    border-color: #20b26c;
    box-shadow: none;
}

/* Active+done (ALL_CLEAR on last step) — green filled dot, green text */
.bbai-li-progress-steps__step--active.bbai-li-progress-steps__step--done {
    color: #15803d;
    font-weight: 600;
}

/* Separator between steps — slightly wider, more substantial */
.bbai-li-progress-steps__sep {
    display: inline-block;
    width: 24px;
    height: 1.5px;
    background: rgba(148, 163, 184, 0.4);
    flex-shrink: 0;
    margin: 0 4px;
    position: relative;
    top: 0.5px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   IMPACT / VALUE LINE  (below activity strip)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-impact-line {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────────
   REFERENCE LOGGED-IN DASHBOARD VIEW
   Late, scoped overrides for the full-width app header and the authenticated
   dashboard hero shown in the product reference.
───────────────────────────────────────────────────────────────────────────── */

body.toplevel_page_bbai:not(.bbai-dashboard--connected) .bbai-header--trial-funnel .bbai-header-content {
    width: 100%;
    max-width: 1280px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

/* Hide billing "Manage" on the top-level Dashboard tab only (reference layout). Logout must stay visible — same as Library tab. */
body.toplevel_page_bbai.bbai-dashboard .bbai-header-manage-btn {
    display: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard {
    position: relative;
    gap: 32px;
    --bbai-li-card-radius: 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-command-hero-host {
    width: 100%;
    margin: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-page-hero__frame,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-hero-inner {
    width: 100%;
    max-width: none;
    padding: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-status-banner {
    min-height: 145px !important;
    padding: 26px 10px 26px 24px !important;
    border-radius: 16px !important;
    border: 1px solid #efd6be !important;
    background:
        radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.08), transparent 30%),
        linear-gradient(135deg, #fffbf4 0%, #fffdf8 56%, #ffffff 100%);
    box-shadow: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command {
    padding: 26px 10px 26px 24px !important;
}

body.toplevel_page_bbai.bbai-dashboard #wpcontent .bbai-logged-in-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command {
    padding: 26px 10px 26px 24px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__layout,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-page-hero__layout {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 28px !important;
}

body.toplevel_page_bbai.bbai-dashboard #wpcontent .bbai-logged-in-dashboard .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout {
    display: flex !important;
    gap: 28px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__content {
    flex: 1 1 auto;
    min-width: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__head {
    align-items: center;
    gap: 16px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__icon {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
    border-radius: 8px;
    color: #b45309;
    background: #ffedd5;
    border: 1px solid #fed7aa;
}

body.toplevel_page_bbai.bbai-dashboard #wpcontent .bbai-logged-in-dashboard .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__icon.bbai-dashboard-hero__icon {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__headline {
    font-size: 29px !important;
    line-height: 1.15 !important;
    font-weight: 700;
    letter-spacing: 0;
    color: #111827;
}

body.toplevel_page_bbai.bbai-dashboard #wpcontent .bbai-logged-in-dashboard .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__headline.bbai-dashboard-hero__headline {
    font-size: 29px !important;
    line-height: 1.15 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__subtext {
    margin-top: 14px;
    max-width: 760px;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #4b5563;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__actions {
    flex: 0 0 246px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__actions.bbai-dashboard-hero-actions {
    width: 246px !important;
    max-width: 246px !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    transform: none !important;
    align-items: stretch !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-ui-action-stack__primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-ui-action-stack__secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-ui-action-stack__item,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-dashboard-hero-actions__item {
    width: 100% !important;
    max-width: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-command-action {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-command-action--primary {
    min-height: 48px !important;
    background: #10a37f !important;
    border-color: #10a37f !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-command-action--secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-command-action--tertiary {
    min-height: 44px !important;
    background: #ffffff !important;
    border: 1px solid #d8dee7 !important;
    color: #4b5563 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    min-height: 360px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card {
    border-radius: var(--bbai-li-card-radius);
    border-color: rgba(226, 232, 240, 0.95);
    box-sizing: border-box;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    min-height: 360px;
    padding: 24px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-area {
    width: 100%;
    height: auto;
    gap: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Let the donut + labels sit as a natural group; the card centres them */
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut {
    width: 156px;
    height: 156px;
    margin-bottom: 16px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__inner {
    inset: 18px;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    line-height: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value {
    font-size: 46px;
    letter-spacing: -0.01em;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__sub-label {
    max-width: 220px;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    color: #374151;
    white-space: normal;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
    height: 360px;
    min-height: 360px;
    padding: 24px;
    gap: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-state-badge {
    margin-bottom: 18px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-headline {
    max-width: none;
    font-size: 29px !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    color: #111827 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-support {
    margin-top: 8px;
    max-width: 760px;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
    color: #4b5563;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row {
    margin-top: 28px;
    gap: 6px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary {
    height: 54px !important;
    border-radius: 8px !important;
    font-size: 17px !important;
    letter-spacing: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary {
    min-width: 272px !important;
    background: #10a37f !important;
    border-color: #10a37f !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary {
    min-width: 180px !important;
    padding: 0 22px !important;
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #64748b !important;
    box-shadow: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary {
    margin-top: 24px;
    padding-top: 20px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item {
    min-width: 96px;
    padding-right: 28px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item + .bbai-li-summary__item {
    padding-left: 28px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__label {
    font-size: 13px;
    letter-spacing: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__value {
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--primary .bbai-li-summary__value {
    color: #1d4ed8;
    font-weight: 700;
    font-size: 26px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--muted {
    opacity: 0.72;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--muted .bbai-li-summary__label {
    color: #cbd5e1;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--muted .bbai-li-summary__value {
    color: #94a3b8;
    font-size: 20px;
    font-weight: 500;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps {
    margin-top: 24px;
    padding-top: 18px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step {
    font-size: 14px;
    letter-spacing: 0.01em;
    font-weight: 500;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

/* Done step: green filled dot with inner checkmark via box-shadow trick */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done {
    color: #16a34a;
    font-weight: 600;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot {
    width: 14px;
    height: 14px;
    background: #20b26c;
    border-color: #20b26c;
    box-shadow: inset 0 0 0 2px #fff;
}

/* Active step: pill badge with blue background */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active {
    min-height: 32px;
    padding: 0 14px;
    border: 1.5px solid #93c5fd;
    border-radius: 16px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active .bbai-li-progress-steps__dot {
    width: 10px;
    height: 10px;
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

/* Connectors: solid between done steps, dashed ahead */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__sep {
    width: 32px;
    height: 2px;
    margin: 0 6px;
    background: #cbd5e1;
    border-radius: 1px;
}

/* Connector after a done step → green solid */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done + .bbai-li-progress-steps__sep {
    background: #86efac;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-activity-strip {
    margin-top: 14px;
    font-size: 17px;
    color: #5f6875;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-activity-strip__dot {
    width: 8px;
    height: 8px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-activity-strip__sep {
    margin: 0 12px;
}

/* When the activity strip is inside the left-card meta row, keep it compact and aligned. */
body.toplevel_page_bbai.bbai-dashboard .bbai-card-meta-row .bbai-li-activity-strip {
    margin-top: 0;
    font-size: inherit;
    color: inherit;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-card-meta-row .bbai-li-activity-strip__dot {
    width: 6px;
    height: 6px;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-card-meta-row .bbai-li-activity-strip__sep {
    margin: 0 10px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-impact-line {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 17px;
    color: #6b7280;
}

/* ── Hero shell: grid container for hero + upgrade card ─────────────────── */
.bbai-li-hero-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Standalone upgrade card — secondary section below hero, not inside it */
.bbai-li-upgrade-float--standalone {
    margin-top: 20px;
    max-width: 560px;
}

.bbai-li-upgrade-float {
    overflow: hidden;
    border: 1px solid #e9d5a0;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffbf0 0%, #fff8e6 100%);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.06);
}

.bbai-li-upgrade-float__body {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 18px 14px;
}

.bbai-li-upgrade-float__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    flex-shrink: 0;
}

.bbai-li-upgrade-float__title {
    margin: 0 0 3px !important;
    padding: 0 !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
}

.bbai-li-upgrade-float__text {
    max-width: none;
    margin: 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
    letter-spacing: 0;
}

.bbai-li-upgrade-float__actions {
    display: flex;
    justify-content: flex-start;
    padding: 10px 18px 14px;
    border-top: 1px solid rgba(217, 183, 120, 0.3);
    background: rgba(255, 255, 255, 0.4);
}

.bbai-li-upgrade-float__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid #2563eb !important;
    border-radius: 7px;
    background: #2563eb !important;
    color: #ffffff !important;
    opacity: 1 !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.bbai-li-upgrade-float__button:hover,
.bbai-li-upgrade-float__button:focus-visible {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

@media (max-width: 1280px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-nav {
        gap: 10px;
    }
    body.toplevel_page_bbai.bbai-dashboard .bbai-nav__primary {
        gap: 2px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-nav-link {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 13px;
    }
}

@media (max-width: 1100px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
        grid-template-columns: 1fr;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
        min-height: 0;
    }

    .bbai-li-upgrade-float {
        position: static;
        width: min(100%, 360px);
        margin-left: auto;
    }
}

@media (max-width: 782px) {
    body.toplevel_page_bbai.bbai-dashboard .wrap.bbai-wrap > .bbai-header {
        width: 100%;
        margin-left: 0;
        padding: 16px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-logo {
        min-width: 0;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-logo-icon {
        margin-left: 0;
    }

    body.toplevel_page_bbai.bbai-dashboard--connected .wrap.bbai-wrap > .bbai-container.bbai-content-shell.bbai-dashboard-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.toplevel_page_bbai.bbai-dashboard--connected .bbai-dashboard-shell .bbai-page-inner.bbai-page-container {
        margin-left: 0 !important;
        padding-top: 20px !important;
        padding-bottom: 40px !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__layout,
    body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-page-hero__layout {
        align-items: stretch;
        flex-direction: column;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard .bbai-banner__actions {
        flex-basis: auto;
        width: 100%;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary {
        flex-wrap: wrap;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   DONUT META LINE  (secondary context below sub-label)
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-donut__meta {
    font-size: 11px;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.38);
    margin: 0;
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Dashboard-scale meta */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__meta {
    max-width: 220px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    color: #b0bec9;
    white-space: normal;
}

/* ─────────────────────────────────────────────────────────────────────────────
   DONUT CENTER OVERFLOW GUARD
   Ensures nothing outside the value span bleeds into the center circle.
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-donut__center {
    overflow: hidden;
    gap: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   UPGRADE CARD — same card system as the dashboard hero
───────────────────────────────────────────────────────────────────────────── */

.bbai-li-upgrade-float {
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: var(--bbai-li-card-radius, 14px) !important;
    background: #ffffff !important;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08) !important;
}

.bbai-li-upgrade-float__body {
    padding: 18px 20px 16px;
}

.bbai-li-upgrade-float__actions {
    padding: 12px 20px 16px;
    border-top-color: #e5e7eb;
    background: #f8fafc;
}

.bbai-li-upgrade-float__button {
    min-height: 54px;
    padding: 0 22px;
    border-radius: 8px;
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #64748b !important;
    box-shadow: none !important;
    font-size: 17px;
    font-weight: 600;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.bbai-li-upgrade-float__button:hover,
.bbai-li-upgrade-float__button:focus-visible {
    background: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #374151 !important;
    transform: none !important;
}

.bbai-li-upgrade-float__button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.48);
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SUCCESS MODAL — clean product style, no gradients or glow
───────────────────────────────────────────────────────────────────────────── */

.bbai-modal-success {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999990;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bbai-modal-success.active {
    display: flex;
}

.bbai-modal-success__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: bbai-success-fade 200ms ease both;
}

.bbai-modal-success__content {
    position: relative;
    z-index: 1;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.10),
        0 8px 16px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.04) !important;
    max-width: 480px;
    width: 100%;
    animation: bbai-success-scale 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: hidden;
    /* Remove any gradient backgrounds */
    background-image: none !important;
}

@keyframes bbai-success-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bbai-success-scale {
    from { opacity: 0; transform: scale(0.96) translateY(4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bbai-modal-success__header {
    padding: 32px 32px 20px;
    text-align: center;
}

.bbai-modal-success__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    margin: 0 auto 16px;
    /* Remove glow */
    box-shadow: none !important;
    background-image: none !important;
}

.bbai-modal-success__title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 6px !important;
    line-height: 1.25 !important;
    /* Remove gradient text */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

.bbai-modal-success__subtitle {
    font-size: 14px !important;
    color: rgba(15, 23, 42, 0.6) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.bbai-modal-success__stats {
    display: flex;
    gap: 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.bbai-modal-success__stat-card {
    flex: 1;
    padding: 16px 12px;
    text-align: center;
    background: #f8fafc !important;
    background-image: none !important;
    box-shadow: none !important;
}

.bbai-modal-success__stat-card + .bbai-modal-success__stat-card {
    border-left: 1px solid #f1f5f9;
}

.bbai-modal-success__stat-number {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1 !important;
    margin-bottom: 4px !important;
    /* Remove gradient */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
}

.bbai-modal-success__stat-label {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: rgba(15, 23, 42, 0.5) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.bbai-modal-success__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    margin: 0 24px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
    background: #f8fafc !important;
    background-image: none !important;
    box-shadow: none !important;
}

.bbai-modal-success__summary[data-summary-type="success"] {
    background: #f0fdf4 !important;
    color: #166534;
}

.bbai-modal-success__summary[data-summary-type="warning"] {
    background: #fffbeb !important;
    color: #92400e;
}

.bbai-modal-success__summary-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.bbai-modal-success__actions {
    display: flex;
    gap: 8px;
    padding: 20px 24px 24px;
    flex-wrap: wrap;
}

.bbai-modal-success__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    border: none;
    /* Remove any gradients/glows */
    background-image: none !important;
    box-shadow: none !important;
}

.bbai-modal-success__btn--primary {
    background: #0f172a !important;
    color: #ffffff !important;
    flex: 1;
}

.bbai-modal-success__btn--primary:hover {
    background: #1e293b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

.bbai-modal-success__btn--secondary {
    background: transparent !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
}

.bbai-modal-success__btn--secondary:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
}

.bbai-modal-success__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: rgba(15, 23, 42, 0.4);
    font-size: 20px;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.bbai-modal-success__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MICRO POLISH — button height, spacing, and contrast consistency
───────────────────────────────────────────────────────────────────────────── */

/* Ensure the donut card clickable cursor is correct */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card.bbai-li-card--donut-clickable {
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

/* Toast font-weight bump */
.bbai-toast-message {
    font-weight: 600 !important;
}

/* Hover state for donut card — subtle lift */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card.bbai-li-card--donut-clickable:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card.bbai-li-card--donut-clickable:focus-visible {
    border-color: rgba(37, 99, 235, 0.46);
    outline: 2px solid rgba(37, 99, 235, 0.48);
    outline-offset: 2px;
}

/* Ensure all primary/secondary hero buttons share the same height */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary {
    letter-spacing: 0 !important;
    font-weight: 600 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    background: #0e9272 !important;
    border-color: #0e9272 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary:hover {
    background: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #374151 !important;
}

#bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary,
#bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary,
#bbai-dashboard-main .bbai-li-upgrade-float__button {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 22px !important;
    border-radius: 8px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

#bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary {
    background: #10a37f !important;
    border-color: #10a37f !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

#bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    background: #0e9272 !important;
    border-color: #0e9272 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12) !important;
}

#bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary,
#bbai-dashboard-main .bbai-li-upgrade-float__button {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: none !important;
    color: #64748b !important;
}

#bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary:hover,
#bbai-dashboard-main .bbai-li-upgrade-float__button:hover {
    background: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #374151 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    /* Processing pill dot */
    .bbai-li-pill--processing::before {
        animation: none;
    }

    /* Usage bars */
    .bbai-li-usage-bar__fill,
    [data-bbai-logged-in-dashboard][data-state="PROCESSING"] .bbai-li-usage-bar__fill,
    .bbai-li-hero-usage__fill {
        transition: none;
    }

    /* Primary CTA */
    [data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta] {
        transition: none !important;
    }
    [data-bbai-logged-in-dashboard] [data-bbai-li-primary-cta][aria-busy="true"]:not([data-bbai-li-action="approve-all"]) .bbai-button-spinner {
        animation: none;
        border-top-color: rgba(255, 255, 255, 0.7);
        border-left-color: rgba(255, 255, 255, 0.7);
    }
    [data-action="approve-all"].is-loading .bbai-btn-spinner,
    [data-bbai-li-action="approve-all"].is-loading .bbai-btn-spinner {
        animation: none;
    }

    /* Status line */
    .bbai-li-hero-status-line::before {
        animation: none;
        opacity: 1;
    }
    .bbai-li-hero-status-line {
        animation: none;
        opacity: 1;
        transform: none;
    }

    /* Summary values */
    .bbai-li-hero-summary__value,
    .bbai-li-hero-summary__value--updating,
    .bbai-li-summary__value,
    .bbai-li-summary__value--updating {
        transition: none;
        opacity: 1;
        transform: none;
    }

    /* Activity strip */
    .bbai-li-activity-strip {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .bbai-li-activity-strip--scanning .bbai-li-activity-strip__dot {
        animation: none;
    }

    /* Hero badge */
    .bbai-li-state-badge,
    .bbai-li-state-badge--blue {
        animation: none;
        opacity: 1;
        transform: none;
    }

    /* Donut center value */
    .bbai-li-donut__value {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }

    /* Donut */
    .bbai-li-donut {
        transition: none;
    }
    .bbai-li-donut__sub-label {
        transition: none;
    }
    [data-bbai-li-hero][data-bbai-li-variant="queued"] .bbai-li-card--donut {
        animation: none;
    }

    /* Progress steps */
    .bbai-li-progress-steps__step,
    .bbai-li-progress-steps__dot {
        transition: none;
    }

    /* Success modal */
    .bbai-modal-success__overlay,
    .bbai-modal-success__content {
        animation: none;
        opacity: 1;
        transform: none;
    }

    /* Donut card hover */
    .bbai-li-card--donut-clickable,
    .bbai-li-btn-primary,
    .bbai-li-btn-secondary,
    .bbai-li-upgrade-float__button {
        transition: none;
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGGED-IN DASHBOARD POLISH (layout, rhythm, typography — no state logic)
   Dashboard tab: max-width shell, hero grid, cards, stepper, nav breathing room
═══════════════════════════════════════════════════════════════════════════ */

/* Canvas width: shell is full-bleed; constrain the dashboard tab root. */
body.toplevel_page_bbai.bbai-dashboard .bbai-container.bbai-content-shell #bbai-dashboard-main.bbai-dashboard,
body.toplevel_page_bbai.bbai-dashboard .bbai-container.bbai-content-shell > .bbai-dashboard.bbai-container {
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
    width: 100%;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard {
    /* Reduce space between hero row and insight cards (section-to-section only). */
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-shell {
    width: 100%;
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Post-hero insight cards — same width as hero, lower visual weight */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto 0;
    padding: 0 24px;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card {
    margin: 0;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.98);
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 16px rgba(15, 23, 42, 0.05);
    min-height: 140px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card-top {
    min-width: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card-bottom {
    margin-top: auto;
    min-width: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-stats {
    margin-top: 12px;
}

@media (prefers-reduced-motion: no-preference) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card:hover,
    body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
        border-color: rgba(203, 213, 225, 0.95);
    }
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #9ca3af;
    line-height: 1.3;
    margin: 0;
    min-height: 2.6em;
    display: flex;
    align-items: flex-start;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__value {
    font-size: clamp(24px, 2.1vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin: 16px 0 0;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    min-height: 1.2em;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__desc {
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
    font-weight: 400;
    margin: 14px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Insight card action nudges (subtle; do not compete with primary CTA) */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__support {
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
    font-weight: 500;
    margin: 12px 0 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 0;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__cta:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__cta:focus-visible {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(100, 116, 139, 0.55);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

/* Success pill for 100% coverage (Accessibility card) */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 10px;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-pill--success {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.25);
}

/* Insight cards: primary (a11y) > secondary (time) > tertiary (SEO) */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.primary {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.primary .bbai-li-insight-card__value {
    color: #14532d;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f4f5 100%);
    border-color: #e4e4e7;
    opacity: 0.95;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary .bbai-li-insight-card__title {
    color: #a1a1aa;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary .bbai-li-insight-card__value {
    color: #52525b;
    font-size: clamp(22px, 1.8vw, 28px);
}
@media (prefers-reduced-motion: reduce) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value {
        animation: none;
    }
    .bbai-li-donut:not(.bbai-li-donut--animated) {
        animation: none !important;
    }
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
    body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card {
        transition: none;
    }
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card:hover,
    body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card:hover {
        transform: none;
    }
}

/* Upgrade promo: section gap already provides rhythm */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-upgrade-float--standalone {
    margin-top: 0;
}

/* Hero grid: fixed donut column + flexible content; top-aligned, balanced row height */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
    display: grid;
    grid-template-columns: minmax(360px, 380px) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    width: 100%;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid > .bbai-li-card {
    min-height: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

/* Shared card shell — premium, restrained */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card {
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.07);
    padding: 24px;
    box-sizing: border-box;
}

/* Donut card — height:auto; modest presence vs right column */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut {
    padding: 24px;
    justify-content: flex-start;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-area {
    width: 100%;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-action-block {
    margin-top: 22px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-li-free-plan-upsell {
    margin-top: 16px;
    margin-bottom: 22px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-li-free-plan-upsell + .bbai-action-block {
    margin-top: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut {
    width: 230px;
    height: 230px;
}

/* Thinner band + light entrance: avoid fighting PROCESSING spin */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut:not(.bbai-li-donut--animated) {
    animation: bbai-li-donut-surface-in 0.65s ease-out both;
}

@keyframes bbai-li-donut-surface-in {
    from {
        opacity: 0.86;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__inner {
    inset: 22px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value {
    font-size: clamp(32px, 3.5vw, 40px);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-area {
    gap: 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__sub-label {
    font-size: 17px;
    font-weight: 600;
    color: #334155;
    margin-top: 0;
    line-height: 1.35;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Right content card: vertical flex stack; everything stays in-card */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 0;
    justify-content: flex-start;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-state-badge {
    margin-bottom: 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-headline {
    font-size: clamp(30px, 2.35vw, 38px) !important;
    line-height: 1.12 !important;
    max-width: 720px !important;
    letter-spacing: -0.022em !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-support {
    font-size: 15px;
    line-height: 1.55;
    max-width: 680px;
    margin-top: 8px;
    color: #4b5563;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 16px;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Stacked CTAs: primary full width, secondary anchored as clear follow-up */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 11px;
    margin-top: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-action-block .bbai-li-cta-row {
    margin-top: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-li-btn-primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-li-btn-secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-button-secondary {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 0 auto;
    padding: 0 28px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-li-btn-secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-button-secondary {
    opacity: 0.85;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
    box-shadow: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-li-btn-secondary:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group .bbai-button-secondary:hover {
    opacity: 1;
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

@media (min-width: 900px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row:not(.bbai-cta-group) {
        flex-wrap: nowrap;
    }
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary {
    box-sizing: border-box;
    flex: 0 1 auto;
    min-width: min(100%, 300px) !important;
    min-height: 56px !important;
    height: 56px !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 0 28px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    color: #ffffff !important;
    background: #10a37f !important;
    border: 1px solid #0d966f !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 163, 127, 0.35) !important;
    border-color: #0b8f6a !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary {
    box-sizing: border-box;
    flex: 0 1 auto;
    min-width: min(100%, 220px) !important;
    min-height: 56px !important;
    height: 56px !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 0 22px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
    color: #334155 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1) !important;
}

/* Summary metrics — hierarchy, not washed out */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary {
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    text-align: center;
    padding: 0 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item + .bbai-li-summary__item {
    border-left: none;
    padding-left: 16px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item + .bbai-li-summary__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 1px;
    opacity: 0.9;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: #64748b;
    text-transform: uppercase;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__value {
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.15;
    font-weight: 700;
    margin-top: 4px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--muted .bbai-li-summary__value {
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 600;
    color: #64748b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--muted .bbai-li-summary__label {
    color: #94a3b8;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item--primary .bbai-li-summary__value {
    font-size: clamp(28px, 2.4vw, 34px);
    font-weight: 800;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-status-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Stepper: anchored in card, higher contrast; width matches summary band */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps {
    border-top: none;
    margin-top: 18px;
    margin-bottom: 0;
    padding: 10px 14px 10px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 0;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step {
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
}

/* Undo pill-style active step from reference block above */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active {
    min-height: 0;
    padding: 0 2px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #1d4ed8;
    font-weight: 700;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active .bbai-li-progress-steps__dot {
    width: 11px;
    height: 11px;
    background: #2563eb;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done {
    color: #15803d;
    font-weight: 600;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot {
    width: 11px;
    height: 11px;
    background: #20b26c;
    border-color: #08785c;
    box-shadow: inset 0 0 0 2px #fff;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active.bbai-li-progress-steps__step--done {
    color: #15803d;
    font-weight: 700;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active.bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot {
    background: #20b26c;
    border-color: #15803d;
    box-shadow: 0 0 0 3px rgba(32, 178, 108, 0.22);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--idle {
    color: #94a3b8;
    font-weight: 500;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__dot {
    width: 10px;
    height: 10px;
    border-width: 1.5px;
    border-color: #cbd5e1;
    background: transparent;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__sep {
    width: 28px;
    height: 2px;
    margin: 0 6px;
    top: 0;
    align-self: center;
    background: #cbd5e1;
    border-radius: 1px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done + .bbai-li-progress-steps__sep {
    background: #bbf7d0;
}

/* Post-hero band: same width as hero — compact status, no float */
/* (Removed) Post-hero below-strip: activity strip now lives inside the left card. */

body.toplevel_page_bbai.bbai-dashboard .bbai-li-impact-line {
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
    font-size: 14px;
    color: #94a3b8;
}

/* (Removed) Post-hero below-strip: impact line stays in its own location. */

/* Header: space-between, single-row nav when room; full-width nav row when wrapping */
body.toplevel_page_bbai.bbai-dashboard .bbai-header-content {
    display: flex;
    max-width: min(100%, 1280px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
    width: 100% !important;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-nav {
    min-width: 0;
    flex: 1 1 auto;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-nav__primary {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
}

@media (min-width: 1024px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-header-content {
        flex-wrap: nowrap;
    }
}

@media (max-width: 1023px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-header-content {
        flex-wrap: wrap;
        align-content: center;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-nav {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        max-width: 100%;
        margin-top: 2px;
    }
}

body.toplevel_page_bbai.bbai-dashboard .bbai-nav__primary::-webkit-scrollbar {
    display: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-nav-link {
    padding: 5px 10px;
    font-size: 13px;
    min-height: 32px;
    flex-shrink: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-guide-link {
    padding: 6px 10px;
    font-size: 13px;
    flex-shrink: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-actions {
    flex-shrink: 0;
    min-width: 0;
}

/* Account pill: breathing room, lighter FREE badge, readable logout */
/* Keep the dashboard visible while the startup script corrects stale SSR state. */
#bbai-dashboard-main[data-hydrated="false"] {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#bbai-dashboard-main[data-hydrated="true"] {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease;
}

.bbai-li-card-section--spaced {
    margin-top: clamp(16px, 2vw, 24px);
}

.bbai-li-card--content .bbai-li-card-section--account .bbai-credit-usage,
.bbai-li-card--content .bbai-li-card-section--account .bbai-all-clear-upgrade {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
}

.bbai-li-donut__action-cm {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #059669;
    text-decoration: none;
}

.bbai-li-donut__action-cm:hover,
.bbai-li-donut__action-cm:focus {
    text-decoration: underline;
}

@keyframes bbai-credit-usage-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-account-bar {
    gap: 12px;
    padding: 7px 10px 7px 16px;
    border-radius: 999px;
    max-width: min(34vw, 360px);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-account-email {
    font-size: 12px;
    padding-right: 2px;
    color: rgba(255, 255, 255, 0.95);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-plan-badge {
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    opacity: 0.95;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-credits-note {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    margin-left: 2px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* Dashboard hero: credit usage under primary CTAs */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage {
    width: 100%;
    margin-top: 16px;
    margin-bottom: 16px;
    box-sizing: border-box;
    padding: 16px;
    background: #f4f4f5;
    border-radius: 14px;
    border: 1px solid rgba(228, 228, 231, 0.95);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-label {
    font-size: 14px;
    font-weight: 600;
    color: #3f3f46;
    margin-bottom: 0;
    line-height: 1.3;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-clarity {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #71717a;
    font-weight: 400;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-bar {
    width: 100%;
    max-width: 100%;
    height: 9px;
    margin-top: 10px;
    background: #e4e4e7;
    border-radius: 999px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-fill {
    height: 100%;
    width: var(--bbai-credit-percent, 0%);
    max-width: 100%;
    background: #10b981;
    border-radius: 999px;
    transition: width 0.3s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage[data-credit-state="low"] .bbai-credit-fill {
    background: #c98218;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage[data-credit-state="empty"] .bbai-credit-fill {
    background: #c75b5f;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-context {
    font-size: 12px;
    margin: 8px 0 0;
    line-height: 1.45;
    color: #71717a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-insight {
    font-size: 12px;
    margin: 3px 0 0;
    line-height: 1.45;
    color: #4b5563;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-context.bbai-credit-context--warning,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage[data-credit-state="low"] .bbai-credit-context.bbai-credit-context--warning {
    color: #b45309;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-context[hidden] {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-insight[hidden] {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-helper {
    font-size: 12px;
    margin: 8px 0 0;
    line-height: 1.4;
    color: #71717a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-helper--growth {
    margin-top: 3px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-growth-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-growth-link:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-growth-link:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-helper[hidden] {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage .bbai-spinner,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage .bbai-btn-spinner,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage.is-loading::before,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage.is-loading::after {
    display: none !important;
    content: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-auto-opt-wrap {
    margin: 6px 0 0;
    padding: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-auto-opt-link {
    display: inline;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(100, 116, 139, 0.35);
    cursor: pointer;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-auto-opt-link:hover {
    color: #475569;
    text-decoration-color: rgba(71, 85, 105, 0.55);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-auto-opt-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel {
    margin-top: 12px;
    padding: 12px 0 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: transparent;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #27272a;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__sub {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #71717a;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #3f3f46;
    background: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__cta:hover {
    background: #fafafa;
    border-color: #a1a1aa;
}
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__cta:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content hr.bbai-all-clear-section-divider {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    margin: 18px 0 0;
    padding: 0;
    height: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade > .bbai-all-clear-section-divider {
    margin: 0 0 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade {
    width: 100%;
    margin-top: 12px;
    padding-top: 0;
    border-top: none;
}

/* Client-injected panel: no preceding section divider sibling */
body.toplevel_page_bbai.bbai-dashboard .bbai-action-block > .bbai-li-cta-row + .bbai-all-clear-upgrade {
    margin-top: 18px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade .bbai-li-free-plan-upsell__note {
    margin: 0 0 10px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__panel {
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(16, 185, 129, 0.05));
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__title {
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__desc {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__cta:hover {
    background: #f8fafc;
    border-color: rgba(37, 99, 235, 0.5);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__cta:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__nudge {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage.bbai-credit-usage--all-clear-muted {
    background: #f8fafc;
    border-color: rgba(226, 232, 240, 0.85);
    box-shadow: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage.bbai-credit-usage--all-clear-muted .bbai-credit-label {
    color: #71717a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage.bbai-credit-usage--all-clear-muted .bbai-credit-clarity {
    color: #a1a1aa;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-header-logout-btn {
    padding: 5px 12px;
    font-size: 12px;
    min-height: 32px;
}

/* CTAs: one row on desktop; stack only at narrow widths */
@media (min-width: 761px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row {
        flex-direction: row;
    }
}

@media (max-width: 760px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 52px !important;
        height: auto !important;
    }
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card-section--activation:empty {
    display: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card-section--activation {
    display: grid;
    gap: 10px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel--warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #78350f;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel--upgrade {
    border-color: #bfdbfe;
    background: #f8fafc;
    color: #0f172a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__title,
body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__copy {
    margin: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__title {
    padding-right: 26px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__copy {
    font-size: 13px;
    line-height: 1.45;
    color: inherit;
    opacity: 0.86;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__btn--primary {
    border-color: #15803d;
    background: #16a34a;
    color: #fff;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__btn:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__btn:focus-visible {
    filter: brightness(0.97);
    text-decoration: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-activation-panel__dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: currentColor;
    cursor: pointer;
}

/* Tablet: stack hero before narrow phone breakpoint */
@media (max-width: 1000px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid > .bbai-li-card--content {
        order: -1;
    }
}

/* ── Guest final-step (trial exhausted): premium CTA hierarchy ────────────── */
body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main[data-bbai-trial-exhausted="1"] .bbai-li-card--content .bbai-li-btn-primary {
    width: 100%;
    max-width: 520px;
    min-height: 46px;
    border-radius: 12px;
    justify-content: center;
}

body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main[data-bbai-trial-exhausted="1"] .bbai-li-card--content .bbai-li-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(16, 185, 129, 0.2), 0 4px 10px rgba(15, 23, 42, 0.08);
}

body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main[data-bbai-trial-exhausted="1"] .bbai-li-card--content .bbai-li-btn-primary:active:not([disabled]):not([aria-busy="true"]) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.14);
}

body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main[data-bbai-trial-exhausted="1"] .bbai-li-donut__helper-meta-line {
    color: #64748b;
    opacity: 0.78;
}

/* Tablet / mobile */
@media (max-width: 900px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
        grid-template-columns: 1fr;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut {
        min-height: 0;
        padding: 32px 24px 28px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
        padding: 28px 24px 24px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-headline {
        font-size: 30px !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-support {
        font-size: 16px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary {
        flex-wrap: wrap;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-summary__item {
        flex: 1 1 45%;
    }
}

/* ── Free plan note (ALL_CLEAR) + credit block upgrade link ───────── */

.bbai-li-free-plan-upsell {
    margin-top: var(--bbai-space-3, 12px);
    max-width: 42rem;
}

.bbai-li-free-plan-upsell__note {
    font-size: 13px;
    line-height: 1.45;
    color: var(--bbai-text-muted, #6b7280);
    margin: 0;
}

/* ── Guest funnel (no SaaS account): same grid + cards as logged-in hero ─ */

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid--guest-funnel .bbai-li-cta-group {
    gap: 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__cta-cluster .bbai-li-btn-primary + .bbai-li-btn-secondary {
    margin-top: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__cta-cluster {
    flex-direction: column;
    align-items: stretch;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__login {
    margin: 4px 0 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__login .bbai-li-btn-secondary {
    width: 100%;
    justify-content: center;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__text-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--bbai-brand, #2563eb);
    text-decoration: underline;
    background: none;
    border: 0;
    padding: 6px 0;
    box-shadow: none;
    width: 100%;
    text-align: center;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-trial-meter__track {
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--bbai-border-subtle, #e5e7eb);
    overflow: hidden;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-trial-meter__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bbai-brand, #2563eb);
    transition: width 0.35s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-meter-intro {
    margin: 12px 0 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bbai-text-muted, #6b7280);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-meter-caption {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--bbai-text-secondary, #374151);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-blurb .bbai-guest-hero__trial-line {
    margin: 0 0 6px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-line-main,
body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-line-sub {
    display: block;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-line-main {
    font-size: 13px;
    font-weight: 600;
    color: var(--bbai-text-secondary, #374151);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-line-sub {
    margin-top: 2px;
    font-size: 13px;
    color: var(--bbai-text-muted, #6b7280);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__trial-line--muted {
    color: var(--bbai-text-muted, #6b7280);
    font-size: 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-value-cards {
    margin-top: 6px;
}

/* Guest funnel layout targets: more breathing room + clearer hierarchy. */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid--guest-funnel {
    gap: 32px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid--guest-funnel .bbai-li-card {
    padding: 30px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid--guest-funnel .bbai-li-card--donut {
    padding: 30px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__meta-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--bbai-text-muted, #6b7280);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card {
    display: grid;
    gap: 18px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__header {
    display: grid;
    gap: 6px;
    text-align: left;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__eyebrow {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__message {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 650;
    color: #0f172a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-command-donut__center-value--warning,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value--warning {
    color: #b45309;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-command-donut__center-value--danger,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value--danger {
    color: #b91c1c;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card .bbai-li-donut__value {
    font-size: clamp(30px, 3vw, 38px);
    white-space: nowrap;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card .bbai-li-donut__sub-label {
    max-width: 9ch;
    font-size: 13px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__stats {
    display: grid;
    gap: 8px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 10px;
    background: #f8fafc;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__stat span {
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
    color: #64748b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__stat strong {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress {
    display: grid;
    gap: 7px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress-track {
    display: block;
    width: 100%;
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.35s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress-fill--healthy {
    background: #22c55e;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress-fill--warning {
    background: #f59e0b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress-fill--danger {
    background: #ef4444;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-site-health-card__progress-label {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
    color: #166534;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-register-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-register-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 650;
    color: #475569;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-register-benefits span {
    color: #047857;
    font-weight: 800;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.055);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__item {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 12px;
    background: #f8fafc;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__item strong {
    font-size: 13px;
    line-height: 1.3;
    color: #0f172a;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__item span {
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-trial-preview--locked-library .bbai-dashboard-locked-preview__benefits.bbai-dashboard-locked-preview__benefits--conversion {
    display: grid;
}

@media (max-width: 960px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__grid,
    body.toplevel_page_bbai.bbai-dashboard .bbai-guest-register-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-guest-benefits-card__grid,
    body.toplevel_page_bbai.bbai-dashboard .bbai-guest-register-benefits {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 761px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-guest-hero__cta-cluster {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-guest-value-cards {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   FINAL LOGGED-IN DASHBOARD DENSITY PASS
   Layout-only polish: compact cards, connected stats, lighter credit surface.
───────────────────────────────────────────────────────────────────────────── */

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard {
    gap: 30px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-shell {
    padding-left: 24px;
    padding-right: 24px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
    grid-template-columns: minmax(316px, 340px) minmax(0, 1fr);
    gap: 30px;
    align-items: stretch;
    min-height: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card {
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 20px rgba(15, 23, 42, 0.055);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut {
    justify-content: center;
    padding: 22px 20px 20px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-area {
    gap: 7px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut {
    width: 184px;
    height: 184px;
    margin-bottom: 6px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__inner {
    inset: 20px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value {
    font-size: clamp(30px, 3vw, 38px);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__sub-label {
    max-width: 96px;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__helper,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__review-prompt {
    max-width: 210px;
    font-size: 12px;
    line-height: 1.35;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__meta {
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.32;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-context {
    margin-top: 8px;
    gap: 8px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-card-meta-row {
    margin-top: 12px;
    padding-top: 11px;
    font-size: 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut .bbai-status-summary {
    gap: 8px 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut .bbai-status-item--readout {
    font-size: 12.5px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-progress-flow {
    gap: 6px;
    font-size: 12.5px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-progress-step::before {
    width: 6px;
    height: 6px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
    padding: 24px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card-section--spaced {
    margin-top: 18px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-state-badge {
    margin-bottom: 10px;
    padding: 3px 9px;
    font-size: 10px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-headline {
    max-width: 680px !important;
    font-size: clamp(24px, 2vw, 30px) !important;
    line-height: 1.18 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-support {
    max-width: 640px;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.48;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-action-block {
    margin-top: 18px;
    max-width: 500px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-row.bbai-cta-group {
    gap: 8px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary,
#bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary,
#bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary {
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    padding: 0 20px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary,
#bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary {
    background: #ffffff !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
    color: #64748b !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-hero-cta-hint,
body.toplevel_page_bbai.bbai-dashboard .bbai-hero-review-inline-link,
body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-rescan-link {
    margin-top: 6px;
    font-size: 12.5px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 12px 14px;
    border-radius: 11px;
    background: #f8fafc;
    border-color: rgba(226, 232, 240, 0.9);
    box-shadow: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-label {
    font-size: 13px;
    color: #475569;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-clarity,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-context,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-insight,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-helper {
    font-size: 11.5px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-bar {
    height: 7px;
    margin-top: 8px;
    background: rgba(226, 232, 240, 0.62);
    box-shadow: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content hr.bbai-all-clear-section-divider {
    margin-top: 14px;
    border-top-color: rgba(148, 163, 184, 0.18);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade {
    margin-top: 10px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__panel {
    padding: 11px 12px;
    border-color: rgba(37, 99, 235, 0.14);
    background: #f8fafc;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__nudge {
    margin-top: 8px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
    gap: 24px;
    margin-top: 30px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    justify-content: flex-start;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045), 0 18px 42px rgba(15, 23, 42, 0.06);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.72) 0%, rgba(34, 197, 94, 0.08) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.secondary::before {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.62) 0%, rgba(59, 130, 246, 0.08) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.tertiary::before {
    background: linear-gradient(90deg, rgba(99, 84, 199, 0.28) 0%, rgba(99, 84, 199, 0.06) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    border-color: rgba(148, 163, 184, 0.22);
    opacity: 1;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.primary {
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0) 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.secondary {
    background:
        radial-gradient(circle at 18% 8%, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary {
    background:
        radial-gradient(circle at 18% 8%, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0) 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card:hover {
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 24px 52px rgba(15, 23, 42, 0.08);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__title {
    min-height: 0;
    font-size: 11px;
    letter-spacing: 0.1em;
    line-height: 1.25;
    color: #94a3b8;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__value {
    margin-top: 16px;
    font-size: clamp(28px, 2.4vw, 36px);
    line-height: 1.08;
    letter-spacing: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary .bbai-li-insight-card__value {
    font-size: clamp(28px, 2.4vw, 36px);
    color: #334155;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__desc {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #475569;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__meta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 12px 0 0;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.primary .bbai-li-insight-card__meta {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.secondary .bbai-li-insight-card__meta {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.tertiary .bbai-li-insight-card__meta {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__support {
    margin-top: 14px;
    color: #64748b;
    font-size: 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__cta {
    min-height: 38px;
    margin-top: 18px;
    padding: 8px 14px;
    border-color: rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13.5px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__cta:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__cta:focus-visible {
    border-color: rgba(37, 99, 235, 0.45);
    color: #1d4ed8;
    background: #f8fbff;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card-bottom {
    margin-top: auto;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-status-line {
    margin-top: 8px;
}

@media (max-width: 1000px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
        gap: 24px;
    }
}

@media (max-width: 900px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
        gap: 24px;
        margin-top: 28px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
        padding: 22px;
    }
}

@media (max-width: 760px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-shell,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
        grid-template-columns: 1fr;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
        gap: 20px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut {
        width: 156px;
        height: 156px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
    body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card {
        padding: 18px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-headline {
        font-size: 25px !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-support {
        font-size: 14px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
        margin-top: 24px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary,
    #bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary,
    #bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary {
        width: 100% !important;
        min-height: 46px !important;
        height: auto !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   DASHBOARD GRID ALIGNMENT POLISH
   One dashboard grid owns section width, gaps, and card alignment.
───────────────────────────────────────────────────────────────────────────── */

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-container,
body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-grid,
body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 24px;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-section {
    margin-top: 32px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-section:first-child {
    margin-top: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-shell {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-grid--top,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch;
    width: 100%;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-cta,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px !important;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-stats {
    margin-top: 12px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-stat-card {
    padding: 24px !important;
    border-radius: 16px !important;
    height: 100%;
    box-sizing: border-box;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-cta,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip {
    background: linear-gradient(180deg, #f9fafb, #ffffff);
    border: 1px solid #e5e7eb;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px !important;
    background:
        radial-gradient(circle at 18% 8%, rgba(20, 184, 166, 0.08) 0%, rgba(20, 184, 166, 0) 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045), 0 18px 42px rgba(15, 23, 42, 0.06);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip {
    position: relative;
    overflow: hidden;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card::before,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.62) 0%, rgba(20, 184, 166, 0.08) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut::before {
    background: linear-gradient(90deg, #20b26c 0%, rgba(32, 178, 108, 0.12) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content::before {
    background: linear-gradient(90deg, #2563eb 0%, rgba(37, 99, 235, 0.12) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip::before {
    background: linear-gradient(90deg, #10b981 0%, rgba(16, 185, 129, 0.12) 100%);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip:hover {
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 24px 52px rgba(15, 23, 42, 0.08);
}

@media (max-width: 900px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-grid,
    body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard,
    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-grid--top,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
        grid-template-columns: 1fr !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-cta,
    body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip {
        grid-column: 1;
    }
}

@media (max-width: 760px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-container,
    body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Premium hierarchy pass: keep final dashboard overrides after grid polish. */
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card::before,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip::before,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card::before {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary {
    border-color: rgba(226, 232, 240, 0.92) !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.055) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card:hover {
    border-color: rgba(203, 213, 225, 0.95) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045), 0 14px 34px rgba(15, 23, 42, 0.065) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.primary .bbai-li-insight-card__meta,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.secondary .bbai-li-insight-card__meta,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.tertiary .bbai-li-insight-card__meta {
    border-color: rgba(226, 232, 240, 0.95) !important;
    background: #f8fafc !important;
    color: #64748b !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-pill--success {
    border-color: rgba(134, 239, 172, 0.72) !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary:hover:not([disabled]):not([aria-busy="true"]),
body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary:hover:not([disabled]):not([aria-busy="true"]) {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 18px rgba(15, 23, 42, 0.07) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-credit-bar,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-usage-bar__track,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-usage__track,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__progress {
    background: rgba(226, 232, 240, 0.62) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-credit-fill,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-usage-bar__fill,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-usage__fill,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__progress-fill {
    box-shadow: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active .bbai-li-progress-steps__dot {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-progress-steps__step--active.bbai-li-progress-steps__step--done .bbai-li-progress-steps__dot {
    box-shadow: none !important;
}

/* Premium SaaS cleanup: final dashboard-only hierarchy overrides. */
body.toplevel_page_bbai.bbai-dashboard .wrap.bbai-wrap > .bbai-header {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .wrap.bbai-wrap > .bbai-container.bbai-content-shell {
    padding-top: 24px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard {
    gap: 28px !important;
    --bbai-li-card-radius: 24px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-shell {
    padding-left: 24px;
    padding-right: 24px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid {
    gap: 24px !important;
    align-items: stretch;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card {
    border: 1px solid rgba(226, 232, 240, 0.88) !important;
    border-radius: 24px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035), 0 18px 42px rgba(15, 23, 42, 0.052) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card::before,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip::before,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card::before {
    content: none !important;
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut {
    min-height: 0 !important;
    padding: 20px 22px 18px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-area {
    gap: 6px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut {
    width: 156px !important;
    height: 156px !important;
    margin-bottom: 4px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__inner {
    inset: 17px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__value {
    font-size: clamp(30px, 2.45vw, 36px) !important;
    letter-spacing: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__sub-label {
    margin-top: 6px !important;
    font-size: 13px !important;
    line-height: 1.28 !important;
    letter-spacing: 0.01em !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__helper,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__review-prompt,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__meta {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    color: #94a3b8 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut-context {
    margin-top: 8px !important;
    gap: 8px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-card-meta-row {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut .bbai-status-summary {
    gap: 6px 12px !important;
    padding-top: 8px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut .bbai-status-item--readout {
    font-size: 12px !important;
    line-height: 1.35 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--donut .bbai-status-text .bbai-count {
    font-size: 13px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-progress-flow {
    gap: 6px !important;
    margin-top: 4px !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-progress-flow .bbai-progress-step.is-active,
body.toplevel_page_bbai.bbai-dashboard .bbai-progress-flow .is-active {
    color: #2563eb !important;
    font-weight: 650 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-progress-flow .bbai-progress-step.is-inactive,
body.toplevel_page_bbai.bbai-dashboard .bbai-progress-flow .is-inactive {
    color: #cbd5e1 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content {
    padding: 24px !important;
    gap: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-state-badge {
    margin-bottom: 12px !important;
    padding: 4px 11px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    letter-spacing: 0.045em !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-headline {
    max-width: 680px !important;
    font-size: clamp(27px, 2.1vw, 34px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    font-weight: 760 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-support {
    max-width: 620px !important;
    margin-top: 10px !important;
    font-size: 15px !important;
    line-height: 1.48 !important;
    color: #64748b !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-action-block {
    margin-top: 20px !important;
    max-width: 100% !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-cta-primary-col {
    gap: 8px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-primary,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-btn-secondary,
body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main .bbai-li-btn-primary.bbai-btn-primary,
body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main .bbai-li-btn-secondary.bbai-btn-secondary {
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-hero-cta-hint {
    margin-top: 6px !important;
    font-size: 12.5px !important;
    color: #94a3b8 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-hero-review-inline-link,
body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-rescan-link,
body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-library-link,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__text-cta,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__action-cm,
body.toplevel_page_bbai.bbai-dashboard .bbai-credit-growth-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    min-height: 30px !important;
    margin-top: 6px !important;
    padding: 0 11px !important;
    border: 1px solid rgba(203, 213, 225, 0.86) !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    box-shadow: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-hero-review-inline-link:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-rescan-link:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-library-link:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__text-cta:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-donut__action-cm:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-credit-growth-link:hover {
    border-color: rgba(148, 163, 184, 0.9) !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card-section--monetisation {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-top: 18px !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(226, 232, 240, 0.92) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content hr.bbai-all-clear-section-divider {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage.bbai-credit-usage--all-clear-muted {
    margin: 0 !important;
    padding: 16px !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: rgba(248, 250, 252, 0.9) !important;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.55) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-bar {
    height: 7px !important;
    margin-top: 10px !important;
    border-radius: 999px !important;
    background: rgba(226, 232, 240, 0.62) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-fill {
    border-radius: inherit !important;
    background: #16b981 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage[data-credit-state="low"] .bbai-credit-fill {
    background: #c98218 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage[data-credit-state="empty"] .bbai-credit-fill {
    background: #c75b5f !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-usage[data-credit-state="empty"] .bbai-credit-context.bbai-credit-context--warning {
    color: #8f3a3f !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-helper {
    margin-top: 8px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade {
    margin: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade .bbai-li-free-plan-upsell__note {
    margin: 0 0 10px !important;
    font-size: 13px !important;
    color: #64748b !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__panel,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: rgba(248, 250, 252, 0.92) !important;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.58) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel::before {
    content: "⚡";
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__copy,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__copy {
    min-width: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__title,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__title {
    margin: 0 0 3px !important;
    color: #0f172a !important;
    font-size: 13.5px !important;
    font-weight: 730 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__desc,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__sub {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 12.5px !important;
    line-height: 1.42 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-automation-toggle {
    position: relative !important;
    width: 44px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    border: 1px solid rgba(203, 213, 225, 0.95) !important;
    border-radius: 999px !important;
    background: #e2e8f0 !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-automation-toggle > span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__cta {
    border-radius: 999px !important;
    min-height: 30px !important;
    padding: 0 12px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-all-clear-upgrade__nudge {
    margin: 8px 0 0 !important;
    font-size: 12.5px !important;
    color: #64748b !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 22px 24px !important;
    background: #ffffff !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__title {
    margin-bottom: 4px !important;
    font-size: 18px !important;
    line-height: 1.22 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__copy {
    color: #64748b !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__progress {
    height: 7px !important;
    max-width: 460px !important;
    margin-top: 12px !important;
    border-radius: 999px !important;
    background: rgba(226, 232, 240, 0.62) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__progress-fill {
    border-radius: inherit !important;
    background: #10b981 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip .bbai-btn,
body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip__actions .bbai-btn {
    border-radius: 14px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insights {
    gap: 24px !important;
    margin-top: 28px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card {
    min-height: 220px !important;
    padding: 24px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.primary {
    background:
        radial-gradient(circle at 16% 12%, rgba(34, 197, 94, 0.032), transparent 36%),
        #ffffff !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.secondary {
    background:
        radial-gradient(circle at 16% 12%, rgba(59, 130, 246, 0.03), transparent 36%),
        #ffffff !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card.bbai-stat-card.tertiary {
    background:
        radial-gradient(circle at 16% 12%, rgba(124, 58, 237, 0.03), transparent 36%),
        #ffffff !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__label {
    color: #94a3b8 !important;
    font-size: 11px !important;
    letter-spacing: 0.09em !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__value {
    color: #0f172a !important;
    font-weight: 760 !important;
    letter-spacing: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-li-insight-card__body {
    color: #64748b !important;
}

@media (max-width: 900px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-retention-strip {
        grid-template-columns: 1fr !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-all-clear-upgrade__panel,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel {
        grid-template-columns: auto minmax(0, 1fr) !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-automation-toggle,
    body.toplevel_page_bbai.bbai-dashboard .bbai-li-card--content .bbai-credit-upgrade-panel__cta {
        grid-column: 2;
        justify-self: start;
    }
}
