/*
 * BeepBeep AI dashboard page CSS bundle.
 * Generated by scripts/build-dashboard-css-bundle.mjs.
 * Do not edit this file directly; edit source CSS files instead.
 */

/* Source: assets/css/components/job-widget.css */
/**
 * Floating Job Widget
 */
.bbai-job-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    border-radius: 14px;
    background: var(--bbai-bg, #fff);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18), 0 4px 14px rgba(15, 23, 42, 0.08);
    padding: 14px 16px;
    z-index: 999998;
    font-family: var(--bbai-font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.bbai-job-widget[hidden] {
    display: none;
}

/* Header */
.bbai-job-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bbai-job-widget__status {
    font-size: 13px;
    font-weight: 800;
    color: var(--bbai-text, #1a1a1a);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bbai-job-widget__status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbai-job-widget__pulse {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.42);
    flex: 0 0 auto;
}

.bbai-job-widget__close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: var(--bbai-text-muted, #6b7280);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.bbai-job-widget__close:hover {
    background: var(--bbai-bg-secondary, #f3f4f6);
    color: var(--bbai-text, #1a1a1a);
}

.bbai-job-widget__close[hidden] {
    display: none;
}

/* Body */
.bbai-job-widget__body {
    margin-bottom: 10px;
}

.bbai-job-widget__counts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bbai-job-widget__progress-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--bbai-text, #1a1a1a);
}

.bbai-job-widget__eta {
    font-size: 11px;
    color: var(--bbai-text-muted, #6b7280);
}

/* Progress bar */
.bbai-job-widget__bar {
    height: 6px;
    background: var(--bbai-gray-200, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}

.bbai-job-widget__bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #10b981, #2563eb);
}

/* State variants */
.bbai-job-widget--processing {
    animation: bbai-job-widget-attention 2.4s ease-in-out infinite;
}

.bbai-job-widget--processing .bbai-job-widget__pulse {
    animation: bbai-job-widget-pulse 1.35s ease-out infinite;
}

.bbai-job-widget--complete .bbai-job-widget__bar-fill {
    background: var(--bbai-success, #16a34a);
}

.bbai-job-widget--complete .bbai-job-widget__status {
    color: var(--bbai-success, #16a34a);
}

.bbai-job-widget--error .bbai-job-widget__bar-fill {
    background: var(--bbai-warning, #f59e0b);
}

.bbai-job-widget--error .bbai-job-widget__status {
    color: var(--bbai-warning, #f59e0b);
}

/* View button */
.bbai-job-widget__view {
    display: block;
    width: 100%;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: #059669;
    border: 1px solid #047857;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.bbai-job-widget__view:hover {
    background: #047857;
    border-color: #065f46;
    color: #ffffff;
}

.bbai-job-widget--complete .bbai-job-widget__view {
    background: #059669;
    border-color: #047857;
    color: #ffffff;
}

.bbai-job-widget--complete .bbai-job-widget__view:hover {
    background: #047857;
    border-color: #065f46;
    color: #ffffff;
}

@keyframes bbai-job-widget-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.42);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes bbai-job-widget-attention {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbai-job-widget--processing,
    .bbai-job-widget--processing .bbai-job-widget__pulse {
        animation: none;
    }
}

/* Source: assets/css/unified.css */
/**
 * AltText AI - Unified Stylesheet
 *
 * @package BeepBeep_AI
 * @version 6.0.0
 * @generated 2026-03-09T14:06:33.125Z
 */

/**
 * AltText AI - Unified Stylesheet (Modular)
 *
 * A single, optimized CSS file for the entire plugin.
 * Split into modular components for maintainability.
 *
 * @package BeepBeep_AI
 * @version 6.0.0
 */

/* 1. Design Tokens (CSS Variables) */

/* Imported from: _tokens.css */
/**
 * Design Tokens - BeepBeep AI
 * Premium SaaS Design System
 *
 * Version: 8.0.0
 * Last Updated: 2026-01-14
 */

:root {
    /* ========================================
       BRAND COLORS - Premium Teal
       ======================================== */

    --bbai-primary: #10B981;
    --bbai-primary-hover: #059669;
    --bbai-primary-dark: #047857;
    --bbai-primary-light: #D1FAE5;
    --bbai-primary-soft: rgba(16, 185, 129, 0.08);
    --bbai-primary-glow: rgba(16, 185, 129, 0.15);
    --bbai-primary-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);

    /* ========================================
       STATUS COLORS - Refined Palette
       ======================================== */

    --bbai-success: #10b981;
    --bbai-success-light: #d1fae5;
    --bbai-success-bg: #ecfdf5;
    --bbai-success-dark: #059669;

    --bbai-warning: #f59e0b;
    --bbai-warning-light: #fef3c7;
    --bbai-warning-bg: #fffbeb;
    --bbai-warning-dark: #d97706;

    --bbai-error: #ef4444;
    --bbai-error-light: #fee2e2;
    --bbai-error-bg: #fef2f2;
    --bbai-danger: var(--bbai-error);
    --bbai-danger-light: var(--bbai-error-light);
    --bbai-danger-bg: var(--bbai-error-bg);

    --bbai-info: #3b82f6;
    --bbai-info-light: #dbeafe;
    --bbai-info-bg: #eff6ff;
    --bbai-info-dark: #2563eb;

    /* ========================================
       NEUTRAL COLORS - Refined Grays
       ======================================== */

    --bbai-gray-50: #f9fafb;
    --bbai-gray-100: #f3f4f6;
    --bbai-gray-200: #e5e7eb;
    --bbai-gray-300: #d1d5db;
    --bbai-gray-400: #9ca3af;
    --bbai-gray-500: #6b7280;
    --bbai-gray-600: #4b5563;
    --bbai-gray-700: #374151;
    --bbai-gray-800: #1f2937;
    --bbai-gray-900: #111827;
    --bbai-gray-950: #030712;

    --bbai-white: #ffffff;
    --bbai-black: #000000;

    /* ========================================
       SEMANTIC COLORS
       ======================================== */

    --bbai-text: #111827;
    --bbai-text-primary: #111827;
    --bbai-text-secondary: #374151;
    --bbai-text-muted: #6b7280;
    --bbai-text-light: #9ca3af;
    --bbai-text-inverse: #ffffff;

    --bbai-bg: #ffffff;
    --bbai-bg-primary: #ffffff;
    --bbai-bg-secondary: #f9fafb;
    --bbai-bg-tertiary: #f3f4f6;
    --bbai-bg-page: #f5f7fa;
    --bbai-bg-card: #ffffff;
    --bbai-bg-elevated: #ffffff;

    --bbai-border: #e5e7eb;
    --bbai-border-primary: #e5e7eb;
    --bbai-border-secondary: #d1d5db;
    --bbai-border-focus: var(--bbai-primary);

    /* Dark surfaces for premium cards */
    --bbai-surface-dark: #0f172a;
    --bbai-surface-dark-lighter: #1e293b;
    --bbai-surface-teal: #134e4a;
    --bbai-surface-teal-lighter: #115e59;

    /* ========================================
       PREMIUM GRADIENTS
       ======================================== */

    --bbai-gradient-primary: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --bbai-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --bbai-gradient-info: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --bbai-gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --bbai-gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    /* Premium accent gradients */
    --bbai-gradient-teal-dark: linear-gradient(135deg, #134e4a 0%, #0d3d3d 100%);
    --bbai-gradient-indigo: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    --bbai-gradient-purple: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
    --bbai-gradient-blue: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);

    /* Usage card gradient */
    --bbai-gradient-usage: #ffffff;
    /* Upsell card gradient */
    --bbai-gradient-upsell: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    /* Agency gradient */
    --bbai-gradient-agency: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);

    /* ========================================
       TYPOGRAPHY - Premium System Font Stack
       ======================================== */

    --bbai-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --bbai-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --bbai-font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
    --bbai-font-family-mono: var(--bbai-font-mono);

    /* Font Sizes - Refined Scale */
    --bbai-text-xs: 0.75rem;      /* 12px */
    --bbai-text-sm: 0.875rem;     /* 14px */
    --bbai-text-base: 1rem;       /* 16px */
    --bbai-text-lg: 1.125rem;     /* 18px */
    --bbai-text-xl: 1.25rem;      /* 20px */
    --bbai-text-2xl: 1.5rem;      /* 24px */
    --bbai-text-3xl: 1.875rem;    /* 30px */
    --bbai-text-4xl: 2.25rem;     /* 36px */
    --bbai-text-5xl: 3rem;        /* 48px */

    /* Font Weights */
    --bbai-font-normal: 400;
    --bbai-font-medium: 500;
    --bbai-font-semibold: 600;
    --bbai-font-bold: 700;
    --bbai-font-extrabold: 800;

    /* Line Heights */
    --bbai-leading-none: 1;
    --bbai-leading-tight: 1.25;
    --bbai-leading-snug: 1.375;
    --bbai-leading-normal: 1.5;
    --bbai-leading-relaxed: 1.625;
    --bbai-leading-loose: 2;

    /* Letter Spacing */
    --bbai-tracking-tighter: -0.05em;
    --bbai-tracking-tight: -0.025em;
    --bbai-tracking-normal: 0;
    --bbai-tracking-wide: 0.025em;
    --bbai-tracking-wider: 0.05em;
    --bbai-tracking-widest: 0.1em;

    /* ========================================
       SPACING - 4px Grid
       ======================================== */

    --bbai-space-0: 0;
    --bbai-space-px: 1px;
    --bbai-space-0-5: 0.125rem;   /* 2px */
    --bbai-space-1: 0.25rem;      /* 4px */
    --bbai-space-1-5: 0.375rem;   /* 6px */
    --bbai-space-2: 0.5rem;       /* 8px */
    --bbai-space-2-5: 0.625rem;   /* 10px */
    --bbai-space-3: 0.75rem;      /* 12px */
    --bbai-space-3-5: 0.875rem;   /* 14px */
    --bbai-space-4: 1rem;         /* 16px */
    --bbai-space-5: 1.25rem;      /* 20px */
    --bbai-space-6: 1.5rem;       /* 24px */
    --bbai-space-7: 1.75rem;      /* 28px */
    --bbai-space-8: 2rem;         /* 32px */
    --bbai-space-9: 2.25rem;      /* 36px */
    --bbai-space-10: 2.5rem;      /* 40px */
    --bbai-space-11: 2.75rem;     /* 44px */
    --bbai-space-12: 3rem;        /* 48px */
    --bbai-space-14: 3.5rem;      /* 56px */
    --bbai-space-16: 4rem;        /* 64px */
    --bbai-space-20: 5rem;        /* 80px */
    --bbai-space-24: 6rem;        /* 96px */

    /* Semantic Spacing */
    --bbai-spacing-xs: var(--bbai-space-1);
    --bbai-spacing-sm: var(--bbai-space-2);
    --bbai-spacing-md: var(--bbai-space-4);
    --bbai-spacing-lg: var(--bbai-space-6);
    --bbai-spacing-xl: var(--bbai-space-8);
    --bbai-spacing-2xl: var(--bbai-space-12);

    /* Cross-tab page rhythm (Dashboard-aligned; use only these for plugin shell spacing) */
    --page-padding-top: var(--bbai-space-6);
    --section-spacing: var(--bbai-space-6);
    --card-gap: var(--bbai-space-4);

    /* Rhythm semantics — cards, banners, headers, rows, controls (4px grid) */
    --bbai-rhythm-card-padding: var(--bbai-space-6);
    --bbai-rhythm-card-padding-compact: var(--bbai-space-4);
    --bbai-rhythm-card-padding-inline: var(--bbai-space-6);
    --bbai-rhythm-card-header-padding-y: var(--bbai-space-4);
    --bbai-rhythm-card-body-padding-y: var(--bbai-space-4);
    --bbai-rhythm-label-to-title: var(--bbai-space-2);
    --bbai-rhythm-title-to-description: var(--bbai-space-2);
    --bbai-rhythm-description-to-content: var(--bbai-space-4);
    --bbai-rhythm-section-gap: var(--bbai-space-4);
    --bbai-rhythm-banner-padding-block: var(--bbai-space-6);
    --bbai-rhythm-banner-padding-inline: var(--bbai-space-6);
    --bbai-rhythm-banner-after-headline: var(--bbai-space-3);
    --bbai-rhythm-banner-support-to-progress: var(--bbai-space-4);
    --bbai-rhythm-banner-cta-gap: var(--bbai-space-2);
    --bbai-rhythm-banner-progress-pad-bottom: var(--bbai-space-4);
    --bbai-rhythm-section-header-inline-pad: var(--bbai-space-6);
    --bbai-rhythm-section-header-split-gap: var(--bbai-space-4);
    --bbai-rhythm-section-header-pad-y: var(--bbai-space-2);
    --bbai-rhythm-section-header-pad-b: var(--bbai-space-1);
    --bbai-rhythm-row-padding-y: var(--bbai-space-3);
    --bbai-rhythm-row-gap: var(--bbai-space-4);
    --bbai-rhythm-action-stack-gap: var(--bbai-space-2);
    --bbai-rhythm-form-field-gap: var(--bbai-space-4);
    --bbai-rhythm-filter-pill-gap: var(--bbai-space-2);
    --bbai-rhythm-chip-gap: var(--bbai-space-2);
    --bbai-rhythm-strip-padding-block: var(--bbai-space-3);
    --bbai-rhythm-strip-padding-inline: var(--bbai-space-4);
    --bbai-rhythm-strip-stack-gap: var(--bbai-space-2);
    --bbai-rhythm-strip-actions-margin-top: var(--bbai-space-3);

    /* ========================================
       BORDER RADIUS - Refined
       ======================================== */

    --bbai-radius-none: 0;
    --bbai-radius-sm: 0.25rem;    /* 4px */
    --bbai-radius: 0.5rem;        /* 8px */
    --bbai-radius-md: 0.625rem;   /* 10px */
    --bbai-radius-lg: 0.75rem;    /* 12px */
    --bbai-radius-xl: 1rem;       /* 16px */
    --bbai-radius-2xl: 1.25rem;   /* 20px */
    --bbai-radius-3xl: 1.5rem;    /* 24px */
    --bbai-radius-full: 9999px;

    /* ========================================
       SHADOWS - Premium Depth System
       ======================================== */

    /* Subtle elevation shadows */
    --bbai-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --bbai-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    --bbai-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    --bbai-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --bbai-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --bbai-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --bbai-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Interactive shadows */
    --bbai-shadow-focus: 0 0 0 3px var(--bbai-primary-glow);
    --bbai-shadow-focus-error: 0 0 0 3px rgba(239, 68, 68, 0.15);

    /* Focus Ring System - Consistent across all interactive elements */
    --bbai-focus-ring-width: 2px;
    --bbai-focus-ring-offset: 2px;
    --bbai-focus-ring-color: var(--bbai-primary);
    --bbai-focus-ring: var(--bbai-focus-ring-width) solid var(--bbai-focus-ring-color);

    /* Component shadows */
    --bbai-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --bbai-shadow-card-hover: 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --bbai-shadow-button: 0 1px 2px rgba(0, 0, 0, 0.05);
    --bbai-shadow-button-hover: 0 4px 8px -2px rgba(16, 185, 129, 0.25);
    --bbai-shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    --bbai-shadow-dropdown: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);

    /* Colored glows */
    --bbai-glow-primary: 0 0 20px rgba(16, 185, 129, 0.2);
    --bbai-glow-info: 0 0 20px rgba(59, 130, 246, 0.2);
    --bbai-glow-purple: 0 0 20px rgba(124, 58, 237, 0.2);

    /* ========================================
       TRANSITIONS - Smooth & Premium
       ======================================== */

    --bbai-transition-fast: 150ms;
    --bbai-transition-base: 200ms;
    --bbai-transition-slow: 300ms;

    --bbai-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --bbai-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --bbai-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --bbai-transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    --bbai-transition-colors: color var(--bbai-transition-fast) var(--bbai-ease-out),
                              background-color var(--bbai-transition-fast) var(--bbai-ease-out),
                              border-color var(--bbai-transition-fast) var(--bbai-ease-out);
    --bbai-transition-transform: transform var(--bbai-transition-base) var(--bbai-ease-spring);

    /* ========================================
       Z-INDEX LAYERS
       ======================================== */

    --bbai-z-base: 0;
    --bbai-z-dropdown: 100;
    --bbai-z-sticky: 200;
    --bbai-z-fixed: 1030;
    --bbai-z-modal-backdrop: 1040;
    --bbai-z-modal: 1050;
    --bbai-z-popover: 1060;
    --bbai-z-tooltip: 1070;
    --bbai-z-notification: 1080;

    /* ========================================
       COMPONENT TOKENS
       ======================================== */

    /* Cards */
    --bbai-card-padding: var(--bbai-space-6);
    --bbai-card-padding-sm: var(--bbai-space-4);
    --bbai-card-padding-lg: var(--bbai-space-8);
    --bbai-card-radius: var(--bbai-radius-xl);
    --bbai-card-border: 1px solid var(--bbai-border);
    --bbai-card-bg: var(--bbai-bg);

    /* Buttons */
    --bbai-btn-padding-y: 0.625rem;
    --bbai-btn-padding-x: 1.25rem;
    --bbai-btn-padding-sm-y: 0.5rem;
    --bbai-btn-padding-sm-x: 1rem;
    --bbai-btn-padding-lg-y: 0.875rem;
    --bbai-btn-padding-lg-x: 1.75rem;
    --bbai-btn-radius: var(--bbai-radius);
    --bbai-btn-font-weight: var(--bbai-font-semibold);

    /* Forms */
    --bbai-input-padding-y: 0.625rem;
    --bbai-input-padding-x: 0.875rem;
    --bbai-input-radius: var(--bbai-radius);
    --bbai-input-border: 1px solid var(--bbai-gray-300);
    --bbai-input-bg: var(--bbai-bg);

    /* Modal */
    --bbai-modal-padding: var(--bbai-space-8);
    --bbai-modal-radius: var(--bbai-radius-2xl);
    --bbai-modal-max-width: 560px;

    /* Badges */
    --bbai-badge-padding-y: 0.25rem;
    --bbai-badge-padding-x: 0.625rem;
    --bbai-badge-radius: var(--bbai-radius-full);
    --bbai-badge-font-size: var(--bbai-text-xs);
    --bbai-badge-font-weight: var(--bbai-font-medium);

    /* Dashboard & shared admin width */
    --bbai-dashboard-max-width: 1400px;

    /* ========================================
       URGENCY STATES - Conversion Focused
       ======================================== */
    
    --bbai-urgent: #f59e0b;
    --bbai-urgent-light: #fef3c7;
    --bbai-urgent-bg: #fffbeb;
    --bbai-urgent-dark: #d97706;
    --bbai-urgent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    
    --bbai-critical: #ef4444;
    --bbai-critical-light: #fee2e2;
    --bbai-critical-bg: #fef2f2;
    --bbai-critical-dark: #dc2626;
    --bbai-critical-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);

    /* ========================================
       USAGE COMPARISON BARS
       ======================================== */
    
    --bbai-comparison-free-bg: rgba(255, 255, 255, 0.15);
    --bbai-comparison-free-fill: rgba(255, 255, 255, 0.3);
    --bbai-comparison-pro-bg: rgba(255, 255, 255, 0.15);
    --bbai-comparison-pro-fill: linear-gradient(90deg, #10b981 0%, #059669 100%);
    --bbai-comparison-pro-glow: rgba(16, 185, 129, 0.4);

    /* ========================================
       PLACEHOLDER STATES
       ======================================== */

    --bbai-placeholder-color: var(--bbai-text-muted);
    --bbai-placeholder-opacity: 0.5;
    --bbai-placeholder-size: var(--bbai-text-3xl);
    --bbai-placeholder-weight: var(--bbai-font-bold);

    /* ========================================
       UPGRADE CARD - High Conversion
       ======================================== */

    /* Gradient */
    --bbai-upgrade-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 40%, #7c3aed 100%);
    --bbai-upgrade-gradient-hover: linear-gradient(135deg, #5b54f0 0%, #818cf8 40%, #8b5cf6 100%);

    /* Text on gradient */
    --bbai-upgrade-text: #ffffff;
    --bbai-upgrade-text-muted: rgba(255, 255, 255, 0.85);
    --bbai-upgrade-text-subtle: rgba(255, 255, 255, 0.7);

    /* CTA Button */
    --bbai-upgrade-cta-bg: #ffffff;
    --bbai-upgrade-cta-text: #0f172a;
    --bbai-upgrade-cta-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    --bbai-upgrade-cta-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.25);

    /* Badge */
    --bbai-upgrade-badge-bg: rgba(255, 255, 255, 0.2);
    --bbai-upgrade-badge-border: rgba(255, 255, 255, 0.3);

    /* Spacing */
    --bbai-upgrade-padding-mobile: 20px;
    --bbai-upgrade-padding-tablet: 24px;
    --bbai-upgrade-padding-desktop: 32px;

    /* Typography - Fluid */
    --bbai-upgrade-headline-size: clamp(22px, 4vw, 28px);
    --bbai-upgrade-subheadline-size: clamp(14px, 2vw, 16px);
    --bbai-upgrade-feature-size: 15px;
    --bbai-upgrade-cta-size: 16px;
    --bbai-upgrade-microcopy-size: 13px;
}

/* ========================================
   DARK MODE
   ======================================== */

[data-theme="dark"],
.bbai-dark-mode {
    --bbai-text: #f1f5f9;
    --bbai-text-primary: #f1f5f9;
    --bbai-text-secondary: #cbd5e1;
    --bbai-text-muted: #94a3b8;

    --bbai-bg: #0f172a;
    --bbai-bg-primary: #0f172a;
    --bbai-bg-secondary: #1e293b;
    --bbai-bg-tertiary: #334155;
    --bbai-bg-page: #020617;
    --bbai-bg-card: #1e293b;
    --bbai-bg-elevated: #1e293b;

    --bbai-border: #334155;
    --bbai-border-primary: #334155;
    --bbai-border-secondary: #475569;
}

/* ========================================
   ACCESSIBILITY - Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    :root {
        --bbai-transition-fast: 0ms;
        --bbai-transition-base: 0ms;
        --bbai-transition-slow: 0ms;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */

@media (prefers-contrast: high) {
    :root {
        --bbai-border: var(--bbai-gray-700);
        --bbai-border-primary: var(--bbai-gray-700);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.bbai-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Consistent Focus Ring utility */
.bbai-focus-ring:focus-visible {
    outline: var(--bbai-focus-ring);
    outline-offset: var(--bbai-focus-ring-offset);
}

/* ========================================
   UNIFIED INTERACTIVE STATES
   Apply to all interactive elements for consistency
   ======================================== */

/* Standard hover lift effect */
.bbai-hover-lift {
    transition: transform var(--bbai-transition-fast) var(--bbai-ease-out),
                box-shadow var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-hover-lift:hover {
    transform: translateY(-2px);
}

/* Subtle hover for cards/rows */
.bbai-hover-subtle {
    transition: background-color var(--bbai-transition-fast) var(--bbai-ease-out),
                border-color var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-hover-subtle:hover {
    background-color: var(--bbai-bg-secondary);
}



/* 2. Base & Reset Styles */

/* Imported from: _base.css */
/**
 * Base Styles & Reset
 */
.bbai-wrap, .bbai-wrap *, .bbai-modern, .bbai-modern * { box-sizing: border-box; }

.bbai-wrap, .bbai-modern {
    margin: 0;
    padding: var(--bbai-space-6);
    background: var(--bbai-bg-page);
    font-family: var(--bbai-font);
    font-size: var(--bbai-text-base);
    line-height: 1.5;
    color: var(--bbai-text);
    -webkit-font-smoothing: antialiased;
}

body.media_page_bbai #wpwrap,
body.media_page_bbai #wpcontent,
body.media_page_bbai #wpbody-content { overflow-x: hidden; }



/* 3. Layout Components */

/* Imported from: _layout.css */
/**
 * Layout - Container, Grid, Flex utilities
 */

/* Base Container - shared width across all plugin tabs */
.bbai-container {
    max-width: var(--bbai-dashboard-max-width);
    margin: 0 auto;
    padding: var(--bbai-space-6);
    box-sizing: border-box;
}

/* Uniform content shell - canvas padding lives on .bbai-page-inner.bbai-page-container */
.bbai-container.bbai-content-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Page Header */
.bbai-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--bbai-space-6);
    flex-wrap: wrap;
    gap: var(--bbai-space-4);
}
.bbai-page-title {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
    line-height: 1.25;
}
.bbai-page-subtitle {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: var(--bbai-space-2) 0 0 0;
    line-height: 1.5;
}

/* Generic Grid */
.bbai-grid {
    display: grid;
    gap: var(--bbai-space-6);
}
.bbai-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.bbai-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1024px) {
    .bbai-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .bbai-grid-2,
    .bbai-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Flex utilities */
.bbai-flex {
    display: flex;
}
.bbai-flex-col {
    flex-direction: column;
}
.bbai-items-center {
    align-items: center;
}
.bbai-justify-between {
    justify-content: space-between;
}
.bbai-gap-2 {
    gap: var(--bbai-space-2);
}
.bbai-gap-3 {
    gap: var(--bbai-space-3);
}
.bbai-gap-4 {
    gap: var(--bbai-space-4);
}
.bbai-gap-6 {
    gap: var(--bbai-space-6);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

/* Dashboard Container */
.bbai-dashboard-container {
    max-width: var(--bbai-dashboard-max-width);
    margin: 0 auto;
}
.bbai-dashboard-header-section {
    margin-bottom: var(--bbai-space-6);
}
/* Typography standardized in _utilities.css and _pages.css */

/* Premium Stats Grid - Two Column Hero (Usage + Upsell) */
.bbai-premium-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}
.bbai-premium-stats-grid > * {
    min-height: 320px;
}
.bbai-premium-stats-grid--single {
    grid-template-columns: 1fr;
}
@media (max-width: 900px) {
    .bbai-premium-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Metrics Grid - 3 Equal Cards */
/* Note: Enhanced styles moved to _dashboard-polish.css */
.bbai-premium-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}
@media (max-width: 768px) {
    .bbai-premium-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Card (wrapper for dashboard cards) */
.bbai-premium-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-md);
    overflow: hidden;
}
/* Remove border when card contains gradient usage card */
.bbai-premium-card:has(.bbai-usage-card),
.bbai-premium-stats-grid > .bbai-premium-card:first-child {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
/* Fallback for browsers without :has() support */
.bbai-premium-stats-grid .bbai-premium-card:first-child {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.bbai-premium-card > .bbai-usage-card {
    border: none;
    border-radius: var(--bbai-radius-lg);
    height: 100%;
}

/* ============================================
   LIBRARY LAYOUT
   ============================================ */

.bbai-library-container {
    max-width: var(--bbai-dashboard-max-width);
    margin: 0 auto;
}
.bbai-library-header {
    margin-bottom: var(--bbai-space-6);
}
.bbai-library-title {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}
.bbai-library-subtitle {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: 0;
}

/* ============================================
   CREDIT USAGE LAYOUT
   (Primary styles in _pages.css)
   ============================================ */

/* ============================================
   SECTION SPACING
   ============================================ */

.bbai-section {
    margin-bottom: var(--section-spacing, var(--bbai-space-6));
}
.bbai-section:last-child {
    margin-bottom: 0;
}



/* 4. UI Components */

/* Imported from: _cards.css */
/**
 * Card Components - Premium SaaS Design
 * Refined shadows, subtle animations, professional polish
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   BASE CARD
   ============================================ */

.bbai-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: 16px; /* Consistent card radius */
    padding: 24px; /* Consistent card padding */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow var(--bbai-transition-base) var(--bbai-ease-out),
                border-color var(--bbai-transition-base) var(--bbai-ease-out),
                transform var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-card:hover {
    box-shadow: var(--bbai-shadow-card-hover);
}

.bbai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    margin-bottom: var(--bbai-space-5);
    padding-bottom: var(--bbai-space-5);
    border-bottom: 1px solid var(--bbai-border);
}

.bbai-card-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
    line-height: var(--bbai-leading-tight);
}

.bbai-card-subtitle {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: var(--bbai-space-1) 0 0 0;
}

.bbai-card-body {
    padding: 0;
}

.bbai-card-footer {
    margin-top: var(--bbai-space-5);
    padding-top: var(--bbai-space-5);
    border-top: 1px solid var(--bbai-border);
}

/* ============================================
   STAT CARDS - Metric Display
   ============================================ */

.bbai-stat-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: 16px; /* Consistent card radius */
    padding: 24px; /* Consistent card padding */
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-stat-card:hover {
    border-color: var(--bbai-primary);
    box-shadow: var(--bbai-shadow-card-hover), 0 0 0 3px var(--bbai-primary-soft);
    transform: translateY(-2px);
}

.bbai-stat-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto var(--bbai-space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bbai-radius-xl);
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
}

.bbai-stat-icon svg {
    width: 24px;
    height: 24px;
}

.bbai-stat-value {
    font-size: var(--bbai-text-4xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    line-height: 1;
    margin-bottom: var(--bbai-space-2);
    letter-spacing: -0.02em;
}

.bbai-stat-label {
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bbai-stat-change {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    margin-top: var(--bbai-space-2);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-medium);
}

.bbai-stat-change--positive {
    color: var(--bbai-success);
}

.bbai-stat-change--negative {
    color: var(--bbai-error);
}

/* ============================================
   USAGE CARD - Clean White Design
   ============================================ */

.bbai-usage-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-6);
    color: var(--bbai-text);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.bbai-usage-card * {
    color: var(--bbai-text);
    position: relative;
}

/* Ensure buttons maintain their specific colors */
.bbai-usage-card .bbai-usage-action-btn,
.bbai-usage-card .bbai-usage-action-btn *,
.bbai-usage-card .bbai-usage-upgrade-link,
.bbai-usage-card .bbai-usage-upgrade-link * {
    color: inherit;
}

/* Plan Badge */
.bbai-usage-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--bbai-radius-full);
    font-size: 11px;
    font-weight: var(--bbai-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--bbai-space-3);
    width: fit-content;
    align-self: flex-start;
}

.bbai-usage-plan-badge--free,
.bbai-usage-card .bbai-usage-plan-badge--free {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    color: #ffffff !important;
}

.bbai-usage-plan-badge--growth {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #ffffff !important;
}

.bbai-usage-plan-badge--agency-polished {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: #ffffff !important;
}

/* Card Title */
.bbai-usage-card-title {
    font-size: 12px;
    font-weight: var(--bbai-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bbai-text-muted);
    margin: 0 0 var(--bbai-space-4) 0;
    text-align: center;
}

.bbai-usage-card-subtitle {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-normal);
    color: var(--bbai-text-muted);
    margin: 0 0 var(--bbai-space-4) 0;
    line-height: 1.5;
}

/* Usage Count Text - "X of Y images used this month" */
.bbai-usage-count-text {
    font-size: 15px;
    font-weight: var(--bbai-font-normal);
    color: var(--bbai-text);
    margin: var(--bbai-space-4) 0;
    text-align: center;
    line-height: 1.4;
}

.bbai-usage-count-text strong {
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
}

/* Progress Ring */
.bbai-usage-ring {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto var(--bbai-space-6);
}

.bbai-usage-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
}

.bbai-usage-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 10;
}

.bbai-usage-ring-progress {
    fill: none;
    stroke: #10B981;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bbai-usage-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bbai-usage-percent-value {
    font-size: var(--bbai-text-4xl);
    font-weight: var(--bbai-font-bold);
    line-height: 1;
    letter-spacing: -0.02em;
}

.bbai-usage-percent-label {
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-medium);
    opacity: 0.8;
    margin-top: var(--bbai-space-1);
}

.bbai-usage-count {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-medium);
    margin-bottom: var(--bbai-space-1);
}

.bbai-usage-count strong {
    font-weight: var(--bbai-font-bold);
}

.bbai-usage-reset {
    font-size: var(--bbai-text-sm);
    opacity: 0.7;
    margin-bottom: var(--bbai-space-6);
}

/* Plan Badge - Pro/Agency variants for dark backgrounds */
.bbai-usage-plan-badge--pro {
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #ffffff !important;
}

.bbai-usage-plan-badge--agency {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(147, 51, 234, 0.4) 100%);
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: #ffffff !important;
}

/* Action Links - Enhanced Upgrade Button - PRIMARY CTA */
.bbai-usage-upgrade-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--bbai-space-3);
    padding: 16px 32px;
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-bold);
    color: white !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--bbai-radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    text-transform: none;
    min-height: 48px;
    white-space: nowrap;
    text-align: center !important;
    margin: var(--bbai-space-6) auto 0 !important;
    width: 100%;
    max-width: 100%;
    z-index: 10;
}

.bbai-usage-upgrade-link > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.5;
}

.bbai-usage-upgrade-link .bbai-upgrade-arrow {
    flex-shrink: 0;
    margin-left: 0;
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
}

/* Shimmer effect on button */
.bbai-usage-upgrade-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.bbai-usage-upgrade-link:hover::before {
    left: 100%;
}

.bbai-usage-upgrade-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5), 0 3px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.bbai-usage-upgrade-link:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bbai-usage-upgrade-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
    box-shadow: 0 10px 32px rgba(5, 150, 105, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(16, 185, 129, 0.3);
}

/* Arrow icon animation */
.bbai-usage-upgrade-link .bbai-upgrade-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 4px;
}

.bbai-usage-upgrade-link:hover .bbai-upgrade-arrow {
    transform: translateX(4px);
}

.bbai-usage-upgrade-link:active .bbai-upgrade-arrow {
    transform: translateX(2px);
}

/* Urgent state - more prominent */
.bbai-usage-upgrade-link.bbai-btn--urgent {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: urgent-pulse 2s ease-in-out infinite;
}

.bbai-usage-upgrade-link.bbai-btn--urgent:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    box-shadow: 0 12px 32px rgba(217, 119, 6, 0.6), 0 6px 16px rgba(0, 0, 0, 0.2);
}

@keyframes urgent-pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(217, 119, 6, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(217, 119, 6, 0.7), 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.bbai-usage-milestone {
    display: inline-block;
    padding: var(--bbai-space-2) var(--bbai-space-4);
    margin: var(--bbai-space-3) 0;
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--bbai-radius-full);
    text-align: center;
    animation: bbai-fade-in 0.5s ease-out;
}

/* Usage Comparison - Free vs Pro */
.bbai-usage-comparison {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
    margin: var(--bbai-space-5) 0;
    padding: var(--bbai-space-4);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--bbai-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bbai-usage-comparison-item {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    font-size: var(--bbai-text-sm);
}

.bbai-usage-comparison-label {
    min-width: 80px;
    font-weight: var(--bbai-font-medium);
    color: rgba(255, 255, 255, 0.9);
}

.bbai-usage-comparison-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    position: relative;
}

.bbai-usage-comparison-bar--free .bbai-usage-comparison-bar-fill {
    background: rgba(255, 255, 255, 0.3);
    height: 100%;
    border-radius: var(--bbai-radius-full);
}

.bbai-usage-comparison-bar--pro .bbai-usage-comparison-bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    height: 100%;
    border-radius: var(--bbai-radius-full);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.bbai-usage-comparison-value {
    min-width: 90px;
    text-align: right;
    font-weight: var(--bbai-font-semibold);
    color: rgba(255, 255, 255, 0.95);
    font-size: var(--bbai-text-sm);
}

/* Focus states for all interactive elements */
.bbai-usage-action-btn:focus-visible,
.bbai-upsell-cta:focus-visible {
    outline: 3px solid var(--bbai-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.bbai-usage-billing-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-2);
    margin-top: var(--bbai-space-3);
    padding: 10px 20px;
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--bbai-radius);
    text-decoration: none;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-usage-billing-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white !important;
}

/* ============================================
   UPSELL CARD - High Conversion Redesign
   Premium SaaS upgrade component optimized for CTR
   ============================================ */

.bbai-upsell-card {
    background: var(--bbai-upgrade-gradient, linear-gradient(135deg, #4f46e5 0%, #6366f1 40%, #7c3aed 100%));
    border: none;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    color: var(--bbai-upgrade-text, #ffffff);
    position: relative;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bbai-upsell-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Ensure all text is white and positioned above decorations */
.bbai-upsell-card * {
    color: var(--bbai-upgrade-text, #ffffff);
    position: relative;
    z-index: 1;
}

/* Layout - Single column, stacked for clarity */
.bbai-upsell-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-6);
}

.bbai-upsell-card-left {
    display: flex;
    flex-direction: column;
}

.bbai-upsell-card-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Badge - Tier Identity */
.bbai-upsell-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--bbai-radius-full);
    font-size: 11px;
    font-weight: var(--bbai-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--bbai-space-5);
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #1e293b;
}

/* Headline */
.bbai-upsell-title {
    font-size: 26px;
    font-weight: var(--bbai-font-bold);
    margin: 0 0 var(--bbai-space-3) 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #ffffff;
}

/* Subheadline */
.bbai-upsell-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 var(--bbai-space-6) 0;
    line-height: 1.5;
    font-weight: var(--bbai-font-normal);
}

/* Features List */
.bbai-upsell-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--bbai-space-8) 0;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
}

.bbai-upsell-features li {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    font-size: 14px;
    font-weight: var(--bbai-font-normal);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
}

.bbai-upsell-features li svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.bbai-upsell-features li svg path {
    stroke: currentColor !important;
    stroke-width: 2.5;
}

/* Feature text */
.bbai-upsell-features li span {
    color: rgba(255, 255, 255, 0.95);
}

/* CTA Wrapper */
.bbai-upsell-cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    margin-top: var(--bbai-space-4);
    width: 100%;
}

/* Primary CTA Button - Dark Slate for contrast on gradient */
.bbai-upsell-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-2);
    width: 100%;
    background: #ffffff !important;
    color: #1e293b !important;
    padding: 16px 24px;
    min-height: 48px;
    border-radius: 10px;
    font-weight: var(--bbai-font-semibold);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    margin-top: var(--bbai-space-4);
}

.bbai-upsell-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #f8fafc !important;
}

.bbai-upsell-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Focus state - WCAG compliant */
.bbai-upsell-cta:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Override text color for CTA elements - dark on white */
.bbai-upsell-card .bbai-upsell-cta,
.bbai-upsell-card .bbai-upsell-cta span {
    color: #1e293b !important;
}

/* Microcopy */
.bbai-upsell-cta-hint {
    margin: var(--bbai-space-2) 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: var(--bbai-font-normal);
    text-align: left;
    line-height: 1.4;
}

/* Secondary Link */
.bbai-upsell-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--bbai-space-1);
    font-size: 14px;
    font-weight: var(--bbai-font-medium);
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
    min-height: 44px;
}

.bbai-upsell-secondary-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

.bbai-upsell-secondary-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Agency Variant - Purple Gradient */
.bbai-upsell-card--agency {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 40%, #a855f7 100%);
}

.bbai-upsell-card--agency:hover {
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.3), 0 6px 20px rgba(0, 0, 0, 0.12);
}

.bbai-upsell-card--agency .bbai-upsell-cta,
.bbai-upsell-card--agency .bbai-upsell-cta span {
    color: #ffffff !important;
}

/* Responsive - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .bbai-upsell-card {
        padding: 32px 36px;
    }

    .bbai-upsell-title {
        font-size: 26px;
    }

    .bbai-upsell-subtitle {
        margin-bottom: var(--bbai-space-6);
    }

    .bbai-upsell-features {
        margin-bottom: var(--bbai-space-8);
    }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .bbai-upsell-card {
        padding: 28px 24px;
    }

    .bbai-upsell-badge {
        margin-bottom: var(--bbai-space-4);
    }

    .bbai-upsell-title {
        font-size: 22px;
    }

    .bbai-upsell-subtitle {
        font-size: 15px;
        margin-bottom: var(--bbai-space-6);
    }

    .bbai-upsell-features {
        gap: var(--bbai-space-3);
        margin-bottom: var(--bbai-space-8);
    }

    .bbai-upsell-features li {
        font-size: 14px;
    }

    .bbai-upsell-features li svg {
        width: 20px;
        height: 20px;
        padding: 3px;
    }

    .bbai-upsell-cta {
        padding: 16px 24px;
        min-height: 52px;
        font-size: 15px;
    }

    .bbai-upsell-cta-wrapper {
        max-width: 100%;
    }
}

/* ============================================
   CARD MODIFIERS
   ============================================ */

.bbai-card--compact {
    padding: var(--bbai-space-4);
}

.bbai-card--large {
    padding: var(--bbai-space-8);
}

.bbai-card--featured {
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft), var(--bbai-shadow-card);
}

.bbai-card--clickable {
    cursor: pointer;
}

.bbai-card--clickable:hover {
    border-color: var(--bbai-primary);
    transform: translateY(-2px);
}

.bbai-card--success {
    border-color: var(--bbai-success);
    background: var(--bbai-success-bg);
}

.bbai-card--warning {
    border-color: var(--bbai-warning);
    background: var(--bbai-warning-bg);
}

.bbai-card--error {
    border-color: var(--bbai-error);
    background: var(--bbai-error-bg);
}

.bbai-card--info {
    border-color: var(--bbai-info);
    background: var(--bbai-info-bg);
}

/* ============================================
   METRIC CARDS (Dashboard Grid)
   ============================================ */

.bbai-metric-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-6);
    display: flex;
    flex-direction: column;
    box-shadow: var(--bbai-shadow-card);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-metric-card:hover {
    border-color: var(--bbai-gray-300);
    box-shadow: var(--bbai-shadow-card-hover);
}

.bbai-metric-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bbai-radius-lg);
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
    margin-bottom: var(--bbai-space-4);
}

.bbai-metric-card__icon svg {
    width: 22px;
    height: 22px;
}

.bbai-metric-card__value {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    line-height: 1;
    margin-bottom: var(--bbai-space-1);
    letter-spacing: -0.02em;
}

.bbai-metric-card__label {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-3);
}

.bbai-metric-card__footer {
    margin-top: auto;
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-border);
}

/* Color variants for icons */
.bbai-metric-card__icon--success {
    background: var(--bbai-success-bg);
    color: var(--bbai-success);
}

.bbai-metric-card__icon--warning {
    background: var(--bbai-warning-bg);
    color: var(--bbai-warning);
}

.bbai-metric-card__icon--info {
    background: var(--bbai-info-bg);
    color: var(--bbai-info);
}

.bbai-metric-card__icon--purple {
    background: #ede9fe;
    color: #7c3aed;
}

/* ============================================
   PREMIUM CARD WRAPPER
   ============================================ */

.bbai-premium-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    overflow: hidden;
}

/* Remove border when containing gradient cards */
.bbai-premium-card:has(.bbai-usage-card),
.bbai-premium-card:has(.bbai-upsell-card) {
    border: none;
    background: transparent;
    box-shadow: none;
}

.bbai-premium-card > .bbai-usage-card,
.bbai-premium-card > .bbai-upsell-card {
    height: 100%;
}

/* ============================================
   AGENCY THANK YOU CARD
   ============================================ */

.bbai-agency-thank-you-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdfa 100%);
    border: 1px solid var(--bbai-success-light);
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    text-align: center;
}

.bbai-thank-you-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bbai-space-4);
    margin-bottom: var(--bbai-space-6);
}

.bbai-thank-you-icon {
    color: var(--bbai-success);
}

.bbai-thank-you-text {
    text-align: center;
}

.bbai-thank-you-text .bbai-card-title {
    color: var(--bbai-success-dark);
    margin-bottom: var(--bbai-space-2);
}

.bbai-thank-you-text .bbai-card-subtitle {
    color: var(--bbai-text-muted);
    max-width: 400px;
    margin: 0 auto;
}

.bbai-agency-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--bbai-space-4);
}

.bbai-agency-link {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-3) var(--bbai-space-5);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    color: var(--bbai-text);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    text-decoration: none;
    transition: all var(--bbai-transition-base);
}

.bbai-agency-link:hover {
    background: var(--bbai-gray-50);
    border-color: var(--bbai-primary);
    color: var(--bbai-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.bbai-agency-link svg {
    flex-shrink: 0;
}

/* Agency upgrade card variant */
.bbai-upgrade-agency-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.bbai-upgrade-agency-card .bbai-card-title,
.bbai-upgrade-agency-card .bbai-card-subtitle,
.bbai-upgrade-agency-card .bbai-benefit-text {
    color: #ffffff;
}

.bbai-upgrade-agency-card .bbai-benefit-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.bbai-upgrade-agency-card .bbai-cta-microcopy {
    color: rgba(255, 255, 255, 0.7);
}

.bbai-upgrade-agency-card .bbai-compare-link {
    color: rgba(255, 255, 255, 0.8);
}

.bbai-upgrade-agency-card .bbai-compare-link:hover {
    color: #ffffff;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .bbai-card {
        padding: var(--bbai-space-5);
    }

    .bbai-stat-card {
        padding: var(--bbai-space-5);
    }

    .bbai-usage-card,
    .bbai-upsell-card {
        padding: var(--bbai-space-6);
    }

    .bbai-upsell-card-content {
        grid-template-columns: 1fr;
        gap: var(--bbai-space-6);
    }

    .bbai-upsell-title {
        font-size: 28px;
    }

    .bbai-upsell-cta--prominent {
        padding: 20px 32px;
        font-size: var(--bbai-text-lg);
    }

    .bbai-usage-ring {
        width: 140px;
        height: 140px;
    }

    .bbai-stat-value,
    .bbai-metric-card__value {
        font-size: var(--bbai-text-3xl);
    }

    .bbai-upsell-title {
        font-size: var(--bbai-text-xl);
    }
}



/* Imported from: _buttons.css */
/**
 * Buttons - Premium SaaS Design
 * Refined interactions, accessible focus states, polished feel
 *
 * Canonical tokens: --bbai-btn-* (bbai-admin-foundation-tokens.css).
 * Optional BEM: .bbai-btn--primary | --secondary | --tertiary | --sm | --full
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   BASE BUTTON
   ============================================ */

.bbai-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-btn-gap, 8px);
    padding: 10px 20px !important; /* Consistent base padding */
    font-size: var(--bbai-btn-font-size, 14px);
    font-weight: var(--bbai-btn-font-weight, 600);
    font-family: inherit;
    line-height: var(--bbai-btn-line-height, 1.25);
    border-radius: var(--bbai-btn-radius, 8px);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    /* Ensure visibility - explicit defaults */
    background-color: #f3f4f6;
    color: #111827;
}

/* Focus States - Accessible */
.bbai-btn:focus {
    outline: none;
}

.bbai-btn:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
    box-shadow: var(--bbai-shadow-focus);
}

/* Disabled State - WCAG AA Compliant (4.5:1 contrast ratio) */
.bbai-btn:disabled,
.bbai-btn.is-disabled {
    background: var(--bbai-gray-200) !important;
    color: var(--bbai-gray-600) !important;
    border-color: var(--bbai-gray-300) !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

.bbai-btn:disabled::before,
.bbai-btn.is-disabled::before {
    display: none;
}

/* ============================================
   PRIMARY BUTTON - Main CTA
   ============================================ */

.bbai-btn-primary,
.bbai-btn.bbai-btn--primary {
    min-height: var(--bbai-btn-height, var(--bbai-cta-primary-min-height, 40px));
    padding-left: var(--bbai-cta-primary-padding-x, 16px) !important;
    padding-right: var(--bbai-cta-primary-padding-x, 16px) !important;
    min-width: var(--bbai-cta-primary-min-width, 220px);
    border-radius: var(--bbai-cta-primary-radius, 8px);
    font-size: var(--bbai-cta-primary-font-size, 14px);
    font-weight: var(--bbai-cta-primary-font-weight, 500);
    background: var(--bbai-cta-primary-bg, #10b981) !important;
    color: white !important;
    border-color: var(--bbai-cta-primary-bg, #10b981) !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    transform: translateY(0);
    position: relative;
    overflow: hidden;
    transition: var(--bbai-cta-primary-transition, all 0.15s ease);
}

.bbai-btn-primary::before,
.bbai-btn.bbai-btn--primary::before {
    display: none;
}

.bbai-btn-primary:hover:not(:disabled),
.bbai-btn.bbai-btn--primary:hover:not(:disabled) {
    background: var(--bbai-cta-primary-bg-hover, #059669) !important;
    border-color: var(--bbai-cta-primary-bg-hover, #059669) !important;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

.bbai-btn-primary:hover:not(:disabled)::before,
.bbai-btn.bbai-btn--primary:hover:not(:disabled)::before {
    display: none;
}

.bbai-btn-primary:active:not(:disabled),
.bbai-btn.bbai-btn--primary:active:not(:disabled) {
    background: var(--bbai-cta-primary-bg-active, #047857) !important;
    border-color: var(--bbai-cta-primary-bg-active, #047857) !important;
    transform: translateY(0) scale(0.98);
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.bbai-btn-primary:focus-visible,
.bbai-btn.bbai-btn--primary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    transform: translateY(0);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(16, 185, 129, 0.35);
}

.bbai-btn.bbai-btn-primary.bbai-btn-sm,
.bbai-btn-primary.bbai-btn-sm,
.bbai-btn.bbai-btn--primary.bbai-btn-sm,
.bbai-btn.bbai-btn--primary.bbai-btn--sm {
    min-width: 0;
    min-height: var(--bbai-btn-height-sm, 36px);
}

/* ============================================
   SECONDARY BUTTON - Outlined
   ============================================ */

.bbai-btn-secondary,
.bbai-btn.bbai-btn--secondary {
    background: #ffffff !important;
    color: #64748b !important;
    border: 1px solid #e8ecf0 !important;
    box-shadow: none !important;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.bbai-btn-secondary:hover:not(:disabled),
.bbai-btn.bbai-btn--secondary:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: #dce3e9 !important;
    color: #475569 !important;
    transform: none;
    box-shadow: none !important;
}

.bbai-btn-secondary:active:not(:disabled),
.bbai-btn.bbai-btn--secondary:active:not(:disabled) {
    transform: none;
    background: #f1f5f9 !important;
}

/* ============================================
   TERTIARY / GHOST BUTTON
   ============================================ */

.bbai-btn-tertiary,
.bbai-btn-ghost,
.bbai-btn.bbai-btn--tertiary,
.bbai-btn.bbai-btn--ghost {
    background: transparent;
    color: var(--bbai-text-secondary);
    border-color: transparent;
    padding: var(--bbai-space-2) var(--bbai-space-3);
}

.bbai-btn-tertiary:hover:not(:disabled),
.bbai-btn-ghost:hover:not(:disabled),
.bbai-btn.bbai-btn--tertiary:hover:not(:disabled),
.bbai-btn.bbai-btn--ghost:hover:not(:disabled) {
    color: var(--bbai-primary);
    background: var(--bbai-primary-soft);
}

/* ============================================
   LINK BUTTON
   ============================================ */

.bbai-link-btn,
.bbai-link-sm {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--bbai-primary);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    cursor: pointer;
    text-decoration: none;
    transition: color var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-link-btn:hover,
.bbai-link-sm:hover {
    color: var(--bbai-primary-hover);
    text-decoration: underline;
}

.bbai-link-btn:focus-visible,
.bbai-link-sm:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-link-sm--disabled,
.bbai-link-sm--disabled:hover,
.bbai-link-sm:disabled,
.bbai-link-sm:disabled:hover {
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.6;
}

/* ============================================
   SUCCESS BUTTON
   ============================================ */

.bbai-btn-success {
    background: var(--bbai-success);
    color: white !important;
    border-color: var(--bbai-success);
    box-shadow: var(--bbai-shadow-button);
}

.bbai-btn-success:hover:not(:disabled) {
    background: var(--bbai-success-dark);
    border-color: var(--bbai-success-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.bbai-btn-success:active:not(:disabled) {
    transform: translateY(0);
}

/* ============================================
   DANGER BUTTON
   ============================================ */

.bbai-btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

.bbai-btn-danger:hover:not(:disabled) {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.bbai-btn-danger:active:not(:disabled) {
    transform: translateY(0);
}

/* ============================================
   INFO BUTTON
   ============================================ */

.bbai-btn-info {
    background: var(--bbai-info);
    color: white !important;
    border-color: var(--bbai-info);
}

.bbai-btn-info:hover:not(:disabled) {
    background: var(--bbai-info-dark);
    border-color: var(--bbai-info-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* ============================================
   BUTTON SIZES
   ============================================ */

.bbai-btn-sm,
.bbai-btn.bbai-btn--sm {
    padding: 8px 16px !important; /* Consistent small padding */
    font-size: var(--bbai-btn-font-size-sm, 13px) !important;
    border-radius: var(--bbai-btn-radius, 8px) !important;
}

.bbai-btn-lg {
    padding: 14px 28px !important; /* Consistent large padding */
    font-size: 15px !important;
    border-radius: 12px !important;
}

.bbai-btn-xl {
    padding: 1rem 2rem;
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-bold);
    border-radius: var(--bbai-radius-lg);
}

/* Full width */
.bbai-btn-block,
.bbai-btn.bbai-btn--full {
    width: 100%;
}

/* ============================================
   BUTTON ICONS & LOADING
   ============================================ */

.bbai-btn-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.bbai-btn-lg .bbai-btn-icon {
    width: 20px;
    height: 20px;
}

.bbai-btn-sm .bbai-btn-icon {
    width: 14px;
    height: 14px;
}

/* Icon-only button - 44px minimum touch target for accessibility */
.bbai-btn-icon-only {
    /* Must win over .bbai-btn padding !important so the icon is not clipped (border-box + overflow:hidden) */
    padding: var(--bbai-space-2) !important;
    aspect-ratio: 1;
    min-width: 44px;
    min-height: 44px;
}

.bbai-btn-icon-only.bbai-btn-sm {
    padding: var(--bbai-space-1-5);
    min-width: 36px;
    min-height: 36px;
}

.bbai-btn-icon-only.bbai-btn-lg {
    padding: var(--bbai-space-3);
    min-width: 48px;
    min-height: 48px;
}

/* Loading spinner */
.bbai-btn__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: bbai-spin 0.6s linear infinite;
}

.bbai-btn.is-loading .bbai-btn__spinner {
    display: inline-block;
}

.bbai-btn.is-loading .bbai-btn-icon,
.bbai-btn.is-loading .bbai-btn__text {
    opacity: 0;
}

.bbai-btn.is-loading {
    pointer-events: none;
    position: relative;
}

.bbai-btn.is-loading .bbai-btn__spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

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

/* ============================================
   REGENERATE BUTTON (Library Table)
   ============================================ */

.bbai-btn-regenerate {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: 8px 16px !important; /* Consistent with small buttons */
    font-size: 13px !important;
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-primary);
    background: transparent;
    border: 1px solid var(--bbai-border);
    border-radius: 6px !important;
    cursor: pointer;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-btn-regenerate:hover:not(:disabled) {
    border-color: var(--bbai-primary);
    background: var(--bbai-primary-soft);
}

.bbai-btn-regenerate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bbai-btn-regenerate svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   OPTIMIZATION CTA BUTTONS
   ============================================ */

.bbai-optimization-cta {
    flex: 1;
    min-width: 200px;
    padding: 14px 28px !important; /* Consistent large button padding */
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-2);
    border: 2px solid transparent;
    text-decoration: none;
    box-sizing: border-box;
}

.bbai-optimization-cta--primary {
    background: #10b981;
    color: white !important;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    font-weight: 600;
    font-size: 15px !important;
    padding: 14px 28px !important; /* Consistent large button padding */
    position: relative;
    overflow: hidden;
}

.bbai-optimization-cta--primary::before {
    display: none;
}

.bbai-optimization-cta--primary:hover:not(:disabled) {
    background: #059669;
    transform: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.bbai-optimization-cta--primary:hover:not(:disabled)::before {
    display: none;
}

.bbai-optimization-cta--primary:active:not(:disabled) {
    background: #047857;
    transform: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.bbai-optimization-cta--primary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(16, 185, 129, 0.35);
}

.bbai-optimization-cta--secondary {
    background: var(--bbai-bg);
    color: var(--bbai-text);
    border-color: var(--bbai-border);
}

.bbai-optimization-cta--secondary:hover:not(:disabled) {
    background: var(--bbai-bg-secondary);
    border-color: var(--bbai-gray-300);
    transform: translateY(-1px);
    box-shadow: var(--bbai-shadow-sm);
}

.bbai-optimization-cta--secondary:active:not(:disabled) {
    transform: translateY(0);
}

.bbai-optimization-cta--locked,
.bbai-optimization-cta--disabled,
.bbai-optimization-cta:disabled {
    background: var(--bbai-gray-200) !important;
    color: var(--bbai-gray-500) !important;
    border-color: var(--bbai-gray-300) !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

/* Disabled state for when no missing images */
.bbai-optimization-cta--disabled {
    opacity: 0.6;
    background: var(--bbai-gray-100) !important;
    color: var(--bbai-gray-400) !important;
}

/* ============================================
   BUTTON GROUPS
   ============================================ */

.bbai-btn-group {
    display: flex;
    gap: var(--bbai-btn-group-gap, var(--bbai-space-2-5));
    flex-wrap: wrap;
    align-items: center;
}

.bbai-btn-group--center {
    justify-content: center;
}

.bbai-btn-group--stretch .bbai-btn {
    flex: 1;
}

/* Segmented buttons */
.bbai-btn-group--segmented {
    gap: 0;
}

.bbai-btn-group--segmented .bbai-btn {
    border-radius: 0;
}

.bbai-btn-group--segmented .bbai-btn:first-child {
    border-radius: var(--bbai-radius) 0 0 var(--bbai-radius);
}

.bbai-btn-group--segmented .bbai-btn:last-child {
    border-radius: 0 var(--bbai-radius) var(--bbai-radius) 0;
}

.bbai-btn-group--segmented .bbai-btn:not(:last-child) {
    border-right: none;
}

/* ============================================
   SPECIAL VARIANTS
   ============================================ */

/* Outline primary */
.bbai-btn-outline-primary {
    background: transparent;
    color: var(--bbai-primary);
    border-color: var(--bbai-primary);
}

.bbai-btn-outline-primary:hover:not(:disabled) {
    background: var(--bbai-primary);
    color: white;
}

/* Gradient button */
.bbai-btn-gradient {
    background: var(--bbai-gradient-primary);
    color: white !important;
    border: none;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.bbai-btn-gradient:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Dark button */
.bbai-btn-dark {
    background: var(--bbai-gray-900);
    color: white !important;
    border-color: var(--bbai-gray-900);
}

.bbai-btn-dark:hover:not(:disabled) {
    background: var(--bbai-gray-800);
    border-color: var(--bbai-gray-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   COMPATIBILITY/ALIAS CLASSES
   Legacy button classes that map to unified system
   These are kept for backwards compatibility while templates are being migrated.
   New code should use bbai-btn + bbai-btn-{variant} directly.
   ============================================ */

/* Action buttons (dashboard) - styles defined in _dashboard-redesign.css */
/* NOTE: .bbai-action-btn-primary and .bbai-action-btn-secondary are styled
   specifically within .bbai-usage-card-redesign context in _dashboard-redesign.css
   to maintain purple/orange gradients. Do not add generic styles here. */
.bbai-action-btn {
    /* Base button styles applied via .bbai-btn class */
}

/* Bulk buttons - map to primary/secondary */
.bbai-bulk-btn--primary {
    /* Use bbai-btn bbai-btn-primary instead */
    background: var(--bbai-primary-gradient);
    color: white !important;
    border: none;
    padding: 10px 20px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    font-weight: var(--bbai-button-font-weight);
    box-shadow: var(--bbai-shadow-button);
}

.bbai-bulk-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--bbai-shadow-button-hover);
}

.bbai-bulk-btn--secondary {
    /* Use bbai-btn bbai-btn-secondary instead */
    background: var(--bbai-gradient-secondary);
    color: var(--bbai-text-inverse);
    border: none;
    padding: 10px 20px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    font-weight: var(--bbai-button-font-weight);
    box-shadow: var(--bbai-shadow-button);
}

.bbai-bulk-btn--secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--bbai-shadow-button-hover);
}

/* Settings page buttons - use unified variants */
.bbai-settings-plan-upgrade-btn-large,
.bbai-settings-license-activate-btn,
.bbai-settings-account-upgrade-btn,
.bbai-settings-save-btn {
    /* Use bbai-btn bbai-btn-primary instead */
    background: var(--bbai-primary-gradient);
    color: white !important;
    border-color: var(--bbai-primary);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.1);
    padding: 10px 20px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

.bbai-settings-plan-upgrade-btn-large {
    padding: 14px 28px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
}

.bbai-settings-license-deactivate-btn {
    /* Use bbai-btn bbai-btn-danger instead */
    background: var(--bbai-error);
    color: white !important;
    border-color: var(--bbai-error);
}

.bbai-settings-license-deactivate-btn:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.bbai-settings-account-action-btn {
    /* Use bbai-btn bbai-btn-secondary instead */
    background: var(--bbai-bg);
    color: var(--bbai-text);
    border-color: var(--bbai-border);
}

.bbai-settings-account-action-btn:hover:not(:disabled) {
    background: var(--bbai-bg-secondary);
    border-color: var(--bbai-gray-300);
}

/* Outline button compatibility (legacy) - maps to outline-primary */
.bbai-btn-outline {
    background: transparent;
    color: var(--bbai-primary);
    border-color: var(--bbai-primary);
    border-width: 2px;
}

.bbai-btn-outline:hover:not(:disabled) {
    background: var(--bbai-primary);
    color: white;
}

/* Back button (link style) */
.bbai-back-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--bbai-primary);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    text-decoration: none;
}

.bbai-back-btn:hover {
    color: var(--bbai-primary-hover);
    text-decoration: underline;
}

/* Upgrade CTA buttons - map to primary */
.bbai-upgrade-cta-green {
    /* Use bbai-btn bbai-btn-primary instead */
    background: var(--bbai-primary-gradient);
    color: white !important;
}

/* Pagination buttons - map to secondary */
.bbai-pagination-btn {
    /* Use bbai-btn bbai-btn-secondary bbai-btn-sm instead */
    background: var(--bbai-bg);
    color: var(--bbai-text);
    border-color: var(--bbai-border);
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

.bbai-pagination-btn:hover:not(:disabled) {
    background: var(--bbai-bg-secondary);
}

.bbai-pagination-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Agency export button */
.bbai-agency-export-btn {
    /* Use bbai-btn bbai-btn-secondary instead */
    background: var(--bbai-bg);
    color: var(--bbai-text);
    border-color: var(--bbai-border);
}

.bbai-agency-export-btn:hover:not(:disabled) {
    background: var(--bbai-bg-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .bbai-optimization-cta {
        min-width: 100%;
        padding: 14px 28px !important; /* Consistent large padding */
    }

    .bbai-btn-group:not(.bbai-btn-group--segmented) {
        flex-direction: column;
    }

    .bbai-btn-group:not(.bbai-btn-group--segmented) .bbai-btn {
        width: 100%;
    }
}

/* ============================================
   WORDPRESS ADMIN OVERRIDES
   High-specificity rules to override WP admin CSS
   ============================================ */

/* Primary Button - solid product green (matches banner / hero CTAs) */
.wrap .bbai-btn.bbai-btn-primary,
.bbai-dashboard-container .bbai-btn.bbai-btn-primary,
.bbai-settings-card .bbai-btn.bbai-btn-primary,
.bbai-card .bbai-btn.bbai-btn-primary,
button.bbai-btn.bbai-btn-primary,
a.bbai-btn.bbai-btn-primary {
    min-height: var(--bbai-cta-primary-min-height, 40px) !important;
    min-width: var(--bbai-cta-primary-min-width, 220px);
    border-radius: var(--bbai-cta-primary-radius, 8px) !important;
    font-size: var(--bbai-cta-primary-font-size, 14px) !important;
    font-weight: var(--bbai-cta-primary-font-weight, 500) !important;
    background: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    border-color: var(--bbai-cta-primary-bg, #10b981) !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    transform: translateY(0) !important;
    transition: var(--bbai-cta-primary-transition, all 0.15s ease) !important;
}

.wrap .bbai-btn.bbai-btn-primary:hover,
.bbai-dashboard-container .bbai-btn.bbai-btn-primary:hover,
.bbai-settings-card .bbai-btn.bbai-btn-primary:hover,
.bbai-card .bbai-btn.bbai-btn-primary:hover,
button.bbai-btn.bbai-btn-primary:hover,
a.bbai-btn.bbai-btn-primary:hover {
    background: var(--bbai-cta-primary-bg-hover, #059669) !important;
    border-color: var(--bbai-cta-primary-bg-hover, #059669) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1)) !important;
}

.wrap .bbai-btn.bbai-btn-primary:active,
.bbai-dashboard-container .bbai-btn.bbai-btn-primary:active,
.bbai-settings-card .bbai-btn.bbai-btn-primary:active,
.bbai-card .bbai-btn.bbai-btn-primary:active,
button.bbai-btn.bbai-btn-primary:active,
a.bbai-btn.bbai-btn-primary:active {
    background: var(--bbai-cta-primary-bg-active, #047857) !important;
    border-color: var(--bbai-cta-primary-bg-active, #047857) !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    transform: translateY(0) scale(0.98) !important;
}

.wrap .bbai-btn.bbai-btn-primary.bbai-btn-sm,
.bbai-dashboard-container .bbai-btn.bbai-btn-primary.bbai-btn-sm,
.bbai-settings-card .bbai-btn.bbai-btn-primary.bbai-btn-sm,
.bbai-card .bbai-btn.bbai-btn-primary.bbai-btn-sm,
button.bbai-btn.bbai-btn-primary.bbai-btn-sm,
a.bbai-btn.bbai-btn-primary.bbai-btn-sm {
    min-width: 0 !important;
    min-height: 36px !important;
}

/* Secondary Button - quiet, non-competing */
.wrap .bbai-btn.bbai-btn-secondary,
.bbai-dashboard-container .bbai-btn.bbai-btn-secondary,
.bbai-settings-card .bbai-btn.bbai-btn-secondary,
.bbai-card .bbai-btn.bbai-btn-secondary,
button.bbai-btn.bbai-btn-secondary,
a.bbai-btn.bbai-btn-secondary {
    background: #ffffff !important;
    color: #64748b !important;
    border: 1px solid #e8ecf0 !important;
    box-shadow: none !important;
}

.wrap .bbai-btn.bbai-btn-secondary:hover,
.bbai-dashboard-container .bbai-btn.bbai-btn-secondary:hover,
.bbai-settings-card .bbai-btn.bbai-btn-secondary:hover,
.bbai-card .bbai-btn.bbai-btn-secondary:hover,
button.bbai-btn.bbai-btn-secondary:hover,
a.bbai-btn.bbai-btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #dce3e9 !important;
    color: #475569 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Danger Button - Red */
.wrap .bbai-btn.bbai-btn-danger,
.bbai-dashboard-container .bbai-btn.bbai-btn-danger,
.bbai-settings-card .bbai-btn.bbai-btn-danger,
.bbai-card .bbai-btn.bbai-btn-danger,
button.bbai-btn.bbai-btn-danger,
a.bbai-btn.bbai-btn-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.wrap .bbai-btn.bbai-btn-danger:hover,
.bbai-dashboard-container .bbai-btn.bbai-btn-danger:hover,
.bbai-settings-card .bbai-btn.bbai-btn-danger:hover,
.bbai-card .bbai-btn.bbai-btn-danger:hover,
button.bbai-btn.bbai-btn-danger:hover,
a.bbai-btn.bbai-btn-danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
}

/* Outline Primary Button */
.wrap .bbai-btn.bbai-btn-outline-primary,
.bbai-dashboard-container .bbai-btn.bbai-btn-outline-primary,
.bbai-settings-card .bbai-btn.bbai-btn-outline-primary,
.bbai-card .bbai-btn.bbai-btn-outline-primary,
button.bbai-btn.bbai-btn-outline-primary,
a.bbai-btn.bbai-btn-outline-primary {
    background: transparent !important;
    color: #10B981 !important;
    border: 1px solid #10B981 !important;
}

.wrap .bbai-btn.bbai-btn-outline-primary:hover,
.bbai-dashboard-container .bbai-btn.bbai-btn-outline-primary:hover,
.bbai-settings-card .bbai-btn.bbai-btn-outline-primary:hover,
.bbai-card .bbai-btn.bbai-btn-outline-primary:hover,
button.bbai-btn.bbai-btn-outline-primary:hover,
a.bbai-btn.bbai-btn-outline-primary:hover {
    background: rgba(16, 185, 129, 0.08) !important;
}

/* ============================================
   CONSISTENT BUTTON SIZING
   Standard sizes across all variants
   ============================================ */

/* Base size: 10px 20px (applied to .bbai-btn above) */

/* Small Button Size */
.bbai-btn.bbai-btn-sm,
.bbai-btn-sm,
.wrap .bbai-btn.bbai-btn-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

/* Large Button Size */
.bbai-btn.bbai-btn-lg,
.bbai-btn-lg,
.wrap .bbai-btn.bbai-btn-lg {
    padding: 14px 28px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
}

/* XL Button Size */
.bbai-btn.bbai-btn-xl,
.bbai-btn-xl,
.wrap .bbai-btn.bbai-btn-xl {
    padding: 16px 32px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
}



/* Imported from: _badges.css */
/**
 * Badges - Premium SaaS Design
 * Status indicators, plan badges, SEO grades
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   BASE BADGE
   ============================================ */

.bbai-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: var(--bbai-badge-padding-y) var(--bbai-badge-padding-x);
    font-size: var(--bbai-badge-font-size);
    font-weight: var(--bbai-badge-font-weight);
    border-radius: var(--bbai-badge-radius);
    white-space: nowrap;
    line-height: 1.2;
}

.bbai-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Badge variants */
.bbai-badge-success {
    background: var(--bbai-success-bg);
    color: var(--bbai-success-dark);
}

.bbai-badge-warning {
    background: var(--bbai-warning-bg);
    color: var(--bbai-warning-dark);
}

.bbai-badge-error {
    background: var(--bbai-error-bg);
    color: var(--bbai-error);
}

.bbai-badge-info {
    background: var(--bbai-info-bg);
    color: var(--bbai-info-dark);
}

.bbai-badge-gray {
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-600);
}

.bbai-badge-primary {
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
}

/* ============================================
   PLAN BADGES
   ============================================ */

.bbai-usage-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px; /* Consistent badge font size */
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    text-transform: uppercase;
}

.bbai-usage-plan-badge--free {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: #ffffff !important;
}

.bbai-usage-plan-badge--pro,
.bbai-usage-plan-badge--growth {
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
}

.bbai-usage-plan-badge--agency {
    background: #ede9fe;
    color: #7c3aed;
}

/* Unified Badge Variants - Use with bbai-badge component */
.bbai-badge--free {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: #ffffff;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.bbai-badge--growth {
    background: rgba(255, 255, 255, 0.95);
    color: #3B82F6;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bbai-badge--pro {
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.bbai-badge--agency {
    background: #ede9fe;
    color: #7c3aed;
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.bbai-badge--getting-started {
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-600);
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

/* Legacy compatibility - map old classes to new system */
.bbai-badge-free {
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.bbai-badge-growth {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: #1e293b;
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.bbai-upsell-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 14px; /* Consistent plan badge padding */
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e293b;
}

.bbai-ready-optimise__badge {
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-600);
    padding: 6px 14px; /* Consistent plan badge padding */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

/* ============================================
   STATUS BADGES
   ============================================ */

.bbai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px; /* Consistent status badge padding */
    font-size: 11px;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.bbai-status-badge--optimized,
.bbai-status-badge--success {
    background: var(--bbai-success-bg);
    color: var(--bbai-success-dark);
}

.bbai-status-badge--missing,
.bbai-status-badge--warning {
    background: var(--bbai-warning-bg);
    color: var(--bbai-warning-dark);
}

.bbai-status-badge--regenerated,
.bbai-status-badge--info {
    background: var(--bbai-info-bg);
    color: var(--bbai-info-dark);
}

.bbai-status-badge--error {
    background: var(--bbai-error-bg);
    color: var(--bbai-error);
}

.bbai-status-badge--pending {
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-600);
}

/* ============================================
   SEO UNIFIED BADGE
   ============================================ */

.bbai-seo-unified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px; /* Consistent status badge padding */
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    white-space: nowrap;
    cursor: help;
    transition: transform var(--bbai-transition-fast) var(--bbai-ease-out);
    border: 1px solid transparent;
}

.bbai-seo-unified-badge:hover {
    transform: scale(1.03);
}

.bbai-seo-unified-badge__grade {
    font-weight: var(--bbai-font-bold);
}

.bbai-seo-unified-badge__chars {
    font-weight: var(--bbai-font-medium);
    opacity: 0.85;
}

/* SEO Grade variants */
.bbai-seo-unified-badge--excellent {
    background: var(--bbai-success-bg);
    color: #047857;
    border-color: #6ee7b7;
}

.bbai-seo-unified-badge--good {
    background: var(--bbai-info-bg);
    color: #1d4ed8;
    border-color: #93c5fd;
}

.bbai-seo-unified-badge--fair {
    background: var(--bbai-warning-bg);
    color: #92400e;
    border-color: #fcd34d;
}

.bbai-seo-unified-badge--poor {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fdba74;
}

.bbai-seo-unified-badge--needs-work {
    background: var(--bbai-error-bg);
    color: #b91c1c;
    border-color: #fca5a5;
}

.bbai-seo-unified-badge--empty {
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-400);
    border-color: var(--bbai-gray-200);
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.bbai-progress {
    height: 8px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
}

.bbai-progress-bar {
    height: 100%;
    background: var(--bbai-primary);
    border-radius: var(--bbai-radius-full);
    transition: width 0.4s var(--bbai-ease-out);
}

.bbai-progress-success .bbai-progress-bar {
    background: var(--bbai-success);
}

.bbai-progress-warning .bbai-progress-bar {
    background: var(--bbai-warning);
}

.bbai-progress-error .bbai-progress-bar {
    background: var(--bbai-error);
}

/* ============================================
   TABS
   ============================================ */

.bbai-tabs {
    display: flex;
    gap: var(--bbai-space-1);
    border-bottom: 1px solid var(--bbai-border);
    margin-bottom: var(--bbai-space-6);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bbai-tab {
    padding: var(--bbai-space-3) var(--bbai-space-4);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    margin-bottom: -1px;
    white-space: nowrap;
}

.bbai-tab:hover {
    color: var(--bbai-text);
}

.bbai-tab.active,
.bbai-tab[aria-selected="true"] {
    color: var(--bbai-primary);
    border-bottom-color: var(--bbai-primary);
    font-weight: var(--bbai-font-semibold);
}

.bbai-tab:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: -2px;
}



/* 5. Form Elements */

/* Imported from: _forms.css */
/**
 * Forms - Premium SaaS Design
 * Refined inputs, polished focus states, accessible design
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   FORM GROUP
   ============================================ */

.bbai-form-group {
    margin-bottom: var(--bbai-space-5);
}

.bbai-form-group:last-child {
    margin-bottom: 0;
}

/* ============================================
   LABELS
   ============================================ */

.bbai-label {
    display: block;
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-label--required::after {
    content: '*';
    color: var(--bbai-error);
    margin-left: var(--bbai-space-1);
}

/* ============================================
   BASE INPUT STYLES
   ============================================ */

.bbai-input,
.bbai-select,
.bbai-textarea {
    display: block;
    width: 100%;
    padding: 12px 14px; /* Consistent input padding */
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    color: var(--bbai-text);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: 8px; /* Consistent input radius */
    transition: border-color var(--bbai-transition-fast) var(--bbai-ease-out),
                box-shadow var(--bbai-transition-fast) var(--bbai-ease-out);
    appearance: none;
    -webkit-appearance: none;
}

.bbai-input:hover:not(:disabled):not(:focus),
.bbai-select:hover:not(:disabled):not(:focus),
.bbai-textarea:hover:not(:disabled):not(:focus) {
    border-color: var(--bbai-gray-400);
}

.bbai-input:focus,
.bbai-select:focus,
.bbai-textarea:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: var(--bbai-shadow-focus);
}

.bbai-input::placeholder,
.bbai-textarea::placeholder {
    color: var(--bbai-gray-400);
}

.bbai-input:disabled,
.bbai-select:disabled,
.bbai-textarea:disabled {
    background: var(--bbai-gray-100);
    border-color: var(--bbai-gray-200);
    color: var(--bbai-text-muted);
    cursor: not-allowed;
}

/* ============================================
   TEXTAREA
   ============================================ */

.bbai-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

/* ============================================
   SELECT
   ============================================ */

.bbai-select {
    padding-right: var(--bbai-space-10);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right var(--bbai-space-3) center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
}

.bbai-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2310B981' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* ============================================
   VALIDATION STATES
   ============================================ */

.bbai-input--error,
.bbai-select--error,
.bbai-textarea--error {
    border-color: var(--bbai-error);
}

.bbai-input--error:focus,
.bbai-select--error:focus,
.bbai-textarea--error:focus {
    border-color: var(--bbai-error);
    box-shadow: var(--bbai-shadow-focus-error);
}

/* ============================================
   HELPER TEXT
   ============================================ */

.bbai-hint {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    margin-top: var(--bbai-space-1);
    line-height: 1.4;
}

.bbai-hint--error {
    color: var(--bbai-error);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.bbai-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: var(--bbai-space-3);
}

.bbai-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bbai-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bbai-gray-300);
    border-radius: var(--bbai-radius-full);
    transition: background var(--bbai-transition-fast) var(--bbai-ease-out);
    flex-shrink: 0;
}

.bbai-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform var(--bbai-transition-fast) var(--bbai-ease-spring);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.bbai-toggle-input:checked + .bbai-toggle-slider {
    background: var(--bbai-primary);
}

.bbai-toggle-input:checked + .bbai-toggle-slider::before {
    transform: translateX(20px);
}

.bbai-toggle-input:focus-visible + .bbai-toggle-slider {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-toggle-input:disabled + .bbai-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.bbai-toggle-label {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    user-select: none;
}

/* ============================================
   CHECKBOX & RADIO
   ============================================ */

.bbai-checkbox-wrapper,
.bbai-radio-wrapper {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--bbai-space-2);
    cursor: pointer;
}

.bbai-checkbox,
.bbai-radio {
    width: 18px;
    height: 18px;
    accent-color: var(--bbai-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.bbai-checkbox:focus-visible,
.bbai-radio:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-checkbox-label,
.bbai-radio-label {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    user-select: none;
    line-height: 1.4;
}



/* 6. Data Display */

/* Imported from: _tables.css */
/**
 * Tables - Premium SaaS Design
 * Clean data presentation, refined interactions
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   TABLE CONTAINERS
   ============================================ */

.bbai-table-wrap,
.bbai-table-scroll {
    overflow-x: auto;
    overflow-y: clip;
    -webkit-overflow-scrolling: touch;
}

.bbai-library-table-wrapper {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: 16px; /* Consistent card radius */
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ============================================
   BASE TABLE
   ============================================ */

.bbai-table,
.bbai-library-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Consistent body font size */
    table-layout: fixed;
}

.bbai-table th,
.bbai-library-table th {
    background: var(--bbai-bg-secondary);
    padding: 12px 16px; /* Consistent table header padding */
    text-align: left;
    font-weight: 600;
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--bbai-border);
    white-space: nowrap;
}

.bbai-table td,
.bbai-library-table td {
    padding: 16px 12px;
    min-height: 72px;
    border-bottom: 1px solid var(--bbai-border);
    vertical-align: middle;
    color: var(--bbai-text);
}

.bbai-library-table .bbai-library-row td {
    min-height: 72px;
}

.bbai-table tr:last-child td,
.bbai-library-table tr:last-child td {
    border-bottom: none;
}

.bbai-table tbody tr,
.bbai-library-table tbody tr {
    transition: background-color var(--bbai-transition-fast) var(--bbai-ease-out),
                box-shadow var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-table tbody tr:hover,
.bbai-library-table tbody tr:hover {
    background: #F9FAFB;
}

.bbai-library-row:hover {
    background: #F9FAFB;
}

/* Sortable headers */
.bbai-table th.bbai-sortable,
.bbai-library-table th.bbai-sortable {
    cursor: pointer;
    user-select: none;
}

.bbai-table th.bbai-sortable:hover,
.bbai-library-table th.bbai-sortable:hover {
    color: var(--bbai-text);
    background: var(--bbai-bg-tertiary);
}

.bbai-sort-icon {
    width: 12px;
    height: 12px;
    margin-left: var(--bbai-space-1);
    opacity: 0.4;
    vertical-align: middle;
}

.bbai-table th.bbai-sorted .bbai-sort-icon,
.bbai-library-table th.bbai-sorted .bbai-sort-icon {
    opacity: 1;
    color: var(--bbai-primary);
}

/* ============================================
   LIBRARY TABLE — SaaS COLUMN WIDTHS
   ============================================ */

.bbai-saas-table {
    min-width: 996px; /* Sum of column widths so table doesn't squash when grid shrinks */
}

.bbai-saas-table .bbai-library-col-select { width: 44px; }
.bbai-saas-table .bbai-library-col-image { width: 72px; }
.bbai-saas-table .bbai-library-col-info { width: 220px; }
.bbai-saas-table .bbai-library-col-alt {
    width: 340px !important;
    min-width: 200px !important;
    display: table-cell !important;
    visibility: visible !important;
}
.bbai-saas-table .bbai-library-col-status { width: 120px; }
.bbai-saas-table .bbai-library-col-updated { width: 120px; }
.bbai-saas-table .bbai-library-col-actions { width: 120px; text-align: right; }

/* ============================================
   LIBRARY TABLE SPECIFICS
   ============================================ */

.bbai-library-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: var(--bbai-bg-secondary);
}

.bbai-library-thumbnail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.bbai-library-thumbnail-button:focus-visible {
    outline: var(--bbai-focus-ring-width, 2px) solid var(--bbai-primary);
    outline-offset: 2px;
    border-radius: var(--bbai-radius);
}

.bbai-library-thumbnail-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bbai-gray-100);
    border-radius: var(--bbai-radius);
    color: var(--bbai-gray-400);
}

.bbai-library-thumbnail-placeholder svg {
    width: 20px;
    height: 20px;
}

/* Image Info cell: filename bold, metadata lighter */
.bbai-library-info-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bbai-library-info-name {
    font-weight: 600;
    color: var(--bbai-text);
}

.bbai-library-info-meta {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
}

/* Filename cell (legacy) */
.bbai-library-filename-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bbai-library-filename {
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
}

.bbai-library-filename-meta {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
}

/* Alt text cell - ensure column is visible and not collapsed */
.bbai-library-cell--alt-text {
    min-width: 200px;
    max-width: 340px;
    width: 340px;
}

.bbai-alt-text-content {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-1);
    max-width: 340px;
}

.bbai-alt-text-preview {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    line-height: 1.5;
    max-width: 340px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.bbai-alt-text-meta {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-alt-text-missing {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    font-style: italic;
}

/* Actions cell */
.bbai-library-actions-header {
    text-align: right;
}

.bbai-library-cell--actions {
    text-align: right;
}

.bbai-library-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.bbai-library-actions .bbai-link-sm {
    opacity: 0.82;
    transition: opacity var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-library-row:hover .bbai-library-actions .bbai-link-sm,
.bbai-library-actions .bbai-link-sm:focus-visible {
    opacity: 1;
}

.bbai-library-cell--alt-text.bbai-library-cell--editing {
    min-width: 340px;
    width: 340px;
    max-width: none;
    overflow: visible;
    vertical-align: top;
}

.bbai-library-row .bbai-library-cell--alt-text.bbai-library-cell--editing {
    padding-top: 12px;
}

.bbai-library-inline-edit {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-2);
    width: 100%;
    min-width: 280px;
    box-sizing: border-box;
}

.bbai-library-inline-edit__textarea {
    width: 100%;
    min-width: 260px;
    min-height: 92px;
    box-sizing: border-box;
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    padding: var(--bbai-space-3);
    font-family: inherit;
    font-size: var(--bbai-text-sm);
    line-height: 1.45;
    color: var(--bbai-text);
    resize: vertical;
}

.bbai-library-inline-edit__textarea:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: var(--bbai-shadow-focus);
}

.bbai-library-inline-edit__actions {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-library-inline-edit__error {
    min-height: 16px;
    margin: 0;
    font-size: var(--bbai-text-xs);
    color: var(--bbai-error);
}

/* ============================================
   LIBRARY CONTROLS
   ============================================ */

.bbai-library-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    margin-bottom: var(--bbai-space-5);
    flex-wrap: wrap;
}

/* Search Input */
.bbai-library-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.bbai-library-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--bbai-gray-400);
    pointer-events: none;
}

.bbai-library-search-input {
    width: 100%;
    padding: var(--bbai-space-2) var(--bbai-space-3) var(--bbai-space-2) 38px;
    font-size: var(--bbai-text-sm);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    background: var(--bbai-bg);
    color: var(--bbai-text);
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-library-search-input:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: var(--bbai-shadow-focus);
}

.bbai-library-search-input::placeholder {
    color: var(--bbai-gray-400);
}

/* Filter Dropdowns */
.bbai-library-filters {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    flex-wrap: wrap;
}

.bbai-library-filters-group {
    display: flex;
    gap: var(--bbai-space-2);
}

.bbai-library-filter-select {
    padding: var(--bbai-space-2) var(--bbai-space-8) var(--bbai-space-2) var(--bbai-space-3);
    font-size: var(--bbai-text-sm);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    background: var(--bbai-bg);
    color: var(--bbai-text);
    min-width: 120px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    appearance: none;
    -webkit-appearance: none;
}

.bbai-library-filter-select:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: var(--bbai-shadow-focus);
}

/* ============================================
   LIBRARY STATS HEADER
   ============================================ */

.bbai-library-stats-header {
    display: flex;
    align-items: baseline;
    gap: var(--bbai-space-2);
    margin: var(--bbai-space-4) 0;
}

.bbai-library-stats-value {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-primary);
}

.bbai-library-stats-label {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

/* ============================================
   LIBRARY STATS GRID
   ============================================ */

.bbai-library-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: var(--bbai-space-6);
}

.bbai-library-batch-actions {
    display: none;
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    background: var(--bbai-bg-secondary);
    padding: var(--bbai-space-3) var(--bbai-space-4);
}

.bbai-library-batch-actions.bbai-has-selection {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bbai-space-3);
}

.bbai-library-batch-row {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bbai-library-batch-row.bbai-has-selection {
    display: flex;
}

.bbai-library-batch-actions__label {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

.bbai-library-batch-actions #bbai-batch-regenerate:disabled {
    opacity: 0.6;
}

.bbai-library-preview-modal {
    position: fixed;
    inset: 0;
    z-index: var(--bbai-z-modal);
    display: none;
}

.bbai-library-preview-modal.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-4);
}

.bbai-library-preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.52);
}

.bbai-library-preview-modal__dialog {
    position: relative;
    width: min(700px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 18px;
    background: var(--bbai-bg);
    box-shadow: var(--bbai-shadow-modal);
    padding: var(--bbai-space-5);
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-4);
}

.bbai-library-preview-modal__close {
    position: absolute;
    top: var(--bbai-space-3);
    right: var(--bbai-space-3);
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: var(--bbai-text-muted);
    cursor: pointer;
}

.bbai-library-preview-modal__close:hover {
    color: var(--bbai-text);
}

.bbai-library-preview-modal__title {
    margin: 0;
    font-size: var(--bbai-text-xl);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

.bbai-library-preview-modal__image {
    width: 100%;
    max-height: min(52vh, 460px);
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--bbai-border);
    background: var(--bbai-bg-secondary);
}

.bbai-library-preview-modal__meta-label {
    margin: 0 0 var(--bbai-space-1) 0;
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bbai-text-muted);
}

.bbai-library-preview-modal__alt {
    margin: 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    line-height: 1.6;
}

.bbai-library-preview-modal__quality {
    margin: var(--bbai-space-2) 0 0 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-library-preview-modal__quality-value {
    color: var(--bbai-text);
    font-weight: var(--bbai-font-semibold);
}

.bbai-library-preview-modal__actions {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Locked Regen in preview: remains clickable to open upgrade modal */
.bbai-library-preview-modal__action--locked.bbai-is-locked {
    cursor: pointer;
    pointer-events: auto;
}

.bbai-library-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-library-stat-card:hover {
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

.bbai-library-stat-value {
    font-size: 30px; /* Consistent stat value size */
    font-weight: 700;
    color: var(--bbai-text);
    line-height: 1;
    margin-bottom: 8px;
}

.bbai-library-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .bbai-library-stats {
        grid-template-columns: 1fr;
    }

    .bbai-library-cell--alt-text.bbai-library-cell--editing {
        min-width: 0;
        width: auto;
    }

    .bbai-library-inline-edit,
    .bbai-library-inline-edit__textarea {
        min-width: 200px;
    }

    .bbai-library-preview-modal__dialog {
        width: 100%;
        padding: var(--bbai-space-4);
    }

    .bbai-library-preview-modal__actions {
        justify-content: stretch;
    }

    .bbai-library-preview-modal__actions .bbai-btn {
        width: 100%;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.bbai-library-empty-state {
    text-align: center;
    padding: var(--bbai-space-12) var(--bbai-space-6);
}

.bbai-library-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--bbai-space-4);
    color: var(--bbai-gray-300);
}

.bbai-library-empty-content {
    max-width: 300px;
    margin: 0 auto;
}

.bbai-library-empty-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-library-empty-subtitle {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-5);
    line-height: 1.5;
}

.bbai-library-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-3) var(--bbai-space-5);
    background: var(--bbai-primary);
    color: white !important;
    border-radius: var(--bbai-radius);
    text-decoration: none;
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-library-empty-btn:hover {
    background: var(--bbai-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--bbai-shadow-button-hover);
}

/* ============================================
   PAGINATION
   ============================================ */

.bbai-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bbai-space-4) var(--bbai-space-5);
    border-top: 1px solid var(--bbai-border);
    flex-wrap: wrap;
    gap: var(--bbai-space-3);
}

.bbai-pagination-info {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-pagination-pages {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-1);
}

.bbai-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--bbai-space-3);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-muted);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    text-decoration: none;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    cursor: pointer;
}

.bbai-pagination-btn:hover:not(.bbai-pagination-btn--disabled):not(.bbai-pagination-btn--current) {
    border-color: var(--bbai-primary);
    color: var(--bbai-primary);
    background: var(--bbai-primary-soft);
}

.bbai-pagination-btn--current {
    background: var(--bbai-primary);
    color: white !important;
    border-color: var(--bbai-primary);
}

.bbai-pagination-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bbai-pagination-btn:focus-visible {
    outline: var(--bbai-focus-ring-width, 2px) solid var(--bbai-primary);
    outline-offset: var(--bbai-focus-ring-offset, 2px);
}

.bbai-pagination-ellipsis {
    padding: 0 var(--bbai-space-2);
    color: var(--bbai-text-muted);
}

/* ============================================
   STATUS BADGES
   ============================================ */

.bbai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: 4px 10px;
    border-radius: var(--bbai-radius-full);
    font-size: 11px;
    font-weight: var(--bbai-font-semibold);
    white-space: nowrap;
}

.bbai-status-badge--optimized {
    background: var(--bbai-success-bg);
    color: var(--bbai-success-dark);
}

.bbai-status-badge--missing {
    background: var(--bbai-warning-bg);
    color: var(--bbai-warning-dark);
}

.bbai-status-badge--error {
    background: var(--bbai-error-bg);
    color: var(--bbai-error);
}

.bbai-status-badge--pending {
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-600);
}

/* ============================================
   LIBRARY UPGRADE BANNER
   ============================================ */

.bbai-library-upgrade-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-6);
    padding: var(--bbai-space-6);
    background: var(--bbai-gradient-primary);
    border-radius: var(--bbai-radius-xl);
    color: white;
    margin-top: var(--bbai-space-6);
    flex-wrap: wrap;
}

.bbai-library-upgrade-content {
    flex: 1;
}

.bbai-library-upgrade-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-bold);
    margin: 0 0 var(--bbai-space-2) 0;
    color: white;
}

.bbai-library-upgrade-subtitle {
    font-size: var(--bbai-text-sm);
    opacity: 0.9;
    margin: 0 0 var(--bbai-space-4) 0;
    color: white;
}

.bbai-library-upgrade-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bbai-space-4);
}

.bbai-library-upgrade-feature {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    font-size: var(--bbai-text-sm);
    color: white;
}

.bbai-library-upgrade-feature svg {
    width: 16px;
    height: 16px;
    color: white;
}

.bbai-library-upgrade-btn {
    padding: var(--bbai-space-3) var(--bbai-space-6);
    background: white;
    color: var(--bbai-primary) !important;
    border: none;
    border-radius: var(--bbai-radius);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    cursor: pointer;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-library-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   CHECKBOX STYLING
   ============================================ */

.bbai-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--bbai-primary);
    cursor: pointer;
    border-radius: var(--bbai-radius-sm);
}

.bbai-checkbox:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* ============================================
   SKELETON LOADERS FOR TABLES
   ============================================ */

.bbai-table-skeleton {
    width: 100%;
}

.bbai-table-skeleton-row {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    border-bottom: 1px solid var(--bbai-border);
}

.bbai-table-skeleton-row:last-child {
    border-bottom: none;
}

.bbai-skeleton {
    background: linear-gradient(
        90deg,
        var(--bbai-gray-100) 0%,
        var(--bbai-gray-200) 50%,
        var(--bbai-gray-100) 100%
    );
    background-size: 200% 100%;
    animation: bbai-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--bbai-radius);
}

.bbai-skeleton-thumbnail {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--bbai-radius);
}

.bbai-skeleton-text {
    height: 16px;
    flex: 1;
    max-width: 200px;
}

.bbai-skeleton-text--short {
    max-width: 80px;
}

.bbai-skeleton-text--medium {
    max-width: 150px;
}

.bbai-skeleton-text--long {
    max-width: 300px;
}

.bbai-skeleton-badge {
    width: 80px;
    height: 24px;
    border-radius: var(--bbai-radius-full);
}

.bbai-skeleton-button {
    width: 100px;
    height: 32px;
    border-radius: var(--bbai-radius);
}

@keyframes bbai-skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Table Loading State */
.bbai-table--loading {
    position: relative;
}

.bbai-table--loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.bbai-table--loading .bbai-table-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

/* Stats Card Skeleton */
.bbai-stat-skeleton {
    padding: var(--bbai-space-5);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-xl);
    text-align: center;
}

.bbai-stat-skeleton .bbai-skeleton-value {
    height: 32px;
    width: 60px;
    margin: 0 auto var(--bbai-space-2);
}

.bbai-stat-skeleton .bbai-skeleton-label {
    height: 12px;
    width: 80px;
    margin: 0 auto;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bbai-skeleton {
        animation: none;
        background: var(--bbai-gray-100);
    }
}

/* Dark Mode Skeletons */
[data-theme="dark"] .bbai-skeleton,
.bbai-dark-mode .bbai-skeleton {
    background: linear-gradient(
        90deg,
        var(--bbai-gray-800) 0%,
        var(--bbai-gray-700) 50%,
        var(--bbai-gray-800) 100%
    );
    background-size: 200% 100%;
}

[data-theme="dark"] .bbai-table--loading::after,
.bbai-dark-mode .bbai-table--loading::after {
    background: rgba(30, 41, 59, 0.7);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .bbai-library-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-library-search-wrapper {
        max-width: none;
    }

    .bbai-library-filters {
        justify-content: flex-start;
    }

    .bbai-pagination {
        flex-direction: column;
        text-align: center;
    }

    .bbai-library-upgrade-card {
        flex-direction: column;
        text-align: center;
    }

    .bbai-library-upgrade-features {
        justify-content: center;
    }
}

/* ============================================
   LIBRARY TABLE AREA + UPGRADE SIDEBAR
   ============================================ */

/* Side-by-side: table left, upgrade CTA right (no overlap) */
.bbai-library-table-area {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
    position: relative;
    width: 100%;
}

/* First column: table + pagination */
.bbai-library-table-area .bbai-library-table-column {
    min-width: 0;
}

.bbai-library-table-area .bbai-card {
    min-width: 0;
}

/* CTA panel: second column, never absolute so it doesn’t overlap */
.bbai-library-upgrade-float {
    position: static !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    box-sizing: border-box;
}

.bbai-library-upgrade-float .bbai-bottom-upsell-cta--compact {
    margin-top: 0;
}

.bbai-library-upgrade-float .bbai-upgrade-card,
.bbai-library-upgrade-float .bbai-upgrade-growth-card {
    width: 100%;
    max-width: 100%;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.bbai-library-upgrade-float .bbai-upgrade-card__grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.bbai-library-upgrade-float .bbai-upgrade-card__title {
    font-size: 18px;
}

.bbai-library-upgrade-float .bbai-upgrade-card__description {
    display: none;
}

.bbai-library-upgrade-float .bbai-upgrade-features {
    display: none;
}

.bbai-library-upgrade-float .bbai-upgrade-unlock-context {
    display: none;
}

.bbai-library-upgrade-float .bbai-footer-contact {
    display: none;
}

@media (max-width: 1024px) {
    .bbai-library-table-area {
        grid-template-columns: 1fr;
    }

    .bbai-library-upgrade-float {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}



/* Imported from: _alt-coverage.css */
/**
 * ALT Coverage Card & Smart Review Filters
 * Modern SaaS dashboard style (Stripe, Linear, Vercel)
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   ALT COVERAGE SECTION (never hide)
   ============================================ */

.bbai-library-coverage-section {
    display: block !important;
    visibility: visible !important;
}

/* ============================================
   ALT COVERAGE CARD
   ============================================ */

.bbai-alt-coverage-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.bbai-alt-coverage-card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--bbai-text);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.bbai-alt-coverage-card__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.bbai-alt-coverage-card__stat {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.bbai-alt-coverage-card__stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--bbai-text-muted);
}

.bbai-alt-coverage-card__stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--bbai-text);
    letter-spacing: -0.02em;
}

.bbai-alt-coverage-card__progress {
    margin-top: 12px;
}

.bbai-alt-coverage-card__progress-bar {
    display: flex;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bbai-gray-100);
}

.bbai-alt-coverage-card__progress-segment {
    min-width: 0;
    transition: width 0.2s ease;
}

.bbai-alt-coverage-card__progress-segment--optimized {
    background: #22b573;
}

.bbai-alt-coverage-card__progress-segment--needs-review {
    background: #d9a441;
}

.bbai-alt-coverage-card__progress-segment--missing {
    background: #c97a00;
}

.bbai-alt-coverage-card__progress-labels {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--bbai-text-muted);
}

.bbai-alt-coverage-card__progress-label--optimized { color: #08785c; }
.bbai-alt-coverage-card__progress-label--needs-review { color: #7c5719; }
.bbai-alt-coverage-card__progress-label--missing { color: #805112; }

@media (max-width: 640px) {
    .bbai-alt-coverage-card__stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SMART REVIEW FILTERS
   ============================================ */

.bbai-alt-review-filters {
    margin-bottom: 16px;
    margin-top: 4px;
}

.bbai-alt-review-filters__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bbai-alt-review-filters__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bbai-text-muted);
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bbai-alt-review-filters__btn:hover {
    color: var(--bbai-text);
    background: var(--bbai-gray-50);
    border-color: var(--bbai-gray-300);
}

.bbai-alt-review-filters__btn:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-alt-review-filters__btn--active {
    color: #fff;
    background: var(--bbai-primary);
    border-color: var(--bbai-primary);
}

.bbai-alt-review-filters__btn--active:hover {
    color: #fff;
    background: var(--bbai-primary-hover);
    border-color: var(--bbai-primary-hover);
}

.bbai-alt-review-filters__count {
    font-size: 12px;
    opacity: 0.9;
}

.bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count {
    opacity: 1;
}

/* ============================================
   FILTER EMPTY STATE
   ============================================ */

.bbai-library-row--hidden {
    display: none !important;
}

.bbai-library-filter-empty {
    background: var(--bbai-bg);
}

.bbai-library-filter-empty--hidden {
    display: none !important;
}

.bbai-library-filter-empty__cell {
    padding: 32px 16px !important;
    text-align: center;
    font-size: 14px;
    color: var(--bbai-text-muted);
}

/* ============================================
   QUALITY BADGES (EXCELLENT / GOOD / NEEDS REVIEW)
   ============================================ */

.bbai-quality-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.bbai-quality-pill--excellent {
    background: #dbeafe;
    color: #2563eb;
}

.bbai-quality-pill--good {
    background: #dcfce7;
    color: #16a34a;
}

.bbai-quality-pill--needs-review,
.bbai-quality-pill--fair,
.bbai-quality-pill--poor {
    background: #fff8e8;
    color: #7c5719;
}

.bbai-quality-pill--missing {
    background: #fff7ed;
    color: #805112;
}

/* ============================================
   BULK ACTIONS TOOLBAR (show when rows selected)
   ============================================ */

.bbai-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 16px;
}

.bbai-toolbar__bulk-actions {
    display: none;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bbai-toolbar.bbai-has-selection .bbai-toolbar__bulk-actions {
    display: flex;
}

.bbai-toolbar__bulk-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--bbai-text);
}

.bbai-toolbar__bulk-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bbai-toolbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.bbai-toolbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: var(--bbai-text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bbai-toolbar__btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.bbai-toolbar__btn--primary {
    background: var(--bbai-primary);
    border-color: var(--bbai-primary);
    color: #fff;
}

.bbai-toolbar__btn--primary:hover:not(:disabled):not(.bbai-is-locked) {
    background: var(--bbai-primary-hover);
    border-color: var(--bbai-primary-hover);
    color: #fff;
}

.bbai-toolbar__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bbai-toolbar__search {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 200px;
}

.bbai-toolbar__search svg {
    position: absolute;
    left: 12px;
    color: var(--bbai-text-muted);
    pointer-events: none;
}

.bbai-toolbar__search-input {
    padding: 8px 12px 8px 36px;
    font-size: 13px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    width: 100%;
    min-width: 180px;
}

.bbai-toolbar__search-input:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.bbai-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbai-toolbar__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #fff;
    color: var(--bbai-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bbai-toolbar__icon-btn:hover {
    background: #f9fafb;
    color: var(--bbai-text);
    border-color: #d1d5db;
}



/* 7. Modals & Overlays */

/* Imported from: _modals.css */
/**
 * Modals - Premium SaaS Design
 * Refined animations, accessible focus management
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   MODAL BACKDROP
   ============================================ */

.bbai-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--bbai-z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--bbai-transition-base) var(--bbai-ease-out),
                visibility var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-modal-backdrop.active,
.bbai-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Locked upgrade modal (out-of-credits actions) */
.bbai-locked-upgrade-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-4);
}

.bbai-locked-upgrade-modal.is-visible {
    display: flex;
}

.bbai-locked-upgrade-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.bbai-locked-upgrade-modal__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 92vw);
    border-radius: var(--bbai-radius-xl);
    border: 1px solid var(--bbai-border);
    background: var(--bbai-bg);
    box-shadow: var(--bbai-shadow-modal);
    padding: var(--bbai-space-6);
}

.bbai-locked-upgrade-modal__title {
    margin: 0 0 var(--bbai-space-2);
    color: var(--bbai-text);
    font-size: var(--bbai-text-2xl);
    line-height: 1.25;
}

.bbai-locked-upgrade-modal__body {
    margin: 0 0 var(--bbai-space-3);
    color: var(--bbai-text-muted);
    font-size: var(--bbai-text-base);
    line-height: 1.5;
}

.bbai-locked-upgrade-modal__actions {
    display: flex;
    gap: var(--bbai-space-3);
    margin-top: var(--bbai-space-4);
}

.bbai-locked-upgrade-modal__actions .bbai-btn {
    flex: 1;
    justify-content: center;
}

.bbai-locked-upgrade-modal__link {
    margin-top: var(--bbai-space-3);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bbai-info-dark);
    text-decoration: underline;
    cursor: pointer;
    font-size: var(--bbai-text-sm);
}

.bbai-locked-upgrade-modal__close {
    position: absolute;
    top: var(--bbai-space-3);
    right: var(--bbai-space-3);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--bbai-radius-full);
    background: transparent;
    color: var(--bbai-text-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.bbai-locked-upgrade-modal__close:hover,
.bbai-locked-upgrade-modal__close:focus-visible {
    background: var(--bbai-bg-secondary);
    color: var(--bbai-text);
}

/* Logged-out dashboard: post–first-generation “conversion” (signup) dialog over trial hero */
.bbai-ftue-conversion-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-4);
    box-sizing: border-box;
}

.bbai-ftue-conversion-modal.is-open {
    display: flex;
}

.bbai-ftue-conversion-modal.is-dismissed,
.bbai-ftue-conversion-modal[hidden] {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

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

.bbai-ftue-conversion-modal__panel {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: min(90vh, 640px);
    overflow: auto;
    border-radius: var(--bbai-radius-xl);
    border: 1px solid var(--bbai-border);
    background: var(--bbai-bg, #fff);
    box-shadow: var(--bbai-shadow-modal);
    padding: var(--bbai-space-6) var(--bbai-space-6) var(--bbai-space-5);
    margin: 0;
}

.bbai-ftue-conversion-modal__header {
    text-align: left;
}

.bbai-ftue-conversion-modal__close {
    position: absolute;
    top: var(--bbai-space-3);
    right: var(--bbai-space-3);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--bbai-radius-full);
    background: transparent;
    color: var(--bbai-text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--bbai-transition-fast) var(--bbai-ease-out),
        color var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-ftue-conversion-modal__close:hover,
.bbai-ftue-conversion-modal__close:focus-visible {
    background: var(--bbai-bg-secondary);
    color: var(--bbai-text);
    outline: none;
}

/* Force display for inline styles */
#bbai-upgrade-modal[style*="display: flex"],
#bbai-upgrade-modal[style*="display:flex"] {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

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

/* ============================================
   MODAL CONTAINER
   ============================================ */

.bbai-modal {
    background: var(--bbai-bg);
    border-radius: var(--bbai-radius-xl);
    box-shadow: var(--bbai-shadow-modal);
    width: 100%;
    max-width: var(--bbai-modal-max-width);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform var(--bbai-transition-base) var(--bbai-ease-spring),
                opacity var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-modal-backdrop.active .bbai-modal,
.bbai-modal-backdrop.is-visible .bbai-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ============================================
   MODAL HEADER
   ============================================ */

.bbai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-5) var(--bbai-space-6);
    border-bottom: 1px solid var(--bbai-border);
    flex-shrink: 0;
}

.bbai-modal-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
    line-height: var(--bbai-leading-tight);
}

/* ============================================
   MODAL CLOSE BUTTON
   ============================================ */

.bbai-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--bbai-radius);
    color: var(--bbai-text-muted);
    cursor: pointer;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    flex-shrink: 0;
}

.bbai-modal-close:hover {
    background: var(--bbai-bg-secondary);
    color: var(--bbai-text);
}

.bbai-modal-close:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-modal-close svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   MODAL BODY
   ============================================ */

.bbai-modal-body {
    padding: var(--bbai-space-6);
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   MODAL FOOTER
   ============================================ */

.bbai-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-4) var(--bbai-space-6);
    border-top: 1px solid var(--bbai-border);
    background: var(--bbai-bg-secondary);
    flex-shrink: 0;
}

/* ============================================
   REGENERATE MODAL
   ============================================ */

.bbai-regenerate-preview {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius-lg);
    margin-bottom: var(--bbai-space-5);
}

.bbai-regenerate-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--bbai-radius);
    border: 1px solid var(--bbai-border);
    flex-shrink: 0;
}

.bbai-regenerate-info {
    flex: 1;
    min-width: 0;
}

.bbai-regenerate-filename {
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-1);
    word-break: break-word;
}

.bbai-regenerate-result {
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-4);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    min-height: 80px;
    line-height: 1.6;
}

/* ============================================
   TOOLTIP
   ============================================ */

.bbai-tooltip {
    position: absolute;
    background: var(--bbai-gray-900);
    color: white;
    padding: var(--bbai-space-2) var(--bbai-space-3);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-medium);
    border-radius: var(--bbai-radius);
    z-index: var(--bbai-z-tooltip);
    max-width: 250px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--bbai-transition-fast) var(--bbai-ease-out);
    box-shadow: var(--bbai-shadow-lg);
    line-height: 1.4;
}

.bbai-tooltip.visible {
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .bbai-modal-backdrop {
        padding: var(--bbai-space-3);
        align-items: flex-end;
    }

    .bbai-modal {
        max-height: 85vh;
        border-radius: var(--bbai-radius-xl) var(--bbai-radius-xl) 0 0;
    }

    .bbai-modal-header,
    .bbai-modal-body,
    .bbai-modal-footer {
        padding-left: var(--bbai-space-4);
        padding-right: var(--bbai-space-4);
    }

    .bbai-modal-footer {
        flex-direction: column;
    }

    .bbai-modal-footer .bbai-btn {
        width: 100%;
    }

    .bbai-locked-upgrade-modal {
        align-items: flex-end;
        padding: var(--bbai-space-3);
    }

    .bbai-locked-upgrade-modal__panel {
        width: 100%;
        border-radius: var(--bbai-radius-xl) var(--bbai-radius-xl) 0 0;
        padding: var(--bbai-space-5);
    }

    .bbai-locked-upgrade-modal__actions {
        flex-direction: column;
    }
}



/* 8. Page-Specific Styles */

/* Imported from: _pages.css */
/**
 * Page-Specific Styles - Premium SaaS Design
 * Settings, Guide, Debug pages
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   UNIFIED PAGE TITLES
   ============================================ */

/* Standardized Typography - Use utility classes from _utilities.css */
.bbai-page-title,
.bbai-dashboard-title,
.bbai-library-title,
.bbai-settings-page-title,
.bbai-guide-title,
.bbai-debug-title,
h1.bbai-heading {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
    line-height: var(--bbai-leading-tight);
    letter-spacing: var(--bbai-tracking-tight);
}

.bbai-page-subtitle,
.bbai-dashboard-subtitle,
.bbai-library-subtitle,
.bbai-settings-page-subtitle,
.bbai-guide-subtitle,
.bbai-debug-subtitle,
.bbai-subtitle {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-normal);
    color: var(--bbai-text-secondary);
    margin: 0;
    line-height: var(--bbai-leading-relaxed);
}

.bbai-section-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-4) 0;
}

.bbai-section-subtitle {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: 0 0 var(--bbai-space-4) 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.bbai-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--bbai-space-4);
    margin-bottom: var(--bbai-space-8);
    flex-wrap: wrap;
}

.bbai-page-header-content {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-2);
}

/* Coverage Meter (Library) */
.bbai-coverage-meter {
    padding: var(--bbai-space-4);
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
}

.bbai-coverage-meter__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--bbai-space-2);
}

.bbai-coverage-meter__title {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

.bbai-coverage-meter__value {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-primary);
}

.bbai-coverage-meter__bar {
    height: 8px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    margin-bottom: var(--bbai-space-2);
}

.bbai-coverage-meter__fill {
    height: 100%;
    background: var(--bbai-primary);
    border-radius: var(--bbai-radius-full);
    transition: width 0.3s ease;
}

.bbai-coverage-meter__summary {
    margin: 0;
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
}

/* Bulk Scan Recommendation Banner */
.bbai-scan-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    background: var(--bbai-primary-soft);
    border: 1px solid var(--bbai-primary);
    border-radius: var(--bbai-radius);
}

.bbai-scan-banner__text {
    margin: 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
}

.bbai-scan-banner__cta {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .bbai-scan-banner {
        flex-direction: column;
        align-items: stretch;
    }
}

.bbai-page-header-actions {
    display: flex;
    gap: var(--bbai-space-3);
    flex-wrap: wrap;
}

/* ============================================
   SETTINGS SECTIONS
   ============================================ */

.bbai-settings-section {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

.bbai-settings-section:last-child {
    margin-bottom: 0;
}

.bbai-settings-section-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-4) 0;
    padding-bottom: var(--bbai-space-4);
    border-bottom: 1px solid var(--bbai-border);
}

.bbai-settings-section-desc {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: calc(var(--bbai-space-4) * -1) 0 var(--bbai-space-4) 0;
    padding-bottom: var(--bbai-space-4);
    border-bottom: 1px solid var(--bbai-border);
}

/* Settings Row */
.bbai-settings-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bbai-space-6);
    padding: var(--bbai-space-4) 0;
    border-bottom: 1px solid var(--bbai-border);
}

.bbai-settings-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bbai-settings-row:first-child {
    padding-top: 0;
}

.bbai-settings-info {
    flex: 1;
    min-width: 0;
}

.bbai-settings-label {
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-1);
    font-size: var(--bbai-text-sm);
}

.bbai-settings-desc {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    line-height: 1.5;
}

.bbai-settings-control {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .bbai-settings-row {
        flex-direction: column;
        gap: var(--bbai-space-3);
    }

    .bbai-settings-control {
        width: 100%;
    }
}

/* ============================================
   OPTIMIZATION SECTION (SETTINGS PAGE)
   ============================================ */

.bbai-optimization {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-6);
}

.bbai-optimization-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bbai-space-4);
    margin-bottom: var(--bbai-space-6);
    text-align: center;
}

.bbai-optimization-stat-value {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    line-height: 1;
}

.bbai-optimization-stat-label {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--bbai-space-1);
}

.bbai-optimization-progress {
    margin-bottom: var(--bbai-space-6);
}

.bbai-optimization-actions {
    display: flex;
    gap: var(--bbai-space-4);
    flex-wrap: wrap;
    margin-top: var(--bbai-space-4);
}

@media (max-width: 640px) {
    .bbai-optimization-stats {
        grid-template-columns: 1fr;
        gap: var(--bbai-space-4);
    }

    .bbai-optimization-actions {
        flex-direction: column;
    }

    .bbai-optimization-cta {
        width: 100%;
    }
}

/* ============================================
   GUIDE PAGE
   ============================================ */

.bbai-guide-section {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

.bbai-guide-section:last-child {
    margin-bottom: 0;
}

.bbai-guide-section-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-guide-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--bbai-primary);
    flex-shrink: 0;
}

.bbai-guide-content {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-secondary);
    line-height: 1.7;
}

.bbai-guide-content p {
    margin: 0 0 var(--bbai-space-4) 0;
}

.bbai-guide-content p:last-child {
    margin-bottom: 0;
}

.bbai-guide-content ul,
.bbai-guide-content ol {
    margin: 0 0 var(--bbai-space-4) 0;
    padding-left: var(--bbai-space-6);
}

.bbai-guide-content li {
    margin-bottom: var(--bbai-space-2);
}

.bbai-guide-content code {
    background: var(--bbai-bg-secondary);
    padding: 2px 6px;
    border-radius: var(--bbai-radius-sm);
    font-family: var(--bbai-font-mono);
    font-size: 0.875em;
    color: var(--bbai-primary);
}

/* Step Cards */
.bbai-guide-steps {
    display: grid;
    gap: var(--bbai-space-4);
}

.bbai-guide-step {
    display: flex;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius);
}

.bbai-guide-step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bbai-primary);
    color: white;
    border-radius: var(--bbai-radius-full);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-bold);
    flex-shrink: 0;
}

.bbai-guide-step-content {
    flex: 1;
}

.bbai-guide-step-title {
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-1);
}

.bbai-guide-step-desc {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

/* ============================================
   DEBUG PAGE
   ============================================ */

.bbai-debug-section {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

.bbai-debug-section:last-child {
    margin-bottom: 0;
}

.bbai-debug-section-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-4) 0;
    padding-bottom: var(--bbai-space-4);
    border-bottom: 1px solid var(--bbai-border);
}

/* Debug Panel */
.bbai-debug-panel {
    background: var(--bbai-gray-900);
    border-radius: var(--bbai-radius);
    padding: var(--bbai-space-4);
    font-family: var(--bbai-font-mono);
    font-size: var(--bbai-text-xs);
    color: var(--bbai-gray-300);
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.bbai-debug-panel::-webkit-scrollbar {
    width: 8px;
}

.bbai-debug-panel::-webkit-scrollbar-track {
    background: var(--bbai-gray-800);
    border-radius: var(--bbai-radius);
}

.bbai-debug-panel::-webkit-scrollbar-thumb {
    background: var(--bbai-gray-600);
    border-radius: var(--bbai-radius);
}

.bbai-debug-panel::-webkit-scrollbar-thumb:hover {
    background: var(--bbai-gray-500);
}

.bbai-debug-entry {
    padding: var(--bbai-space-2) 0;
    border-bottom: 1px solid var(--bbai-gray-800);
    display: flex;
    gap: var(--bbai-space-3);
    align-items: flex-start;
}

.bbai-debug-entry:last-child {
    border-bottom: none;
}

.bbai-debug-time {
    color: var(--bbai-gray-500);
    flex-shrink: 0;
}

.bbai-debug-level {
    font-weight: var(--bbai-font-semibold);
    flex-shrink: 0;
    min-width: 50px;
}

.bbai-debug-level-info {
    color: var(--bbai-info);
}

.bbai-debug-level-warning {
    color: var(--bbai-warning);
}

.bbai-debug-level-error {
    color: var(--bbai-error);
}

.bbai-debug-level-success {
    color: var(--bbai-success);
}

.bbai-debug-message {
    flex: 1;
    word-break: break-word;
}

/* Debug Info Grid */
.bbai-debug-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--bbai-space-4);
}

.bbai-debug-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--bbai-space-3);
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius);
}

.bbai-debug-info-label {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-debug-info-value {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
    font-family: var(--bbai-font-mono);
}

/* Debug Actions */
.bbai-debug-actions {
    display: flex;
    gap: var(--bbai-space-3);
    flex-wrap: wrap;
    margin-top: var(--bbai-space-4);
}

/* ============================================
   CREDIT USAGE PAGE - SaaS Usage Dashboard
   Layout: meter → stats + upgrade → usage activity
   (Page title uses shared bbai-page-hero via credit-usage-content.php.)
   ============================================ */

.bbai-credit-usage-page .bbai-credit-usage-meter-card,
.bbai-credit-usage-page .bbai-credit-stats-upgrade-grid,
.bbai-credit-usage-page .bbai-credit-filters-card,
.bbai-credit-usage-page .bbai-user-details-card,
.bbai-credit-usage-page .bbai-seo-heroes-card {
    margin-bottom: 32px;
}

.bbai-credit-usage-page .bbai-credit-filters-card:last-of-type,
.bbai-credit-usage-page .bbai-seo-heroes-card:last-child,
.bbai-credit-usage-page .bbai-user-details-card:last-child {
    margin-bottom: 0;
}

/* Task 1: Credit usage meter card - consistent base card style */
.bbai-credit-usage-meter-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-credit-meter-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-credit-bar {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 10px;
}

.bbai-credit-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f8cff, #6aa6ff);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.bbai-credit-usage-text {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 var(--bbai-space-1) 0;
}

/* Limit reached banner - above progress bar when credits exhausted */
.bbai-limit-banner {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.bbai-limit-banner strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.bbai-credit-reset {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 0 0;
}

.bbai-credit-helper {
    font-size: 14px;
    color: var(--bbai-text-muted);
    margin: var(--bbai-space-3) 0 0 0;
    line-height: 1.5;
}

.bbai-credit-limit-message {
    margin-top: var(--bbai-space-4);
    padding: var(--bbai-space-3);
    background: #fef3c7;
    border-radius: 8px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}

/* Stats + Upgrade grid - side by side on desktop, stack on mobile */
.bbai-credit-stats-upgrade-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .bbai-credit-stats-upgrade-grid {
        grid-template-columns: 1fr minmax(280px, 340px);
        align-items: start;
    }
}

/* Stats grid - 4 / 2 / 1 columns (responsive: 1200+, 768+, mobile) */
.bbai-credit-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--bbai-space-4);
}

@media (min-width: 768px) {
    .bbai-credit-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bbai-credit-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Stat cards - consistent base card style */
.bbai-credit-usage-page .bbai-credit-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-2);
}

.bbai-credit-usage-page .bbai-credit-stat-card .bbai-credit-stat-title {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.bbai-credit-usage-page .bbai-credit-stat-card .bbai-credit-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin: 0;
}

.bbai-credit-stat-value--reset {
    font-size: 14px !important;
}

/* Upgrade card - Dashboard gradient styling (bbai-upgrade-growth-card) */
.bbai-credit-usage-page .bbai-credit-upgrade-card.bbai-upgrade-growth-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(to bottom right, #3C84FF, #54A8FF, #7CDDFF) !important;
    border: none !important;
    box-shadow: 0 4px 35px rgba(0, 0, 0, 0.07);
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-features li {
    padding: 6px 0 6px 24px;
    position: relative;
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: 700;
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-cta {
    margin-top: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #111827 !important;
}

.bbai-credit-usage-page .bbai-credit-upgrade-card .bbai-credit-upgrade-cta:hover {
    background: #ffffff !important;
    color: #111827 !important;
}

.bbai-credit-upgrade-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-align: center;
}

/* Stat Title - Muted label */
.bbai-credit-usage-unified .bbai-credit-stat-card .bbai-credit-stat-title {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Stat Value - Bold metric */
.bbai-credit-usage-unified .bbai-credit-stat-card .bbai-credit-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin: 0;
}

/* Status-aware coloring */
.bbai-credit-stat-value--success {
    color: #10B981;
}

.bbai-credit-stat-value--warning {
    color: #F59E0B;
}

.bbai-credit-stat-value--danger {
    color: #EF4444;
}

.bbai-credit-stat-value--primary {
    color: var(--bbai-primary);
}

/* Stat Description - Plan info */
.bbai-credit-stat-desc {
    font-size: 13px;
    color: var(--bbai-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

/* Plan Badge in stat card */
.bbai-credit-stat-desc .bbai-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--bbai-gray-100);
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bbai-text-secondary);
}

.bbai-credit-stat-label {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Usage Activity section - title + description */
.bbai-credit-usage-activity-summary {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-2);
    cursor: pointer;
    list-style: none;
}

.bbai-credit-usage-activity-summary::-webkit-details-marker {
    display: none;
}

.bbai-credit-usage-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--bbai-text);
}

.bbai-credit-usage-activity-title {
    margin: 0;
}

.bbai-credit-usage-activity-desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

.bbai-credit-usage-activity-body {
    padding-top: 16px;
}

/* Credit Usage Filters - consistent base card style */
.bbai-credit-filters-card {
    margin-bottom: var(--bbai-space-6);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-credit-filter-form {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-4);
}

.bbai-credit-filter-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--bbai-space-4);
}

@media (min-width: 768px) {
    .bbai-credit-filter-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bbai-credit-filter-field {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-2);
}

.bbai-credit-filter-label {
    font-size: 12px;
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bbai-credit-filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bbai-credit-filter-input {
    width: 100%;
    padding: 10px 14px;
    padding-right: 36px;
    border: 1px solid var(--bbai-gray-200);
    border-radius: 8px;
    font-size: 14px;
    color: var(--bbai-text);
    background: var(--bbai-bg);
    transition: all 0.2s ease;
}

.bbai-credit-filter-input:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

.bbai-credit-filter-calendar-icon {
    position: absolute;
    right: var(--bbai-space-3);
    width: 16px;
    height: 16px;
    color: var(--bbai-text-muted);
    pointer-events: none;
}

.bbai-credit-filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bbai-gray-200);
    border-radius: 8px;
    font-size: 14px;
    color: var(--bbai-text);
    background: var(--bbai-bg);
    transition: all 0.2s ease;
    cursor: pointer;
}

.bbai-credit-filter-select:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

.bbai-credit-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--bbai-space-4);
    margin-top: var(--bbai-space-2);
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-gray-100);
}

/* Ensure Clear link is plain text like Save Settings */
.bbai-clear-filter-link,
.bbai-credit-filter-actions .bbai-clear-filter-link,
.bbai-credit-filter-actions a.bbai-clear-filter-link {
    display: inline !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--bbai-text, #111827) !important;
    border: none !important;
    border-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: var(--bbai-text-base, 14px) !important;
    font-weight: var(--bbai-font-medium, 500) !important;
    line-height: normal !important;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: none !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    transition: color 0.2s ease !important;
}

.bbai-clear-filter-link:hover,
.bbai-credit-filter-actions .bbai-clear-filter-link:hover,
.bbai-credit-filter-actions a.bbai-clear-filter-link:hover {
    display: inline !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--bbai-primary, #10B981) !important;
    border: none !important;
    border-color: transparent !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Usage Table Card - Premium SaaS Design */
.bbai-usage-table-card {
    margin-bottom: var(--bbai-space-8);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-gray-100);
    border-radius: 16px;
    padding: var(--bbai-space-6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-usage-table-card .bbai-card-title {
    font-size: 18px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-4) 0;
}

/* Premium Table Styling */
.bbai-usage-table-card table,
.bbai-usage-table-card .widefat {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--bbai-gray-100);
    border-radius: 12px;
    overflow: hidden;
}

.bbai-usage-table-card thead tr {
    background: var(--bbai-gray-50);
}

.bbai-usage-table-card thead th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid var(--bbai-gray-100);
    background: var(--bbai-gray-50);
    position: sticky;
    top: 0;
}

.bbai-usage-table-card tbody tr {
    transition: background 0.15s ease;
}

.bbai-usage-table-card tbody tr:hover {
    background: var(--bbai-gray-50);
}

/* Zebra striping */
.bbai-usage-table-card tbody tr:nth-child(even) {
    background: rgba(249, 250, 251, 0.5);
}

.bbai-usage-table-card tbody tr:nth-child(even):hover {
    background: var(--bbai-gray-50);
}

.bbai-usage-table-card tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--bbai-text);
    border-bottom: 1px solid var(--bbai-gray-100);
    vertical-align: middle;
}

.bbai-usage-table-card tbody tr:last-child td {
    border-bottom: none;
}

/* Table subtitle (email under name) */
.bbai-table-subtitle {
    font-size: 12px;
    color: var(--bbai-text-muted);
    margin-top: 2px;
}

.bbai-empty-table-message {
    text-align: center;
    padding: var(--bbai-space-10);
    color: var(--bbai-text-muted);
    font-size: 14px;
    background: var(--bbai-gray-50);
    border-radius: 12px;
    border: 1px dashed var(--bbai-gray-200);
}

/* Usage Filters */
.bbai-usage-filters {
    display: flex;
    gap: var(--bbai-space-3);
    flex-wrap: wrap;
    margin-bottom: var(--bbai-space-6);
}

/* Usage page intelligence + activity refinements */
.bbai-credit-usage-page .bbai-credit-summary-copy {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bbai-credit-usage-page .bbai-credit-summary-line {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.bbai-credit-usage-page .bbai-credit-summary-line--warning {
    color: #9a3412;
}

.bbai-credit-usage-page .bbai-credit-summary-line--danger {
    color: #991b1b;
}

.bbai-credit-usage-page .bbai-credit-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bbai-credit-usage-page .bbai-credit-summary-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
}

.bbai-credit-usage-page .bbai-credit-insight {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
}

.bbai-credit-usage-page .bbai-credit-insight-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

.bbai-credit-usage-page .bbai-credit-insight p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #1e3a8a;
}

.bbai-credit-usage-page .bbai-credit-insight--warning {
    background: #fff7ed;
    border-color: #fdba74;
}

.bbai-credit-usage-page .bbai-credit-insight--warning .bbai-credit-insight-label,
.bbai-credit-usage-page .bbai-credit-insight--warning p {
    color: #9a3412;
}

.bbai-credit-usage-page .bbai-credit-insight--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.bbai-credit-usage-page .bbai-credit-insight--danger .bbai-credit-insight-label,
.bbai-credit-usage-page .bbai-credit-insight--danger p {
    color: #991b1b;
}

.bbai-credit-usage-page .bbai-credit-automation-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}

.bbai-credit-usage-page .bbai-credit-bar--warning .bbai-credit-bar-fill {
    background: linear-gradient(90deg, #fb923c, #f59e0b);
}

.bbai-credit-usage-page .bbai-credit-bar--danger .bbai-credit-bar-fill {
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.bbai-credit-usage-page .bbai-credit-upgrade-eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.bbai-credit-usage-page .bbai-credit-upgrade-context {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.94);
}

.bbai-credit-usage-page .bbai-credit-upgrade-footer {
    text-align: left;
}

.bbai-credit-usage-page .bbai-credit-filter-row {
    align-items: end;
}

.bbai-credit-usage-page .bbai-credit-activity-shell {
    margin-top: 20px;
}

.bbai-credit-usage-page .bbai-credit-activity-state {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
    border: 1px dashed #cbd5e1;
}

.bbai-credit-usage-page .bbai-credit-activity-state__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.bbai-credit-usage-page .bbai-credit-activity-state__description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    max-width: 640px;
}

.bbai-credit-usage-page .bbai-credit-activity-state__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bbai-credit-usage-page .bbai-credit-activity-results {
    margin-bottom: 0;
}

.bbai-credit-usage-page .bbai-credit-activity-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.bbai-credit-usage-page .bbai-credit-activity-results-copy {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.bbai-credit-usage-page .bbai-credit-activity-table-wrap {
    overflow-x: auto;
}

.bbai-credit-usage-page .bbai-credit-activity-credits {
    font-weight: 700;
    color: #0f766e;
}

.bbai-credit-usage-page .bbai-credit-activity-link {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.bbai-credit-usage-page .bbai-credit-activity-link:hover,
.bbai-credit-usage-page .bbai-credit-activity-link:focus-visible {
    color: #2563eb;
    text-decoration: underline;
}

.bbai-credit-usage-page .bbai-credit-activity-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.bbai-credit-usage-page .bbai-credit-activity-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.bbai-credit-usage-page .bbai-credit-activity-pagination .page-numbers.current {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.bbai-credit-usage-page .bbai-credit-activity-pagination .page-numbers:hover,
.bbai-credit-usage-page .bbai-credit-activity-pagination .page-numbers:focus-visible {
    border-color: #94a3b8;
    color: #0f172a;
    outline: none;
}

@media (max-width: 782px) {
    .bbai-credit-usage-page .bbai-credit-filter-row {
        grid-template-columns: 1fr;
    }

    .bbai-credit-usage-page .bbai-credit-filter-actions {
        justify-content: flex-start;
    }

    .bbai-credit-usage-page .bbai-credit-summary-meta,
    .bbai-credit-usage-page .bbai-credit-activity-state__actions,
    .bbai-credit-usage-page .bbai-credit-activity-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bbai-credit-usage-page .bbai-credit-summary-pill {
        width: 100%;
        border-radius: 12px;
    }

    .bbai-credit-usage-page .bbai-credit-activity-state {
        padding: 22px;
    }
}

/* ============================================
   CONTENT PANELS
   ============================================ */

.bbai-content-panel {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    overflow: hidden;
}

.bbai-content-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--bbai-space-4) var(--bbai-space-5);
    border-bottom: 1px solid var(--bbai-border);
    background: var(--bbai-bg-secondary);
}

.bbai-content-panel-title {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
}

.bbai-content-panel-body {
    padding: var(--bbai-space-5);
}

/* ============================================
   INFO NOTICES
   ============================================ */

.bbai-info-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-4);
    background: var(--bbai-info-bg);
    border-radius: var(--bbai-radius);
    margin-bottom: var(--bbai-space-4);
}

.bbai-info-notice:last-child {
    margin-bottom: 0;
}

.bbai-info-notice-icon {
    width: 20px;
    height: 20px;
    color: var(--bbai-info);
    flex-shrink: 0;
    margin-top: 1px;
}

.bbai-info-notice-content {
    flex: 1;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-info-dark);
    line-height: 1.5;
}

/* ============================================
   DARK MODE
   ============================================ */

[data-theme="dark"] .bbai-settings-section,
.bbai-dark-mode .bbai-settings-section,
[data-theme="dark"] .bbai-guide-section,
.bbai-dark-mode .bbai-guide-section,
[data-theme="dark"] .bbai-debug-section,
.bbai-dark-mode .bbai-debug-section {
    background: var(--bbai-bg);
    border-color: var(--bbai-border);
}

[data-theme="dark"] .bbai-guide-step,
.bbai-dark-mode .bbai-guide-step {
    background: var(--bbai-bg-secondary);
}

[data-theme="dark"] .bbai-debug-panel,
.bbai-dark-mode .bbai-debug-panel {
    background: #0f172a;
}

[data-theme="dark"] .bbai-content-panel,
.bbai-dark-mode .bbai-content-panel {
    background: var(--bbai-bg);
    border-color: var(--bbai-border);
}

[data-theme="dark"] .bbai-credit-stat-card,
.bbai-dark-mode .bbai-credit-stat-card {
    background: var(--bbai-bg);
    border-color: var(--bbai-border);
}

[data-theme="dark"] .bbai-credit-usage-page .bbai-credit-usage-meter-card,
[data-theme="dark"] .bbai-credit-usage-page .bbai-credit-stat-card,
.bbai-dark-mode .bbai-credit-usage-page .bbai-credit-usage-meter-card,
.bbai-dark-mode .bbai-credit-usage-page .bbai-credit-stat-card {
    background: var(--bbai-bg);
    border-color: var(--bbai-border);
}

/* ============================================
   LIBRARY EMPTY STATE SYNC LINK
   ============================================ */

.bbai-empty-state-sync-link {
    display: block;
    margin: var(--bbai-space-4) auto var(--bbai-space-6);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    text-align: center;
    max-width: 500px;
}

.bbai-empty-state-sync-link:hover {
    color: var(--bbai-primary);
    text-decoration: underline;
}

/* ============================================
   LIBRARY EMPTY STATE CARD WIDTH
   ============================================ */

.bbai-library-empty-state .bbai-card {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   LIBRARY FILTER BUTTONS
   ============================================ */

.bbai-library-filter-btn {
    padding: 10px 16px;
    border: 1px solid var(--bbai-border);
    border-radius: 10px;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-weight: var(--bbai-font-medium);
}

.bbai-library-filter-btn:hover {
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    background: #f9fafb;
}

.bbai-library-filter-btn:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px rgba(155, 92, 255, 0.1);
}

.bbai-library-clear-link {
    color: var(--bbai-text-muted);
    text-decoration: none;
    font-size: var(--bbai-text-sm);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bbai-library-clear-link:hover {
    color: var(--bbai-primary);
    text-decoration: underline;
}

/* ============================================
   SETTINGS PAGE - Premium SaaS Design
   ============================================ */

/* Settings Header */
.bbai-settings-header {
    margin-bottom: var(--bbai-space-6);
}

.bbai-settings-header .bbai-page-title {
    font-size: 28px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
    line-height: 1.3;
}

.bbai-settings-header .bbai-page-subtitle {
    font-size: 14px;
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Site-Wide Banner */
.bbai-settings-sitewide-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-4);
    background: var(--bbai-info-bg);
    border-radius: var(--bbai-radius-lg);
    margin-bottom: var(--bbai-space-6);
}

.bbai-settings-sitewide-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.bbai-settings-sitewide-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bbai-settings-sitewide-title {
    font-size: 14px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-info-dark);
}

.bbai-settings-sitewide-text {
    font-size: 14px;
    color: var(--bbai-info-dark);
}

.bbai-settings-section-nav {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-1);
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-full);
    margin-bottom: var(--bbai-space-2);
}

.bbai-settings-section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 var(--bbai-space-4);
    border-radius: var(--bbai-radius-full);
    color: var(--bbai-text-muted);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    text-decoration: none;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-settings-section-link:hover {
    color: var(--bbai-text);
    background: rgba(15, 23, 42, 0.04);
}

.bbai-settings-section-link.active {
    color: var(--bbai-text);
    background: var(--bbai-bg);
    box-shadow: var(--bbai-shadow-sm);
}

.bbai-page-header--embedded .bbai-page-title {
    font-size: var(--bbai-text-2xl);
}

/* Plan Summary Card - Elevated Design */
.bbai-settings-plan-summary-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: 16px;
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-settings-plan-badge-top {
    margin-bottom: var(--bbai-space-4);
}

.bbai-settings-plan-badge-text {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Plan Quota Display */
.bbai-settings-plan-quota {
    margin-bottom: var(--bbai-space-5);
}

.bbai-settings-plan-quota-meter {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: var(--bbai-space-1);
}

.bbai-settings-plan-quota-used {
    font-size: 42px;
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    line-height: 1;
}

.bbai-settings-plan-quota-divider {
    font-size: 28px;
    font-weight: var(--bbai-font-light);
    color: var(--bbai-text-muted);
}

.bbai-settings-plan-quota-limit {
    font-size: 28px;
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-muted);
}

.bbai-settings-plan-quota-label {
    font-size: 14px;
    color: var(--bbai-text-muted);
}

/* Plan Info Items */
.bbai-settings-plan-info {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
    margin-bottom: var(--bbai-space-5);
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-border);
}

.bbai-settings-plan-info-item {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    font-size: 14px;
    color: var(--bbai-text-secondary);
}

.bbai-settings-plan-info-item svg {
    flex-shrink: 0;
    color: var(--bbai-text-muted);
}

/* Large Upgrade Button */
.bbai-settings-plan-upgrade-btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: var(--bbai-font-semibold);
    border-radius: 12px;
}

/* Settings Cards */
.bbai-settings-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: 16px;
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-settings-card-header {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    margin-bottom: var(--bbai-space-5);
    padding-bottom: var(--bbai-space-4);
    border-bottom: 1px solid var(--bbai-border);
}

.bbai-settings-card-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bbai-primary-soft);
    border-radius: var(--bbai-radius-lg);
    color: var(--bbai-primary);
}

.bbai-settings-card-title {
    font-size: 18px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
}

/* License Card Styles */
.bbai-settings-license-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    background: var(--bbai-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--bbai-radius-lg);
    margin-bottom: var(--bbai-space-4);
}

.bbai-settings-license-status {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    flex: 1;
}

.bbai-settings-license-title {
    font-size: 15px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-success-dark);
    margin-bottom: 2px;
}

.bbai-settings-license-subtitle {
    font-size: 14px;
    color: var(--bbai-text-secondary);
}

.bbai-settings-license-key {
    margin-top: var(--bbai-space-2);
    font-size: 12px;
    color: var(--bbai-text-muted);
    font-family: var(--bbai-font-mono);
    word-break: break-all;
    background: var(--bbai-bg);
    padding: 6px 10px;
    border-radius: var(--bbai-radius);
    border: 1px solid var(--bbai-border);
}

.bbai-license-key-display {
    background: var(--bbai-bg);
    padding: 6px 10px;
    border-radius: var(--bbai-radius);
    border: 1px solid var(--bbai-border);
}

.bbai-settings-license-active .bbai-btn-danger {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
    margin-left: auto;
}

/* License Form */
.bbai-settings-license-form {
    padding: var(--bbai-space-4);
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius-lg);
}

.bbai-settings-license-description {
    font-size: 14px;
    color: var(--bbai-text-secondary);
    margin: 0 0 var(--bbai-space-4) 0;
}

.bbai-settings-license-input-group {
    margin-bottom: var(--bbai-space-4);
}

.bbai-settings-license-label {
    display: block;
    font-size: 13px;
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-secondary);
    margin-bottom: var(--bbai-space-2);
}

.bbai-settings-license-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    font-size: 14px;
    font-family: var(--bbai-font-mono);
    color: var(--bbai-text);
    background: var(--bbai-bg);
    transition: all 0.2s ease;
}

.bbai-settings-license-input:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

.bbai-settings-license-input::placeholder {
    color: var(--bbai-text-muted);
}

.bbai-settings-license-activate-btn {
    width: 100%;
}

/* License Sites Section (Agency) */
.bbai-settings-license-sites {
    margin-top: var(--bbai-space-4);
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-border);
}

.bbai-settings-license-sites-header {
    margin-bottom: var(--bbai-space-3);
}

.bbai-settings-license-sites-title {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    font-size: 14px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
}

.bbai-settings-license-sites-content {
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius);
    padding: var(--bbai-space-4);
}

.bbai-settings-license-sites-loading {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    font-size: 14px;
    color: var(--bbai-text-muted);
}

/* Account Management Card */
.bbai-settings-account-info-banner {
    display: flex;
    align-items: center;
    padding: var(--bbai-space-3) var(--bbai-space-4);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius);
    margin-bottom: var(--bbai-space-4);
}

.bbai-settings-account-info-banner span {
    font-size: 14px;
    color: var(--bbai-text-secondary);
}

.bbai-settings-account-upgrade-link {
    margin-top: var(--bbai-space-4);
}

.bbai-settings-account-upgrade-btn {
    width: 100%;
}

.bbai-settings-account-status {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    margin-bottom: var(--bbai-space-4);
}

.bbai-settings-account-status-label {
    font-size: 14px;
    color: var(--bbai-text-muted);
}

.bbai-settings-account-status-value {
    font-size: 14px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

.bbai-settings-account-actions {
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-border);
}

.bbai-settings-account-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    margin-bottom: var(--bbai-space-4);
}

.bbai-settings-account-action-info {
    font-size: 13px;
    color: var(--bbai-text-secondary);
    line-height: 1.6;
}

.bbai-settings-account-action-info p {
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-settings-account-action-info ul {
    margin: 0;
    padding-left: var(--bbai-space-5);
}

.bbai-settings-account-action-info li {
    margin-bottom: var(--bbai-space-1);
}

/* Generation Settings Card */
.bbai-settings-generation-title {
    font-size: 18px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-6) 0;
}

.bbai-settings-form-group {
    margin-bottom: var(--bbai-space-5);
    padding-bottom: var(--bbai-space-5);
    border-bottom: 1px solid var(--bbai-border);
}

.bbai-settings-form-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bbai-settings-form-field--toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bbai-space-4);
}

.bbai-settings-form-field-content {
    flex: 1;
}

.bbai-settings-form-label {
    display: block;
    font-size: 15px;
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-1);
}

.bbai-settings-form-description {
    font-size: 13px;
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

.bbai-settings-form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    font-size: 14px;
    color: var(--bbai-text);
    background: var(--bbai-bg);
    margin-top: var(--bbai-space-2);
    transition: all 0.2s ease;
}

.bbai-settings-form-input:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

.bbai-settings-form-input::placeholder {
    color: var(--bbai-text-muted);
}

.bbai-settings-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    font-size: 14px;
    color: var(--bbai-text);
    background: var(--bbai-bg);
    margin-top: var(--bbai-space-2);
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.bbai-settings-form-textarea:focus {
    outline: none;
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

.bbai-settings-form-textarea::placeholder {
    color: var(--bbai-text-muted);
}

.bbai-settings-form-actions {
    margin-top: var(--bbai-space-6);
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-border);
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.bbai-settings-save-btn {
    min-width: 140px;
}

/* Settings Toggle Switch */
.bbai-settings-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.bbai-settings-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bbai-settings-toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bbai-gray-300);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.bbai-settings-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.bbai-settings-toggle input:checked + .bbai-settings-toggle-slider {
    background: var(--bbai-primary);
}

.bbai-settings-toggle input:checked + .bbai-settings-toggle-slider::after {
    transform: translateX(22px);
}

.bbai-settings-toggle input:focus + .bbai-settings-toggle-slider {
    box-shadow: 0 0 0 3px var(--bbai-primary-soft);
}

/* Auth Required State */
.bbai-settings-required {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: var(--bbai-space-8);
}

.bbai-settings-required-content {
    text-align: center;
    max-width: 420px;
}

.bbai-settings-required-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bbai-primary-soft, #eff6ff);
    border-radius: 50%;
    margin: 0 auto var(--bbai-space-4);
    color: var(--bbai-primary, #2563eb);
}

.bbai-settings-required h2 {
    font-size: 22px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
    letter-spacing: -0.01em;
}

.bbai-settings-required p {
    font-size: 14px;
    color: var(--bbai-text-secondary);
    margin: 0 0 var(--bbai-space-3) 0;
    line-height: 1.6;
}

.bbai-settings-required-benefits {
    list-style: none;
    margin: var(--bbai-space-4) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.bbai-settings-required-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bbai-text-secondary);
}

.bbai-settings-required-benefits li svg {
    flex-shrink: 0;
    color: var(--bbai-primary, #2563eb);
}

.bbai-settings-required-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bbai-space-3);
    margin-top: var(--bbai-space-5);
}

.bbai-settings-required-skip {
    font-size: 13px;
    color: var(--bbai-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.bbai-settings-required-skip:hover {
    color: var(--bbai-text-secondary);
}

.bbai-settings-required-note {
    font-size: 12px;
    color: var(--bbai-text-muted);
    margin-top: var(--bbai-space-4);
    line-height: 1.5;
}

/* Settings Gate: split preview + unlock layout */
.bbai-settings-gate {
    display: grid;
    grid-template-columns: 1fr 296px;
    gap: 20px;
    align-items: start;
}

.bbai-settings-gate__preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: none;
    user-select: none;
}

.bbai-settings-gate__section {
    padding: 20px 22px;
    border-radius: 14px;
    opacity: 0.62;
}

.bbai-settings-gate__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bbai-border, #e2e8f0);
}

.bbai-settings-gate__section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--bbai-text);
    letter-spacing: -0.01em;
}

.bbai-settings-gate__lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bbai-gray-100, #f1f5f9);
    color: var(--bbai-text-muted, #94a3b8);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bbai-settings-gate__panel {
    position: sticky;
    top: 32px;
}

.bbai-settings-gate__panel-inner {
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 26px 22px 22px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bbai-settings-gate__panel-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bbai-primary-soft, #eff6ff);
    border-radius: 13px;
    color: var(--bbai-primary, #2563eb);
    margin-bottom: 14px;
}

.bbai-settings-gate__panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bbai-text);
    margin: 0 0 8px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.bbai-settings-gate__panel-desc {
    font-size: 13px;
    color: var(--bbai-text-secondary);
    margin: 0;
    line-height: 1.6;
}

.bbai-settings-gate__benefits {
    margin-top: 18px !important;
    margin-bottom: 0 !important;
}

.bbai-settings-gate__panel-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
}

.bbai-settings-gate__panel-actions .bbai-btn-primary {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.bbai-settings-gate__panel-actions .bbai-settings-required-skip {
    text-align: center;
}

@media (max-width: 900px) {
    .bbai-settings-gate {
        grid-template-columns: 1fr;
    }

    .bbai-settings-gate__panel {
        position: static;
        order: -1;
    }

    .bbai-settings-gate__panel-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 16px 20px;
        align-items: start;
    }

    .bbai-settings-gate__panel-icon {
        display: none;
    }

    .bbai-settings-gate__panel-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
    }

    .bbai-settings-gate__panel-actions .bbai-btn-primary {
        width: auto;
        flex: 1;
    }

    .bbai-settings-gate__panel-actions .bbai-settings-required-skip {
        flex: none;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .bbai-settings-gate__panel-inner {
        grid-template-columns: 1fr;
    }

    .bbai-settings-gate__panel-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-settings-gate__panel-actions .bbai-btn-primary {
        width: 100%;
    }
}

/* ─────────────────────────────────────────────────────────
   Settings Control Panel  (bbai-sg-  namespace)
───────────────────────────────────────────────────────── */

.bbai-sg-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 4px 0 22px;
    border-bottom: 1px solid var(--bbai-border, #e2e8f0);
    margin-bottom: 22px;
}

.bbai-sg-hero__title {
    font-size: 21px;
    font-weight: 700;
    color: var(--bbai-text);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.bbai-sg-hero__desc {
    font-size: 14px;
    color: var(--bbai-text-secondary);
    margin: 0;
    max-width: 480px;
    line-height: 1.6;
}

.bbai-sg-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.bbai-sg-hero__skip {
    font-size: 12px;
    color: var(--bbai-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.bbai-sg-hero__skip:hover {
    color: var(--bbai-text-secondary);
}

.bbai-sg-grid {
    display: grid;
    grid-template-columns: 1fr 272px;
    gap: var(--card-gap, 16px);
    align-items: start;
}

.bbai-sg-main {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap, 16px);
}

.bbai-sg-aside {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap, 16px);
    position: sticky;
    top: var(--section-spacing, 24px);
}

.bbai-sg-section {
    padding: 20px 22px;
    border-radius: 14px;
}

.bbai-sg-section__head {
    margin-bottom: var(--card-gap, 16px);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bbai-border, #e2e8f0);
}

.bbai-sg-section__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--bbai-text);
    margin: 0 0 3px;
    letter-spacing: -0.01em;
}

.bbai-sg-section__desc {
    font-size: 13px;
    color: var(--bbai-text-secondary);
    margin: 0;
}

.bbai-sg-section--loose .bbai-sg-feature__desc { margin-top: 8px; }
.bbai-sg-section--loose .bbai-sg-feature__default { margin-top: 10px; display: inline-block; }
.bbai-sg-section--loose .bbai-sg-feature__cta { margin-top: 12px; display: inline-block; }

.bbai-sg-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--card-gap, 16px);
}

.bbai-sg-feature {
    background: var(--bbai-gray-50, #f8fafc);
    border: 1px solid var(--bbai-border, #e2e8f0);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Gated settings preview: premium tiles read as locked / preview-only */
.bbai-settings-page--gated .bbai-sg-feature {
    opacity: 0.88;
}

.bbai-sg-feature__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.bbai-sg-feature__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--bbai-text);
    line-height: 1.3;
}

.bbai-sg-feature__lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--bbai-gray-100, #f1f5f9);
    color: var(--bbai-text-muted, #94a3b8);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.bbai-sg-feature__desc {
    font-size: 12px;
    color: var(--bbai-text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.bbai-sg-feature__default {
    font-size: 12px;
    font-weight: 600;
    color: var(--bbai-text-muted, #64748b);
    background: var(--bbai-gray-100, #f1f5f9);
    border-radius: 6px;
    padding: 4px 8px;
    align-self: flex-start;
}

.bbai-sg-feature__cta {
    margin-top: auto;
    padding: 0;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--bbai-primary, #2563eb);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    display: inline;
}

.bbai-sg-feature__cta:hover { text-decoration: underline; }

.bbai-sg-feature--row {
    flex-direction: row;
    align-items: center;
    background: none;
    border: none;
    border-bottom: 1px solid var(--bbai-border, #e2e8f0);
    border-radius: 0;
    padding: 14px 0;
    gap: 16px;
}

.bbai-sg-feature--row:last-child { border-bottom: none; padding-bottom: 0; }
.bbai-sg-feature--row:first-of-type { padding-top: 0; }

.bbai-sg-feature__row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bbai-sg-feature__row-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.bbai-sg-section--automation {
    background: linear-gradient(160deg, #f0f9ff 0%, #ffffff 100%);
    border-color: #bae6fd;
}

.bbai-sg-automation__icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0ea5e9;
    border-radius: 10px;
    color: #ffffff;
    margin-bottom: 10px;
}

.bbai-sg-automation__title { margin-bottom: 6px; }

.bbai-sg-automation__desc {
    font-size: 13px;
    color: var(--bbai-text-secondary);
    line-height: 1.6;
    margin: 0 0 14px;
}

.bbai-sg-automation__toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    margin-bottom: 14px;
}

.bbai-sg-automation__toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bbai-text);
    flex: 1;
}

.bbai-sg-toggle-visual { flex-shrink: 0; }

.bbai-sg-toggle-track {
    display: inline-flex;
    align-items: center;
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: var(--bbai-gray-200, #e2e8f0);
    padding: 2px;
    position: relative;
}

.bbai-sg-toggle-thumb {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    position: absolute;
    left: 2px;
}

.bbai-sg-automation__cta {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.bbai-sg-automation__note {
    font-size: 12px;
    color: var(--bbai-text-muted);
    margin: 10px 0 0;
    text-align: center;
}

.bbai-sg-automation__note a {
    color: var(--bbai-primary, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.bbai-sg-automation__note a:hover { text-decoration: underline; }

@media (max-width: 960px) {
    .bbai-sg-grid { grid-template-columns: 1fr; }
    .bbai-sg-aside { position: static; order: -1; }
}

@media (max-width: 740px) {
    .bbai-sg-hero { flex-direction: column; align-items: stretch; }
    .bbai-sg-hero__actions { flex-direction: row; align-items: center; }
    .bbai-sg-feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .bbai-sg-feature-grid { grid-template-columns: 1fr; }
    .bbai-sg-hero__actions { flex-direction: column; align-items: stretch; text-align: center; }
    .bbai-sg-hero__skip { text-align: center; }
}

/* Responsive Settings */
@media (max-width: 640px) {
    .bbai-settings-section-nav {
        display: flex;
        width: 100%;
    }

    .bbai-settings-section-link {
        flex: 1 1 0;
    }

    .bbai-settings-form-field--toggle {
        flex-direction: column;
        gap: var(--bbai-space-3);
    }

    .bbai-settings-plan-quota-used {
        font-size: 36px;
    }

    .bbai-settings-plan-quota-divider,
    .bbai-settings-plan-quota-limit {
        font-size: 24px;
    }

    .bbai-settings-license-active {
        flex-direction: column;
    }

    .bbai-settings-required-content {
        max-width: 100%;
    }
}



/* Imported from: _ui-restoration.css */
/**
 * UI Restoration - Complete styling system for BeepBeep AI admin pages
 * Restores polished SaaS design across Dashboard, ALT Library, Analytics, Credit Usage
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   GLOBAL DESIGN SYSTEM
   ============================================ */

.bbai-card,
.bbai-dashboard-card,
.bbai-analytics-card,
.bbai-library-card,
.bbai-credit-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-page-section {
    margin-bottom: var(--section-spacing, 24px);
}

.bbai-section {
    margin-bottom: var(--section-spacing, 24px);
}

/* Typography scale */
.bbai-page-title,
.bbai-dashboard-title,
.bbai-library-title,
.bbai-analytics-title,
.bbai-credit-title,
h1.bbai-heading,
.bbai-heading-1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: #111827;
}

.bbai-section-title,
.bbai-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

.bbai-description,
.bbai-subtitle,
.bbai-page-subtitle {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

.bbai-sub-label {
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

/* Grid spacing */
.bbai-grid {
    gap: 24px;
}

/* Buttons */
.bbai-btn,
.bbai-action-btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.15s ease;
}

/* ============================================
   QUICK ACTIONS - Shared across all pages
   ============================================ */

.bbai-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.bbai-quick-action-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
}

.bbai-quick-action-card:hover {
    transform: translateY(-2px);
    border-color: #d1d5db;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.bbai-quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #f3f8f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.bbai-quick-action-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.3;
}

.bbai-quick-action-description {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
}

.bbai-quick-action-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

@media (max-width: 1024px) {
    .bbai-quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bbai-quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DASHBOARD - Usage hero banner
   Shared usage banner across Dashboard, Library, Analytics, Credit Usage
   ============================================ */

.bbai-usage-hero,
.bbai-monthly-usage-summary,
.bbai-usage-banner:not(.bbai-saas-banner) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.bbai-usage-hero,
.bbai-monthly-usage-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.bbai-usage-hero-content {
    flex: 1;
    min-width: 200px;
}

.bbai-usage-hero-cta {
    flex-shrink: 0;
}

/* bbai-usage-banner structure (quota-exhausted-banner.php) - exclude .bbai-saas-banner */
.bbai-usage-banner:not(.bbai-saas-banner),
.bbai-usage-hero {
    background: #eef5ff;
    border: 1px solid #dbe7ff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.bbai-usage-banner-top {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.bbai-usage-banner-copy {
    flex: 1;
}

.bbai-usage-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__headline {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.3;
}

.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__subline {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__cta {
    background: #22c55e !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__cta:hover {
    background: #16a34a !important;
    transform: translateY(-1px);
}

.bbai-usage-progress {
    margin-top: 16px;
}

.bbai-usage-progress .bbai-usage-banner__usage-text {
    font-size: 13px;
    color: #374151;
    margin: 0 0 8px;
}

.bbai-usage-progress .bbai-usage-banner__usage-text strong {
    font-weight: 600;
}

.bbai-usage-progress-bar,
.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__progress {
    height: 8px;
    background: #dbe7ff;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0;
}

.bbai-usage-progress-fill,
.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5b8df7, #6aa6ff);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.bbai-usage-banner:not(.bbai-saas-banner) .bbai-usage-banner__footer {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 0;
}

/* ============================================
   DASHBOARD - Donut / Alt Text Status
   ============================================ */

.bbai-status-donut-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.bbai-donut-chart {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
}

.bbai-donut-chart.bbai-circular-progress-container {
    width: 260px;
    height: 260px;
}

.bbai-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bbai-donut-value {
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    color: #111827;
}

.bbai-donut-percent {
    font-size: 14px;
    opacity: 0.6;
    margin-left: 2px;
    vertical-align: super;
}

.bbai-donut-label {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
}

.bbai-alt-status-stats {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.bbai-status-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
}

.bbai-status-stats div strong,
.bbai-alt-status-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.bbai-status-stats div span,
.bbai-alt-status-stat span {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

/* Primary dashboard CTA - Scan Media Library */
.bbai-primary-dashboard-cta {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.bbai-primary-dashboard-cta .button,
.bbai-primary-dashboard-cta a,
.bbai-scan-media-cta {
    min-width: 280px;
    justify-content: center;
    text-align: center;
    background: #10b981;
    color: #ffffff;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.22);
    border: 1px solid #10b981;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bbai-primary-dashboard-cta .button:hover,
.bbai-primary-dashboard-cta a:hover,
.bbai-scan-media-cta:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

/* ============================================
   DASHBOARD - Upgrade to Growth card
   ============================================ */

.bbai-upgrade-card,
.bbai-upgrade-growth-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, #5b8df7 0%, #7bc6f2 100%);
    border-radius: 16px;
    color: #ffffff;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.2);
    border: none;
}

.bbai-upgrade-card-body {
    flex: 1;
}

.bbai-upgrade-card-footer {
    margin-top: auto;
}

.bbai-feature-check,
.bbai-benefit-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bbai-upgrade-button,
.bbai-cta-primary[data-action="show-upgrade-modal"] {
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease;
    border: none;
}

.bbai-upgrade-button:hover,
.bbai-cta-primary[data-action="show-upgrade-modal"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.bbai-upgrade-card .bbai-card-title,
.bbai-upgrade-growth-card .bbai-card-title {
    color: #ffffff;
}

.bbai-upgrade-card .bbai-benefits-list,
.bbai-upgrade-growth-card .bbai-benefits-list,
.bbai-feature-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.bbai-feature-list li {
    margin-bottom: 10px;
}

.bbai-upgrade-card .bbai-benefit-item,
.bbai-upgrade-growth-card .bbai-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: #ffffff;
}

/* ============================================
   DASHBOARD - Stats cards row
   ============================================ */

.bbai-stats-cards-row,
.bbai-performance-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.bbai-stats-cards-row .bbai-dashboard-card,
.bbai-performance-metrics .bbai-dashboard-card {
    text-align: center;
}

@media (max-width: 1024px) {
    .bbai-stats-cards-row,
    .bbai-performance-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bbai-stats-cards-row,
    .bbai-performance-metrics {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ALT LIBRARY - Coverage card
   ============================================ */

.bbai-alt-coverage-card-inline,
.bbai-alt-coverage-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bbai-alt-coverage-stats,
.bbai-alt-coverage-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-bottom: 14px;
}

.bbai-alt-stat strong,
.bbai-alt-coverage-card__stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.bbai-alt-stat span,
.bbai-alt-coverage-card__stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.bbai-alt-success {
    font-size: 13px;
    color: #16a34a;
    margin-top: 8px;
}

/* ============================================
   ALT LIBRARY - Review filter pills
   ============================================ */

.bbai-alt-review-filters__btn,
#bbai-review-filter-tabs .bbai-alt-review-filters__btn,
.bbai-filter-pill {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bbai-alt-review-filters__btn:hover,
.bbai-filter-pill:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.bbai-alt-review-filters__btn--active,
.bbai-filter-pill--active {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

#bbai-review-filter-tabs {
    margin-top: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   ALT LIBRARY - Table
   ============================================ */

.bbai-library-table-wrapper {
    margin-top: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.bbai-library-table thead th,
.bbai-saas-table.bbai-library-table thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #374151;
    background: #f9fafb;
    padding: 12px 16px;
}

.bbai-library-table tbody tr:hover,
.bbai-saas-table.bbai-library-table tbody tr:hover {
    background: #f9fafb;
}

.bbai-alt-text-preview {
    font-size: 13px;
    line-height: 1.45;
    color: #374151;
}

.bbai-alt-text-missing {
    font-size: 12px;
    color: #ef4444;
    font-style: italic;
}

.bbai-library-table .bbai-library-thumbnail,
.bbai-library-table .bbai-library-thumbnail-placeholder {
    border-radius: 8px;
}

.bbai-library-table .bbai-library-thumbnail {
    display: block;
    object-fit: cover;
}

/* ============================================
   CREDIT USAGE - Limit banner
   ============================================ */

.bbai-limit-banner {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.bbai-limit-banner strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ============================================
   CREDIT USAGE - Hero card + meter
   ============================================ */

.bbai-credit-usage-meter-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-credit-meter-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
}

.bbai-credit-usage-text,
.bbai-credit-reset,
.bbai-credit-helper {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 4px;
}

.bbai-credit-stat-card {
    text-align: center;
}

.bbai-credit-stat-title {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.bbai-credit-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.bbai-credit-upgrade-card .bbai-credit-upgrade-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px;
}

.bbai-credit-upgrade-card .bbai-credit-upgrade-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 16px;
}

.bbai-credit-upgrade-card .bbai-credit-upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.bbai-credit-upgrade-card .bbai-credit-upgrade-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #ffffff;
}

.bbai-credit-upgrade-card .bbai-credit-upgrade-features li::before {
    content: "✓";
    font-weight: 600;
    color: #ffffff;
}

/* ============================================
   CREDIT USAGE - Credit bar
   ============================================ */

.bbai-credit-bar {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 10px;
}

.bbai-credit-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f8cff, #6aa6ff);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* ============================================
   ANALYTICS - Metric cards
   ============================================ */

.bbai-analytics-metric-cards,
.bbai-premium-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.bbai-analytics-metric-card,
.bbai-metric-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-analytics-metric-card .bbai-stat-value,
.bbai-metric-card .bbai-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.bbai-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f3f8f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    .bbai-analytics-metric-cards,
    .bbai-premium-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bbai-analytics-metric-cards,
    .bbai-premium-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ANALYTICS - Bottom row equal height
   ============================================ */

.bbai-analytics-bottom-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.bbai-analytics-bottom-row .bbai-dashboard-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .bbai-analytics-bottom-row {
        flex-direction: column;
    }
}

/* ============================================
   SETTINGS PAGE - SaaS polish
   ============================================ */

.bbai-settings-page .bbai-settings-plan-summary-card,
.bbai-settings-page .bbai-settings-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbai-settings-saved-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
}

.bbai-settings-saved-icon {
    color: #22c55e;
    font-weight: 700;
}

.bbai-settings-form-actions--right {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.bbai-settings-form-actions--right .bbai-cta-save {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
}

.bbai-settings-form-actions--right .bbai-cta-save:hover {
    background: #16a34a;
}

.bbai-settings-card-description {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 20px;
}

.bbai-settings-sitewide-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.bbai-settings-sitewide-icon {
    flex-shrink: 0;
}

.bbai-settings-sitewide-content {
    flex: 1;
}

.bbai-settings-sitewide-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 2px;
}

.bbai-settings-sitewide-text {
    font-size: 13px;
    color: #3b82f6;
}

/* ============================================
   GUIDE PAGE - Step cards + CTA
   ============================================ */

.bbai-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bbai-guide-step-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

.bbai-guide-step-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.bbai-guide-step-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 12px;
    background: #f3f8f5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bbai-guide-step-icon svg {
    width: 24px;
    height: 24px;
}

.bbai-guide-step-content {
    flex: 1;
    min-width: 0;
}

.bbai-guide-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.3;
}

.bbai-guide-step-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 12px;
}

.bbai-guide-step-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.bbai-guide-step-bullets li {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.bbai-guide-step-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

.bbai-guide-step-cta {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
}

.bbai-guide-cta-card {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.bbai-guide-cta-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}

.bbai-guide-cta-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 20px;
}

.bbai-guide-cta-btn {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.bbai-guide-cta-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .bbai-guide-step-card {
        flex-direction: column;
        gap: 16px;
    }

    .bbai-guide-step-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
}



/* Imported from: _dashboard-reference.css */
/**
 * BeepBeep AI Dashboard - Premium SaaS Design System
 * Inspired by Vercel, Stripe, Linear
 * Scoped to .bbai-container to override _ui-restoration and ensure styles apply
 *
 * @package BeepBeep_AI
 */

/* ==========================================================================
   Design tokens - Premium SaaS (Vercel, Stripe, Linear inspired)
   ========================================================================== */
:root {
    --bbai-saas-radius: 14px;
    --bbai-saas-radius-lg: 14px;
    --bbai-saas-padding: 24px;
    --bbai-saas-padding-lg: 24px;
    --bbai-saas-gap: 24px;
    --bbai-saas-section-gap: 32px;
    --bbai-saas-grid-gap: 24px;
    --bbai-saas-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    --bbai-saas-shadow-hover: 0 4px 14px rgba(15, 23, 42, 0.08);
    --bbai-saas-border: 1px solid #e5e7eb;
    --bbai-saas-primary: #2563eb;
    --bbai-saas-primary-hover: #1d4ed8;
    --bbai-saas-primary-light: #3b82f6;
    --bbai-btn-padding: 12px 20px;
    --bbai-btn-radius: 10px;
    --bbai-btn-font: 14px;
    --bbai-btn-weight: 600;
}

/* ==========================================================================
   Page background & container
   ========================================================================== */
.bbai-tab-content#tab-dashboard .bbai-premium-dashboard,
.bbai-tab-content#tab-dashboard .bbai-dashboard-shell,
.bbai-clean-dashboard,
.bbai-container .bbai-dashboard {
    background: transparent;
}

.bbai-container {
    background: #f9fafb;
}

/* ==========================================================================
   Remove WordPress admin spacing for BeepBeep dashboard page only
   Scoped to body.toplevel_page_bbai so other admin pages are unaffected
   ========================================================================== */

/* Anonymous trial: let WP's own layout handle positioning, just remove excess wrap padding */
body.toplevel_page_bbai:not(.bbai-dashboard--connected) .wrap.bbai-wrap {
    margin: 0;
    padding: 0;
    max-width: none;
    overflow: visible;
}

/* Dashboard shell - matches ALT Library, Analytics, etc. (Step 1 & 2) */
.bbai-dashboard-shell,
.bbai-container.bbai-dashboard-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dashboard content — controlled SaaS spacing */
.bbai-dashboard-shell #bbai-dashboard-main,
.bbai-dashboard#bbai-dashboard-main {
    width: 100%;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 28px 32px 40px !important;
    box-sizing: border-box;
}

/* SSR stays visible; optional gentle fade when JS marks hydrated (no blank screen) */
#bbai-dashboard-main[data-hydrated="false"] {
    opacity: 0.98;
    pointer-events: auto;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

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

/* ==========================================================================
   Dashboard: primary CTA — solid green (single system, no gradients)
   ========================================================================== */
.bbai-tab-content#tab-dashboard .bbai-btn-primary,
.bbai-dashboard-shell .bbai-btn-primary,
#bbai-dashboard-main .bbai-btn-primary,
.bbai-container .bbai-dashboard-shell .bbai-btn-primary {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    min-height: 46px !important;
    padding: 12px 18px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22) !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bbai-tab-content#tab-dashboard .bbai-btn-primary:hover:not(:disabled),
.bbai-dashboard-shell .bbai-btn-primary:hover:not(:disabled),
#bbai-dashboard-main .bbai-btn-primary:hover:not(:disabled),
.bbai-container .bbai-dashboard-shell .bbai-btn-primary:hover:not(:disabled) {
    background: #059669 !important;
    border-color: #059669 !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28) !important;
    transform: translateY(-1px);
}

.bbai-tab-content#tab-dashboard .bbai-btn-primary:focus-visible,
.bbai-dashboard-shell .bbai-btn-primary:focus-visible,
#bbai-dashboard-main .bbai-btn-primary:focus-visible {
    outline: 2px solid #059669 !important;
    outline-offset: 2px;
}

/* ==========================================================================
   Section 1: Top usage banner
   Override _ui-restoration (green CTA, old layout)
   ========================================================================== */
.bbai-container .bbai-usage-banner.bbai-saas-banner,
.bbai-usage-banner.bbai-saas-banner {
    display: block;
    width: 100%;
    background: #ffffff;
    border: var(--bbai-saas-border);
    border-radius: var(--bbai-saas-radius);
    padding: 20px 24px;
    box-shadow: var(--bbai-saas-shadow);
    margin-bottom: var(--bbai-saas-section-gap);
    transition: box-shadow 0.2s ease;
}

.bbai-usage-banner.bbai-saas-banner:hover {
    box-shadow: var(--bbai-saas-shadow-hover);
}

.bbai-usage-banner.bbai-banner--limit-reached {
    background: #ffffff;
}

/* Quota-exhausted banner: match hero prominence so it's visible at top */
.bbai-dashboard .bbai-quota-exhausted-banner {
    background: #ffffff !important;
    border: 1px solid #e6eaf0 !important;
    border-radius: 18px !important;
    padding: 24px 28px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    display: block !important;
}

/* Hero banner - dashboard summary + primary action (Step 3 & 4) */
.bbai-dashboard-hero {
    width: 100%;
    margin-bottom: 28px;
    background: #ffffff;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.bbai-dashboard .bbai-dashboard-hero {
    margin-bottom: 28px;
}

.bbai-dashboard-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.bbai-dashboard-hero-copy {
    flex: 1 1 520px;
}

.bbai-dashboard-hero__headline {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f2d3d;
    margin: 0 0 8px;
}

.bbai-dashboard-hero__subtext {
    font-size: 15px;
    line-height: 1.5;
    color: #6b7b8c;
    margin: 0 0 10px;
}

.bbai-dashboard-hero__usage {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

.bbai-dashboard-hero__usage .bbai-banner-usage-used,
.bbai-dashboard-hero__usage .bbai-banner-usage-limit {
    font-weight: 600;
    color: #1f2d3d;
}

.bbai-dashboard-hero-progress {
    margin-top: 10px;
}

.bbai-dashboard-hero-progress-track {
    max-width: 720px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.bbai-dashboard-hero-progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #5b8df7, #6aa6ff);
    border-radius: 999px;
    transition: width 0.4s ease;
}

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

.bbai-dashboard-hero__cta--primary,
.bbai-dashboard-hero-actions .bbai-btn-primary {
    white-space: nowrap;
    min-height: 46px;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #10b981;
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
}

.bbai-dashboard-hero__cta--primary:hover,
.bbai-dashboard-hero-actions .bbai-btn-primary:hover {
    transform: translateY(-1px) !important;
    border-color: #059669;
    background: #059669 !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28) !important;
}

.bbai-dashboard-hero__cta--tertiary {
    font-size: 13px !important;
    min-height: 40px !important;
    padding: 10px 16px !important;
}

.bbai-dashboard-hero__cta--secondary {
    font-size: 14px;
    color: #64748b !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none;
    padding: 8px 0;
}

.bbai-dashboard-hero__cta--secondary:hover {
    color: #3b82f6 !important;
    text-decoration: underline;
    transform: none;
}

/* Legacy success banner (if still referenced) */
.bbai-dashboard-success-banner {
    background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
    border: 1px solid #dbe7ff;
}

.bbai-dashboard-success-banner .bbai-usage-banner__headline {
    font-size: 20px;
    font-weight: 600;
    color: #1f2d3d;
}

/* Usage limit banner - dashboard only, when monthly limit reached */
.bbai-usage-limit-banner.bbai-banner--limit-reached {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.06);
}

.bbai-usage-limit-banner .bbai-usage-banner__progress-wrap--full {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.bbai-usage-limit-banner .bbai-usage-banner__progress-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}

.bbai-usage-limit-banner .bbai-usage-banner__progress {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
}

.bbai-usage-limit-banner .bbai-usage-banner__progress-fill {
    background: linear-gradient(90deg, #5b7cff, #7a5cff);
    border-radius: 999px;
}

.bbai-usage-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bbai-usage-banner__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.bbai-usage-banner__content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.bbai-usage-banner__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #64748b;
}

.bbai-usage-banner__icon svg {
    width: 100%;
    height: 100%;
}

.bbai-usage-banner__badge {
    font-size: 20px;
    margin-bottom: 6px;
    line-height: 1;
}

.bbai-usage-banner__headline {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.bbai-usage-banner__credits {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.bbai-usage-banner__credits strong {
    color: #0f172a;
}

.bbai-usage-banner__footer {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.bbai-usage-banner__progress-wrap--full {
    width: 100%;
}

.bbai-usage-banner__progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.bbai-usage-banner__progress-wrap--full .bbai-usage-banner__progress {
    flex: 1;
}

.bbai-usage-banner__progress {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.bbai-usage-banner__progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #5b7cff, #7a5cff);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.bbai-usage-banner__progress-wrap--full .bbai-usage-banner__progress-pct {
    display: none;
}

.bbai-usage-banner__progress-pct {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

/* Banner CTA — solid green (same system as dashboard primary) */
.bbai-usage-banner.bbai-saas-banner .bbai-usage-banner__cta,
.bbai-usage-banner.bbai-saas-banner .bbai-btn-primary,
.bbai-container .bbai-usage-banner__cta,
.bbai-container .bbai-usage-banner .bbai-btn-primary {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    border-radius: var(--bbai-btn-radius);
    padding: var(--bbai-btn-padding);
    font-weight: var(--bbai-btn-weight);
    font-size: var(--bbai-btn-font);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bbai-usage-banner.bbai-saas-banner .bbai-usage-banner__cta:hover,
.bbai-usage-banner.bbai-saas-banner .bbai-btn-primary:hover,
.bbai-container .bbai-usage-banner__cta:hover,
.bbai-container .bbai-usage-banner .bbai-btn-primary:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
    transform: translateY(-1px);
}

.bbai-usage-banner.bbai-saas-banner .bbai-usage-banner__cta:focus-visible,
.bbai-usage-banner.bbai-saas-banner .bbai-btn-primary:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

.bbai-usage-banner__actions [hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    .bbai-usage-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .bbai-usage-banner__right {
        align-items: stretch;
    }
    .bbai-usage-banner__progress-wrap {
        min-width: 0;
    }
}

/* Legacy hero banner compatibility (if still used elsewhere) */
.bbai-hero-banner.bbai-usage-banner,
.bbai-hero-banner.bbai-usage-hero {
    display: block !important;
    background: #ffffff !important;
    border: var(--bbai-saas-border) !important;
    border-radius: var(--bbai-saas-radius-lg) !important;
    padding: var(--bbai-saas-padding-lg) 32px !important;
    box-shadow: var(--bbai-saas-shadow) !important;
}

/* ==========================================================================
   Section 2: Dashboard header - stronger hierarchy
   ========================================================================== */
.bbai-dashboard-header,
.bbai-dashboard .bbai-dashboard-header {
    margin-bottom: 24px;
    padding: 0;
    border-bottom: none;
}

.bbai-dashboard-header__title,
.bbai-dashboard-header-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    color: #1f2d3d;
    margin: 0 0 8px;
}

.bbai-dashboard-header__subtitle,
.bbai-dashboard-header-subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: #6b7b8c;
    margin: 0 0 24px;
}

.bbai-dashboard-header-meta {
    display: none;
}

/* ==========================================================================
   Section 3: Main dashboard layout (centered container, 3 rows)
   ========================================================================== */
.bbai-dashboard-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-saas-section-gap);
}

.bbai-dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.bbai-dashboard-row--1,
.bbai-dashboard-row--2 {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bbai-dashboard-row--3 {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .bbai-dashboard-row--1,
    .bbai-dashboard-row--2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .bbai-dashboard-row--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bbai-dashboard-row--3 {
        grid-template-columns: 1fr;
    }
}

/* Legacy two-column grid (for backward compatibility) */
.bbai-dashboard-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    column-gap: var(--bbai-saas-grid-gap);
    row-gap: var(--bbai-saas-section-gap);
    align-items: stretch;
}

.bbai-dashboard-two-column .bbai-dashboard-main-grid {
    display: contents;
}

.bbai-dashboard-two-column .bbai-dashboard-left-column {
    grid-column: 1;
    grid-row: 1;
}

.bbai-dashboard-two-column .bbai-growth-card {
    grid-column: 2;
    grid-row: 1;
}

.bbai-dashboard-two-column .bbai-actions-card {
    grid-column: 1;
    grid-row: 2;
}

.bbai-dashboard-two-column .bbai-opportunity-scanner {
    grid-column: 2;
    grid-row: 2;
}

.bbai-dashboard-two-column .bbai-dashboard-metrics {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0;
}

.bbai-dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bbai-saas-grid-gap);
    align-items: start;
    margin-bottom: 0;
}

.bbai-dashboard-left-column {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-saas-gap);
}

/* Dashboard cards - shared base, equal height in rows (Step 8) */
.bbai-dashboard-card {
    background: #ffffff;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    align-self: stretch;
    height: 100%;
}

.bbai-dashboard-row .bbai-dashboard-card {
    height: 100%;
    margin-bottom: 0;
}

.bbai-dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #dbe4ee;
}

.bbai-dashboard-card .bbai-btn:hover:not(:disabled),
.bbai-dashboard-card .bbai-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.bbai-dashboard-card .bbai-card__header {
    margin-bottom: 14px;
}

.bbai-dashboard-card .bbai-card__title,
.bbai-dashboard-card .bbai-opportunity-scanner__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px;
    line-height: 1.3;
}

.bbai-dashboard-card .bbai-card__copy {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    max-width: 420px;
}

.bbai-dashboard-card .bbai-card__body p,
.bbai-dashboard-card p {
    max-width: 420px;
}

/* Status card paragraphs need full width */
.bbai-status-card p {
    max-width: none;
}

.bbai-dashboard-card .bbai-card__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.bbai-dashboard-card .bbai-card__footer {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
}

/* Status card - matches design */
.bbai-status-card {
    padding: 32px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid #eef1f5 !important;
}

.bbai-status-card .bbai-card__header {
    margin-bottom: 18px;
    text-align: center;
}

.bbai-status-card .bbai-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2d3d;
    text-align: center;
}

.bbai-status-card .bbai-progress-donut-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 12px;
}

.bbai-status-card .bbai-progress-donut {
    max-width: 220px;
    width: 220px;
    height: 220px;
}

.bbai-status-card .bbai-progress-donut-center,
.bbai-status-card .bbai-donut-center {
    width: 68%;
    height: 68%;
    inset: 16%;
    margin: 0;
    background: #ffffff;
    border-radius: 50%;
}

.bbai-status-card .bbai-progress-donut-value,
.bbai-status-card .bbai-donut-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: #1f2d3d;
}

.bbai-status-card .bbai-progress-donut-percent,
.bbai-status-card .bbai-donut-percent {
    font-size: 16px;
    color: #1f2d3d;
}

.bbai-status-card .bbai-progress-donut-label,
.bbai-status-card .bbai-donut-label {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-top: 6px;
    color: #1f2d3d;
}

.bbai-status-summary {
    text-align: center !important;
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin: 12px auto 18px;
    line-height: 1.4;
    display: block;
    width: 100%;
}

.bbai-status-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin: 8px auto 18px;
    max-width: 360px;
    text-align: left;
}

.bbai-status-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.bbai-status-metric__label {
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
}

.bbai-status-metric__value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2d3d;
}

.bbai-status-insight {
    width: 100%;
    max-width: none;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f4f6f9;
    border: 1px solid #e6ecf2;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
    text-align: center;
}

.bbai-plan-usage-divider {
    border-top: 1px solid #eef1f5;
    margin: 20px 0 22px;
}

.bbai-plan-usage {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 20px 24px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #eef1f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.bbai-plan-usage__title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2d3d;
    margin: 0 0 12px;
}

.bbai-plan-usage__line,
.bbai-plan-usage__reset {
    font-size: 13px;
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
}

.bbai-plan-usage__reset {
    margin-top: 4px;
}

.bbai-plan-usage__remaining {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    margin-top: 10px;
    line-height: 1.6;
}

.bbai-status-upgrade-hint {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    line-height: 1.4;
}

.bbai-status-upgrade-hint:hover {
    text-decoration: underline;
}

/* Upgrade card - premium SaaS, pairs with Alt Text Status */
.bbai-upgrade-card {
    padding: 32px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid #eef1f5 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}

.bbai-upgrade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.bbai-upgrade-card--highlight {
    border-color: #e2e8f0 !important;
    background: #ffffff !important;
}

.bbai-upgrade-card .bbai-card__header {
    margin-bottom: 0;
    text-align: left;
}

.bbai-upgrade-card .bbai-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2d3d;
    margin-bottom: 8px;
    text-align: left;
}

.bbai-upgrade-card .bbai-card__copy {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
    max-width: 420px;
    text-align: left;
}

.bbai-upgrade-card .bbai-feature-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bbai-upgrade-card .bbai-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.bbai-upgrade-card .bbai-feature-check {
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
}

.bbai-upgrade-card__divider {
    border-top: 1px solid #eef1f5;
    margin: 18px 0 20px;
}

.bbai-upgrade-card .bbai-card__footer {
    margin-top: 0;
    padding-top: 0;
}

.bbai-upgrade-card .bbai-upgrade-cta {
    width: 100%;
    height: 44px;
    padding: 0 20px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px !important;
    background: #10b981 !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.22) !important;
    border: 1px solid #10b981 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.bbai-upgrade-card .bbai-upgrade-cta:hover {
    transform: translateY(-1px);
    background: #059669 !important;
    border-color: #059669 !important;
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28) !important;
}

.bbai-upgrade-card .bbai-upgrade-helper {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 6px;
    line-height: 1.4;
}

.bbai-upgrade-card .bbai-link-secondary,
.bbai-upgrade-card .bbai-upgrade-compare-link {
    font-size: 13px;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.bbai-upgrade-card .bbai-link-secondary:hover,
.bbai-upgrade-card .bbai-upgrade-compare-link:hover {
    text-decoration: underline;
}

/* Upgrade meters */
.bbai-upgrade-meters {
    margin-top: 18px;
    margin-bottom: 22px;
    padding-top: 16px;
    border-top: 1px solid #eef0f3;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bbai-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #374151;
    margin-bottom: 8px;
}

.bbai-meter-fill {
    border-radius: 999px;
}

.bbai-meter-value {
    font-weight: 700;
    color: #111827;
}

.bbai-meter-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.bbai-meter-free .bbai-meter-bar {
    background: #ece8ff;
}

.bbai-meter-free .bbai-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #6366f1);
}

.bbai-meter-growth .bbai-meter-bar {
    box-sizing: border-box;
    height: 12px;
    padding: 1px;
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
    border: 1px solid #dcfce7;
    box-shadow: inset 0 1px 2px rgba(34, 197, 94, 0.08);
}

.bbai-meter-growth .bbai-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.bbai-meter-caption {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.bbai-meter-growth .bbai-meter-caption {
    color: #15803d;
}

.bbai-upgrade-bottom {
    margin-top: auto;
}

/* Stats row */
.bbai-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.bbai-stat-card {
    background: #ffffff;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

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

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

.bbai-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #dbe4ee;
}

.bbai-stat-card__icon {
    margin: 0 auto 12px;
    color: #64748b;
    display: flex;
    justify-content: center;
}

.bbai-stat-card__value {
    font-size: 36px;
    font-weight: 700;
    color: #1f2d3d;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.bbai-stat-card__label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7b8c;
    margin-top: 12px;
}

/* Left card: Alt Text Status (legacy) */
.bbai-progress-card,
.bbai-status-card {
    background: #ffffff;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bbai-progress-card:hover,
.bbai-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #dbe4ee;
}

.bbai-progress-donut .bbai-circular-progress-bar {
    transition: stroke-dashoffset 0.8s ease;
}

.bbai-progress-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
    line-height: 1.3;
}

.bbai-progress-donut-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 16px;
}

.bbai-progress-donut {
    position: relative;
    width: 180px;
    height: 180px;
}

.bbai-progress-donut .bbai-circular-progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.bbai-progress-donut .bbai-circular-progress-svg circle {
    stroke-width: 10;
}

/* Donut center - clean, readable (Step 9) */
.bbai-progress-donut-center,
.bbai-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
    z-index: 1;
}

.bbai-progress-donut-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: #1f2d3d;
}

.bbai-donut-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: #1f2d3d;
}

.bbai-progress-donut-percent,
.bbai-donut-percent {
    font-size: 16px;
    vertical-align: super;
    margin-left: 2px;
    opacity: 0.7;
}

.bbai-progress-donut-label,
.bbai-donut-label {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7b8c;
    margin-top: 6px;
    max-width: 120px;
    line-height: 1.15;
    display: block;
}

.bbai-progress-usage {
    text-align: center;
    font-size: 14px;
    color: #334155;
    margin: 0 0 4px;
    font-weight: 600;
}

.bbai-progress-limit-reached {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin: 0 0 4px;
}

.bbai-progress-reset {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* Right card: Upgrade to Growth - premium gradient */
.bbai-growth-card {
    background: linear-gradient(135deg, #4f6cff 0%, #6f8cff 100%);
    border-radius: var(--bbai-saas-radius-lg);
    padding: 24px;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(79, 108, 255, 0.15);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: none;
    transition: box-shadow 0.2s ease;
}

.bbai-growth-card:hover {
    box-shadow: 0 4px 20px rgba(79, 108, 255, 0.2);
}

.bbai-growth-card-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
}

.bbai-growth-card-copy {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.92;
    margin: 0 0 16px;
}

.bbai-growth-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.bbai-growth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.bbai-growth-features li:last-child {
    margin-bottom: 0;
}

.bbai-growth-check {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
}

.bbai-growth-meter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

.bbai-growth-meter-current span,
.bbai-growth-meter-growth span,
.bbai-growth-meter-reset span {
    font-size: 11px;
    opacity: 0.88;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bbai-growth-meter-current strong,
.bbai-growth-meter-growth strong,
.bbai-growth-meter-reset strong {
    font-size: 14px;
    font-weight: 600;
}

.bbai-growth-cta-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bbai-growth-cta {
    background: #ffffff !important;
    color: #1e293b !important;
    border: none !important;
    border-radius: var(--bbai-btn-radius);
    padding: var(--bbai-btn-padding);
    font-weight: var(--bbai-btn-weight);
    font-size: var(--bbai-btn-font);
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    width: 100%;
    margin: 0;
}

.bbai-growth-cta-subtext {
    margin: 10px 0 0;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.bbai-growth-cta:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    background: #f8fafc !important;
    color: #1d4ed8 !important;
}

.bbai-growth-cta--unlock {
    background: #10b981 !important;
    border: 1px solid #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
}

.bbai-growth-cta--unlock:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}

.bbai-growth-cta:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}


.bbai-growth-link {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 2px;
    display: block;
}

.bbai-growth-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 1024px) {
    .bbai-dashboard-two-column {
        grid-template-columns: 1fr;
    }
    .bbai-opportunity-scanner__grid--2x2 {
        grid-template-columns: 1fr;
    }
    .bbai-dashboard-two-column .bbai-dashboard-left-column,
    .bbai-dashboard-two-column .bbai-growth-card,
    .bbai-dashboard-two-column .bbai-actions-card,
    .bbai-dashboard-two-column .bbai-opportunity-scanner,
    .bbai-dashboard-two-column .bbai-dashboard-metrics {
        grid-column: 1;
    }
    .bbai-dashboard-two-column .bbai-dashboard-left-column { grid-row: 1; }
    .bbai-dashboard-two-column .bbai-growth-card { grid-row: 2; }
    .bbai-dashboard-two-column .bbai-actions-card { grid-row: 3; }
    .bbai-dashboard-two-column .bbai-opportunity-scanner { grid-row: 4; }
    .bbai-dashboard-two-column .bbai-dashboard-metrics { grid-row: 5; }
    .bbai-dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Section spacing - premium vertical rhythm */
.bbai-dashboard-shell .bbai-section,
.bbai-dashboard-section {
    margin-bottom: 32px;
}

.bbai-dashboard-shell .bbai-section:last-child,
.bbai-dashboard-section:last-child,
.bbai-dashboard-section--last {
    margin-bottom: 0;
}

/* ==========================================================================
   Section 4: Image Optimization Workflow card
   ========================================================================== */
.bbai-workflow-card.bbai-actions-card {
    margin-bottom: 0;
}

.bbai-workflow-card__desc {
    margin-top: 4px;
}

.bbai-workflow-steps {
    display: flex;
    flex-direction: column;
}

.bbai-workflow-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.bbai-workflow-step--last {
    margin-bottom: 0;
    padding-bottom: 0;
}

.bbai-workflow-step__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
}

.bbai-workflow-step__content {
    flex: 1;
    min-width: 0;
}

.bbai-workflow-step__title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
    margin: 0 0 4px;
    line-height: 1.3;
}

.bbai-workflow-step__desc {
    font-size: 13px;
    color: #6b7b8c;
    margin: 0 0 10px;
    line-height: 1.45;
}

.bbai-workflow-step__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bbai-workflow-step__btn--primary {
    background: linear-gradient(135deg, #4f7df3, #3a64e6);
    color: #ffffff;
}

.bbai-workflow-step__btn--primary:hover {
    background: linear-gradient(135deg, #3a64e6, #2d52c7);
    transform: translateY(-1px);
}

.bbai-workflow-step__btn--secondary {
    background: #f7f9fc;
    color: #1f2d3d;
    border: 1px solid #e6eaf0;
}

.bbai-workflow-step__btn--secondary:hover {
    background: #eef2f7;
    border-color: #d1d9e6;
}

.bbai-workflow-step__btn--locked {
    background: #f3f5f8;
    color: #5a6b7b;
}

.bbai-workflow-step__btn--locked:hover {
    background: #e8ebf0;
}

.bbai-workflow-step__lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5a6b7b;
}

.bbai-workflow-step__lock-icon svg {
    width: 12px;
    height: 12px;
}

.bbai-workflow-card__social-proof {
    font-size: 13px;
    color: #7a8696;
    margin: 10px 0 0;
    line-height: 1.4;
}

.bbai-workflow-card__help-cta {
    font-size: 13px;
    color: #7a8696;
    margin: 8px 0 0;
    line-height: 1.4;
}

.bbai-workflow-card__help-cta a {
    color: #7a8696;
    text-decoration: none;
}

.bbai-workflow-card__help-cta a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.bbai-workflow-card__help-cta--secondary {
    margin-top: 4px;
}

/* ==========================================================================
   Section 5: Stats row
   ========================================================================== */
.bbai-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 0;
}

.bbai-metric-card {
    background: #ffffff;
    border: var(--bbai-saas-border);
    border-radius: var(--bbai-saas-radius);
    padding: 24px;
    box-shadow: var(--bbai-saas-shadow);
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bbai-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.bbai-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #64748b;
}

.bbai-metric-icon svg {
    width: 20px;
    height: 20px;
}

.bbai-metric-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2d3d;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.bbai-metric-value .bbai-percent {
    font-size: 18px;
    opacity: 0.8;
    vertical-align: super;
    margin-left: 2px;
}

.bbai-metric-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7b8c;
    margin: 0;
}

.bbai-metric-subtext {
    display: none; /* Match screenshot: minimal stat cards */
}

@media (max-width: 900px) {
    .bbai-dashboard-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bbai-dashboard-metrics {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Section 6: SEO Opportunity card
   ========================================================================== */
.bbai-seo-opportunity-card {
    background: #ffffff;
    border: var(--bbai-saas-border);
    border-radius: var(--bbai-saas-radius-lg);
    padding: var(--bbai-saas-padding-lg);
    box-shadow: var(--bbai-saas-shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: box-shadow 0.2s ease;
}

.bbai-seo-opportunity-card:hover {
    box-shadow: var(--bbai-saas-shadow-hover);
}

.bbai-seo-opportunity-content {
    flex: 1;
    min-width: 0;
}

.bbai-seo-opportunity-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #3b82f6;
}

.bbai-seo-opportunity-icon svg {
    width: 22px;
    height: 22px;
}

.bbai-seo-opportunity-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.bbai-seo-opportunity-copy {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.bbai-seo-opportunity-cta {
    flex-shrink: 0;
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
}

.bbai-seo-opportunity-cta:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}

.bbai-seo-opportunity-cta:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* ==========================================================================
   Conversion triggers
   ========================================================================== */

/* Smart upgrade prompt - hidden (reference uses quota-exhausted-banner only) */
.bbai-smart-upgrade-prompt {
    display: none !important;
}

/* Legacy: Smart upgrade prompt - contextual, soft (below usage banner) */
.bbai-smart-upgrade-prompt.bbai-keep-visible {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--bbai-saas-radius);
    margin-bottom: var(--bbai-saas-gap);
}

.bbai-smart-upgrade-prompt__copy {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.bbai-smart-upgrade-prompt__cta {
    flex-shrink: 0;
}

/* Lifetime stats section - value reinforcement */
.bbai-lifetime-stats.bbai-lifetime-value {
    margin-top: var(--bbai-saas-section-gap);
    padding-top: var(--bbai-saas-section-gap);
    border-top: 1px solid #e5e7eb;
}

.bbai-lifetime-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--bbai-saas-grid-gap);
}

.bbai-lifetime-stat {
    background: #ffffff;
    border: var(--bbai-saas-border);
    border-radius: var(--bbai-saas-radius);
    padding: var(--bbai-saas-padding);
    text-align: center;
    box-shadow: var(--bbai-saas-shadow);
    transition: box-shadow 0.2s ease;
}

.bbai-lifetime-stat:hover {
    box-shadow: var(--bbai-saas-shadow-hover);
}

.bbai-lifetime-stat--primary .bbai-lifetime-stat__value {
    font-size: 34px;
}

.bbai-lifetime-stat__value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1;
}

.bbai-lifetime-stat__label {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Feature lock indicators (Growth card) */
.bbai-feature-lock-item {
    margin-bottom: 0;
}

.bbai-feature-lock-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.15s ease;
}

.bbai-feature-lock-trigger:hover {
    opacity: 0.9;
}

.bbai-feature-lock-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.bbai-feature-lock-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.bbai-feature-lock-badge {
    font-size: 11px;
    opacity: 0.85;
    margin-left: auto;
}

/* Trust signal near upgrade CTA */
.bbai-growth-trust-signal {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* Feature unlock modal */
.bbai-feature-unlock-modal {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    padding: 20px;
}

.bbai-feature-unlock-modal__content {
    position: relative;
    background: #ffffff;
    border-radius: var(--bbai-saas-radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.bbai-feature-unlock-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
}

.bbai-feature-unlock-modal__close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.bbai-feature-unlock-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    padding-right: 32px;
}

.bbai-feature-unlock-modal__desc {
    font-size: 14px;
    color: #475569;
    margin: 0 0 20px;
    line-height: 1.5;
}

.bbai-feature-unlock-modal__cta {
    width: 100%;
}

/* ==========================================================================
   Opportunity Scanner
   ========================================================================== */
.bbai-opportunity-scanner__card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bbai-opportunity-scanner__card .bbai-card__body {
    flex: 1;
}


.bbai-opportunity-scanner__title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.bbai-opportunity-scanner__desc {
    margin-top: 4px;
}

.bbai-opportunity-scanner__prompt {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.5;
}

.bbai-opportunity-scanner__insight {
    font-size: 14px;
    color: #334155;
    margin: 0 0 16px;
    line-height: 1.5;
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(248, 250, 252, 0.95) 20px);
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

/* Lighter helper text - no alert box */
.bbai-opportunity-scanner__insight--helper {
    padding: 0;
    background: none;
    border-left: none;
    border-radius: 0;
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px;
    line-height: 1.5;
}

.bbai-opportunity-scanner__insight--helper strong {
    color: #64748b;
}

.bbai-opportunity-scanner__insight strong {
    color: #0f172a;
}

.bbai-opportunity-scanner__scan-btn {
    flex-shrink: 0;
}

.bbai-opportunity-scanner__loading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #64748b;
}

.bbai-opportunity-scanner__spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: bbai-spin 0.8s linear infinite;
}

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

.bbai-opportunity-scanner__grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.bbai-opportunity-scanner__grid--2x2 {
    grid-template-columns: 1fr 1fr;
}

.bbai-opportunity-stat {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.bbai-opportunity-stat__value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2d3d;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.bbai-opportunity-stat__label {
    font-size: 13px;
    color: #6b7b8c;
    line-height: 1.35;
}

.bbai-opportunity-scanner__helper {
    font-size: 13px;
    color: #6b7b8c;
    margin: 8px 0 4px;
    line-height: 1.5;
}

.bbai-opportunity-scanner__cta {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    min-height: 46px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-top: 0;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bbai-opportunity-scanner__cta:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}

.bbai-opportunity-scanner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Scan Library — solid green (same primary system) */
.bbai-dashboard-container .bbai-opportunity-scanner__library.bbai-btn.bbai-btn-primary,
.bbai-dashboard-container .bbai-opportunity-scanner__scan-btn.bbai-btn.bbai-btn-primary,
.wrap .bbai-opportunity-scanner__library.bbai-btn.bbai-btn-primary,
.wrap .bbai-opportunity-scanner__scan-btn.bbai-btn.bbai-btn-primary {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    min-height: 46px !important;
    padding: var(--bbai-btn-padding);
    font-weight: var(--bbai-btn-weight);
    font-size: var(--bbai-btn-font);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22) !important;
    border-radius: 10px !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bbai-dashboard-container .bbai-opportunity-scanner__library.bbai-btn.bbai-btn-primary:hover,
.bbai-dashboard-container .bbai-opportunity-scanner__scan-btn.bbai-btn.bbai-btn-primary:hover,
.wrap .bbai-opportunity-scanner__library.bbai-btn.bbai-btn-primary:hover,
.wrap .bbai-opportunity-scanner__scan-btn.bbai-btn.bbai-btn-primary:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28) !important;
    transform: translateY(-1px);
}

.bbai-opportunity-scanner__upgrade.bbai-btn-primary {
    border-radius: var(--bbai-btn-radius);
    padding: var(--bbai-btn-padding);
    font-weight: var(--bbai-btn-weight);
    font-size: var(--bbai-btn-font);
}

.bbai-opportunity-scanner [hidden] {
    display: none !important;
}



/* 9. Utility Classes */

/* Imported from: _utilities.css */
/**
 * Utilities - Text, spacing, display helpers
 */

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */

/* Font Sizes */
.bbai-text-xs { font-size: var(--bbai-text-xs); line-height: var(--bbai-leading-normal); }
.bbai-text-sm { font-size: var(--bbai-text-sm); line-height: var(--bbai-leading-normal); }
.bbai-text-base { font-size: var(--bbai-text-base); line-height: var(--bbai-leading-normal); }
.bbai-text-lg { font-size: var(--bbai-text-lg); line-height: var(--bbai-leading-snug); }
.bbai-text-xl { font-size: var(--bbai-text-xl); line-height: var(--bbai-leading-snug); }
.bbai-text-2xl { font-size: var(--bbai-text-2xl); line-height: var(--bbai-leading-tight); }
.bbai-text-3xl { font-size: var(--bbai-text-3xl); line-height: var(--bbai-leading-tight); }
.bbai-text-4xl { font-size: var(--bbai-text-4xl); line-height: var(--bbai-leading-tight); }
.bbai-text-5xl { font-size: var(--bbai-text-5xl); line-height: var(--bbai-leading-none); }

/* Font Weights */
.bbai-font-normal { font-weight: var(--bbai-font-normal); }
.bbai-font-medium { font-weight: var(--bbai-font-medium); }
.bbai-font-semibold { font-weight: var(--bbai-font-semibold); }
.bbai-font-bold { font-weight: var(--bbai-font-bold); }
.bbai-font-extrabold { font-weight: var(--bbai-font-extrabold); }

/* Line Heights */
.bbai-leading-none { line-height: var(--bbai-leading-none); }
.bbai-leading-tight { line-height: var(--bbai-leading-tight); }
.bbai-leading-snug { line-height: var(--bbai-leading-snug); }
.bbai-leading-normal { line-height: var(--bbai-leading-normal); }
.bbai-leading-relaxed { line-height: var(--bbai-leading-relaxed); }
.bbai-leading-loose { line-height: var(--bbai-leading-loose); }

/* Text Colors */
.bbai-text-primary { color: var(--bbai-text); }
.bbai-text-secondary { color: var(--bbai-text-secondary); }
.bbai-text-muted { color: var(--bbai-text-muted); }
.bbai-text-light { color: var(--bbai-text-light); }
.bbai-text-inverse { color: var(--bbai-text-inverse); }
.bbai-text-success { color: var(--bbai-success); }
.bbai-text-error { color: var(--bbai-error); }
.bbai-text-warning { color: var(--bbai-warning); }
.bbai-text-info { color: var(--bbai-info); }

/* Text Alignment */
.bbai-text-left { text-align: left; }
.bbai-text-center { text-align: center; }
.bbai-text-right { text-align: right; }

/* Heading Styles - Standardized */
.bbai-heading-1,
h1.bbai-heading {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-tight);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-heading-2,
h2.bbai-heading {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-semibold);
    line-height: var(--bbai-leading-tight);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-heading-3,
h3.bbai-heading {
    font-size: var(--bbai-text-xl);
    font-weight: var(--bbai-font-semibold);
    line-height: var(--bbai-leading-snug);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-heading-4,
h4.bbai-heading {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    line-height: var(--bbai-leading-snug);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

/* Subtitle Styles */
.bbai-subtitle {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-normal);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-secondary);
    margin: 0;
}

.bbai-subtitle-sm {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-normal);
    line-height: var(--bbai-leading-normal);
    color: var(--bbai-text-muted);
    margin: 0;
}

/* ============================================
   SPACING UTILITIES
   ============================================ */

/* Margin Top */
.bbai-mt-0 { margin-top: var(--bbai-space-0); }
.bbai-mt-1 { margin-top: var(--bbai-space-1); }
.bbai-mt-2 { margin-top: var(--bbai-space-2); }
.bbai-mt-3 { margin-top: var(--bbai-space-3); }
.bbai-mt-4 { margin-top: var(--bbai-space-4); }
.bbai-mt-5 { margin-top: var(--bbai-space-5); }
.bbai-mt-6 { margin-top: var(--bbai-space-6); }
.bbai-mt-8 { margin-top: var(--bbai-space-8); }
.bbai-mt-10 { margin-top: var(--bbai-space-10); }
.bbai-mt-12 { margin-top: var(--bbai-space-12); }

/* Margin Bottom */
.bbai-mb-0 { margin-bottom: var(--bbai-space-0); }
.bbai-mb-1 { margin-bottom: var(--bbai-space-1); }
.bbai-mb-2 { margin-bottom: var(--bbai-space-2); }
.bbai-mb-3 { margin-bottom: var(--bbai-space-3); }
.bbai-mb-4 { margin-bottom: var(--bbai-space-4); }
.bbai-mb-5 { margin-bottom: var(--bbai-space-5); }
.bbai-mb-6 { margin-bottom: var(--bbai-space-6); }
.bbai-mb-8 { margin-bottom: var(--bbai-space-8); }
.bbai-mb-10 { margin-bottom: var(--bbai-space-10); }
.bbai-mb-12 { margin-bottom: var(--bbai-space-12); }

/* Margin Left/Right */
.bbai-ml-0 { margin-left: var(--bbai-space-0); }
.bbai-ml-1 { margin-left: var(--bbai-space-1); }
.bbai-ml-2 { margin-left: var(--bbai-space-2); }
.bbai-ml-3 { margin-left: var(--bbai-space-3); }
.bbai-ml-4 { margin-left: var(--bbai-space-4); }
.bbai-mr-0 { margin-right: var(--bbai-space-0); }
.bbai-mr-1 { margin-right: var(--bbai-space-1); }
.bbai-mr-2 { margin-right: var(--bbai-space-2); }
.bbai-mr-3 { margin-right: var(--bbai-space-3); }
.bbai-mr-4 { margin-right: var(--bbai-space-4); }

/* Margin X (horizontal) */
.bbai-mx-auto { margin-left: auto; margin-right: auto; }
.bbai-mx-0 { margin-left: var(--bbai-space-0); margin-right: var(--bbai-space-0); }
.bbai-mx-2 { margin-left: var(--bbai-space-2); margin-right: var(--bbai-space-2); }
.bbai-mx-4 { margin-left: var(--bbai-space-4); margin-right: var(--bbai-space-4); }

/* Margin Y (vertical) */
.bbai-my-0 { margin-top: var(--bbai-space-0); margin-bottom: var(--bbai-space-0); }
.bbai-my-2 { margin-top: var(--bbai-space-2); margin-bottom: var(--bbai-space-2); }
.bbai-my-4 { margin-top: var(--bbai-space-4); margin-bottom: var(--bbai-space-4); }
.bbai-my-6 { margin-top: var(--bbai-space-6); margin-bottom: var(--bbai-space-6); }

/* Padding */
.bbai-p-0 { padding: var(--bbai-space-0); }
.bbai-p-1 { padding: var(--bbai-space-1); }
.bbai-p-2 { padding: var(--bbai-space-2); }
.bbai-p-3 { padding: var(--bbai-space-3); }
.bbai-p-4 { padding: var(--bbai-space-4); }
.bbai-p-5 { padding: var(--bbai-space-5); }
.bbai-p-6 { padding: var(--bbai-space-6); }
.bbai-p-8 { padding: var(--bbai-space-8); }
.bbai-p-10 { padding: var(--bbai-space-10); }
.bbai-p-12 { padding: var(--bbai-space-12); }

/* Padding X (horizontal) */
.bbai-px-0 { padding-left: var(--bbai-space-0); padding-right: var(--bbai-space-0); }
.bbai-px-2 { padding-left: var(--bbai-space-2); padding-right: var(--bbai-space-2); }
.bbai-px-3 { padding-left: var(--bbai-space-3); padding-right: var(--bbai-space-3); }
.bbai-px-4 { padding-left: var(--bbai-space-4); padding-right: var(--bbai-space-4); }
.bbai-px-6 { padding-left: var(--bbai-space-6); padding-right: var(--bbai-space-6); }

/* Padding Y (vertical) */
.bbai-py-0 { padding-top: var(--bbai-space-0); padding-bottom: var(--bbai-space-0); }
.bbai-py-2 { padding-top: var(--bbai-space-2); padding-bottom: var(--bbai-space-2); }
.bbai-py-3 { padding-top: var(--bbai-space-3); padding-bottom: var(--bbai-space-3); }
.bbai-py-4 { padding-top: var(--bbai-space-4); padding-bottom: var(--bbai-space-4); }
.bbai-py-6 { padding-top: var(--bbai-space-6); padding-bottom: var(--bbai-space-6); }

/* Show/Hide utilities */
.bbai-show { display: block !important; }
.bbai-show-flex { display: flex !important; }

/* Accessibility utilities */
.bbai-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.bbai-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    z-index: 10000;
    padding: var(--bbai-space-2) var(--bbai-space-4);
    background: var(--bbai-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--bbai-radius);
}

.bbai-skip-link:focus {
    top: var(--bbai-space-2);
}

/* High contrast mode */
.bbai-high-contrast * {
    border-color: currentColor !important;
}

.bbai-high-contrast .bbai-btn {
    border: 2px solid currentColor;
}

/* Focus visible */
.bbai-focus-visible:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* ============================================
   ARIA & ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Enhanced focus indicators for WCAG compliance */
[aria-expanded="true"]::after,
[aria-expanded="false"]::after {
    transition: transform var(--bbai-transition-fast) var(--bbai-ease-out);
}

[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Live region announcement styles */
[aria-live="polite"],
[aria-live="assertive"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Visible live region for status messages */
.bbai-live-region--visible {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Disabled state indicator — exclude upgrade/locked CTAs that remain clickable via delegated handlers */
[aria-disabled="true"]:not([data-bbai-locked-cta="1"]):not(.bbai-is-locked) {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button with aria-pressed state */
[aria-pressed="true"] {
    background: var(--bbai-primary-soft);
    border-color: var(--bbai-primary);
    color: var(--bbai-primary);
}

/* Required field indicator */
[aria-required="true"]::before,
.bbai-required::before {
    content: '* ';
    color: var(--bbai-error);
    font-weight: var(--bbai-font-bold);
}

/* Invalid field styling */
[aria-invalid="true"] {
    border-color: var(--bbai-error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Busy state indicator */
[aria-busy="true"] {
    position: relative;
    pointer-events: none;
}

.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;
}

.bbai-btn.is-busy,
.bbai-btn[aria-busy="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

[aria-busy="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--bbai-gray-300);
    border-top-color: var(--bbai-primary);
    border-radius: 50%;
    animation: bbai-spin 0.8s linear infinite;
}

.bbai-btn[aria-busy="true"]::after,
.bbai-btn[aria-busy="true"]::before,
[data-bbai-li-primary-cta][aria-busy="true"]::after,
[data-bbai-li-primary-cta][aria-busy="true"]::before,
[data-bbai-generation-action][aria-busy="true"]::after,
[data-bbai-generation-action][aria-busy="true"]::before,
[data-action="generate-missing"][aria-busy="true"]::after,
[data-action="generate-missing"][aria-busy="true"]::before,
[data-bbai-action="generate_missing"][aria-busy="true"]::after,
[data-bbai-action="generate_missing"][aria-busy="true"]::before,
[data-action="generate-selected"][aria-busy="true"]::after,
[data-action="generate-selected"][aria-busy="true"]::before,
[data-action="regenerate-selected"][aria-busy="true"]::after,
[data-action="regenerate-selected"][aria-busy="true"]::before,
[data-action="regenerate-all"][aria-busy="true"]::after,
[data-action="regenerate-all"][aria-busy="true"]::before,
[data-action="regenerate-single"][aria-busy="true"]::after,
[data-action="regenerate-single"][aria-busy="true"]::before,
[data-action="phase17-improve-alt"][aria-busy="true"]::after,
[data-action="phase17-improve-alt"][aria-busy="true"]::before,
[data-bbai-action="reoptimize_all"][aria-busy="true"]::after,
[data-bbai-action="reoptimize_all"][aria-busy="true"]::before {
    content: none !important;
    display: none !important;
}

/* Selected state for options */
[aria-selected="true"] {
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
}

/* Current page/item indicator */
[aria-current="page"],
[aria-current="true"] {
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-primary);
}

/* Hidden but focusable for dropdown menus */
.bbai-dropdown-menu[aria-hidden="true"] {
    display: none;
    visibility: hidden;
}

.bbai-dropdown-menu[aria-hidden="false"] {
    display: block;
    visibility: visible;
}

/* Touch target sizing (44px minimum per WCAG 2.1) */
.bbai-touch-target {
    min-width: 44px;
    min-height: 44px;
}

.bbai-touch-target-sm {
    min-width: 36px;
    min-height: 36px;
}

/* Icon button accessibility - requires aria-label */
.bbai-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: var(--bbai-space-2);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--bbai-radius);
    cursor: pointer;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-icon-btn:hover {
    background: var(--bbai-bg-secondary);
}

.bbai-icon-btn:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-icon-btn svg {
    width: 20px;
    height: 20px;
    color: var(--bbai-text-secondary);
}

.bbai-icon-btn:hover svg {
    color: var(--bbai-text);
}

/* Dropdown with ARIA support */
.bbai-dropdown {
    position: relative;
}

.bbai-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-3);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    cursor: pointer;
    min-height: 44px;
}

.bbai-dropdown-trigger:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-dropdown-trigger[aria-expanded="true"] {
    border-color: var(--bbai-primary);
}

.bbai-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 200px;
    margin-top: var(--bbai-space-1);
    padding: var(--bbai-space-1);
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius);
    box-shadow: var(--bbai-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-dropdown-trigger[aria-expanded="true"] + .bbai-dropdown-content,
.bbai-dropdown-content[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bbai-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    width: 100%;
    padding: var(--bbai-space-2) var(--bbai-space-3);
    background: transparent;
    border: none;
    border-radius: var(--bbai-radius-sm);
    color: var(--bbai-text);
    font-size: var(--bbai-text-sm);
    text-align: left;
    cursor: pointer;
    min-height: 40px;
}

.bbai-dropdown-item:hover,
.bbai-dropdown-item:focus {
    background: var(--bbai-bg-secondary);
}

.bbai-dropdown-item:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: -2px;
}

/* Focus trap container for modals */
.bbai-focus-trap {
    outline: none;
}

.bbai-focus-trap:focus {
    outline: none;
}

/* ============================================
   FLEXBOX UTILITIES
   ============================================ */

.bbai-flex { display: flex; }
.bbai-flex-col { flex-direction: column; }
.bbai-flex-row { flex-direction: row; }
.bbai-flex-wrap { flex-wrap: wrap; }
.bbai-flex-nowrap { flex-wrap: nowrap; }

/* Alignment */
.bbai-items-start { align-items: flex-start; }
.bbai-items-center { align-items: center; }
.bbai-items-end { align-items: flex-end; }
.bbai-items-stretch { align-items: stretch; }

/* Justify Content */
.bbai-justify-start { justify-content: flex-start; }
.bbai-justify-center { justify-content: center; }
.bbai-justify-end { justify-content: flex-end; }
.bbai-justify-between { justify-content: space-between; }
.bbai-justify-around { justify-content: space-around; }
.bbai-justify-evenly { justify-content: space-evenly; }

/* Gap */
.bbai-gap-0 { gap: var(--bbai-space-0); }
.bbai-gap-1 { gap: var(--bbai-space-1); }
.bbai-gap-2 { gap: var(--bbai-space-2); }
.bbai-gap-3 { gap: var(--bbai-space-3); }
.bbai-gap-4 { gap: var(--bbai-space-4); }
.bbai-gap-5 { gap: var(--bbai-space-5); }
.bbai-gap-6 { gap: var(--bbai-space-6); }
.bbai-gap-8 { gap: var(--bbai-space-8); }

/* ============================================
   BACKGROUND COLOR UTILITIES
   ============================================ */

.bbai-bg-primary { background-color: var(--bbai-primary); }
.bbai-bg-success { background-color: var(--bbai-success); }
.bbai-bg-error { background-color: var(--bbai-error); }
.bbai-bg-warning { background-color: var(--bbai-warning); }
.bbai-bg-info { background-color: var(--bbai-info); }
.bbai-bg-white { background-color: var(--bbai-white); }
.bbai-bg-gray-50 { background-color: var(--bbai-gray-50); }
.bbai-bg-gray-100 { background-color: var(--bbai-gray-100); }
.bbai-bg-gray-200 { background-color: var(--bbai-gray-200); }

/* Display */
.bbai-hidden { display: none !important; }
.bbai-block { display: block; }
.bbai-inline { display: inline; }
.bbai-inline-block { display: inline-block; }
.bbai-inline-flex { display: inline-flex; }
.bbai-w-full { width: 100%; }

/* Text Alignment - Already defined above in Typography section */

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.bbai-transition { transition: var(--bbai-transition); }
.bbai-transition-colors { transition: var(--bbai-transition-colors); }
.bbai-transition-transform { transition: var(--bbai-transition-transform); }

/* Hover Effects */
.bbai-hover-lift:hover {
    transform: translateY(-2px);
    transition: transform var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-hover-scale:hover {
    transform: scale(1.02);
    transition: transform var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-hover-glow:hover {
    box-shadow: var(--bbai-shadow-lg), var(--bbai-glow-primary);
    transition: box-shadow var(--bbai-transition-base) var(--bbai-ease-out);
}

/* Opacity */
.bbai-opacity-50 { opacity: 0.5; }
.bbai-opacity-90 { opacity: 0.9; }

/* Icon */
.bbai-icon-inline { margin-right: 12px; vertical-align: middle; }
.bbai-icon-inline--sm { margin-right: 10px; }
.bbai-icon-inline--xs { margin-right: 8px; }

/* Tab Content */
.bbai-admin-tab-content { display: none; }
.bbai-admin-tab-content.is-active { display: block; }

/* Progress Status */
.bbai-dashboard__status { display: none; }
.bbai-dashboard__status.is-visible { display: block; }

/* Debug Rows */
.bbai-debug-context-row { display: none; }
.bbai-debug-context-row.is-expanded { display: table-row; }

/* Credit Usage Page */
.bbai-credit-page-title { font-size: var(--bbai-text-2xl); font-weight: var(--bbai-font-semibold); color: var(--bbai-text); margin-bottom: var(--bbai-space-6); }
.bbai-usage-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--bbai-space-6); margin: var(--bbai-space-8) 0; }
.bbai-credit-stat-card { background: var(--bbai-bg); border: 1px solid var(--bbai-border); border-radius: var(--bbai-radius); padding: var(--bbai-space-6); box-shadow: var(--bbai-shadow-sm); }
.bbai-credit-stat-card:hover { box-shadow: var(--bbai-shadow); }
.bbai-credit-stat-title { font-size: var(--bbai-text-sm); font-weight: var(--bbai-font-semibold); color: var(--bbai-text); margin: 0 0 var(--bbai-space-3) 0; }
.bbai-credit-stat-value { font-size: var(--bbai-text-2xl); font-weight: var(--bbai-font-bold); margin: var(--bbai-space-2) 0; line-height: 1.2; }
.bbai-credit-stat-value--primary { color: var(--bbai-text); }
.bbai-credit-stat-value--success { color: var(--bbai-success); }
.bbai-credit-stat-value--primary-brand { color: var(--bbai-primary); }
.bbai-credit-stat-desc { color: var(--bbai-text-muted); font-size: var(--bbai-text-sm); margin: 0; }

/* Filter Form */
.bbai-filter-form { background: var(--bbai-bg-secondary); border: 1px solid var(--bbai-border); border-radius: var(--bbai-radius); padding: var(--bbai-space-4); margin-bottom: var(--bbai-space-6); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--bbai-space-3); }
.bbai-filter-label { display: block; font-weight: var(--bbai-font-semibold); margin-bottom: var(--bbai-space-2); color: var(--bbai-text); }
.bbai-filter-input, .bbai-filter-select { width: 100%; padding: var(--bbai-space-2) var(--bbai-space-3); border: 1px solid var(--bbai-border); border-radius: var(--bbai-radius); font-size: var(--bbai-text-sm); background: var(--bbai-bg); color: var(--bbai-text); }
.bbai-filter-input:focus, .bbai-filter-select:focus { outline: none; border-color: var(--bbai-primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.bbai-filter-submit { align-self: flex-end; }

/* Misc Cards */
.bbai-user-details-card { background: var(--bbai-bg); border: 1px solid var(--bbai-border); border-radius: var(--bbai-radius); padding: var(--bbai-space-6); margin-bottom: var(--bbai-space-6); }
.bbai-user-details-title { font-size: var(--bbai-text-xl); font-weight: var(--bbai-font-bold); margin: 0 0 var(--bbai-space-4) 0; color: var(--bbai-text); }
.bbai-table-card { background: var(--bbai-bg); border: 1px solid var(--bbai-border); border-radius: var(--bbai-radius); padding: var(--bbai-space-4); }
.bbai-table-title { font-size: var(--bbai-text-lg); font-weight: var(--bbai-font-bold); margin: 0 0 var(--bbai-space-3) 0; color: var(--bbai-text); }
.bbai-table-subtitle { color: var(--bbai-text-muted); font-size: var(--bbai-text-xs); }

/* Maintenance Card */
.bbai-maintenance-card { margin-top: var(--bbai-space-6); padding: var(--bbai-space-4); background: var(--bbai-error-bg); border: 1px solid var(--bbai-error-light); border-radius: var(--bbai-radius); }
.bbai-maintenance-title { margin-top: 0; color: var(--bbai-error); font-weight: var(--bbai-font-bold); }
.bbai-maintenance-desc { margin-bottom: var(--bbai-space-3); }

/* License Key */
.bbai-license-key-display { margin-top: var(--bbai-space-2); font-size: var(--bbai-text-xs); color: var(--bbai-text-muted); font-family: var(--bbai-font-mono); word-break: break-all; }

/* Back Button */
.bbai-back-btn { display: inline-flex; align-items: center; gap: var(--bbai-space-2); padding: var(--bbai-space-2) var(--bbai-space-4); background: var(--bbai-primary); color: white; border: none; border-radius: var(--bbai-radius); font-weight: var(--bbai-font-medium); font-size: var(--bbai-text-sm); text-decoration: none; transition: background var(--bbai-transition); }
.bbai-back-btn:hover { background: var(--bbai-primary-hover); color: white; }

/* Skeleton Loading */
@keyframes bbai-skeleton-pulse { 
    0% { background-position: 200% 0; } 
    100% { background-position: -200% 0; } 
}

.bbai-skeleton { 
    background: linear-gradient(90deg, var(--bbai-gray-200) 0%, var(--bbai-gray-100) 50%, var(--bbai-gray-200) 100%); 
    background-size: 200% 100%; 
    animation: bbai-skeleton-pulse 1.5s ease-in-out infinite; 
    border-radius: var(--bbai-radius); 
}

.bbai-skeleton--text { 
    height: 14px; 
    width: 100%; 
    margin-bottom: 8px;
}

.bbai-skeleton--text:last-child {
    width: 60%;
}

.bbai-skeleton--thumbnail { 
    width: 60px; 
    height: 60px; 
    flex-shrink: 0;
    border-radius: var(--bbai-radius);
}

.bbai-skeleton--badge { 
    width: 70px; 
    height: 22px; 
    border-radius: var(--bbai-radius-full); 
}

.bbai-skeleton--button { 
    width: 100px; 
    height: 36px; 
}

.bbai-skeleton--card {
    height: 120px;
    width: 100%;
    border-radius: var(--bbai-radius-lg);
}

.bbai-skeleton--table-row {
    height: 60px;
    width: 100%;
    margin-bottom: 8px;
}

.bbai-loading .bbai-content { 
    display: none; 
}

.bbai-loading .bbai-skeleton-container { 
    display: block; 
}

.bbai-skeleton-container { 
    display: none; 
}

/* Progress Bar */
.bbai-progress-bar-container {
    width: 100%;
    padding: var(--bbai-space-4);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius-lg);
    border: 1px solid var(--bbai-gray-200);
}

.bbai-progress-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--bbai-space-2);
}

.bbai-progress-label {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

.bbai-progress-percentage {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-primary);
}

.bbai-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    margin-bottom: var(--bbai-space-2);
}

.bbai-progress-bar-fill {
    height: 100%;
    background: var(--bbai-primary-gradient);
    border-radius: var(--bbai-radius-full);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bbai-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: bbai-progress-shimmer 1.5s infinite;
}

@keyframes bbai-progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.bbai-progress-bar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
}

.bbai-progress-count {
    font-weight: var(--bbai-font-medium);
}

.bbai-progress-eta {
    font-style: italic;
}

.bbai-progress-active {
    display: block;
}



/* 10. Animations */

/* Imported from: _animations.css */
/**
 * Animation System - BeepBeep AI
 * Standard animations for consistent UX across the plugin
 * 
 * All animations respect prefers-reduced-motion
 */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

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

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

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

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

@keyframes bbai-slide-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bbai-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bbai-slide-left {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bbai-slide-right {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bbai-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bbai-scale-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes bbai-toast-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bbai-shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

.bbai-animate-spin {
    animation: bbai-spin var(--bbai-animation-base) linear infinite;
}

.bbai-animate-pulse {
    animation: bbai-pulse 2s ease-in-out infinite;
}

.bbai-animate-fade-in {
    animation: bbai-fade-in var(--bbai-animation-base) ease-out;
}

.bbai-animate-fade-out {
    animation: bbai-fade-out var(--bbai-animation-base) ease-out;
}

.bbai-animate-slide-up {
    animation: bbai-slide-up var(--bbai-animation-base) ease-out;
}

.bbai-animate-slide-down {
    animation: bbai-slide-down var(--bbai-animation-base) ease-out;
}

.bbai-animate-slide-left {
    animation: bbai-slide-left var(--bbai-animation-base) ease-out;
}

.bbai-animate-slide-right {
    animation: bbai-slide-right var(--bbai-animation-base) ease-out;
}

.bbai-animate-scale-in {
    animation: bbai-scale-in var(--bbai-animation-base) ease-out;
}

.bbai-animate-scale-out {
    animation: bbai-scale-out var(--bbai-animation-base) ease-out;
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Spinner */
.bbai-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bbai-gray-200);
    border-top-color: var(--bbai-primary);
    border-radius: 50%;
    animation: bbai-spin 0.8s linear infinite;
}

.bbai-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.bbai-spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Skeleton Loader */
.bbai-skeleton {
    background: linear-gradient(
        90deg,
        var(--bbai-gray-100) 0%,
        var(--bbai-gray-200) 50%,
        var(--bbai-gray-100) 100%
    );
    background-size: 200% 100%;
    animation: bbai-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--bbai-radius);
}

.bbai-skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.bbai-skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.bbai-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ============================================
   MODAL ANIMATIONS
   ============================================ */

.bbai-modal-backdrop {
    animation: bbai-fade-in var(--bbai-animation-base) ease-out;
}

.bbai-modal {
    animation: bbai-scale-in var(--bbai-animation-base) ease-out;
}

/* ============================================
   TAB TRANSITIONS
   ============================================ */

.bbai-tab-content {
    animation: bbai-fade-in var(--bbai-animation-fast) ease-out;
}

/* ============================================
   RESPECT REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .bbai-animate-spin,
    .bbai-animate-pulse,
    .bbai-animate-fade-in,
    .bbai-animate-fade-out,
    .bbai-animate-slide-up,
    .bbai-animate-slide-down,
    .bbai-animate-slide-left,
    .bbai-animate-slide-right,
    .bbai-animate-scale-in,
    .bbai-animate-scale-out,
    .bbai-spinner,
    .bbai-skeleton {
        animation: none !important;
    }
    
    .bbai-skeleton {
        background: var(--bbai-gray-100);
    }
}



/* 11. Header & Navigation */

/* Imported from: _header.css */
/**
 * Header & Navigation - Premium SaaS Design
 * Dark header with refined navigation
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   HEADER
   ============================================ */

.bbai-header {
    background: #0f172a;
    padding: var(--bbai-space-4) var(--bbai-space-6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.toplevel_page_bbai .wrap.bbai-wrap > .bbai-header,
body[class*="_page_bbai"] .wrap.bbai-wrap > .bbai-header {
    display: none !important;
}

.bbai-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--bbai-dashboard-max-width);
    margin: 0 auto;
    gap: var(--bbai-space-4);
    overflow: visible;
}

/* ============================================
   LOGO
   ============================================ */

.bbai-logo {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    text-decoration: none;
    flex-shrink: 0;
}

.bbai-logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.bbai-logo-text {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-bold);
    color: white;
    letter-spacing: -0.01em;
}

/* ============================================
   NAVIGATION
   ============================================ */

.bbai-nav {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-4);
    flex: 1 1 auto;
    min-width: 0;
}

.bbai-nav__primary {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.bbai-nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-4);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: var(--bbai-radius);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 36px;
}

.bbai-nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.bbai-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: var(--bbai-font-semibold);
}

.bbai-nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.bbai-nav-link svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
}

.bbai-nav-link:hover svg,
.bbai-nav-link.active svg {
    opacity: 1;
}

/* ============================================
   GUIDE/HELP LINK
   ============================================ */

.bbai-header-guide-link {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-3);
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    border-radius: var(--bbai-radius-full);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    margin-left: auto;
    flex-shrink: 0;
}

.bbai-header-guide-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.24);
}

.bbai-header-guide-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
}

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

.bbai-header-guide-link svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.bbai-header-guide-text {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .bbai-header-guide-link {
        padding: var(--bbai-space-1) var(--bbai-space-2);
    }

    .bbai-header-guide-text {
        display: none;
    }
}

/* ============================================
   HEADER ACTIONS
   ============================================ */

.bbai-header-actions {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    flex-shrink: 0;
}

/* Credits pill (connected account — remaining generations) */
.bbai-credits-pill {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
}

.bbai-credits-pill[data-state="low"] {
    background: rgba(255, 165, 0, 0.15);
    color: #ff9800;
}

.bbai-credits-pill[data-state="empty"] {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4d4f;
}

/* Free plan: single inline header line (plan + credits + upgrade) — not a button */
.bbai-header-free-credits-upgrade-line {
    display: inline-block;
    font-size: 13px;
    font-weight: var(--bbai-font-medium, 500);
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.94);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.bbai-header-free-credits-upgrade-line:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.65);
}

.bbai-header-free-credits-upgrade-line:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Auth Badge */
.bbai-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--bbai-radius);
    font-size: var(--bbai-text-sm);
    color: white;
}

.bbai-auth-badge__user {
    font-weight: var(--bbai-font-medium);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bbai-auth-badge__logout {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--bbai-text-xs);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color var(--bbai-transition-fast);
}

.bbai-auth-badge__logout:hover {
    color: white;
}

/* Logout/Disconnect Button */
.bbai-header-logout-btn,
.bbai-header-disconnect-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--bbai-radius);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-medium);
    cursor: pointer;
    transition: all var(--bbai-transition-fast) var(--bbai-ease-out);
    white-space: nowrap;
    text-decoration: none;
}

.bbai-header-logout-btn:hover,
.bbai-header-disconnect-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.bbai-header-logout-btn:focus-visible,
.bbai-header-disconnect-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.bbai-header-logout-btn:disabled,
.bbai-header-disconnect-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Signup Button - Header primary CTA */
.bbai-header-signup-btn,
a.bbai-header-signup-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
    background: #10B981 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    text-shadow: none !important;
    height: auto !important;
    min-height: auto !important;
    line-height: 1.4 !important;
}

.bbai-header-signup-btn:hover,
a.bbai-header-signup-btn:hover {
    background: #059669 !important;
    color: #ffffff !important;
    border: none !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3) !important;
}

/* Login Button - Header secondary */
.bbai-header-login-btn,
.bbai-header .bbai-header-login-btn,
.wrap .bbai-header-login-btn,
button.bbai-header-login-btn,
a.bbai-header-login-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    text-shadow: none !important;
    height: auto !important;
    min-height: auto !important;
    line-height: 1.4 !important;
}

.bbai-header-login-btn:hover,
.bbai-header .bbai-header-login-btn:hover,
.wrap .bbai-header-login-btn:hover,
button.bbai-header-login-btn:hover,
a.bbai-header-login-btn:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border: none !important;
}

.bbai-header-login-btn:focus,
.bbai-header-login-btn:focus-visible,
.bbai-header .bbai-header-login-btn:focus,
.bbai-header .bbai-header-login-btn:focus-visible,
a.bbai-header-login-btn:focus,
a.bbai-header-login-btn:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.5) !important;
    outline-offset: 2px !important;
    background: #10B981 !important;
    color: #ffffff !important;
}

.bbai-header-login-btn svg,
.bbai-header .bbai-header-login-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .bbai-header-content {
        flex-wrap: wrap;
    }

    .bbai-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        margin-top: var(--bbai-space-2);
        padding-bottom: var(--bbai-space-2);
    }

    .bbai-nav-link {
        padding: var(--bbai-space-2) var(--bbai-space-3);
        font-size: var(--bbai-text-xs);
    }

    .bbai-nav__primary {
        flex: 1 1 auto;
    }
}

@media (max-width: 640px) {
    .bbai-header {
        padding: var(--bbai-space-3) var(--bbai-space-4);
    }

    .bbai-logo-text {
        display: none;
    }

    .bbai-header-actions {
        gap: var(--bbai-space-2);
    }

    .bbai-auth-badge__user {
        max-width: 100px;
    }
}



/* 12. Alerts & Notifications */

/* Imported from: _alerts.css */
/**
 * Alerts & Toasts - Premium SaaS Design
 * Clear status communication, refined styling
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   ALERTS
   ============================================ */

.bbai-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-4);
    border-radius: var(--bbai-radius-lg);
    border-left: 4px solid;
    margin-bottom: var(--bbai-space-4);
}

.bbai-alert:last-child {
    margin-bottom: 0;
}

.bbai-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.bbai-alert-content {
    flex: 1;
    min-width: 0;
}

.bbai-alert-title {
    font-weight: var(--bbai-font-semibold);
    font-size: var(--bbai-text-sm);
    margin: 0 0 var(--bbai-space-1) 0;
    line-height: var(--bbai-leading-tight);
}

.bbai-alert-message {
    margin: 0;
    font-size: var(--bbai-text-sm);
    line-height: 1.5;
}

/* Alert variants */
.bbai-alert-success {
    background: var(--bbai-success-bg);
    border-left-color: var(--bbai-success);
}

.bbai-alert-success .bbai-alert-icon {
    color: var(--bbai-success);
}

.bbai-alert-warning {
    background: var(--bbai-warning-bg);
    border-left-color: var(--bbai-warning);
}

.bbai-alert-warning .bbai-alert-icon {
    color: var(--bbai-warning);
}

.bbai-alert-error {
    background: var(--bbai-error-bg);
    border-left-color: var(--bbai-error);
}

.bbai-alert-error .bbai-alert-icon {
    color: var(--bbai-error);
}

.bbai-alert-info {
    background: var(--bbai-info-bg);
    border-left-color: var(--bbai-info);
}

.bbai-alert-info .bbai-alert-icon {
    color: var(--bbai-info);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.bbai-toast-container {
    position: fixed;
    top: var(--bbai-space-6);
    right: var(--bbai-space-6);
    z-index: var(--bbai-z-notification);
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
    max-width: 400px;
    pointer-events: none;
}

.bbai-toast {
    background: var(--bbai-bg);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-4);
    box-shadow: var(--bbai-shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    border-left: 4px solid;
    animation: bbai-toast-in 0.3s var(--bbai-ease-spring);
    pointer-events: auto;
}

@keyframes bbai-toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bbai-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.bbai-toast-content {
    flex: 1;
    min-width: 0;
}

.bbai-toast-title {
    font-weight: var(--bbai-font-semibold);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-1);
}

.bbai-toast-message {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    line-height: 1.4;
}

.bbai-toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--bbai-radius);
    color: var(--bbai-text-muted);
    cursor: pointer;
    transition: all var(--bbai-transition-fast);
    margin: -4px -4px -4px 0;
}

.bbai-toast-close:hover {
    background: var(--bbai-bg-secondary);
    color: var(--bbai-text);
}

.bbai-toast-close svg {
    width: 14px;
    height: 14px;
}

/* Toast variants */
.bbai-toast-success {
    border-left-color: var(--bbai-success);
}

.bbai-toast-success .bbai-toast-icon {
    color: var(--bbai-success);
}

.bbai-toast-error {
    border-left-color: var(--bbai-error);
}

.bbai-toast-error .bbai-toast-icon {
    color: var(--bbai-error);
}

.bbai-toast-warning {
    border-left-color: var(--bbai-warning);
}

.bbai-toast-warning .bbai-toast-icon {
    color: var(--bbai-warning);
}

.bbai-toast-info {
    border-left-color: var(--bbai-info);
}

.bbai-toast-info .bbai-toast-icon {
    color: var(--bbai-info);
}

/* ============================================
   LOGIN STATUS
   ============================================ */

.bbai-login-status {
    display: none;
    padding: var(--bbai-space-3) var(--bbai-space-4);
    border-radius: var(--bbai-radius);
    margin-bottom: var(--bbai-space-4);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
}

.bbai-login-status.is-visible {
    display: block;
}

.bbai-login-status--success {
    color: var(--bbai-success-dark);
    background: var(--bbai-success-bg);
}

.bbai-login-status--error {
    color: var(--bbai-error);
    background: var(--bbai-error-bg);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .bbai-toast-container {
        top: auto;
        bottom: var(--bbai-space-4);
        right: var(--bbai-space-4);
        left: var(--bbai-space-4);
        max-width: none;
    }

    @keyframes bbai-toast-in {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}



/* 13. Auth Modal */

/* Imported from: _auth-modal.css */
/**
 * Auth Modal
 */
.alttext-auth-modal { position: fixed; inset: 0; z-index: 999999; font-family: var(--bbai-font); pointer-events: auto; }
.alttext-auth-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: block; padding: 24px; animation: auth-fade-in 0.2s ease-out; }
@keyframes auth-fade-in { from { opacity: 0; } to { opacity: 1; } }
.alttext-auth-modal__content { background: #fff; border-radius: var(--bbai-radius-lg); box-shadow: 0 18px 42px rgba(15,23,42,0.22), 0 4px 12px rgba(15,23,42,0.12), 0 0 0 1px rgba(15,23,42,0.06); max-width: 560px; width: min(calc(100vw - 48px), 560px); max-height: calc(100vh - 48px); overflow-y: auto; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: auth-scale-in 0.2s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: auto; }
@keyframes auth-scale-in { from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.alttext-auth-modal__close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 28px; line-height: 1; color: var(--bbai-gray-400); cursor: pointer; padding: 4px 8px; border-radius: var(--bbai-radius); transition: all var(--bbai-transition-fast); z-index: 10; }
.alttext-auth-modal__close:hover { background: var(--bbai-gray-100); color: var(--bbai-gray-500); }
.alttext-auth-modal__header { text-align: center; padding: 36px 44px 20px; }
.alttext-auth-modal__title { font-size: var(--bbai-text-2xl); font-weight: var(--bbai-font-bold); color: var(--bbai-text); margin: 0 0 6px; line-height: 1.18; }
.alttext-auth-modal__subtitle { font-size: var(--bbai-text-sm); color: var(--bbai-text-muted); margin: 0; line-height: 1.45; }
.alttext-auth-modal__context { margin: 10px 0 0; font-size: 13px; line-height: 1.35; font-weight: var(--bbai-font-semibold); color: var(--bbai-text); }
.alttext-auth-modal__context[hidden] { display: none; }
.alttext-auth-modal__body { padding: 0 44px 28px; }
.alttext-auth-modal__value-step, .alttext-auth-modal__form-step { min-height: 190px; }
.alttext-auth-modal__value-step[hidden], .alttext-auth-modal__form-step[hidden] { display: none; }
.alttext-auth-modal__value-list { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.alttext-auth-modal__value-list li { position: relative; padding-left: 18px; color: var(--bbai-gray-700); font-size: var(--bbai-text-sm); line-height: 1.45; }
.alttext-auth-modal__value-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 999px; background: var(--bbai-primary); }
.alttext-auth-modal__intro-actions { display: grid; gap: 4px; }
.alttext-auth-modal__intro-cta { width: 100%; min-width: 0; margin-bottom: 6px; }
.alttext-auth-modal__secondary-cta { width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--bbai-primary); font-size: var(--bbai-text-sm); font-weight: var(--bbai-font-semibold); line-height: 1.3; cursor: pointer; }
.alttext-auth-modal__secondary-cta:hover, .alttext-auth-modal__secondary-cta:focus-visible { background: var(--bbai-gray-50); outline: none; }
.alttext-auth-modal__form-step { padding-top: 18px; border-top: 1px solid var(--bbai-border); }

/* Form */
.alttext-form-group { margin-bottom: 20px; }
.alttext-form-group label { display: block; font-weight: var(--bbai-font-semibold); font-size: var(--bbai-text-sm); color: var(--bbai-gray-700); margin-bottom: 8px; }
.alttext-form-group__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.alttext-form-group input { width: 100%; padding: 12px 14px; border: 1px solid var(--bbai-border); border-radius: var(--bbai-radius-md); font-size: 15px; color: var(--bbai-text); transition: all var(--bbai-transition-fast); }
.alttext-form-group input::placeholder { color: var(--bbai-gray-400); }
.alttext-form-group input:focus { outline: none; border-color: var(--bbai-primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.alttext-form-group input[readonly] { background-color: var(--bbai-gray-50); cursor: not-allowed; }
.alttext-form-group small { display: block; color: var(--bbai-text-muted); font-size: 13px; margin-top: 6px; }
.alttext-forgot-password-link { color: var(--bbai-primary); font-size: 13px; text-decoration: none; font-weight: var(--bbai-font-medium); }
.alttext-forgot-password-link:hover { opacity: 0.7; }

/* Button */
.alttext-btn { display: flex; align-items: center; justify-content: center; min-height: 40px; min-width: min(100%, 280px); max-width: 100%; padding: 0 18px; border: none; border-radius: 8px; font-size: 14px; font-weight: var(--bbai-font-semibold); line-height: 1.15; cursor: pointer; transition: all var(--bbai-transition-fast); width: auto; margin: 0 auto 12px; box-sizing: border-box; }
.alttext-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.alttext-btn--primary { background: var(--bbai-primary); color: white; }
.alttext-btn--primary:hover:not(:disabled) { background: var(--bbai-primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
.alttext-btn--primary:active:not(:disabled) { transform: scale(0.98); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06); }
.alttext-btn__spinner { margin-left: 8px; }

/* Auth Switch */
.alttext-auth-switch { text-align: center; color: var(--bbai-text-muted); font-size: var(--bbai-text-sm); margin: 0; }
.alttext-auth-switch a { color: var(--bbai-primary); text-decoration: none; font-weight: var(--bbai-font-semibold); }
.alttext-auth-switch a:hover { opacity: 0.7; }

/* Alert */
.alttext-alert { padding: 12px 16px; border-radius: var(--bbai-radius-md); margin-bottom: 20px; font-size: var(--bbai-text-sm); }
.alttext-alert--error { background: var(--bbai-error-light); color: #991b1b; border-left: 4px solid var(--bbai-error); }
.alttext-alert--success { background: var(--bbai-success-light); color: #065f46; border-left: 4px solid var(--bbai-success); }

/* Footer */
.alttext-auth-modal__footer { padding: 16px 44px 28px; text-align: center; border-top: 1px solid var(--bbai-border); }
.alttext-auth-modal__upsell { font-size: 13px; color: var(--bbai-text-muted); margin: 0; line-height: 1.5; }

@media (max-width: 640px) {
    .alttext-auth-modal__overlay { padding: 12px; }
    .alttext-auth-modal__content { width: min(calc(100vw - 24px), 100%); max-height: calc(100vh - 24px); }
    .alttext-auth-modal__header { padding: 32px 24px 20px; }
    .alttext-auth-modal__body { padding: 0 24px 24px; }
    .alttext-auth-modal__value-step, .alttext-auth-modal__form-step { min-height: 0; }
    .alttext-auth-modal__footer { padding: 16px 24px 24px; }
    .alttext-btn { width: 100%; min-width: 0; }
}

#bbai-dashboard-main {
    transition: filter 240ms ease, transform 240ms ease;
}

body.bbai-auth-modal-open #bbai-dashboard-main {
    filter: blur(1.5px);
    transform: scale(0.98);
    transform-origin: center top;
}

@media (prefers-reduced-motion: reduce) {
    .alttext-auth-modal__overlay,
    .alttext-auth-modal__content {
        animation: none;
    }

    body.bbai-auth-modal-open #bbai-dashboard-main {
        transform: none;
    }
}



/* 14. Upgrade Modal & Pricing */

/* Imported from: _upgrade-modal.css */
/**
 * Upgrade Modal - Professional SaaS Pricing
 * High conversion, accessible design
 */

/* ========================================
   MODAL BACKDROP & CONTAINER
   ======================================== */
.bbai-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--bbai-z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

.bbai-modal-backdrop.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* After close, do not leave a fullscreen flex layer (conflicts with generic .bbai-modal-backdrop rules that use display:flex while "invisible"). */
#bbai-upgrade-modal.bbai-modal-backdrop:not(.active):not(.is-visible) {
    display: none !important;
    pointer-events: none;
}

.bbai-upgrade-modal__content {
    background: var(--bbai-bg);
    border-radius: var(--bbai-radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease-out;
    will-change: transform, opacity;
}

.bbai-modal-backdrop.active .bbai-upgrade-modal__content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.bbai-upgrade-modal__body {
    padding: var(--bbai-space-10);
}

/* Close Button - Extends .bbai-btn-icon-only */
.bbai-upgrade-modal__close {
    position: absolute;
    top: var(--bbai-space-4);
    right: var(--bbai-space-4);
    z-index: 10;
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    color: var(--bbai-text-muted);
}

.bbai-upgrade-modal__close:hover {
    color: var(--bbai-text);
    background: var(--bbai-bg-secondary);
}

.bbai-upgrade-modal__close svg {
    width: 20px;
    height: 20px;
}

.bbai-upgrade-modal__header .bbai-subtitle {
    margin-bottom: 0;
}

/* ========================================
   PRICING GRID
   ======================================== */
.bbai-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-8);
    align-items: stretch;
}

@media (max-width: 900px) {
    .bbai-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ========================================
   PRICING CARD
   ======================================== */
.bbai-pricing-card {
    background: var(--bbai-bg);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-6);
    display: flex;
    flex-direction: column;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    position: relative;
    box-shadow: var(--bbai-shadow-sm);
}

.bbai-pricing-card:hover {
    border-color: var(--bbai-border-secondary);
    box-shadow: var(--bbai-shadow-md);
    transform: translateY(-2px);
}

/* Growth Plan - Featured */
.bbai-pricing-card--growth {
    border-color: var(--bbai-primary);
    box-shadow: 0 0 0 3px var(--bbai-primary-soft), var(--bbai-shadow-sm);
    position: relative;
}

.bbai-pricing-card--growth::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: var(--bbai-primary-gradient);
    border-radius: var(--bbai-radius-xl) var(--bbai-radius-xl) 0 0;
}

.bbai-pricing-card--growth:hover {
    box-shadow: 0 0 0 3px var(--bbai-primary-soft), var(--bbai-shadow-lg);
    transform: translateY(-4px);
}

/* Agency Plan - Premium */
.bbai-pricing-card--agency {
    border-color: #7C3AED;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2), var(--bbai-shadow-sm);
    position: relative;
}

.bbai-pricing-card--agency::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
    border-radius: var(--bbai-radius-xl) var(--bbai-radius-xl) 0 0;
}

.bbai-pricing-card--agency:hover {
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3), var(--bbai-shadow-lg);
    transform: translateY(-4px);
}

/* Badge */
.bbai-pricing-card__badge {
    display: inline-block;
    padding: var(--bbai-space-2) var(--bbai-space-4);
    border-radius: var(--bbai-radius-full);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--bbai-space-5);
    width: fit-content;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}
.bbai-pricing-card__badge--free {
    background: var(--bbai-bg-secondary);
    color: var(--bbai-text-muted);
    border: 1px solid var(--bbai-border);
}
.bbai-pricing-card__badge--growth {
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.bbai-pricing-card__badge--agency {
    background: rgba(124, 58, 237, 0.1);
    color: #7C3AED;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Price */
.bbai-pricing-card__price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: var(--bbai-space-2);
}
.bbai-pricing-card__currency {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}
.bbai-pricing-card__amount {
    font-size: var(--bbai-text-5xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    line-height: var(--bbai-leading-none);
    letter-spacing: var(--bbai-tracking-tighter);
}
.bbai-pricing-card__period {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin-left: var(--bbai-space-1);
}

/* Billing info */
.bbai-pricing-card__billing {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    margin: 0 0 var(--bbai-space-5) 0;
    line-height: var(--bbai-leading-relaxed);
}

.bbai-pricing-card__billing em {
    font-style: italic;
    color: var(--bbai-primary);
    font-weight: var(--bbai-font-semibold);
}

/* Limit text */
.bbai-pricing-card__limit {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-5);
    padding-bottom: var(--bbai-space-5);
    border-bottom: 1px solid var(--bbai-border);
    line-height: var(--bbai-leading-snug);
}

/* Features */
.bbai-pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--bbai-space-6) 0;
    flex: 1;
}
.bbai-pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-2) 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-secondary);
    line-height: var(--bbai-leading-relaxed);
    transition: color var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-pricing-card__features li:hover {
    color: var(--bbai-text);
}
.bbai-pricing-card__features li svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--bbai-success);
    transition: transform var(--bbai-transition-fast) var(--bbai-ease-out);
}

.bbai-pricing-card__features li:hover svg {
    transform: scale(1.1);
}

.bbai-pricing-card__features li svg path {
    stroke: currentColor;
    stroke-width: 2.5;
}
.bbai-pricing-card__features li strong {
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

/* Buttons - Extend base button classes */
.bbai-pricing-card__btn {
    /* Base button styles are inherited from .bbai-btn */
    margin-top: auto;
    position: relative;
    overflow: hidden;
    /* Ensure background is not transparent */
    background: initial !important;
}

.bbai-pricing-card__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 95%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.bbai-pricing-card__btn:hover::before {
    left: 100%;
}

.bbai-pricing-card__btn:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* Free button - High specificity to override base button styles */
.bbai-pricing-card__btn.bbai-pricing-card__btn--free,
.bbai-btn-secondary.bbai-pricing-card__btn--free,
.bbai-pricing-card__btn--free.bbai-btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: white !important;
    border-color: #6b7280 !important;
    box-shadow: 0 4px 14px rgba(107, 114, 128, 0.4), 0 0 0 1px rgba(107, 114, 128, 0.1) !important;
}

.bbai-pricing-card__btn.bbai-pricing-card__btn--free:hover:not(:disabled),
.bbai-btn-secondary.bbai-pricing-card__btn--free:hover:not(:disabled),
.bbai-pricing-card__btn--free.bbai-btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
    border-color: #4b5563 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.5), 0 0 0 1px rgba(107, 114, 128, 0.2) !important;
}

.bbai-pricing-card__btn.bbai-pricing-card__btn--free:disabled,
.bbai-btn-secondary.bbai-pricing-card__btn--free:disabled,
.bbai-pricing-card__btn--free.bbai-btn-secondary:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
    color: white !important;
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Growth button - High specificity to override base button styles */
.bbai-pricing-card__btn.bbai-pricing-card__btn--growth,
.bbai-btn-primary.bbai-pricing-card__btn--growth,
.bbai-pricing-card__btn--growth.bbai-btn-primary,
.bbai-pricing-card__btn--growth.bbai-btn,
.bbai-btn.bbai-pricing-card__btn--growth,
button.bbai-pricing-card__btn--growth,
button.bbai-btn-primary.bbai-pricing-card__btn--growth,
a.bbai-pricing-card__btn--growth,
a.bbai-btn-primary.bbai-pricing-card__btn--growth {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    background-image: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    background-color: #10B981 !important;
    color: white !important;
    border: none !important;
    border-color: #10B981 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5), 0 0 0 1px rgba(16, 185, 129, 0.15) !important;
    font-weight: var(--bbai-font-bold) !important;
}

.bbai-pricing-card__btn.bbai-pricing-card__btn--growth:hover,
.bbai-btn-primary.bbai-pricing-card__btn--growth:hover,
.bbai-pricing-card__btn--growth.bbai-btn-primary:hover,
.bbai-pricing-card__btn--growth.bbai-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #059669 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6), 0 0 0 1px rgba(16, 185, 129, 0.25) !important;
}

.bbai-pricing-card__btn.bbai-pricing-card__btn--growth:active,
.bbai-btn-primary.bbai-pricing-card__btn--growth:active,
.bbai-pricing-card__btn--growth.bbai-btn-primary:active,
.bbai-pricing-card__btn--growth.bbai-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5) !important;
}

/* Agency button - High specificity to override base button styles */
.bbai-pricing-card__btn.bbai-pricing-card__btn--agency,
.bbai-pricing-card__btn--agency.bbai-btn,
.bbai-btn-primary.bbai-pricing-card__btn--agency,
.bbai-pricing-card__btn--agency.bbai-btn-primary,
.bbai-btn.bbai-pricing-card__btn--agency,
button.bbai-pricing-card__btn--agency,
button.bbai-btn.bbai-pricing-card__btn--agency,
button.bbai-btn-primary.bbai-pricing-card__btn--agency,
a.bbai-pricing-card__btn--agency,
a.bbai-btn.bbai-pricing-card__btn--agency {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%) !important;
    background-image: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%) !important;
    background-color: #7C3AED !important;
    color: white !important;
    border: none !important;
    border-color: #7C3AED !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.5), 0 0 0 1px rgba(124, 58, 237, 0.15) !important;
    font-weight: var(--bbai-font-bold) !important;
}

.bbai-pricing-card__btn.bbai-pricing-card__btn--agency:hover,
.bbai-pricing-card__btn--agency.bbai-btn:hover,
.bbai-btn-primary.bbai-pricing-card__btn--agency:hover,
.bbai-pricing-card__btn--agency.bbai-btn-primary:hover {
    background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 100%) !important;
    border-color: #6D28D9 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6), 0 0 0 1px rgba(124, 58, 237, 0.25) !important;
}

.bbai-pricing-card__btn.bbai-pricing-card__btn--agency:active,
.bbai-pricing-card__btn--agency.bbai-btn:active,
.bbai-btn-primary.bbai-pricing-card__btn--agency:active,
.bbai-pricing-card__btn--agency.bbai-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.5) !important;
}

/* ========================================
   TOP-UP SECTION
   ======================================== */
.bbai-topup-section {
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-6);
    margin-top: var(--bbai-space-6);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-topup-section:hover {
    box-shadow: var(--bbai-shadow-sm);
    border-color: var(--bbai-border-secondary);
}
.bbai-topup-section__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-6);
    flex-wrap: wrap;
}

.bbai-topup-section__text {
    flex: 1;
    min-width: 200px;
}

.bbai-topup-section__title {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-topup-section__desc {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-secondary);
    margin: 0;
    line-height: var(--bbai-leading-relaxed);
}
/* Topup button extends .bbai-btn-dark */
.bbai-topup-section__btn,
.bbai-btn-dark.bbai-topup-section__btn,
.bbai-btn.bbai-topup-section__btn,
.bbai-btn-lg.bbai-topup-section__btn,
button.bbai-topup-section__btn,
button.bbai-btn-dark.bbai-topup-section__btn,
button.bbai-btn.bbai-topup-section__btn {
    /* Base button styles are inherited from .bbai-btn and .bbai-btn-dark */
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    background-image: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    background-color: #1f2937 !important;
    color: white !important;
    border: none !important;
    border-color: #1f2937 !important;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.5), 0 0 0 1px rgba(31, 41, 55, 0.15) !important;
    font-weight: var(--bbai-font-bold) !important;
    white-space: nowrap;
    min-width: 160px;
}

.bbai-topup-section__btn:hover:not(:disabled),
.bbai-btn-dark.bbai-topup-section__btn:hover:not(:disabled),
.bbai-btn.bbai-topup-section__btn:hover:not(:disabled),
.bbai-btn-lg.bbai-topup-section__btn:hover:not(:disabled),
button.bbai-topup-section__btn:hover:not(:disabled),
button.bbai-btn-dark.bbai-topup-section__btn:hover:not(:disabled),
button.bbai-btn.bbai-topup-section__btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #111827 0%, #030712 100%) !important;
    background-image: linear-gradient(135deg, #111827 0%, #030712 100%) !important;
    background-color: #111827 !important;
    border: none !important;
    border-color: #111827 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(31, 41, 55, 0.6), 0 0 0 1px rgba(31, 41, 55, 0.25) !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes bbai-fade-in {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

/* ========================================
   BILLING TOGGLE
   ======================================== */
.bbai-billing-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin: var(--bbai-space-6) 0 var(--bbai-space-4);
}

.bbai-billing-toggle {
    display: inline-flex;
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-1);
    gap: var(--bbai-space-1);
    border: 1px solid var(--bbai-border);
}

.bbai-billing-toggle__option {
    padding: var(--bbai-space-2) var(--bbai-space-5);
    border-radius: var(--bbai-radius-md);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-billing-toggle__option:hover {
    color: var(--bbai-text);
}

.bbai-billing-toggle__option--active {
    background: var(--bbai-bg);
    color: var(--bbai-text);
    box-shadow: var(--bbai-shadow-sm);
    font-weight: var(--bbai-font-semibold);
}

.bbai-billing-savings {
    font-size: var(--bbai-text-xs);
    background: var(--bbai-success);
    color: white;
    padding: 2px var(--bbai-space-2);
    border-radius: var(--bbai-radius-full);
    font-weight: var(--bbai-font-semibold);
    white-space: nowrap;
}

.bbai-billing-toggle__option:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* ========================================
   TRUST BADGES
   ======================================== */
.bbai-trust-badges {
    text-align: center;
    margin: var(--bbai-space-4) 0 var(--bbai-space-6);
}

.bbai-trust-badges--modal {
    padding: var(--bbai-space-3) 0;
}

.bbai-trust-badges__text {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: var(--bbai-leading-relaxed);
}

/* ========================================
   PRICING CARD BADGE - CURRENT PLAN
   ======================================== */
.bbai-pricing-card__badge--current {
    background: var(--bbai-gray-700);
    color: var(--bbai-gray-100);
    border: 1px solid var(--bbai-gray-600);
}

/* ========================================
   PRICING CARD - FEATURE COMING SOON
   ======================================== */
.bbai-feature-coming-soon {
    color: var(--bbai-text-muted);
    font-style: italic;
}

.bbai-pricing-card__features li:has(.bbai-feature-coming-soon) svg {
    color: var(--bbai-text-muted);
}

/* ========================================
   TOPUP SECTION - UPDATED
   ======================================== */
.bbai-topup-section__price-action {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-4);
    flex-wrap: wrap;
}

.bbai-topup-section__price {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.bbai-topup-section__price .bbai-pricing-card__currency {
    font-size: var(--bbai-text-xl);
    font-weight: var(--bbai-font-semibold);
}

.bbai-topup-section__price .bbai-pricing-card__amount {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-none);
}

.bbai-topup-section__subtitle-inline {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    font-weight: var(--bbai-font-normal);
}

/* ========================================
   FAQ SECTION
   ======================================== */
.bbai-pricing-faq {
    margin-top: var(--bbai-space-8);
    padding-top: var(--bbai-space-8);
    border-top: 1px solid var(--bbai-border);
}

.bbai-pricing-faq__title {
    font-size: var(--bbai-text-xl);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-6) 0;
    text-align: center;
}

.bbai-pricing-faq__list {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-4);
    width: 100%;
    margin: 0;
}

.bbai-pricing-faq__item {
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-4);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-pricing-faq__item:hover {
    border-color: var(--bbai-border-secondary);
    box-shadow: var(--bbai-shadow-sm);
}

.bbai-pricing-faq__question {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-pricing-faq__question svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--bbai-success);
}

.bbai-pricing-faq__answer {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-secondary);
    line-height: var(--bbai-leading-relaxed);
    margin-left: calc(var(--bbai-space-3) + 16px);
}

/* ========================================
   SCREEN READER ONLY
   ======================================== */
.bbai-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .bbai-upgrade-modal__body {
        padding: var(--bbai-space-6);
    }
    .bbai-pricing-card__amount {
        font-size: 36px;
    }
    .bbai-topup-section__content {
        flex-direction: column;
        text-align: center;
        gap: var(--bbai-space-4);
    }
    .bbai-topup-section__text {
        width: 95%;
    }
    .bbai-topup-section__price-action {
        flex-direction: column;
        width: 95%;
        align-items: stretch;
    }
    .bbai-topup-section__price {
        justify-content: center;
    }
    .bbai-topup-section__btn {
        width: 95%;
    }
    .bbai-billing-toggle {
        width: 95%;
        max-width: 300px;
    }
    .bbai-billing-toggle__option {
        flex: 1;
        justify-content: center;
    }
    .bbai-pricing-faq__list {
        max-width: 95%;
    }
}

/* ========================================
   DARK MODE
   ======================================== */
[data-theme="dark"] .bbai-upgrade-modal__content,
.bbai-dark-mode .bbai-upgrade-modal__content {
    background: var(--bbai-bg);
}
[data-theme="dark"] .bbai-pricing-card,
.bbai-dark-mode .bbai-pricing-card {
    background: var(--bbai-bg-secondary);
    border-color: var(--bbai-border);
}
[data-theme="dark"] .bbai-pricing-card__badge--free,
.bbai-dark-mode .bbai-pricing-card__badge--free {
    background: var(--bbai-gray-700);
    color: var(--bbai-gray-300);
}
[data-theme="dark"] .bbai-pricing-card__badge--current,
.bbai-dark-mode .bbai-pricing-card__badge--current {
    background: var(--bbai-gray-600);
    color: var(--bbai-gray-200);
    border-color: var(--bbai-gray-500);
}
[data-theme="dark"] .bbai-topup-section,
.bbai-dark-mode .bbai-topup-section {
    background: var(--bbai-bg-secondary);
    border-color: var(--bbai-border);
}
[data-theme="dark"] .bbai-billing-toggle,
.bbai-dark-mode .bbai-billing-toggle {
    background: var(--bbai-gray-800);
    border-color: var(--bbai-gray-700);
}
[data-theme="dark"] .bbai-billing-toggle__option--active,
.bbai-dark-mode .bbai-billing-toggle__option--active {
    background: var(--bbai-gray-700);
    color: var(--bbai-gray-100);
}
[data-theme="dark"] .bbai-pricing-faq__item,
.bbai-dark-mode .bbai-pricing-faq__item {
    background: var(--bbai-gray-800);
    border-color: var(--bbai-gray-700);
}
[data-theme="dark"] .bbai-trust-badges__text,
.bbai-dark-mode .bbai-trust-badges__text {
    color: var(--bbai-gray-400);
}


/* 15. Bulk Progress Modal */

/* Imported from: _bulk-progress.css */
/**
 * Bulk Progress Modal
 *
 * @package BeepBeep_AI
 */

.bbai-bulk-progress-modal {
	--bbai-text: #0f172a;
	--bbai-text-muted: #64748b;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 28px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

.bbai-bulk-progress-modal.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.bbai-bulk-progress-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.56);
	backdrop-filter: blur(8px);
}

.bbai-bulk-progress-modal__content {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background:
		radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 40%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-radius: 22px;
	box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
	transform: scale(0.96);
	opacity: 0;
	transition: transform 0.24s ease, opacity 0.24s ease;
}

.bbai-bulk-progress-modal.active .bbai-bulk-progress-modal__content {
	transform: scale(1);
	opacity: 1;
}

.bbai-bulk-progress__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 28px 0;
}

.bbai-bulk-progress__header-text {
	flex: 1;
	min-width: 0;
}

.bbai-bulk-progress__title {
	margin: 0;
	font-size: clamp(1.45rem, 1.8vw, 1.85rem);
	line-height: 1.12;
	font-weight: 800;
	color: var(--bbai-text);
}

.bbai-bulk-progress__subtitle {
	margin: 10px 0 0;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--bbai-text-muted);
}

.bbai-bulk-progress__helper {
	margin: 8px 0 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--bbai-text-muted);
}

.bbai-bulk-progress__header-actions {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.bbai-bulk-progress__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	color: var(--bbai-text-muted);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bbai-bulk-progress__close:hover,
.bbai-bulk-progress__close:focus-visible {
	background: rgba(255, 255, 255, 0.95);
	color: var(--bbai-text);
	border-color: rgba(100, 116, 139, 0.28);
}

.bbai-bulk-progress__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
	padding: 18px 28px 24px;
}

.bbai-bulk-progress__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.bbai-bulk-progress__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.74);
}

.bbai-bulk-progress__stat-label {
	color: var(--bbai-text-muted);
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.2;
}

.bbai-bulk-progress__stat-value {
	color: var(--bbai-text);
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.25;
}

.bbai-bulk-progress__meter-label {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--bbai-text-muted);
}

.bbai-bulk-progress__bar-container {
	margin: 0;
	max-height: 20px;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.2s ease, max-height 0.2s ease, transform 0.2s ease;
}

.bbai-bulk-progress__bar {
	position: relative;
	height: 8px;
	background: rgba(241, 245, 249, 0.95);
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
	outline: none;
}

.bbai-bulk-progress__bar:focus-visible {
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, 0.35);
}

.bbai-bulk-progress__bar-fill {
	height: 100%;
	width: 0;
	max-width: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
	box-shadow: 0 6px 16px rgba(34, 197, 94, 0.28);
	transition: width 300ms ease;
}

.bbai-bulk-progress__status-note {
	margin: 0;
	padding: 12px 14px;
	border-radius: 14px;
	font-size: 0.95rem;
	line-height: 1.5;
	background: rgba(148, 163, 184, 0.12);
	color: var(--bbai-text-muted);
}

.bbai-bulk-progress__status-note[data-tone="warning"] {
	background: rgba(245, 158, 11, 0.14);
	color: #92400e;
}

.bbai-bulk-progress__steps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 10px;
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	background: rgba(255, 255, 255, 0.72);
}

.bbai-bulk-progress__step {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 52px;
	padding: 9px 10px;
	border-radius: 13px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	background: rgba(255, 255, 255, 0.9);
}

.bbai-bulk-progress__step-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 0.8rem;
	line-height: 1;
	background: rgba(148, 163, 184, 0.16);
	color: #0f172a;
}

.bbai-bulk-progress__step-label {
	min-width: 0;
	font-size: 0.9rem;
	line-height: 1.25;
	font-weight: 750;
	color: var(--bbai-text);
}

.bbai-bulk-progress__step.bbai-step--active,
.bbai-bulk-progress__step.is-active {
	border-left: 3px solid #10b981;
	background: rgba(16, 185, 129, 0.05);
	animation: bbai-pulse 1.2s ease-in-out infinite;
}

.bbai-bulk-progress__step.bbai-step--complete,
.bbai-bulk-progress__step.is-done {
	opacity: 0.6;
}

.bbai-bulk-progress__step.bbai-step--pending {
	opacity: 0.4;
}

@keyframes bbai-pulse {
	0% { opacity: 1; }
	50% { opacity: 0.7; }
	100% { opacity: 1; }
}

.bbai-bulk-progress__log-container {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	background: rgba(255, 255, 255, 0.72);
}

.bbai-bulk-progress__log-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.bbai-bulk-progress__log-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
	font-weight: 700;
	color: var(--bbai-text);
}

.bbai-bulk-progress__log-count {
	font-size: 0.9rem;
	line-height: 1.3;
	font-weight: 600;
	color: var(--bbai-text-muted);
}

.bbai-bulk-progress__current-image {
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(16, 185, 129, 0.22);
	background: rgba(236, 253, 245, 0.72);
}

.bbai-bulk-progress__current-image[hidden] {
	display: none !important;
}

.bbai-bulk-progress__current-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #10b981;
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.bbai-bulk-progress__current-copy {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.bbai-bulk-progress__current-status {
	color: #047857;
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
}

.bbai-bulk-progress__current-name {
	overflow: hidden;
	color: var(--bbai-text);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bbai-bulk-progress__current-image[data-tone="queued"] {
	border-color: rgba(100, 116, 139, 0.2);
	background: rgba(248, 250, 252, 0.86);
}

.bbai-bulk-progress__current-image[data-tone="queued"] .bbai-bulk-progress__current-dot {
	background: #64748b;
	box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.bbai-bulk-progress__current-image[data-tone="queued"] .bbai-bulk-progress__current-status {
	color: #475569;
}

.bbai-bulk-progress__current-image[data-tone="success"] {
	border-color: rgba(34, 197, 94, 0.24);
	background: rgba(240, 253, 244, 0.8);
}

.bbai-bulk-progress__current-image[data-tone="success"] .bbai-bulk-progress__current-dot {
	background: #22c55e;
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.bbai-bulk-progress__current-image[data-tone="success"] .bbai-bulk-progress__current-status {
	color: #166534;
}

.bbai-bulk-progress__current-image[data-tone="error"] {
	border-color: rgba(239, 68, 68, 0.22);
	background: rgba(254, 242, 242, 0.82);
}

.bbai-bulk-progress__current-image[data-tone="error"] .bbai-bulk-progress__current-dot {
	background: #ef4444;
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.bbai-bulk-progress__current-image[data-tone="error"] .bbai-bulk-progress__current-status {
	color: #991b1b;
}

.bbai-bulk-progress__log {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 132px;
	overflow: auto;
	padding-right: 4px;
}

.bbai-bulk-progress__log-empty {
	padding: 9px 10px;
	border-radius: 12px;
	border: 1px solid rgba(148, 163, 184, 0.24);
	background: rgba(248, 250, 252, 0.75);
	color: var(--bbai-text-muted);
	font-size: 0.88rem;
	line-height: 1.4;
}

.bbai-bulk-progress__log-entry {
	display: grid;
	grid-template-columns: 22px 1fr auto;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.bbai-log-item {
	font-size: 13px;
	opacity: 0.8;
}

.bbai-bulk-progress__log-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 0.9rem;
	line-height: 1;
	color: #0f172a;
	background: rgba(148, 163, 184, 0.16);
}

.bbai-bulk-progress__log-text {
	min-width: 0;
	color: var(--bbai-text);
	font-size: 0.95rem;
	line-height: 1.45;
	font-weight: 600;
}

.bbai-bulk-progress__log-time {
	color: var(--bbai-text-muted);
	font-size: 0.85rem;
	line-height: 1.45;
	font-weight: 600;
	white-space: nowrap;
}

.bbai-bulk-progress__log-entry--success {
	border-left: 3px solid rgba(34, 197, 94, 0.9);
}

.bbai-bulk-progress__log-entry--success .bbai-bulk-progress__log-icon {
	background: rgba(34, 197, 94, 0.16);
	color: #166534;
}

.bbai-bulk-progress__log-entry--error {
	border-left: 3px solid rgba(239, 68, 68, 0.9);
}

.bbai-bulk-progress__log-entry--error .bbai-bulk-progress__log-icon {
	background: rgba(239, 68, 68, 0.14);
	color: #991b1b;
}

.bbai-bulk-progress__log-entry--processing {
	border-left: 3px solid rgba(16, 185, 129, 0.9);
}

.bbai-bulk-progress__log-entry--processing .bbai-bulk-progress__log-icon {
	background: rgba(16, 185, 129, 0.16);
	color: #047857;
}

.bbai-bulk-progress__log-entry--queued {
	border-left: 3px solid rgba(100, 116, 139, 0.55);
	background: rgba(248, 250, 252, 0.92);
}

.bbai-bulk-progress__log-entry--queued .bbai-bulk-progress__log-icon {
	background: rgba(100, 116, 139, 0.14);
	color: #475569;
}

.bbai-bulk-progress__complete {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 4px 0 0;
	text-align: center;
}

.bbai-bulk-progress__complete[hidden],
.bbai-bulk-progress__complete-actions[hidden],
.bbai-bulk-progress__action[hidden],
.bbai-bulk-progress__supporting-line[hidden],
.bbai-bulk-progress__meter-label[hidden],
.bbai-bulk-progress__status-note[hidden] {
	display: none !important;
}

.bbai-bulk-progress__success-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 999px;
	background: rgba(34, 197, 94, 0.14);
	color: #16a34a;
	box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.14), 0 10px 24px rgba(34, 197, 94, 0.12);
	opacity: 0;
	transform: scale(0.88);
	transition: opacity 0.24s ease, transform 0.24s ease;
}

.bbai-bulk-progress__success-check.is-visible {
	opacity: 1;
	transform: scale(1);
}

.bbai-bulk-progress__success-checkmark {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
}

.bbai-bulk-progress__complete-title {
	margin: 0;
	font-size: clamp(1.65rem, 2vw, 2rem);
	line-height: 1.1;
	font-weight: 800;
	color: var(--bbai-text);
	letter-spacing: -0.03em;
}

.bbai-bulk-progress__complete-subtitle {
	margin: 0;
	max-width: 32ch;
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 500;
	color: var(--bbai-text-muted);
}

.bbai-bulk-progress-modal .bbai-modal-footer,
.bbai-bulk-progress__running-actions,
.bbai-bulk-progress__complete-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	width: 100%;
	max-width: 280px;
	margin: 0 auto;
	padding-top: 2px;
}

.bbai-bulk-progress__running-actions[hidden] {
	display: none;
}

.bbai-bulk-progress__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.bbai-bulk-progress__action--primary {
	border: none;
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	box-shadow: 0 14px 28px rgba(34, 197, 94, 0.24);
}

.bbai-bulk-progress__action--primary:hover,
.bbai-bulk-progress__action--primary:focus-visible {
	background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.bbai-bulk-progress__action--secondary {
	border: 1px solid rgba(148, 163, 184, 0.24);
	background: #ffffff;
	color: #0f172a;
}

.bbai-bulk-progress__supporting-line {
	margin: 0;
	max-width: 34ch;
	font-size: 13px;
	line-height: 1.5;
	font-weight: 600;
	color: #64748b;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__header {
	justify-content: flex-end;
	padding-bottom: 0;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__header-text {
	display: none;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__body {
	align-items: center;
	gap: 12px;
	padding: 8px 28px 24px;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__bar-container {
	max-height: 20px;
	opacity: 1;
	transform: translateY(0);
	overflow: visible;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress-modal__content {
	width: min(520px, 100%);
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__steps {
	width: 100%;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 10px;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__step {
	padding: 8px 10px;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__log-container {
	width: 100%;
	padding: 10px 12px;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__log {
	max-height: 92px;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__complete {
	gap: 10px;
	padding-top: 2px;
}

.bbai-bulk-progress-modal[data-bbai-bulk-progress-mode="complete"] .bbai-bulk-progress__success-check {
	width: 56px;
	height: 56px;
}

.bbai-modal--complete .bbai-bulk-progress-modal__content {
	animation: bbai-success 300ms ease-out;
}

@keyframes bbai-success {
	0% { transform: scale(0.98); }
	100% { transform: scale(1); }
}

.bbai-bulk-progress__action:hover:not(:disabled),
.bbai-bulk-progress__action:focus-visible:not(:disabled) {
	transform: translateY(-1px);
}

@media (max-width: 640px) {
	.bbai-bulk-progress-modal {
		padding: 16px;
	}

	.bbai-bulk-progress-modal__content {
		max-height: calc(100vh - 32px);
	}

	.bbai-bulk-progress__header {
		padding: 22px 22px 0;
	}

	.bbai-bulk-progress__body {
		padding: 18px 22px 22px;
	}

	.bbai-bulk-progress__steps {
		grid-template-columns: 1fr;
	}

	.bbai-bulk-progress__stats {
		grid-template-columns: 1fr;
	}

	.bbai-bulk-progress__complete-actions {
		flex-direction: column;
	}

	.bbai-bulk-progress__action {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bbai-bulk-progress-modal,
	.bbai-bulk-progress-modal__content,
	.bbai-bulk-progress__bar-fill,
	.bbai-bulk-progress__success-check {
		transition: none;
	}
}
/* Imported from: _api-notice.css */
/**
 * API Notice Modal
 */
.bbai-api-notice-modal-content { max-width: 600px; }
.bbai-api-notice-body { padding: 24px; }
.bbai-api-notice-text { margin: 0 0 20px 0; color: var(--bbai-gray-700); line-height: 1.6; font-size: var(--bbai-text-sm); }
.bbai-api-notice-box { background: var(--bbai-gray-50); border: 1px solid var(--bbai-gray-200); border-radius: var(--bbai-radius); padding: var(--bbai-space-4); }
.bbai-api-notice-label { margin: 0 0 12px 0; font-weight: var(--bbai-font-semibold); color: var(--bbai-gray-900); font-size: var(--bbai-text-sm); }
.bbai-api-notice-value { margin: 0 0 16px 0; color: var(--bbai-gray-500); font-size: 13px; font-family: var(--bbai-font-mono); word-break: break-all; line-height: 1.5; }
.bbai-api-notice-value:last-child { margin-bottom: 0; }
.bbai-api-notice-link { color: var(--bbai-info); text-decoration: underline; font-size: 13px; }
.bbai-api-notice-link:hover { color: var(--bbai-primary); }
.bbai-api-notice-footer { padding: 20px 24px; border-top: 1px solid var(--bbai-gray-200); text-align: right; background: var(--bbai-bg); }
.bbai-api-notice-footer .button { min-width: 100px; }



/* 17. Miscellaneous */

/* Imported from: _misc.css */
/**
 * Miscellaneous - Footer, accessibility, print, WP admin fixes
 */

/* Footer */
.bbai-footer { text-align: center; padding: 24px 0; margin-top: 48px; border-top: 1px solid var(--bbai-gray-200); color: var(--bbai-gray-500); font-size: 13px; }
.bbai-footer a { color: var(--bbai-primary); text-decoration: none; }
.bbai-footer a:hover { text-decoration: underline; }

/* Unauthenticated */
.bbai-unauth-container { padding: 40px; text-align: center; }
.bbai-unauth-list { text-align: left; display: inline-block; }
.bbai-settings-required-note { margin-top: var(--bbai-space-4); font-size: 12px; color: var(--bbai-gray-500); line-height: 1.5; }
.bbai-settings-required-actions { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Debug */
.bbai-debug-hint { margin-top: 12px; font-size: var(--bbai-text-sm); color: var(--bbai-gray-500); }
.bbai-debug-auth-btn { margin-top: 20px; display: inline-block; }

/* License */
.bbai-settings-license-key { margin-top: var(--bbai-space-2); font-size: var(--bbai-text-xs); color: var(--bbai-gray-500); font-family: var(--bbai-font-mono); word-break: break-all; }
#license-activation-status { display: none; padding: 12px; border-radius: var(--bbai-radius); margin-bottom: var(--bbai-space-4); font-size: var(--bbai-text-sm); }
#license-activation-status.is-visible { display: block; }

/* Print */
@media print { .bbai-modal-backdrop, .bbai-tooltip, .bbai-btn, .bbai-toast-container, .bbai-header { display: none !important; } }

/* Accessibility */
.bbai-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.bbai-focus-visible:focus-visible, .bbai-btn:focus-visible, .bbai-input:focus-visible, .bbai-nav-link:focus-visible { outline: 2px solid var(--bbai-primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
@media (prefers-contrast: high) { :root { --bbai-border: var(--bbai-gray-900); --bbai-text: #000000; } }



/* 18. Guide Tab (How to) */

/* Imported from: _guide.css */
/**
 * Guide Tab - Premium SaaS Onboarding Design
 * Clean, conversion-optimized documentation panel
 *
 * @package BeepBeep_AI
 * @since 8.0.0
 */

/* ============================================
   GUIDE HEADER
   ============================================ */

.bbai-guide-header {
    margin-bottom: var(--bbai-space-6);
}

.bbai-guide-header .bbai-page-title {
    font-size: 28px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
    line-height: 1.3;
}

.bbai-guide-header .bbai-page-subtitle {
    font-size: 14px;
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   PRO FEATURES CARD
   ============================================ */

.bbai-guide-pro-card {
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-xl);
    background: var(--bbai-bg);
}

.bbai-guide-pro-header {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    margin-bottom: var(--bbai-space-5);
}

.bbai-guide-pro-title {
    font-size: 20px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0;
}

.bbai-guide-pro-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--bbai-space-6) 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--bbai-space-3);
}

.bbai-guide-pro-item {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-3) var(--bbai-space-4);
    background: var(--bbai-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--bbai-radius-lg);
    transition: all 0.2s ease;
}

.bbai-guide-pro-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
}

.bbai-guide-pro-item svg {
    flex-shrink: 0;
}

.bbai-guide-pro-item span {
    font-size: 14px;
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text);
    line-height: 1.4;
}

.bbai-guide-pro-cta {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-4);
}

.bbai-guide-pro-cta .bbai-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

/* ============================================
   GETTING STARTED STEPS
   ============================================ */

.bbai-guide-steps-card {
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

.bbai-guide-steps-card .bbai-card-title {
    font-size: 20px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-6) 0;
}

.bbai-guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--bbai-space-5);
}

.bbai-guide-step {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    border-radius: var(--bbai-radius-lg);
    transition: background 0.2s ease;
}

.bbai-guide-step:hover {
    background: var(--bbai-bg-secondary);
}

.bbai-guide-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    color: #ffffff;
    font-size: 16px;
    font-weight: var(--bbai-font-bold);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bbai-guide-step-content {
    flex: 1;
    min-width: 0;
}

.bbai-guide-step-title {
    font-size: 15px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-1) 0;
    line-height: 1.4;
}

.bbai-guide-step-desc {
    font-size: 14px;
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   WHY ALT TEXT MATTERS
   ============================================ */

.bbai-guide-why-card {
    padding: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

.bbai-guide-why-card .bbai-card-title {
    font-size: 20px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-5) 0;
}

.bbai-guide-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--bbai-space-4);
}

.bbai-guide-why-item {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    background: var(--bbai-bg-secondary);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    transition: all 0.2s ease;
}

.bbai-guide-why-item:hover {
    border-color: var(--bbai-gray-300);
    transform: translateY(-2px);
    box-shadow: var(--bbai-shadow-sm);
}

.bbai-guide-why-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bbai-radius-lg);
}

.bbai-guide-why-icon--seo {
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary);
}

.bbai-guide-why-icon--images {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.bbai-guide-why-icon--accessibility {
    background: var(--bbai-info-bg);
    color: var(--bbai-info);
}

.bbai-guide-why-text {
    flex: 1;
    min-width: 0;
}

.bbai-guide-why-text h4 {
    font-size: 15px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-1) 0;
    line-height: 1.4;
}

.bbai-guide-why-text p {
    font-size: 14px;
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   TWO-COLUMN LAYOUT (TIPS & FEATURES)
   ============================================ */

.bbai-guide-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

@media (max-width: 768px) {
    .bbai-guide-two-col {
        grid-template-columns: 1fr;
    }
}

.bbai-guide-tips-card,
.bbai-guide-features-card {
    padding: var(--bbai-space-6);
}

.bbai-guide-tips-card .bbai-card-title,
.bbai-guide-features-card .bbai-card-title {
    font-size: 18px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-5) 0;
}

/* Tips List */
.bbai-guide-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
}

.bbai-guide-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-3);
    border-radius: var(--bbai-radius);
    transition: background 0.2s ease;
}

.bbai-guide-tip:hover {
    background: var(--bbai-bg-secondary);
}

.bbai-guide-tip svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--bbai-success);
    margin-top: 1px;
}

.bbai-guide-tip span {
    font-size: 14px;
    color: var(--bbai-text);
    line-height: 1.5;
}

/* Features List */
.bbai-guide-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
}

.bbai-guide-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-3);
    border-radius: var(--bbai-radius);
    transition: background 0.2s ease;
}

.bbai-guide-feature:hover {
    background: var(--bbai-bg-secondary);
}

.bbai-guide-feature svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--bbai-primary);
    margin-top: 1px;
}

.bbai-guide-feature span {
    font-size: 14px;
    color: var(--bbai-text);
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bbai-space-2);
}

/* Pro Badge (Small) */
.bbai-badge--pro-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--bbai-gray-100);
    color: var(--bbai-gray-600);
    font-size: 10px;
    font-weight: var(--bbai-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--bbai-radius-full);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .bbai-guide-header .bbai-page-title {
        font-size: 24px;
    }

    .bbai-guide-pro-list {
        grid-template-columns: 1fr;
    }

    .bbai-guide-steps {
        grid-template-columns: 1fr;
    }

    .bbai-guide-why-grid {
        grid-template-columns: 1fr;
    }

    .bbai-guide-step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bbai-guide-header .bbai-page-title {
        font-size: 22px;
    }

    .bbai-guide-pro-card,
    .bbai-guide-steps-card,
    .bbai-guide-why-card,
    .bbai-guide-tips-card,
    .bbai-guide-features-card {
        padding: var(--bbai-space-4);
    }
}



/* 19. Tooltips */

/* Imported from: _tooltips.css */
/**
 * Tooltip System
 * Reusable tooltips with data-bbai-tooltip attribute
 */

/* Tooltip Container - only apply help cursor to non-interactive elements */
[data-bbai-tooltip]:not(button):not(a):not(.bbai-btn):not([role="button"]) {
    position: relative;
    cursor: help;
}

/* Buttons with tooltips should keep their natural cursor and display */
button[data-bbai-tooltip],
a[data-bbai-tooltip],
.bbai-btn[data-bbai-tooltip],
[role="button"][data-bbai-tooltip] {
    /* Don't override button styling */
}

/* Ensure disabled buttons with tooltips can still receive pointer events for tooltip display */
button[data-bbai-tooltip]:disabled,
button[disabled][data-bbai-tooltip] {
    pointer-events: auto;
    cursor: not-allowed;
}

/* Tooltip Base */
.bbai-tooltip {
    position: absolute;
    z-index: 10000;
    padding: 8px 12px;
    background: var(--bbai-gray-900);
    color: white;
    font-size: var(--bbai-text-sm);
    line-height: 1.5;
    border-radius: var(--bbai-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    word-wrap: break-word;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity var(--bbai-transition-fast) var(--bbai-ease-out),
                transform var(--bbai-transition-fast) var(--bbai-ease-out);
    white-space: normal;
}

.bbai-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip Arrow */
.bbai-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

/* Tooltip Positions */
.bbai-tooltip--top {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
}

.bbai-tooltip--top::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--bbai-gray-900);
}

.bbai-tooltip--top.show {
    transform: translateX(-50%) translateY(0);
}

.bbai-tooltip--bottom {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}

.bbai-tooltip--bottom::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--bbai-gray-900);
}

.bbai-tooltip--bottom.show {
    transform: translateX(-50%) translateY(0);
}

.bbai-tooltip--left {
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
}

.bbai-tooltip--left::before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--bbai-gray-900);
}

.bbai-tooltip--left.show {
    transform: translateY(-50%) translateX(0);
}

.bbai-tooltip--right {
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}

.bbai-tooltip--right::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--bbai-gray-900);
}

.bbai-tooltip--right.show {
    transform: translateY(-50%) translateX(0);
}

/* Help Icon */
.bbai-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    color: var(--bbai-text-muted);
    cursor: help;
    vertical-align: middle;
    transition: color var(--bbai-transition-fast);
}

.bbai-help-icon:hover {
    color: var(--bbai-primary);
}

.bbai-help-icon svg {
    width: 100%;
    height: 100%;
}

/* Tooltip with Rich Content */
.bbai-tooltip--rich {
    max-width: 320px;
    padding: 12px;
}

.bbai-tooltip--rich .bbai-tooltip-title {
    font-weight: var(--bbai-font-semibold);
    margin-bottom: 6px;
    color: white;
}

.bbai-tooltip--rich .bbai-tooltip-content {
    font-size: var(--bbai-text-xs);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* Dark Mode Support */
[data-theme="dark"] .bbai-tooltip,
.bbai-dark-mode .bbai-tooltip {
    background: var(--bbai-gray-800);
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-tooltip--top::before,
.bbai-dark-mode .bbai-tooltip--top::before {
    border-top-color: var(--bbai-gray-800);
}

[data-theme="dark"] .bbai-tooltip--bottom::before,
.bbai-dark-mode .bbai-tooltip--bottom::before {
    border-bottom-color: var(--bbai-gray-800);
}

[data-theme="dark"] .bbai-tooltip--left::before,
.bbai-dark-mode .bbai-tooltip--left::before {
    border-left-color: var(--bbai-gray-800);
}

[data-theme="dark"] .bbai-tooltip--right::before,
.bbai-dark-mode .bbai-tooltip--right::before {
    border-right-color: var(--bbai-gray-800);
}

/* Keyboard Shortcut Cheat Sheet Modal */
.bbai-shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--bbai-transition-base);
}

.bbai-shortcuts-modal.show {
    opacity: 1;
    pointer-events: all;
}

.bbai-shortcuts-modal-content {
    background: white;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform var(--bbai-transition-base);
}

.bbai-shortcuts-modal.show .bbai-shortcuts-modal-content {
    transform: scale(1);
}

.bbai-shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--bbai-space-6);
}

.bbai-shortcuts-title {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
}

.bbai-shortcuts-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--bbai-text-muted);
    transition: color var(--bbai-transition-fast);
}

.bbai-shortcuts-close:hover {
    color: var(--bbai-text);
}

.bbai-shortcuts-list {
    display: grid;
    gap: var(--bbai-space-4);
}

.bbai-shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bbai-space-3);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius);
    transition: background var(--bbai-transition-fast);
}

.bbai-shortcut-item:hover {
    background: var(--bbai-gray-100);
}

.bbai-shortcut-description {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
}

.bbai-shortcut-keys {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bbai-shortcut-key {
    padding: 4px 8px;
    background: white;
    border: 1px solid var(--bbai-gray-300);
    border-radius: 4px;
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    font-family: monospace;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bbai-shortcut-key--plus {
    color: var(--bbai-text-muted);
    font-size: var(--bbai-text-sm);
    padding: 0 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .bbai-tooltip {
        max-width: 240px;
        font-size: var(--bbai-text-xs);
    }

    .bbai-shortcuts-modal-content {
        padding: var(--bbai-space-6);
    }
}



/* 20. Toast Notifications */

/* Imported from: _toast.css */
/**
 * Toast Notification System
 * Accessible, branded toast notifications
 */

/* Toast Container */
.bbai-toast-container {
    position: fixed;
    top: var(--bbai-space-6);
    right: var(--bbai-space-6);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* Toast Base */
.bbai-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-4);
    background: white;
    border-radius: var(--bbai-radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--bbai-gray-300);
    min-width: 300px;
    max-width: 100%;
    opacity: 0;
    transform: translateX(400px);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    pointer-events: all;
    position: relative;
}

.bbai-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.bbai-toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Toast Types */
.bbai-toast--success {
    border-left-color: var(--bbai-success);
    background: linear-gradient(to right, #f0fdf4 0%, white 8%);
}

.bbai-toast--error {
    border-left-color: var(--bbai-error);
    background: linear-gradient(to right, #fef2f2 0%, white 8%);
}

.bbai-toast--warning {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb 0%, white 8%);
}

.bbai-toast--info {
    border-left-color: var(--bbai-primary);
    background: linear-gradient(to right, #ecfdf5 0%, white 8%);
}

/* Toast Icon */
.bbai-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.bbai-toast--success .bbai-toast-icon {
    color: var(--bbai-success);
}

.bbai-toast--error .bbai-toast-icon {
    color: var(--bbai-error);
}

.bbai-toast--warning .bbai-toast-icon {
    color: #f59e0b;
}

.bbai-toast--info .bbai-toast-icon {
    color: var(--bbai-primary);
}

/* Toast Content */
.bbai-toast-content {
    flex: 1;
    min-width: 0;
}

.bbai-toast-message {
    font-size: var(--bbai-text-sm);
    font-weight: 600;
    line-height: 1.5;
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-toast-action {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bbai-primary);
    color: white;
    border: none;
    border-radius: var(--bbai-radius);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    cursor: pointer;
    transition: background var(--bbai-transition-fast);
    margin-top: var(--bbai-space-2);
}

.bbai-toast-action:hover {
    background: var(--bbai-primary-hover);
}

/* Toast Close Button */
.bbai-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--bbai-text-muted);
    transition: color var(--bbai-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--bbai-radius);
}

.bbai-toast-close:hover {
    color: var(--bbai-text);
    background: var(--bbai-gray-100);
}

/* Stacking Animation */
.bbai-toast-container .bbai-toast:nth-child(n+2) {
    margin-top: calc(var(--bbai-space-3) * -1);
}

/* Responsive */
@media (max-width: 768px) {
    .bbai-toast-container {
        top: var(--bbai-space-4);
        right: var(--bbai-space-4);
        left: var(--bbai-space-4);
        max-width: none;
    }

    .bbai-toast {
        min-width: auto;
        width: 100%;
    }

    .bbai-toast {
        transform: translateY(-100px);
    }

    .bbai-toast.show {
        transform: translateY(0);
    }

    .bbai-toast.hide {
        transform: translateY(-100px);
    }
}

/* Dark Mode */
[data-theme="dark"] .bbai-toast,
.bbai-dark-mode .bbai-toast {
    background: var(--bbai-gray-800);
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-toast-message,
.bbai-dark-mode .bbai-toast-message {
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-toast-close,
.bbai-dark-mode .bbai-toast-close {
    color: var(--bbai-gray-400);
}

[data-theme="dark"] .bbai-toast-close:hover,
.bbai-dark-mode .bbai-toast-close:hover {
    color: var(--bbai-gray-200);
    background: var(--bbai-gray-700);
}



/* 21. Onboarding */

/* Imported from: _onboarding.css */
/**
 * Onboarding Modal Styles
 * Welcome tour for first-time users
 */

/* Onboarding Modal */
.bbai-onboarding-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--bbai-transition-base);
}

.bbai-onboarding-modal[style*="display: block"],
.bbai-onboarding-modal.show {
    opacity: 1;
    pointer-events: all;
}

.bbai-onboarding-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bbai-onboarding-modal-content {
    position: relative;
    background: white;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform var(--bbai-transition-base);
}

.bbai-onboarding-modal.show .bbai-onboarding-modal-content {
    transform: scale(1);
}

/* Onboarding Steps */
.bbai-onboarding-step {
    display: none;
}

.bbai-onboarding-step--active {
    display: block;
}

/* Onboarding Header */
.bbai-onboarding-header {
    text-align: center;
    margin-bottom: var(--bbai-space-8);
}

.bbai-onboarding-icon {
    margin: 0 auto var(--bbai-space-4);
    width: 80px;
    height: 80px;
}

.bbai-onboarding-title {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-onboarding-subtitle {
    font-size: var(--bbai-text-base);
    color: var(--bbai-text-muted);
    line-height: 1.6;
}

/* Onboarding Body */
.bbai-onboarding-body {
    margin-bottom: var(--bbai-space-8);
}

.bbai-onboarding-features {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-4);
}

.bbai-onboarding-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-4);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius-lg);
}

.bbai-onboarding-feature svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.bbai-onboarding-feature span {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    line-height: 1.6;
}

/* Checklist */
.bbai-onboarding-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-6);
}

.bbai-onboarding-checklist-item {
    display: flex;
    gap: var(--bbai-space-4);
    align-items: flex-start;
}

.bbai-onboarding-checklist-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--bbai-primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--bbai-font-bold);
    font-size: var(--bbai-text-lg);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bbai-onboarding-checklist-content h3 {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-1);
}

.bbai-onboarding-checklist-content p {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Features Grid */
.bbai-onboarding-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--bbai-space-4);
}

.bbai-onboarding-feature-card {
    text-align: center;
    padding: var(--bbai-space-4);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius-lg);
    transition: transform var(--bbai-transition-fast), box-shadow var(--bbai-transition-fast);
}

.bbai-onboarding-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bbai-onboarding-feature-icon {
    margin: 0 auto var(--bbai-space-3);
    color: var(--bbai-primary);
}

.bbai-onboarding-feature-card h3 {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-onboarding-feature-card p {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Onboarding Footer */
.bbai-onboarding-footer {
    display: flex;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    padding-top: var(--bbai-space-6);
    border-top: 1px solid var(--bbai-gray-200);
}

/* Progress Indicator */
.bbai-onboarding-progress {
    margin-top: var(--bbai-space-6);
    padding-top: var(--bbai-space-6);
    border-top: 1px solid var(--bbai-gray-200);
}

.bbai-onboarding-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    margin-bottom: var(--bbai-space-4);
}

.bbai-onboarding-progress-fill {
    height: 100%;
    background: var(--bbai-primary-gradient);
    border-radius: var(--bbai-radius-full);
    transition: width var(--bbai-transition-base);
}

.bbai-onboarding-progress-steps {
    display: flex;
    justify-content: center;
    gap: var(--bbai-space-4);
}

.bbai-onboarding-progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bbai-gray-200);
    color: var(--bbai-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--bbai-font-semibold);
    font-size: var(--bbai-text-sm);
    transition: all var(--bbai-transition-fast);
}

.bbai-onboarding-progress-step--active {
    background: var(--bbai-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .bbai-onboarding-modal-content {
        padding: var(--bbai-space-6);
        max-height: 90vh;
    }

    .bbai-onboarding-features-grid {
        grid-template-columns: 1fr;
    }

    .bbai-onboarding-footer {
        flex-direction: column-reverse;
    }

    .bbai-onboarding-footer .bbai-btn {
        width: 100%;
    }
}

/* Dark Mode */
[data-theme="dark"] .bbai-onboarding-modal-content,
.bbai-dark-mode .bbai-onboarding-modal-content {
    background: var(--bbai-gray-800);
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-onboarding-title,
.bbai-dark-mode .bbai-onboarding-title {
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-onboarding-feature,
[data-theme="dark"] .bbai-onboarding-feature-card,
.bbai-dark-mode .bbai-onboarding-feature,
.bbai-dark-mode .bbai-onboarding-feature-card {
    background: var(--bbai-gray-700);
}



/* 22. Social Proof */

/* Imported from: _social-proof.css */
/**
 * Social Proof Widget Styles
 * Testimonials, trust badges, and usage stats
 */

/* Social Proof Widget Container */
.bbai-social-proof-widget {
    margin: var(--bbai-space-8) 0 var(--bbai-space-6);
    background: #f8fafc;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: box-shadow var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-social-proof-widget:hover {
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

/* Trust Badges */
.bbai-trust-badges {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-5) var(--bbai-space-6);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.bbai-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    font-size: 14px;
    font-weight: var(--bbai-font-semibold);
    color: #1f2937;
    min-height: 44px;
}

.bbai-trust-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    flex-shrink: 0;
}

.bbai-trust-badge-icon svg {
    width: 18px;
    height: 18px;
}

.bbai-trust-badge-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.bbai-trust-badge-title {
    font-size: 14px;
    font-weight: var(--bbai-font-semibold);
    color: #1f2937;
}

.bbai-trust-badge-subtitle {
    font-size: 12px;
    color: #64748b;
    font-weight: var(--bbai-font-medium);
}

.bbai-trust-badge--gdpr .bbai-trust-badge-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.bbai-trust-badge--uptime .bbai-trust-badge-icon {
    background: rgba(245, 158, 11, 0.16);
    color: #f59e0b;
}

.bbai-trust-badge--users .bbai-trust-badge-icon {
    background: rgba(20, 184, 166, 0.14);
    color: #14b8a6;
}

/* Testimonials Carousel */
.bbai-testimonials-carousel {
    padding: var(--bbai-space-6);
    background: #f8fafc;
    --bbai-testimonial-columns: 3;
    --bbai-testimonial-gap: var(--bbai-space-4);
}

.bbai-testimonials-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.bbai-testimonials-viewport::-webkit-scrollbar {
    display: none;
}

.bbai-testimonials-track {
    display: flex;
    gap: var(--bbai-testimonial-gap);
    align-items: stretch;
    padding: 4px 2px 12px;
}

.bbai-testimonial-card {
    flex: 0 0 calc((100% - (var(--bbai-testimonial-gap) * (var(--bbai-testimonial-columns) - 1))) / var(--bbai-testimonial-columns));
    scroll-snap-align: start;
    transition: transform var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-testimonial-card:hover {
    transform: translateY(-4px);
}

.bbai-testimonial-card.active .bbai-testimonial-shell {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.bbai-testimonial-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-5);
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: border-color var(--bbai-transition-base) var(--bbai-ease-out),
        box-shadow var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-3);
}

.bbai-testimonial-avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bbai-testimonial-avatar img,
.bbai-testimonial-avatar .bbai-testimonial-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.bbai-testimonial-quote {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
    font-size: 15px;
    line-height: 1.6;
    color: #0f172a;
    font-weight: var(--bbai-font-medium);
}

.bbai-testimonial-quote p {
    margin: 0;
}

.bbai-testimonial-quote-mark {
    font-size: 32px;
    line-height: 1;
    color: rgba(148, 163, 184, 0.7);
    font-family: Georgia, serif;
}

.bbai-testimonial-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-2);
}

.bbai-testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bbai-testimonial-author-name {
    font-size: 16px;
    font-weight: var(--bbai-font-semibold);
    color: #0f172a;
}

.bbai-testimonial-author-role {
    font-size: 13px;
    color: #64748b;
}

.bbai-testimonial-stars {
    display: flex;
    gap: 4px;
    color: #fbbf24;
}

.bbai-testimonial-star.is-empty {
    opacity: 0.3;
}

.bbai-testimonial-tagline {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.bbai-testimonial-avatar-fallback {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonials Controls */
.bbai-testimonials-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--bbai-space-4);
    margin-top: var(--bbai-space-5);
    padding: 0 var(--bbai-space-2);
}

.bbai-testimonials-dots {
    display: flex;
    gap: var(--bbai-space-2);
    align-items: center;
    justify-content: center;
}

.bbai-testimonials-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5f5;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-testimonials-dot.active {
    background: #64748b;
    width: 26px;
}

.bbai-testimonials-dot:hover {
    background: #475569;
}

.bbai-testimonials-arrows {
    display: flex;
    gap: var(--bbai-space-2);
    align-items: center;
}

.bbai-testimonials-prev,
.bbai-testimonials-next {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.bbai-testimonials-prev:focus-visible,
.bbai-testimonials-next:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.bbai-testimonials-prev:hover,
.bbai-testimonials-next:hover {
    background: #f1f5f9;
    border-color: #cbd5f5;
    color: #0f172a;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 980px) {
    .bbai-trust-badges {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bbai-testimonials-carousel {
        --bbai-testimonial-columns: 2;
    }
}

@media (max-width: 640px) {
    .bbai-social-proof-widget {
        border-radius: 20px;
    }

    .bbai-trust-badges {
        grid-template-columns: 1fr;
        padding: var(--bbai-space-4);
    }

    .bbai-testimonials-carousel {
        padding: var(--bbai-space-4);
        --bbai-testimonial-columns: 1;
    }

    .bbai-testimonial-shell {
        padding: var(--bbai-space-4);
    }

    .bbai-testimonial-avatar {
        width: 48px;
        height: 48px;
    }

    .bbai-testimonial-quote {
        font-size: 14px;
    }

    .bbai-testimonials-controls {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: var(--bbai-space-3);
    }
}

/* Dark Mode */
[data-theme="dark"] .bbai-social-proof-widget,
.bbai-dark-mode .bbai-social-proof-widget {
    background: #0f172a;
    border-color: #1f2937;
    box-shadow: none;
}

[data-theme="dark"] .bbai-trust-badges,
.bbai-dark-mode .bbai-trust-badges {
    background: #0f172a;
    border-bottom-color: #1f2937;
}

[data-theme="dark"] .bbai-trust-badge,
.bbai-dark-mode .bbai-trust-badge {
    background: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
    box-shadow: none;
}

[data-theme="dark"] .bbai-trust-badge-title,
.bbai-dark-mode .bbai-trust-badge-title {
    color: #f8fafc;
}

[data-theme="dark"] .bbai-trust-badge-subtitle,
.bbai-dark-mode .bbai-trust-badge-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .bbai-testimonial-shell,
.bbai-dark-mode .bbai-testimonial-shell {
    background: #0b1220;
    border-color: #1f2937;
    box-shadow: none;
}

[data-theme="dark"] .bbai-testimonial-quote,
.bbai-dark-mode .bbai-testimonial-quote {
    color: #e2e8f0;
}

[data-theme="dark"] .bbai-testimonial-quote-mark,
.bbai-dark-mode .bbai-testimonial-quote-mark {
    color: rgba(148, 163, 184, 0.5);
}

[data-theme="dark"] .bbai-testimonial-author-name,
.bbai-dark-mode .bbai-testimonial-author-name {
    color: #f8fafc;
}

[data-theme="dark"] .bbai-testimonial-author-role,
[data-theme="dark"] .bbai-testimonial-tagline,
.bbai-dark-mode .bbai-testimonial-author-role,
.bbai-dark-mode .bbai-testimonial-tagline {
    color: #94a3b8;
}

[data-theme="dark"] .bbai-testimonial-avatar,
.bbai-dark-mode .bbai-testimonial-avatar {
    background: #1f2937;
}

[data-theme="dark"] .bbai-testimonials-prev,
[data-theme="dark"] .bbai-testimonials-next,
.bbai-dark-mode .bbai-testimonials-prev,
.bbai-dark-mode .bbai-testimonials-next {
    background: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
    box-shadow: none;
}

[data-theme="dark"] .bbai-testimonials-dot,
.bbai-dark-mode .bbai-testimonials-dot {
    background: #475569;
}

[data-theme="dark"] .bbai-testimonials-dot.active,
.bbai-dark-mode .bbai-testimonials-dot.active {
    background: #e2e8f0;
}



/* 23. Celebrations */

/* Imported from: _celebrations.css */
/**
 * Celebrations & Milestones
 * Confetti, milestone badges, and success animations
 */

/* Confetti Container */
.bbai-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100000;
    overflow: hidden;
}

.bbai-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    border-radius: 2px;
    animation: bbai-confetti-fall linear forwards;
}

@keyframes bbai-confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Milestone Badge */
.bbai-milestone-badge {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-milestone-badge.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.bbai-milestone-badge-content {
    background: white;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.bbai-milestone-badge-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bbai-primary-gradient);
}

.bbai-milestone-badge-icon {
    font-size: 64px;
    margin-bottom: var(--bbai-space-4);
    animation: bbai-bounce-celebration 0.6s ease-out;
}

@keyframes bbai-bounce-celebration {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.bbai-milestone-badge-title {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-milestone-badge-message {
    font-size: var(--bbai-text-base);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-6);
}

.bbai-milestone-badge-close {
    background: var(--bbai-primary);
    color: white;
    border: none;
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-3) var(--bbai-space-6);
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    cursor: pointer;
    transition: all var(--bbai-transition-fast);
}

.bbai-milestone-badge-close:hover {
    background: var(--bbai-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Progress Celebration */
.bbai-progress-celebration {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-4);
    background: var(--bbai-success-light);
    border-radius: var(--bbai-radius-full);
    color: var(--bbai-success);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    animation: bbai-slide-in-right 0.5s ease-out;
}

@keyframes bbai-slide-in-right {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark Mode */
[data-theme="dark"] .bbai-milestone-badge-content,
.bbai-dark-mode .bbai-milestone-badge-content {
    background: var(--bbai-gray-800);
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-milestone-badge-title,
.bbai-dark-mode .bbai-milestone-badge-title {
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-milestone-badge-message,
.bbai-dark-mode .bbai-milestone-badge-message {
    color: var(--bbai-gray-300);
}



/* 24. SEO Analytics */

/* Imported from: _seo-analytics.css */
/**
 * SEO Analytics & Impact Visualization
 * SEO score, Google Images ranking, accessibility meters
 */

/* SEO Impact Card */
.bbai-seo-impact-card {
    margin-bottom: var(--bbai-space-8);
}

.bbai-seo-impact-card .bbai-card-body {
    padding-top: var(--bbai-space-2);
}

.bbai-seo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--bbai-space-5);
    margin-bottom: var(--bbai-space-6);
}

.bbai-seo-metric {
    padding: var(--bbai-space-5);
    background: var(--bbai-bg-secondary);
    border-radius: var(--bbai-radius-xl);
    border: 1px solid var(--bbai-border);
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-seo-metric:hover {
    border-color: var(--bbai-primary-light);
    box-shadow: var(--bbai-shadow-sm);
    transform: translateY(-2px);
}

.bbai-seo-metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--bbai-space-3);
}

.bbai-seo-metric-label {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbai-seo-trend-up {
    color: var(--bbai-success);
}

.bbai-seo-metric-value {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
    line-height: 1;
}

.bbai-seo-metric-progress {
    width: 100%;
    height: 8px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    margin-bottom: var(--bbai-space-3);
}

.bbai-seo-metric-progress-bar {
    height: 100%;
    background: var(--bbai-primary-gradient);
    border-radius: var(--bbai-radius-full);
    transition: width var(--bbai-transition-base);
}

.bbai-seo-metric-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: var(--bbai-space-3);
    display: inline-block;
}

.bbai-seo-metric-description {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Coverage Summary */
.bbai-seo-coverage-summary {
    display: flex;
    justify-content: space-around;
    padding: var(--bbai-space-5);
    background: var(--bbai-primary-soft);
    border-radius: var(--bbai-radius-xl);
    border: 1px solid var(--bbai-primary-light);
    margin-top: var(--bbai-space-4);
}

.bbai-seo-coverage-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-1);
}

.bbai-seo-coverage-value {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-primary);
    line-height: 1;
}

.bbai-seo-coverage-label {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .bbai-seo-metrics-grid {
        grid-template-columns: 1fr;
    }

    .bbai-seo-coverage-summary {
        flex-direction: column;
        gap: var(--bbai-space-4);
    }
}

/* Dark Mode */
[data-theme="dark"] .bbai-seo-metric,
.bbai-dark-mode .bbai-seo-metric {
    background: var(--bbai-gray-800);
    border-color: var(--bbai-gray-700);
}

[data-theme="dark"] .bbai-seo-coverage-summary,
.bbai-dark-mode .bbai-seo-coverage-summary {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}



/* 25. Quality Insights */

/* Imported from: _quality-insights.css */
/**
 * Quality Insights Styles
 * Quality badges, hints, and improvement suggestions
 */

/* Quality Badge */
.bbai-quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--bbai-radius-full);
    border: 1px solid transparent;
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: var(--bbai-space-2);
}

.bbai-quality-badge--excellent {
    background: var(--bbai-status-score-excellent-bg, #dcfce7);
    color: var(--bbai-status-score-excellent-fg, #14532d);
    border: 1px solid var(--bbai-status-score-excellent-border, rgba(22, 163, 74, 0.22));
}

.bbai-quality-badge--good {
    background: var(--bbai-status-score-good-bg, #ecfdf5);
    color: var(--bbai-status-score-good-fg, #166534);
    border: 1px solid var(--bbai-status-score-good-border, rgba(16, 185, 129, 0.28));
}

.bbai-quality-badge--needs-review,
.bbai-quality-badge--fair {
    background: var(--bbai-status-score-needs-improvement-bg, #fef3c7);
    color: var(--bbai-status-score-needs-improvement-fg, #92400e);
    border: 1px solid var(--bbai-status-score-needs-improvement-border, rgba(245, 158, 11, 0.32));
}

.bbai-quality-badge--poor {
    background: var(--bbai-status-score-poor-bg, #ffedd5);
    color: var(--bbai-status-score-poor-fg, #9a3412);
    border: 1px solid var(--bbai-status-score-poor-border, rgba(234, 88, 12, 0.35));
}

.bbai-quality-badge--critical {
    background: var(--bbai-status-score-critical-bg, #ffe4e6);
    color: var(--bbai-status-score-critical-fg, #9f1239);
    border: 1px solid var(--bbai-status-score-critical-border, rgba(244, 63, 94, 0.35));
}

/* Quality Hints */
.bbai-quality-hint {
    display: inline-flex;
    align-items: center;
    color: var(--bbai-warning);
    cursor: help;
    margin-left: var(--bbai-space-1);
}

.bbai-quality-insights {
    display: flex;
    align-items: center;
    margin-top: var(--bbai-space-2);
    flex-wrap: wrap;
    gap: var(--bbai-space-2);
}

/* Quality Suggestions */
.bbai-quality-suggestions {
    margin-top: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius-lg);
    border-left: 4px solid var(--bbai-primary);
}

.bbai-quality-suggestions-title {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-3);
}

.bbai-quality-suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bbai-quality-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-quality-suggestion-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--bbai-primary);
}

/* Dark Mode */
[data-theme="dark"] .bbai-quality-suggestions,
.bbai-dark-mode .bbai-quality-suggestions {
    background: var(--bbai-gray-800);
    border-left-color: var(--bbai-primary);
}

[data-theme="dark"] .bbai-quality-badge--excellent,
.bbai-dark-mode .bbai-quality-badge--excellent {
    background: rgba(4, 120, 87, 0.28);
    color: #6ee7b7;
}

[data-theme="dark"] .bbai-quality-badge--good,
.bbai-dark-mode .bbai-quality-badge--good {
    background: rgba(27, 138, 90, 0.22);
    color: #9de7c3;
}

[data-theme="dark"] .bbai-quality-badge--needs-review,
[data-theme="dark"] .bbai-quality-badge--fair,
.bbai-dark-mode .bbai-quality-badge--needs-review,
.bbai-dark-mode .bbai-quality-badge--fair {
    background: rgba(162, 109, 0, 0.26);
    color: #ffd782;
}

[data-theme="dark"] .bbai-quality-badge--poor,
.bbai-dark-mode .bbai-quality-badge--poor {
    background: rgba(192, 43, 43, 0.25);
    color: #ff9a9a;
}

[data-theme="dark"] .bbai-quality-badge--critical,
.bbai-dark-mode .bbai-quality-badge--critical {
    background: rgba(190, 18, 60, 0.28);
    color: #fecdd3;
}



/* 26. Analytics */

/* Imported from: _analytics.css */
/**
 * Analytics Dashboard Styles
 * Charts, timelines, and data visualization
 */

/* Analytics Container */
.bbai-analytics-container {
    max-width: var(--bbai-dashboard-max-width);
    margin: 0 auto;
}

/* Bottom row: Before & After + Recent Activity - equal height cards */
.bbai-analytics-bottom-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.bbai-analytics-bottom-row .bbai-dashboard-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

@media (max-width: 1400px) {
    .bbai-analytics-bottom-row {
        flex-wrap: wrap;
    }

    .bbai-analytics-bottom-row .bbai-dashboard-card {
        flex: 1 1 calc(50% - 12px);
        min-width: 280px;
    }
}

@media (max-width: 1024px) {
    .bbai-analytics-bottom-row {
        flex-direction: column;
    }

    .bbai-analytics-bottom-row .bbai-dashboard-card {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .bbai-analytics-bottom-row {
        flex-direction: column;
        gap: var(--bbai-space-6);
    }

    .bbai-analytics-bottom-row .bbai-dashboard-card {
        flex: 1 1 100%;
    }
}

/* Chart Container */
.bbai-chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: var(--bbai-space-6);
    padding: var(--bbai-space-4);
    background: linear-gradient(to bottom, rgba(249, 250, 251, 0.5), transparent);
    border-radius: var(--bbai-radius-lg);
}

.bbai-chart-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Chart Empty State */
.bbai-chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-16) var(--bbai-space-6);
    text-align: center;
}

.bbai-chart-empty-icon {
    color: var(--bbai-text-muted);
    opacity: 0.4;
    margin-bottom: var(--bbai-space-4);
}

.bbai-chart-empty-text {
    font-size: var(--bbai-text-base);
    color: var(--bbai-text-muted);
    margin: 0;
    max-width: 400px;
}

.bbai-chart-insight {
    margin-top: var(--bbai-space-3);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

/* Card Header with Action Button */
.bbai-card-header--with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-4);
}

/* Chart Legend */
.bbai-chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--bbai-space-4);
    flex-wrap: wrap;
    margin-top: var(--bbai-space-2);
}

.bbai-chart-legend-item {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: inline-block;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

/* Activity Timeline */
.bbai-activity-timeline {
    position: relative;
    padding-left: var(--bbai-space-6);
}

.bbai-activity-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bbai-gray-200);
}

.bbai-activity-item {
    position: relative;
    padding-bottom: var(--bbai-space-6);
    padding-left: var(--bbai-space-6);
}

.bbai-activity-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bbai-primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--bbai-gray-200);
}

.bbai-activity-item:last-child {
    padding-bottom: 0;
}

.bbai-activity-time {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-1);
}

.bbai-activity-description {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    line-height: 1.5;
}

.bbai-activity-empty {
    text-align: center;
    padding: var(--bbai-space-12);
    color: var(--bbai-text-muted);
}

.bbai-activity-empty svg {
    opacity: 0.5;
}

/* Activity Item - Flex layout for icon + content */
.bbai-activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    position: relative;
    padding-bottom: var(--bbai-space-4);
    padding-left: 0;
}

.bbai-activity-item.is-hidden {
    display: none;
}

.bbai-activity-item::before {
    display: none; /* Remove the dot since we have icons now */
}

.bbai-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--bbai-gray-100);
    color: var(--bbai-text-muted);
}

.bbai-activity-icon svg {
    width: 16px;
    height: 16px;
}

.bbai-activity-icon--success {
    background: #dcfce7;
    color: #16a34a;
}

.bbai-activity-icon--warning {
    background: #fef3c7;
    color: #d97706;
}

.bbai-activity-icon--default {
    background: #e0f2fe;
    color: #0284c7;
}

.bbai-activity-content {
    flex: 1;
    min-width: 0;
}

.bbai-activity-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--bbai-space-2);
    flex-wrap: wrap;
    margin-bottom: var(--bbai-space-1);
}

.bbai-activity-title {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text);
    margin: 0;
    font-weight: var(--bbai-font-medium);
}

.bbai-activity-time {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    white-space: nowrap;
}

.bbai-activity-description {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Reset timeline line for new layout */
.bbai-activity-timeline {
    padding-left: 0;
}

.bbai-activity-timeline::before {
    display: none;
}

/* Activity Toggle Button */
.bbai-activity-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-1);
    width: 100%;
    padding: var(--bbai-space-3) var(--bbai-space-4);
    margin-top: var(--bbai-space-2);
    background: var(--bbai-gray-50);
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-md);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-text-muted);
    cursor: pointer;
    transition: all var(--bbai-transition-base);
}

.bbai-activity-toggle:hover {
    background: var(--bbai-gray-100);
    color: var(--bbai-text);
    border-color: var(--bbai-gray-300);
}

.bbai-toggle-icon {
    font-size: 10px;
    line-height: 1;
    transition: transform var(--bbai-transition-base);
}

.bbai-activity-toggle.is-expanded .bbai-toggle-icon {
    transform: rotate(180deg);
}

/* Usage Breakdown */
.bbai-usage-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--bbai-space-6);
}

.bbai-usage-breakdown-item {
    text-align: center;
    padding: var(--bbai-space-4);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius-lg);
}

.bbai-usage-breakdown-label {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbai-usage-breakdown-value {
    font-size: var(--bbai-text-3xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-primary);
    line-height: 1;
    margin-bottom: var(--bbai-space-2);
}

.bbai-usage-breakdown-total {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
}

/* Comparison Grid */
.bbai-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

.bbai-comparison-item {
    padding: var(--bbai-space-6);
    border-radius: var(--bbai-radius-lg);
    text-align: center;
    border: 2px solid var(--bbai-gray-200);
}

.bbai-comparison-item--before {
    background: #fef2f2;
    border-color: var(--bbai-error);
}

.bbai-comparison-item--after {
    background: #f0fdf4;
    border-color: var(--bbai-success);
}

.bbai-comparison-label {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbai-comparison-value {
    font-size: var(--bbai-text-4xl);
    font-weight: var(--bbai-font-bold);
    line-height: 1;
    margin-bottom: var(--bbai-space-2);
}

.bbai-comparison-item--before .bbai-comparison-value {
    color: var(--bbai-error);
}

.bbai-comparison-item--after .bbai-comparison-value {
    color: var(--bbai-success);
}

.bbai-comparison-description {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-comparison-improvement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-4);
    background: var(--bbai-primary-soft);
    border-radius: var(--bbai-radius-lg);
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-primary);
}

/* Period Selector */
.bbai-period-selector {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--bbai-border);
    border-radius: var(--bbai-radius-lg);
    background: var(--bbai-bg);
    font-size: var(--bbai-text-xs);
}

.bbai-period-btn {
    padding: var(--bbai-space-2) var(--bbai-space-4);
    border: none;
    background: transparent;
    color: var(--bbai-text-muted);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-medium);
    cursor: pointer;
    transition: all var(--bbai-transition-base);
    border-left: 1px solid var(--bbai-border);
}

.bbai-period-btn:first-child {
    border-left: none;
}

.bbai-period-btn:hover {
    background: var(--bbai-gray-50);
    color: var(--bbai-text);
}

.bbai-period-btn--active,
.bbai-period-btn[aria-pressed="true"] {
    background: var(--bbai-gray-50);
    color: var(--bbai-text);
    font-weight: var(--bbai-font-semibold);
}

.bbai-period-btn:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* Usage Breakdown Grid - Updated for 4 columns */
.bbai-usage-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--bbai-space-6);
}

@media (max-width: 1024px) {
    .bbai-usage-breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bbai-usage-breakdown-grid {
        grid-template-columns: 1fr;
    }
}

/* Usage Breakdown Item - Updated styling */
.bbai-usage-breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bbai-space-3);
    padding: var(--bbai-space-5);
    background: var(--bbai-gray-50);
    border-radius: var(--bbai-radius-lg);
    text-align: center;
}

.bbai-usage-breakdown-item .bbai-metric-icon {
    margin-bottom: 0;
}

.bbai-usage-breakdown-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bbai-space-1);
}

.bbai-usage-breakdown-value .bbai-usage-breakdown-total {
    font-size: var(--bbai-text-xs);
    color: var(--bbai-text-muted);
    font-weight: var(--bbai-font-normal);
}

/* Comparison Grid - 2 column layout */
.bbai-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--bbai-space-6);
    margin-bottom: var(--bbai-space-6);
}

@media (max-width: 768px) {
    .bbai-comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .bbai-usage-breakdown-grid,
    .bbai-comparison-grid {
        grid-template-columns: 1fr;
    }

    .bbai-chart-container {
        height: 200px;
    }

    .bbai-period-selector {
        flex-wrap: wrap;
    }
}

/* Loading State */
.bbai-activity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-12);
    gap: var(--bbai-space-3);
    color: var(--bbai-text-muted);
}

.bbai-activity-loading p {
    margin: 0;
    font-size: var(--bbai-text-sm);
}

/* Spinner */
.bbai-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--bbai-gray-200);
    border-top-color: var(--bbai-primary);
    border-radius: 50%;
    animation: bbai-spin 0.8s linear infinite;
}

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

/* Icon Button */
.bbai-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--bbai-space-2);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--bbai-radius-md);
    color: var(--bbai-text-muted);
    cursor: pointer;
    transition: all var(--bbai-transition-base);
}

.bbai-icon-btn:hover {
    background: var(--bbai-gray-100);
    color: var(--bbai-text);
    border-color: var(--bbai-border);
}

.bbai-icon-btn:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

.bbai-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bbai-icon-btn-sm {
    padding: var(--bbai-space-1);
}

.bbai-icon-btn-sm svg {
    width: 16px;
    height: 16px;
}

/* Spinning animation for refresh button */
.bbai-icon-btn.bbai-spinning svg {
    animation: bbai-spin 0.8s linear infinite;
}

/* Improved Empty State */
.bbai-activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--bbai-space-12);
    color: var(--bbai-text-muted);
}

.bbai-activity-empty svg {
    opacity: 0.4;
    color: var(--bbai-text-muted);
}

.bbai-empty-title {
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin: 0 0 var(--bbai-space-2) 0;
}

.bbai-empty-description {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
    margin: 0;
    max-width: 280px;
}

/* Dark Mode */
[data-theme="dark"] .bbai-usage-breakdown-item,
.bbai-dark-mode .bbai-usage-breakdown-item {
    background: var(--bbai-gray-800);
}

[data-theme="dark"] .bbai-comparison-item--before,
.bbai-dark-mode .bbai-comparison-item--before {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--bbai-error);
}

[data-theme="dark"] .bbai-comparison-item--after,
.bbai-dark-mode .bbai-comparison-item--after {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--bbai-success);
}

[data-theme="dark"] .bbai-comparison-improvement,
.bbai-dark-mode .bbai-comparison-improvement {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bbai-primary-light);
}

[data-theme="dark"] .bbai-icon-btn:hover,
.bbai-dark-mode .bbai-icon-btn:hover {
    background: var(--bbai-gray-700);
    border-color: var(--bbai-gray-600);
}

[data-theme="dark"] .bbai-spinner,
.bbai-dark-mode .bbai-spinner {
    border-color: var(--bbai-gray-600);
    border-top-color: var(--bbai-primary-light);
}

[data-theme="dark"] .bbai-empty-title,
.bbai-dark-mode .bbai-empty-title {
    color: var(--bbai-gray-100);
}



/* 27. Error Handling */

/* Imported from: _errors.css */
/**
 * Error Handling Styles
 * User-friendly error messages, retry buttons, help links
 */

/* Error Container */
.bbai-error-container {
    padding: var(--bbai-space-6);
    background: #fef2f2;
    border: 1px solid var(--bbai-error);
    border-radius: var(--bbai-radius-lg);
    margin-bottom: var(--bbai-space-6);
}

.bbai-error-header {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-3);
    margin-bottom: var(--bbai-space-4);
}

.bbai-error-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--bbai-error);
}

.bbai-error-title {
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-error-message {
    font-size: var(--bbai-text-base);
    color: var(--bbai-text-muted);
    line-height: 1.6;
    margin-bottom: var(--bbai-space-4);
}

.bbai-error-solution {
    padding: var(--bbai-space-4);
    background: white;
    border-radius: var(--bbai-radius);
    border-left: 4px solid var(--bbai-primary);
    margin-bottom: var(--bbai-space-4);
}

.bbai-error-solution-title {
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-error-solution-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bbai-error-solution-item {
    display: flex;
    align-items: flex-start;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-error-solution-item::before {
    content: '•';
    color: var(--bbai-primary);
    font-weight: var(--bbai-font-bold);
    margin-right: var(--bbai-space-1);
}

.bbai-error-actions {
    display: flex;
    gap: var(--bbai-space-3);
    flex-wrap: wrap;
}

.bbai-error-retry {
    background: var(--bbai-error);
    color: white;
    border: none;
    padding: var(--bbai-space-3) var(--bbai-space-6);
    border-radius: var(--bbai-radius-lg);
    font-weight: var(--bbai-font-semibold);
    cursor: pointer;
    transition: all var(--bbai-transition-fast);
}

.bbai-error-retry:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.bbai-error-help-link {
    color: var(--bbai-primary);
    text-decoration: none;
    font-weight: var(--bbai-font-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    transition: color var(--bbai-transition-fast);
}

.bbai-error-help-link:hover {
    color: var(--bbai-primary-hover);
    text-decoration: underline;
}

/* Inline Error */
.bbai-inline-error {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-3);
    background: #fef2f2;
    border-left: 3px solid var(--bbai-error);
    border-radius: var(--bbai-radius);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-error);
    margin-top: var(--bbai-space-2);
}

.bbai-inline-error svg {
    flex-shrink: 0;
}

/* Error Modal */
.bbai-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--bbai-transition-base);
}

.bbai-error-modal.show {
    opacity: 1;
    pointer-events: all;
}

.bbai-error-modal-content {
    background: white;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    max-width: 500px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform var(--bbai-transition-base);
}

.bbai-error-modal.show .bbai-error-modal-content {
    transform: scale(1);
}

/* Error Toast (uses toast system) */
.bbai-toast--error {
    border-left-color: var(--bbai-error);
}

/* Dark Mode */
[data-theme="dark"] .bbai-error-container,
.bbai-dark-mode .bbai-error-container {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--bbai-error);
}

[data-theme="dark"] .bbai-error-solution,
.bbai-dark-mode .bbai-error-solution {
    background: var(--bbai-gray-800);
}

[data-theme="dark"] .bbai-inline-error,
.bbai-dark-mode .bbai-inline-error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--bbai-error);
}



/* 28. Accessibility */

/* Imported from: _accessibility.css */
/**
 * Accessibility Enhancements
 * ARIA labels, focus management, keyboard navigation, high contrast mode
 */

/* Focus Management */
.bbai-focus-trap {
    position: relative;
}

.bbai-focus-trap:focus-within {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* Skip to Content Link */
.bbai-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--bbai-primary);
    color: white;
    padding: var(--bbai-space-3) var(--bbai-space-4);
    text-decoration: none;
    z-index: 100000;
    border-radius: 0 0 var(--bbai-radius) 0;
}

.bbai-skip-link:focus {
    top: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bbai-btn,
    .bbai-card,
    .bbai-input {
        border-width: 2px;
    }

    .bbai-btn-primary {
        border: 2px solid var(--bbai-primary);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen Reader Only */
.bbai-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
.bbai-btn:focus-visible,
.bbai-link:focus-visible,
.bbai-input:focus-visible {
    outline: 3px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* ARIA Live Regions */
.bbai-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Keyboard Navigation Indicators */
.bbai-keyboard-nav .bbai-btn:focus,
.bbai-keyboard-nav .bbai-link:focus {
    outline: 3px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* High Contrast Toggle */
.bbai-high-contrast {
    --bbai-text: #000000;
    --bbai-text-muted: #333333;
    --bbai-bg: #ffffff;
    --bbai-gray-50: #f5f5f5;
    --bbai-gray-100: #e0e0e0;
    --bbai-gray-200: #cccccc;
    --bbai-primary: #0066cc;
    --bbai-primary-hover: #0052a3;
    --bbai-success: #006600;
    --bbai-error: #cc0000;
    --bbai-warning: #cc6600;
}

.bbai-high-contrast .bbai-btn,
.bbai-high-contrast .bbai-card {
    border-width: 2px;
}

.bbai-high-contrast .bbai-btn-primary {
    background: var(--bbai-primary);
    border-color: var(--bbai-primary);
    color: white;
}

/* Dark Mode Accessibility */
[data-theme="dark"] .bbai-btn:focus-visible,
.bbai-dark-mode .bbai-btn:focus-visible {
    outline-color: var(--bbai-primary-light);
}

/* ==========================================================================
   DASHBOARD POLISH — refinements for professional SaaS look
   ========================================================================== */

/* Hero banner — tighten spacing, richer gradient */
.bbai-dashboard-hero {
    background: linear-gradient(135deg, #eef4ff 0%, #f0f7ff 50%, #f8fbff 100%);
    border-radius: 16px;
    padding: 28px 32px;
}

.bbai-dashboard-hero__headline {
    font-size: 22px;
    letter-spacing: -0.01em;
}

/* Dashboard header — refined typography */
.bbai-dashboard-header__title {
    font-size: 28px;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.bbai-dashboard-header__subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

/* Non-status dashboard cards — softer shadows */
.bbai-dashboard-card {
    border-color: #eef1f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.bbai-dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
    border-color: #e0e7ef;
}

/* Workflow steps — divider lines between steps */
.bbai-workflow-step {
    border-bottom: 1px solid #f3f4f6;
}

.bbai-workflow-step--last {
    border-bottom: none;
}

.bbai-workflow-step__icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.bbai-workflow-step__btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 7px;
    margin-top: 6px;
}

/* Stat cards — compact, unified */
.bbai-stat-card {
    border-radius: 14px;
    padding: 20px 22px;
    border-color: #eef1f5;
}

@media (max-width: 768px) {
    .bbai-dashboard-stats {
        grid-template-columns: 1fr;
    }
}

.bbai-stat-card__value {
    font-size: 32px;
    letter-spacing: -0.02em;
}

.bbai-stat-card__icon {
    margin-bottom: 8px;
}

.bbai-stat-card__icon svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Row spacing — tighter vertical rhythm */
.bbai-dashboard-row {
    margin-bottom: 20px;
}

.bbai-dashboard-row--3 {
    margin-top: 4px;
    margin-bottom: 0;
}

/* Percent symbol in stat cards */
.bbai-stat-card .bbai-percent {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.6;
}

/* (Status card, insight, plan usage, upgrade hint — defined in main section) */

/* Help CTA in workflow card */
.bbai-workflow-card__help-cta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

/* Guest funnel: header CTAs + preview stats (see also assets/css/features/dashboard/funnel-hero.css) */
.bbai-header--trial-funnel .bbai-header-guest-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.bbai-header-guest-cta__primary {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap;
}

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

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

.bbai-link-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #2563eb;
    cursor: pointer;
    text-decoration: none;
}

.bbai-link-button:hover {
    text-decoration: underline;
}

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;
}

/* Premium hierarchy pass: neutral surfaces, semantic accents only. */
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-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-hero-grid.bbai-li-hero--needs-review .bbai-li-card--donut,
body.toplevel_page_bbai.bbai-dashboard .bbai-li-hero-grid[data-bbai-li-live-progress="1"] .bbai-li-card--donut {
    border-color: rgba(226, 232, 240, 0.92) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.055) !important;
}

@keyframes bbai-li-success-highlight {
    0% {
        border-color: rgba(187, 247, 208, 0.8);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.055);
    }
    100% {
        border-color: rgba(226, 232, 240, 0.92);
        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-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.08), 0 10px 24px rgba(15, 23, 42, 0.1) !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: #e5e7eb !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;
}

/* Source: assets/css/system/bbai-admin-foundation-tokens.css */
/**
 * BeepBeep AI — Admin foundation tokens (CSS custom properties only)
 *
 * Depends on variables from assets/css/unified.css (inlined _tokens.css).
 * Naming: --bbai-admin-* = canonical admin semantic layer; --bbai-ds-* = aliases for existing DS primitives.
 *
 * Usage (when you adopt in components):
 * - Prefer --bbai-admin-* for new work; use --bbai-* from unified for raw scale values.
 * - Do not hard-code hex/radius in feature CSS; map through these tokens.
 */

:root {
    /* -------------------------------------------------------------------------
       TYPOGRAPHY — family, scale, weights, line-height (aligned with Dashboard)
       ------------------------------------------------------------------------- */

    --bbai-admin-font-sans: var(--bbai-font-family);
    --bbai-admin-font-mono: var(--bbai-font-family-mono);

    /* Unified admin type scale */
    --bbai-text-xs: 12px;
    --bbai-text-sm: 13px;
    --bbai-text-md: 14px;
    --bbai-text-base: var(--bbai-text-md);
    --bbai-text-lg: 16px;
    --bbai-text-xl: 20px;
    --bbai-text-2xl: 24px;
    --bbai-text-3xl: 28px;

    /* Heading scale */
    --bbai-admin-type-display: var(--bbai-text-3xl);
    --bbai-admin-type-h1: var(--bbai-text-3xl);
    --bbai-admin-type-h2: var(--bbai-text-2xl);
    --bbai-admin-type-h3: var(--bbai-text-xl);
    --bbai-admin-type-h4: var(--bbai-text-lg);
    --bbai-admin-type-h5: var(--bbai-text-md);
    --bbai-admin-type-h6: var(--bbai-text-sm);

    /* Semantic hierarchy */
    --bbai-admin-type-hero: var(--bbai-admin-type-display);
    --bbai-admin-type-page-title: var(--bbai-admin-type-h1);
    --bbai-admin-type-section-title: var(--bbai-admin-type-h2);
    --bbai-admin-type-card-title: var(--bbai-admin-type-h3);

    /* Body */
    --bbai-admin-type-body: var(--bbai-text-md);
    --bbai-admin-type-body-lg: var(--bbai-text-lg);
    --bbai-admin-type-body-sm: var(--bbai-text-sm);

    /* Labels, meta, captions (forms + table meta) */
    --bbai-admin-type-label: var(--bbai-text-xs);
    --bbai-admin-type-meta: var(--bbai-text-sm);
    --bbai-admin-type-caption: var(--bbai-text-xs);

    --bbai-admin-type-label-weight: var(--bbai-font-semibold);
    --bbai-admin-type-label-tracking: var(--bbai-tracking-wide);
    --bbai-admin-type-label-transform: uppercase;

    --bbai-admin-type-weight-regular: var(--bbai-font-normal);
    --bbai-admin-type-weight-medium: var(--bbai-font-medium);
    --bbai-admin-type-weight-semibold: var(--bbai-font-semibold);
    --bbai-admin-type-weight-bold: var(--bbai-font-bold);

    --bbai-admin-type-leading-tight: var(--bbai-leading-tight);
    --bbai-admin-type-leading-snug: var(--bbai-leading-snug);
    --bbai-admin-type-leading-normal: var(--bbai-leading-normal);
    --bbai-admin-type-leading-relaxed: var(--bbai-leading-relaxed);

    /* -------------------------------------------------------------------------
       SPACING — 4px grid; use for padding, gap, margin
       Maps: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64…
       ------------------------------------------------------------------------- */

    --bbai-admin-space-0: var(--bbai-space-0);
    --bbai-admin-space-1: var(--bbai-space-1);
    --bbai-admin-space-2: var(--bbai-space-2);
    --bbai-admin-space-3: var(--bbai-space-3);
    --bbai-admin-space-4: var(--bbai-space-4);
    --bbai-admin-space-5: var(--bbai-space-5);
    --bbai-admin-space-6: var(--bbai-space-6);
    --bbai-admin-space-8: var(--bbai-space-8);
    --bbai-admin-space-10: var(--bbai-space-10);
    --bbai-admin-space-12: var(--bbai-space-12);
    --bbai-admin-space-16: var(--bbai-space-16);
    --bbai-admin-space-20: var(--bbai-space-20);

    /* Semantic spacing (shell rhythm; same as unified --page-padding-top / section-spacing) */
    --bbai-admin-space-page-pad-y: var(--page-padding-top);
    --bbai-admin-space-section: var(--section-spacing);
    --bbai-admin-space-card-gap: var(--card-gap);
    --bbai-admin-space-inset-card: var(--bbai-card-padding);
    --bbai-admin-space-inset-card-sm: var(--bbai-card-padding-sm);
    --bbai-admin-space-inset-card-lg: var(--bbai-card-padding-lg);

    /* Rhythm aliases (spacing-only; defined on :root in unified.css) */
    --bbai-admin-rhythm-card-padding: var(--bbai-rhythm-card-padding, var(--bbai-space-6));
    --bbai-admin-rhythm-card-compact: var(--bbai-rhythm-card-padding-compact, var(--bbai-space-4));
    --bbai-admin-rhythm-form-field-gap: var(--bbai-rhythm-form-field-gap, var(--bbai-space-4));
    --bbai-admin-rhythm-chip-gap: var(--bbai-rhythm-chip-gap, var(--bbai-space-2));

    /* -------------------------------------------------------------------------
       COLORS — brand, neutrals, semantic (ALT / row states), interaction
       ------------------------------------------------------------------------- */

    /* Solid primary controls (.bbai-btn-primary): use green --bbai-primary from unified tokens; do not override to blue on dashboard shells */
    --bbai-admin-color-primary: var(--bbai-primary);
    --bbai-admin-color-primary-hover: var(--bbai-primary-hover);
    --bbai-admin-color-primary-active: var(--bbai-primary-dark);
    --bbai-admin-color-primary-muted: var(--bbai-primary-soft);
    --bbai-admin-color-primary-on-brand: var(--bbai-text-inverse);

    --bbai-admin-color-text: var(--bbai-text-primary);
    --bbai-admin-color-text-secondary: var(--bbai-text-secondary);
    --bbai-admin-color-text-muted: var(--bbai-text-muted);
    --bbai-admin-color-text-disabled: var(--bbai-text-light);

    --bbai-admin-color-bg: var(--bbai-bg-primary);
    --bbai-admin-color-bg-muted: var(--bbai-bg-secondary);
    --bbai-admin-color-bg-subtle: var(--bbai-bg-tertiary);
    --bbai-admin-color-bg-page: var(--bbai-bg-page);

    --bbai-admin-color-border: var(--bbai-border);
    --bbai-admin-color-border-strong: var(--bbai-border-secondary);
    --bbai-admin-color-border-focus: var(--bbai-border-focus);

    /* Semantic: success = optimized / positive coverage */
    --bbai-admin-semantic-success-fg: var(--bbai-success-dark);
    --bbai-admin-semantic-success-bg: var(--bbai-success-bg);
    --bbai-admin-semantic-success-border: var(--bbai-success-light);
    --bbai-admin-semantic-success-accent: var(--bbai-success);

    /* Semantic: warning = active workflow attention / missing ALT */
    --bbai-admin-semantic-warning-fg: #805112;
    --bbai-admin-semantic-warning-bg: rgba(255, 247, 237, 0.82);
    --bbai-admin-semantic-warning-border: rgba(201, 122, 0, 0.3);
    --bbai-admin-semantic-warning-accent: #c97a00;

    /* Semantic: error = failed system/destructive only */
    --bbai-admin-semantic-error-fg: var(--bbai-error);
    --bbai-admin-semantic-error-bg: var(--bbai-error-bg);
    --bbai-admin-semantic-error-border: var(--bbai-error-light);
    --bbai-admin-semantic-error-accent: var(--bbai-error);

    /* Neutral chip / inactive row meta */
    --bbai-admin-semantic-neutral-fg: var(--bbai-text-secondary);
    --bbai-admin-semantic-neutral-bg: var(--bbai-bg-secondary);
    --bbai-admin-semantic-neutral-border: var(--bbai-border);

    /* Info (secondary callouts, not “missing”) */
    --bbai-admin-semantic-info-fg: var(--bbai-info-dark);
    --bbai-admin-semantic-info-bg: var(--bbai-info-bg);
    --bbai-admin-semantic-info-border: var(--bbai-info-light);

    /* -------------------------------------------------------------------------
       Phase 4 — Semantic workflow status (filters, badges, row rail, scores)
       Canonical: --bbai-status-*  (single language across admin UI)
       Legacy “weak” = needs_review (data-filter still uses weak)
       ------------------------------------------------------------------------- */

    --bbai-status-neutral-indicator: #94a3b8;

    --bbai-status-missing-fg: #805112;
    --bbai-status-missing-bg: rgba(255, 247, 237, 0.82);
    --bbai-status-missing-border: rgba(201, 122, 0, 0.3);
    --bbai-status-missing-accent: #c97a00;
    --bbai-status-missing-active-bg: #8a5200;
    --bbai-status-missing-active-border: #6f4100;
    --bbai-status-missing-count-fg: #805112;
    --bbai-status-missing-row-bg: #ffffff;
    --bbai-status-missing-rail: rgba(201, 122, 0, 0.34);
    --bbai-status-missing-rail-strong: rgba(201, 122, 0, 0.52);

    --bbai-status-needs-review-fg: #7c5719;
    --bbai-status-needs-review-bg: rgba(255, 248, 232, 0.84);
    --bbai-status-needs-review-border: rgba(217, 164, 65, 0.34);
    --bbai-status-needs-review-accent: #d9a441;
    --bbai-status-needs-review-active-bg: #9a6c1e;
    --bbai-status-needs-review-active-border: #7c5719;
    --bbai-status-needs-review-count-fg: #7c5719;
    --bbai-status-needs-review-row-bg: rgba(255, 251, 235, 0.68);
    --bbai-status-needs-review-rail: rgba(217, 164, 65, 0.42);
    --bbai-status-needs-review-rail-strong: rgba(217, 164, 65, 0.6);

    --bbai-status-optimized-fg: #166534;
    --bbai-status-optimized-bg: rgba(240, 253, 244, 0.82);
    --bbai-status-optimized-border: rgba(34, 181, 115, 0.3);
    --bbai-status-optimized-accent: #22b573;
    --bbai-status-optimized-active-bg: #20b26c;
    --bbai-status-optimized-active-border: #14532d;
    --bbai-status-optimized-count-fg: #166534;
    --bbai-status-optimized-row-bg: rgba(240, 253, 244, 0.58);
    --bbai-status-optimized-rail: rgba(22, 163, 74, 0.48);
    --bbai-status-optimized-rail-strong: rgba(22, 163, 74, 0.66);

    /* Filter “All” — neutral slate (distinct from state hues) */
    --bbai-status-filter-all-active-bg: #0f172a;
    --bbai-status-filter-all-active-fg: #ffffff;
    --bbai-status-filter-all-inactive-bg: #ffffff;
    --bbai-status-filter-all-inactive-border: #e2e8f0;
    --bbai-status-filter-all-inactive-fg: #334155;
    --bbai-status-filter-all-count-fg: #0f172a;

    /* Row structural rail */
    --bbai-status-row-rail-width: 3px;
    --bbai-status-row-rail-radius: 2px;
    --bbai-status-row-content-inset: 14px;

    /* Phase 9 — interaction motion (canonical; semantic filters + controls consume) */
    --bbai-admin-ix-duration: 150ms;
    --bbai-admin-ix-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Shared count chip / focus (filter toolbars) */
    --bbai-status-filter-count-surface: #ffffff;
    --bbai-status-filter-count-border-muted: rgba(15, 23, 42, 0.08);
    --bbai-status-filter-count-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --bbai-status-filter-focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px rgba(37, 99, 235, 0.55);
    --bbai-status-filter-hover-lift: 0 1px 3px rgba(15, 23, 42, 0.07);
    --bbai-status-filter-transition-duration: var(--bbai-admin-ix-duration);
    --bbai-status-filter-transition-ease: var(--bbai-admin-ix-ease);

    /* Score tiers (aligned with optimized / review / missing severity) */
    --bbai-status-score-excellent-bg: #dcfce7;
    --bbai-status-score-excellent-fg: #14532d;
    --bbai-status-score-excellent-border: rgba(22, 163, 74, 0.22);

    --bbai-status-score-good-bg: #ecfdf5;
    --bbai-status-score-good-fg: #166534;
    --bbai-status-score-good-border: rgba(16, 185, 129, 0.28);

    --bbai-status-score-needs-improvement-bg: #fef3c7;
    --bbai-status-score-needs-improvement-fg: #92400e;
    --bbai-status-score-needs-improvement-border: rgba(245, 158, 11, 0.32);

    --bbai-status-score-poor-bg: #ffedd5;
    --bbai-status-score-poor-fg: #9a3412;
    --bbai-status-score-poor-border: rgba(234, 88, 12, 0.35);

    --bbai-status-score-critical-bg: #ffe4e6;
    --bbai-status-score-critical-fg: #9f1239;
    --bbai-status-score-critical-border: rgba(244, 63, 94, 0.35);

    --bbai-status-score-bar-high: var(--bbai-status-optimized-accent);
    --bbai-status-score-bar-mid: var(--bbai-status-needs-review-accent);
    --bbai-status-score-bar-low: var(--bbai-status-missing-accent);

    /* Legacy aliases (existing components use “weak” / “opt”) */
    --bbai-status-weak-fg: var(--bbai-status-needs-review-fg);
    --bbai-status-weak-bg: var(--bbai-status-needs-review-bg);
    --bbai-status-weak-border: var(--bbai-status-needs-review-border);
    --bbai-status-weak-accent: var(--bbai-status-needs-review-accent);
    --bbai-status-weak-active-bg: var(--bbai-status-needs-review-active-bg);
    --bbai-status-weak-active-border: var(--bbai-status-needs-review-active-border);
    --bbai-status-weak-count-fg: var(--bbai-status-needs-review-count-fg);
    --bbai-status-weak-row-bg: var(--bbai-status-needs-review-row-bg);
    --bbai-status-weak-rail: var(--bbai-status-needs-review-rail);
    --bbai-status-weak-rail-strong: var(--bbai-status-needs-review-rail-strong);

    --bbai-status-opt-fg: var(--bbai-status-optimized-fg);
    --bbai-status-opt-bg: var(--bbai-status-optimized-bg);
    --bbai-status-opt-border: var(--bbai-status-optimized-border);
    --bbai-status-opt-accent: var(--bbai-status-optimized-accent);
    --bbai-status-opt-active-bg: var(--bbai-status-optimized-active-bg);
    --bbai-status-opt-active-border: var(--bbai-status-optimized-active-border);
    --bbai-status-opt-count-fg: var(--bbai-status-optimized-count-fg);
    --bbai-status-opt-row-bg: var(--bbai-status-optimized-row-bg);
    --bbai-status-opt-rail: var(--bbai-status-optimized-rail);
    --bbai-status-opt-rail-strong: var(--bbai-status-optimized-rail-strong);

    /* Dot indicators (filter pills, filter-group) */
    --bbai-status-missing-dot: var(--bbai-status-missing-accent);
    --bbai-status-needs-review-dot: var(--bbai-status-needs-review-accent);
    --bbai-status-optimized-dot: var(--bbai-status-optimized-accent);

    /* -------------------------------------------------------------------------
       Phase 5 — Tables / workspace rows (density + column rhythm)
       ------------------------------------------------------------------------- */

    --bbai-admin-table-row-pad-y: var(--bbai-space-2);
    --bbai-admin-table-row-pad-x: var(--bbai-space-3);
    --bbai-admin-table-row-gap-x: var(--bbai-space-3);
    --bbai-admin-table-row-gap-y: var(--bbai-space-1);
    --bbai-admin-table-border: 1px solid var(--bbai-border);
    --bbai-admin-table-header-bg: var(--bbai-bg-secondary);
    --bbai-admin-table-cell-pad-y: var(--bbai-space-2);
    --bbai-admin-table-cell-pad-x: var(--bbai-space-3);
    --bbai-admin-table-actions-col-min: 112px;
    --bbai-admin-table-actions-col-max: 152px;
    --bbai-admin-table-actions-col-min-lg: 118px;
    --bbai-admin-table-actions-col-max-lg: 160px;
    --bbai-admin-table-meta-color: var(--bbai-text-muted);
    --bbai-admin-table-hover-bg: var(--bbai-bg-secondary);

    /* Interactive surfaces (buttons, pills) */
    --bbai-admin-interaction-hover-overlay: rgba(15, 23, 42, 0.04);
    --bbai-admin-interaction-active-overlay: rgba(15, 23, 42, 0.08);
    --bbai-admin-interaction-disabled-opacity: 0.5;

    /* Phase 9 — pressed, loading, shared transitions (bbai-admin-interactions.css) */
    --bbai-admin-ix-transition-interactive:
        background-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        border-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        filter var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        opacity var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
    --bbai-admin-ix-loading-opacity: 0.88;
    --bbai-admin-ix-spinner-size: 1rem;
    --bbai-admin-ix-filter-press: brightness(0.96);
    --bbai-admin-ix-filter-press-primary: brightness(0.93);
    --bbai-admin-ix-filter-press-on-dark: brightness(1.08);
    --bbai-admin-ix-hover-lift-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
    --bbai-admin-ix-row-ack-bg: rgba(220, 252, 231, 0.65);

    /* -------------------------------------------------------------------------
       RADIUS — controls, cards, pills
       ------------------------------------------------------------------------- */

    --bbai-admin-radius-xs: var(--bbai-radius-sm);
    --bbai-admin-radius-sm: var(--bbai-radius);
    --bbai-admin-radius-md: var(--bbai-radius-md);
    --bbai-admin-radius-lg: var(--bbai-radius-lg);
    --bbai-admin-radius-xl: var(--bbai-radius-xl);
    --bbai-admin-radius-pill: var(--bbai-radius-full);

    --bbai-admin-radius-card: var(--bbai-card-radius);
    --bbai-admin-radius-button: var(--bbai-btn-radius);
    --bbai-admin-radius-input: var(--bbai-input-radius);

    /* -------------------------------------------------------------------------
       BORDERS — default, subtle, strong (complete border values)
       ------------------------------------------------------------------------- */

    --bbai-admin-border-width-hairline: 1px;
    --bbai-admin-border-default: var(--bbai-admin-border-width-hairline) solid var(--bbai-admin-color-border);
    --bbai-admin-border-subtle: var(--bbai-admin-border-width-hairline) solid var(--bbai-gray-200);
    --bbai-admin-border-strong: var(--bbai-admin-border-width-hairline) solid var(--bbai-admin-color-border-strong);
    --bbai-admin-border-focus-ring: var(--bbai-focus-ring);

    /* -------------------------------------------------------------------------
       SHADOWS — cards, elevated hover
       ------------------------------------------------------------------------- */

    --bbai-admin-shadow-card: var(--bbai-shadow-card);
    --bbai-admin-shadow-card-hover: var(--bbai-shadow-card-hover);
    --bbai-admin-shadow-control: var(--bbai-shadow-button);
    --bbai-admin-shadow-control-hover: var(--bbai-shadow-button-hover);
    --bbai-admin-shadow-dropdown: var(--bbai-shadow-dropdown);
    --bbai-admin-shadow-focus: var(--bbai-shadow-focus);

    /* Button hierarchy */
    --bbai-admin-btn-radius: var(--bbai-btn-radius);
    /* Compact toolbar / pagination — slightly tighter than default CTAs */
    --bbai-admin-btn-radius-sm: var(--bbai-admin-radius-sm);
    --bbai-admin-btn-primary-bg: var(--bbai-gradient-primary);
    --bbai-admin-btn-primary-border: var(--bbai-admin-color-primary);
    --bbai-admin-btn-primary-shadow: 0 10px 24px rgba(16, 185, 129, 0.16);
    --bbai-admin-btn-primary-shadow-hover: 0 14px 30px rgba(16, 185, 129, 0.2);
    --bbai-admin-btn-primary-lift: translateY(-1px);
    --bbai-admin-btn-secondary-bg: var(--bbai-admin-color-bg);
    --bbai-admin-btn-secondary-bg-hover: var(--bbai-admin-color-bg-muted);
    --bbai-admin-btn-secondary-border: rgba(148, 163, 184, 0.26);
    --bbai-admin-btn-secondary-border-hover: rgba(148, 163, 184, 0.4);
    --bbai-admin-btn-secondary-text: var(--bbai-admin-color-text-secondary);
    --bbai-admin-btn-secondary-text-hover: var(--bbai-admin-color-text);
    --bbai-admin-btn-tertiary-text: var(--bbai-admin-color-text-muted);
    --bbai-admin-btn-tertiary-text-hover: var(--bbai-admin-color-primary-active);
    --bbai-admin-btn-tertiary-bg-hover: rgba(16, 185, 129, 0.08);

    /* -------------------------------------------------------------------------
       COMPONENT SIZING — min heights for touch targets (36px default)
       ------------------------------------------------------------------------- */

    --bbai-admin-size-btn-sm: 2rem;
    --bbai-admin-size-btn-md: 2.25rem;
    --bbai-admin-size-btn-lg: 2.5rem;
    --bbai-admin-size-input-min-height: var(--bbai-admin-size-btn-md);
    --bbai-admin-size-icon-button: var(--bbai-admin-size-btn-md);
    --bbai-admin-size-touch-target-min: 2.25rem;

    /* -------------------------------------------------------------------------
       MOTION (for interaction tokens; components consume later)
       ------------------------------------------------------------------------- */

    --bbai-admin-motion-fast: var(--bbai-transition-fast);
    --bbai-admin-motion-base: var(--bbai-transition-base);
    --bbai-admin-motion-ease: var(--bbai-ease-out);
    --bbai-admin-motion-ease-premium: var(--bbai-admin-ix-ease);
    --bbai-admin-transition-color: var(--bbai-transition-colors);

    /* -------------------------------------------------------------------------
       DS PRIMITIVE ALIASES (keep bbai-admin-design-system.css selectors unchanged)
       ------------------------------------------------------------------------- */

    --bbai-ds-control-height: var(--bbai-admin-size-btn-md);
    --bbai-ds-control-height-sm: var(--bbai-admin-size-btn-sm);
    --bbai-ds-control-height-lg: var(--bbai-admin-size-btn-lg);
    --bbai-ds-control-radius: var(--bbai-admin-radius-md);
    --bbai-ds-control-font: var(--bbai-admin-type-body);
    --bbai-ds-icon-btn-size: var(--bbai-admin-size-icon-button);

    /* -------------------------------------------------------------------------
       Unified button system (consumed by bbai-admin-button-system.css + .bbai-btn)
       Aligns card/banner/modal/table actions to one scale.
       ------------------------------------------------------------------------- */
    --bbai-btn-height: var(--bbai-cta-primary-min-height, 40px);
    --bbai-btn-height-sm: 36px;
    --bbai-btn-padding-x: 20px;
    --bbai-btn-padding-x-compact: var(--bbai-cta-primary-padding-x, 16px);
    --bbai-btn-radius: var(--bbai-cta-primary-radius, 8px);
    --bbai-btn-font-size: var(--bbai-cta-primary-font-size, 14px);
    --bbai-btn-font-size-sm: 13px;
    --bbai-btn-font-weight: var(--bbai-font-semibold);
    --bbai-btn-font-weight-primary: var(--bbai-cta-primary-font-weight, 500);
    --bbai-btn-font-weight-secondary: var(--bbai-font-medium);
    --bbai-btn-line-height: 1.25;
    --bbai-btn-gap: var(--bbai-space-2);
    --bbai-btn-group-gap: var(--bbai-space-2-5);
    --bbai-btn-transition:
        color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        background-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        border-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease),
        transform var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);

    --bbai-ds-card-padding: var(--bbai-admin-space-inset-card);
    --bbai-ds-card-padding-sm: var(--bbai-admin-space-inset-card-sm);
    --bbai-ds-card-radius: var(--bbai-admin-radius-card);
    --bbai-ds-card-border: var(--bbai-admin-border-default);
    --bbai-ds-card-bg: var(--bbai-card-bg);
    --bbai-ds-card-shadow: var(--bbai-admin-shadow-card);

    --bbai-ds-page-title: var(--bbai-admin-type-page-title);
    --bbai-ds-section-title: var(--bbai-admin-type-section-title);
    --bbai-ds-subsection-title: var(--bbai-admin-type-card-title);
    --bbai-ds-label: var(--bbai-admin-type-label);
    --bbai-ds-body: var(--bbai-admin-type-body);
    --bbai-ds-body-lg: var(--bbai-admin-type-body-lg);

    --bbai-ds-status-success-fg: var(--bbai-admin-semantic-success-fg);
    --bbai-ds-status-success-bg: var(--bbai-admin-semantic-success-bg);
    --bbai-ds-status-success-border: var(--bbai-admin-semantic-success-border);
    --bbai-ds-status-warning-fg: var(--bbai-admin-semantic-warning-fg);
    --bbai-ds-status-warning-bg: var(--bbai-admin-semantic-warning-bg);
    --bbai-ds-status-warning-border: var(--bbai-admin-semantic-warning-border);
    --bbai-ds-status-error-fg: var(--bbai-admin-semantic-error-fg);
    --bbai-ds-status-error-bg: var(--bbai-admin-semantic-error-bg);
    --bbai-ds-status-error-border: var(--bbai-admin-semantic-error-border);
    --bbai-ds-status-info-fg: var(--bbai-admin-semantic-info-fg);
    --bbai-ds-status-info-bg: var(--bbai-admin-semantic-info-bg);
    --bbai-ds-status-info-border: var(--bbai-admin-semantic-info-border);
    --bbai-ds-status-neutral-fg: var(--bbai-admin-semantic-neutral-fg);
    --bbai-ds-status-neutral-bg: var(--bbai-admin-semantic-neutral-bg);
    --bbai-ds-status-neutral-border: var(--bbai-admin-semantic-neutral-border);

    --bbai-ds-focus-outline: 2px solid var(--bbai-focus-ring-color);
    --bbai-ds-focus-offset: var(--bbai-focus-ring-offset, 2px);
    --bbai-ds-transition: var(--bbai-admin-ix-transition-interactive);
    --bbai-ds-transition-opacity: opacity var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

/* Source: assets/css/modern.bundle.css */
/**
 * BeepBeep AI - Modern CSS Bundle
 * @generated 2026-03-09T14:06:33.135Z
 */

/**
 * BeepBeep AI Alt Text Generator - Modern CSS (Modular)
 * Main entry point for modular CSS architecture
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 * @version 5.0.0
 */

/* ==================================================
   DESIGN TOKENS
   Core design variables and tokens
   ================================================== */


/* Imported from: tokens/colors.css */
/**
 * Color Design Tokens
 *
 * All colors centralized for easy theming and consistency.
 * Based on modern color system with semantic naming.
 *
 * @package BeepBeep\AltText
 * @since   5.0.0
 */

:root {
	/* Brand Colors */
	--bbai-color-primary: #2563eb;
	--bbai-color-primary-hover: #1d4ed8;
	--bbai-color-primary-light: #dbeafe;
	--bbai-color-primary-dark: #1e40af;

	/* Semantic Colors */
	--bbai-color-success: #10b981;
	--bbai-color-success-hover: #059669;
	--bbai-color-success-light: #d1fae5;
	--bbai-color-success-dark: #047857;

	--bbai-color-warning: #f59e0b;
	--bbai-color-warning-hover: #d97706;
	--bbai-color-warning-light: #fef3c7;
	--bbai-color-warning-dark: #b45309;

	--bbai-color-error: #ef4444;
	--bbai-color-error-hover: #dc2626;
	--bbai-color-error-light: #fee2e2;
	--bbai-color-error-dark: #b91c1c;

	--bbai-color-info: #3b82f6;
	--bbai-color-info-hover: #2563eb;
	--bbai-color-info-light: #dbeafe;
	--bbai-color-info-dark: #1e40af;

	/* Neutral Palette */
	--bbai-color-gray-50: #f9fafb;
	--bbai-color-gray-100: #f3f4f6;
	--bbai-color-gray-200: #e5e7eb;
	--bbai-color-gray-300: #d1d5db;
	--bbai-color-gray-400: #9ca3af;
	--bbai-color-gray-500: #6b7280;
	--bbai-color-gray-600: #4b5563;
	--bbai-color-gray-700: #374151;
	--bbai-color-gray-800: #1f2937;
	--bbai-color-gray-900: #111827;

	/* Surface Colors */
	--bbai-color-bg-primary: #ffffff;
	--bbai-color-bg-secondary: var(--bbai-color-gray-50);
	--bbai-color-bg-tertiary: var(--bbai-color-gray-100);
	--bbai-color-bg-inverse: var(--bbai-color-gray-900);

	/* Text Colors */
	--bbai-color-text-primary: var(--bbai-color-gray-900);
	--bbai-color-text-secondary: var(--bbai-color-gray-600);
	--bbai-color-text-tertiary: var(--bbai-color-gray-500);
	--bbai-color-text-disabled: var(--bbai-color-gray-400);
	--bbai-color-text-inverse: #ffffff;

	/* Border Colors */
	--bbai-color-border: var(--bbai-color-gray-200);
	--bbai-color-border-hover: var(--bbai-color-gray-300);
	--bbai-color-border-focus: var(--bbai-color-primary);

	/* State Colors */
	--bbai-color-disabled: var(--bbai-color-gray-100);
	--bbai-color-disabled-text: var(--bbai-color-gray-400);
}



/* Imported from: tokens/typography.css */
/**
 * Typography Design Tokens
 *
 * Type scale and font system.
 * Based on modular scale for harmonious typography.
 *
 * @package BeepBeep\AltText
 * @since   5.0.0
 */

:root {
	/* Font Families */
	--bbai-font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--bbai-font-family-mono: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;

	/* Font Sizes - Modular Scale (1.250 - Major Third) */
	--bbai-font-size-xs: 0.64rem;   /* 10.24px */
	--bbai-font-size-sm: 0.8rem;    /* 12.8px */
	--bbai-font-size-base: 1rem;    /* 16px */
	--bbai-font-size-md: 1.25rem;   /* 20px */
	--bbai-font-size-lg: 1.563rem;  /* 25px */
	--bbai-font-size-xl: 1.953rem;  /* 31.25px */
	--bbai-font-size-2xl: 2.441rem; /* 39px */
	--bbai-font-size-3xl: 3.052rem; /* 48.8px */

	/* Font Weights */
	--bbai-font-weight-light: 300;
	--bbai-font-weight-normal: 400;
	--bbai-font-weight-medium: 500;
	--bbai-font-weight-semibold: 600;
	--bbai-font-weight-bold: 700;

	/* Line Heights */
	--bbai-line-height-tight: 1.25;
	--bbai-line-height-normal: 1.5;
	--bbai-line-height-relaxed: 1.75;

	/* Letter Spacing */
	--bbai-letter-spacing-tight: -0.025em;
	--bbai-letter-spacing-normal: 0;
	--bbai-letter-spacing-wide: 0.025em;
}



/* Imported from: tokens/spacing.css */
/**
 * Spacing Design Tokens
 *
 * Consistent spacing scale based on 4px baseline grid.
 * Provides predictable rhythm and alignment.
 *
 * @package BeepBeep\AltText
 * @since   5.0.0
 */

:root {
	/* Spacing Scale (4px baseline) */
	--bbai-space-0: 0;
	--bbai-space-1: 0.25rem;  /* 4px */
	--bbai-space-2: 0.5rem;   /* 8px */
	--bbai-space-3: 0.75rem;  /* 12px */
	--bbai-space-4: 1rem;     /* 16px */
	--bbai-space-5: 1.25rem;  /* 20px */
	--bbai-space-6: 1.5rem;   /* 24px */
	--bbai-space-8: 2rem;     /* 32px */
	--bbai-space-10: 2.5rem;  /* 40px */
	--bbai-space-12: 3rem;    /* 48px */
	--bbai-space-16: 4rem;    /* 64px */
	--bbai-space-20: 5rem;    /* 80px */
	--bbai-space-24: 6rem;    /* 96px */
	--bbai-space-32: 8rem;    /* 128px */

	/* Component-Specific Spacing */
	--bbai-space-section: var(--bbai-space-16);
	--bbai-space-container: var(--bbai-space-6);
	--bbai-space-card: var(--bbai-space-6);
	--bbai-space-button: var(--bbai-space-3);
	--bbai-space-input: var(--bbai-space-3);
}



/* Imported from: tokens/shadows.css */
/**
 * Shadow Design Tokens
 *
 * Elevation system using box shadows.
 * Creates depth and visual hierarchy.
 *
 * @package BeepBeep\AltText
 * @since   5.0.0
 */

:root {
	/* Shadow Elevations */
	--bbai-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--bbai-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--bbai-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--bbai-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	--bbai-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

	/* Focus Ring */
	--bbai-shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.5);

	/* Inner Shadow */
	--bbai-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

	/* Component Shadows */
	--bbai-shadow-card: var(--bbai-shadow-md);
	--bbai-shadow-modal: var(--bbai-shadow-2xl);
	--bbai-shadow-dropdown: var(--bbai-shadow-lg);
	--bbai-shadow-button: var(--bbai-shadow-sm);
}



/* Imported from: tokens/animations.css */
/**
 * Animation Design Tokens
 *
 * Transition durations, easing functions, and keyframes.
 * Provides smooth, consistent motion.
 *
 * @package BeepBeep\AltText
 * @since   5.0.0
 */

:root {
	/* Duration */
	--bbai-duration-instant: 0ms;
	--bbai-duration-fast: 150ms;
	--bbai-duration-normal: 250ms;
	--bbai-duration-slow: 350ms;
	--bbai-duration-slower: 500ms;

	/* Easing Functions */
	--bbai-ease-in: cubic-bezier(0.4, 0, 1, 1);
	--bbai-ease-out: cubic-bezier(0, 0, 0.2, 1);
	--bbai-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
	--bbai-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

	/* Common Transitions */
	--bbai-transition-base: all var(--bbai-duration-normal) var(--bbai-ease-in-out);
	--bbai-transition-colors: color var(--bbai-duration-fast) var(--bbai-ease-in-out),
		background-color var(--bbai-duration-fast) var(--bbai-ease-in-out),
		border-color var(--bbai-duration-fast) var(--bbai-ease-in-out);
	--bbai-transition-opacity: opacity var(--bbai-duration-normal) var(--bbai-ease-in-out);
	--bbai-transition-transform: transform var(--bbai-duration-normal) var(--bbai-ease-in-out);
}

/* Keyframe Animations */

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

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

@keyframes bbai-bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-10px);
	}
}

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

@keyframes bbai-slide-in-up {
	from {
		transform: translateY(10px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes bbai-slide-in-down {
	from {
		transform: translateY(-10px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}



/* ==================================================
   BASE STYLES
   Foundation styles and resets
   ================================================== */


/* Imported from: base/typography-base.css */
/**
 * Base Typography
 * Font imports and foundational typography styles
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

/* Base Typography Variables */
:root {
    --bbai-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --bbai-font-family-heading: 'Manrope', var(--bbai-font-family);
}

/* Typography Foundation */
.bbai-modern {
    font-family: var(--bbai-font-family);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Heading Styles */
.bbai-modern h1,
.bbai-modern h2,
.bbai-modern h3,
.bbai-modern h4,
.bbai-modern h5,
.bbai-modern h6 {
    font-family: var(--bbai-font-family-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.bbai-modern h1 {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
}

.bbai-modern h2 {
    font-size: 1.875rem;
    letter-spacing: -0.01em;
}

.bbai-modern h3 {
    font-size: 1.5rem;
}

.bbai-modern h4 {
    font-size: 1.25rem;
}

.bbai-modern h5 {
    font-size: 1.125rem;
}

.bbai-modern h6 {
    font-size: 1rem;
}

/* Paragraph Styles */
.bbai-modern p {
    margin: 0 0 1rem;
}

.bbai-modern p:last-child {
    margin-bottom: 0;
}

/* Text Utilities */
.bbai-text-sm {
    font-size: 0.875rem;
}

.bbai-text-xs {
    font-size: 0.75rem;
}

.bbai-text-lg {
    font-size: 1.125rem;
}

.bbai-text-xl {
    font-size: 1.25rem;
}

.bbai-font-medium {
    font-weight: 500;
}

.bbai-font-semibold {
    font-weight: 600;
}

.bbai-font-bold {
    font-weight: 700;
}



/* Imported from: base/reset.css */
/**
 * WordPress Admin Reset Styles
 * Resets and overrides for WordPress admin environment
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* Base Reset for Plugin Container */
.bbai-modern {
    margin: 0 !important;
    padding: 20px 20px 20px 2px;
    background: var(--bbai-bg-secondary) !important;
    overflow-x: hidden;
    overflow-y: visible !important;
    box-sizing: border-box;
}

.bbai-modern *,
.bbai-modern *::before,
.bbai-modern *::after {
    box-sizing: border-box;
}

/* WordPress Body Content Overflow Fixes */
.bbai-modern #wpbody-content {
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

body.media_page_bbai,
body.media_page_bbai #wpwrap,
body.media_page_bbai #wpcontent {
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

/* Fix Double Scrollbar - Ensure html/body don't create extra scroll */
html.wp-toolbar body.media_page_bbai {
    overflow-y: auto !important;
}

html.wp-toolbar body.media_page_bbai #wpbody {
    overflow: visible !important;
}

html.wp-toolbar body.media_page_bbai #wpcontent {
    overflow: visible !important;
    max-height: none !important;
}

html.wp-toolbar body.media_page_bbai #wpbody-content {
    overflow: visible !important;
    max-height: none !important;
}

/* Prevent Double Scrollbar on Plugin Page */
body.media_page_bbai #wpwrap #wpcontent {
    overflow: visible !important;
}

body.media_page_bbai #wpwrap {
    overflow: visible !important;
}

/* Reset Margins and Padding for Common Elements */
.bbai-modern ul,
.bbai-modern ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bbai-modern button,
.bbai-modern input,
.bbai-modern select,
.bbai-modern textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.bbai-modern img {
    max-width: 100%;
    height: auto;
    display: block;
}

.bbai-modern a {
    text-decoration: none;
    color: inherit;
}

.bbai-modern a:hover {
    text-decoration: none;
}

/* Remove Default Focus Outlines (We'll add custom ones in components) */
.bbai-modern button:focus,
.bbai-modern input:focus,
.bbai-modern select:focus,
.bbai-modern textarea:focus {
    outline: none;
}

/* Reset Form Elements */
.bbai-modern input[type="text"],
.bbai-modern input[type="email"],
.bbai-modern input[type="password"],
.bbai-modern input[type="number"],
.bbai-modern select,
.bbai-modern textarea {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* Reset Button Styles */
.bbai-modern button {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Reset Table Styles */
.bbai-modern table {
    border-collapse: collapse;
    border-spacing: 0;
}

.bbai-modern th,
.bbai-modern td {
    padding: 0;
    text-align: left;
}



/* Imported from: base/layout.css */
/**
 * Base Layout Utilities
 * Foundation layout containers and utilities
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* Main Layout Container */
.bbai-layout {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 var(--bbai-space-6) var(--bbai-space-10) var(--bbai-space-6);
}

/* Section Container */
.bbai-section {
    margin: var(--bbai-space-10) 0;
}

/* Main Container */
.bbai-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Non-dashboard Layout Helpers */
.bbai-library-grid,
.bbai-guide-grid,
.bbai-table-scroll {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Library Grid Layout */
.bbai-library-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
    align-items: flex-start;
}

.bbai-library-table-card--full-width {
    grid-column: 1 / -1;
}

/* Guide Grid Layout */
.bbai-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Table Scroll Container */
.bbai-table-scroll {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.bbai-table-scroll table {
    min-width: 720px;
    border-collapse: collapse;
}

.bbai-library-table th,
.bbai-library-table td {
    word-break: break-word;
}

/* Responsive Layout */
@media (max-width: 1080px) {
    .bbai-library-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .bbai-guide-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .bbai-layout {
        padding: 0 var(--bbai-space-4) var(--bbai-space-8) var(--bbai-space-4);
    }

    .bbai-container {
        padding: 0 16px;
    }
}

/* Spacing Utilities */
.bbai-mt-0 { margin-top: 0; }
.bbai-mt-4 { margin-top: var(--bbai-space-4); }
.bbai-mt-6 { margin-top: var(--bbai-space-6); }
.bbai-mt-8 { margin-top: var(--bbai-space-8); }

.bbai-mb-0 { margin-bottom: 0; }
.bbai-mb-4 { margin-bottom: var(--bbai-space-4); }
.bbai-mb-6 { margin-bottom: var(--bbai-space-6); }
.bbai-mb-8 { margin-bottom: var(--bbai-space-8); }

.bbai-p-0 { padding: 0; }
.bbai-p-4 { padding: var(--bbai-space-4); }
.bbai-p-6 { padding: var(--bbai-space-6); }
.bbai-p-8 { padding: var(--bbai-space-8); }

/* Display Utilities */
.bbai-flex {
    display: flex;
}

.bbai-inline-flex {
    display: inline-flex;
}

.bbai-grid {
    display: grid;
}

.bbai-hidden {
    display: none;
}

/* Flexbox Utilities */
.bbai-items-center {
    align-items: center;
}

.bbai-items-start {
    align-items: flex-start;
}

.bbai-items-end {
    align-items: flex-end;
}

.bbai-justify-center {
    justify-content: center;
}

.bbai-justify-between {
    justify-content: space-between;
}

.bbai-justify-end {
    justify-content: flex-end;
}

.bbai-flex-col {
    flex-direction: column;
}

.bbai-flex-wrap {
    flex-wrap: wrap;
}

.bbai-gap-2 { gap: var(--bbai-space-2); }
.bbai-gap-4 { gap: var(--bbai-space-4); }
.bbai-gap-6 { gap: var(--bbai-space-6); }
.bbai-gap-8 { gap: var(--bbai-space-8); }



/* ==================================================
   LAYOUT COMPONENTS
   Structural layout elements
   ================================================== */


/* Imported from: layout/header.css */
/**
 * Header Component
 * Dark header with navigation and account bar
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* Base Header */
.bbai-header {
    background: #212B36;
    padding: 16px 32px;
    margin-bottom: 0;
    border-bottom: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bbai-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1600px;
    margin: 0 auto;
    gap: 24px;
}

.bbai-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Logo */
.bbai-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bbai-logo-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bbai-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.bbai-logo-tagline {
    display: none;
}

.bbai-logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.bbai-logo-icon rect {
    rx: 8;
}

/* Navigation */
.bbai-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbai-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

/* Ensure inactive links are clearly visible */
.bbai-nav-link:not(.active) {
    color: rgba(255, 255, 255, 0.9);
}

.bbai-nav-link svg {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.bbai-nav-link:not(.active) svg {
    opacity: 0.75;
}

.bbai-nav-link:hover:not(.active) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.bbai-nav-link:hover:not(.active) svg {
    opacity: 1;
}

.bbai-nav-link:focus {
    outline: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.bbai-nav-link:focus svg {
    opacity: 1;
}

.bbai-nav-link:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.bbai-nav-link.active {
    color: #ffffff;
    background: #374151;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bbai-nav-link.active svg {
    opacity: 1;
}

.bbai-nav-link.active:hover {
    background: #4B5563;
    color: #ffffff;
}

/* Guide/Help Link */
.bbai-header-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 16px;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    margin-left: 8px;
    margin-right: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.bbai-header-guide-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.bbai-header-guide-link:focus {
    outline: none;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.bbai-header-guide-link svg {
    flex-shrink: 0;
}

.bbai-header-guide-text {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .bbai-header-guide-link {
        padding: 5px 10px;
        margin-left: 4px;
        margin-right: 8px;
    }

    .bbai-header-guide-text {
        display: none;
    }
}

/* Account Bar */
.bbai-header-account-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 14px;
    background: #374151;
    border-radius: 24px;
    font-size: 13px;
    white-space: nowrap;
}

.bbai-header-account-email {
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
    margin-right: 2px;
}

.bbai-header-plan-badge {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.bbai-header-signup-btn,
.bbai-header-upgrade-btn,
.bbai-header-manage-btn {
    padding: 6px 14px;
    background: #10B981;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bbai-header-signup-btn:hover,
.bbai-header-upgrade-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.bbai-header-manage-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.bbai-header-manage-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.bbai-header-disconnect-btn,
.bbai-header-logout-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bbai-header-disconnect-btn:hover,
.bbai-header-logout-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.bbai-header-disconnect-btn:active,
.bbai-header-logout-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

.bbai-header-disconnect-btn:disabled,
.bbai-header-logout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 900px) {
    .bbai-header {
        padding: 12px 16px;
    }

    .bbai-header-content {
        gap: 12px;
    }

    .bbai-nav {
        gap: 4px;
    }

    .bbai-nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .bbai-header-account-bar {
        padding: 4px 4px 4px 10px;
        gap: 6px;
    }

    .bbai-header-account-email {
        font-size: 12px;
    }

    .bbai-header-signup-btn,
    .bbai-header-upgrade-btn,
    .bbai-header-manage-btn,
    .bbai-header-disconnect-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
}



/* Imported from: layout/footer.css */
/**
 * Footer Component
 * Footer with upgrade links and branding
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* Base Footer */
.bbai-footer {
    text-align: center;
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--bbai-border-primary);
}

.bbai-upgrade-link {
    color: var(--bbai-info);
    text-decoration: none;
    font-size: 15px;
    font-weight: var(--bbai-font-medium);
    transition: var(--bbai-transition-colors);
}

.bbai-upgrade-link:hover {
    color: var(--bbai-primary-dark);
}

/* Premium Footer CTA */
.bbai-premium-footer-cta {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(168, 85, 247, 0.12) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 30px 0 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.bbai-premium-footer-cta:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(168, 85, 247, 0.18) 100%);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.bbai-footer-cta-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bbai-footer-cta-icon {
    width: 20px;
    height: 20px;
    color: #8b5cf6;
}

.bbai-footer-cta-text {
    font-size: 15px;
    color: #374151;
    font-weight: 600;
}

.bbai-footer-cta-btn {
    padding: 8px 20px;
    background: #8b5cf6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bbai-footer-cta-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bbai-footer-cta-badge {
    font-size: 13px;
    color: #677388;
    margin-left: 8px;
}

/* Footer Divider */
.bbai-premium-footer-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 30px 0 20px 0;
}

/* Footer Branding */
.bbai-premium-footer-branding {
    text-align: center;
    padding: 16px 0;
    font-size: 13px;
    color: #677388;
}

.bbai-premium-footer-branding strong {
    color: #677388;
    font-weight: 600;
}

.bbai-premium-footer-branding a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.bbai-premium-footer-branding a:hover {
    color: #7c3aed;
    text-decoration: underline;
}



/* ==================================================
   CORE UI COMPONENTS
   Reusable interface components
   ================================================== */

/* MISSING: components/button.css */


/* Imported from: components/card.css */
/**
 * Card Component
 * Base card styles and common variants
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   BASE CARD
   ================================================== */

.bbai-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.bbai-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #e5e7eb;
}

/* Card with no hover effect */
.bbai-card--static {
    transform: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* ==================================================
   METRIC CARD
   ================================================== */

.bbai-metric-card {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.bbai-metric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #e5e7eb;
}

.bbai-metric-card--highlight {
    background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 100%);
    border-color: #0891b2;
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.bbai-metric-card--highlight:hover {
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.bbai-metric-card--highlight .bbai-metric-label,
.bbai-metric-card--highlight .bbai-metric-description {
    color: rgba(255, 255, 255, 0.95);
}

.bbai-metric-card--highlight .bbai-metric-value {
    color: white;
}

.bbai-metric-card--highlight svg {
    color: white;
}

.bbai-metric-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.bbai-metric-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bbai-metric-card--highlight .bbai-metric-label {
    color: rgba(255, 255, 255, 0.95);
}

.bbai-metric-header svg {
    color: #9ca3af;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.bbai-metric-value {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.bbai-metric-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* ==================================================
   PREMIUM CARD (Glassmorphism)
   ================================================== */

.bbai-premium-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #EAECF0;
    backdrop-filter: blur(12px);
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.bbai-premium-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* ==================================================
   PRICING CARD
   ================================================== */

.bbai-pricing-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.bbai-pricing-card--pro {
    border-color: #3b82f6;
}

.bbai-pricing-card--featured {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.bbai-pricing-card--credits {
    border-color: #8b5cf6;
}

.bbai-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* ==================================================
   USAGE CARD
   ================================================== */

.bbai-usage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    padding: 32px;
    height: 100%;
}

.bbai-usage-card--full-width {
    flex: 1 1 100% !important;
    max-width: 100% !important;
}

.bbai-usage-card-circular {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.bbai-usage-card-circular:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #e5e7eb;
}

.bbai-usage-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 24px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================================================
   PRO UPSELL CARD
   ================================================== */

.bbai-pro-upsell-card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bbai-pro-upsell-card:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

/* ==================================================
   TIME SAVED CARD
   ================================================== */

.bbai-time-saved-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
    transition: all 0.2s ease;
}

.bbai-time-saved-card:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

/* ==================================================
   OPTIMIZATION CARD
   ================================================== */

.bbai-optimization-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.bbai-optimization-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* ==================================================
   UPSELL CARD
   Premium upgrade card with solid blue gradient
   ================================================== */

.bbai-upsell-card {
    background: linear-gradient(180deg, #4f8dfc 0%, #6aa8ff 100%);
    color: white !important;
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    position: relative;
    min-height: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bbai-upsell-card:hover {
    box-shadow: 0 8px 24px rgba(79, 141, 252, 0.3);
    transform: translateY(-2px);
}

/* Force all text in upsell card to be white */
.bbai-upsell-card *:not(svg):not(path):not(circle) {
    color: white !important;
}

.bbai-upsell-title {
    font-size: 24px;
    font-weight: 700;
    color: white !important;
    margin: 0 0 24px 0;
    line-height: 1.3;
}

.bbai-upsell-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bbai-upsell-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.5;
}

.bbai-upsell-cta {
    width: 100%;
    height: 48px;
    padding: 0 24px;
    background: #0EAD4B;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(14, 173, 75, 0.4), 0 0 20px rgba(14, 173, 75, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbai-upsell-cta:hover {
    background: #0D9D42;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 173, 75, 0.5), 0 0 24px rgba(14, 173, 75, 0.3);
}

.bbai-upsell-microcopy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 20px 0 0 0;
    text-align: center;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-card,
    .bbai-metric-card,
    .bbai-premium-card {
        padding: 24px 20px;
    }

    .bbai-metric-value {
        font-size: 28px;
    }
}



/* Imported from: components/table.css */
/**
 * Table Component
 * Table styles with pagination
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   TABLE CONTAINER
   ================================================== */

.bbai-table-container {
    margin: 2.25rem auto;
    max-width: 980px;
    overflow-x: auto;
}

.bbai-table-scroll {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.bbai-table-scroll table {
    min-width: 720px;
    border-collapse: collapse;
}

/* ==================================================
   TABLE BASE
   ================================================== */

.bbai-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Table Title */
.bbai-table-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--bbai-gray-800);
}

/* ==================================================
   TABLE HEADER
   ================================================== */

.bbai-table thead th {
    background: var(--bbai-gray-50);
    padding: 1.1rem var(--bbai-space-4);
    text-align: left;
    font-size: 13px;
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--bbai-gray-200);
}

.bbai-table thead th:first-child {
    border-top-left-radius: var(--bbai-radius-md);
}

.bbai-table thead th:last-child {
    border-top-right-radius: var(--bbai-radius-md);
}

/* ==================================================
   TABLE BODY
   ================================================== */

.bbai-table tbody tr {
    border-bottom: 1px solid var(--bbai-border-primary);
    transition: var(--bbai-transition);
}

.bbai-table tbody tr:nth-child(odd) {
    background: var(--bbai-white);
}

.bbai-table tbody tr:nth-child(even) {
    background: var(--bbai-gray-50);
}

.bbai-table tbody tr:hover {
    background: var(--bbai-gray-100);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.bbai-table tbody tr:last-child td {
    border-bottom: none;
}

.bbai-table tbody td {
    padding: 1.15rem var(--bbai-space-4);
    vertical-align: middle;
}

.bbai-table tbody td:last-child {
    text-align: right;
}

.bbai-table__cell--action {
    text-align: right;
}

.bbai-table .text-muted {
    color: var(--bbai-gray-400);
    font-style: italic;
}

/* Library Table */
.bbai-library-table th,
.bbai-library-table td {
    word-break: break-word;
}

.bbai-library-table-card--full-width {
    grid-column: 1 / -1;
}

/* ==================================================
   TABLE UTILITIES
   ================================================== */

/* Thumbnail */
.bbai-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--bbai-radius-sm);
    border: 1px solid var(--bbai-border-primary);
    box-shadow: var(--bbai-shadow-xs);
}

/* Copy Trigger */
.bbai-copy-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--bbai-gray-800);
}

.bbai-copy-trigger:hover .bbai-copy-icon {
    opacity: 1;
    transform: translateY(-1px);
}

.bbai-copy-icon {
    width: var(--bbai-space-4);
    height: var(--bbai-space-4);
    opacity: 0;
    transition: var(--bbai-transition);
    color: var(--bbai-gray-500);
}

/* ==================================================
   STATUS BADGES (within tables)
   ================================================== */

.bbai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--bbai-radius-full);
    font-size: 0.825rem;
    font-weight: var(--bbai-font-semibold);
    letter-spacing: 0.01em;
}

.bbai-status-badge--optimized {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.bbai-status-badge--missing {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

.bbai-status-badge--regenerated {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

/* ==================================================
   PAGINATION
   ================================================== */

.bbai-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--bbai-space-6);
    padding: var(--bbai-space-4) 0;
    border-top: 1px solid var(--bbai-border-primary);
}

.bbai-pagination-info {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-gray-500);
    font-weight: var(--bbai-font-medium);
}

.bbai-pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
}

.bbai-pagination-pages {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-1);
    margin: 0 var(--bbai-space-4);
}

.bbai-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--bbai-space-8);
    height: var(--bbai-space-8);
    padding: 0 var(--bbai-space-2);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-gray-700);
    background: var(--bbai-white);
    border: 1px solid var(--bbai-gray-300);
    border-radius: var(--bbai-radius-sm);
    text-decoration: none;
    transition: var(--bbai-transition);
    cursor: pointer;
}

.bbai-pagination-btn:hover:not(.bbai-pagination-btn--disabled) {
    background: var(--bbai-gray-100);
    border-color: var(--bbai-gray-400);
    color: var(--bbai-gray-800);
}

.bbai-pagination-btn--current {
    background: var(--bbai-info);
    color: var(--bbai-white);
    border-color: var(--bbai-info);
    font-weight: var(--bbai-font-semibold);
}

.bbai-pagination-btn--disabled {
    background: var(--bbai-gray-50);
    color: var(--bbai-gray-400);
    border-color: var(--bbai-border-primary);
    cursor: not-allowed;
}

.bbai-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--bbai-space-8);
    height: var(--bbai-space-8);
    font-size: var(--bbai-text-sm);
    color: var(--bbai-gray-400);
    font-weight: var(--bbai-font-medium);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-thumb {
        width: 48px;
        height: 48px;
    }

    .bbai-table {
        font-size: 14px;
    }

    .bbai-table tbody td,
    .bbai-table thead th {
        padding: 0.85rem 0.75rem;
    }
}

@media (max-width: 640px) {
    .bbai-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .bbai-pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .bbai-pagination-pages {
        margin: 0 0.5rem;
    }
}



/* Imported from: components/progress.css */
/**
 * Progress Component
 * Linear and circular progress indicators
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   LINEAR PROGRESS BAR
   ================================================== */

.bbai-progress-container {
    height: 10px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-progress-bar {
    height: 100%;
    background: var(--bbai-gradient-success);
    border-radius: var(--bbai-radius-full);
    min-width: 2px;
}

/* Progress Bar with Fill Animation */
.bbai-progress-bar-container {
    background: var(--bbai-gray-100);
    height: 10px;
    border-radius: var(--bbai-radius-md);
    overflow: hidden;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-progress-bar-fill {
    height: 100%;
    background: var(--bbai-gradient-success);
    border-radius: var(--bbai-radius-md);
    transition: width 0.5s ease;
    position: relative;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================================================
   USAGE BAR
   ================================================== */

.bbai-usage-bar {
    max-width: 620px;
    margin: 0 auto var(--bbai-space-8);
}

.bbai-usage-text {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-gray-500);
    margin-bottom: var(--bbai-space-3);
    text-align: left;
}

/* ==================================================
   CIRCULAR PROGRESS
   ================================================== */

.bbai-circular-progress {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.bbai-circular-progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.bbai-circular-progress-bg {
    fill: none;
    stroke: #f3f4f6;
    stroke-width: 12;
}

.bbai-circular-progress-bar {
    fill: none;
    stroke: #9b5cff;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bbai-circular-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.bbai-circular-progress-percent {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    letter-spacing: -0.02em;
}

.bbai-circular-progress-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================================================
   CIRCULAR PROGRESS DETAILS
   ================================================== */

.bbai-usage-circular-details {
    flex: 1;
}

.bbai-usage-circular-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
}

.bbai-usage-circular-title strong {
    font-weight: 600;
}

.bbai-usage-circular-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

.bbai-usage-circular-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.bbai-usage-stat-number {
    font-weight: 700;
    font-size: 16px;
    color: #111827;
}

.bbai-usage-stat-text {
    color: #6b7280;
}

/* ==================================================
   BULK PROGRESS
   ================================================== */

.bbai-bulk-progress {
    display: none;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bbai-bulk-progress[hidden] {
    display: none;
}

.bbai-bulk-progress:not([hidden]) {
    display: block;
}

.bbai-bulk-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bbai-bulk-progress__counts {
    font-size: 14px;
    color: #6b7280;
}

.bbai-bulk-progress__bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bbai-bulk-progress__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.3s ease;
}

/* ==================================================
   OPTIMIZATION PROGRESS
   ================================================== */

.bbai-optimization-progress {
    background: linear-gradient(135deg, var(--bbai-gray-50) 0%, var(--bbai-gray-100) 100%);
    border: 1px solid var(--bbai-border-primary);
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    margin-bottom: var(--bbai-space-8);
    box-shadow: var(--bbai-shadow-sm);
    position: relative;
    overflow: hidden;
}

/* ==================================================
   POST OPTIMIZATION BANNER
   ================================================== */

.bbai-post-optimization-banner {
    display: none;
    margin-top: var(--bbai-space-8);
    padding: var(--bbai-space-6);
    border-radius: 14px;
    background: linear-gradient(120deg, #ede9fe 0%, #dbeafe 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--bbai-shadow-lg);
    align-items: center;
    gap: var(--bbai-space-5);
}

.bbai-post-optimization-banner.active {
    display: flex;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-circular-progress {
        width: 140px;
        height: 140px;
    }

    .bbai-circular-progress-percent {
        font-size: 24px;
    }

    .bbai-usage-circular-title {
        font-size: 18px;
    }

    .bbai-usage-bar {
        max-width: 100%;
    }
}



/* Imported from: components/badge.css */
/**
 * Badge Component
 * Status badges, chips, and labels
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   BASE BADGE
   ================================================== */

.bbai-badge {
    display: inline-block;
    padding: var(--bbai-space-1) var(--bbai-space-2);
    border-radius: var(--bbai-radius-full);
    font-size: var(--bbai-text-xs);
    border: 1px solid var(--bbai-border-primary);
    background: var(--bbai-white);
    font-weight: 600;
}

.bbai-badge--excellent {
    color: #065f46;
    background: var(--bbai-success-bg);
    border-color: var(--bbai-success-light);
}

.bbai-badge--critical {
    color: #991b1b;
    background: var(--bbai-danger-light);
    border-color: #fecaca;
}

/* ==================================================
   STATUS BADGES (within tables)
   ================================================== */

.bbai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--bbai-radius-full);
    font-size: 0.825rem;
    font-weight: var(--bbai-font-semibold);
    letter-spacing: 0.01em;
}

.bbai-status-badge--optimized {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.bbai-status-badge--missing {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

.bbai-status-badge--regenerated {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

/* ==================================================
   PLAN BADGES
   ================================================== */

.bbai-plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.bbai-plan-badge--pro {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Usage Plan Badges */
.bbai-usage-plan-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.bbai-usage-plan-badge--free {
    background: #f3f4f6;
    color: #6b7280;
}

.bbai-usage-plan-badge--pro {
    background: #dbeafe;
    color: #1e40af;
}

.bbai-usage-plan-badge--agency {
    background: #f3e8ff;
    color: #7c3aed;
}

/* Settings Plan Badge */
.bbai-settings-plan-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbai-settings-plan-badge--free {
    background: #f3f4f6;
    color: #6b7280;
}

.bbai-settings-plan-badge--pro {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* ==================================================
   PRICING BADGE
   ================================================== */

.bbai-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #1d4ed8;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.3);
}

/* ==================================================
   STAT CHIPS
   ================================================== */

.bbai-stats-chips {
    display: inline-flex;
    gap: var(--bbai-space-3);
    align-items: center;
    justify-content: center;
    margin: 0 0 var(--bbai-space-6) 0;
}

.bbai-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-3);
    border-radius: var(--bbai-radius-full);
    font-size: 13px;
    border: 1px solid transparent;
}

.bbai-chip__label {
    color: var(--bbai-gray-600);
}

.bbai-chip__value {
    font-weight: var(--bbai-font-bold);
}

.bbai-chip--success {
    background: var(--bbai-success-bg);
    border-color: var(--bbai-success-light);
    color: #065f46;
}

.bbai-chip--warning {
    background: var(--bbai-warning-bg);
    border-color: var(--bbai-warning-light);
    color: #9a3412;
}

/* ==================================================
   SPECIAL BADGES
   ================================================== */

/* Time Saved Badge */
.bbai-time-saved-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Optimization Badge */
.bbai-optimization-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Debug Badge */
.bbai-debug-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fef3c7;
    border: 1px solid #fde047;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}

.bbai-debug-badge-icon {
    width: 14px;
    height: 14px;
}

.bbai-debug-badge-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Badge */
.bbai-modal__badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer CTA Badges */
.bbai-footer-cta-badge {
    font-size: 13px;
    color: #677388;
    margin-left: 8px;
}

.bbai-footer-cta-badge-coming-soon {
    display: inline-block;
    padding: 4px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbai-footer-cta-badge-new {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-stats-chips {
        flex-wrap: wrap;
    }

    .bbai-chip {
        font-size: 12px;
        padding: var(--bbai-space-1) var(--bbai-space-2);
    }

    .bbai-usage-plan-badge {
        top: 12px;
        left: 12px;
        font-size: 10px;
    }
}



/* Imported from: components/modal.css */
/**
 * Modal Component
 * Base modal structure and variants
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   MODAL OVERLAY (Variant 1)
   ================================================== */

.bbai-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: var(--bbai-transition);
    padding: 24px;
    backdrop-filter: blur(4px);
}

.bbai-modal-overlay.is-visible {
    opacity: 1;
}

/* ==================================================
   MODAL CONTAINER (Variant 1)
   ================================================== */

.bbai-modal {
    background: var(--bbai-white);
    border-radius: var(--bbai-radius-xl);
    padding: 28px;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--bbai-shadow-modal);
    position: relative;
    transform: translateY(16px);
    transition: var(--bbai-transition-transform);
}

.bbai-modal-overlay.is-visible .bbai-modal {
    transform: translateY(0);
}

/* ==================================================
   MODAL FULL SCREEN (Variant 2)
   ================================================== */

.bbai-modal--fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bbai-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.bbai-modal__content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================================================
   MODAL HEADER
   ================================================== */

.bbai-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.bbai-modal__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.bbai-modal__subtitle {
    margin: 0 0 18px;
    color: var(--bbai-gray-500);
    font-size: var(--bbai-text-sm);
}

/* ==================================================
   MODAL CLOSE BUTTON
   ================================================== */

.bbai-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
}

.bbai-modal__close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ==================================================
   MODAL BODY
   ================================================== */

.bbai-modal__body {
    padding: 2rem;
}

/* ==================================================
   MODAL ELEMENTS
   ================================================== */

.bbai-modal__label {
    display: block;
    font-weight: var(--bbai-font-semibold);
    margin-bottom: 8px;
    color: var(--bbai-gray-700);
}

.bbai-modal__textarea {
    width: 100%;
    min-height: 110px;
    border-radius: 10px;
    border: 1px solid var(--bbai-gray-300);
    font-size: var(--bbai-text-base);
    padding: 12px 14px;
    resize: vertical;
    color: var(--bbai-gray-800);
    background: var(--bbai-gray-50);
    margin-bottom: 18px;
    font-family: inherit;
}

.bbai-modal__textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: var(--bbai-input-focus-ring);
}

.bbai-modal__notice {
    background: var(--bbai-warning-light);
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}

.bbai-modal__actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bbai-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.bbai-modal__issues {
    margin: 0;
    padding-left: 18px;
    color: #b45309;
    font-size: var(--bbai-text-sm);
}

.bbai-modal__issues li + li {
    margin-top: 4px;
}

/* ==================================================
   MODAL FOOTER
   ================================================== */

.bbai-modal-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.bbai-modal-urgency {
    margin-bottom: 1rem;
}

.bbai-modal-note {
    margin: 0;
    color: #dc2626;
    font-size: 1rem;
    font-weight: 600;
    background: #fef2f2;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.bbai-modal-guarantee {
    margin-top: 1rem;
}

/* ==================================================
   MODAL ANIMATIONS
   ================================================== */

.bbai-modal-fade-in {
    animation: bbai-modal-fade-in 0.2s ease-out;
}

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

.bbai-modal-slide-up {
    animation: bbai-modal-slide-up 0.3s ease-out;
}

@keyframes bbai-modal-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-modal {
        padding: 20px;
        max-width: 100%;
    }

    .bbai-modal__content {
        width: 95%;
        max-height: 95vh;
    }

    .bbai-modal__header,
    .bbai-modal__body {
        padding: 1.25rem 1.5rem;
    }

    .bbai-modal__title {
        font-size: 1.25rem;
    }

    .bbai-modal-overlay {
        padding: 16px;
    }
}

/* ==================================================
   REGENERATE MODAL
   Modal for regenerating alt text with preview
   ================================================== */

.bbai-regenerate-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    animation: bbai-modal-fade-in 0.2s ease-out;
}

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

.bbai-regenerate-modal__content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bbai-modal-slide-up 0.3s ease-out;
}

.bbai-regenerate-modal__header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.bbai-regenerate-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.bbai-regenerate-modal__subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.bbai-regenerate-modal__body {
    padding: 24px;
}

.bbai-regenerate-modal__image-preview {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.bbai-regenerate-modal__thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.bbai-regenerate-modal__image-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bbai-regenerate-modal__image-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.bbai-regenerate-modal__image-meta {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.bbai-regenerate-modal__loading {
    display: none;
    text-align: center;
    padding: 32px 0;
}

.bbai-regenerate-modal__loading.active {
    display: block;
}

.bbai-regenerate-modal__spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: bbai-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.bbai-regenerate-modal__loading-text {
    font-size: 14px;
    color: #6b7280;
}

.bbai-regenerate-modal__result {
    display: none;
}

.bbai-regenerate-modal__result.active {
    display: block;
}

.bbai-regenerate-modal__alt-text-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.bbai-regenerate-modal__alt-text {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
    margin: 0 0 16px 0;
    min-height: 80px;
}

.bbai-regenerate-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.bbai-regenerate-modal__btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.bbai-regenerate-modal__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bbai-regenerate-modal__btn--cancel {
    background: #f3f4f6;
    color: #374151;
}

.bbai-regenerate-modal__btn--cancel:hover:not(:disabled) {
    background: #e5e7eb;
}

.bbai-regenerate-modal__btn--accept {
    background: #6366f1;
    color: white;
}

.bbai-regenerate-modal__btn--accept:hover:not(:disabled) {
    background: #4f46e5;
}

.bbai-regenerate-modal__error {
    display: none;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 16px;
}

.bbai-regenerate-modal__error.active {
    display: block;
}



/* Imported from: components/form.css */
/**
 * Form Component
 * Form fields, inputs, textareas, and labels
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   FORM GROUPS
   ================================================== */

.bbai-settings-form-group {
    margin-bottom: 24px;
}

.bbai-settings-form-group:last-child {
    margin-bottom: 0;
}

.bbai-settings-form-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 20px 0;
}

.bbai-settings-form-field--toggle {
    align-items: center;
}

.bbai-settings-form-field + .bbai-settings-form-field {
    border-top: 1px solid #e5e7eb;
}

/* ==================================================
   FORM LABELS
   ================================================== */

.bbai-settings-form-label,
.bbai-settings-license-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.bbai-settings-form-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ==================================================
   FORM INPUTS
   ================================================== */

.bbai-settings-form-input,
.bbai-settings-license-input,
.bbai-debug-filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    background: #fff;
}

.bbai-settings-license-input {
    font-family: 'Courier New', monospace;
    border-radius: 6px;
    border-color: #cbd5e1;
}

.bbai-settings-form-input:focus,
.bbai-settings-license-input:focus,
.bbai-debug-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================================================
   FORM TEXTAREA
   ================================================== */

.bbai-settings-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.bbai-settings-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================================================
   LICENSE INPUT GROUP
   ================================================== */

.bbai-settings-license-input-group {
    margin-bottom: 16px;
}

.bbai-settings-license-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.bbai-settings-license-activate-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.bbai-settings-license-activate-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.bbai-settings-license-activate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==================================================
   DEBUG FILTER
   ================================================== */

.bbai-debug-filter-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #6b7280;
}

.bbai-debug-filter-actions {
    display: flex;
    gap: 8px;
}

/* ==================================================
   FORM VALIDATION STATES
   ================================================== */

.bbai-settings-form-input.is-invalid,
.bbai-settings-form-textarea.is-invalid {
    border-color: #ef4444;
}

.bbai-settings-form-input.is-invalid:focus,
.bbai-settings-form-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.bbai-settings-form-input.is-valid,
.bbai-settings-form-textarea.is-valid {
    border-color: #10b981;
}

.bbai-settings-form-input.is-valid:focus,
.bbai-settings-form-textarea.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.bbai-form-error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #ef4444;
}

.bbai-form-success-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #10b981;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-settings-form-field {
        flex-direction: column;
        gap: 12px;
    }

    .bbai-settings-form-field--toggle {
        flex-direction: row;
        align-items: center;
    }

    .bbai-settings-form-input,
    .bbai-settings-form-textarea,
    .bbai-settings-license-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}



/* Imported from: components/toggle.css */
/**
 * Toggle Component
 * Toggle switch for on/off states
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   BASE TOGGLE
   ================================================== */

.bbai-settings-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.bbai-settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* ==================================================
   TOGGLE SLIDER
   ================================================== */

.bbai-settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.bbai-settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==================================================
   TOGGLE STATES
   ================================================== */

/* Green when ON (primary variant) */
.bbai-settings-toggle input:checked + .bbai-settings-toggle-slider {
    background-color: #22C55E;
}

.bbai-settings-toggle input:checked + .bbai-settings-toggle-slider:before {
    transform: translateX(24px);
}

.bbai-settings-toggle input:focus + .bbai-settings-toggle-slider {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* ==================================================
   TOGGLE VARIANTS
   ================================================== */

/* Teal variant */
.bbai-settings-toggle--teal input:checked + .bbai-settings-toggle-slider {
    background-color: #14b8a6;
}

.bbai-settings-toggle--teal input:focus + .bbai-settings-toggle-slider {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* Blue variant */
.bbai-settings-toggle--blue input:checked + .bbai-settings-toggle-slider {
    background-color: #3b82f6;
}

.bbai-settings-toggle--blue input:focus + .bbai-settings-toggle-slider {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ==================================================
   DISABLED STATE
   ================================================== */

.bbai-settings-toggle input:disabled + .bbai-settings-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.bbai-settings-toggle input:disabled + .bbai-settings-toggle-slider:before {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==================================================
   DEBUG CONTEXT TOGGLE
   ================================================== */

.bbai-debug-context-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.bbai-debug-context-toggle:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.bbai-debug-context-toggle.is-expanded {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* ==================================================
   TOGGLE SIZES
   ================================================== */

/* Small toggle */
.bbai-settings-toggle--small {
    width: 36px;
    height: 20px;
}

.bbai-settings-toggle--small .bbai-settings-toggle-slider:before {
    height: 14px;
    width: 14px;
}

.bbai-settings-toggle--small input:checked + .bbai-settings-toggle-slider:before {
    transform: translateX(16px);
}

/* Large toggle */
.bbai-settings-toggle--large {
    width: 56px;
    height: 28px;
}

.bbai-settings-toggle--large .bbai-settings-toggle-slider:before {
    height: 22px;
    width: 22px;
}

.bbai-settings-toggle--large input:checked + .bbai-settings-toggle-slider:before {
    transform: translateX(28px);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-settings-toggle {
        /* Slightly larger for easier mobile tapping */
        width: 52px;
        height: 26px;
    }

    .bbai-settings-toggle-slider:before {
        height: 20px;
        width: 20px;
    }

    .bbai-settings-toggle input:checked + .bbai-settings-toggle-slider:before {
        transform: translateX(26px);
    }
}



/* ==================================================
   FEATURE COMPONENTS - Dashboard
   Dashboard-specific components
   ================================================== */


/* Imported from: features/dashboard/hero.css */
/**
 * Dashboard Hero Component
 * Hero section with account banner, title, and CTA
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   HERO CONTAINER
   ================================================== */

.bbai-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.bbai-hero-title {
    font-size: 2.625rem;
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-gray-900);
    margin: 0 0 2.25rem 0;
    line-height: 1.2;
}

.bbai-hero .bbai-btn-primary {
    display: block;
    margin: 1rem auto 0;
}

/* ==================================================
   ACCOUNT BANNER
   ================================================== */

.bbai-account-banner {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.bbai-account-banner__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.bbai-account-banner__header h3 {
    margin: 12px 0 6px 0;
    font-size: 1.25rem;
    font-weight: var(--bbai-font-bold);
    color: #0f172a;
}

.bbai-account-banner__header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* ==================================================
   ACCOUNT CHIP
   ================================================== */

.bbai-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #0f172a;
    font-weight: 600;
    font-size: 0.85rem;
}

.bbai-account-chip::before {
    content: '🔒';
}

/* ==================================================
   ACCOUNT PLAN
   ================================================== */

.bbai-account-plan {
    text-align: right;
}

.bbai-account-plan-label {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.bbai-account-plan small {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ==================================================
   ACCOUNT ACTIONS
   ================================================== */

.bbai-account-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.bbai-account-btn {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.bbai-account-btn:hover {
    border-color: #cbd5f5;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.bbai-account-btn--primary {
    background: linear-gradient(135deg, #14b8a6 0%, #84cc16 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
}

.bbai-account-btn--primary:hover {
    opacity: 0.92;
}

.bbai-account-btn--ghost {
    background: transparent;
    border: none;
    color: #ef4444;
    box-shadow: none;
}

.bbai-account-btn--ghost:hover {
    color: #dc2626;
}

/* ==================================================
   ACCOUNT HELP TEXT
   ================================================== */

.bbai-account-help {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-hero-title {
        font-size: var(--bbai-text-xl);
    }

    .bbai-account-banner {
        padding: 20px 24px;
    }

    .bbai-account-banner__header {
        flex-direction: column;
    }

    .bbai-account-plan {
        text-align: left;
    }
}



/* Imported from: features/dashboard/usage-card.css */
/**
 * Dashboard Usage Card Component
 * Usage tracking card with circular progress and details
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   USAGE CARD CIRCULAR (Horizontal Layout)
   ================================================== */

.bbai-usage-card-circular {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 0;
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.bbai-usage-card-circular:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #e5e7eb;
}

.bbai-usage-circular-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.bbai-usage-circular-link {
    margin-top: 0;
}

/* ==================================================
   USAGE CARD (Vertical Layout)
   ================================================== */

.bbai-usage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    padding: 32px;
    justify-content: space-between;
    position: relative;
    align-self: stretch !important;
    height: 100% !important;
}

.bbai-usage-card--full-width {
    flex: 1 1 100% !important;
    max-width: 100% !important;
}

.bbai-usage-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px 0;
}

/* ==================================================
   USAGE RING WRAPPER
   ================================================== */

.bbai-usage-ring-wrapper {
    position: relative;
    display: inline-block;
}

.bbai-usage-tooltip {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    color: #6b7280;
    transition: all 0.2s ease;
    padding: 0;
}

.bbai-usage-tooltip:hover {
    background: #e5e7eb;
    color: #374151;
}

.bbai-usage-tooltip svg {
    width: 14px;
    height: 14px;
}

/* ==================================================
   USAGE LINKS
   ================================================== */

.bbai-usage-upgrade-link,
.bbai-usage-billing-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    color: #7B61FF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    padding-top: 4px;
}

.bbai-usage-upgrade-link:hover,
.bbai-usage-billing-link:hover {
    color: #6B4FE8;
    text-decoration: underline;
}

.bbai-upgrade-inline {
    color: var(--bbai-info);
    text-decoration: none;
    font-weight: var(--bbai-font-semibold);
}

.bbai-upgrade-inline:hover {
    text-decoration: underline;
}

/* ==================================================
   USAGE DETAILS
   ================================================== */

.bbai-usage-details {
    flex: 1;
}

.bbai-usage-text {
    font-size: 15px;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.5;
    font-weight: 500;
}

.bbai-usage-text strong {
    font-weight: 600;
    color: #111827;
}

.bbai-usage-microcopy {
    font-size: 13px;
    color: #677388;
    margin-top: 4px;
}

/* ==================================================
   CIRCULAR PROGRESS OVERRIDES (Dashboard Context)
   ================================================== */

.bbai-usage-card .bbai-circular-progress {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

/* ==================================================
   GRADIENT DEFINITION
   ================================================== */

.bbai-circular-progress-svg defs {
    display: none;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-usage-card-circular {
        padding: 28px 24px;
        margin-bottom: 32px !important;
        width: 100% !important;
    }

    .bbai-usage-circular-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 28px;
    }

    .bbai-usage-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .bbai-usage-card-title {
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .bbai-usage-card-circular {
        padding: 24px 20px;
    }
}



/* Imported from: features/dashboard/metrics.css */
/**
 * Dashboard Metrics Component
 * Metrics grid, time saved card, optimization cards
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   METRICS GRID
   ================================================== */

.bbai-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.bbai-optimization-main-card {
    margin-bottom: 0;
}

/* ==================================================
   METRIC ICON (Alternate Style)
   ================================================== */

.bbai-metric-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: #677388;
    opacity: 0.6;
}

.bbai-metric-icon svg {
    width: 22px;
    height: 22px;
}

/* ==================================================
   TIME SAVED CARD
   ================================================== */

.bbai-time-saved-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    border: 1px solid #10b981 !important;
    border-radius: 12px !important;
    padding: 28px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* ==================================================
   OPTIMIZATION CARD
   ================================================== */

.bbai-optimization-card {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 28px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: box-shadow 0.2s ease !important;
    position: relative;
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: 20px;
    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: 30px;
}

.bbai-optimization-card:hover {
    box-shadow: var(--bbai-card-shadow-hover) !important;
}

.bbai-optimization-card--complete {
    border-left: 6px solid #0EAD4B;
    box-shadow: 0 0 0 1px rgba(14, 173, 75, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-optimization-accent-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #0EAD4B;
}

/* ==================================================
   OPTIMIZATION HEADER
   ================================================== */

.bbai-optimization-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.bbai-optimization-success-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #0EAD4B;
    border-radius: 6px;
    flex-shrink: 0;
}

.bbai-optimization-success-chip svg {
    width: 16px;
    height: 16px;
}

.bbai-optimization-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbai-optimization-check-icon {
    color: #0EAD4B;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
}

/* ==================================================
   OPTIMIZATION PROGRESS (Dashboard Context)
   ================================================== */

.bbai-optimization-progress {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
}

.bbai-optimization-progress-bar {
    height: 6px !important;
    background: #f3f4f6 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    margin: 20px 0 !important;
    width: 100%;
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
}

.bbai-optimization-progress-bar .bbai-optimization-progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #8b5cf6 0%, #a855f7 100%) !important;
    border-radius: 999px !important;
    transition: width 0.3s ease !important;
}

/* ==================================================
   OPTIMIZATION STATS
   ================================================== */

.bbai-optimization-stats {
    display: flex !important;
    justify-content: space-between !important;
    margin-top: 16px !important;
}

.bbai-optimization-stat {
    text-align: center !important;
}

.bbai-optimization-stat-label {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 600 !important;
}

.bbai-optimization-stat-value {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* ==================================================
   INFO NOTICE
   ================================================== */

.bbai-info-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 30px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid #3B82F6;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.bbai-info-notice svg {
    flex-shrink: 0;
    color: #3B82F6;
}

.bbai-info-notice span {
    font-size: 14px;
    color: #677388;
    line-height: 1.6;
}

/* ==================================================
   DASHBOARD ACTIONS
   ================================================== */

.bbai-dashboard-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 32px !important;
    align-items: center !important;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bbai-time-saved-card,
    .bbai-info-notice,
    .bbai-optimization-card {
        margin-bottom: 32px !important;
        width: 100% !important;
    }

    .bbai-optimization-title {
        font-size: 20px;
    }

    .bbai-optimization-stat-value {
        font-size: 20px !important;
    }
}

@media (max-width: 640px) {
    .bbai-time-saved-card,
    .bbai-optimization-card {
        padding: 20px !important;
    }

    .bbai-optimization-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .bbai-optimization-stat {
        flex: 1 1 45%;
    }
}



/* ==================================================
   FEATURE COMPONENTS - Library
   Image library components
   ================================================== */


/* Imported from: features/library/grid.css */
/**
 * Library Grid Component
 * Main library layout with sidebar
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   LIBRARY GRID LAYOUT
   ================================================== */

.bbai-library-grid,
.bbai-guide-grid,
.bbai-table-scroll {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.bbai-library-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
    align-items: flex-start;
}

.bbai-library-main {
    min-width: 0;
}

.bbai-library-sidebar {
    position: relative;
}

.bbai-library-table-card--full-width {
    grid-column: 1 / -1;
}

/* ==================================================
   GUIDE GRID
   ================================================== */

.bbai-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* ==================================================
   TABLE SCROLL CONTAINER
   ================================================== */

.bbai-table-scroll {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.bbai-table-scroll table {
    min-width: 720px;
    border-collapse: collapse;
}

/* ==================================================
   LIBRARY TABLE SPECIFICS
   ================================================== */

.bbai-library-table th,
.bbai-library-table td {
    word-break: break-word;
}

/* ==================================================
   LIBRARY ROW STATES
   ================================================== */

.bbai-library-row {
    transition: background-color 0.2s ease;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 1200px) {
    .bbai-library-grid {
        grid-template-columns: 1fr;
    }

    .bbai-library-sidebar {
        position: static;
    }

    .bbai-pro-upsell-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 1080px) {
    .bbai-library-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .bbai-guide-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .bbai-library-controls {
        flex-direction: column;
    }

    .bbai-search-wrapper {
        min-width: 100%;
    }

    .bbai-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .bbai-library-table {
        font-size: 13px;
    }

    .bbai-library-table th,
    .bbai-library-table td {
        padding: 10px 12px !important;
    }
}

@media (max-width: 640px) {
    .bbai-library-stats {
        font-size: 13px !important;
    }
}



/* Imported from: features/library/table.css */
/**
 * Library Table Component
 * Image library table with filters and row states
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   LIBRARY CONTAINER
   ================================================== */

.bbai-library {
    background: var(--bbai-white);
    border: 1px solid var(--bbai-border-primary);
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-4) var(--bbai-space-4) var(--bbai-space-2);
    box-shadow: var(--bbai-shadow-sm);
}

/* ==================================================
   LIBRARY INTRO
   ================================================== */

.bbai-library__intro {
    padding: var(--bbai-space-2) var(--bbai-space-2) var(--bbai-space-5);
    border-bottom: 1px solid var(--bbai-border-primary);
}

.bbai-library__intro h2 {
    margin: 0 0 var(--bbai-space-1) 0;
}

/* ==================================================
   LIBRARY FILTERS BAR
   ================================================== */

.bbai-library__filters {
    display: flex;
    gap: var(--bbai-space-2);
    align-items: center;
    padding: var(--bbai-space-4) var(--bbai-space-2);
}

/* ==================================================
   LIBRARY TABLE
   ================================================== */

.bbai-library__table,
.bbai-audit__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.bbai-library__table thead th {
    font-size: var(--bbai-text-xs);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bbai-gray-500);
    padding: var(--bbai-space-2) var(--bbai-space-3);
}

.bbai-library__table tbody tr {
    background: var(--bbai-gray-50);
    border: 1px solid var(--bbai-border-primary);
    border-radius: 10px;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-library__table tbody td {
    padding: .9rem .9rem;
    vertical-align: middle;
}

.bbai-library__table td:last-child,
.bbai-library__table th:last-child {
    background: transparent;
}

/* ==================================================
   LIBRARY ROW STATES
   ================================================== */

.bbai-library__row--recent {
    outline: 2px solid rgba(59, 130, 246, .15);
}

.bbai-library__row--missing {
    outline: 2px solid rgba(245, 158, 11, .18);
}

.bbai-library__row--updated {
    animation: bbaiRowHighlight 1.6s ease-out;
}

@keyframes bbaiRowHighlight {
    0% {
        background-color: rgba(59, 130, 246, 0.12);
    }
    60% {
        background-color: rgba(59, 130, 246, 0.06);
    }
    100% {
        background-color: transparent;
    }
}

/* ==================================================
   LIBRARY BUTTON TRANSITIONS
   ================================================== */

.bbai-library .button {
    transition: var(--bbai-transition);
}

.bbai-library .button:hover {
    transform: translateY(-1px);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-library {
        padding: var(--bbai-space-3) var(--bbai-space-3) var(--bbai-space-2);
    }

    .bbai-library__intro {
        padding: var(--bbai-space-2) var(--bbai-space-1) var(--bbai-space-4);
    }

    .bbai-library__filters {
        padding: var(--bbai-space-3) var(--bbai-space-1);
    }

    .bbai-library__table tbody td {
        padding: .7rem .7rem;
    }
}



/* Imported from: features/library/filters.css */
/**
 * Library Filters Component
 * Filter buttons and search wrapper
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   SEARCH WRAPPER
   ================================================== */

.bbai-search-wrapper {
    position: relative;
}

/* ==================================================
   FILTER BUTTONS
   ================================================== */

.bbai-filter-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bbai-filter-btn:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
}

.bbai-filter-btn.active {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1e40af !important;
}

/* ==================================================
   FILTERS CONTAINER
   ================================================== */

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

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-search-wrapper {
        min-width: 100%;
    }

    .bbai-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .bbai-filter-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
    }
}

@media (max-width: 640px) {
    .bbai-filter-btn {
        font-size: 13px !important;
        padding: 7px 12px !important;
    }
}



/* Imported from: features/library/thumbnail.css */
/**
 * Library Thumbnail Component
 * Image thumbnails and placeholders
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   THUMBNAIL WRAPPER
   ================================================== */

.bbai-thumb-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================================================
   THUMBNAIL IMAGE
   ================================================== */

.bbai-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--bbai-radius-sm);
    border: 1px solid var(--bbai-border-primary);
    box-shadow: var(--bbai-shadow-xs);
}

/* Alternate size */
.bbai-thumb-wrapper .bbai-thumb {
    width: 100%;
    height: 100%;
}

/* ==================================================
   THUMBNAIL PLACEHOLDER
   ================================================== */

.bbai-thumb--placeholder {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-thumb {
        width: 48px;
        height: 48px;
    }

    .bbai-thumb-wrapper {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 640px) {
    .bbai-thumb {
        width: 44px;
        height: 44px;
    }

    .bbai-thumb-wrapper {
        width: 44px;
        height: 44px;
    }
}



/* ==================================================
   FEATURE COMPONENTS - Settings
   Settings page components
   ================================================== */


/* Imported from: features/settings/page.css */
/**
 * Settings Page Component
 * Settings page layout, cards, and plan management
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   SETTINGS PAGE CONTAINER
   ================================================== */

.bbai-settings-container h1,
.bbai-settings-container h2 {
    font-family: var(--bbai-font-family-heading);
}

.bbai-settings-page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    background: #F9FAFB;
}

/* ==================================================
   PAGE HEADER
   ================================================== */

.bbai-settings-page-header {
    text-align: center;
    padding: 0 0 40px;
}

.bbai-settings-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.bbai-settings-page-subtitle {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* ==================================================
   SITE-WIDE SETTINGS BANNER
   ================================================== */

.bbai-settings-sitewide-banner {
    background: #F0F7FF;
    border: 1px solid #D0E7FF;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bbai-settings-sitewide-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.bbai-settings-sitewide-content {
    flex: 1;
}

.bbai-settings-sitewide-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
}

.bbai-settings-sitewide-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}

/* ==================================================
   SETTINGS CARD
   ================================================== */

.bbai-settings-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-settings-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.bbai-settings-card-header-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.bbai-settings-card-header-icon svg {
    width: 100%;
    height: 100%;
}

.bbai-settings-card-header-content {
    flex: 1;
}

.bbai-settings-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.bbai-settings-card-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ==================================================
   PLAN SUMMARY CARD
   ================================================== */

.bbai-settings-plan-summary-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #EAECF0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    padding: 28px;
    margin-bottom: 40px;
    position: relative;
}

.bbai-settings-plan-badge-top {
    position: absolute;
    top: 20px;
    left: 20px;
}

.bbai-settings-plan-badge-text {
    display: inline-block;
    padding: 4px 12px;
    background: #F3F4F6;
    color: #6B7280;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bbai-settings-plan-quota {
    margin: 60px 0 24px;
    text-align: center;
}

.bbai-settings-plan-quota-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.bbai-settings-plan-quota-used,
.bbai-settings-plan-quota-limit {
    display: inline-block;
}

.bbai-settings-plan-quota-divider {
    color: #9CA3AF;
    font-weight: 300;
}

.bbai-settings-plan-quota-label {
    font-size: 14px;
    color: #6B7280;
    margin-top: 8px;
}

/* ==================================================
   PLAN STATUS CARD
   ================================================== */

.bbai-settings-plan-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-settings-plan-card--free {
    background: linear-gradient(135deg, #2bb8ff 0%, #0070f3 100%);
    border: none;
    color: white;
}

.bbai-settings-plan-card--pro {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.bbai-settings-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bbai-settings-plan-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bbai-settings-plan-badge--free {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.bbai-settings-plan-badge--pro {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.bbai-settings-plan-renewal {
    text-align: right;
}

.bbai-settings-plan-renewal-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    opacity: 0.9;
}

.bbai-settings-plan-renewal-date {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.bbai-settings-plan-usage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.bbai-settings-plan-usage-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bbai-settings-plan-usage-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.bbai-settings-plan-usage-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 4px;
}

.bbai-settings-plan-usage-divider {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.7;
}

.bbai-settings-plan-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
}

.bbai-settings-plan-card--free .bbai-settings-plan-progress {
    background: rgba(255, 255, 255, 0.25);
}

.bbai-settings-plan-card--pro .bbai-settings-plan-progress {
    background: rgba(255, 255, 255, 0.25);
}

.bbai-settings-plan-progress-bar {
    height: 100%;
    background: white;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.bbai-settings-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.bbai-settings-plan-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.bbai-settings-plan-feature svg {
    flex-shrink: 0;
}

.bbai-settings-plan-card--free .bbai-settings-plan-feature svg,
.bbai-settings-plan-card--pro .bbai-settings-plan-feature svg {
    color: white;
}

.bbai-settings-plan-upgrade-btn {
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #111827;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bbai-settings-plan-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-settings-page {
        margin: 20px auto;
        padding: 0 16px;
    }

    .bbai-settings-page-title {
        font-size: 24px;
    }

    .bbai-settings-plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .bbai-settings-plan-renewal {
        text-align: left;
    }

    .bbai-settings-plan-features {
        margin-bottom: 20px;
    }

    .bbai-settings-form-field--toggle {
        flex-direction: row;
        align-items: center;
    }

    .bbai-settings-plan-usage-value {
        font-size: 28px;
    }

    .bbai-settings-plan-quota-meter {
        font-size: 28px;
    }
}



/* Imported from: features/settings/account.css */
/**
 * Settings Account Component
 * Account status, actions, and info banners
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   ACCOUNT STATUS
   ================================================== */

.bbai-settings-account-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 20px;
}

.bbai-settings-account-status-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.bbai-settings-account-status-value {
    font-size: 14px;
    color: #111827;
    font-weight: 700;
}

/* ==================================================
   ACCOUNT ACTIONS
   ================================================== */

.bbai-settings-account-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.bbai-settings-account-action-btn {
    width: 100%;
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.bbai-settings-account-action-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.bbai-settings-account-action-info {
    padding: 16px;
    background: #f9fafb;
    border-radius: 6px;
}

.bbai-settings-account-action-info p {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.bbai-settings-account-action-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bbai-settings-account-action-info li {
    font-size: 13px;
    color: #374151;
    padding-left: 24px;
    position: relative;
}

.bbai-settings-account-action-info li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

/* ==================================================
   INFO BANNER
   ================================================== */

.bbai-settings-info-banner {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bbai-settings-info-banner svg {
    flex-shrink: 0;
    color: #0284c7;
}

/* ==================================================
   UPSELL BANNER
   ================================================== */

.bbai-settings-upsell-banner {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
}

.bbai-settings-upsell-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.bbai-settings-upsell-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.bbai-settings-upsell-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}

.bbai-settings-upsell-features li:before {
    content: '✓';
    font-weight: 700;
    color: #86efac;
}

.bbai-settings-upsell-btn {
    width: 100%;
    padding: 12px 24px;
    background: white;
    color: #7c3aed;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bbai-settings-upsell-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ==================================================
   PRO UPSELL BANNER
   ================================================== */

.bbai-settings-pro-upsell-banner {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    color: white;
    text-align: center;
}

.bbai-settings-pro-upsell-btn {
    display: inline-block;
    padding: 12px 28px;
    background: white;
    color: #7c3aed;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bbai-settings-pro-upsell-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-settings-account-action-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .bbai-settings-upsell-banner {
        padding: 20px;
    }

    .bbai-settings-pro-upsell-banner {
        padding: 20px;
    }

    .bbai-settings-pro-upsell-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}



/* ==================================================
   FEATURE COMPONENTS - Pricing
   Pricing and upsell components
   ================================================== */


/* Imported from: features/pricing/cards.css */
/**
 * Pricing Cards Component
 * Pricing options and plan cards
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   PRICING OPTIONS GRID
   ================================================== */

.bbai-pricing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ==================================================
   PRICING CARD
   ================================================== */

.bbai-pricing-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.bbai-pricing-card--pro {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.bbai-pricing-card--featured {
    border-color: #1d4ed8;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

.bbai-pricing-card--credits {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.bbai-pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

/* ==================================================
   PRICING HEADER
   ================================================== */

.bbai-pricing-header h4 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

/* ==================================================
   PRICING PRICE
   ================================================== */

.bbai-pricing-price {
    margin-bottom: 1.5rem;
}

.bbai-pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
}

.bbai-pricing-period {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.bbai-pricing-savings {
    font-size: 0.875rem;
    color: #059669;
    font-weight: 600;
    margin-top: 0.5rem;
}

.bbai-pricing-value {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ==================================================
   PRICING FEATURES
   ================================================== */

.bbai-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.bbai-pricing-features li {
    padding: 0.5rem 0;
    color: #374151;
    font-size: 0.875rem;
}

/* ==================================================
   PRICING BUTTONS
   ================================================== */

.bbai-pricing-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.bbai-pricing-btn--primary {
    background: #3b82f6;
    color: white;
}

.bbai-pricing-btn--primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.bbai-pricing-btn--secondary {
    background: #10b981;
    color: white;
}

.bbai-pricing-btn--secondary:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-pricing-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bbai-pricing-card--featured {
        transform: scale(1);
    }

    .bbai-pricing-amount {
        font-size: 2rem;
    }
}



/* Imported from: features/pricing/upsell.css */
/**
 * Pro Upsell Card Component
 * Premium upgrade card for sidebar
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   PRO UPSELL CARD
   ================================================== */

.bbai-pro-upsell-card {
    background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.bbai-pro-upsell-card:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
    transform: translateY(-2px);
}

/* ==================================================
   PRO UPSELL HEADER
   ================================================== */

.bbai-pro-upsell-header {
    margin-bottom: 28px;
}

.bbai-pro-upsell-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ==================================================
   PRO UPSELL FEATURES
   ================================================== */

.bbai-pro-upsell-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.bbai-pro-upsell-features li {
    display: flex;
    align-items: start;
    gap: 14px;
    padding: 10px 0;
    color: white;
    font-size: 15px;
    line-height: 1.6;
}

.bbai-pro-upsell-features li:first-child {
    padding-top: 0;
}

.bbai-pro-upsell-features li:last-child {
    padding-bottom: 0;
}

.bbai-feature-check {
    flex-shrink: 0;
    margin-top: 3px;
}

/* ==================================================
   PRO UPSELL BUTTON
   ================================================== */

.bbai-btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
}

/* ==================================================
   PRICING BADGE
   ================================================== */

.bbai-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #1d4ed8;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.3);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 1200px) {
    .bbai-pro-upsell-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .bbai-pro-upsell-card {
        padding: 32px 24px;
    }

    .bbai-pro-upsell-title {
        font-size: 20px;
    }

    .bbai-pro-upsell-features li {
        font-size: 14px;
    }
}



/* ==================================================
   FEATURE COMPONENTS - Bulk Operations
   Bulk optimization components
   ================================================== */


/* Imported from: features/bulk/operations.css */
/**
 * Bulk Operations Component
 * Bulk optimization progress and buttons
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   BULK PROGRESS INDICATOR
   ================================================== */

.bbai-bulk-progress {
    margin-top: 16px;
    background: var(--bbai-info-bg);
    border-radius: var(--bbai-radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 14px 16px;
    color: #312e81;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.bbai-bulk-progress[hidden] {
    display: none !important;
}

.bbai-bulk-progress:not([hidden]) {
    display: flex !important;
}

.bbai-bulk-progress__header {
    display: flex;
    justify-content: space-between;
    font-weight: var(--bbai-font-semibold);
    font-size: var(--bbai-text-sm);
}

.bbai-bulk-progress__counts {
    color: #4338ca;
    font-weight: var(--bbai-font-medium);
}

.bbai-bulk-progress__bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(99, 102, 241, 0.18);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
}

.bbai-bulk-progress__bar span {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: width var(--bbai-transition-base) ease;
}

/* ==================================================
   BULK OPTIMIZATION BUTTON
   ================================================== */

.bbai-bulk-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 16px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 2px 4px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.bbai-bulk-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.bbai-bulk-btn:hover:not(:disabled)::before {
    left: 100%;
}

.bbai-bulk-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.4), 0 4px 8px rgba(59, 130, 246, 0.3);
}

.bbai-bulk-btn:disabled,
.bbai-bulk-btn.loading {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

.bbai-bulk-btn:disabled:hover,
.bbai-bulk-btn.loading:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bbai-bulk-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 8px -2px rgba(59, 130, 246, 0.3);
}

/* ==================================================
   BULK BUTTON - LIMIT STATE
   ================================================== */

.bbai-bulk-btn--limit {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem 1rem 2.5rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3), 0 2px 4px rgba(239, 68, 68, 0.2);
}

.bbai-bulk-btn--limit::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.bbai-bulk-btn--limit:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.3);
}

.bbai-bulk-btn--limit:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px -2px rgba(239, 68, 68, 0.3);
}

.bbai-bulk-btn__badge {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #ffffff;
    position: relative;
    z-index: 1;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 640px) {
    .bbai-bulk-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .bbai-bulk-btn--limit {
        padding: 1rem 2rem 0.875rem 2rem;
    }
}



/* ==================================================
   FEATURE COMPONENTS - Debug
   Debug dashboard components
   ================================================== */


/* Imported from: features/debug/dashboard.css */
/**
 * Debug Dashboard Component
 * Debug logging interface with filters and tables
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   DEBUG STATS CARD
   ================================================== */

.bbai-debug-stats-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-debug-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.bbai-debug-stats-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.bbai-debug-stats-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bbai-debug-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    border-top: 1px solid #f3f4f6;
    padding-top: 24px;
}

.bbai-debug-stat-item {
    display: flex;
    flex-direction: column;
}

.bbai-debug-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.bbai-debug-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.bbai-debug-stat-value--warning {
    color: #f59e0b;
}

.bbai-debug-stat-value--error {
    color: #ef4444;
}

.bbai-debug-stat-value--small {
    font-size: 16px;
    font-weight: 600;
}

/* ==================================================
   DEBUG FILTERS
   ================================================== */

.bbai-debug-filters-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-debug-filters-form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.bbai-debug-filter-group {
    flex: 1;
    min-width: 150px;
}

.bbai-debug-filter-group--search {
    flex: 2;
    min-width: 200px;
}

.bbai-debug-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.bbai-debug-filter-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #6b7280;
}

.bbai-debug-filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bbai-debug-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bbai-debug-filter-actions {
    display: flex;
    gap: 8px;
}

/* ==================================================
   DEBUG BUTTONS
   ================================================== */

.bbai-debug-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bbai-debug-btn--primary {
    background: #3b82f6;
    color: white;
}

.bbai-debug-btn--primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.bbai-debug-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.bbai-debug-btn--secondary:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.bbai-debug-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bbai-debug-btn--upsell {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 15px;
}

/* ==================================================
   DEBUG TABLE
   ================================================== */

.bbai-debug-table-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-debug-table {
    width: 100%;
    border-collapse: collapse;
}

.bbai-debug-table thead {
    background: #f9fafb;
}

.bbai-debug-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.bbai-debug-table-row {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.bbai-debug-table-row:nth-child(even) {
    background: #fafbfc;
}

.bbai-debug-table-row:hover {
    background: #f9fafb;
}

.bbai-debug-table-cell {
    padding: 10px 16px;
    font-size: 13px;
    color: #374151;
}

.bbai-debug-table-cell--timestamp {
    color: #6b7280;
    white-space: nowrap;
}

.bbai-debug-table-cell--message {
    color: #111827;
    max-width: 500px;
    word-break: break-word;
}

.bbai-debug-table-empty {
    text-align: center;
    padding: 60px 24px;
    color: #6b7280;
    font-size: 14px;
}

/* ==================================================
   DEBUG BADGE
   ================================================== */

.bbai-debug-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.bbai-debug-badge-icon {
    font-size: 14px;
    line-height: 1;
}

.bbai-debug-badge-text {
    line-height: 1.4;
}

/* ==================================================
   DEBUG CONTEXT
   ================================================== */

.bbai-debug-context-toggle {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
}

.bbai-debug-context-toggle:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.bbai-debug-context-toggle.is-expanded {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.bbai-debug-context-empty {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
}

.bbai-debug-context-row {
    background: #fafbfc;
}

.bbai-debug-context-cell {
    padding: 0;
}

.bbai-debug-context-content {
    padding: 16px;
    background: #1f2937;
    border-radius: 6px;
    margin: 8px 16px;
}

.bbai-debug-context-json {
    margin: 0;
    padding: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #e5e7eb;
    background: transparent;
    border: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.bbai-debug-context-json::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.bbai-debug-context-json::-webkit-scrollbar-track {
    background: #111827;
    border-radius: 4px;
}

.bbai-debug-context-json::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

.bbai-debug-context-json::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* ==================================================
   DEBUG UPSELL
   ================================================== */

.bbai-debug-upsell-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-debug-upsell-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 20px;
}

.bbai-debug-upsell-features {
    list-style: none;
    padding: 0;
    margin: 0 0 0;
    display: inline-block;
    text-align: left;
}

.bbai-debug-upsell-features li {
    font-size: 14px;
    color: #1e40af;
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}

.bbai-debug-upsell-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

.bbai-debug-upsell-btn {
    margin-top: 32px;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.bbai-debug-upsell-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ==================================================
   DEBUG PAGINATION
   ================================================== */

.bbai-debug-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bbai-debug-pagination-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 768px) {
    .bbai-debug-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .bbai-debug-filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-debug-filter-group {
        min-width: 100%;
    }

    .bbai-debug-filter-actions {
        width: 100%;
        justify-content: stretch;
    }

    .bbai-debug-filter-actions .bbai-debug-btn {
        flex: 1;
    }

    .bbai-debug-pagination {
        flex-direction: column;
        gap: 16px;
    }

    .bbai-debug-pagination-info {
        order: -1;
    }
}

@media (max-width: 480px) {
    .bbai-debug-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Source: assets/css/bbai-admin.css */
.bbai-container.bbai-content-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top + horizontal canvas: .bbai-page-inner.bbai-page-container (status-card-refresh) */
.bbai-page {
    padding-top: 0;
}

.bbai-page-inner:not(.bbai-page-container) {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--section-spacing, 24px)
        calc(var(--section-spacing, 24px) + var(--card-gap, 16px));
    box-sizing: border-box;
}

.bbai-page-inner.bbai-page-container > .bbai-container,
.bbai-page-inner.bbai-page-container > .bbai-clean-dashboard,
.bbai-page-inner.bbai-page-container > .bbai-library-container,
.bbai-page-inner.bbai-page-container > .bbai-analytics-page,
.bbai-page-inner.bbai-page-container > .bbai-settings-page,
.bbai-page-inner.bbai-page-container > .bbai-guide-page,
.bbai-page-inner.bbai-page-container > .bbai-credit-usage-page,
.bbai-page-inner.bbai-page-container > .bbai-debug-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    min-height: 0;
    box-sizing: border-box;
}

.bbai-page-inner.bbai-page-container .bbai-dashboard-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 1024px) {
    .bbai-page-inner:not(.bbai-page-container) {
        padding: 0 var(--section-spacing, 24px)
            calc(var(--section-spacing, 24px) + var(--card-gap, 16px));
    }
}

@media (max-width: 782px) {
    .bbai-page-inner:not(.bbai-page-container) {
        padding-left: var(--section-spacing, 24px);
        padding-right: var(--section-spacing, 24px);
    }
}

.bbai-setup-wizard-launch {
    margin: 8px 0 0;
}

.bbai-setup-wizard {
    margin: 16px 0 24px;
}

.bbai-setup-wizard[hidden] {
    display: none !important;
}

.bbai-setup-wizard__panel {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 20px;
}

.bbai-setup-wizard__header {
    margin-bottom: 16px;
}

.bbai-setup-wizard__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.bbai-setup-wizard__subtitle {
    margin: 6px 0 0;
    color: #50575e;
}

.bbai-setup-stepper {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.bbai-setup-stepper__item {
    flex: 1;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    color: #50575e;
    font-size: 12px;
    line-height: 1.4;
}

.bbai-setup-stepper__item.is-active {
    background: #e7f0f7;
    border-color: #72aee6;
    color: #1d2327;
    font-weight: 600;
}

.bbai-setup-stepper__item.is-complete {
    background: #ecf7ed;
    border-color: #5cb85c;
    color: #1d2327;
}

.bbai-setup-wizard__section {
    margin-bottom: 16px;
}

.bbai-setup-wizard__section:last-child {
    margin-bottom: 0;
}

.bbai-setup-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}

.bbai-setup-stats__card {
    min-width: 170px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 10px 12px;
    background: #f6f7f7;
}

.bbai-setup-stats__label {
    display: block;
    color: #50575e;
    font-size: 12px;
}

.bbai-setup-stats__value {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.bbai-setup-thumbs,
.bbai-setup-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.bbai-setup-preview-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.bbai-setup-thumb,
.bbai-setup-preview-card {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    padding: 10px;
}

.bbai-setup-thumb img,
.bbai-setup-preview-card img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
    background: #f6f7f7;
}

.bbai-setup-thumb__title,
.bbai-setup-preview-card__title {
    margin: 8px 0 0;
    font-size: 12px;
    color: #1d2327;
}

.bbai-setup-preview-card__alt {
    margin: 8px 0 0;
    font-size: 13px;
    color: #1d2327;
}

.bbai-setup-wizard__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bbai-setup-wizard__actions .button {
    margin: 0;
}

.bbai-setup-wizard .button[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

.bbai-setup-progress {
    margin: 12px 0;
}

.bbai-setup-progress__meta {
    margin: 0 0 6px;
    color: #1d2327;
    font-weight: 600;
}

.bbai-setup-progress__track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e0e0e0;
}

.bbai-setup-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #72aee6);
    width: 0;
    transition: width 0.2s ease;
}

.bbai-setup-next-actions {
    margin: 12px 0 0;
    padding-left: 18px;
}

.bbai-setup-next-actions li {
    margin: 6px 0;
}

.bbai-setup-wizard .notice {
    margin: 0 0 12px;
}

.bbai-setup-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.bbai-setup-modal {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    padding: 18px;
}

.bbai-setup-modal__title {
    margin: 0;
    font-size: 18px;
}

.bbai-setup-modal__body {
    margin: 10px 0 0;
    color: #1d2327;
}

.bbai-setup-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Hide legacy inline banner variant only */
.bbai-quota-exhausted-banner {
    display: none !important;
}

/* ALT Library page polish */
.bbai-modern .bbai-library-container .bbai-page-header {
    margin-bottom: 18px;
}

.bbai-modern .bbai-library-container .bbai-subtitle {
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.55;
    max-width: 720px;
    color: var(--bbai-admin-color-text-secondary, #475569);
}

.bbai-modern .bbai-library-actions-card {
    padding: 14px 18px;
}

.bbai-modern .bbai-optimization-actions-helper {
    margin: 0 0 8px;
    font-size: 13px;
    color: #475569;
}

.bbai-modern .bbai-library-actions-card .bbai-optimization-cta[disabled] {
    opacity: 1;
    cursor: not-allowed;
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
    box-shadow: none;
}

.bbai-modern .bbai-library-actions-card .bbai-optimization-review-link {
    text-decoration: none;
    white-space: nowrap;
}

.bbai-modern .bbai-library-batch-actions {
    border-radius: 12px;
    background: #f8fafc;
    border-color: #e2e8f0;
    transition: all 0.2s ease;
}

.bbai-modern .bbai-library-batch-actions:not(.bbai-has-selection) #bbai-batch-regenerate {
    opacity: 0.6;
}

.bbai-modern .bbai-library-batch-actions.bbai-has-selection {
    border-color: #93c5fd;
    background: #eff6ff;
}

.bbai-modern .bbai-library-batch-actions__label {
    min-width: 82px;
    font-weight: 700;
    color: #1e293b;
}

.bbai-modern .bbai-library-table th,
.bbai-modern .bbai-library-table td {
    vertical-align: middle;
}

.bbai-modern .bbai-library-col-select,
.bbai-modern .bbai-library-cell--select {
    width: 40px;
}

.bbai-modern .bbai-library-col-image,
.bbai-modern .bbai-library-cell--image {
    width: 84px;
}

.bbai-modern .bbai-library-col-file,
.bbai-modern .bbai-library-cell--file {
    width: 24%;
}

.bbai-modern .bbai-library-col-alt,
.bbai-modern .bbai-library-cell--alt-text {
    width: 34%;
    max-width: 420px;
}

.bbai-modern .bbai-library-col-status,
.bbai-modern .bbai-library-cell--status {
    width: 120px;
}

.bbai-modern .bbai-library-col-updated,
.bbai-modern .bbai-library-cell--updated {
    width: 130px;
}

.bbai-modern .bbai-library-actions-header,
.bbai-modern .bbai-library-cell--actions {
    min-width: 188px;
}

.bbai-modern .bbai-library-filename {
    font-weight: 600;
    color: #0f172a;
}

.bbai-modern .bbai-library-filename-meta {
    color: #64748b;
    font-size: 12px;
}

.bbai-modern .bbai-alt-text-preview {
    font-size: 14px;
    color: #0f172a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.bbai-modern .bbai-library-row {
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.bbai-modern .bbai-library-row:hover {
    background: #f1f5f9;
    box-shadow: inset 2px 0 0 rgba(59, 130, 246, 0.55);
}

.bbai-modern .bbai-library-actions {
    gap: 10px;
}

.bbai-modern .bbai-library-action-lock {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #b91c1c;
}

.bbai-modern .bbai-status-badge,
.bbai-modern .bbai-quality-badge {
    border-radius: 999px;
    padding: 3px 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.bbai-modern .bbai-status-badge--optimized {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.bbai-modern .bbai-status-badge--missing {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.bbai-modern .bbai-status-badge--pending {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.bbai-modern .bbai-status-badge--error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.bbai-modern .bbai-quality-badge--good {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.bbai-modern .bbai-quality-badge--fair {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.bbai-modern .bbai-quality-badge--poor {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.bbai-modern .bbai-library-empty-state .bbai-card {
    border-style: dashed;
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.bbai-modern .bbai-library-empty-icon {
    color: #2563eb;
    margin-bottom: 8px;
}

.bbai-modern .bbai-library-empty-actions {
    margin-top: 14px;
}

/* Preview modal */
.bbai-modern .bbai-library-preview-modal__dialog {
    width: min(760px, 100%);
}

.bbai-modern .bbai-library-preview-modal__filename {
    margin-top: -6px;
    color: #64748b;
    font-size: 12px;
}

.bbai-modern .bbai-library-preview-modal__quality-value {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 2px 8px;
    font-size: 12px;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

.bbai-modern .bbai-library-preview-modal__status-value {
    font-size: 12px;
    line-height: 1.35;
}

.bbai-modern .bbai-library-preview-modal__quality-value--excellent {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

.bbai-modern .bbai-library-preview-modal__quality-value--good {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.bbai-modern .bbai-library-preview-modal__quality-value--needs-review,
.bbai-modern .bbai-library-preview-modal__quality-value--fair {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.bbai-modern .bbai-library-preview-modal__quality-value--poor {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.bbai-modern .bbai-library-preview-modal__image {
    border-radius: 14px;
}

.bbai-modern .bbai-library-preview-modal__actions .bbai-btn {
    min-height: 38px;
}

.bbai-modern .bbai-library-preview-modal__action--locked {
    background: #fffbeb !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 1px 3px rgba(146, 64, 14, 0.1) !important;
    color: #92400e !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.bbai-modern .bbai-library-preview-modal__action--locked:hover {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
}

/* Bottom upsell – modern SaaS upgrade card */
.bbai-modern .bbai-upgrade-usage-card .bbai-cta-microcopy,
.bbai-modern .bbai-upgrade-stats-box .bbai-cta-microcopy {
    color: #64748b !important;
}

.bbai-modern .bbai-upgrade-usage-card .bbai-compare-link,
.bbai-modern .bbai-upgrade-stats-box .bbai-compare-link {
    color: #3b82f6 !important;
}

/* ============================================
   LIBRARY TABLE ENHANCEMENTS
   ============================================ */

/* Stronger row hover */
.bbai-modern .bbai-library-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.bbai-modern .bbai-library-row:hover {
    background: #f1f5f9;
    box-shadow: inset 2px 0 0 rgba(59, 130, 246, 0.55);
}

/* Row text actions — always read as links (no “washed out” idle state) */
.bbai-modern .bbai-library-actions .bbai-link-sm {
    opacity: 1;
    font-weight: 600;
    font-size: 13px;
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.35);
    text-underline-offset: 2px;
    transition: color 0.15s ease, background 0.15s ease, text-decoration-color 0.15s ease;
}

.bbai-modern .bbai-library-row:hover .bbai-library-actions .bbai-link-sm {
    opacity: 1;
}

.bbai-modern .bbai-library-actions .bbai-link-sm:hover {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.08);
    text-decoration-color: rgba(29, 78, 216, 0.55);
}

.bbai-modern .bbai-library-actions .bbai-link-sm:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.bbai-modern .bbai-library-actions .bbai-link-sm--disabled {
    color: #94a3b8 !important;
    text-decoration: none !important;
    cursor: not-allowed !important;
    opacity: 1;
    pointer-events: none;
}

.bbai-modern .bbai-library-actions .bbai-link-sm--disabled:hover {
    background: none !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
}

/* Locked action indicator */
.bbai-modern .bbai-library-action-lock {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 2px;
}

/* Alt text as primary content */
.bbai-modern .bbai-alt-text-preview {
    font-size: 13px;
    line-height: 1.55;
    color: #1e293b;
}

/* File metadata is secondary */
.bbai-modern .bbai-library-filename {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}

.bbai-modern .bbai-library-filename-meta {
    font-size: 11px;
    color: #94a3b8;
}

/* Stronger thumbnail presence */
.bbai-modern .bbai-library-thumbnail {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bbai-modern .bbai-library-thumbnail-button:hover .bbai-library-thumbnail {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Stronger quality badges */
.bbai-modern .bbai-quality-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 99px;
}

.bbai-modern .bbai-quality-badge--good {
    background: #dcfce7;
    color: #166534;
}

.bbai-modern .bbai-quality-badge--fair {
    background: #fef3c7;
    color: #92400e;
}

.bbai-modern .bbai-quality-badge--poor {
    background: #fee2e2;
    color: #991b1b;
}

/* Stronger status badges */
.bbai-modern .bbai-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 99px;
}

.bbai-modern .bbai-status-badge--optimized {
    background: #dcfce7;
    color: #166534;
}

.bbai-modern .bbai-status-badge--missing {
    background: #fee2e2;
    color: #991b1b;
}

.bbai-modern .bbai-status-badge--pending {
    background: #dbeafe;
    color: #1e40af;
}

/* Helper text for actions area */
.bbai-modern .bbai-optimization-actions-helper {
    margin: 0 0 12px;
    padding: 10px 16px;
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    line-height: 1.5;
}

/* Actions card clean-up */
.bbai-modern .bbai-library-actions-card {
    padding: 20px 24px;
    border-radius: 16px;
}

@media (max-width: 782px) {
    .bbai-setup-stepper {
        flex-direction: column;
    }

    .bbai-setup-wizard__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-setup-wizard__actions .button {
        width: 100%;
        text-align: center;
    }

    .bbai-modern .bbai-library-actions-header,
    .bbai-modern .bbai-library-cell--actions {
        min-width: 152px;
    }
}

/* Source: assets/css/features/dashboard/status-card-refresh.css */
/* Spacing tokens: defined on :root in saas-consistency.css (loaded on all admin screens). */

/* Outer shell never adds vertical offset; .bbai-page-container owns nav→content gap */
.bbai-container.bbai-content-shell {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

body.toplevel_page_bbai #wpcontent,
body.beepbeep-ai_page_bbai-library #wpcontent,
body.beepbeep-ai_page_bbai-analytics #wpcontent,
body.beepbeep-ai_page_bbai-credit-usage #wpcontent,
body.beepbeep-ai_page_bbai-guide #wpcontent,
body.beepbeep-ai_page_bbai-settings #wpcontent,
body.beepbeep-ai_page_bbai-debug #wpcontent,
body.beepbeep-ai_page_bbai-agency-overview #wpcontent {
    padding-left: 0;
}

body.toplevel_page_bbai #wpbody-content,
body.beepbeep-ai_page_bbai-library #wpbody-content,
body.beepbeep-ai_page_bbai-analytics #wpbody-content,
body.beepbeep-ai_page_bbai-credit-usage #wpbody-content,
body.beepbeep-ai_page_bbai-guide #wpbody-content,
body.beepbeep-ai_page_bbai-settings #wpbody-content,
body.beepbeep-ai_page_bbai-debug #wpbody-content,
body.beepbeep-ai_page_bbai-agency-overview #wpbody-content {
    padding: 0;
}

body.toplevel_page_bbai .wrap,
body.beepbeep-ai_page_bbai-library .wrap,
body.beepbeep-ai_page_bbai-analytics .wrap,
body.beepbeep-ai_page_bbai-credit-usage .wrap,
body.beepbeep-ai_page_bbai-guide .wrap,
body.beepbeep-ai_page_bbai-settings .wrap,
body.beepbeep-ai_page_bbai-debug .wrap,
body.beepbeep-ai_page_bbai-agency-overview .wrap {
    margin: 0;
    padding: 0;
    max-width: none;
    overflow: visible;
}

/* Single source for nav → first content offset (matches former 28px .bbai-page + 20px inner) */
.bbai-page {
    padding-top: 0 !important;
}

.bbai-page-inner.bbai-page-container,
.bbai-dashboard-shell .bbai-page-inner.bbai-page-container {
    width: 100%;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding-top: var(--page-padding-top, 24px) !important;
    padding-left: var(--section-spacing, 24px) !important;
    padding-right: var(--section-spacing, 24px) !important;
    padding-bottom: calc(var(--section-spacing, 24px) + var(--card-gap, 16px)) !important;
    box-sizing: border-box;
    background: transparent !important;
    min-height: 0 !important;
}

#bbai-dashboard-main,
.bbai-dashboard#bbai-dashboard-main,
.bbai-dashboard-shell #bbai-dashboard-main {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    background: transparent !important;
    min-height: 0 !important;
    color: #111827 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    transition: none !important;
}

/* Page canvas uses the same three tokens at all breakpoints (no per-page drift) */

#bbai-dashboard-main .bbai-dashboard-hero,
#bbai-dashboard-main .bbai-dashboard-header,
#bbai-dashboard-main .bbai-dashboard-container {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

#bbai-dashboard-main .bbai-dashboard-hero {
    margin-bottom: var(--section-spacing, 24px);
    min-height: 128px;
    padding: 16px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef4ff 58%, #ffffff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

#bbai-dashboard-main .bbai-dashboard-header {
    margin: 0 0 var(--section-spacing, 24px);
}

#bbai-dashboard-main .bbai-dashboard-header__title {
    margin: 0 0 8px;
    font-size: var(--bbai-admin-type-page-title, 28px);
    font-weight: var(--bbai-admin-type-weight-bold, 700);
    line-height: 1.1;
    letter-spacing: var(--bbai-tracking-tight, -0.03em);
    color: var(--bbai-admin-color-text, #111827);
}

#bbai-dashboard-main .bbai-dashboard-header__subtitle {
    margin: 0;
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.5;
    color: var(--bbai-admin-color-text-muted, #6b7280);
}

#bbai-dashboard-main .bbai-dashboard-container {
    gap: var(--card-gap, 16px);
}

#bbai-dashboard-main .bbai-dashboard-row {
    gap: var(--card-gap, 16px);
    align-items: stretch;
    margin-bottom: 0;
}

#bbai-dashboard-main .bbai-dashboard-row--1 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
}

#bbai-dashboard-main .bbai-dashboard-row--1 > .bbai-dashboard-card {
    min-height: 420px;
}

#bbai-dashboard-main .bbai-dashboard-row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#bbai-dashboard-main .bbai-dashboard-row--3,
#bbai-dashboard-main .bbai-dashboard-row--4,
#bbai-dashboard-main .bbai-dashboard-row--5 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 0;
}

#bbai-dashboard-main .bbai-dashboard-row--3 .bbai-dashboard-stats-wrap {
    margin-top: var(--card-gap, 16px);
}

#bbai-dashboard-main .bbai-dashboard-row--3 .bbai-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@supports (content-visibility: auto) {
    #bbai-dashboard-main .bbai-dashboard-section--lazy-render {
        content-visibility: auto;
        contain-intrinsic-size: 760px;
    }

    #bbai-dashboard-main .bbai-dashboard-row--4.bbai-dashboard-section--lazy-render,
    #bbai-dashboard-main .bbai-dashboard-row--5.bbai-dashboard-section--lazy-render {
        contain-intrinsic-size: 420px;
    }
}

#bbai-dashboard-main .bbai-dashboard-card,
#bbai-dashboard-main .bbai-stat-card {
    align-self: stretch;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transform: translateY(0);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

#bbai-dashboard-main .bbai-dashboard-card:hover,
#bbai-dashboard-main .bbai-stat-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.075);
    transform: translateY(-1px);
}

#bbai-dashboard-main .bbai-dashboard-card .bbai-card__header {
    margin-bottom: 16px;
}

#bbai-dashboard-main .bbai-dashboard-card .bbai-card__title,
#bbai-dashboard-main .bbai-dashboard-card .bbai-opportunity-scanner__title {
    margin: 0 0 8px;
    font-size: var(--bbai-admin-type-card-title, 20px);
    font-weight: var(--bbai-admin-type-weight-semibold, 600);
    line-height: 1.2;
    letter-spacing: var(--bbai-tracking-tight, -0.02em);
    color: var(--bbai-admin-color-text, #1f2937);
}

#bbai-dashboard-main .bbai-card__title-icon,
#bbai-dashboard-main .bbai-dashboard-section-kicker__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #6366f1;
    vertical-align: text-bottom;
}

#bbai-dashboard-main .bbai-dashboard-card .bbai-card__copy,
#bbai-dashboard-main .bbai-dashboard-card .bbai-card__body p,
#bbai-dashboard-main .bbai-dashboard-card p {
    max-width: none !important;
}

#bbai-dashboard-main .bbai-dashboard-card .bbai-card__copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-dashboard-card .bbai-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#bbai-dashboard-main .bbai-dashboard-card .bbai-card__footer {
    margin-top: auto;
}

#bbai-dashboard-main .bbai-dashboard-hero-inner {
    display: block;
}

#bbai-dashboard-main .bbai-dashboard-hero-copy {
    display: grid;
    gap: 0;
    min-width: 0;
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-hero__heading-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(37, 99, 235, 0.08));
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

#bbai-dashboard-main .bbai-dashboard-hero__icon svg {
    width: 20px;
    height: 20px;
}

#bbai-dashboard-main .bbai-dashboard-hero__heading-copy {
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero__headline,
#bbai-dashboard-main .bbai-dashboard-hero-heading {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #111827;
}

#bbai-dashboard-main .bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-dashboard-hero-subtext {
    margin: 4px 0 0;
    max-width: 640px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #64748b;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-block {
    display: grid;
    gap: 4px;
    width: 100%;
    max-width: 600px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero__helper {
    margin: -2px 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage,
#bbai-dashboard-main .bbai-dashboard-hero-usage {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #334155;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-primary {
    display: inline;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-progress-copy {
    display: none !important;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-progress-copy:empty {
    display: none;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-progress-copy:not(:empty)::before {
    content: "•";
    margin: 0 6px;
    color: #9ca3af;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage .bbai-banner-usage-used,
#bbai-dashboard-main .bbai-dashboard-hero__usage .bbai-banner-usage-limit {
    font-weight: 600;
    color: #111827;
}

#bbai-dashboard-main .bbai-dashboard-hero-progress:not(.bbai-banner__progress) {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-progress-track:not(.bbai-banner__progress-track) {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

#bbai-dashboard-main .bbai-dashboard-hero-progress-fill:not(.bbai-banner__progress-fill) {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f46e5, #2563eb);
    transition: width 0.4s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: 4px;
    flex: 0 0 auto;
    width: 184px;
    max-width: 184px;
}

#bbai-dashboard-main .bbai-dashboard-hero-actions__primary-row {
    width: 100%;
    margin: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-actions__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-top: 8px;
    min-height: 18px;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero-actions__primary-row > .bbai-dashboard-hero__cta {
    width: 100%;
    justify-content: center;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-dashboard-hero-actions .bbai-btn-primary {
    border: none;
    background: #10b981 !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    color: #ffffff !important;
    transform: translateY(0);
    transition:
        background-color 0.165s ease,
        box-shadow 0.165s ease,
        transform 0.165s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-dashboard-hero-actions .bbai-btn-primary:hover {
    background: #059669 !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1)) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--primary:active,
#bbai-dashboard-main .bbai-dashboard-hero-actions .bbai-btn-primary:active {
    background: #047857 !important;
    transform: translateY(0) scale(0.98) !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    transition-duration: 0.1s;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--tertiary {
    border: 1px solid #dbe5f4;
    background: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.04);
    color: #1f2937 !important;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--tertiary:hover {
    border-color: #bfdbfe;
    background: #f8fbff !important;
    transform: translateY(-1px) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--secondary {
    min-height: auto;
    padding: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #2563eb !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    justify-content: flex-start;
    white-space: nowrap;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--secondary:hover {
    text-decoration: underline;
    transform: none !important;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--secondary-muted {
    color: #64748b !important;
    font-weight: 600;
}

#bbai-dashboard-main .bbai-dashboard-hero__link-separator {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1;
}

#bbai-dashboard-main .bbai-dashboard-hero__action-helper {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #64748b;
    text-align: center;
}

#bbai-dashboard-main .bbai-dashboard-quick-actions {
    margin-top: 8px;
    margin-bottom: 24px;
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid #dbe5f4;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button:hover {
    transform: translateY(-1px);
    border-color: #c7d4e8;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button--primary {
    border: none;
    background: #10b981;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    color: #ffffff;
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button--primary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button.is-disabled,
#bbai-dashboard-main .bbai-workflow-step__btn.is-disabled,
#bbai-dashboard-main .bbai-dashboard-hero__cta.is-disabled {
    pointer-events: none;
    border-color: #e5e7eb;
    background: #f8fafc !important;
    box-shadow: none !important;
    color: #9ca3af !important;
    transform: none !important;
}

#bbai-dashboard-main .bbai-dashboard-feedback {
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

#bbai-dashboard-main .bbai-dashboard-feedback__title,
#bbai-dashboard-main .bbai-dashboard-feedback__detail {
    display: block;
}

#bbai-dashboard-main .bbai-dashboard-feedback__detail {
    margin-top: 2px;
    font-weight: 500;
    opacity: 0.9;
}

#bbai-dashboard-main .bbai-dashboard-feedback--success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

#bbai-dashboard-main .bbai-dashboard-feedback--warning {
    background: rgba(245, 158, 11, 0.09);
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: #b45309;
}

#bbai-dashboard-main .bbai-dashboard-feedback--error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-message {
    margin-bottom: 0;
    white-space: normal;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-container {
    max-width: 560px;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-content {
    padding: 32px;
    text-align: left;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-icon {
    display: none;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-title {
    margin-bottom: 8px;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-buttons {
    justify-content: flex-end;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__intro {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.55;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__summary {
    margin-bottom: 16px;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid #dbe7f3;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__summary--warning {
    border-color: rgba(245, 158, 11, 0.32);
    background: linear-gradient(180deg, #fffaf0 0%, #fff5e6 100%);
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__summary-line {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #111827;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__summary-line + .bbai-dashboard-generator-modal__summary-line {
    margin-top: 4px;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__summary-note {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #92400e;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__toggle:hover {
    color: #0f172a;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
    border-radius: 8px;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__toggle:disabled {
    opacity: 0.6;
    cursor: default;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__toggle-icon {
    font-size: 13px;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__options {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__options[hidden] {
    display: none !important;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__option:hover {
    border-color: #c7d2fe;
    background: #f8fbff;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__option.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__option:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__option input {
    margin: 0;
    flex-shrink: 0;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__option-label {
    display: block;
    font-weight: 600;
    color: #111827;
    line-height: 1.5;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-button:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-dashboard-generator-modal__button-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: bbai-dashboard-generator-spin 0.7s linear infinite;
}

#bbai-modal-overlay.bbai-dashboard-generator-modal.bbai-dashboard-generator-modal--loading .bbai-modal-buttons {
    pointer-events: none;
}

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

#bbai-dashboard-main .bbai-dashboard-feedback--info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
}

.bbai-dashboard-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.bbai-dashboard-scan-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.bbai-dashboard-scan-modal__dialog {
    position: relative;
    width: min(460px, 100%);
    padding: 32px 32px 24px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
    color: #111827;
}

.bbai-dashboard-scan-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bbai-dashboard-scan-modal__close:hover {
    border-color: #cbd5e1;
    background: #eff6ff;
    color: #1e293b;
}

.bbai-dashboard-scan-modal__state {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bbai-dashboard-scan-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #eef2ff;
    color: #3b82f6;
    font-size: 24px;
    font-weight: 600;
}

.bbai-dashboard-scan-modal__icon--loading {
    background: rgba(59, 130, 246, 0.1);
}

.bbai-dashboard-scan-modal__icon--warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.bbai-dashboard-scan-modal__icon--success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.bbai-dashboard-scan-modal__icon--error {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.bbai-dashboard-scan-modal__title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.bbai-dashboard-scan-modal__description {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #64748b;
}

.bbai-dashboard-scan-modal__loading,
.bbai-dashboard-scan-modal__result {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.bbai-dashboard-scan-modal__loading[hidden],
.bbai-dashboard-scan-modal__result[hidden],
.bbai-dashboard-scan-modal__stats[hidden] {
    display: none !important;
}

.bbai-dashboard-scan-modal__loading {
    padding: 16px 18px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.98));
}

.bbai-dashboard-scan-modal__spinner {
    width: 28px;
    height: 28px;
    border-width: 3px;
}

.bbai-dashboard-scan-modal__loading-copy {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e3a8a;
}

.bbai-dashboard-scan-modal__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.bbai-dashboard-scan-modal__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.bbai-dashboard-scan-modal__stat-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #64748b;
}

.bbai-dashboard-scan-modal__stat-value {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
}

.bbai-dashboard-scan-modal__note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.bbai-dashboard-scan-modal__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

.bbai-dashboard-scan-modal__button {
    min-width: 132px;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.bbai-dashboard-scan-modal__button:hover {
    transform: translateY(-1px);
}

.bbai-dashboard-scan-modal__button--secondary {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #334155;
}

.bbai-dashboard-scan-modal__button--secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.bbai-dashboard-scan-modal__button--primary {
    border: none;
    background: linear-gradient(135deg, #5b5ce6, #3b82f6);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.22);
    color: #ffffff;
}

@media (max-width: 640px) {
    .bbai-dashboard-scan-modal {
        padding: 16px;
    }

    .bbai-dashboard-scan-modal__dialog {
        padding: 24px 20px 18px;
    }

    .bbai-dashboard-scan-modal__title {
        font-size: 22px;
    }

    .bbai-dashboard-scan-modal__stats,
    .bbai-dashboard-scan-modal__footer {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .bbai-dashboard-scan-modal__button {
        width: 100%;
    }
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button.is-loading,
#bbai-dashboard-main .bbai-workflow-step__btn.is-loading,
#bbai-dashboard-main .bbai-dashboard-hero__cta.is-loading {
    pointer-events: none;
}

#bbai-dashboard-main .bbai-dashboard-quick-actions__button .bbai-spinner,
#bbai-dashboard-main .bbai-workflow-step__btn .bbai-spinner,
#bbai-dashboard-main .bbai-dashboard-hero__cta .bbai-spinner {
    width: 14px;
    height: 14px;
}

/* Donut + metric tiles — align with Phase 4 --bbai-status-* (foundation tokens) */
#bbai-dashboard-main .bbai-status-card {
    --bbai-status-optimized: var(--bbai-status-optimized-accent);
    --bbai-status-optimized-bg: rgba(34, 181, 115, 0.06);
    --bbai-status-optimized-border: rgba(34, 181, 115, 0.14);
    --bbai-status-weak: var(--bbai-status-needs-review-accent);
    --bbai-status-weak-bg: rgba(217, 164, 65, 0.06);
    --bbai-status-weak-border: rgba(217, 164, 65, 0.14);
    --bbai-status-missing: var(--bbai-status-missing-accent);
    --bbai-status-missing-bg: rgba(201, 122, 0, 0.06);
    --bbai-status-missing-border: rgba(201, 122, 0, 0.14);
}

#bbai-dashboard-main .bbai-status-card .bbai-card__header {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#bbai-dashboard-main .bbai-status-card .bbai-card__title {
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
}

#bbai-dashboard-main .bbai-status-card__scan-meta {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: #94a3b8;
    text-align: center;
}

#bbai-dashboard-main .bbai-status-card__body {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#bbai-dashboard-main .bbai-status-card .bbai-progress-donut-wrap {
    display: flex;
    justify-content: center;
    margin: 0;
}

#bbai-dashboard-main .bbai-status-card .bbai-progress-donut {
    width: 188px;
    height: 188px;
    max-width: 188px;
}

#bbai-dashboard-main .bbai-status-card .bbai-status-ring-track {
    stroke: #e5e7eb;
}

#bbai-dashboard-main .bbai-status-card .bbai-status-ring-segment {
    transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease, opacity 0.25s ease;
}

#bbai-dashboard-main .bbai-status-card .bbai-status-ring-segment--optimized {
    stroke: var(--bbai-status-optimized);
}

#bbai-dashboard-main .bbai-status-card .bbai-status-ring-segment--weak {
    stroke: var(--bbai-status-weak);
}

#bbai-dashboard-main .bbai-status-card .bbai-status-ring-segment--missing {
    stroke: var(--bbai-status-missing);
}

#bbai-dashboard-main .bbai-status-card .bbai-progress-donut-center,
#bbai-dashboard-main .bbai-status-card .bbai-donut-center {
    inset: 18%;
    width: 64%;
    height: 64%;
    margin: 0;
    background: transparent;
}

#bbai-dashboard-main .bbai-status-card .bbai-progress-donut-value {
    display: inline-flex;
    align-items: flex-start;
    gap: 2px;
}

#bbai-dashboard-main .bbai-status-card .bbai-donut-value {
    display: block;
    font-size: 48px;
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.05em;
    color: #111827;
}

#bbai-dashboard-main .bbai-status-card .bbai-progress-donut-percent,
#bbai-dashboard-main .bbai-status-card .bbai-donut-percent {
    margin-left: 0;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: #111827;
    opacity: 1;
}

#bbai-dashboard-main .bbai-status-card .bbai-progress-donut-label,
#bbai-dashboard-main .bbai-status-card .bbai-donut-label {
    max-width: 118px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: #7a8498;
}

#bbai-dashboard-main .bbai-status-summary {
    width: 100%;
    margin: 4px auto 0 !important;
    text-align: center !important;
}

#bbai-dashboard-main .bbai-status-summary__line {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-status-summary__line--primary {
    font-size: 15px;
    line-height: 1.25;
}

#bbai-dashboard-main .bbai-status-summary__line--secondary {
    margin-top: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #64748b;
}

#bbai-dashboard-main .bbai-status-summary__line--meta {
    margin-top: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: #94a3b8;
}

#bbai-dashboard-main .bbai-status-summary__line--secondary {
    margin-top: 0;
}

#bbai-dashboard-main .bbai-status-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 16px auto 0;
    padding: 0;
}

#bbai-dashboard-main .bbai-status-metrics::before {
    display: none;
}

#bbai-dashboard-main .bbai-status-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 84px;
    padding: 16px 14px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}

#bbai-dashboard-main .bbai-status-metric__value,
#bbai-dashboard-main .bbai-status-stat-number {
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #111827;
}

#bbai-dashboard-main .bbai-status-metric__label,
#bbai-dashboard-main .bbai-status-stat-label {
    margin: 4px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-status-metric__label-icon {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
    color: currentColor;
}

#bbai-dashboard-main .bbai-status-metric--optimized {
    border-color: var(--bbai-status-optimized-border);
    background: var(--bbai-status-optimized-bg);
}

#bbai-dashboard-main .bbai-status-metric--optimized .bbai-status-metric__value,
#bbai-dashboard-main .bbai-status-metric--optimized .bbai-status-stat-number,
#bbai-dashboard-main .bbai-status-metric--optimized .bbai-status-metric__label,
#bbai-dashboard-main .bbai-status-metric--optimized .bbai-status-stat-label {
    color: var(--bbai-status-optimized);
}

#bbai-dashboard-main .bbai-status-metric--weak {
    border-color: var(--bbai-status-weak-border);
    background: var(--bbai-status-weak-bg);
}

#bbai-dashboard-main .bbai-status-metric--weak .bbai-status-metric__value,
#bbai-dashboard-main .bbai-status-metric--weak .bbai-status-stat-number,
#bbai-dashboard-main .bbai-status-metric--weak .bbai-status-metric__label,
#bbai-dashboard-main .bbai-status-metric--weak .bbai-status-stat-label {
    color: var(--bbai-status-weak);
}

#bbai-dashboard-main .bbai-status-metric--missing {
    border-color: var(--bbai-status-missing-border);
    background: var(--bbai-status-missing-bg);
}

#bbai-dashboard-main .bbai-status-metric--missing .bbai-status-metric__value,
#bbai-dashboard-main .bbai-status-metric--missing .bbai-status-stat-number,
#bbai-dashboard-main .bbai-status-metric--missing .bbai-status-metric__label,
#bbai-dashboard-main .bbai-status-metric--missing .bbai-status-stat-label {
    color: var(--bbai-status-missing);
}

#bbai-dashboard-main .bbai-status-card .bbai-status-insight {
    width: 100%;
    max-width: none !important;
    margin: 16px auto 22px;
    padding: 8px 16px;
    border-radius: 8px;
    text-align: center;
}

#bbai-dashboard-main .bbai-status-insight__header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

#bbai-dashboard-main .bbai-status-insight__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: inherit;
}

#bbai-dashboard-main .bbai-status-insight__message {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

#bbai-dashboard-main .bbai-status-insight__icon {
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.2;
}

#bbai-dashboard-main .bbai-status-insight__text {
    text-align: center;
}

#bbai-dashboard-main .bbai-status-insight__guidance {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: inherit;
    opacity: 0.82;
}

#bbai-dashboard-main .bbai-status-insight__meta {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: inherit;
    opacity: 0.78;
}

#bbai-dashboard-main .bbai-status-insight__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    background: transparent;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

#bbai-dashboard-main .bbai-status-insight__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 8px;
}

#bbai-dashboard-main .bbai-status-insight__action--button {
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #10b981 !important;
    border: none;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    text-decoration: none;
}

#bbai-dashboard-main .bbai-status-insight__action--link {
    min-height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #2563eb;
}

#bbai-dashboard-main .bbai-status-insight__action:hover {
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-status-insight__action--button:hover {
    background: #059669 !important;
    transform: none;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

#bbai-dashboard-main .bbai-status-insight__action--link:hover {
    transform: none;
    text-decoration: underline;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-status-insight--warning,
#bbai-dashboard-main .bbai-status-insight--danger,
#bbai-dashboard-main .bbai-warning-card,
#bbai-dashboard-main .bbai-status-warning,
#bbai-dashboard-main .bbai-accessibility-warning {
    border: 1px solid rgba(249, 115, 22, 0.26);
    background: rgba(249, 115, 22, 0.05) !important;
    color: #b45309;
    border-radius: 8px;
}

#bbai-dashboard-main .bbai-status-insight--warning .bbai-status-insight__message,
#bbai-dashboard-main .bbai-status-insight--danger .bbai-status-insight__message {
    color: #b45309;
}

#bbai-dashboard-main .bbai-status-insight--warning .bbai-status-insight__icon,
#bbai-dashboard-main .bbai-status-insight--danger .bbai-status-insight__icon,
#bbai-dashboard-main .bbai-warning-icon {
    color: rgba(249, 115, 22, 0.75);
}

#bbai-dashboard-main .bbai-status-insight--success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4 !important;
    color: #166534;
}

#bbai-dashboard-main .bbai-status-insight--success .bbai-status-insight__message {
    color: #166534;
}

#bbai-dashboard-main .bbai-plan-usage-divider {
    margin: 0 0 12px;
    border-top: 1px solid #eef1f5;
}

#bbai-dashboard-main .bbai-plan-usage {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: #f9fafb;
    box-shadow: none;
    text-align: left;
}

#bbai-dashboard-main .bbai-plan-usage-card .bbai-card__body {
    justify-content: stretch;
}

#bbai-dashboard-main .bbai-plan-usage-card .bbai-plan-usage {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

#bbai-dashboard-main .bbai-plan-usage__tier {
    display: flex;
    flex-direction: column;
}

#bbai-dashboard-main .bbai-plan-usage__tier--growth {
    gap: 2px;
}

#bbai-dashboard-main .bbai-plan-usage__section-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-plan-usage__guide .bbai-plan-usage__section-title {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

#bbai-dashboard-main .bbai-plan-usage__title,
#bbai-dashboard-main .bbai-plan-usage__label {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-plan-usage__progress {
    position: relative;
    height: 6px;
    margin: 8px 0 0;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: visible;
}

#bbai-dashboard-main .bbai-plan-usage__progress-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #8b5cf6);
    transition: width 0.6s ease;
}

#bbai-dashboard-main .bbai-plan-usage__progress--growth {
    margin-top: 4px;
    margin-bottom: 0;
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
    border: 1px solid #dcfce7;
}

#bbai-dashboard-main .bbai-plan-usage__progress-fill--growth {
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.6s ease;
}

#bbai-dashboard-main .bbai-plan-usage__progress--capacity {
    box-shadow: inset 0 1px 2px rgba(34, 197, 94, 0.08);
}

#bbai-dashboard-main .bbai-plan-usage__line,
#bbai-dashboard-main .bbai-plan-usage__reset,
#bbai-dashboard-main .bbai-plan-usage__remaining,
#bbai-dashboard-main .bbai-plan-usage__growth-copy,
#bbai-dashboard-main .bbai-plan-usage__comparison {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #4b5563;
}

#bbai-dashboard-main .bbai-plan-usage__comparison {
    margin-top: 2px;
    font-weight: 600;
    color: #166534;
}

#bbai-dashboard-main .bbai-plan-usage__progress-indicator {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #16a34a;
    border: 2px solid #f9fafb;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#bbai-dashboard-main .bbai-plan-usage__line {
    font-weight: 600;
    color: #111827;
}

#bbai-dashboard-main .bbai-plan-usage__remaining {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

#bbai-dashboard-main .bbai-plan-usage__reset {
    margin-top: 2px;
}

#bbai-dashboard-main .bbai-plan-usage__divider {
    margin: 16px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#bbai-dashboard-main .bbai-plan-usage__guide,
#bbai-dashboard-main .bbai-plan-usage__upgrade {
    display: flex;
    flex-direction: column;
}

#bbai-dashboard-main .bbai-plan-usage__steps {
    margin: 0;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-plan-usage__step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: #4b5563;
}

#bbai-dashboard-main .bbai-plan-usage__step-icon {
    flex: 0 0 auto;
    width: 14px;
    text-align: center;
    opacity: 0.78;
}

#bbai-dashboard-main .bbai-plan-usage__step-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-plan-usage__step-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #374151;
}

#bbai-dashboard-main .bbai-plan-usage__step-description {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-plan-usage__remaining--exhausted {
    color: #1f2937;
}

#bbai-dashboard-main .bbai-plan-usage__upgrade-copy {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #2563eb;
}

#bbai-dashboard-main .bbai-plan-usage__growth-copy {
    margin: 0;
}

#bbai-dashboard-main .bbai-plan-usage__price {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__comparison {
    margin-top: 2px;
}

#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__progress--growth {
    margin-top: 8px;
}

#bbai-dashboard-main .bbai-plan-usage__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: var(--bbai-cta-group-margin-top, 16px);
}

#bbai-dashboard-main .bbai-plan-usage__cta {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px !important;
    margin: 0;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1;
    transform: translateY(0);
    transition: transform 0.165s ease, box-shadow 0.165s ease !important;
}

#bbai-dashboard-main .bbai-plan-usage__cta.bbai-btn-primary {
    background: #10b981 !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    color: #ffffff !important;
}

#bbai-dashboard-main .bbai-plan-usage__cta.bbai-btn-primary:hover:not(:disabled) {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1)) !important;
}

#bbai-dashboard-main .bbai-plan-usage__compare-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    padding-left: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #6b7280;
    text-decoration: none;
}

#bbai-dashboard-main .bbai-plan-usage__compare-link:hover {
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-inline-upgrade-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    appearance: none;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
}

#bbai-dashboard-main .bbai-inline-upgrade-trigger:hover {
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-inline-upgrade-trigger:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 3px;
    border-radius: 8px;
}

#bbai-dashboard-main .bbai-upgrade-card {
    align-self: stretch;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px !important;
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}

#bbai-dashboard-main .bbai-upgrade-card--subtle {
    border-color: #e5e7eb !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}

#bbai-dashboard-main .bbai-upgrade-card--urgent {
    border-color: #bfdbfe !important;
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08) !important;
}

#bbai-dashboard-main .bbai-upgrade-top {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 auto;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-card__header {
    position: static;
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: 0;
}

#bbai-dashboard-main .bbai-upgrade-card__badge,
#bbai-dashboard-main .bbai-plan-badge {
    display: none;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-card__title {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.2;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-upgrade-price {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #111827;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-card__copy {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-upgrade-subtitle {
    margin-bottom: 0;
}

#bbai-dashboard-main .bbai-upgrade-card__trust {
    display: none;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    justify-content: flex-start;
}

#bbai-dashboard-main .bbai-upgrade-card__section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 0;
    border-top: 0;
}

#bbai-dashboard-main .bbai-upgrade-card__section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-feature-list,
#bbai-dashboard-main .bbai-upgrade-features {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #374151;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-feature-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.16);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}

#bbai-dashboard-main .bbai-upgrade-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

#bbai-dashboard-main .bbai-upgrade-value__line,
#bbai-dashboard-main .bbai-upgrade-value__support {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-upgrade-value__line strong,
#bbai-dashboard-main .bbai-upgrade-value__support strong {
    font-weight: 600;
    color: #111827;
}

#bbai-dashboard-main .bbai-upgrade-card__divider,
#bbai-dashboard-main .bbai-upgrade-card__footer-divider {
    display: none;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-card__footer.bbai-upgrade-bottom {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    border-top: 1px solid #eef1f5;
}

#bbai-dashboard-main .bbai-upgrade-context,
#bbai-dashboard-main .bbai-upgrade-context-line {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
}

#bbai-dashboard-main .bbai-upgrade-meters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 4px;
}

#bbai-dashboard-main .bbai-meter {
    display: flex;
    flex-direction: column;
}

#bbai-dashboard-main .bbai-meter-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #374151;
}

#bbai-dashboard-main .bbai-meter-value {
    font-weight: 600;
    color: #111827;
}

#bbai-dashboard-main .bbai-meter-bar {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

#bbai-dashboard-main .bbai-meter-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-meter-free .bbai-meter-bar {
    background: #ece8ff;
}

#bbai-dashboard-main .bbai-meter-free .bbai-meter-fill {
    background: linear-gradient(90deg, #7c3aed, #8b5cf6);
    transition: width 0.6s ease;
}

#bbai-dashboard-main .bbai-meter-growth .bbai-meter-bar {
    box-sizing: border-box;
    height: 12px;
    padding: 1px;
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
    border: 1px solid #dcfce7;
    box-shadow: inset 0 1px 2px rgba(34, 197, 94, 0.08);
}

#bbai-dashboard-main .bbai-meter-growth .bbai-meter-fill {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

#bbai-dashboard-main .bbai-meter-caption {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-upgrade-cta {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px !important;
    margin: 0;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-upgrade-cta.bbai-btn-primary {
    background: #10b981 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
    color: #ffffff !important;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-upgrade-cta.bbai-btn-primary:hover:not(:disabled) {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1)) !important;
}

#bbai-dashboard-main .bbai-upgrade-trust {
    display: none;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-link-secondary,
#bbai-dashboard-main .bbai-upgrade-card .bbai-upgrade-compare-link,
#bbai-dashboard-main .bbai-compare-plans {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    padding-left: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #6b7280;
    text-decoration: none;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-link-secondary:hover,
#bbai-dashboard-main .bbai-upgrade-card .bbai-upgrade-compare-link:hover {
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-actions-card {
    min-height: 0;
}

#bbai-dashboard-main .bbai-workflow-card__body {
    display: block;
}

#bbai-dashboard-main .bbai-workflow-card .bbai-card__title {
    margin-bottom: 8px;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-workflow-card__desc {
    max-width: 560px;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#bbai-dashboard-main .bbai-workflow-step {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
}

#bbai-dashboard-main .bbai-workflow-step:first-child {
    padding-top: 0;
    border-top: none;
}

#bbai-dashboard-main .bbai-workflow-step--last {
    padding-bottom: 0;
}

#bbai-dashboard-main .bbai-workflow-step__icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f4f6;
    color: #475569;
    font-size: 18px;
}

#bbai-dashboard-main .bbai-workflow-step__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
}

#bbai-dashboard-main .bbai-workflow-step__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-workflow-step__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-workflow-step__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    margin-top: 0;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

#bbai-dashboard-main .bbai-workflow-step__btn--primary {
    border: none;
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#bbai-dashboard-main .bbai-workflow-step__btn--primary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-workflow-step__btn--secondary,
#bbai-dashboard-main .bbai-workflow-step__btn--locked {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-workflow-card__help-cta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

#bbai-dashboard-main .bbai-workflow-card__help-cta a {
    color: #2563eb;
    text-decoration: none;
}

#bbai-dashboard-main .bbai-workflow-card__help-cta a:hover {
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-opportunity-scanner__card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#bbai-dashboard-main .bbai-opportunity-scanner .bbai-card__body {
    flex: 1 1 auto;
    justify-content: stretch;
    gap: 0;
}

#bbai-dashboard-main .bbai-opportunity-scanner__workflow-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#bbai-dashboard-main .bbai-opportunity-scanner__prompt-block,
#bbai-dashboard-main .bbai-opportunity-scanner__results {
    display: flex;
    flex: 1;
    flex-direction: column;
}

#bbai-dashboard-main .bbai-opportunity-scanner__loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e5edfb;
    border-radius: 12px;
    background: #f8fbff;
}

#bbai-dashboard-main .bbai-opportunity-scanner__loading-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#bbai-dashboard-main .bbai-opportunity-scanner__loading-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-opportunity-scanner__loading-note {
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

#bbai-dashboard-main .bbai-opportunity-scanner__prompt {
    margin: 0 0 12px;
}

#bbai-dashboard-main .bbai-opportunity-scanner__title {
    color: #1f2937;
}

#bbai-dashboard-main .bbai-opportunity-scanner__desc {
    color: #6b7280;
}

#bbai-dashboard-main .bbai-opportunity-scanner__summary {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
}

#bbai-dashboard-main .bbai-opportunity-scanner__label {
    margin: 16px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

#bbai-dashboard-main .bbai-opportunity-scanner__steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    align-items: flex-start;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-size: 16px;
    line-height: 1;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-icon.dashicons {
    font-size: 16px;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    align-items: start;
    min-width: 0;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-title {
    margin: 0;
    grid-column: 1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-desc {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-button {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin-top: 0;
    min-height: auto;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

#bbai-dashboard-main .bbai-opportunity-scanner__step-helper {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #64748b;
}

#bbai-dashboard-main .bbai-dashboard-stats-wrap {
    width: 100%;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

#bbai-dashboard-main .bbai-dashboard-footer-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 0;
}

#bbai-dashboard-main .bbai-review-prompt-card,
#bbai-dashboard-main .bbai-review-strip {
    width: 100%;
}

#bbai-dashboard-main .bbai-review-prompt-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 16px 24px;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

#bbai-dashboard-main .bbai-review-prompt-card__summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

#bbai-dashboard-main .bbai-review-prompt-card__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-review-prompt-card__content {
    min-width: 0;
}

#bbai-dashboard-main .bbai-review-prompt-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

#bbai-dashboard-main .bbai-review-prompt-card__title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

#bbai-dashboard-main .bbai-review-prompt-card__copy {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-review-prompt-card__stars,
#bbai-dashboard-main .bbai-review-stars {
    margin: 0;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.125em;
    color: #f59e0b;
    opacity: 0.95;
}

#bbai-dashboard-main .bbai-review-prompt-card__note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-review-prompt-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

#bbai-dashboard-main .bbai-review-prompt-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

#bbai-dashboard-main .bbai-dashboard-section-kicker,
#bbai-dashboard-main .bbai-performance-title {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: #374151;
}

#bbai-dashboard-main .bbai-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    grid-auto-rows: 1fr;
}

#bbai-dashboard-main .bbai-accessibility-impact-card {
    min-height: 0;
}

#bbai-dashboard-main .bbai-accessibility-impact-card .bbai-card__body {
    gap: 16px;
}

#bbai-dashboard-main .bbai-accessibility-impact__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#bbai-dashboard-main .bbai-accessibility-impact__metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: #f8fafc;
}

#bbai-dashboard-main .bbai-accessibility-impact__metric-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #64748b;
}

#bbai-dashboard-main .bbai-accessibility-impact__metric-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #111827;
}

#bbai-dashboard-main .bbai-accessibility-impact__metric-value strong {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#bbai-dashboard-main .bbai-accessibility-impact__generated {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-accessibility-impact__preview {
    padding: 16px;
    border: 1px solid #e9e5ff;
    border-radius: 12px;
    background: linear-gradient(180deg, #fcfcff 0%, #f7f5ff 100%);
}

#bbai-dashboard-main .bbai-accessibility-impact__badge {
    display: block;
    width: 100%;
    max-width: 460px;
    height: auto;
    margin: 0 auto;
}

#bbai-dashboard-main .bbai-accessibility-impact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#bbai-dashboard-main .bbai-accessibility-impact__action {
    margin: 0;
}

#bbai-dashboard-main .bbai-stat-card,
#bbai-dashboard-main .bbai-metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 136px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

#bbai-dashboard-main .bbai-stat-card:hover,
#bbai-dashboard-main .bbai-metric-card:hover {
    transform: translateY(-1px);
    border-color: #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

#bbai-dashboard-main .bbai-btn:focus-visible,
#bbai-dashboard-main .bbai-workflow-step__btn:focus-visible,
#bbai-dashboard-main .bbai-review-prompt-card__cta:focus-visible,
#bbai-dashboard-main .bbai-status-insight__action:focus-visible,
#bbai-dashboard-main .bbai-upgrade-compare-link:focus-visible,
#bbai-dashboard-main .bbai-workflow-card__help-cta a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

#bbai-dashboard-main .bbai-stat-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    margin: 0 0 12px;
    color: #94a3b8;
}

#bbai-dashboard-main .bbai-stat-card__icon svg {
    width: 18px;
    height: 18px;
}

#bbai-dashboard-main .bbai-stat-card__value,
#bbai-dashboard-main .bbai-metric-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 0;
    min-height: 20px;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #111827;
}

#bbai-dashboard-main .bbai-stat-card__value .bbai-number-animate,
#bbai-dashboard-main .bbai-metric-value .bbai-number-animate {
    font-size: 32px;
    line-height: 1.2;
}

#bbai-dashboard-main .bbai-stat-card__value span + span,
#bbai-dashboard-main .bbai-stat-card .bbai-percent {
    font-size: 16px;
    font-weight: 600;
}

#bbai-dashboard-main .bbai-stat-card__label,
#bbai-dashboard-main .bbai-metric-label {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 0;
    min-height: 30px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-stat-card__label--with-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 30px;
    text-transform: none;
    letter-spacing: 0.01em;
}

#bbai-dashboard-main .bbai-stat-card__tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
}

#bbai-dashboard-main .bbai-stat-card__tooltip-trigger:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

#bbai-dashboard-main .bbai-stat-card__tooltip-trigger:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (max-width: 1024px) {
    #bbai-dashboard-main .bbai-dashboard-row--1,
    #bbai-dashboard-main .bbai-dashboard-row--2,
    #bbai-dashboard-main .bbai-dashboard-row--3,
    #bbai-dashboard-main .bbai-dashboard-row--4,
    #bbai-dashboard-main .bbai-dashboard-row--5 {
        grid-template-columns: 1fr !important;
    }

    #bbai-dashboard-main .bbai-dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #bbai-dashboard-main .bbai-dashboard-quick-actions__buttons {
        width: 100%;
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main {
        padding: 0 20px 32px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__usage-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-actions {
        width: auto;
        align-items: flex-start;
        justify-content: flex-start;
        max-width: none;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-actions__links {
        align-items: flex-start;
        gap: 4px 8px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero,
    #bbai-dashboard-main .bbai-dashboard-card,
    #bbai-dashboard-main .bbai-stat-card {
        padding: 16px 24px;
    }

    #bbai-dashboard-main .bbai-metric-card,
    #bbai-dashboard-main .bbai-stat-card.bbai-metric-card {
        padding: 16px;
    }

    #bbai-dashboard-main .bbai-plan-usage__price {
        font-size: 20px;
    }

    #bbai-dashboard-main .bbai-dashboard-header__title {
        font-size: 24px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__headline {
        font-size: 19px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__action-helper {
        text-align: left;
    }

    #bbai-dashboard-main .bbai-status-card .bbai-progress-donut {
        width: 192px;
        height: 192px;
        max-width: 192px;
    }

    #bbai-dashboard-main .bbai-status-card .bbai-progress-donut-value,
    #bbai-dashboard-main .bbai-status-card .bbai-donut-value {
        font-size: 42px;
    }

    #bbai-dashboard-main .bbai-status-metrics,
    #bbai-dashboard-main .bbai-opportunity-scanner__steps {
        gap: 8px;
    }
}

@media (max-width: 640px) {
    #bbai-dashboard-main .bbai-dashboard-hero-actions__links {
        width: 100%;
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__metrics {
        grid-template-columns: 1fr;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__actions {
        flex-direction: column;
        align-items: stretch;
    }

    #bbai-dashboard-main .bbai-review-prompt-card__body {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    #bbai-dashboard-main .bbai-review-prompt-card__summary {
        width: 100%;
        justify-content: flex-start;
    }

    #bbai-dashboard-main .bbai-review-prompt-card__actions {
        width: 100%;
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-actions__primary-row > .bbai-dashboard-hero__cta {
        width: auto;
        justify-content: center;
    }

    #bbai-dashboard-main .bbai-dashboard-quick-actions__button {
        width: auto;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__cta--secondary {
        width: auto;
        justify-content: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__action-helper {
        text-align: center;
    }

    #bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-buttons {
        justify-content: stretch;
        flex-direction: column-reverse;
    }

    #bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-button {
        width: 100%;
    }

    #bbai-modal-overlay.bbai-dashboard-generator-modal .bbai-modal-content {
        padding: 24px;
    }

    #bbai-dashboard-main .bbai-dashboard-stats {
        grid-template-columns: 1fr;
    }

    #bbai-dashboard-main .bbai-status-metrics {
        grid-template-columns: 1fr;
    }

    #bbai-dashboard-main .bbai-opportunity-scanner__step-content {
        grid-template-columns: 1fr;
    }

    #bbai-dashboard-main .bbai-opportunity-scanner__step-button {
        grid-column: 1;
        grid-row: auto;
        margin-top: 4px;
        justify-self: start;
    }
}

@media (max-width: 540px) {
    #bbai-dashboard-main {
        padding: 0 16px 28px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero,
    #bbai-dashboard-main .bbai-dashboard-card,
    #bbai-dashboard-main .bbai-stat-card {
        padding: 16px;
    }

    #bbai-dashboard-main .bbai-dashboard-header__title {
        font-size: 22px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__headline {
        font-size: 18px;
    }

    #bbai-dashboard-main .bbai-status-card .bbai-card__title,
    #bbai-dashboard-main .bbai-upgrade-card .bbai-card__title {
        font-size: 17px;
    }

    #bbai-dashboard-main .bbai-status-summary,
    #bbai-dashboard-main .bbai-status-insight__message,
    #bbai-dashboard-main .bbai-plan-usage__line,
    #bbai-dashboard-main .bbai-plan-usage__reset,
    #bbai-dashboard-main .bbai-plan-usage__remaining,
    #bbai-dashboard-main .bbai-plan-usage__upgrade-copy,
    #bbai-dashboard-main .bbai-opportunity-scanner__summary,
    #bbai-dashboard-main .bbai-opportunity-scanner__step-desc,
    #bbai-dashboard-main .bbai-review-prompt-card__copy,
    #bbai-dashboard-main .bbai-review-prompt-card__note {
        font-size: 13px;
    }

    #bbai-dashboard-main .bbai-status-card .bbai-progress-donut {
        width: 180px;
        height: 180px;
        max-width: 180px;
    }

    #bbai-dashboard-main .bbai-status-card .bbai-progress-donut-value,
    #bbai-dashboard-main .bbai-status-card .bbai-donut-value {
        font-size: 38px;
    }

    #bbai-dashboard-main .bbai-status-metric {
        padding: 16px;
    }

    #bbai-dashboard-main .bbai-status-insight__action,
    #bbai-dashboard-main .bbai-workflow-step__btn {
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    #bbai-dashboard-main .bbai-status-insight__actions {
        flex-direction: column;
        align-items: stretch;
    }

    #bbai-dashboard-main .bbai-status-insight__action--button {
        width: 100%;
    }
}

/* Scan complete modal refresh */
.bbai-dashboard-scan-modal__dialog {
    width: min(520px, 100%);
    max-width: 680px;
    padding: 32px 32px 24px;
}

.bbai-dashboard-scan-modal__close:focus-visible {
    border-color: #cbd5e1;
    background: #eff6ff;
    color: #1e293b;
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.bbai-dashboard-scan-modal__state {
    gap: 16px;
}

.bbai-dashboard-scan-modal__description {
    max-width: 40ch;
}

.bbai-dashboard-scan-modal__loading,
.bbai-dashboard-scan-modal__result {
    gap: 16px;
    margin-top: 4px;
}

.bbai-dashboard-scan-modal__loading-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bbai-dashboard-scan-modal__loading-progress {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}

.bbai-dashboard-scan-modal__loading-progress-fill {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
    transition: width 0.7s ease;
}

.bbai-dashboard-scan-modal__loading-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.bbai-dashboard-scan-modal__loading-stat {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #334155;
}

.bbai-dashboard-scan-modal__loading-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.bbai-dashboard-scan-modal__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bbai-dashboard-scan-modal__metrics[hidden] {
    display: none !important;
}

.bbai-dashboard-scan-modal__metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
}

.bbai-dashboard-scan-modal__metric-value {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #0f172a;
}

.bbai-dashboard-scan-modal__metric-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.bbai-dashboard-scan-modal__footer {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 24px;
}

.bbai-dashboard-scan-modal__button {
    min-width: 144px;
}

@media (max-width: 640px) {
    .bbai-dashboard-scan-modal__dialog {
        width: min(100%, 680px);
        padding: 24px 20px 20px;
    }

    .bbai-dashboard-scan-modal__description {
        max-width: none;
    }

    .bbai-dashboard-scan-modal__metrics,
    .bbai-dashboard-scan-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-dashboard-scan-modal__loading-stats {
        flex-direction: column;
        align-items: stretch;
    }

    .bbai-dashboard-scan-modal__button {
        width: 100%;
    }
}

/* Dashboard product refactor overrides */
#bbai-dashboard-main {
    --bbai-ui-ink: #0f172a;
    --bbai-ui-text: #334155;
    --bbai-ui-muted: #64748b;
    --bbai-ui-line: #dbe5ef;
    --bbai-ui-line-strong: #c7d5e3;
    --bbai-ui-surface: #ffffff;
    --bbai-ui-surface-soft: #f8fbff;
    --bbai-ui-surface-subtle: #f1f5f9;
    --bbai-ui-brand: #2563eb;
    --bbai-ui-brand-strong: #1d4ed8;
    --bbai-ui-brand-soft: #dbeafe;
    --bbai-ui-success: #15803d;
    --bbai-ui-success-soft: #f0fdf4;
    --bbai-ui-warning: #b45309;
    --bbai-ui-warning-soft: #fffbeb;
    --bbai-ui-danger: #b91c1c;
    --bbai-ui-danger-soft: #fef2f2;
    --bbai-ui-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

#bbai-dashboard-main [hidden] {
    display: none !important;
}

#bbai-dashboard-main .bbai-dashboard-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0 0 24px;
    min-height: 0;
    padding: 24px clamp(16px, 2.2vw, 32px);
    border: 1px solid rgba(199, 213, 227, 0.78);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28%),
        linear-gradient(135deg, #f7fbff 0%, #edf5ff 46%, #ffffff 100%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

#bbai-dashboard-main .bbai-dashboard-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#bbai-dashboard-main .bbai-dashboard-alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--bbai-ui-line);
    border-radius: 12px;
    background: var(--bbai-ui-surface);
}

#bbai-dashboard-main .bbai-dashboard-alert--warning {
    border-color: rgba(217, 119, 6, 0.26);
    background: linear-gradient(180deg, #fffdf7 0%, #fffbeb 100%);
}

#bbai-dashboard-main .bbai-dashboard-alert--danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: linear-gradient(180deg, #fff7f7 0%, #fef2f2 100%);
}

#bbai-dashboard-main .bbai-dashboard-alert__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-alert__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-dashboard-alert__message {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-dashboard-alert__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

#bbai-dashboard-main .bbai-dashboard-alert__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--bbai-ui-ink);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

#bbai-dashboard-main .bbai-dashboard-alert__meta {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero-inner,
#bbai-dashboard-main .bbai-dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero-inner {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

#bbai-dashboard-main .bbai-dashboard-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 24px 32px;
    align-items: start;
}

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

#bbai-dashboard-main .bbai-dashboard-hero__status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero__status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.12);
    color: var(--bbai-ui-warning);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}

#bbai-dashboard-main .bbai-dashboard-hero__status-copy {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-dashboard-hero__heading-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bbai-ui-success-soft);
    color: var(--bbai-ui-success);
    box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.12);
}

#bbai-dashboard-main .bbai-dashboard-hero__icon svg {
    width: 22px;
    height: 22px;
}

#bbai-dashboard-main .bbai-dashboard-hero[data-tone="setup"] .bbai-dashboard-hero__icon {
    background: rgba(37, 99, 235, 0.12);
    color: var(--bbai-ui-brand-strong);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

#bbai-dashboard-main .bbai-dashboard-hero[data-tone="attention"] .bbai-dashboard-hero__icon {
    background: rgba(180, 83, 9, 0.12);
    color: var(--bbai-ui-warning);
    box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.14);
}

#bbai-dashboard-main .bbai-dashboard-hero[data-tone="paused"] .bbai-dashboard-hero__icon {
    background: rgba(185, 28, 28, 0.1);
    color: var(--bbai-ui-danger);
    box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.14);
}

#bbai-dashboard-main .bbai-dashboard-hero__heading-copy {
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero__headline,
#bbai-dashboard-main .bbai-dashboard-hero-heading {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-dashboard-hero-subtext {
    max-width: 72ch;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-dashboard-hero__next-step {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-dashboard-hero__workflow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero__workflow-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--bbai-ui-brand-strong);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#bbai-dashboard-main .bbai-dashboard-hero__note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 680px;
    padding-top: 2px;
}

#bbai-dashboard-main .bbai-dashboard-hero__usage {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-primary {
    font-weight: 600;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-dashboard-hero__usage-secondary {
    color: var(--bbai-ui-muted);
    font-size: 12px;
    font-weight: 500;
}

#bbai-dashboard-main .bbai-dashboard-hero-progress:not(.bbai-banner__progress) {
    margin-top: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-progress-track:not(.bbai-banner__progress-track) {
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    overflow: hidden;
}

#bbai-dashboard-main .bbai-dashboard-hero-progress-fill:not(.bbai-banner__progress-fill) {
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-self: end;
    gap: 8px;
    width: min(100%, 320px);
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero-actions__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-dashboard-hero-actions .bbai-btn-primary {
    border: 1px solid transparent;
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    transform: translateY(0);
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-dashboard-hero-actions .bbai-btn-primary:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--secondary {
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.74);
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--secondary:hover {
    border-color: rgba(37, 99, 235, 0.18);
    background: #ffffff;
}

#bbai-dashboard-main .bbai-dashboard-hero__cta--tertiary {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bbai-ui-brand-strong);
    font-size: 13px;
    font-weight: 600;
    justify-content: flex-start;
}

#bbai-dashboard-main .bbai-dashboard-hero-actions__helper {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero__cta.is-disabled {
    opacity: 0.58;
    pointer-events: none;
}

#bbai-dashboard-main .bbai-status-card .bbai-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

#bbai-dashboard-main .bbai-status-card__scan-meta,
#bbai-dashboard-main .bbai-status-summary__line--meta {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-status-card__body {
    gap: 16px;
}

#bbai-dashboard-main .bbai-status-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-status-summary__line--primary {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-status-summary__line--secondary {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-status-card .bbai-status-insight {
    margin: 2px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--bbai-ui-line);
    border-radius: 16px;
    background: var(--bbai-ui-surface-soft) !important;
    text-align: left;
}

#bbai-dashboard-main .bbai-status-insight__header {
    justify-content: flex-start;
    margin-bottom: 8px;
}

#bbai-dashboard-main .bbai-status-insight__title {
    font-size: 14px;
}

#bbai-dashboard-main .bbai-status-insight__message,
#bbai-dashboard-main .bbai-status-insight__guidance,
#bbai-dashboard-main .bbai-status-insight__meta {
    margin: 0;
    text-align: left;
}

#bbai-dashboard-main .bbai-status-insight__message {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

#bbai-dashboard-main .bbai-status-insight__guidance {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    opacity: 1;
}

#bbai-dashboard-main .bbai-status-insight__meta {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.88;
}

#bbai-dashboard-main .bbai-status-insight__actions {
    justify-content: flex-start;
    gap: 8px 16px;
    margin-top: 16px;
}

#bbai-dashboard-main .bbai-status-insight__action {
    margin-top: 0;
}

#bbai-dashboard-main .bbai-status-insight__action--button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: #10b981 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#bbai-dashboard-main .bbai-status-insight__action--link {
    color: var(--bbai-ui-brand-strong);
}

#bbai-dashboard-main .bbai-status-insight__action--muted {
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-status-insight--success {
    border-color: #cce7d3;
    background: linear-gradient(180deg, #f6fdf7 0%, #effaf1 100%) !important;
    color: var(--bbai-ui-success);
}

#bbai-dashboard-main .bbai-status-insight--warning {
    border-color: rgba(217, 119, 6, 0.2);
    background: linear-gradient(180deg, #fffdf7 0%, #fffbeb 100%) !important;
    color: var(--bbai-ui-warning);
}

#bbai-dashboard-main .bbai-status-insight--danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(180deg, #fff7f7 0%, #fef2f2 100%) !important;
    color: var(--bbai-ui-danger);
}

#bbai-dashboard-main .bbai-plan-usage-card .bbai-card__body {
    gap: 16px;
}

#bbai-dashboard-main .bbai-plan-usage {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) 1px minmax(0, 1fr) 1px minmax(0, 1.08fr);
    gap: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
}

#bbai-dashboard-main .bbai-plan-usage__tier,
#bbai-dashboard-main .bbai-plan-usage__automation,
#bbai-dashboard-main .bbai-plan-usage__upgrade {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-plan-usage__plan-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

#bbai-dashboard-main .bbai-plan-usage__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-plan-usage__label {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-plan-usage__plan-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#bbai-dashboard-main .bbai-plan-usage__plan-badge--free {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(15, 23, 42, 0.04);
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-plan-usage__plan-badge--growth {
    border-color: rgba(21, 128, 61, 0.18);
    background: rgba(21, 128, 61, 0.08);
    color: var(--bbai-ui-success);
}

#bbai-dashboard-main .bbai-plan-usage__line {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-plan-usage__remaining {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--bbai-ui-brand-strong);
}

#bbai-dashboard-main .bbai-plan-usage__reset {
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-plan-usage__progress {
    height: 10px;
    margin-top: auto;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

#bbai-dashboard-main .bbai-plan-usage__progress-fill {
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
}

#bbai-dashboard-main .bbai-plan-usage__divider {
    width: 1px;
    margin: 0;
    border: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(148, 163, 184, 0.3) 20%, rgba(148, 163, 184, 0.3) 80%, transparent 100%);
}

#bbai-dashboard-main .bbai-plan-usage__automation {
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

#bbai-dashboard-main .bbai-plan-usage__section-title {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-plan-usage__automation-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-plan-usage__automation-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-plan-usage__automation-toggle-wrap {
    display: flex;
    justify-content: flex-start;
}

#bbai-dashboard-main .bbai-plan-usage__automation-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #ffffff;
}

#bbai-dashboard-main .bbai-plan-usage__automation-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #dbe4ee;
}

#bbai-dashboard-main .bbai-plan-usage__automation-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease;
}

#bbai-dashboard-main .bbai-plan-usage__automation-toggle.is-active .bbai-plan-usage__automation-track {
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
}

#bbai-dashboard-main .bbai-plan-usage__automation-toggle.is-active .bbai-plan-usage__automation-thumb {
    transform: translateX(18px);
}

#bbai-dashboard-main .bbai-plan-usage__automation-status {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-plan-usage__upgrade {
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__section-title,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__price,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__growth-copy,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__comparison,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__value-line,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-plan-usage__compare-link,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-upgrade-benefits__title,
#bbai-dashboard-main .bbai-plan-usage__upgrade .bbai-upgrade-benefits__description {
    color: #e2e8f0;
}

#bbai-dashboard-main .bbai-plan-usage__price {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    color: #ffffff;
}

#bbai-dashboard-main .bbai-plan-usage__growth-copy {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: #ffffff;
}

#bbai-dashboard-main .bbai-plan-usage__comparison {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    color: #cbd5e1;
}

#bbai-dashboard-main .bbai-plan-usage__progress--growth {
    background: rgba(148, 163, 184, 0.18);
    border: 0;
}

#bbai-dashboard-main .bbai-plan-usage__progress-fill--growth {
    background: linear-gradient(90deg, #38bdf8 0%, #22c55e 100%);
}

#bbai-dashboard-main .bbai-plan-usage__progress-indicator {
    border-color: #0f172a;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22);
}

#bbai-dashboard-main .bbai-upgrade-benefits {
    display: grid;
    gap: 8px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

#bbai-dashboard-main .bbai-upgrade-benefits__item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

#bbai-dashboard-main .bbai-upgrade-benefits__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 15px;
}

#bbai-dashboard-main .bbai-upgrade-benefits__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#bbai-dashboard-main .bbai-upgrade-benefits__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

#bbai-dashboard-main .bbai-upgrade-benefits__description {
    font-size: 12px;
    line-height: 1.55;
    color: #cbd5e1;
}

#bbai-dashboard-main .bbai-plan-usage__value {
    padding-top: 2px;
}

#bbai-dashboard-main .bbai-plan-usage__value-line {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
}

#bbai-dashboard-main .bbai-plan-usage__value-line strong {
    color: #ffffff;
}

#bbai-dashboard-main .bbai-plan-usage__actions {
    gap: 8px;
    margin-top: auto;
}

#bbai-dashboard-main .bbai-plan-usage__cta {
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: var(--bbai-ui-ink) !important;
    box-shadow: none !important;
}

#bbai-dashboard-main .bbai-plan-usage__compare-link {
    font-size: 13px;
    font-weight: 600;
    color: #dbeafe;
}

#bbai-dashboard-main .bbai-automation-card {
    border-color: #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--bbai-ui-shadow);
}

#bbai-dashboard-main .bbai-automation-card--premium {
    border-color: rgba(21, 128, 61, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #f6fdf7 100%);
}

#bbai-dashboard-main .bbai-automation-card__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-upgrade-card__section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-automation-card__toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 16px;
    background: #ffffff;
}

#bbai-dashboard-main .bbai-automation-card__toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-automation-card__toggle-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-automation-card__toggle-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-automation-card__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #f8fafc;
}

#bbai-dashboard-main .bbai-automation-card__toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #dbe4ee;
}

#bbai-dashboard-main .bbai-automation-card__toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease;
}

#bbai-dashboard-main .bbai-automation-card__toggle.is-active .bbai-automation-card__toggle-track {
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
}

#bbai-dashboard-main .bbai-automation-card__toggle.is-active .bbai-automation-card__toggle-thumb {
    transform: translateX(20px);
}

#bbai-dashboard-main .bbai-automation-card__toggle-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-automation-card__list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#bbai-dashboard-main .bbai-automation-card__list li {
    position: relative;
    padding-left: 16px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-automation-card__list li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2563eb 0%, #06b6d4 100%);
}

#bbai-dashboard-main .bbai-upgrade-value {
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
}

#bbai-dashboard-main .bbai-upgrade-value__line,
#bbai-dashboard-main .bbai-upgrade-value__support {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-upgrade-value__line strong {
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-upgrade-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

#bbai-dashboard-main .bbai-upgrade-cta {
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
}

#bbai-dashboard-main .bbai-workflow-card__body {
    justify-content: center;
}

#bbai-dashboard-main .bbai-workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-workflow-step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px 0;
}

#bbai-dashboard-main .bbai-workflow-step + .bbai-workflow-step {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

#bbai-dashboard-main .bbai-workflow-step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
    color: var(--bbai-ui-brand-strong);
}

#bbai-dashboard-main .bbai-workflow-step__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-workflow-step__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-workflow-step__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-workflow-step__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
}

#bbai-dashboard-main .bbai-dashboard-stats-wrap {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

#bbai-dashboard-main .bbai-dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

#bbai-dashboard-main .bbai-stat-card,
#bbai-dashboard-main .bbai-metric-card {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    text-align: left;
}

#bbai-dashboard-main .bbai-stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
    color: var(--bbai-ui-brand-strong);
}

#bbai-dashboard-main .bbai-stat-card__value {
    margin: 0;
}

#bbai-dashboard-main .bbai-accessibility-impact-card {
    border-color: rgba(22, 163, 74, 0.22);
    background: linear-gradient(180deg, #fcfffd 0%, #f2fbf4 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Logged-in insight cards: override generic stat-card treatment loaded above. */
#bbai-dashboard-main .bbai-li-insight-card.bbai-stat-card {
    position: relative;
    overflow: hidden;
    align-items: flex-start;
    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%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045), 0 18px 42px rgba(15, 23, 42, 0.06);
    text-align: left;
}

#bbai-dashboard-main .bbai-li-insight-card.bbai-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #22c55e 0%, rgba(34, 197, 94, 0.12) 100%);
}

#bbai-dashboard-main .bbai-li-insight-card.bbai-stat-card.secondary::before {
    background: linear-gradient(90deg, #3b82f6 0%, rgba(59, 130, 246, 0.12) 100%);
}

#bbai-dashboard-main .bbai-li-insight-card.bbai-stat-card.tertiary::before {
    background: linear-gradient(90deg, #7c3aed 0%, rgba(124, 58, 237, 0.12) 100%);
}

#bbai-dashboard-main .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%);
}

#bbai-dashboard-main .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%);
}

#bbai-dashboard-main .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%);
}

#bbai-dashboard-main .bbai-li-insight-card.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);
}

#bbai-dashboard-main .bbai-li-insight-card .bbai-stat-card-bottom {
    margin-top: auto;
}

#bbai-dashboard-main .bbai-accessibility-impact-card .bbai-card__header {
    margin-bottom: 4px;
}

#bbai-dashboard-main .bbai-accessibility-impact-card .bbai-card__body {
    padding-top: 0;
}

#bbai-dashboard-main .bbai-accessibility-impact__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #15803d;
}

#bbai-dashboard-main .bbai-accessibility-impact__layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

#bbai-dashboard-main .bbai-accessibility-impact__summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(100%, 560px);
    margin: 0 auto;
    text-align: center;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-shell {
    display: flex;
    justify-content: center;
    width: 100%;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-card {
    position: relative;
    width: min(100%, 360px);
    padding: 16px 24px;
    border: 1px solid rgba(22, 163, 74, 0.18);
    border-radius: 12px;
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.2), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 252, 246, 0.96) 100%);
    box-shadow: 0 16px 36px rgba(22, 101, 52, 0.08);
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #15803d;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-score {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    font-size: 24px;
    line-height: 1;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-score strong {
    font-size: clamp(42px, 6vw, 54px);
    font-weight: 600;
    letter-spacing: -0.04em;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-score span {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 600;
    color: #15803d;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-divider {
    width: 100%;
    height: 1px;
    margin: 16px 0 12px;
    background: linear-gradient(90deg, transparent 0%, rgba(21, 128, 61, 0.24) 16%, rgba(21, 128, 61, 0.24) 84%, transparent 100%);
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    color: #14532d;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-metric-label {
    font-size: 13px;
    font-weight: 500;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-metric strong {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-accessibility-impact__badge-powered {
    margin: 16px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
}

#bbai-dashboard-main .bbai-accessibility-impact__stats {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    color: #166534;
}

#bbai-dashboard-main .bbai-accessibility-impact__value {
    max-width: 48ch;
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-accessibility-impact__primary {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2px;
}

#bbai-dashboard-main .bbai-accessibility-impact__action--primary {
    min-width: 164px;
}

#bbai-dashboard-main .bbai-accessibility-impact__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 0;
}

#bbai-dashboard-main .bbai-accessibility-impact__action {
    justify-content: center;
}

#bbai-dashboard-main .bbai-accessibility-impact__action--secondary {
    position: relative;
    margin-left: 16px;
    padding: 0 0 0 12px;
    border: 0;
    background: transparent;
    color: #166534;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

#bbai-dashboard-main .bbai-accessibility-impact__action--secondary:first-child {
    margin-left: 0;
    padding-left: 0;
}

#bbai-dashboard-main .bbai-accessibility-impact__action--secondary::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 50%;
    color: rgba(22, 101, 52, 0.46);
    transform: translateY(-50%);
}

#bbai-dashboard-main .bbai-accessibility-impact__action--secondary:first-child::before {
    content: none;
}

#bbai-dashboard-main .bbai-accessibility-impact__action--secondary:hover,
#bbai-dashboard-main .bbai-accessibility-impact__action--secondary:focus-visible {
    color: #14532d;
    text-decoration: underline;
}

#bbai-dashboard-main .bbai-accessibility-impact__preview {
    width: min(100%, 460px);
    padding: 16px;
    border: 1px solid rgba(22, 163, 74, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

#bbai-dashboard-main .bbai-accessibility-impact__badge {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

#bbai-dashboard-main .bbai-review-prompt-card__body {
    gap: 16px 24px;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: none;
}

#bbai-dashboard-main .bbai-review-prompt-card__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-review-prompt-card__copy {
    font-size: 12px;
    line-height: 1.55;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-review-prompt-card__stars {
    opacity: 0.78;
}

#bbai-dashboard-main .bbai-review-prompt-card__cta {
    min-height: 38px;
    border-color: rgba(37, 99, 235, 0.18);
    color: var(--bbai-ui-brand-strong);
    box-shadow: none;
}

#bbai-dashboard-main .bbai-review-prompt-card__cta:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1);
}

#bbai-dashboard-main .bbai-dashboard-alert__cta:focus-visible,
#bbai-dashboard-main .bbai-dashboard-hero__cta:focus-visible,
#bbai-dashboard-main .bbai-status-insight__action:focus-visible,
#bbai-dashboard-main .bbai-plan-usage__cta:focus-visible,
#bbai-dashboard-main .bbai-plan-usage__compare-link:focus-visible,
#bbai-dashboard-main .bbai-upgrade-cta:focus-visible,
#bbai-dashboard-main .bbai-upgrade-compare-link:focus-visible,
#bbai-dashboard-main .bbai-workflow-step__btn:focus-visible,
#bbai-dashboard-main .bbai-accessibility-impact__action:focus-visible,
#bbai-dashboard-main .bbai-review-prompt-card__cta:focus-visible {
    outline: 2px solid var(--bbai-ui-brand);
    outline-offset: 2px;
}

@media (max-width: 1180px) {
    #bbai-dashboard-main .bbai-dashboard-row--1,
    #bbai-dashboard-main .bbai-dashboard-row--2 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #bbai-dashboard-main .bbai-plan-usage {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-plan-usage__divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.28) 16%, rgba(148, 163, 184, 0.28) 84%, transparent 100%);
    }
}

@media (max-width: 960px) {
    #bbai-dashboard-main .bbai-dashboard-hero__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-dashboard-hero-actions {
        justify-self: stretch;
        width: 100%;
        max-width: none;
    }

    #bbai-dashboard-main .bbai-dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main .bbai-dashboard-hero,
    #bbai-dashboard-main .bbai-dashboard-card,
    #bbai-dashboard-main .bbai-stat-card {
        padding: 24px;
    }

    #bbai-dashboard-main .bbai-dashboard-alert {
        flex-direction: column;
    }

    #bbai-dashboard-main .bbai-dashboard-alert__actions,
    #bbai-dashboard-main .bbai-upgrade-bottom,
    #bbai-dashboard-main .bbai-review-prompt-card__actions {
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-automation-card__toggle-row,
    #bbai-dashboard-main .bbai-status-card .bbai-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__heading-row {
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__workflow {
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    #bbai-dashboard-main .bbai-dashboard-hero__headline,
    #bbai-dashboard-main .bbai-dashboard-hero-heading {
        font-size: 24px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero-actions {
        width: 100%;
    }

    #bbai-dashboard-main .bbai-dashboard-hero__cta--primary,
    #bbai-dashboard-main .bbai-dashboard-hero__cta--secondary,
    #bbai-dashboard-main .bbai-workflow-step__btn {
        width: 100%;
    }

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

    #bbai-dashboard-main .bbai-accessibility-impact__summary {
        width: 100%;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__badge-card,
    #bbai-dashboard-main .bbai-accessibility-impact__preview,
    #bbai-dashboard-main .bbai-accessibility-impact__action--primary {
        width: 100%;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__badge-card {
        padding: 16px;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__badge-metric {
        gap: 8px;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__actions {
        row-gap: 8px;
    }

    #bbai-dashboard-main .bbai-accessibility-impact__action--secondary {
        margin-left: 8px;
        padding-left: 8px;
    }
}

#bbai-dashboard-main .bbai-dashboard-row--2.bbai-guided-workflow-section {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
}

#bbai-dashboard-main .bbai-guided-workflow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
}

#bbai-dashboard-main .bbai-guided-workflow__eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-hero-full {
    position: relative;
    width: auto;
    margin: 0 -32px 26px;
    padding: 24px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#bbai-dashboard-main .bbai-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box;
}

#bbai-dashboard-main .bbai-dashboard-hero.bbai-hero {
    margin: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-inner {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
}

#bbai-dashboard-main .bbai-hero .bbai-hero-content,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

#bbai-dashboard-main .bbai-hero .bbai-hero-left,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__heading-row {
    align-items: flex-start;
    gap: 16px;
    margin: 0;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(37, 99, 235, 0.08));
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__icon svg {
    width: 20px;
    height: 20px;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__heading-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

#bbai-dashboard-main .bbai-hero .bbai-workflow,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__workflow {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #9ca3af;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__headline,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-heading {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-subtext {
    max-width: 72ch;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__next-step {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #111827;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__usage-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 680px;
    padding-top: 4px;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__usage {
    gap: 8px;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #4b5563;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__usage-primary {
    font-weight: 600;
    color: #111827;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__usage-secondary {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-progress:not(.bbai-banner__progress) {
    margin-top: 8px;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-progress-track:not(.bbai-banner__progress-track) {
    height: 6px;
    background: rgba(148, 163, 184, 0.18);
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-progress-fill:not(.bbai-banner__progress-fill) {
    background: linear-gradient(90deg, #4f46e5 0%, #2563eb 100%);
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__note {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
}

#bbai-dashboard-main .bbai-hero .bbai-hero-right,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-actions {
    display: flex;
    flex: 0 0 min(100%, 320px);
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: min(100%, 320px);
    min-width: 0;
}

#bbai-dashboard-main .bbai-hero .bbai-hero-secondary-actions {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-actions__item {
    width: 100%;
    gap: 4px;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta {
    width: 100%;
    min-height: 40px;
    justify-content: flex-start;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-actions .bbai-btn-primary {
    border: 1px solid transparent;
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-actions .bbai-btn-primary:hover {
    background: #059669 !important;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta--secondary,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta--tertiary,
#bbai-dashboard-main .bbai-hero .bbai-btn-secondary {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6 !important;
    color: #111827 !important;
    box-shadow: none !important;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta--secondary:hover,
#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta--tertiary:hover,
#bbai-dashboard-main .bbai-hero .bbai-btn-secondary:hover {
    transform: translateY(-1px);
    border-color: #d1d5db;
    background: #ffffff !important;
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__cta:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-actions__helper {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

@media (max-width: 900px) {
    #bbai-dashboard-main .bbai-hero .bbai-hero-content,
    #bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__layout {
        flex-direction: column;
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-hero .bbai-hero-right,
    #bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-actions {
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main .bbai-hero-full {
        margin-right: -24px;
        margin-left: -24px;
        padding: 24px 0 16px;
    }

    #bbai-dashboard-main .bbai-hero-inner {
        padding: 0 24px;
    }

    #bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__headline,
    #bbai-dashboard-main .bbai-hero .bbai-dashboard-hero-heading {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    #bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__heading-row {
        gap: 8px;
    }

    #bbai-dashboard-main .bbai-hero .bbai-dashboard-hero__icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}

#bbai-dashboard-main .bbai-guided-workflow__copy {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-guided-workflow__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

#bbai-dashboard-main .bbai-actions-card,
#bbai-dashboard-main .bbai-automation-card {
    min-height: 0;
}

#bbai-dashboard-main .bbai-actions-card .bbai-card__header,
#bbai-dashboard-main .bbai-automation-card .bbai-card__header {
    margin-bottom: 16px;
}

#bbai-dashboard-main .bbai-workflow-card__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-workflow-card .bbai-card__title,
#bbai-dashboard-main .bbai-automation-card .bbai-card__title {
    margin-bottom: 4px;
}

#bbai-dashboard-main .bbai-workflow-card__desc,
#bbai-dashboard-main .bbai-automation-card__lead {
    max-width: 34rem;
}

#bbai-dashboard-main .bbai-workflow-steps {
    gap: 0;
}

#bbai-dashboard-main .bbai-workflow-step {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    padding: 16px 0;
}

#bbai-dashboard-main .bbai-workflow-step__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

#bbai-dashboard-main .bbai-workflow-step__content {
    gap: 4px;
}

#bbai-dashboard-main .bbai-workflow-step__desc {
    max-width: 28rem;
}

#bbai-dashboard-main .bbai-automation-card__status-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

#bbai-dashboard-main .bbai-automation-card__status-row--locked {
    border-color: rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-automation-card__status-row--ready {
    border-color: rgba(21, 128, 61, 0.16);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.88) 0%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-automation-card__status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 16px;
}

#bbai-dashboard-main .bbai-automation-card__status-row--locked .bbai-automation-card__status-indicator {
    background: #f1f5f9;
    color: #475569;
}

#bbai-dashboard-main .bbai-automation-card__status-row--ready .bbai-automation-card__status-indicator {
    background: #ecfdf3;
    color: #15803d;
}

#bbai-dashboard-main .bbai-automation-card__status-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-automation-card__status-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#bbai-dashboard-main .bbai-automation-card__status-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bbai-ui-ink);
}

#bbai-dashboard-main .bbai-automation-card__status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}

#bbai-dashboard-main .bbai-automation-card__status-badge--locked {
    border: 1px solid #d7dee7;
    background: #f8fafc;
    color: #334155;
}

#bbai-dashboard-main .bbai-automation-card__status-badge--ready {
    border: 1px solid #bbf7d0;
    background: #ecfdf3;
    color: #166534;
}

#bbai-dashboard-main .bbai-automation-card__status-helper {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--bbai-ui-text);
}

#bbai-dashboard-main .bbai-automation-card__list {
    gap: 8px;
}

#bbai-dashboard-main .bbai-automation-card__list li {
    padding-left: 16px;
}

#bbai-dashboard-main .bbai-automation-card__list li::before {
    top: 7px;
    width: 7px;
    height: 7px;
}

#bbai-dashboard-main .bbai-upgrade-value {
    padding: 8px 16px;
}

#bbai-dashboard-main .bbai-upgrade-bottom {
    gap: 8px;
    padding-top: 16px;
}

#bbai-dashboard-main .bbai-upgrade-card .bbai-upgrade-compare-link,
#bbai-dashboard-main .bbai-upgrade-card .bbai-compare-plans {
    font-weight: 600;
    color: #4b5563;
}

@media (max-width: 1180px) {
    #bbai-dashboard-main .bbai-guided-workflow__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main .bbai-guided-workflow {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    #bbai-dashboard-main .bbai-automation-card__status-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    #bbai-dashboard-main .bbai-upgrade-cta {
        width: 100%;
        justify-content: center;
    }
}

/* Command center dashboard */
#bbai-dashboard-main .bbai-hero-full,
.bbai-command-hero-host.bbai-hero-full {
    width: 100%;
    margin: 0 0 var(--bbai-command-banner-gap, 24px);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-hero-inner,
.bbai-command-hero-host > .bbai-hero-inner {
    width: 100%;
    max-width: none;
    padding: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) {
    margin: 0;
    padding: 32px;
    border: 1px solid #dce7f5;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 34%),
        linear-gradient(145deg, #fbfdff 0%, #f3f8ff 52%, #ffffff 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="healthy"] {
    border-color: #d7ebe0;
    background:
        radial-gradient(circle at top right, rgba(22, 163, 74, 0.09), transparent 34%),
        linear-gradient(145deg, #fcfffd 0%, #f3fbf6 52%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] {
    border-color: #f7dfbf;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 34%),
        linear-gradient(145deg, #fffdf9 0%, #fff7ed 52%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] {
    border-color: #f1d3d3;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.11), transparent 34%),
        linear-gradient(145deg, #fffdfd 0%, #fff4f4 52%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 360px);
    gap: 24px;
    align-items: start;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__heading-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="healthy"] .bbai-dashboard-hero__icon {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] .bbai-dashboard-hero__icon {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] .bbai-dashboard-hero__icon {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__icon svg {
    width: 22px;
    height: 22px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
    margin: 0;
    font-size: 31px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__next-step,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__note {
    max-width: 64ch;
    margin: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__subtext {
    font-size: 15px;
    line-height: 1.55;
    color: #4b5563;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__next-step {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__note {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-pill,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-primary,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-secondary {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-pill {
    font-weight: 600;
    color: #1e3a8a;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-primary {
    font-weight: 600;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-secondary {
    color: #475569;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background-color: #10b981;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #c97a00 0%, #d48806 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6a6fd1 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
#bbai-dashboard-main .bbai-command-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-command-action--primary {
    padding: 0 24px;
    border: 1px solid transparent;
    background: #10b981;
    color: #ffffff;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    transform: translateY(0);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-command-action--primary:hover {
    transform: translateY(-1px);
    background: var(--bbai-cta-primary-bg, #10b981);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:active,
#bbai-dashboard-main .bbai-command-action--primary:active {
    transform: translateY(0) scale(0.98);
    background: var(--bbai-cta-primary-bg, #10b981);
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    transition-duration: 0.1s;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
#bbai-dashboard-main .bbai-command-action--ghost,
#bbai-dashboard-main .bbai-command-action--secondary,
#bbai-dashboard-main .bbai-command-action--tertiary {
    justify-content: flex-start;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1f2937;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link:hover,
#bbai-dashboard-main .bbai-command-action--ghost:hover,
#bbai-dashboard-main .bbai-command-action--secondary:hover,
#bbai-dashboard-main .bbai-command-action--tertiary:hover {
    border-color: #c4d3e8;
    background: #f8fbff;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link:focus-visible,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta:not(.bbai-dashboard-hero__cta--primary):focus-visible,
#bbai-dashboard-main .bbai-command-action:not(.bbai-command-action--primary):focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
}

#bbai-dashboard-main .bbai-dashboard-command {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-dashboard-command__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* State-driven layout: status card spans full width and becomes secondary when no issues */
#bbai-dashboard-main[data-bbai-ui-state="NOT_SCANNED"] .bbai-command-card--status .bbai-command-status__summary,
#bbai-dashboard-main[data-bbai-ui-state="NOT_SCANNED"] .bbai-command-card--status [data-bbai-status-summary-detail] {
    display: none;
}

#bbai-dashboard-main[data-bbai-ui-state="COMPLETE"] .bbai-command-card--plan {
    opacity: 0.85;
}

/* LIMIT_REACHED: plan card gets visual emphasis */
#bbai-dashboard-main[data-bbai-ui-state="LIMIT_REACHED"] .bbai-command-card--plan {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 4px 12px rgba(245, 158, 11, 0.08);
}

#bbai-dashboard-main[data-bbai-ui-state="LIMIT_REACHED"] .bbai-command-card--plan.bbai-command-card--limit-active {
    order: -1;
    grid-column: 1 / -1;
}

/* SCANNING state: pulse the donut */
#bbai-dashboard-main[data-bbai-ui-state="SCANNING"] [data-bbai-status-donut] {
    animation: bbai-donut-pulse 1.8s ease-in-out infinite;
}

@keyframes bbai-donut-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* FIXING state: subtle pulse on status value */
#bbai-dashboard-main[data-bbai-ui-state="FIXING"] [data-bbai-status-coverage-value] {
    animation: bbai-value-pulse 1.2s ease-in-out infinite;
}

@keyframes bbai-value-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#bbai-dashboard-main .bbai-command-card {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
}

#bbai-dashboard-main .bbai-command-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

#bbai-dashboard-main .bbai-command-card__eyebrow,
#bbai-dashboard-main .bbai-dashboard-alert-card__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

#bbai-dashboard-main .bbai-command-card__title,
#bbai-dashboard-main .bbai-dashboard-alert-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
    letter-spacing: -0.01em;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-command-card__meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    white-space: nowrap;
}

#bbai-dashboard-main .bbai-command-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-status__overview {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

#bbai-dashboard-main .bbai-command-donut {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: conic-gradient(#e2e8f0 0deg 360deg);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

#bbai-dashboard-main .bbai-command-donut__inner {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

#bbai-dashboard-main .bbai-command-status__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-command-status__label {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

#bbai-dashboard-main .bbai-command-status__value {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-command-meter {
    height: 6px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

#bbai-dashboard-main .bbai-command-meter__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

#bbai-dashboard-main .bbai-command-meter__fill--plan {
    background: linear-gradient(90deg, #0f172a 0%, #334155 100%);
}

#bbai-dashboard-main .bbai-command-meter--growth {
    height: 4px;
    background: #e5e7eb;
}

#bbai-dashboard-main .bbai-command-meter__fill--growth {
    background: linear-gradient(90deg, #94a3b8 0%, #60a5fa 100%);
}

#bbai-dashboard-main .bbai-command-status__summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-command-breakdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

#bbai-dashboard-main .bbai-command-breakdown:last-child {
    border-bottom: 0;
}

#bbai-dashboard-main .bbai-command-breakdown__label,
#bbai-dashboard-main .bbai-command-plan__label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #64748b;
}

#bbai-dashboard-main .bbai-command-breakdown__value,
#bbai-dashboard-main .bbai-command-plan__value {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-command-status__summary-line,
#bbai-dashboard-main .bbai-command-status__detail {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

#bbai-dashboard-main .bbai-command-status__summary-line {
    font-weight: 600;
    color: #0f172a;
}

#bbai-dashboard-main .bbai-command-status__detail {
    color: #475569;
}

#bbai-dashboard-main .bbai-command-plan {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-plan__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-plan__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

#bbai-dashboard-main .bbai-command-plan__comparison {
    margin: -2px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

#bbai-dashboard-main .bbai-dashboard-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border: 1px solid #f3dcc0;
    border-radius: 12px;
    background: linear-gradient(145deg, #fffdfa 0%, #fff6eb 100%);
}

#bbai-dashboard-main .bbai-dashboard-alert-card--danger {
    border-color: #f3cdcd;
    background: linear-gradient(145deg, #fffdfd 0%, #fff1f1 100%);
}

#bbai-dashboard-main .bbai-dashboard-alert-card__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-alert-card__message {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    color: #475569;
}

#bbai-dashboard-main .bbai-dashboard-alert-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

#bbai-dashboard-main .bbai-dashboard-feedback {
    padding: 12px 16px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1080px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__layout,
    #bbai-dashboard-main .bbai-dashboard-command__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions,
    #bbai-dashboard-main .bbai-dashboard-alert-card__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) {
        padding: 24px 16px;
        border-radius: 12px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
        font-size: 26px;
    }

    #bbai-dashboard-main .bbai-command-card {
        padding: 24px;
    }

    #bbai-dashboard-main .bbai-command-status__overview {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 16px;
    }

    #bbai-dashboard-main .bbai-dashboard-alert-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    #bbai-dashboard-main .bbai-command-status__overview {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-command-donut {
        width: 84px;
        height: 84px;
        margin: 0 auto;
    }

    #bbai-dashboard-main .bbai-command-plan__row {
        flex-direction: column;
        align-items: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__secondary-actions,
    #bbai-dashboard-main .bbai-command-plan__actions,
    #bbai-dashboard-main .bbai-dashboard-alert-card__actions {
        width: 100%;
        flex-direction: column;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
    #bbai-dashboard-main .bbai-command-action {
        width: 100%;
    }
}

/* Simplified dashboard polish */
#bbai-dashboard-main,
.bbai-command-hero-host {
    --bbai-surface: #ffffff;
    --bbai-surface-soft: #f8fafc;
    --bbai-surface-warm: #fffaf3;
    --bbai-surface-warm-soft: #fff7ed;
    --bbai-border-soft: #f1f5f9;
    --bbai-border-muted: #e5e7eb;
    --bbai-divider: #f1f5f9;
    --bbai-text-strong: #0f172a;
    --bbai-text-body: #334155;
    --bbai-text-muted: #64748b;
    /* Brand primary = action green (not blue) — drives --bbai-admin-color-primary via foundation */
    --bbai-primary: #10b981;
    --bbai-primary-strong: #047857;
    --bbai-success: #16a34a;
    --bbai-warning: #c97a00;
    --bbai-warning-soft: #fff7ed;
    --bbai-danger: #dc2626;
    --bbai-danger-soft: #fff7f7;
    --bbai-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --bbai-shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
    --bbai-command-banner-gap: var(--section-spacing, var(--bbai-space-6));
    --bbai-command-banner-padding-block: var(--bbai-rhythm-banner-padding-block, var(--bbai-space-6));
    --bbai-command-banner-padding-inline: var(--bbai-rhythm-banner-padding-inline, var(--bbai-space-6));
    --bbai-command-banner-radius: 16px;
    --bbai-command-card-padding: var(--bbai-rhythm-card-padding, var(--bbai-space-6));
    --bbai-command-group-gap: var(--card-gap, var(--bbai-space-4));
    --bbai-command-row-padding: var(--bbai-rhythm-row-padding-y, var(--bbai-space-3));
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner).bbai-dashboard-section {
    margin-bottom: 0;
}

#bbai-dashboard-main .bbai-dashboard-command {
    gap: var(--section-spacing, 24px);
}

#bbai-dashboard-main .bbai-dashboard-command__grid {
    gap: var(--card-gap, 16px);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) {
    width: 100%;
    margin: 0;
    padding: var(--bbai-command-banner-padding-block) var(--bbai-command-banner-padding-inline);
    border: 1px solid #e9eef5;
    border-radius: var(--bbai-command-banner-radius);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 36%),
        linear-gradient(140deg, #fcfdff 0%, #f7faff 56%, #ffffff 100%);
    box-shadow: var(--bbai-shadow-sm);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="healthy"] {
    border-color: #deeee5;
    background:
        radial-gradient(circle at top right, rgba(22, 163, 74, 0.08), transparent 34%),
        linear-gradient(135deg, #fcfffd 0%, #f4fbf7 54%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] {
    border-color: #f0dec9;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.08), transparent 36%),
        linear-gradient(140deg, #fffdf9 0%, #fff8f0 58%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] {
    border-color: #f1d7d4;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.08), transparent 34%),
        linear-gradient(135deg, #fffdfd 0%, #fff4f3 54%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__layout {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: var(--card-gap, 16px) 0;
    align-items: start;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-copy {
    gap: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__heading-row {
    gap: 16px;
    align-items: flex-start;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--bbai-primary-strong);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="healthy"] .bbai-dashboard-hero__icon {
    color: #15803d;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] .bbai-dashboard-hero__icon {
    color: #c2410c;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] .bbai-dashboard-hero__icon {
    color: #b91c1c;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
    font-size: 34px;
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__next-step,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__note {
    max-width: 62ch;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__subtext {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__next-step {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-block {
    gap: 8px;
    margin-top: 16px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage {
    gap: 8px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-pill {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
    color: #1e3a8a;
    font-weight: 600;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-primary,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-secondary {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-primary {
    color: var(--bbai-text-strong);
    font-weight: 600;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-secondary {
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-progress-track {
    height: 6px;
    background: rgba(148, 163, 184, 0.18);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-progress-fill {
    background-color: #10b981;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="healthy"] .bbai-dashboard-hero-progress-fill {
    background-color: #16a34a;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] {
    border-color: #cfe9d8;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 36%),
        linear-gradient(145deg, #f7fff9 0%, #effaf2 55%, #ffffff 100%);
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(34, 197, 94, 0.08) inset;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__next-step {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 4px 12px 4px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__icon {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

#bbai-dashboard-main .bbai-dashboard-hero__icon--draw svg path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: bbai-icon-draw 0.8s cubic-bezier(0.33, 1, 0.68, 1) 0.15s forwards;
}

@keyframes bbai-icon-draw {
    to {
        stroke-dashoffset: 0;
    }
}

#bbai-dashboard-main .bbai-dashboard-hero--celebrate {
    animation: bbai-success-glow-pulse 0.6s ease-out both;
}

@keyframes bbai-success-glow-pulse {
    0% {
        box-shadow:
            0 16px 36px rgba(15, 23, 42, 0.06),
            0 0 0 0 rgba(34, 197, 94, 0.14);
    }
    55% {
        box-shadow:
            0 16px 36px rgba(15, 23, 42, 0.08),
            0 0 0 8px rgba(34, 197, 94, 0.06);
    }
    100% {
        box-shadow:
            0 16px 36px rgba(15, 23, 42, 0.06),
            0 0 0 0 rgba(34, 197, 94, 0);
    }
}

#bbai-dashboard-main .bbai-dashboard-hero__loop {
    display: grid;
    gap: 4px;
    margin-top: 4px;
}

#bbai-dashboard-main .bbai-dashboard-hero__loop-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: var(--bbai-ui-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero__loop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero__loop-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.88);
    color: var(--bbai-ui-ink);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero__loop-link:hover {
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(255, 255, 255, 1);
}

#bbai-dashboard-main .bbai-dashboard-hero__loop-tension {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-text-muted, #94a3b8);
    font-style: italic;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #c97a00 0%, #d48806 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6a6fd1 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__note {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-text-muted);
    opacity: 0.78;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions {
    gap: 8px;
    width: min(100%, 360px);
    max-width: none;
    margin-left: auto;
    margin-top: var(--bbai-cta-group-margin-top, 16px);
    justify-self: stretch;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions__item {
    display: flex;
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
#bbai-dashboard-main .bbai-command-action {
    min-height: var(--bbai-cta-primary-min-height, 40px);
    border-radius: var(--bbai-cta-primary-radius, 8px);
    font-size: var(--bbai-cta-primary-font-size, 14px);
    font-weight: var(--bbai-cta-primary-font-weight, 500);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary {
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-command-action--primary {
    padding: 0 var(--bbai-cta-primary-padding-x, 16px);
    border: 1px solid transparent;
    background: var(--bbai-cta-primary-bg, #10b981);
    color: #ffffff;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    transform: translateY(0);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary {
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary,
#bbai-dashboard-main .bbai-command-action--ghost,
#bbai-dashboard-main .bbai-command-action--secondary {
    justify-content: center;
    padding: 0 var(--bbai-cta-primary-padding-x, 16px);
    border: 1px solid rgba(148, 163, 184, 0.11);
    background: #fafbfc;
    color: #7b8898;
    font-weight: 400;
    box-shadow: none;
    transform: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--tertiary,
#bbai-dashboard-main .bbai-command-action--tertiary {
    min-height: auto;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bbai-text-muted);
    box-shadow: none;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--tertiary {
    justify-content: center;
    width: auto;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-command-action--primary:hover {
    border-color: transparent;
    background: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:focus-visible,
#bbai-dashboard-main .bbai-command-action--primary:focus-visible {
    outline: none !important;
    background: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    transform: translateY(0) !important;
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(16, 185, 129, 0.35) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:active,
#bbai-dashboard-main .bbai-command-action--primary:active {
    border-color: transparent !important;
    background: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    transform: translateY(0) scale(0.98) !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary:hover,
#bbai-dashboard-main .bbai-command-action--ghost:hover,
#bbai-dashboard-main .bbai-command-action--secondary:hover {
    border-color: rgba(148, 163, 184, 0.26);
    background: #f4f6f8;
    color: #606b78;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--tertiary:hover,
#bbai-dashboard-main .bbai-command-action--tertiary:hover {
    color: var(--bbai-primary-strong);
    background: transparent;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link:focus-visible,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta:not(.bbai-dashboard-hero__cta--primary):focus-visible,
#bbai-dashboard-main .bbai-command-action:not(.bbai-command-action--primary):focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
}

#bbai-dashboard-main .bbai-command-card {
    padding: var(--bbai-command-card-padding);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: var(--bbai-surface);
    box-shadow: var(--bbai-shadow-sm);
}

#bbai-dashboard-main .bbai-command-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

#bbai-dashboard-main .bbai-command-card__eyebrow,
#bbai-dashboard-main .bbai-dashboard-alert-card__eyebrow {
    margin-bottom: 4px;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-command-card__title,
#bbai-dashboard-main .bbai-dashboard-alert-card__title {
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-card__meta {
    margin: 0;
    color: var(--bbai-text-muted);
    text-align: right;
    white-space: normal;
    font-size: 12px;
    line-height: 1.45;
}

#bbai-dashboard-main .bbai-command-card__meta-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
}

#bbai-dashboard-main .bbai-command-card__refresh {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bbai-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

#bbai-dashboard-main .bbai-command-card__refresh:hover {
    background: #f8fafc;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-card__refresh:active {
    transform: scale(0.96);
}

#bbai-dashboard-main .bbai-command-card__refresh:focus-visible {
    outline: none;
    background: #f8fafc;
    color: var(--bbai-text-strong);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

#bbai-dashboard-main .bbai-command-card__refresh[disabled] {
    cursor: default;
}

#bbai-dashboard-main .bbai-command-card__refresh-icon,
#bbai-dashboard-main .bbai-command-card__refresh-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bbai-dashboard-main .bbai-command-card__refresh-icon {
    font-size: 14px;
    line-height: 1;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

#bbai-dashboard-main .bbai-command-card__refresh-spinner {
    width: 14px;
    height: 14px;
    margin: auto;
    border: 1.8px solid currentColor;
    border-top-color: transparent;
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.82);
}

#bbai-dashboard-main .bbai-command-card__refresh.is-loading .bbai-command-card__refresh-icon {
    opacity: 0;
    transform: scale(0.82);
}

#bbai-dashboard-main .bbai-command-card__refresh.is-loading .bbai-command-card__refresh-spinner {
    opacity: 1;
    animation: bbai-spin 0.7s linear infinite;
}

#bbai-dashboard-main .bbai-command-card__refresh.is-loading {
    background: #f8fafc;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-status__overview {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

#bbai-dashboard-main .bbai-command-donut {
    width: 128px;
    height: 128px;
    flex-shrink: 0;
    box-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.14),
        0 6px 14px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.16s ease;
}

#bbai-dashboard-main .bbai-command-donut__inner {
    inset: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

#bbai-dashboard-main .bbai-command-donut[data-bbai-status-active-segment]:not([data-bbai-status-active-segment=""]) {
    box-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.14),
        0 10px 20px rgba(15, 23, 42, 0.08);
}

#bbai-dashboard-main .bbai-command-status__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-command-status__label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-command-status__value-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-status__value {
    margin: 0;
    font-size: 44px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-status__value span:last-child {
    font-size: 0.62em;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-command-status__summary-line {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-status__summary {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 4px;
}

#bbai-dashboard-main .bbai-command-breakdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: var(--bbai-command-row-padding) 0;
    border: 0;
    border-top: 1px solid var(--bbai-divider);
    background: transparent;
    cursor: default;
}

#bbai-dashboard-main .bbai-command-breakdown:first-child {
    border-top: 0;
}

#bbai-dashboard-main .bbai-command-breakdown:hover,
#bbai-dashboard-main .bbai-command-breakdown:focus-visible,
#bbai-dashboard-main .bbai-command-breakdown.is-active {
    background: transparent;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-command-breakdown__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-command-breakdown__label::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 999px;
    background: #cbd5e1;
}

#bbai-dashboard-main .bbai-command-breakdown--optimized .bbai-command-breakdown__label::before {
    background: #22b573;
}

#bbai-dashboard-main .bbai-command-breakdown--weak .bbai-command-breakdown__label::before {
    background: #d9a441;
}

#bbai-dashboard-main .bbai-command-breakdown--missing .bbai-command-breakdown__label::before {
    background: #c97a00;
}

#bbai-dashboard-main .bbai-command-plan__label {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-command-breakdown__value,
#bbai-dashboard-main .bbai-command-plan__value {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-breakdown--optimized .bbai-command-breakdown__value {
    color: #15803d;
}

#bbai-dashboard-main .bbai-command-breakdown--weak .bbai-command-breakdown__value {
    color: #7c5719;
}

#bbai-dashboard-main .bbai-command-breakdown--missing .bbai-command-breakdown__value {
    color: #805112;
}

#bbai-dashboard-main .bbai-command-breakdown {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    margin: 0 -10px;
    padding: var(--bbai-command-row-padding) 10px;
    min-height: 44px;
    border-radius: 12px;
    text-align: left;
    font: inherit;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 0 0 1px transparent;
    transition: background-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

#bbai-dashboard-main .bbai-command-breakdown:hover,
#bbai-dashboard-main .bbai-command-breakdown:focus-visible,
#bbai-dashboard-main .bbai-command-breakdown.is-active {
    background: #f8fbff;
    box-shadow: 0 0 0 1px rgba(203, 213, 225, 0.92);
}

#bbai-dashboard-main .bbai-command-breakdown:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#bbai-dashboard-main .bbai-command-breakdown.is-pressed {
    background: #eef4ff;
    box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.98);
}

#bbai-dashboard-main .bbai-command-breakdown__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

#bbai-dashboard-main .bbai-command-breakdown__value {
    min-width: 1.5em;
    text-align: right;
}

#bbai-dashboard-main .bbai-command-breakdown__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    color: var(--bbai-text-muted);
    opacity: 0.42;
    transform: translateX(0);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

#bbai-dashboard-main .bbai-command-breakdown:hover .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown:focus-visible .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown.is-active .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown.is-pressed .bbai-command-breakdown__arrow {
    opacity: 1;
    transform: translateX(2px);
}

#bbai-dashboard-main .bbai-command-status__detail {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-command-plan {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-plan__rows {
    display: flex;
    flex-direction: column;
}

#bbai-dashboard-main .bbai-command-plan__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: var(--bbai-command-row-padding) 0;
    border-top: 1px solid var(--bbai-divider);
}

#bbai-dashboard-main .bbai-command-plan__row:first-child {
    padding-top: 0;
    border-top: 0;
}

#bbai-dashboard-main .bbai-command-plan__usage {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

#bbai-dashboard-main .bbai-command-meter--plan {
    height: 8px;
    background: #e9efff;
}

#bbai-dashboard-main .bbai-command-meter__fill--plan {
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

#bbai-dashboard-main .bbai-command-plan__comparison-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-command-plan__comparison {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

#bbai-dashboard-main .bbai-command-plan__comparison-visual {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-plan__comparison-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

#bbai-dashboard-main .bbai-command-meter--growth {
    height: 3px;
    background: #e8edf3;
}

#bbai-dashboard-main .bbai-command-meter__fill--growth {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.32) 0%, rgba(16, 185, 129, 0.26) 100%);
}

#bbai-dashboard-main .bbai-command-plan__upgrade-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

#bbai-dashboard-main .bbai-command-plan__actions {
    gap: 8px;
    margin-top: 4px;
}

#bbai-dashboard-main .bbai-dashboard-alert-card {
    gap: 16px;
    padding: var(--bbai-command-banner-padding-block) var(--bbai-command-banner-padding-inline);
    border: 1px solid #f0dec9;
    border-radius: var(--bbai-command-banner-radius);
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.06), transparent 38%),
        linear-gradient(145deg, #fffdf9 0%, #fff7ed 100%);
    box-shadow: var(--bbai-shadow-sm);
    transition: box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#bbai-dashboard-main .bbai-dashboard-alert-card--danger {
    border-color: #f2d4d8;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.05), transparent 38%),
        linear-gradient(145deg, #fffdfd 0%, #fff5f5 100%);
}

#bbai-dashboard-main .bbai-dashboard-alert-card__copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-alert-card__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

#bbai-dashboard-main .bbai-dashboard-alert-card__message {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-dashboard-alert-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


#bbai-dashboard-main .bbai-dashboard-feedback {
    border-radius: 12px;
    box-shadow: var(--bbai-shadow-sm);
}

@media (max-width: 1080px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__layout,
    #bbai-dashboard-main .bbai-dashboard-command__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions {
        justify-self: stretch;
        max-width: none;
    }

    #bbai-dashboard-main .bbai-dashboard-alert-card__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main {
        --bbai-command-banner-padding-block: var(--bbai-space-5);
        --bbai-command-banner-padding-inline: var(--bbai-space-5);
        --bbai-command-card-padding: var(--bbai-rhythm-card-padding-compact, var(--bbai-space-4));
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) {
        padding: var(--bbai-command-banner-padding-block) var(--bbai-command-banner-padding-inline);
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
        font-size: 28px;
    }

    #bbai-dashboard-main .bbai-command-card,
    #bbai-dashboard-main .bbai-dashboard-alert-card {
        padding: var(--bbai-command-card-padding);
    }

    #bbai-dashboard-main .bbai-command-card__meta {
        text-align: left;
    }

    #bbai-dashboard-main .bbai-command-card__meta-group {
        justify-content: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-alert-card {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 560px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__secondary-actions,
    #bbai-dashboard-main .bbai-command-plan__actions,
    #bbai-dashboard-main .bbai-dashboard-alert-card__actions {
        width: 100%;
        flex-direction: column;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary,
    #bbai-dashboard-main .bbai-command-action--primary,
    #bbai-dashboard-main .bbai-command-action--ghost,
    #bbai-dashboard-main .bbai-command-action--secondary {
        width: 100%;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--tertiary,
    #bbai-dashboard-main .bbai-command-action--tertiary {
        justify-content: flex-start;
    }

    #bbai-dashboard-main .bbai-command-status__overview {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    #bbai-dashboard-main .bbai-command-donut {
        width: 104px;
        height: 104px;
        margin: 0 auto;
    }

    #bbai-dashboard-main .bbai-command-plan__row {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 420px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
        font-size: 24px;
    }

    #bbai-dashboard-main .bbai-command-plan__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
    #bbai-dashboard-main .bbai-command-action,
    #bbai-dashboard-main .bbai-command-card,
    #bbai-dashboard-main .bbai-dashboard-alert-card,
    #bbai-dashboard-main .bbai-command-meter__fill,
    #bbai-dashboard-main .bbai-dashboard-hero-progress-fill:not(.bbai-banner__progress-fill) {
        transition: none !important;
        transform: none !important;
    }
}

/* Final premium polish pass for the simplified dashboard */
#bbai-dashboard-main {
    --bbai-surface: #ffffff;
    --bbai-surface-soft: #f8fafc;
    --bbai-surface-warm: #fffaf4;
    --bbai-surface-warm-soft: #fff7ee;
    --bbai-border-soft: #f1f5f9;
    --bbai-border-muted: #e5ebf3;
    --bbai-divider: #f1f5f9;
    --bbai-text-strong: #0f172a;
    --bbai-text-body: #334155;
    --bbai-text-muted: #64748b;
    /* Brand primary = action green (not blue) — drives --bbai-admin-color-primary via foundation */
    --bbai-primary: #10b981;
    --bbai-primary-strong: #047857;
    --bbai-success: #16a34a;
    --bbai-warning: #c97a00;
    --bbai-danger: #dc2626;
    --bbai-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --bbai-shadow-md: 0 10px 24px rgba(15, 23, 42, 0.07);
}

#bbai-dashboard-main .bbai-dashboard-command {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#bbai-dashboard-main .bbai-dashboard-command__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) {
    padding: 24px;
    border: 1px solid #ece4d7;
    border-radius: 12px;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.055), transparent 34%),
        linear-gradient(155deg, #fffdf8 0%, #fff7ed 57%, #ffffff 100%);
    box-shadow: var(--bbai-shadow-sm);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="setup"] {
    border-color: #e5ecf5;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.055), transparent 34%),
        linear-gradient(155deg, #fcfdff 0%, #f6faff 56%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="attention"] {
    border-color: #ece0ce;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.055), transparent 34%),
        linear-gradient(155deg, #fffdf8 0%, #fff7ed 57%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="healthy"] {
    border-color: #e5eee7;
    background:
        radial-gradient(circle at top right, rgba(22, 163, 74, 0.05), transparent 34%),
        linear-gradient(155deg, #fcfffd 0%, #f5fbf7 56%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-tone="paused"] {
    border-color: #f0ddde;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.05), transparent 34%),
        linear-gradient(155deg, #fffdfd 0%, #fff6f6 56%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(264px, 312px);
    gap: 24px 32px;
    align-items: center;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__heading-row {
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
    margin: 0;
    font-size: var(--bbai-admin-type-hero, 28px);
    font-weight: var(--bbai-admin-type-weight-bold, 700);
    line-height: 1.08;
    letter-spacing: var(--bbai-tracking-tight, -0.03em);
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__subtext {
    margin-top: 8px;
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.55;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__next-step {
    margin-top: 8px;
    font-size: var(--bbai-admin-type-body-lg, 16px);
    font-weight: var(--bbai-admin-type-weight-semibold, 600);
    line-height: 1.55;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-block {
    margin-top: 16px;
    gap: 8px;
    max-width: 620px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage {
    gap: 4px 16px;
    font-size: var(--bbai-admin-type-meta, 13px);
    line-height: 1.5;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-pill {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #dde6f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #1e3a8a;
    font-size: var(--bbai-admin-type-label, 12px);
    font-weight: var(--bbai-admin-type-weight-semibold, 600);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-primary {
    color: var(--bbai-text-strong);
    font-weight: 600;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__usage-secondary {
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-progress-track {
    height: 8px;
    background: rgba(148, 163, 184, 0.18);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__note {
    margin-top: 8px;
    font-size: var(--bbai-admin-type-meta, 13px);
    line-height: 1.5;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions {
    width: min(100%, 312px);
    max-width: none;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__secondary-actions {
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
#bbai-dashboard-main .bbai-command-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--bbai-admin-btn-radius, 12px);
    font-size: var(--bbai-admin-type-body, 14px);
    font-weight: var(--bbai-admin-type-weight-semibold, 600);
    line-height: 1.1;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-command-action--primary {
    border: 1px solid var(--bbai-admin-btn-primary-border);
    background: var(--bbai-admin-btn-primary-bg);
    color: #ffffff;
    box-shadow: var(--bbai-admin-btn-primary-shadow);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary,
#bbai-dashboard-main .bbai-command-action--secondary {
    border: 1px solid var(--bbai-admin-btn-secondary-border);
    background: var(--bbai-admin-btn-secondary-bg);
    color: var(--bbai-admin-btn-secondary-text);
    box-shadow: none;
    font-weight: var(--bbai-admin-type-weight-medium, 500);
    transform: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--tertiary,
#bbai-dashboard-main .bbai-command-action--tertiary {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--bbai-admin-btn-tertiary-text, var(--bbai-text-muted));
    font-weight: var(--bbai-admin-type-weight-medium, 500);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-command-action--primary:hover {
    transform: var(--bbai-admin-btn-primary-lift, translateY(-1px));
    background: var(--bbai-admin-btn-primary-bg);
    box-shadow: var(--bbai-admin-btn-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:active,
#bbai-dashboard-main .bbai-command-action--primary:active {
    transform: translateY(0) scale(0.98);
    background: var(--bbai-cta-primary-bg, #10b981);
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:focus-visible,
#bbai-dashboard-main .bbai-command-action--primary:focus-visible {
    outline: none;
    background: var(--bbai-cta-primary-bg, #10b981);
    transform: translateY(0);
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(16, 185, 129, 0.35);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary:hover,
#bbai-dashboard-main .bbai-command-action--secondary:hover {
    transform: none;
    border-color: var(--bbai-admin-btn-secondary-border-hover);
    background: var(--bbai-admin-btn-secondary-bg-hover);
    color: var(--bbai-admin-btn-secondary-text-hover);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--tertiary:hover,
#bbai-dashboard-main .bbai-command-action--tertiary:hover {
    color: var(--bbai-admin-btn-tertiary-text-hover, var(--bbai-primary-strong));
}

#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link:focus-visible,
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta:not(.bbai-dashboard-hero__cta--primary):focus-visible,
#bbai-dashboard-main .bbai-command-action:not(.bbai-command-action--primary):focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(148, 163, 184, 0.35);
}

#bbai-dashboard-main .bbai-command-card,
#bbai-dashboard-main .bbai-dashboard-alert-card {
    border-radius: 12px;
}

#bbai-dashboard-main .bbai-command-card {
    padding: 24px;
    border: 1px solid var(--bbai-border-soft);
    background: var(--bbai-surface);
    box-shadow: var(--bbai-shadow-sm);
}

#bbai-dashboard-main .bbai-command-card__header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

#bbai-dashboard-main .bbai-command-card__eyebrow {
    margin: 0 0 6px;
    font-size: var(--bbai-admin-type-label, var(--bbai-section-label-size, 12px));
    font-weight: var(--bbai-section-label-weight, 700);
    line-height: var(--bbai-section-label-leading, 1.3);
    letter-spacing: var(--bbai-section-label-tracking, 0.08em);
    text-transform: uppercase;
    color: var(--bbai-section-label-color, #7b8aa0);
}

#bbai-dashboard-main .bbai-command-card__title {
    margin: 0;
    font-size: var(--bbai-admin-type-card-title, var(--bbai-section-title-size, 20px));
    font-weight: var(--bbai-admin-type-weight-semibold, var(--bbai-section-title-weight, 600));
    line-height: 1.2;
    letter-spacing: var(--bbai-tracking-tight, var(--bbai-section-title-tracking, -0.02em));
    color: var(--bbai-section-title-color, var(--bbai-text-strong));
}

#bbai-dashboard-main .bbai-command-card__meta-group {
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-card__meta {
    margin: 0;
    font-size: var(--bbai-admin-type-meta, 13px);
    line-height: 1.5;
    color: #7b8aa0;
    text-align: right;
}

#bbai-dashboard-main .bbai-command-card__refresh {
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #7b8aa0;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#bbai-dashboard-main .bbai-command-card__refresh:hover {
    border-color: rgba(37, 99, 235, 0.08);
    background: rgba(37, 99, 235, 0.06);
    color: var(--bbai-primary-strong);
}

#bbai-dashboard-main .bbai-command-card__refresh:active .bbai-command-card__refresh-icon {
    transform: rotate(-24deg);
}

#bbai-dashboard-main .bbai-command-card__refresh:focus-visible {
    outline: none;
    border-color: rgba(37, 99, 235, 0.14);
    background: rgba(37, 99, 235, 0.08);
    color: var(--bbai-primary-strong);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#bbai-dashboard-main .bbai-command-card__refresh-icon {
    transition: opacity 0.14s ease, transform 0.14s ease;
}

#bbai-dashboard-main .bbai-command-card__refresh-icon svg {
    width: 15px;
    height: 15px;
}

#bbai-dashboard-main .bbai-command-status {
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-status__overview {
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

#bbai-dashboard-main .bbai-command-donut {
    position: relative;
    width: 144px;
    height: 144px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12), 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
    animation: bbai-command-donut-enter 360ms ease-out both;
}

#bbai-dashboard-main .bbai-command-donut__inner {
    inset: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

#bbai-dashboard-main .bbai-command-donut[data-bbai-status-active-segment]:not([data-bbai-status-active-segment=""]) {
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.1), 0 10px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

#bbai-dashboard-main .bbai-command-status__content {
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-status__label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7b8aa0;
}

#bbai-dashboard-main .bbai-command-status__value-group {
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-status__value {
    margin: 0;
    font-size: 46px;
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-status__value span:last-child {
    color: #8392a8;
}

#bbai-dashboard-main .bbai-command-status__summary-line {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-status__summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-breakdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -10px;
    padding: var(--bbai-command-row-padding) 10px;
    min-height: 44px;
    border-top: 1px solid var(--bbai-divider);
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px transparent;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

#bbai-dashboard-main .bbai-command-breakdown:first-child {
    border-top: 0;
}

#bbai-dashboard-main .bbai-command-breakdown:hover,
#bbai-dashboard-main .bbai-command-breakdown:focus-visible,
#bbai-dashboard-main .bbai-command-breakdown.is-active {
    background: #f8fbff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

#bbai-dashboard-main .bbai-command-breakdown.is-pressed {
    background: #f1f5ff;
    box-shadow: inset 0 0 0 1px #dbe6ff;
    transform: translateY(1px);
}

#bbai-dashboard-main .bbai-command-breakdown:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#bbai-dashboard-main .bbai-command-breakdown__label {
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--bbai-text-body);
}

#bbai-dashboard-main .bbai-command-breakdown__label::before {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
}

#bbai-dashboard-main .bbai-command-breakdown__value,
#bbai-dashboard-main .bbai-command-plan__value {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-breakdown--optimized .bbai-command-breakdown__value,
#bbai-dashboard-main .bbai-command-breakdown--weak .bbai-command-breakdown__value,
#bbai-dashboard-main .bbai-command-breakdown--missing .bbai-command-breakdown__value {
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-breakdown__meta {
    gap: 8px;
}

#bbai-dashboard-main .bbai-command-breakdown__arrow {
    opacity: 0.38;
    transform: translateX(-2px);
    color: #8b99ad;
}

#bbai-dashboard-main .bbai-command-breakdown:hover .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown:focus-visible .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown.is-active .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown.is-pressed .bbai-command-breakdown__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable {
    background: linear-gradient(90deg, rgba(201, 122, 0, 0.06) 0%, rgba(201, 122, 0, 0.018) 58%, rgba(201, 122, 0, 0) 100%);
    box-shadow: inset 0 0 0 1px rgba(201, 122, 0, 0.14);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
    /* Slightly more vertical inset than plain rows so the tint does not crowd the label. */
    padding-top: calc(var(--bbai-command-row-padding) + 4px);
    padding-bottom: calc(var(--bbai-command-row-padding) + 4px);
    min-height: 48px;
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable .bbai-command-breakdown__value {
    color: #805112;
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable .bbai-command-breakdown__arrow {
    opacity: 0.72;
    color: #805112;
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable:hover .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown--missing-actionable:focus-visible .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown--missing-actionable.is-active .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown--missing-actionable.is-pressed .bbai-command-breakdown__arrow {
    opacity: 1;
    transform: translateX(0);
    color: #805112;
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable:hover,
#bbai-dashboard-main .bbai-command-breakdown--missing-actionable.is-active {
    background: linear-gradient(90deg, rgba(201, 122, 0, 0.09) 0%, rgba(201, 122, 0, 0.03) 60%, rgba(201, 122, 0, 0) 100%);
    box-shadow: inset 0 0 0 1px rgba(201, 122, 0, 0.2);
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable:focus-visible {
    outline: none;
    background: linear-gradient(90deg, rgba(201, 122, 0, 0.09) 0%, rgba(201, 122, 0, 0.03) 60%, rgba(201, 122, 0, 0) 100%);
    box-shadow: inset 0 0 0 1px rgba(201, 122, 0, 0.22), 0 0 0 3px rgba(201, 122, 0, 0.14);
}

#bbai-dashboard-main .bbai-command-breakdown--missing-actionable.is-pressed {
    background: linear-gradient(90deg, rgba(201, 122, 0, 0.1) 0%, rgba(201, 122, 0, 0.04) 60%, rgba(201, 122, 0, 0) 100%);
    box-shadow: inset 0 0 0 1px rgba(201, 122, 0, 0.22);
}

/* One-shot legacy hook (JS removes after attention cycle); prefer .bbai-dashboard-missing-attention */
#bbai-dashboard-main .bbai-command-breakdown--missing-cue {
    animation: none;
}

/**
 * Short attention pulse on the missing-row status dot (~3s total, then stops).
 */
@keyframes bbai-missing-status-dot-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    }
    50% {
        transform: scale(1.22);
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Pulse as soon as HTML paints (data attr from filter-group); JS-added .missing-actionable keeps parity after hydrate. */
#bbai-dashboard-main [data-bbai-missing-row-pulse="1"] .bbai-command-breakdown__label::before,
#bbai-dashboard-main .bbai-command-breakdown--missing-actionable.bbai-command-breakdown--missing .bbai-command-breakdown__label::before {
    animation: bbai-missing-status-dot-pulse 1s ease-in-out 3;
    transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
    #bbai-dashboard-main [data-bbai-missing-row-pulse="1"] .bbai-command-breakdown__label::before,
    #bbai-dashboard-main .bbai-command-breakdown--missing-actionable.bbai-command-breakdown--missing .bbai-command-breakdown__label::before {
        animation: none;
    }
}

/**
 * Dashboard only: gentle attention on the "Missing" coverage row (one 3s cycle; JS strips class at 3s).
 * transition:none: base row uses transition on background/box-shadow; without this, keyframes barely move.
 */
#bbai-dashboard-main [data-bbai-status-segment="missing"].bbai-dashboard-missing-attention.bbai-command-breakdown--missing-actionable {
    animation: bbai-dashboard-missing-attention 3s ease-in-out 1;
    transition: none;
}

@keyframes bbai-dashboard-missing-attention {
    0%,
    100% {
        background: linear-gradient(90deg, rgba(201, 122, 0, 0.06) 0%, rgba(201, 122, 0, 0.018) 58%, rgba(201, 122, 0, 0) 100%);
        box-shadow: inset 0 0 0 1px rgba(201, 122, 0, 0.14);
    }
    50% {
        background: linear-gradient(90deg, rgba(201, 122, 0, 0.1) 0%, rgba(201, 122, 0, 0.035) 60%, rgba(201, 122, 0, 0) 100%);
        box-shadow: inset 0 0 0 1px rgba(201, 122, 0, 0.22), 0 10px 32px -24px rgba(201, 122, 0, 0.28);
    }
}

@media (prefers-reduced-motion: reduce) {
    #bbai-dashboard-main .bbai-dashboard-missing-attention {
        animation: none !important;
    }
}

#bbai-dashboard-main .bbai-command-status__detail {
    display: inline-flex;
    align-self: flex-start;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--bbai-border-soft);
    border-radius: 999px;
    background: #fbfdff;
    font-size: 13px;
    line-height: 1.5;
    color: #52627a;
}

#bbai-dashboard-main .bbai-command-plan {
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-plan__rows {
    gap: 0;
}

#bbai-dashboard-main .bbai-command-plan__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--bbai-divider);
}

#bbai-dashboard-main .bbai-command-plan__label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--bbai-text-muted);
}

#bbai-dashboard-main .bbai-command-plan__usage {
    gap: 16px;
}

#bbai-dashboard-main .bbai-command-meter--plan {
    height: 9px;
    border-radius: 999px;
    background: #e9efff;
}

#bbai-dashboard-main .bbai-command-meter__fill--plan {
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-command-plan__comparison {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #52627a;
}

#bbai-dashboard-main .bbai-command-plan__comparison-visual {
    gap: 4px;
}

#bbai-dashboard-main .bbai-command-plan__comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#bbai-dashboard-main .bbai-command-plan__comparison-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a98ac;
}

#bbai-dashboard-main .bbai-command-plan__comparison-value {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #7b8aa0;
}

#bbai-dashboard-main .bbai-command-meter--growth {
    height: 4px;
    border-radius: 999px;
    background: #e7edf3;
}

#bbai-dashboard-main .bbai-command-meter__fill--growth {
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-command-plan__upgrade-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #52627a;
}

#bbai-dashboard-main .bbai-command-plan__actions,
#bbai-dashboard-main .bbai-dashboard-alert-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px;
    border: 1px solid #efe2cf;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.05), transparent 36%),
        linear-gradient(155deg, #fffdf8 0%, #fff7ee 58%, #ffffff 100%);
    box-shadow: var(--bbai-shadow-sm);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#bbai-dashboard-main .bbai-dashboard-alert-card--danger {
    border-color: #f1dcdf;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.05), transparent 36%),
        linear-gradient(155deg, #fffdfd 0%, #fff6f6 58%, #ffffff 100%);
}

#bbai-dashboard-main .bbai-dashboard-alert-card__copy {
    display: flex;
    flex: 1 1 360px;
    flex-direction: column;
    gap: 8px;
}

#bbai-dashboard-main .bbai-dashboard-alert-card__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--bbai-text-strong);
}

#bbai-dashboard-main .bbai-dashboard-alert-card__message {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--bbai-text-body);
}

/* Review modal overlay */
.bbai-dashboard-review-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bbai-dashboard-review-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.bbai-dashboard-review-overlay__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 32px 24px 24px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(148, 163, 184, 0.10);
    text-align: center;
}

.bbai-dashboard-review-overlay__headline {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bbai-ui-ink, #1f2937);
}

.bbai-dashboard-review-overlay__copy {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--bbai-text-muted, #64748b);
}

.bbai-dashboard-review-overlay__aside {
    margin: 0 0 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-text-muted, #94a3b8);
}

.bbai-dashboard-review-overlay__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.bbai-dashboard-review-overlay__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.bbai-dashboard-review-overlay__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.24);
    color: #ffffff;
}

.bbai-dashboard-review-overlay__cta:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

.bbai-dashboard-review-overlay__later {
    padding: 4px 8px;
    border: none;
    background: none;
    color: var(--bbai-text-muted, #94a3b8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
}

.bbai-dashboard-review-overlay__later:hover {
    color: var(--bbai-ui-ink, #1f2937);
}

.bbai-dashboard-review-overlay__feedback {
    display: block;
    color: var(--bbai-text-muted, #94a3b8);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.bbai-dashboard-review-overlay__feedback:hover {
    color: var(--bbai-ui-ink, #1f2937);
    text-decoration: underline;
}

.bbai-dashboard-review-overlay--enter .bbai-dashboard-review-overlay__backdrop {
    animation: bbai-review-backdrop-enter 0.3s ease both;
}
.bbai-dashboard-review-overlay--enter .bbai-dashboard-review-overlay__dialog {
    animation: bbai-review-dialog-enter 0.4s cubic-bezier(0.33, 1, 0.68, 1) both;
}
.bbai-dashboard-review-overlay--exit .bbai-dashboard-review-overlay__backdrop {
    animation: bbai-review-backdrop-exit 0.25s ease forwards;
}
.bbai-dashboard-review-overlay--exit .bbai-dashboard-review-overlay__dialog {
    animation: bbai-review-dialog-exit 0.25s ease forwards;
}

@keyframes bbai-review-backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes bbai-review-backdrop-exit {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes bbai-review-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes bbai-review-dialog-exit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
}

@keyframes bbai-command-donut-enter {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    #bbai-dashboard-main .bbai-command-card:hover,
    #bbai-dashboard-main .bbai-dashboard-alert-card:hover {
        transform: translateY(-1px);
        border-color: var(--bbai-border-muted);
        box-shadow: var(--bbai-shadow-md);
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner):hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.065);
    }
}

@media (max-width: 1080px) {
    #bbai-dashboard-main .bbai-dashboard-command__grid,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero-actions {
        width: 100%;
    }
}

@media (max-width: 782px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner),
    #bbai-dashboard-main .bbai-command-card,
    #bbai-dashboard-main .bbai-dashboard-alert-card {
        padding: 24px;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
        font-size: 30px;
    }

    #bbai-dashboard-main .bbai-command-card__meta {
        text-align: left;
    }

    #bbai-dashboard-main .bbai-dashboard-alert-card {
        align-items: flex-start;
    }

    .bbai-dashboard-review-overlay__dialog {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary,
    #bbai-dashboard-main .bbai-command-action--primary,
    #bbai-dashboard-main .bbai-command-action--secondary {
        width: 100%;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__secondary-actions,
    #bbai-dashboard-main .bbai-command-plan__actions,
    #bbai-dashboard-main .bbai-dashboard-alert-card__actions {
        width: 100%;
        flex-direction: column;
    }

    #bbai-dashboard-main .bbai-command-status__overview {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    #bbai-dashboard-main .bbai-command-donut {
        width: 116px;
        height: 116px;
        margin: 0 auto;
    }
}

@media (max-width: 420px) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__headline {
        font-size: 26px;
    }

    #bbai-dashboard-main .bbai-command-plan__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Dashboard conversion: coverage motivation, plan urgency, completion state */
#bbai-dashboard-main .bbai-command-plan__low-credits-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.2;
}

#bbai-dashboard-main .bbai-command-plan__upgrade-note {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

#bbai-dashboard-main .bbai-command-plan__upgrade-lead {
    font-weight: 600;
    color: var(--bbai-text-strong, #0f172a);
}

#bbai-dashboard-main .bbai-command-plan__upgrade-sub {
    font-size: 13px;
    line-height: 1.45;
    color: var(--bbai-text-muted, #64748b);
}

#bbai-dashboard-main .bbai-command-status__motivation {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--bbai-text-muted, #475569);
}

#bbai-dashboard-main .bbai-command-status__coverage-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: #5f7489;
    opacity: 0.92;
}

#bbai-dashboard-main .bbai-command-card--coverage-complete {
    box-shadow: inset 0 0 0 1px #bbf7d0, 0 1px 2px rgba(15, 23, 42, 0.04);
    background: linear-gradient(180deg, #f7fff9 0%, #ffffff 55%);
}

#bbai-dashboard-main .bbai-command-status__value [data-bbai-status-coverage-value] {
    display: inline-block;
    transition: color 0.2s ease, transform 0.2s ease;
}

@keyframes bbai-coverage-value-pulse {
    0% {
        transform: scale(1);
        color: inherit;
    }

    45% {
        transform: scale(1.06);
        color: #15803d;
    }

    100% {
        transform: scale(1);
        color: inherit;
    }
}

#bbai-dashboard-main .bbai-coverage-value--pulse {
    animation: bbai-coverage-value-pulse 0.85s cubic-bezier(0.33, 1, 0.68, 1);
}

#bbai-dashboard-main .bbai-command-status__value--processing {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

#bbai-dashboard-main .bbai-command-status__coverage-processing {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 22em;
}

#bbai-dashboard-main .bbai-command-status__processing-spinner {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: var(--bbai-primary-strong, #2563eb);
    border-radius: 50%;
    animation: bbai-coverage-processing-spin 0.75s linear infinite;
}

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

@keyframes bbai-command-donut-processing-pulse {
    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.05);
    }
}

#bbai-dashboard-main .bbai-command-donut--processing {
    animation: bbai-command-donut-enter 360ms ease-out both, bbai-command-donut-processing-pulse 2.4s ease-in-out infinite 360ms;
}

@media (prefers-reduced-motion: reduce) {
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link,
    #bbai-dashboard-main .bbai-command-action,
    #bbai-dashboard-main .bbai-command-card,
    #bbai-dashboard-main .bbai-dashboard-alert-card,
    #bbai-dashboard-main .bbai-command-breakdown,
    #bbai-dashboard-main .bbai-command-breakdown__arrow,
    #bbai-dashboard-main .bbai-command-donut,
    #bbai-dashboard-main .bbai-command-meter__fill,
    #bbai-dashboard-main .bbai-dashboard-hero-progress-fill:not(.bbai-banner__progress-fill),
    #bbai-dashboard-main .bbai-command-card__refresh-icon,
    #bbai-dashboard-main .bbai-coverage-value--pulse,
    #bbai-dashboard-main .bbai-command-status__processing-spinner,
    #bbai-dashboard-main .bbai-command-donut--processing,
    #bbai-dashboard-main .bbai-dashboard-hero--celebrate,
    #bbai-dashboard-main .bbai-dashboard-hero__icon--draw svg path,
    .bbai-dashboard-review-overlay--enter .bbai-dashboard-review-overlay__backdrop,
    .bbai-dashboard-review-overlay--enter .bbai-dashboard-review-overlay__dialog,
    .bbai-dashboard-review-overlay--exit .bbai-dashboard-review-overlay__backdrop,
    .bbai-dashboard-review-overlay--exit .bbai-dashboard-review-overlay__dialog {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ─── Final-polish pass ──────────────────────────────────────────────── */

/* 1,2,7. Spacing polish and action alignment for success state */
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__subtext {
    margin-top: 4px;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__usage-block {
    margin-top: 8px;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero-progress {
    padding-top: 16px;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero-progress-track {
    position: relative;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero-progress-track::before {
    content: 'Fully optimised';
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: #64748b;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__note {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #2f6f54;
    opacity: 1;
    letter-spacing: 0.01em;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__loop {
    margin-top: 4px;
    gap: 4px;
}
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero-actions {
    align-self: center;
}

/* 3. Action hierarchy: primary action button + lighter secondary chips */
#bbai-dashboard-main .bbai-dashboard-hero__loop-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 8px;
}
#bbai-dashboard-main .bbai-dashboard-hero__loop-link {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    transition: all 0.14s ease;
}
#bbai-dashboard-main .bbai-dashboard-hero__loop-link--secondary {
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.84);
    color: #475569;
    font-weight: 500;
    opacity: 0.84;
}
#bbai-dashboard-main .bbai-dashboard-hero__loop-link--secondary:hover {
    transform: translateY(-1px);
    opacity: 1;
    border-color: #d5dee9;
    background: #f8fafc;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}
#bbai-dashboard-main .bbai-dashboard-hero__loop-link:focus-visible {
    outline: 2px solid var(--bbai-primary);
    outline-offset: 2px;
}

/* 1. Monetisation tension line: higher contrast, subtle amber */
#bbai-dashboard-main .bbai-dashboard-hero__loop-tension {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: #8a5a10;
    font-style: normal;
    font-weight: 400;
}

/* 4. Coverage card micro-interaction: one-time premium scale-in */
@keyframes bbai-coverage-card-scale-in {
    0% {
        transform: scale(0.98);
        box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    }
    100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 1px #bbf7d0, 0 1px 2px rgba(15, 23, 42, 0.04);
    }
}
#bbai-dashboard-main .bbai-command-card--coverage-glow {
    transform-origin: 50% 50%;
    animation: bbai-coverage-card-scale-in 0.28s ease-out forwards;
}

/* 5. Progress bar completion label — "Fully optimised" at 100% */
#bbai-dashboard-main .bbai-command-card--coverage-complete .bbai-command-progress-bar::after {
    content: 'Fully optimised';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #1d7c4d;
    opacity: 0.92;
    white-space: nowrap;
    line-height: 1;
}
#bbai-dashboard-main .bbai-command-card--coverage-complete .bbai-command-progress-bar {
    position: relative;
    padding-right: 98px;
}

/* 6. Upgrade context and CTA benefit copy */
#bbai-dashboard-main .bbai-command-plan__upgrade-sub {
    font-size: 13px;
    line-height: 1.45;
    color: #8a5a10;
    font-weight: 500;
}
#bbai-dashboard-main .bbai-command-plan__cta-sub {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #475569;
    opacity: 0.78;
}

/* 7.3 Secondary: no lift — subtle border/background only (overrides any stray lift) */
#bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary:hover {
    transform: none;
}

/* Dashboard mount loading */
@keyframes bbai-dashboard-loading-dot {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.38;
    }
    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

[data-bbai-dashboard-hero="1"].bbai-dashboard-loading-surface,
#bbai-dashboard-main .bbai-dashboard-loading-surface {
    position: relative;
    overflow: hidden;
}

[data-bbai-dashboard-hero="1"].bbai-dashboard-loading-surface > :not(.bbai-dashboard-loading-skeleton),
#bbai-dashboard-main .bbai-dashboard-loading-surface > :not(.bbai-dashboard-loading-skeleton) {
    transition: opacity 150ms ease;
}

[data-bbai-dashboard-hero="1"].bbai-dashboard-loading-surface.is-loading > :not(.bbai-dashboard-loading-skeleton),
#bbai-dashboard-main .bbai-dashboard-loading-surface.is-loading > :not(.bbai-dashboard-loading-skeleton) {
    opacity: 0.98;
    filter: none;
}

[data-bbai-dashboard-hero="1"].bbai-dashboard-loading-surface.is-loaded > :not(.bbai-dashboard-loading-skeleton),
#bbai-dashboard-main .bbai-dashboard-loading-surface.is-loaded > :not(.bbai-dashboard-loading-skeleton) {
    opacity: 1;
    filter: none;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    padding: 24px;
    opacity: 0;
    transform: scale(0.985);
    pointer-events: none;
    transition: opacity 150ms ease, transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton--hero,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton--hero {
    align-items: center;
    padding: 24px;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton--status,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton--status,
[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton--usage,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton--usage {
    padding: 24px;
}

[data-bbai-dashboard-hero="1"].bbai-dashboard-loading-surface.is-loading .bbai-dashboard-loading-skeleton,
#bbai-dashboard-main .bbai-dashboard-loading-surface.is-loading .bbai-dashboard-loading-skeleton {
    opacity: 0;
    transform: scale(1);
}

[data-bbai-dashboard-hero="1"].bbai-dashboard-loading-surface.is-loaded .bbai-dashboard-loading-skeleton,
#bbai-dashboard-main .bbai-dashboard-loading-surface.is-loaded .bbai-dashboard-loading-skeleton {
    opacity: 0;
    transform: scale(1);
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__stack,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 460px);
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__stack--usage {
    width: 100%;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__line,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line,
[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__button,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__button,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__donut,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__list-item,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__progress-fill {
    display: block;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__line--eyebrow,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--eyebrow {
    width: 108px;
    height: 12px;
    border-radius: 999px;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__line--title,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--title {
    width: min(100%, 360px);
    height: 30px;
    border-radius: 14px;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__line--title-short,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--title-short {
    width: min(78%, 280px);
    height: 30px;
    border-radius: 14px;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__line--body,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--body {
    width: min(100%, 420px);
    height: 14px;
    border-radius: 999px;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__line--body-short,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--body-short {
    width: min(72%, 280px);
    height: 14px;
    border-radius: 999px;
}

[data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton__button,
#bbai-dashboard-main .bbai-dashboard-loading-skeleton__button {
    width: 156px;
    height: 40px;
    margin-top: 4px;
    border-radius: 10px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__button--wide {
    width: 180px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__status-layout {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__donut {
    position: relative;
    width: 112px;
    height: 112px;
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__donut::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__status-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--metric {
    width: min(52%, 172px);
    height: 38px;
    border-radius: 14px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__list {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__list-item {
    width: 100%;
    height: 38px;
    border-radius: 12px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__usage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--label {
    width: 78px;
    height: 12px;
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--value {
    width: 96px;
    height: 18px;
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__line--value-wide {
    width: 148px;
    height: 18px;
    border-radius: 999px;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.66);
    overflow: hidden;
}

#bbai-dashboard-main .bbai-dashboard-loading-skeleton__progress-fill {
    width: 72%;
    height: 100%;
    border-radius: inherit;
}

.bbai-dashboard-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 18px 24px;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.bbai-dashboard-loading-overlay.is-visible,
.bbai-dashboard-loading-overlay.is-exiting {
    visibility: visible;
    transition-delay: 0s;
}

.bbai-dashboard-loading-overlay.is-visible {
    opacity: 1;
}

.bbai-dashboard-loading-overlay.is-exiting {
    opacity: 0;
}

.bbai-dashboard-loading-overlay__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: min(100%, 220px);
    max-width: 280px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    color: #334155;
    text-align: center;
    transform: scale(0.98);
    transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 150ms ease;
}

.bbai-dashboard-loading-overlay.is-visible .bbai-dashboard-loading-overlay__panel {
    transform: scale(1);
}

.bbai-dashboard-loading-overlay__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bbai-dashboard-loading-overlay__dots span {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.78);
    animation: bbai-dashboard-loading-dot 900ms ease-in-out infinite;
}

.bbai-dashboard-loading-overlay__dots span:nth-child(2) {
    animation-delay: 120ms;
}

.bbai-dashboard-loading-overlay__dots span:nth-child(3) {
    animation-delay: 240ms;
}

.bbai-dashboard-loading-overlay__title,
.bbai-dashboard-loading-overlay__subtext {
    margin: 0;
}

.bbai-dashboard-loading-overlay__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #334155;
}

.bbai-dashboard-loading-overlay__subtext {
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

@media (max-width: 782px) {
    #bbai-dashboard-main .bbai-dashboard-loading-skeleton__status-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    #bbai-dashboard-main .bbai-dashboard-loading-skeleton__donut-wrap {
        justify-content: flex-start;
    }
}

/* Reduce motion compatibility */
@media (prefers-reduced-motion: reduce) {
    #bbai-dashboard-main .bbai-command-card--coverage-glow {
        animation: none !important;
    }
    #bbai-dashboard-main .bbai-dashboard-hero__loop-link,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__link--secondary {
        transition: none !important;
    }

    #bbai-dashboard-main .bbai-command-card,
    #bbai-dashboard-main .bbai-command-card:hover,
    #bbai-dashboard-main .bbai-dashboard-alert-card,
    #bbai-dashboard-main .bbai-dashboard-alert-card:hover,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner):hover {
        transform: none !important;
    }

    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:hover,
    #bbai-dashboard-main .bbai-dashboard-hero--command:not(.bbai-status-banner) .bbai-dashboard-hero__cta--primary:active,
    #bbai-dashboard-main .bbai-command-action--primary,
    #bbai-dashboard-main .bbai-command-action--primary:hover,
    #bbai-dashboard-main .bbai-command-action--primary:active {
        transform: none !important;
    }

    .bbai-dashboard-loading-overlay,
    .bbai-dashboard-loading-overlay__panel,
    [data-bbai-dashboard-hero="1"] .bbai-dashboard-loading-skeleton,
    #bbai-dashboard-main .bbai-dashboard-loading-skeleton {
        transition: none !important;
    }

    .bbai-dashboard-loading-overlay__dots span,
    .bbai-skeleton {
        animation: none !important;
    }
}

/* Source: assets/css/features/dashboard/command-hero-host.css */
/**
 * Shared command hero outside #bbai-dashboard-main.
 * @package BeepBeep_AI
 */
.bbai-command-hero-host {
    --bbai-surface: #ffffff;
    --bbai-surface-soft: #f8fafc;
    --bbai-surface-warm: #fffaf3;
    --bbai-surface-warm-soft: #fff7ed;
    --bbai-border-soft: #eef2f7;
    --bbai-border-muted: #e5e7eb;
    --bbai-divider: #f1f5f9;
    --bbai-text-strong: #0f172a;
    --bbai-text-body: #334155;
    --bbai-text-muted: #64748b;
    --bbai-primary: #10b981;
    --bbai-primary-strong: #047857;
    --bbai-success: #16a34a;
    --bbai-warning: #d97706;
    --bbai-warning-soft: #fff7ed;
    --bbai-danger: #dc2626;
    --bbai-danger-soft: #fff7f7;
    --bbai-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --bbai-shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
    --bbai-command-banner-gap: var(--section-spacing, var(--bbai-space-6));
    --bbai-command-banner-padding-block: var(--bbai-rhythm-banner-padding-block, var(--bbai-space-6));
    --bbai-command-banner-padding-inline: var(--bbai-rhythm-banner-padding-inline, var(--bbai-space-6));
    --bbai-command-banner-radius: 16px;
    --bbai-command-card-padding: var(--bbai-rhythm-card-padding, var(--bbai-space-6));
    --bbai-command-group-gap: var(--card-gap, var(--bbai-space-4));
    --bbai-command-row-padding: var(--bbai-rhythm-row-padding-y, var(--bbai-space-3));
    --bbai-ui-muted: #64748b;
    --bbai-ui-ink: #0f172a;
    /* status-banner.php copy stack — single rhythm for Library, Analytics, Usage, Dashboard */
    --bbai-status-banner-space-after-headline: var(--bbai-rhythm-banner-after-headline, var(--bbai-space-3));
    --bbai-status-banner-space-primary-to-secondary: var(--bbai-rhythm-banner-cta-gap, var(--bbai-space-2));
    --bbai-status-banner-space-secondary-to-progress: var(--bbai-rhythm-banner-support-to-progress, var(--bbai-space-4));
    --bbai-status-banner-progress-stack-padding-bottom: var(--bbai-rhythm-banner-progress-pad-bottom, var(--bbai-space-4));
}

/* Command center dashboard */
#bbai-dashboard-main .bbai-hero-full,
.bbai-command-hero-host.bbai-hero-full {
    width: 100%;
    margin: 0 0 var(--bbai-command-banner-gap, 24px);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-hero-inner,
.bbai-command-hero-host > .bbai-hero-inner {
    width: 100%;
    max-width: none;
    padding: 0;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) {
    width: 100%;
    margin: 0;
    padding: var(--bbai-command-banner-padding-block) var(--bbai-command-banner-padding-inline);
    border: 1px solid #e9eef5;
    border-radius: var(--bbai-command-banner-radius);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.038), transparent 38%),
        linear-gradient(140deg, #fdfeff 0%, #fafcff 52%, #ffffff 100%);
    box-shadow: var(--bbai-shadow-sm);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="healthy"] {
    border-color: #e8f0ec;
    background:
        radial-gradient(circle at top right, rgba(22, 163, 74, 0.048), transparent 36%),
        linear-gradient(135deg, #fdfffe 0%, #f9fcfa 50%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="attention"] {
    border-color: #f2e6d8;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.05), transparent 38%),
        linear-gradient(140deg, #fffefb 0%, #fffbf5 54%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="paused"] {
    border-color: #f3dedc;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.05), transparent 36%),
        linear-gradient(135deg, #fffefe 0%, #fff8f7 52%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="setup"] {
    border-color: #e8edf4;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.035), transparent 36%),
        linear-gradient(155deg, #fdfeff 0%, #f8fbff 54%, #ffffff 100%);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner):hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.065);
    }
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__layout {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: var(--card-gap, 16px) 0;
    align-items: start;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero-copy {
    gap: 0;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__heading-row {
    gap: 14px;
    align-items: flex-start;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--bbai-primary-strong);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="healthy"] .bbai-dashboard-hero__icon {
    color: #15803d;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="attention"] .bbai-dashboard-hero__icon {
    color: #c2410c;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="paused"] .bbai-dashboard-hero__icon {
    color: #b91c1c;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="setup"] .bbai-dashboard-hero__icon {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__headline {
    font-size: 34px;
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--bbai-text-strong);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__subtext,
.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__next-step,
.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__note {
    max-width: 62ch;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__subtext {
    font-size: 15px;
    line-height: 1.5;
    color: var(--bbai-text-body);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__next-step {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bbai-text-strong);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage-block {
    gap: 10px;
}

/**
 * Shared status-banner copy stack (status-banner.php): headline → primary → secondary → progress.
 * Spacing tokens: --bbai-status-banner-space-* on .bbai-command-hero-host.
 */
.bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-dashboard-hero__subtext {
    margin-top: var(--bbai-status-banner-space-after-headline);
}

.bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-banner__body-stack,
#bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-banner__body-stack {
    margin-top: var(--bbai-status-banner-space-after-headline);
}

.bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-dashboard-hero__next-step:not([hidden]),
#bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-dashboard-hero__next-step:not([hidden]) {
    margin-top: var(--bbai-status-banner-space-primary-to-secondary);
}

.bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-dashboard-hero__usage-block,
#bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content > .bbai-dashboard-hero__usage-block {
    margin-top: var(--bbai-status-banner-space-secondary-to-progress);
    padding-bottom: var(--bbai-status-banner-progress-stack-padding-bottom);
}

#bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-dashboard-hero-copy.bbai-banner__content {
    gap: 0;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage {
    gap: 8px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bbai-text-body);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage-pill {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #dbe5f1;
    background: rgba(255, 255, 255, 0.9);
    color: #1e3a8a;
    font-weight: 700;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage-primary,
.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage-secondary {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage-primary {
    color: var(--bbai-text-strong);
    font-weight: 600;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__usage-secondary {
    color: var(--bbai-text-muted);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero-progress-track {
    height: 6px;
    background: rgba(148, 163, 184, 0.18);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero-progress-fill {
    background-color: #10b981;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="healthy"] .bbai-dashboard-hero-progress-fill {
    background-color: #16a34a;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-bbai-success-state="1"] {
    border-color: #cfe9d8;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 36%),
        linear-gradient(145deg, #f7fff9 0%, #effaf2 55%, #ffffff 100%);
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(34, 197, 94, 0.08) inset;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__next-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 4px 12px 4px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-bbai-success-state="1"] .bbai-dashboard-hero__icon {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.bbai-command-hero-host .bbai-dashboard-hero__icon--draw svg path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: bbai-icon-draw 0.8s cubic-bezier(0.33, 1, 0.68, 1) 0.15s forwards;
}

@keyframes bbai-icon-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.bbai-command-hero-host .bbai-dashboard-hero--celebrate {
    animation: bbai-success-glow-pulse 0.6s ease-out both;
}

@keyframes bbai-success-glow-pulse {
    0% {
        box-shadow:
            0 16px 36px rgba(15, 23, 42, 0.06),
            0 0 0 0 rgba(34, 197, 94, 0.14);
    }
    55% {
        box-shadow:
            0 16px 36px rgba(15, 23, 42, 0.08),
            0 0 0 8px rgba(34, 197, 94, 0.06);
    }
    100% {
        box-shadow:
            0 16px 36px rgba(15, 23, 42, 0.06),
            0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.bbai-command-hero-host .bbai-dashboard-hero__loop {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.bbai-command-hero-host .bbai-dashboard-hero__loop-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: var(--bbai-ui-muted);
}

.bbai-command-hero-host .bbai-dashboard-hero__loop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.bbai-command-hero-host .bbai-dashboard-hero__loop-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.88);
    color: var(--bbai-ui-ink);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bbai-command-hero-host .bbai-dashboard-hero__loop-link:hover {
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(255, 255, 255, 1);
}

.bbai-command-hero-host .bbai-dashboard-hero__loop-tension {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-text-muted, #94a3b8);
    font-style: italic;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="attention"] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #c97a00 0%, #d48806 100%);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner)[data-tone="paused"] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6a6fd1 100%);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__note {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-text-muted);
    opacity: 0.78;
}

/* Match #bbai-dashboard-main .bbai-dashboard-hero--command action rail (status-card-refresh) */
.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    min-width: 0;
    width: min(100%, 312px);
    max-width: none;
    margin-left: auto;
    margin-top: var(--bbai-cta-group-margin-top, 16px);
    justify-self: stretch;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero-actions__item {
    display: flex;
    width: 100%;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta,
.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link,
.bbai-dashboard-surface-card .bbai-dashboard-hero__cta,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--bbai-cta-primary-min-height, 40px);
    padding: 0 var(--bbai-cta-primary-padding-x, 16px);
    border-radius: var(--bbai-cta-primary-radius, 8px);
    font-size: var(--bbai-cta-primary-font-size, 14px);
    font-weight: var(--bbai-cta-primary-font-weight, 500);
    line-height: 1.1;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        text-decoration-color 0.18s ease;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary,
.bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary {
    width: 100%;
    min-height: var(--bbai-cta-primary-min-height, 40px);
    padding: 0 var(--bbai-cta-primary-padding-x, 16px);
    min-width: var(--bbai-cta-primary-min-width-rail, 200px);
    border-radius: var(--bbai-cta-primary-radius, 8px);
    font-size: var(--bbai-cta-primary-font-size, 14px);
    font-weight: var(--bbai-cta-primary-font-weight, 500);
    border: 1px solid transparent;
    background-color: var(--bbai-cta-primary-bg, #10b981);
    color: #ffffff;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
    transform: translateY(0);
    transition: var(
        --bbai-cta-primary-transition,
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease
    );
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--secondary,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--secondary {
    width: 100%;
    min-height: var(--bbai-cta-primary-min-height, 40px);
    padding: 0 var(--bbai-cta-primary-padding-x, 16px);
    border-radius: var(--bbai-cta-primary-radius, 8px);
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.11);
    background: #fafbfc;
    color: #7b8898;
    font-weight: 400;
    box-shadow: none;
    transform: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--tertiary,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--tertiary {
    min-height: auto;
    justify-content: center;
    width: auto;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--bbai-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: 3px;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--tertiary::after,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--tertiary::after {
    content: '\00a0→';
    display: inline-block;
    font-weight: 500;
    opacity: 0.75;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary:hover,
.bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary:hover {
    transform: translateY(-1px);
    background-color: var(--bbai-cta-primary-bg, #10b981);
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1));
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary:active,
.bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary:active {
    transform: translateY(0) scale(0.98);
    background-color: var(--bbai-cta-primary-bg, #10b981);
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary:focus-visible,
.bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary:focus-visible {
    outline: none;
    background-color: var(--bbai-cta-primary-bg, #10b981);
    transform: translateY(0);
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(16, 185, 129, 0.35);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--secondary:hover,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--secondary:hover {
    transform: none;
    border-color: rgba(148, 163, 184, 0.26);
    background: #f4f6f8;
    color: #606b78;
    box-shadow: none;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--secondary:active,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--secondary:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--tertiary:hover,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--tertiary:hover {
    color: var(--bbai-primary-strong);
    background: transparent;
    text-decoration: underline;
    text-decoration-color: rgba(4, 120, 87, 0.35);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link--tertiary:hover::after,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link--tertiary:hover::after {
    transform: translateX(2px);
    opacity: 1;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta:not(.bbai-dashboard-hero__cta--primary):focus-visible,
.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link:focus-visible,
.bbai-dashboard-surface-card .bbai-dashboard-hero__cta:not(.bbai-dashboard-hero__cta--primary):focus-visible,
.bbai-dashboard-surface-card .bbai-dashboard-hero__link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(148, 163, 184, 0.35);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-top: 12px;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__inline-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 76px;
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__inline-stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bbai-text-muted);
}

.bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__inline-stat-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--bbai-text-strong);
    line-height: 1.1;
}

.bbai-command-hero-host .bbai-dashboard-hero__library-tension {
    margin: 12px 0 0;
    max-width: 42ch;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bbai-text-muted);
}

/*
 * Dashboard-equivalent cards outside #bbai-dashboard-main (Analytics, etc.)
 * Mirrors #bbai-dashboard-main .bbai-dashboard-card / .bbai-stat-card
 */
.bbai-dashboard-surface-card {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    padding: var(--bbai-command-card-padding, 22px);
    border: 1px solid #eef1f5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .bbai-dashboard-surface-card:hover {
        border-color: #e2e8f0;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.072);
        transform: translateY(-1px);
    }

    .bbai-dashboard-surface-card--subtle:hover {
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.065);
        transform: translateY(-1px);
    }

    .bbai-dashboard-surface-card--attention:hover {
        border-color: rgba(252, 211, 77, 0.42);
        box-shadow: 0 7px 20px rgba(15, 23, 42, 0.05);
        transform: translateY(-1px);
    }
}

.bbai-dashboard-surface-card--subtle {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.bbai-dashboard-surface-card--attention {
    border-color: rgba(253, 224, 168, 0.55);
    background: rgba(255, 251, 235, 0.4);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transform: translateY(0);
}

/* Stack legacy (non-.bbai-banner) command hero with shared banner breakpoints (1023). */
@media (max-width: 1023px) {
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 782px) {
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__headline {
        font-size: 26px;
    }
}

@media (max-width: 560px) {
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__secondary-actions {
        width: 100%;
        flex-direction: column;
    }

    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__link,
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary,
    .bbai-dashboard-surface-card .bbai-dashboard-hero__link,
    .bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary {
        width: 100%;
    }
}

/*
 * Shared product banner: section.bbai-status-banner is the semantic root; it always
 * carries .bbai-page-hero and .bbai-banner for layout, surface, and CTA tokens.
 */

@media (prefers-reduced-motion: reduce) {
    .bbai-dashboard-surface-card,
    .bbai-dashboard-surface-card:hover,
    .bbai-dashboard-surface-card--subtle:hover,
    .bbai-dashboard-surface-card--attention:hover {
        transform: none !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary,
    .bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary,
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary:hover,
    .bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary:hover,
    .bbai-command-hero-host .bbai-dashboard-hero--command:not(.bbai-banner) .bbai-dashboard-hero__cta--primary:active,
    .bbai-dashboard-surface-card .bbai-dashboard-hero__cta--primary:active {
        transform: none !important;
    }
}

/* Source: assets/css/features/dashboard/filter-group.css */
/**
 * Shared status filter group.
 * Canonical source for dashboard + ALT Library status pills.
 */

.bbai-filter-group {
    --bbai-fg-gap: 10px;
    --bbai-fg-row-gap: 10px;
    --bbai-fg-pill-height: 36px;
    --bbai-fg-pill-padding-inline: 14px;
    --bbai-fg-pill-radius: 9999px;
    --bbai-fg-pill-border: #e5e7eb;
    --bbai-fg-pill-bg: #ffffff;
    --bbai-fg-pill-bg-hover: #f8fafc;
    --bbai-fg-pill-text: #334155;
    --bbai-fg-pill-border-hover: #d7dee8;
    --bbai-fg-pill-shadow-hover: 0 4px 10px rgba(15, 23, 42, 0.06);
    --bbai-fg-pill-shadow-press: 0 2px 6px rgba(15, 23, 42, 0.05);
    --bbai-fg-pill-shadow-active: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 14px rgba(15, 23, 42, 0.05);
    --bbai-fg-muted: #64748b;
    --bbai-fg-focus-ring: rgba(16, 185, 129, 0.35);
    --bbai-fg-count-height: 24px;
    --bbai-fg-count-min-width: 28px;
    --bbai-fg-count-padding-inline: 8px;
    --bbai-fg-count-bg: #f8fafc;
    --bbai-fg-count-border: #e2e8f0;
    --bbai-fg-count-text: #475569;
    --bbai-fg-status-bg: rgba(241, 245, 249, 0.86);
    --bbai-fg-status-border: rgba(203, 213, 225, 0.95);
    --bbai-fg-status-text: #1e293b;
    --bbai-fg-status-badge-bg: rgba(255, 255, 255, 0.94);
    --bbai-fg-status-badge-border: rgba(203, 213, 225, 0.74);
    --bbai-fg-status-badge-text: var(--bbai-fg-status-text);
    --bbai-fg-all-dot: var(--bbai-status-neutral-indicator, #94a3b8);
    --bbai-fg-optimized-dot: var(--bbai-status-optimized-accent, #22b573);
    --bbai-fg-review-dot: var(--bbai-status-needs-review-accent, #d9a441);
    --bbai-fg-missing-dot: var(--bbai-status-missing-accent, #c97a00);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--bbai-fg-gap);
    row-gap: var(--bbai-fg-row-gap);
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
}

.bbai-filter-group--compact {
    --bbai-fg-gap: 10px;
    --bbai-fg-row-gap: 8px;
    --bbai-fg-pill-height: 34px;
    --bbai-fg-pill-padding-inline: 13px;
}

.bbai-filter-group__item,
.bbai-filter-pill {
    position: relative;
    z-index: 0;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
    height: var(--bbai-fg-pill-height);
    margin: 0;
    padding: 0 var(--bbai-fg-pill-padding-inline);
    border: 1px solid var(--bbai-fg-pill-border);
    border-radius: var(--bbai-fg-pill-radius);
    background: var(--bbai-fg-pill-bg);
    color: var(--bbai-fg-pill-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform 140ms ease,
        box-shadow 140ms ease,
        background-color 140ms ease,
        border-color 140ms ease,
        color 140ms ease;
}

.bbai-filter-group--compact .bbai-filter-group__item {
    height: var(--bbai-fg-pill-height);
    padding: 0 var(--bbai-fg-pill-padding-inline);
    font-size: 13px;
}

.bbai-filter-group__item:hover,
.bbai-filter-pill:hover {
    text-decoration: none;
}

.bbai-filter-group__item:focus,
.bbai-filter-group__item:focus-visible,
.bbai-filter-pill:focus,
.bbai-filter-pill:focus-visible {
    outline: none;
}

.bbai-filter-group__item:focus-visible,
.bbai-filter-pill:focus-visible {
    z-index: 2;
    outline: 2px solid var(--bbai-fg-focus-ring);
    outline-offset: 2px;
}

.bbai-filter-group__item:not(.bbai-filter-group__item--active):not(.is-active):not([aria-current='true']):not(.bbai-filter-group__item--locked):not(.bbai-filter-group__item--disabled):hover,
.bbai-filter-pill:not(.bbai-filter-pill--active):hover {
    z-index: 1;
    transform: translateY(-1px);
    border-color: var(--bbai-fg-pill-border-hover);
    background: var(--bbai-fg-pill-bg-hover);
    box-shadow: var(--bbai-fg-pill-shadow-hover);
}

.bbai-filter-group__item.is-pressed,
.bbai-filter-group__item:active,
.bbai-filter-pill:active {
    z-index: 2;
    transform: translateY(0);
    box-shadow: var(--bbai-fg-pill-shadow-press);
}

.bbai-filter-group__item--locked,
.bbai-filter-group__item--disabled {
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.bbai-filter-group__item--disabled {
    opacity: 0.56;
}

.bbai-filter-group__status-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--bbai-fg-pill-dot, var(--bbai-fg-all-dot));
}

.bbai-filter-group__label {
    min-width: 0;
    white-space: nowrap;
}

.bbai-filter-group__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--bbai-fg-count-min-width);
    height: var(--bbai-fg-count-height);
    padding: 0 var(--bbai-fg-count-padding-inline);
    border-radius: 999px;
    border: 1px solid var(--bbai-fg-count-border);
    background: var(--bbai-fg-count-bg);
    color: var(--bbai-fg-count-text);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition:
        background-color 140ms ease,
        border-color 140ms ease,
        color 140ms ease;
}

.bbai-filter-group__item--status-all {
    --bbai-fg-pill-dot: var(--bbai-fg-all-dot);
    --bbai-fg-status-bg: rgba(241, 245, 249, 0.86);
    --bbai-fg-status-border: rgba(203, 213, 225, 0.95);
    --bbai-fg-status-text: #334155;
    --bbai-fg-status-badge-bg: rgba(255, 255, 255, 0.94);
    --bbai-fg-status-badge-border: rgba(203, 213, 225, 0.74);
    --bbai-fg-status-badge-text: #334155;
}

.bbai-filter-group__item--status-missing {
    --bbai-fg-pill-dot: var(--bbai-fg-missing-dot);
    --bbai-fg-status-bg: rgba(255, 247, 237, 0.92);
    --bbai-fg-status-border: rgba(201, 122, 0, 0.3);
    --bbai-fg-status-text: #805112;
    --bbai-fg-status-badge-bg: rgba(255, 255, 255, 0.94);
    --bbai-fg-status-badge-border: rgba(201, 122, 0, 0.26);
    --bbai-fg-status-badge-text: #805112;
}

.bbai-filter-group__item--status-weak {
    --bbai-fg-pill-dot: var(--bbai-fg-review-dot);
    --bbai-fg-status-bg: rgba(255, 251, 235, 0.96);
    --bbai-fg-status-border: rgba(217, 164, 65, 0.3);
    --bbai-fg-status-text: #7c5719;
    --bbai-fg-status-badge-bg: rgba(255, 255, 255, 0.94);
    --bbai-fg-status-badge-border: rgba(217, 164, 65, 0.48);
    --bbai-fg-status-badge-text: #7c5719;
}

.bbai-filter-group__item--status-optimized {
    --bbai-fg-pill-dot: var(--bbai-fg-optimized-dot);
    --bbai-fg-status-bg: rgba(240, 253, 244, 0.96);
    --bbai-fg-status-border: rgba(74, 222, 128, 0.28);
    --bbai-fg-status-text: #166534;
    --bbai-fg-status-badge-bg: rgba(255, 255, 255, 0.94);
    --bbai-fg-status-badge-border: rgba(134, 239, 172, 0.72);
    --bbai-fg-status-badge-text: #166534;
}

.bbai-filter-group__item--active,
.bbai-filter-group__item.is-active,
.bbai-filter-group__item[aria-current='true'],
.bbai-filter-pill--active {
    z-index: 1;
    color: var(--bbai-fg-status-text);
    font-weight: 700;
    border-color: var(--bbai-fg-status-border);
    background: var(--bbai-fg-status-bg);
    box-shadow: var(--bbai-fg-pill-shadow-active);
}

.bbai-filter-group__item--active:hover,
.bbai-filter-group__item.is-active:hover,
.bbai-filter-group__item[aria-current='true']:hover,
.bbai-filter-pill--active:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.bbai-filter-group__item--active .bbai-filter-group__status-dot,
.bbai-filter-group__item.is-active .bbai-filter-group__status-dot,
.bbai-filter-group__item[aria-current='true'] .bbai-filter-group__status-dot {
    background: currentColor;
}

.bbai-filter-group__item--active .bbai-filter-group__count,
.bbai-filter-group__item.is-active .bbai-filter-group__count,
.bbai-filter-group__item[aria-current='true'] .bbai-filter-group__count {
    background: var(--bbai-fg-status-badge-bg);
    color: var(--bbai-fg-status-badge-text);
    border-color: var(--bbai-fg-status-badge-border);
}

.bbai-filter-group__item--attention:not(.bbai-filter-group__item--active):not(.is-active):not([aria-current='true']) {
    isolation: isolate;
}

.bbai-filter-group__item--attention:not(.bbai-filter-group__item--active):not(.is-active):not([aria-current='true'])::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    animation: bbai-filter-group-breathe 2.8s ease-in-out infinite;
}

.bbai-filter-group__item--status-missing.bbai-filter-group__item--attention {
    --bbai-filter-group-attention-glow: rgba(201, 122, 0, 0.12);
}

.bbai-filter-group__item--status-weak.bbai-filter-group__item--attention {
    --bbai-filter-group-attention-glow: rgba(217, 164, 65, 0.12);
}

.bbai-filter-group__item--actionable.bbai-filter-group__item--status-missing:not(.bbai-filter-group__item--active):not(.is-active):not([aria-current='true']) {
    border-color: rgba(201, 122, 0, 0.34);
    box-shadow: 0 0 0 1px rgba(201, 122, 0, 0.08);
}

#bbai-dashboard-main .bbai-dashboard-status-card {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#bbai-dashboard-main .bbai-dashboard-status-card .bbai-filter-group {
    width: 100%;
}

#bbai-dashboard-main .bbai-dashboard-status-card .bbai-filter-group__item {
    justify-content: flex-start;
}

#bbai-dashboard-main .bbai-dashboard-status-card--hero {
    margin: 0;
}

#bbai-dashboard-main .bbai-dashboard-status-card__filters {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

#bbai-dashboard-main .bbai-dashboard-status-card--hero .bbai-filter-group__item {
    justify-content: center;
}

.bbai-library-workspace-card__filter-toolbar .bbai-filter-group,
#bbai-review-filter-tabs.bbai-filter-group {
    max-width: 100%;
}

@keyframes bbai-filter-group-breathe {
    0%,
    100% {
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 0 4px var(--bbai-filter-group-attention-glow, rgba(15, 23, 42, 0.04));
    }
}

@keyframes bbai-filter-group-missing-dot-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    }

    50% {
        transform: scale(1.22);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

#bbai-dashboard-main [data-bbai-missing-row-pulse='1'] .bbai-filter-group__status-dot,
#bbai-dashboard-main .bbai-filter-group__item--status-missing.bbai-filter-group__item--actionable .bbai-filter-group__status-dot {
    animation: bbai-filter-group-missing-dot-pulse 1s ease-in-out 3;
    transform-origin: center;
}

#bbai-dashboard-main .bbai-dashboard-missing-attention.bbai-filter-group__item--status-missing.bbai-filter-group__item--actionable {
    animation: bbai-dashboard-missing-attention 3s ease-in-out 1;
}

@media (max-width: 768px) {
    #bbai-dashboard-main .bbai-dashboard-status-card .bbai-filter-group__item {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .bbai-filter-group {
        --bbai-fg-gap: 8px;
        --bbai-fg-row-gap: 8px;
    }

    .bbai-filter-group__item {
        padding: 0 13px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbai-filter-group__item,
    .bbai-filter-pill,
    .bbai-filter-group__count {
        transition: none;
    }

    .bbai-filter-group__item.is-pressed,
    .bbai-filter-pill:active {
        transform: none;
    }

    .bbai-filter-group__item--attention::after,
    #bbai-dashboard-main [data-bbai-missing-row-pulse='1'] .bbai-filter-group__status-dot,
    #bbai-dashboard-main .bbai-filter-group__item--status-missing.bbai-filter-group__item--actionable .bbai-filter-group__status-dot,
    #bbai-dashboard-main .bbai-dashboard-missing-attention.bbai-filter-group__item--status-missing.bbai-filter-group__item--actionable {
        animation: none;
    }
}

/* Source: assets/css/features/dashboard/queue-workflow.css */
/* ==========================================================================
   Queue Workflow – ALT Optimization Pipeline
   ========================================================================== */

.bbai-queue-workflow {
    margin-bottom: 24px;
    padding: 24px 28px 28px;
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    background: linear-gradient(135deg, #f9fbff 0%, #f2f6ff 58%, #ffffff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

/* ---------- Header ---------- */

.bbai-queue-workflow__header {
    margin-bottom: 22px;
}

.bbai-queue-workflow__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}

.bbai-queue-workflow__desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #64748b;
}

/* ---------- Steps row ---------- */

.bbai-queue-workflow__steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* ---------- Arrow connector ---------- */

.bbai-queue-workflow__arrow {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-top: 52px;
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.bbai-queue-workflow__arrow--done {
    color: #16a34a;
}

/* ---------- Single step card ---------- */

.bbai-queue-workflow__step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 22px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    position: relative;
}

.bbai-queue-workflow__step:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

/* Active step */
.bbai-queue-workflow__step--active {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 6px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

/* Completed step */
.bbai-queue-workflow__step--done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

/* Success state for Complete card */
.bbai-queue-workflow__step--success {
    border-color: #16a34a;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

/* ---------- Step badge (number / checkmark) ---------- */

.bbai-queue-workflow__step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    margin-bottom: 10px;
    transition: background 0.25s ease, color 0.25s ease;
}

.bbai-queue-workflow__step--active .bbai-queue-workflow__step-badge {
    background: #6366f1;
    color: #fff;
}

.bbai-queue-workflow__step--done .bbai-queue-workflow__step-badge {
    background: #16a34a;
    color: #fff;
}

.bbai-queue-workflow__step--success .bbai-queue-workflow__step-badge {
    background: #16a34a;
    color: #fff;
}

.bbai-queue-workflow__step-check {
    display: none;
    line-height: 0;
}

.bbai-queue-workflow__step--done .bbai-queue-workflow__step-num {
    display: none;
}

.bbai-queue-workflow__step--done .bbai-queue-workflow__step-check,
.bbai-queue-workflow__step--success .bbai-queue-workflow__step-check {
    display: flex;
}

.bbai-queue-workflow__step--success .bbai-queue-workflow__step-num {
    display: none;
}

/* ---------- Icon ---------- */

.bbai-queue-workflow__step-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin-bottom: 8px;
    transition: color 0.25s ease;
}

.bbai-queue-workflow__step--active .bbai-queue-workflow__step-icon {
    color: #6366f1;
}

.bbai-queue-workflow__step--done .bbai-queue-workflow__step-icon {
    color: #16a34a;
}

.bbai-queue-workflow__step--success .bbai-queue-workflow__step-icon {
    color: #16a34a;
}

/* ---------- Title ---------- */

.bbai-queue-workflow__step-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #334155;
}

.bbai-queue-workflow__step--active .bbai-queue-workflow__step-title {
    color: #111827;
}

/* ---------- Metric ---------- */

.bbai-queue-workflow__step-metric {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

/* ---------- Action button ---------- */

.bbai-queue-workflow__step-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.bbai-queue-workflow__step-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #111827;
}

.bbai-li-image-table__alt-preview {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 8px;
    max-width: 260px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.bbai-li-image-table__alt-preview-label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    color: #64748b;
    text-transform: uppercase;
}

.bbai-li-image-table__alt-preview-value {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bbai-queue-workflow__step-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Primary button on active step */
.bbai-queue-workflow__step--active .bbai-queue-workflow__step-btn {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.bbai-queue-workflow__step--active .bbai-queue-workflow__step-btn:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.bbai-queue-workflow__step-btn--static {
    cursor: default;
    pointer-events: none;
}

.bbai-queue-workflow__step-btn--static[data-bbai-wf-action-state="progress"] {
    background: #f8fafc;
    border-color: #dbe4ee;
    color: #64748b;
}

.bbai-queue-workflow__step-btn--static[data-bbai-wf-action-state="complete"] {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .bbai-queue-workflow__steps {
        flex-direction: column;
        gap: 12px;
    }

    .bbai-queue-workflow__step {
        width: 100%;
    }

    .bbai-queue-workflow__arrow {
        display: none;
    }
}

@media (max-width: 600px) {
    .bbai-queue-workflow {
        padding: 18px 16px 22px;
    }
}

/* Source: assets/css/features/dashboard/funnel-hero.css */
/* Dashboard hero: data-driven action card */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}

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

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

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

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

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

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

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

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

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

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

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

/* Source: assets/css/features/dashboard/usage-strip.css */
/* ─── Usage Strip ─────────────────────────────────────────────────── */

.bbai-usage-strip {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.bbai-usage-strip__row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bbai-usage-strip__row + .bbai-usage-strip__row {
    margin-top: 12px;
}

.bbai-usage-strip__label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 260px;
}

.bbai-usage-strip__plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
}

.bbai-usage-strip__plan-badge--upgrade {
    background: #ecfdf5;
    color: #059669;
}

.bbai-usage-strip__remaining {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
}

.bbai-usage-strip__remaining--muted {
    color: #94a3b8;
}

.bbai-usage-strip__bar {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.bbai-usage-strip__bar-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bbai-usage-strip__bar--comparison {
    background: #ecfdf5;
}

.bbai-usage-strip__bar-fill--comparison {
    background: #10b981;
}

.bbai-usage-strip__ratio {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}

.bbai-usage-strip__upgrade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.bbai-usage-strip__upgrade-copy {
    font-size: 13px;
    color: #475569;
    margin: 0;
}

.bbai-usage-strip__upgrade-cta {
    flex-shrink: 0;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .bbai-usage-strip__row {
        flex-wrap: wrap;
    }

    .bbai-usage-strip__label {
        min-width: auto;
        width: 100%;
    }

    .bbai-usage-strip__bar {
        width: 100%;
    }

    .bbai-usage-strip__ratio {
        width: 100%;
        text-align: left;
    }

    .bbai-usage-strip__upgrade {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ─── Before / After Showcase ─────────────────────────────────────── */

.bbai-before-after-showcase {
    margin: 0 0 32px;
    display: grid;
    gap: 16px;
}

.bbai-before-after-showcase__header {
    margin: 0;
}

.bbai-before-after-showcase__title {
    margin: 0;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.bbai-before-after-showcase__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bbai-before-after-card {
    min-height: 0;
    padding: 24px;
    border: 1px solid var(--bbai-dashboard-card-border, rgba(226, 232, 240, 0.96));
    border-radius: var(--bbai-dashboard-card-radius-sm, 18px);
    background: #ffffff;
    box-shadow: var(--bbai-dashboard-card-shadow-soft, 0 14px 30px rgba(15, 23, 42, 0.06));
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bbai-before-after-card:hover,
.bbai-before-after-card:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.bbai-before-after-card--before {
    background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
    border-color: rgba(201, 122, 0, 0.2);
}

.bbai-before-after-card--after {
    background: linear-gradient(135deg, #f4fbf6 0%, #ffffff 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.bbai-before-after-card__label {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
}

.bbai-before-after-card__headline,
.bbai-before-after-card__text {
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
    font-weight: 600;
    color: #0f172a;
}

.bbai-before-after-card__text--sample {
    font-size: 18px;
    line-height: 1.55;
    font-weight: 700;
}

.bbai-before-after-card__supporting {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #166534;
    font-weight: 600;
}

.bbai-before-after-showcase__benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
}

.bbai-before-after-showcase__benefit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.45;
    color: #334155;
}

.bbai-before-after-showcase__benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.bbai-before-after-showcase__progress {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
    color: #0f172a;
}

.bbai-before-after-showcase__activity {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
}

.bbai-before-after-showcase__activity-item {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

@media (max-width: 768px) {
    .bbai-before-after-showcase__grid {
        grid-template-columns: 1fr;
    }

    .bbai-before-after-card {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .bbai-before-after-showcase__benefits,
    .bbai-before-after-showcase__activity {
        gap: 10px 12px;
    }
}

/* Source: assets/css/features/dashboard/dashboard-retention-strip.css */
/**
 * Phase 14 — Retention strip + library nudge (scoped; no design-system refactor).
 */

.bbai-bottom-banner,
.bbai-retention-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
    align-items: center;
    max-width: 900px;
    margin: 16px auto 16px;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(248, 250, 252, 1) 100%
    );
    box-shadow: none;
}

.bbai-bottom-banner__inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}

.bbai-bottom-banner__content,
.bbai-retention-strip__main {
    grid-column: 1;
    text-align: left;
}

.bbai-retention-strip__headline {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 650;
    color: #0f172a;
    line-height: 1.35;
}

.bbai-retention-strip__supporting,
.bbai-retention-strip__delta {
    margin: 0;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.45;
}

.bbai-retention-strip__delta {
    color: #047857;
    font-weight: 600;
}

.bbai-bottom-banner__progress,
.bbai-retention-strip__progress {
    grid-column: 1;
    min-width: 0;
    max-width: 420px;
    margin-top: 6px;
}

.bbai-retention-strip__bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.bbai-retention-strip__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #20b26c, #22b573);
    transition: width 0.35s ease;
}

.bbai-retention-strip[data-progress-tone='danger'] .bbai-retention-strip__bar-fill {
    background: linear-gradient(90deg, #c97a00, #d48806);
}

.bbai-retention-strip[data-progress-tone='warning'] .bbai-retention-strip__bar-fill {
    background: linear-gradient(90deg, #d9a441, #e0b35a);
}

.bbai-retention-strip[data-progress-tone='complete'] .bbai-retention-strip__bar-fill {
    background: linear-gradient(90deg, #20b26c, #22b573);
}

.bbai-retention-strip__processed {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.bbai-bottom-banner__actions,
.bbai-retention-strip__actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

.bbai-bottom-banner__actions .bbai-btn,
.bbai-retention-strip__actions .bbai-btn {
    height: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.bbai-retention-strip__upgrade-hint {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    padding-top: 0;
    border-top: none;
    font-size: 0.8125rem;
    color: #64748b;
}

@media (max-width: 960px) {
    .bbai-bottom-banner,
    .bbai-retention-strip {
        grid-template-columns: 1fr;
    }

    .bbai-bottom-banner__actions,
    .bbai-retention-strip__actions {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }
}

/* Library nudge */
.bbai-retention-library-nudge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-space-2) var(--bbai-space-4);
    margin: 0 0 var(--bbai-space-4);
    padding: var(--bbai-space-2) var(--bbai-space-4);
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: #fffbeb;
}

.bbai-retention-library-nudge__line {
    margin: 0;
    flex: 1 1 220px;
    font-size: 0.875rem;
    color: #78350f;
    line-height: 1.4;
}

.bbai-retention-library-nudge__meta {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.8125rem;
}

.bbai-retention-library-nudge__cta {
    flex: 0 0 auto;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    background: #10b981;
    color: #fff;
    border: 1px solid #059669;
}

.bbai-retention-library-nudge__cta:hover,
.bbai-retention-library-nudge__cta:focus-visible {
    background: #059669;
    color: #fff;
}

/* Source: assets/css/features/pricing/upgrade-modal-refresh.css */
body.modal-open,
body.modal-open #wpwrap,
body.modal-open #wpbody,
body.modal-open #wpbody-content {
    overflow: hidden;
}

#bbai-upgrade-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000000 !important;
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(10px);
    transition: opacity 0.17s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.17s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#bbai-upgrade-modal.active,
#bbai-upgrade-modal.is-visible {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}

#bbai-upgrade-modal [hidden] {
    display: none !important;
}

#bbai-upgrade-modal .bbai-upgrade-modal__content {
    position: relative;
    width: min(calc(100vw - 32px), 640px);
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    transition:
        opacity 0.17s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.17s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#bbai-upgrade-modal.active .bbai-upgrade-modal__content,
#bbai-upgrade-modal.is-visible .bbai-upgrade-modal__content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#bbai-upgrade-modal[data-bbai-upgrade-view="compare"] .bbai-upgrade-modal__content {
    width: min(calc(100vw - 32px), 920px);
    max-width: 920px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__body {
    display: grid;
    gap: 24px;
    padding: 28px 24px 24px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__view {
    display: grid;
    gap: 24px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    /* .bbai-btn uses padding: 10px 20px !important — with border-box that leaves 0px width for the icon */
    padding: 0 !important;
    overflow: visible;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.92);
    color: #64748b;
    box-shadow: none;
    transition:
        background 0.14s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.14s cubic-bezier(0.2, 0.8, 0.2, 1),
        color 0.14s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.14s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#bbai-upgrade-modal .bbai-upgrade-modal__close:hover {
    background: rgba(226, 232, 240, 0.72);
    border-color: rgba(148, 163, 184, 0.9);
    color: #0f172a;
    transform: translateY(-1px);
}

#bbai-upgrade-modal .bbai-upgrade-modal__close:active {
    transform: translateY(0);
}

#bbai-upgrade-modal .bbai-upgrade-modal__close:focus {
    outline: none;
}

#bbai-upgrade-modal .bbai-upgrade-modal__close:focus-visible {
    outline: 2px solid rgba(16, 185, 129, 0.45);
    outline-offset: 2px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__close svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

#bbai-upgrade-modal .bbai-upgrade-modal__close svg path {
    stroke: currentColor;
}

#bbai-upgrade-modal .bbai-upgrade-modal__header,
#bbai-upgrade-modal .bbai-upgrade-modal__compare-copy {
    display: grid;
    gap: 8px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__header {
    padding-right: 44px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__compare-inline {
    justify-self: start;
    width: auto;
    margin-top: 2px;
    color: #475569;
    font-size: 12px;
    text-decoration: none;
}

#bbai-upgrade-modal .bbai-upgrade-modal__compare-inline:hover {
    color: #1d4ed8;
}

#bbai-upgrade-modal .bbai-upgrade-modal__section-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
}

#bbai-upgrade-modal .bbai-upgrade-modal__section-label--muted {
    color: #64748b;
}

#bbai-upgrade-modal .bbai-upgrade-modal__header h2,
#bbai-upgrade-modal .bbai-upgrade-modal__compare-title {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.03em;
}

#bbai-upgrade-modal .bbai-upgrade-modal__header h2 {
    font-size: 30px;
    line-height: 1.08;
}

#bbai-upgrade-modal .bbai-upgrade-modal__compare-title {
    font-size: 24px;
    line-height: 1.12;
    font-weight: 700;
}

#bbai-upgrade-modal .bbai-upgrade-modal__subtitle,
#bbai-upgrade-modal .bbai-upgrade-modal__compare-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #526277;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding: 22px 24px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-card--primary {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.12);
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-card--secondary {
    border-color: #e6ebf2;
    background: #f8fafc;
    box-shadow: none;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-copy,
#bbai-upgrade-modal .bbai-upgrade-modal__action-meta {
    display: grid;
    gap: 12px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-meta {
    justify-items: stretch;
    align-content: end;
    min-width: 172px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-meta--secondary {
    min-width: 164px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-copy {
    gap: 8px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__decision-title,
#bbai-upgrade-modal .bbai-upgrade-modal__credit-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

#bbai-upgrade-modal .bbai-upgrade-modal__decision-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-price {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

#bbai-upgrade-modal .bbai-upgrade-modal__action-price--secondary {
    color: #334155;
}

#bbai-upgrade-modal .bbai-upgrade-modal__primary-action::before,
#bbai-upgrade-modal .bbai-upgrade-modal__secondary-action::before,
#bbai-upgrade-modal .bbai-pricing-card__btn::before {
    content: none !important;
}

#bbai-upgrade-modal .bbai-upgrade-modal__primary-action,
#bbai-upgrade-modal .bbai-upgrade-modal__secondary-action,
#bbai-upgrade-modal .bbai-pricing-card__btn {
    min-height: 46px;
    width: 100%;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: all 0.2s ease;
}

#bbai-upgrade-modal .bbai-upgrade-modal__primary-action,
#bbai-upgrade-modal .bbai-pricing-card__btn--growth.bbai-btn-primary,
#bbai-upgrade-modal a.bbai-pricing-card__btn--growth {
    background: #10b981 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

#bbai-upgrade-modal .bbai-upgrade-modal__primary-action:hover,
#bbai-upgrade-modal .bbai-pricing-card__btn--growth.bbai-btn-primary:hover,
#bbai-upgrade-modal a.bbai-pricing-card__btn--growth:hover {
    background: #059669 !important;
    transform: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

#bbai-upgrade-modal .bbai-upgrade-modal__primary-action:active,
#bbai-upgrade-modal .bbai-pricing-card__btn--growth.bbai-btn-primary:active,
#bbai-upgrade-modal a.bbai-pricing-card__btn--growth:active {
    background: #047857 !important;
    transform: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

#bbai-upgrade-modal .bbai-upgrade-modal__secondary-action,
#bbai-upgrade-modal .bbai-pricing-card__btn--free,
#bbai-upgrade-modal .bbai-pricing-card__btn--agency {
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #dbe3ee !important;
    box-shadow: none !important;
}

#bbai-upgrade-modal .bbai-upgrade-modal__secondary-action:hover,
#bbai-upgrade-modal .bbai-pricing-card__btn--free:hover:not(:disabled),
#bbai-upgrade-modal .bbai-pricing-card__btn--agency:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}

#bbai-upgrade-modal .bbai-upgrade-modal__risk-note {
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

#bbai-upgrade-modal .bbai-pricing-card__btn--free:disabled {
    background: #f8fafc !important;
    color: #64748b !important;
    border-color: #dbe3ee !important;
    cursor: default;
    opacity: 1;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-links--compare {
    justify-content: flex-end;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-link--muted {
    color: #64748b;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-link--muted:hover {
    color: #334155;
}

#bbai-upgrade-modal .bbai-upgrade-modal__footer-link:focus-visible,
#bbai-upgrade-modal .bbai-upgrade-modal__close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__compare-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-right: 44px;
}

#bbai-upgrade-modal .bbai-upgrade-modal__back-link {
    flex-shrink: 0;
}

#bbai-upgrade-modal .bbai-upgrade-modal__compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

#bbai-upgrade-modal .bbai-upgrade-modal__agency-toggle {
    display: flex;
    justify-content: flex-start;
}

#bbai-upgrade-modal .bbai-upgrade-modal__agency-panel {
    display: grid;
}

#bbai-upgrade-modal .bbai-pricing-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#bbai-upgrade-modal .bbai-pricing-card::before {
    content: none !important;
}

#bbai-upgrade-modal .bbai-pricing-card:hover {
    border-color: #cbd5e1;
}

#bbai-upgrade-modal .bbai-pricing-card--growth {
    border: 2px solid #bfdbfe;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
    transform: none;
}

#bbai-upgrade-modal .bbai-pricing-card--growth:hover {
    border-color: #93c5fd;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.14);
    transform: translateY(-2px);
}

#bbai-upgrade-modal .bbai-pricing-card--free {
    border-color: #e2e8f0;
    box-shadow: none;
}

#bbai-upgrade-modal .bbai-pricing-card--agency {
    background: #fcfdff;
}

#bbai-upgrade-modal .bbai-pricing-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

#bbai-upgrade-modal .bbai-pricing-card__badge,
#bbai-upgrade-modal .bbai-pricing-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#bbai-upgrade-modal .bbai-pricing-card__badge--free {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #dbe3ee;
}

#bbai-upgrade-modal .bbai-pricing-card__badge--growth {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

#bbai-upgrade-modal .bbai-pricing-card__badge--agency {
    background: #eff6ff;
    color: #475569;
    border: 1px solid #dbeafe;
}

#bbai-upgrade-modal .bbai-pricing-card__status {
    background: #0f172a;
    color: #ffffff;
}

#bbai-upgrade-modal .bbai-pricing-card__intro {
    margin-bottom: 0;
}

#bbai-upgrade-modal .bbai-pricing-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

#bbai-upgrade-modal .bbai-pricing-card__descriptor {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #526277;
}

#bbai-upgrade-modal .bbai-pricing-card__footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

#bbai-upgrade-modal .bbai-pricing-card__price-stack {
    display: grid;
    gap: 6px;
}

#bbai-upgrade-modal .bbai-pricing-card__price {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin: 0;
}

#bbai-upgrade-modal .bbai-pricing-card__currency {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
}

#bbai-upgrade-modal .bbai-pricing-card__amount {
    font-size: 36px;
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #0f172a;
}

#bbai-upgrade-modal .bbai-pricing-card__period {
    font-size: 13px;
    line-height: 1.4;
    color: #64748b;
}

#bbai-upgrade-modal .bbai-pricing-card__limit {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
}

#bbai-upgrade-modal .bbai-pricing-card__limit-sub {
    margin: -2px 0 0;
    font-size: 13px;
    line-height: 1.35;
    color: #64748b;
}

#bbai-upgrade-modal .bbai-pricing-card__features {
    display: grid;
    align-content: start;
    gap: 7px;
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    flex: 1 1 auto;
}

#bbai-upgrade-modal .bbai-pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

#bbai-upgrade-modal .bbai-pricing-card__features li svg {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: #22c55e;
    flex: 0 0 15px;
}

#bbai-upgrade-modal .bbai-pricing-card--growth .bbai-pricing-card__btn--growth {
    margin-top: 8px;
    margin-bottom: 4px;
}

#bbai-upgrade-modal .bbai-feature-coming-soon {
    color: #64748b;
}

@media (max-width: 900px) {
    #bbai-upgrade-modal .bbai-upgrade-modal__content,
    #bbai-upgrade-modal[data-bbai-upgrade-view="compare"] .bbai-upgrade-modal__content {
        width: min(calc(100vw - 24px), 760px);
        max-width: 760px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__action-card {
        grid-template-columns: 1fr;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__compare-header {
        flex-direction: column;
        padding-right: 36px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__compare-grid {
        grid-template-columns: 1fr;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__action-meta {
        min-width: 0;
    }

    #bbai-upgrade-modal .bbai-pricing-card--growth {
        transform: none;
    }
}

@media (max-width: 640px) {
    #bbai-upgrade-modal {
        padding: 12px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__content,
    #bbai-upgrade-modal[data-bbai-upgrade-view="compare"] .bbai-upgrade-modal__content {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__body {
        gap: 20px;
        padding: 22px 18px 18px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__header {
        padding-right: 34px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__compare-header {
        padding-right: 34px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__header h2 {
        font-size: 27px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__compare-title {
        font-size: 22px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__action-card,
    #bbai-upgrade-modal .bbai-pricing-card {
        padding: 20px;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__primary-action,
    #bbai-upgrade-modal .bbai-upgrade-modal__secondary-action {
        width: 100%;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__footer-links,
    #bbai-upgrade-modal .bbai-upgrade-modal__footer-links--compare {
        justify-content: flex-end;
    }

    #bbai-upgrade-modal .bbai-pricing-card__amount {
        font-size: 34px;
    }
}

/* Source: assets/css/features/dashboard/saas-consistency.css */
/* BeepBeep AI SaaS consistency system
 * Shared across Dashboard, Library, Analytics, Usage, Settings.
 */

/* Mint success shell: same as .bbai-banner--success command hero (plan banner + pair cards + library workspace). */
body.bbai-dashboard {
    --bbai-command-hero-success-border: #e8f0ec;
    --bbai-command-hero-success-bg: radial-gradient(circle at top right, rgba(22, 163, 74, 0.048), transparent 36%),
        linear-gradient(135deg, #fdfffe 0%, #f9fcfa 50%, #ffffff 100%);
    --bbai-command-hero-success-shadow-rest: 0 1px 2px rgba(0, 0, 0, 0.04);
    --bbai-command-hero-success-shadow-hover: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/*
 * WordPress admin shell — plugin screens only (body.bbai-dashboard via filter_admin_body_class).
 * Removes core .wrap / #wpbody-content constraints so the product owns horizontal canvas.
 */
body.bbai-dashboard #wpbody-content {
    padding-left: 0;
    padding-right: 0;
}

body.bbai-dashboard #wpbody-content .wrap {
    max-width: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

body.bbai-dashboard #wpcontent {
    padding-left: 0 !important;
}

/* Keep global WordPress and third-party notices out of the product canvas. */
body.toplevel_page_bbai.bbai-dashboard #wpbody-content .notice:not(.bbai-preserve-notice),
body.toplevel_page_bbai.bbai-dashboard #wpbody-content .updated:not(.bbai-preserve-notice),
body.toplevel_page_bbai.bbai-dashboard #wpbody-content .error:not(.bbai-preserve-notice),
body.toplevel_page_bbai.bbai-dashboard #wpbody-content .update-nag:not(.bbai-preserve-notice),
body.toplevel_page_bbai.bbai-dashboard #wpbody-content .fs-notice:not(.bbai-preserve-notice) {
    display: none !important;
}

/* Plugin canvas inset: matches header bar; not browser edge-to-edge */
body.bbai-dashboard .wrap.bbai-wrap > .bbai-header {
    padding-left: var(--bbai-space-6);
    padding-right: var(--bbai-space-8);
}

body.bbai-dashboard .wrap.bbai-wrap > .bbai-container.bbai-content-shell {
    padding-left: var(--bbai-space-6);
    padding-right: var(--bbai-space-8);
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

/* Onboarding uses .wrap > .bbai-container without .bbai-content-shell — same canvas inset + full width */
body.bbai-dashboard .wrap.bbai-wrap > .bbai-container:not(.bbai-content-shell) {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: var(--bbai-space-6);
    padding-right: var(--bbai-space-8);
    box-sizing: border-box;
}

/* Horizontal gutter lives on .bbai-content-shell; nested tab roots keep vertical padding only */
body.bbai-dashboard .bbai-container.bbai-content-shell .bbai-container {
    padding-left: 0;
    padding-right: 0;
}

body.bbai-dashboard .bbai-header-content {
    max-width: none;
    width: 100%;
    margin: 0;
}

/* ALT Library review surface: full width inside content-shell (no nested max-width / extra gutter) */
body.bbai-dashboard .bbai-library-container.bbai-library-workspace.bbai-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

body.bbai-dashboard .bbai-library-workspace .bbai-workspace {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

/*
 * ALT Library only (data root): main column + fixed-width rail so the review workspace
 * uses the admin canvas; avoids fractional rail stealing width on large screens.
 */
body.bbai-dashboard [data-bbai-library-workspace-root] .bbai-workspace-grid.bbai-library-workspace-grid {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

body.bbai-dashboard [data-bbai-library-workspace-root] .bbai-workspace-grid .bbai-main-content {
    max-width: none;
    width: 100%;
    min-width: 0;
}

body.bbai-dashboard [data-bbai-library-workspace-root] .bbai-workspace.bbai-library-main,
body.bbai-dashboard [data-bbai-library-workspace-root] .bbai-library-main {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    body.bbai-dashboard [data-bbai-library-workspace-root] .bbai-workspace-grid.bbai-library-workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Global spacing tokens (page rhythm only — do not redefine --bbai-space-*; unified.css owns the 4px scale) ─ */
:root {
    --page-padding-top: var(--bbai-space-6);
    --section-spacing: var(--bbai-space-6);
    --card-gap: var(--bbai-space-4);
    /* Single product primary CTA (physical spec — Dashboard is source of truth) */
    --bbai-cta-primary-bg: #10b981;
    --bbai-cta-primary-bg-hover: #059669;
    --bbai-cta-primary-bg-active: #047857;
    --bbai-cta-primary-min-height: 40px;
    --bbai-cta-primary-padding-x: var(--bbai-space-4);
    --bbai-cta-primary-min-width: 220px;
    --bbai-cta-primary-min-width-rail: 200px;
    --bbai-cta-primary-radius: var(--bbai-space-2);
    --bbai-cta-primary-font-size: 14px;
    --bbai-cta-primary-font-weight: 500;
    --bbai-cta-primary-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --bbai-cta-primary-shadow-hover: 0 3px 10px rgba(15, 23, 42, 0.1);
    --bbai-cta-primary-transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    /* Vertical rhythm: space above primary action groups */
    --bbai-cta-group-margin-top: var(--bbai-space-4);
}

/*
 * Single page scrollbar: wide tables use a horizontal scrollport only.
 * Spec: if overflow-x is not visible, overflow-y: visible computes to auto — nested vertical scrollbar.
 */
body.bbai-dashboard .bbai-table-wrap,
body.bbai-dashboard .bbai-table-scroll {
    overflow-x: auto;
    overflow-y: clip;
    -webkit-overflow-scrolling: touch;
}

/* Ensure plugin screens inside .wrap inherit the same values explicitly */
.wrap.bbai-wrap,
.wrap.bbai-wrap.bbai-modern {
    --page-padding-top: var(--bbai-space-6);
    --section-spacing: var(--bbai-space-6);
    --card-gap: var(--bbai-space-4);
    --bbai-cta-primary-radius: var(--bbai-space-2);
    --bbai-cta-primary-font-size: 14px;
    --bbai-cta-primary-font-weight: 500;
    --bbai-cta-primary-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --bbai-cta-primary-shadow-hover: 0 3px 10px rgba(15, 23, 42, 0.1);
    --bbai-cta-group-margin-top: var(--bbai-space-4);
    --bbai-cta-primary-transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    /* Legacy modern.bundle tokens → one green primary system inside plugin UI */
    --bbai-color-primary: #10b981;
    --bbai-color-primary-hover: #059669;
    --bbai-color-primary-dark: #047857;
    --bbai-color-primary-light: #d1fae5;
}

/* Page canvas: top from token; sides/bottom use tokens only (no per-page overrides) */
.bbai-page-container {
    padding-top: var(--page-padding-top);
}

.bbai-card-grid {
    display: grid;
    gap: var(--card-gap);
}

.bbai-card-stack {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
}

/* Major vertical blocks — use instead of ad-hoc margins */
.bbai-section {
    margin-bottom: var(--section-spacing);
}

.bbai-section:last-child,
.bbai-section:last-of-type {
    margin-bottom: 0;
}

/* Unified page container (tab roots reset inside .bbai-page-inner.bbai-page-container) */
.bbai-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--section-spacing, 24px) var(--section-spacing, 24px);
    box-sizing: border-box;
}

.bbai-page-inner.bbai-page-container > .bbai-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Core surfaces */
.bbai-card,
.bbai-usage-action,
.bbai-usage-status,
.bbai-analytics-trend-block,
.bbai-library-summary-card,
.bbai-lib-core-card,
.bbai-settings-card,
.bbai-settings-plan-summary-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    transform: translateY(0);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.wrap.bbai-wrap .bbai-card:hover,
.wrap.bbai-wrap .bbai-usage-action:hover,
.wrap.bbai-wrap .bbai-usage-status:hover,
.wrap.bbai-wrap .bbai-analytics-trend-block:hover,
.wrap.bbai-wrap .bbai-library-summary-card:hover,
.wrap.bbai-wrap .bbai-lib-core-card:hover,
.wrap.bbai-wrap .bbai-settings-card:hover,
.wrap.bbai-wrap .bbai-settings-plan-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    border-color: #e2e8e0;
}

/* Type rhythm */
.bbai-page-title,
.bbai-analytics-hero__headline,
.bbai-usage-status__number,
.bbai-library-summary-card__title {
    color: #0f172a;
}

.bbai-page-subtitle,
.bbai-analytics-hero__subtitle,
.bbai-usage-status__meta,
.bbai-library-summary-card__copy,
.bbai-settings-card-description {
    color: #6b7280;
}

/* Hero primitive */
.bbai-hero {
    border-radius: 12px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.bbai-hero--warning {
    border-color: #fbcaca;
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.bbai-hero--success {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.bbai-hero--neutral {
    border-color: #dbeafe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

/* Metric strip */
.bbai-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
    margin: var(--section-spacing) 0;
}

.bbai-metrics > * {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px 16px;
}

.bbai-metrics > * strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    color: #0f172a;
}

.bbai-metrics > * span {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

/* Alert primitive */
.bbai-alert {
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    padding: 16px;
}

.bbai-alert--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.bbai-alert--warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.bbai-alert--info {
    border-color: #bfdbfe;
    background: #eff6ff;
}

/* Button hierarchy: one primary system (solid green, shared spec) */
.bbai-btn.bbai-btn-primary,
.bbai-btn-primary {
    min-height: var(--bbai-cta-primary-min-height);
    padding-left: var(--bbai-cta-primary-padding-x) !important;
    padding-right: var(--bbai-cta-primary-padding-x) !important;
    min-width: var(--bbai-cta-primary-min-width);
    border-radius: var(--bbai-cta-primary-radius);
    font-size: var(--bbai-cta-primary-font-size, 14px);
    font-weight: var(--bbai-cta-primary-font-weight);
    background: var(--bbai-cta-primary-bg) !important;
    border-color: var(--bbai-cta-primary-bg) !important;
    color: #ffffff !important;
    box-shadow: var(--bbai-cta-primary-shadow);
    transform: translateY(0);
    transition: var(--bbai-cta-primary-transition);
}

.bbai-btn.bbai-btn-primary:hover,
.bbai-btn-primary:hover {
    /* Lift + shadow only — same fill (elite micro-interaction spec) */
    background: var(--bbai-cta-primary-bg) !important;
    border-color: var(--bbai-cta-primary-bg) !important;
    box-shadow: var(--bbai-cta-primary-shadow-hover);
    transform: translateY(-1px);
}

.bbai-btn.bbai-btn-primary:active,
.bbai-btn-primary:active {
    background: var(--bbai-cta-primary-bg) !important;
    border-color: var(--bbai-cta-primary-bg) !important;
    box-shadow: var(--bbai-cta-primary-shadow);
    transform: translateY(0) scale(0.98);
}

.bbai-btn.bbai-btn-primary:focus-visible,
.bbai-btn-primary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    background: var(--bbai-cta-primary-bg) !important;
    border-color: var(--bbai-cta-primary-bg) !important;
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(16, 185, 129, 0.35);
    transform: translateY(0);
}

.bbai-btn.bbai-btn-secondary,
.bbai-btn-secondary {
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.11) !important;
    color: #7b8898 !important;
    /* Aligned with --bbai-btn-font-weight-secondary (medium, not book) */
    font-weight: var(--bbai-font-medium, 500) !important;
    box-shadow: none !important;
    transform: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.bbai-btn.bbai-btn-secondary:hover,
.bbai-btn-secondary:hover {
    background: #f6f8fa !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
    color: #606b78 !important;
    transform: none;
    box-shadow: none !important;
}

/* ── Interactive link scale (admin shell): readable + clearly clickable ── */
.wrap.bbai-wrap {
    --bbai-link-primary: #1d4ed8;
    --bbai-link-primary-hover: #1e3a8a;
    --bbai-link-secondary: #2563eb;
    --bbai-link-secondary-hover: #1d4ed8;
    --bbai-link-tertiary: #3b82f6;
    --bbai-link-tertiary-hover: #1d4ed8;
    --bbai-link-disabled-fg: #94a3b8;
    --bbai-link-disabled-bg: #f1f5f9;
}

.bbai-link-btn,
.bbai-usage-action__btn-ghost,
.bbai-clear-filter-link {
    color: var(--bbai-link-secondary, #2563eb);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.bbai-link-btn:hover,
.bbai-usage-action__btn-ghost:hover,
.bbai-clear-filter-link:hover {
    color: var(--bbai-link-secondary-hover, #1d4ed8);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Locked upgrade CTAs: still clickable — do not use global disabled hit-target */
.wrap.bbai-wrap button.bbai-is-locked[data-bbai-action='open-upgrade'],
.wrap.bbai-wrap .bbai-is-locked[data-bbai-locked-cta='1'] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.wrap.bbai-wrap .bbai-btn.bbai-is-locked[data-bbai-action='open-upgrade'] {
    opacity: 1 !important;
    background: #fffbeb !important;
    border-color: #fbbf24 !important;
    color: #92400e !important;
    box-shadow: 0 1px 3px rgba(146, 64, 14, 0.1) !important;
}

.wrap.bbai-wrap .bbai-btn.bbai-is-locked[data-bbai-action='open-upgrade']:hover {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
}

/* Shared content + sidebar layout (canonical product shell) */
.bbai-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
    gap: var(--section-spacing, var(--bbai-space-6));
    align-items: start;
}

/* Status banner: narrative only — primary CTAs live in main column or product rail */
.wrap.bbai-wrap .bbai-command-hero-wrap--text-only .bbai-banner__layout.bbai-dashboard-hero__layout {
    grid-template-columns: minmax(0, 1fr);
}

.wrap.bbai-wrap .bbai-command-hero-wrap--text-only .bbai-banner__actions.bbai-dashboard-hero-actions {
    display: none;
}

/* Supporting rail — quieter than primary column (one main block per page) */
.bbai-product-rail__inner {
    padding: var(--bbai-space-5);
    border-radius: 14px;
    border: 1px solid rgba(241, 245, 249, 0.95);
    background: #fafbfc;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.028);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.wrap.bbai-wrap .bbai-product-rail__inner:hover {
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.042);
    border-color: #eef2f7;
}

.bbai-product-rail__title {
    margin: 0 0 var(--bbai-space-2);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.bbai-product-rail__copy {
    margin: 0 0 var(--bbai-space-4);
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.bbai-product-rail__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-rhythm-action-stack-gap, var(--bbai-space-2));
    margin-bottom: var(--bbai-space-3);
}

.bbai-product-rail__actions:last-child {
    margin-bottom: 0;
}

.bbai-product-rail__actions--tertiary {
    margin-bottom: 0;
}

.bbai-product-rail__meta {
    margin: 0 0 var(--bbai-space-3);
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.bbai-product-rail__meta:last-child {
    margin-bottom: 0;
}

.bbai-product-rail__foot {
    margin: var(--bbai-space-3) 0 0;
    padding-top: var(--bbai-space-3);
    border-top: 1px solid rgba(241, 245, 249, 0.9);
}

.bbai-dashboard-surface-card--rail {
    background: #f8fafc;
    border-color: #e8ecf1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

/* Dashboard command grid — same ratio as workspace (primary + rail) */
#bbai-dashboard-main .bbai-top-section-stack,
body.bbai-dashboard .bbai-library-workspace .bbai-top-section-stack {
    display: grid;
    gap: var(--section-spacing, var(--bbai-space-6));
    align-content: start;
}

/* Shared banner shell parity across Dashboard, Library, Analytics, Usage.
 * Neutralizes dashboard-only drift from legacy selectors by forcing one
 * canonical layout contract for .bbai-status-banner.
 */
body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command,
body.bbai-dashboard #bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command {
    padding: 11px 20px !important;
    border-radius: 16px !important;
}

body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout,
body.bbai-dashboard #bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout {
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: var(--card-gap, 24px) !important;
    row-gap: var(--bbai-space-2, 8px) !important;
}

@media (max-width: 1023px) {
    body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout,
    body.bbai-dashboard #bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout {
        grid-template-columns: minmax(0, 1fr) !important;
        row-gap: var(--bbai-space-4, 16px) !important;
        column-gap: 0 !important;
    }
}

body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__icon.bbai-dashboard-hero__icon,
body.bbai-dashboard #bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__icon.bbai-dashboard-hero__icon {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
}

body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__headline.bbai-dashboard-hero__headline,
body.bbai-dashboard #bbai-dashboard-main .bbai-status-banner.bbai-dashboard-hero--command .bbai-banner__headline.bbai-dashboard-hero__headline {
    font-size: 28px !important;
    line-height: 1.08 !important;
}

body.bbai-dashboard .bbai-library-workspace .bbai-command-card--workspace {
    padding: 0;
    border-radius: 16px;
}

body.bbai-dashboard .bbai-library-workspace .bbai-command-card--workspace .bbai-library-workspace-card__head {
    padding-top: var(--bbai-command-card-padding, var(--bbai-rhythm-card-padding, var(--bbai-space-6)));
}

body.bbai-dashboard .bbai-library-workspace .bbai-command-card--workspace .bbai-library-workspace-card__filter-toolbar {
    padding-top: var(--bbai-space-4);
}

#bbai-dashboard-main .bbai-dashboard-command__grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.95fr);
    gap: var(--section-spacing, var(--bbai-space-6));
    /* Stretch so Library status + Plan / trial cards share one height (identical outer banners). */
    align-items: stretch;
}

/*
 * Coverage + Plan / trial: same mint surface + border + shadow as .bbai-banner--success plan hero.
 * Excludes coverage-complete (stronger green celebration shell).
 */
#bbai-dashboard-main
    .bbai-dashboard-command__grid
    > .bbai-dashboard-card.bbai-command-card:not(.bbai-command-card--coverage-complete) {
    background: var(--bbai-command-hero-success-bg);
    border: 1px solid var(--bbai-command-hero-success-border);
    border-radius: 16px;
    box-shadow: var(--bbai-command-hero-success-shadow-rest);
}

/* Keep CTA hierarchy visually consistent between Dashboard and Library action surfaces. */
#bbai-dashboard-main .bbai-dashboard-primary-action-card .bbai-command-action.bbai-btn,
#bbai-dashboard-main .bbai-dashboard-card .bbai-command-action.bbai-btn {
    min-height: var(--bbai-control-height-lg, 44px);
    border-radius: var(--bbai-radius-md, 10px);
    font-weight: 600;
}

/* The plan rail is too narrow for two CTAs side-by-side, so stack them consistently. */
#bbai-dashboard-main .bbai-command-plan__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#bbai-dashboard-main .bbai-command-plan__actions .bbai-command-action--primary,
#bbai-dashboard-main .bbai-command-plan__actions .bbai-command-action--secondary {
    width: 100%;
}

#bbai-dashboard-main .bbai-command-plan__actions .bbai-command-action--tertiary {
    align-self: flex-start;
}

.bbai-main-content,
.bbai-sidebar {
    min-width: 0;
}

.bbai-sidebar-sticky {
    position: sticky;
    top: 90px;
}

.bbai-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap, 16px);
}

/* Usage page polish */
.bbai-usage-workspace {
    max-width: 1280px;
}

.bbai-usage-action__list {
    margin: 10px 0 12px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    color: #0f172a;
    font-size: 13px;
}

.bbai-usage-action__list li::before {
    content: "✓";
    color: #16a34a;
    margin-right: 8px;
    font-weight: 700;
}

.bbai-credit-filter-actions {
    justify-content: flex-end;
}

.bbai-credit-activity-table-wrap table.widefat.fixed.striped tbody tr:nth-child(odd) {
    background: #fcfcfd;
}

.bbai-credit-activity-table-wrap table.widefat.fixed.striped tbody tr:hover {
    background: #f9fafb;
}

/* Analytics page polish */
.bbai-analytics-page .bbai-analytics-hero {
    margin-bottom: var(--card-gap, 16px);
}

.bbai-analytics-page .bbai-analytics-hero__actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: var(--bbai-cta-group-margin-top, 16px);
    margin-bottom: 0;
}

.bbai-analytics-emphasis {
    margin-bottom: 18px;
    font-weight: 600;
}

.bbai-analytics-conversion-card {
    padding: 18px;
}

.bbai-analytics-conversion-card h3,
.bbai-analytics-conversion-card h4 {
    margin: 0 0 8px;
}

.bbai-analytics-conversion-card p {
    margin: 0 0 10px;
    color: #6b7280;
}

.bbai-analytics-conversion-card ul {
    margin: 0 0 12px 18px;
    color: #1f2937;
}

/* Library page polish — premium workspace uses full content width (see library-workspace.php) */
.bbai-library-container.bbai-container:not(.bbai-library-workspace) {
    max-width: 1280px;
}

.bbai-library-table .bbai-alt-text-preview {
    line-height: 1.5;
}

.bbai-library-table tbody tr td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.bbai-library-table tbody tr:hover {
    background: #f9fafb;
}

.bbai-library-table .bbai-alt-actions-cell .bbai-btn {
    margin-right: 8px;
}

/* Settings page polish */
.bbai-settings-page.bbai-container {
    max-width: 1280px;
}

.bbai-settings-upgrade-block {
    margin-top: 24px;
    padding: 20px;
}

.bbai-settings-upgrade-block ul {
    margin: 10px 0 12px 18px;
}

.bbai-settings-upgrade-block__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* General table comfort */
.bbai-table tr:hover,
table.widefat tbody tr:hover {
    background: #f9fafb;
}

table.widefat td,
table.widefat th {
    padding-top: 11px;
    padding-bottom: 11px;
}

/* Responsive */
@media (max-width: 1024px) {
    .bbai-container {
        padding: 18px;
    }

    .bbai-workspace-grid {
        grid-template-columns: 1fr;
    }

    .bbai-sidebar-sticky {
        position: static;
    }
}

@media (max-width: 860px) {
    .bbai-metrics {
        grid-template-columns: 1fr;
    }
}

/* Source: assets/css/features/dashboard/product-banner.css */
/**
 * Shared product banner — same shell for Dashboard, Library, Analytics command hero.
 * Structure: .bbai-banner + .bbai-banner--success | .bbai-banner--warning (state only).
 * Legacy .bbai-dashboard-hero--command classes remain for JS hooks.
 *
 * @package BeepBeep_AI
 */

/* ── Shell (layout + density identical everywhere) ─────────────────────────── */

.bbai-command-hero-host .bbai-banner.bbai-dashboard-hero--command,
#bbai-dashboard-main .bbai-banner.bbai-dashboard-hero--command {
    width: 100%;
    margin: 0;
    min-height: 0;
    /* Tighter vertical rhythm vs 15px (aligns with Dashboard / Analytics density) */
    padding: 11px 20px;
    border-radius: 16px;
    border: 1px solid #e9eef5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transform: translateY(0);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.bbai-command-hero-host .bbai-banner__inner.bbai-dashboard-hero-inner,
#bbai-dashboard-main .bbai-banner__inner.bbai-dashboard-hero-inner {
    min-height: 0;
}

.bbai-command-hero-host .bbai-banner__layout.bbai-dashboard-hero__layout,
#bbai-dashboard-main .bbai-banner__layout.bbai-dashboard-hero__layout,
#bbai-dashboard-main .bbai-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout {
    display: grid;
    width: 100%;
    align-items: start;
}

/* Desktop ≥1024px: copy left, CTA column shrink-wrapped (not full-width rail). */
@media (min-width: 1024px) {
    .bbai-command-hero-host .bbai-banner__layout.bbai-dashboard-hero__layout,
    #bbai-dashboard-main .bbai-banner__layout.bbai-dashboard-hero__layout,
    #bbai-dashboard-main .bbai-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout {
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: var(--card-gap, 24px);
        row-gap: var(--bbai-space-2, 8px);
    }
}

/* Tablet / small: single column, CTAs below copy. */
@media (max-width: 1023px) {
    .bbai-command-hero-host .bbai-banner__layout.bbai-dashboard-hero__layout,
    #bbai-dashboard-main .bbai-banner__layout.bbai-dashboard-hero__layout,
    #bbai-dashboard-main .bbai-banner.bbai-dashboard-hero--command .bbai-banner__layout.bbai-dashboard-hero__layout {
        grid-template-columns: minmax(0, 1fr);
        row-gap: var(--bbai-space-4, 16px);
        column-gap: 0;
    }
}

.bbai-command-hero-host .bbai-banner__content.bbai-dashboard-hero-copy,
#bbai-dashboard-main .bbai-banner__content.bbai-dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.bbai-command-hero-host .bbai-banner__head.bbai-dashboard-hero__heading-row,
#bbai-dashboard-main .bbai-banner__head.bbai-dashboard-hero__heading-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}

.bbai-command-hero-host .bbai-banner__title-wrap.bbai-dashboard-hero__heading-copy,
#bbai-dashboard-main .bbai-banner__title-wrap.bbai-dashboard-hero__heading-copy {
    min-width: 0;
}

/* Icon */
.bbai-command-hero-host .bbai-banner__icon.bbai-dashboard-hero__icon,
#bbai-dashboard-main .bbai-banner__icon.bbai-dashboard-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    max-width: 32px;
    height: 32px;
    max-height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--bbai-primary-strong, #047857);
}

.bbai-command-hero-host .bbai-banner__icon.bbai-dashboard-hero__icon svg,
#bbai-dashboard-main .bbai-banner__icon.bbai-dashboard-hero__icon svg {
    width: 18px;
    height: 18px;
}

/* Typography */
.bbai-command-hero-host .bbai-banner__headline.bbai-dashboard-hero__headline,
#bbai-dashboard-main .bbai-banner__headline.bbai-dashboard-hero__headline {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.bbai-command-hero-host .bbai-banner__subtext.bbai-dashboard-hero__subtext,
#bbai-dashboard-main .bbai-banner__subtext.bbai-dashboard-hero__subtext {
    margin: 4px 0 0;
    max-width: 64ch;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: #4b5563;
}

.bbai-command-hero-host .bbai-banner__body-stack,
#bbai-dashboard-main .bbai-banner__body-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 0;
    max-width: 64ch;
}

.bbai-command-hero-host .bbai-banner__body-stack .bbai-banner__subtext,
#bbai-dashboard-main .bbai-banner__body-stack .bbai-banner__subtext {
    margin: 0;
}

.bbai-command-hero-host .bbai-banner__body-stack .bbai-banner__subtext + .bbai-banner__subtext,
#bbai-dashboard-main .bbai-banner__body-stack .bbai-banner__subtext + .bbai-banner__subtext {
    margin-top: 6px;
}

.bbai-command-hero-host .bbai-banner__progress-caption,
#bbai-dashboard-main .bbai-banner__progress-caption {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #64748b;
}

.bbai-command-hero-host .bbai-banner__actions .bbai-banner__chip-row,
#bbai-dashboard-main .bbai-banner__actions .bbai-banner__chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.bbai-command-hero-host .bbai-banner__actions .bbai-banner__chip-row > li,
#bbai-dashboard-main .bbai-banner__actions .bbai-banner__chip-row > li {
    margin: 0;
}

.bbai-command-hero-host .bbai-banner__actions .bbai-banner__footer-link,
#bbai-dashboard-main .bbai-banner__actions .bbai-banner__footer-link {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.bbai-command-hero-host .bbai-banner__actions .bbai-banner__footer-link a,
#bbai-dashboard-main .bbai-banner__actions .bbai-banner__footer-link a {
    color: #2563eb;
    text-decoration: none;
}

.bbai-command-hero-host .bbai-banner__actions .bbai-banner__footer-link a:hover,
#bbai-dashboard-main .bbai-banner__actions .bbai-banner__footer-link a:hover {
    text-decoration: underline;
}

.bbai-command-hero-host .bbai-banner__meta.bbai-dashboard-hero__next-step,
#bbai-dashboard-main .bbai-banner__meta.bbai-dashboard-hero__next-step {
    margin: 0;
    max-width: 64ch;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #64748b;
}

/* Utility row (plan / remaining) */
.bbai-command-hero-host .bbai-banner__utility.bbai-dashboard-hero__usage-block,
#bbai-dashboard-main .bbai-banner__utility.bbai-dashboard-hero__usage-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    max-width: 620px;
}

.bbai-command-hero-host .bbai-banner__usage.bbai-dashboard-hero__usage,
#bbai-dashboard-main .bbai-banner__usage.bbai-dashboard-hero__usage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.bbai-command-hero-host .bbai-banner__pill.bbai-dashboard-hero__usage-pill,
#bbai-dashboard-main .bbai-banner__pill.bbai-dashboard-hero__usage-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #dde6f0;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.bbai-command-hero-host .bbai-banner__usage-primary.bbai-dashboard-hero__usage-primary,
#bbai-dashboard-main .bbai-banner__usage-primary.bbai-dashboard-hero__usage-primary {
    font-weight: 600;
    color: #0f172a;
}

.bbai-command-hero-host .bbai-banner__usage-secondary.bbai-dashboard-hero__usage-secondary,
#bbai-dashboard-main .bbai-banner__usage-secondary.bbai-dashboard-hero__usage-secondary {
    color: #64748b;
}

/* Progress */
.bbai-command-hero-host .bbai-banner__progress-caption,
#bbai-dashboard-main .bbai-banner__progress-caption {
    margin: 0 0 var(--bbai-space-2, 8px);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #64748b;
}

.bbai-command-hero-host .bbai-banner__progress.bbai-dashboard-hero-progress,
#bbai-dashboard-main .bbai-banner__progress.bbai-dashboard-hero-progress {
    width: 100%;
}

.bbai-command-hero-host .bbai-banner__progress-track.bbai-dashboard-hero-progress-track,
#bbai-dashboard-main .bbai-banner__progress-track.bbai-dashboard-hero-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.bbai-command-hero-host .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
#bbai-dashboard-main .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background-color: #10b981;
}

.bbai-banner--success .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
.bbai-banner--success.bbai-dashboard-hero--command .bbai-dashboard-hero-progress-fill {
    background-color: #16a34a;
}

/* Low-credits: slightly desaturated amber (calmer than pure tailwind-amber) */
.bbai-banner--warning[data-tone='attention'] .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='attention'] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #c97a00 0%, #d48806 100%);
}

.bbai-banner--warning[data-tone='paused'] .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='paused'] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6a6fd1 100%);
}

/* Dashboard + .bbai-status-banner: ID-safe parity with shared warning progress fills */
#bbai-dashboard-main .bbai-status-banner.bbai-banner--warning[data-tone='attention'] .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
#bbai-dashboard-main .bbai-status-banner.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='attention'] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #c97a00 0%, #d48806 100%);
}

#bbai-dashboard-main .bbai-status-banner.bbai-banner--warning[data-tone='paused'] .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
#bbai-dashboard-main .bbai-status-banner.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='paused'] .bbai-dashboard-hero-progress-fill {
    background: linear-gradient(90deg, #5b6ea8 0%, #6a6fd1 100%);
}

/*
 * Low credits: identical progress bar on Dashboard, Library, Analytics, Usage
 * (not gated on #bbai-dashboard-main — Usage/Library live under .wrap only).
 */
body.bbai-dashboard .bbai-status-banner.bbai-banner--warning[data-tone='attention'] .bbai-banner__progress-track.bbai-dashboard-hero-progress-track,
body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-banner--warning[data-tone='attention'] .bbai-banner__progress-track.bbai-dashboard-hero-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

body.bbai-dashboard .bbai-status-banner.bbai-banner--warning[data-tone='attention'] .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
body.bbai-dashboard .bbai-command-hero-host .bbai-status-banner.bbai-banner--warning[data-tone='attention'] .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c78a30 0%, #d9a85c 100%);
}

/* Inline stats (Library) */
.bbai-command-hero-host .bbai-banner__inline-stats.bbai-dashboard-hero__inline-stats,
#bbai-dashboard-main .bbai-banner__inline-stats.bbai-dashboard-hero__inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 8px;
}

.bbai-command-hero-host .bbai-banner__inline-stats .bbai-dashboard-hero__inline-stat,
#bbai-dashboard-main .bbai-banner__inline-stats .bbai-dashboard-hero__inline-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bbai-command-hero-host .bbai-banner__inline-stats .bbai-dashboard-hero__inline-stat-label,
#bbai-dashboard-main .bbai-banner__inline-stats .bbai-dashboard-hero__inline-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.bbai-command-hero-host .bbai-banner__inline-stats .bbai-dashboard-hero__inline-stat-value,
#bbai-dashboard-main .bbai-banner__inline-stats .bbai-dashboard-hero__inline-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* Note + loop */
.bbai-command-hero-host .bbai-banner__note.bbai-dashboard-hero__note,
#bbai-dashboard-main .bbai-banner__note.bbai-dashboard-hero__note {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    opacity: 0.85;
}

.bbai-command-hero-host .bbai-banner__loop.bbai-dashboard-hero__loop,
#bbai-dashboard-main .bbai-banner__loop.bbai-dashboard-hero__loop {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

/* Actions rail — ≥1024: end-aligned, shrink-wrap; 768–1023: stacked + auto-width CTAs; <768: full-width CTAs */
.bbai-command-hero-host .bbai-banner__actions.bbai-dashboard-hero-actions,
#bbai-dashboard-main .bbai-banner__actions.bbai-dashboard-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin-top: calc(var(--bbai-cta-group-margin-top, 16px) - 3px);
}

@media (min-width: 1024px) {
    .bbai-command-hero-host .bbai-banner__actions.bbai-dashboard-hero-actions,
    #bbai-dashboard-main .bbai-banner__actions.bbai-dashboard-hero-actions {
        align-items: flex-end;
        width: auto;
        max-width: 320px;
        margin-left: auto;
        transform: translateX(-12px);
        justify-self: end;
    }

    .bbai-command-hero-host .bbai-banner__actions .bbai-dashboard-hero-actions__item,
    #bbai-dashboard-main .bbai-banner__actions .bbai-dashboard-hero-actions__item {
        display: flex;
        width: auto;
        max-width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 1023px) {
    .bbai-command-hero-host .bbai-banner__actions.bbai-dashboard-hero-actions,
    #bbai-dashboard-main .bbai-banner__actions.bbai-dashboard-hero-actions {
        width: 100%;
        max-width: none;
        margin-left: 0;
        transform: none;
        justify-self: stretch;
        align-items: flex-start;
    }

    .bbai-command-hero-host .bbai-banner__actions .bbai-dashboard-hero-actions__item,
    #bbai-dashboard-main .bbai-banner__actions .bbai-dashboard-hero-actions__item {
        display: flex;
        width: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .bbai-command-hero-host .bbai-banner__actions.bbai-dashboard-hero-actions,
    #bbai-dashboard-main .bbai-banner__actions.bbai-dashboard-hero-actions {
        align-items: stretch;
    }

    .bbai-command-hero-host .bbai-banner__actions .bbai-dashboard-hero-actions__item,
    #bbai-dashboard-main .bbai-banner__actions .bbai-dashboard-hero-actions__item {
        width: 100%;
    }
}

.bbai-command-hero-host .bbai-banner__secondary-actions.bbai-dashboard-hero__secondary-actions,
#bbai-dashboard-main .bbai-banner__secondary-actions.bbai-dashboard-hero__secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* CTAs — filled primary + outline secondary share the same flex box model (tertiary is text-link only). */
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta,
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: var(--bbai-cta-primary-min-height, 40px);
    padding: 0 var(--bbai-cta-primary-padding-x, 16px);
    border-radius: var(--bbai-cta-primary-radius, 8px);
    font-size: var(--bbai-cta-primary-font-size, 14px);
    font-weight: var(--bbai-cta-primary-font-weight, 500);
    line-height: 1.1;
    text-decoration: none;
    box-sizing: border-box;
    transition: var(
        --bbai-cta-primary-transition,
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease
    );
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary {
    min-width: 0;
    border: 1px solid transparent !important;
    background-color: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    transform: translateY(0);
    transition: var(
        --bbai-cta-primary-transition,
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease
    ) !important;
}

@media (min-width: 768px) {
    .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary,
    .bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary,
    #bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary,
    #bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary {
        min-width: var(--bbai-cta-primary-min-width, 220px);
    }

    .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary,
    .bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary,
    #bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary,
    #bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary {
        min-width: var(--bbai-cta-primary-min-width, 220px);
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta,
    .bbai-command-hero-host .bbai-banner .bbai-banner__cta,
    #bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta,
    #bbai-dashboard-main .bbai-banner .bbai-banner__cta {
        width: 100%;
    }

    .bbai-command-hero-host .bbai-banner__secondary-actions.bbai-dashboard-hero__secondary-actions,
    #bbai-dashboard-main .bbai-banner__secondary-actions.bbai-dashboard-hero__secondary-actions {
        width: 100%;
    }

    .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary,
    .bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary,
    #bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary,
    #bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}

/* Upgrade-locked hero primary: clearly actionable, not “dead grey” */
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary.bbai-is-locked,
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary.bbai-is-locked,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary.bbai-is-locked,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary.bbai-is-locked {
    background: #fffbeb !important;
    border: 1px solid #fbbf24 !important;
    color: #92400e !important;
    box-shadow: 0 1px 3px rgba(146, 64, 14, 0.12) !important;
    cursor: pointer !important;
}

.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary.bbai-is-locked:hover,
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary.bbai-is-locked:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary.bbai-is-locked:hover,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary.bbai-is-locked:hover {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
    transform: translateY(-1px);
}

.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary.bbai-is-locked,
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary.bbai-is-locked,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary.bbai-is-locked,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary.bbai-is-locked {
    background: #fffbeb !important;
    border-color: #fbbf24 !important;
    color: #92400e !important;
    cursor: pointer !important;
}

.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary.bbai-is-locked:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary.bbai-is-locked:hover {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary:hover,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary:hover,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary:hover {
    background-color: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    box-shadow: var(--bbai-cta-primary-shadow-hover, 0 3px 10px rgba(15, 23, 42, 0.1)) !important;
    transform: translateY(-1px);
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary:active,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary:active,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary:active,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary:active {
    background-color: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    box-shadow: var(--bbai-cta-primary-shadow, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    transform: translateY(1px) !important;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary {
    border-radius: var(--bbai-cta-primary-radius, 8px);
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #ffffff;
    color: #334155;
    font-weight: 600;
    box-shadow: none;
    transform: none;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary:hover,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary:hover,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary:hover {
    border-color: rgba(100, 116, 139, 0.65);
    background: #f8fafc;
    color: #0f172a;
    box-shadow: none !important;
    transform: none !important;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--tertiary,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--tertiary,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--tertiary,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--tertiary {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.42);
    text-underline-offset: 3px;
    justify-content: flex-start;
    cursor: pointer;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--tertiary:hover,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--tertiary:hover,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--tertiary:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--tertiary:hover {
    color: #1d4ed8;
    text-decoration-color: rgba(29, 78, 216, 0.75);
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--tertiary::after,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--tertiary::after,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--tertiary::after,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--tertiary::after {
    content: '\00a0→';
    display: inline-block;
    font-weight: 500;
    opacity: 0.75;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary:focus-visible,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary:focus-visible,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary:focus-visible,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary:focus-visible {
    outline: none !important;
    background-color: var(--bbai-cta-primary-bg, #10b981) !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(16, 185, 129, 0.35) !important;
    transform: translateY(0) !important;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary:focus-visible,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary:focus-visible,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary:focus-visible,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--tertiary:focus-visible,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--tertiary:focus-visible,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--tertiary:focus-visible,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--tertiary:focus-visible {
    outline: none;
    box-shadow: none;
    text-decoration-color: rgba(51, 65, 85, 0.8);
}

/* ── State surfaces only (success vs warning) ────────────────────────────── */

.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command,
#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command {
    border-color: var(--bbai-command-hero-success-border, #e8f0ec);
    /* Token defined on body.bbai-dashboard (saas-consistency.css); matches dashboard pair cards + library workspace */
    background: var(--bbai-command-hero-success-bg);
}

.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command:hover,
#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command:hover {
    transform: translateY(-1px);
    box-shadow: var(--bbai-command-hero-success-shadow-hover, 0 4px 14px rgba(15, 23, 42, 0.06));
}

.bbai-command-hero-host .bbai-banner--warning.bbai-dashboard-hero--command,
#bbai-dashboard-main .bbai-banner--warning.bbai-dashboard-hero--command {
    border-color: #f0dec9;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.08), transparent 36%),
        linear-gradient(140deg, #fffdf9 0%, #fff8f0 58%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-banner--warning.bbai-dashboard-hero--command[data-tone='setup'],
#bbai-dashboard-main .bbai-banner--warning.bbai-dashboard-hero--command[data-tone='setup'] {
    border-color: #e8edf4;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.035), transparent 36%),
        linear-gradient(155deg, #fdfeff 0%, #f8fbff 54%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-banner--warning.bbai-dashboard-hero--command[data-tone='paused'],
#bbai-dashboard-main .bbai-banner--warning.bbai-dashboard-hero--command[data-tone='paused'] {
    border-color: #f1d7d4;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.08), transparent 34%),
        linear-gradient(135deg, #fffdfd 0%, #fff4f3 54%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-banner--warning.bbai-dashboard-hero--command:hover,
#bbai-dashboard-main .bbai-banner--warning.bbai-dashboard-hero--command:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* Icon tint by tone (warning family) */
.bbai-banner--success.bbai-dashboard-hero--command .bbai-banner__icon {
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
}

/* Unified plan top banner: circular green check (Dashboard + Library reference layout). */
.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-top-banner-mode='plan'] .bbai-banner__icon.bbai-dashboard-hero__icon,
#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-top-banner-mode='plan'] .bbai-banner__icon.bbai-dashboard-hero__icon {
    width: 40px;
    max-width: 40px;
    height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(145deg, #34d399 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow:
        0 1px 2px rgba(22, 101, 52, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-top-banner-mode='plan'] .bbai-banner__icon.bbai-dashboard-hero__icon svg,
#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-top-banner-mode='plan'] .bbai-banner__icon.bbai-dashboard-hero__icon svg {
    width: 20px;
    height: 20px;
}

.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='attention'] .bbai-banner__icon {
    color: #c2410c;
    background: rgba(249, 115, 22, 0.1);
}

.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='paused'] .bbai-banner__icon {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
}

.bbai-banner--warning.bbai-dashboard-hero--command[data-tone='setup'] .bbai-banner__icon {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.bbai-command-hero-host .bbai-banner--info.bbai-dashboard-hero--command,
#bbai-dashboard-main .bbai-banner--info.bbai-dashboard-hero--command {
    border-color: #dbeafe;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 36%),
        linear-gradient(140deg, #fdfeff 0%, #f4f8ff 55%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-banner--info.bbai-dashboard-hero--command:hover,
#bbai-dashboard-main .bbai-banner--info.bbai-dashboard-hero--command:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.bbai-command-hero-host .bbai-banner--neutral.bbai-dashboard-hero--command,
#bbai-dashboard-main .bbai-banner--neutral.bbai-dashboard-hero--command {
    border-color: #e8ecf1;
    background:
        radial-gradient(circle at top right, rgba(100, 116, 139, 0.05), transparent 36%),
        linear-gradient(135deg, #fcfcfd 0%, #f4f6f8 52%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-banner--neutral.bbai-dashboard-hero--command:hover,
#bbai-dashboard-main .bbai-banner--neutral.bbai-dashboard-hero--command:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.bbai-banner--info.bbai-dashboard-hero--command .bbai-banner__icon {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.1);
}

.bbai-banner--neutral.bbai-dashboard-hero--command .bbai-banner__icon {
    color: #475569;
    background: rgba(148, 163, 184, 0.14);
}

/* Dashboard: full success celebration (same component, calmer base + burst) */
#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-success-state='1'],
.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-success-state='1'] {
    border-color: #cfe9d8;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.1), transparent 36%),
        linear-gradient(145deg, #f7fff9 0%, #effaf2 55%, #ffffff 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(34, 197, 94, 0.06) inset;
}

#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-success-state='1'] .bbai-banner__icon,
.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-success-state='1'] .bbai-banner__icon {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

#bbai-dashboard-main .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-success-state='1'] .bbai-banner__meta:not([hidden]),
.bbai-command-hero-host .bbai-banner--success.bbai-dashboard-hero--command[data-bbai-success-state='1'] .bbai-banner__meta:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0;
    padding: 4px 12px 4px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.055);
    color: #4a7c5c;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

#bbai-dashboard-main .bbai-banner--celebrate,
.bbai-command-hero-host .bbai-banner--celebrate {
    animation: bbai-product-banner-glow-pulse 0.6s ease-out both;
}

@keyframes bbai-product-banner-glow-pulse {
    0% {
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.04),
            0 0 0 0 rgba(34, 197, 94, 0.08);
    }
    55% {
        box-shadow:
            0 2px 8px rgba(15, 23, 42, 0.05),
            0 0 0 4px rgba(34, 197, 94, 0.04);
    }
    100% {
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.04),
            0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* ALT Library workspace: plan top banner matches Dashboard (full-width card, icon + copy left, stacked CTAs right). */
body.bbai-dashboard .bbai-library-workspace .bbai-library-top-hero-host.bbai-command-hero-host.bbai-hero-full,
body.bbai-dashboard .bbai-library-workspace .bbai-library-top-hero-host.bbai-hero-full {
    width: 100%;
    max-width: none;
}

body.bbai-dashboard .bbai-library-workspace .bbai-status-banner.bbai-library-top-hero.bbai-banner--success,
body.bbai-dashboard .bbai-library-workspace .bbai-status-banner.bbai-library-top-hero.bbai-banner--warning {
    width: 100%;
    box-sizing: border-box;
}

body.bbai-dashboard .bbai-library-workspace .bbai-library-top-hero .bbai-banner__layout.bbai-dashboard-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px 28px;
}

@media (max-width: 1023px) {
    body.bbai-dashboard .bbai-library-workspace .bbai-library-top-hero .bbai-banner__layout.bbai-dashboard-hero__layout {
        grid-template-columns: 1fr;
    }
}

/* Same inset as dashboard command cards / library workspace (tighter 11px felt “off” vs cards). */
#bbai-dashboard-main .bbai-banner.bbai-dashboard-hero--command,
body.bbai-dashboard .bbai-library-workspace .bbai-status-banner.bbai-dashboard-hero--command {
    padding: var(--bbai-command-card-padding, var(--bbai-space-6));
}

/* Library workspace shell: see bbai-admin-library-workspace-polish.css (loads after this sheet). */

/* Source: assets/css/features/dashboard/page-hero.css */
/**
 * Shared admin page hero — semantic hooks on top of product-banner / command-hero.
 * Markup: admin/partials/components/status-banner.php (classes .bbai-page-hero, __icon, __content, __actions, modifiers).
 */

/* Optional eyebrow (Analytics / future pages) */
.bbai-command-hero-host .bbai-page-hero__eyebrow.bbai-banner__eyebrow,
#bbai-dashboard-main .bbai-page-hero__eyebrow.bbai-banner__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.bbai-page-hero__eyebrow[hidden] {
    display: none !important;
}

/* Neutral = first-run / empty library: calmer than success green, not warning amber */
.bbai-command-hero-host .bbai-page-hero--neutral.bbai-banner--success {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 52%, #ffffff 100%);
    border-color: #e2e8f0;
}

.bbai-command-hero-host .bbai-page-hero--neutral .bbai-page-hero__icon.bbai-banner__icon {
    color: #475569;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.9);
}

.bbai-command-hero-host .bbai-page-hero--info.bbai-banner--info {
    border-color: #dbeafe;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 38%),
        linear-gradient(140deg, #fdfeff 0%, #f4f8ff 55%, #ffffff 100%);
}

.bbai-command-hero-host .bbai-page-hero--info .bbai-page-hero__icon.bbai-banner__icon {
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(239, 246, 255, 0.95);
}

/* Title wrap: eyebrow + h1 stack */
.bbai-command-hero-host .bbai-page-hero__title-wrap .bbai-page-hero__eyebrow + .bbai-banner__headline {
    margin-top: 0;
}

/* Usage & Billing: shared page hero spacing above workspace grid */
.bbai-usage-page-hero-host {
    margin-bottom: var(--card-gap, 16px);
}

#bbai-usage-overview {
    scroll-margin-top: 1.5rem;
}

/* Source: assets/css/features/dashboard/admin-ui-components.css */
/**
 * Shared admin UI primitives (Analytics, Library, Usage, Dashboard).
 * Companion to admin/partials/components/*.php — keep page-specific CSS minimal.
 */

/* ── Page shell vertical rhythm ─────────────────────────────────────────── */
.bbai-ui-page-shell > * + * {
    margin-top: var(--section-spacing, 24px);
}

.bbai-ui-page-shell > .bbai-ui-metrics-grid + .bbai-analytics-post-metrics,
.bbai-ui-page-shell > .bbai-ui-metrics-grid + .bbai-ui-notice-stack {
    margin-top: var(--card-gap, 16px);
}

/* ── Workspace grid alignment ─────────────────────────────────────────── */
.bbai-ui-workspace-grid {
    align-items: start;
}

@media (max-width: 960px) {
    .bbai-ui-workspace-grid .bbai-main-content {
        min-width: 0;
    }
}

/* ── Section header (layout) ───────────────────────────────────────────── */
.bbai-ui-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
}

.bbai-ui-section-header__text {
    flex: 1 1 240px;
    min-width: 0;
}

/* Typography for eyebrow/title: assets/css/features/dashboard/bbai-section-header.css (.bbai-section-label, .bbai-section-title) */
.bbai-ui-section-header__eyebrow {
    margin: 0 0 6px;
}

.bbai-ui-section-header__title {
    margin: 0 0 8px;
}

.bbai-ui-section-header__description {
    margin: 0;
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.55;
    color: var(--bbai-admin-color-text-secondary, #64748b);
    max-width: 68ch;
}

.bbai-ui-section-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Sidebar card body unification (meta + copy share rhythm) ─────────── */
.bbai-ui-sidebar-card__body,
.bbai-ui-sidebar-card__text {
    margin: 0 0 14px;
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.55;
    color: var(--bbai-admin-color-text-secondary, #475569);
}

.bbai-ui-sidebar-card__title {
    margin: 0 0 10px;
}

.bbai-ui-sidebar-card__foot {
    margin-top: 4px;
}

/* ── Notice stack + strip ─────────────────────────────────────────────── */
.bbai-ui-notice-stack {
    display: grid;
    gap: 10px;
    max-width: 68ch;
    padding: 0 2px;
}

.bbai-ui-notice-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 14px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.bbai-ui-notice-strip__text {
    margin: 0;
    flex: 1 1 200px;
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.55;
    color: var(--bbai-admin-color-text-secondary, #475569);
}

/* Inline row: Library usage alert + compact actions */
.bbai-ui-notice-strip--layout-inline {
    display: block;
}

.bbai-ui-notice-strip__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    justify-content: space-between;
}

.bbai-ui-notice-strip--layout-inline .bbai-ui-notice-strip__text {
    flex: 1 1 220px;
}

.bbai-ui-notice-strip--layout-inline .bbai-ui-notice-strip__action {
    flex: 0 0 auto;
}

.bbai-ui-notice-strip--neutral {
    border-color: rgba(226, 232, 240, 0.95);
    background: #f8fafc;
}

.bbai-ui-notice-strip--info {
    border-color: rgba(147, 197, 253, 0.55);
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.bbai-ui-notice-strip--info .bbai-ui-notice-strip__text {
    color: #334155;
}

.bbai-ui-notice-strip--warning {
    border-color: rgba(253, 230, 138, 0.85);
    background: linear-gradient(135deg, #fffbeb 0%, #fffdf8 100%);
}

.bbai-ui-notice-strip--warning .bbai-ui-notice-strip__text {
    color: #78350f;
}

.bbai-ui-notice-strip--success {
    border-color: rgba(167, 243, 208, 0.85);
    background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
}

.bbai-ui-notice-strip--success .bbai-ui-notice-strip__text {
    color: #14532d;
}

.bbai-ui-notice-strip__action .bbai-btn-sm,
.bbai-ui-notice-strip__action .bbai-link-btn,
.bbai-ui-notice-strip__action .bbai-ui-btn {
    flex-shrink: 0;
}

.bbai-ui-notice-strip:focus-within {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

/* Align library usage alert with strip system (JS may reset className; base rules stay on .bbai-library-usage-alert in library CSS) */
.bbai-library-usage-alert.bbai-library-usage-alert--inline.bbai-library-usage-alert--unified {
    border-radius: 12px;
}

/* ── Button group ─────────────────────────────────────────────────────── */
.bbai-ui-button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-btn-group-gap, var(--bbai-space-2-5, 10px));
}

.bbai-ui-button-group--vertical,
.bbai-ui-button-group--stack {
    flex-direction: column;
    align-items: stretch;
}

.bbai-ui-button-group--stack .bbai-btn,
.bbai-ui-button-group--stack .bbai-dashboard-hero__cta,
.bbai-ui-button-group--stack .bbai-dashboard-hero__link {
    width: 100%;
    justify-content: center;
}

/* ── Simple progress block ─────────────────────────────────────────────── */
.bbai-ui-progress-block--simple .bbai-ui-progress-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.bbai-ui-progress-block--simple .bbai-ui-progress-block__title {
    margin: 0;
    font-size: var(--bbai-admin-type-body, 14px);
    font-weight: 600;
    color: var(--bbai-admin-color-text, #0f172a);
}

.bbai-ui-progress-block--simple .bbai-ui-progress-block__subtitle {
    margin: 0;
    font-size: var(--bbai-admin-type-meta, 13px);
    font-weight: 600;
    color: #64748b;
}

.bbai-ui-progress-block--simple .bbai-ui-progress-block__track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.bbai-ui-progress-block--simple .bbai-ui-progress-block__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.bbai-ui-progress-block__fill--neutral {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.bbai-ui-progress-block__fill--success {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.bbai-ui-progress-block__fill--warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.bbai-ui-progress-block__fill--info {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.bbai-ui-progress-block--simple .bbai-ui-progress-block__helper {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

/* Library multi-segment block: breathing room */
.bbai-ui-progress-block--library.bbai-lib-core-card__progress-block {
    margin-top: 4px;
}

/* ── State block ───────────────────────────────────────────────────────── */
.bbai-ui-state-block {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px 16px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.bbai-ui-state-block__icon {
    flex: 0 0 auto;
    line-height: 0;
}

.bbai-ui-state-block__body {
    flex: 1 1 200px;
    min-width: 0;
}

.bbai-ui-state-block__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.bbai-ui-state-block__description {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
}

.bbai-ui-state-block__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bbai-ui-state-block--warning {
    border-color: rgba(253, 230, 138, 0.85);
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.bbai-ui-state-block--success {
    border-color: rgba(167, 243, 208, 0.85);
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.bbai-ui-state-block--info {
    border-color: rgba(147, 197, 253, 0.55);
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* ── Stat group (composed stat-cards) ─────────────────────────────────── */
.bbai-ui-stat-group--compact:not(.bbai-ui-stat-group--band) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--card-gap, 16px);
}

.bbai-ui-stat-card--compact.bbai-dashboard-surface-card {
    padding: 16px 18px;
}

.bbai-ui-stat-group--compact .bbai-ui-stat-card--compact .bbai-ui-stat-card__value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #0f172a;
}

.bbai-ui-stat-group--compact .bbai-ui-stat-card--compact .bbai-ui-stat-card__label {
    font-size: 12px;
    font-weight: 600;
    color: #5b6472;
}

/* Shared banner action stack sizing lives in product-banner.css for Dashboard / Library / Analytics parity. */

/* Source: assets/css/features/dashboard/micro-motion.css */
/**
 * BeepBeep AI — final micro-motion & interaction polish (admin).
 * Restrained SaaS-grade transitions; pairs with unified/_tokens.css variables.
 *
 * @package BeepBeep_AI
 */

/* ── Shared status banner: subtle entry ─────────────────────────────────── */
@keyframes bbai-banner-enter-subtle {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bbai-command-hero-host .bbai-banner.bbai-dashboard-hero--command {
    animation: bbai-banner-enter-subtle var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)) both;
}

/* Content rhythm: headline block → support copy */
.bbai-command-hero-host .bbai-banner__headline.bbai-dashboard-hero__headline {
    margin-top: 0;
}

/* Vertical stack for shared status banner: see command-hero-host.css (.bbai-status-banner … 12 / 8 / 16). */
.bbai-command-hero-host .bbai-banner__subtext.bbai-dashboard-hero__subtext {
    margin-top: 0;
}

.bbai-command-hero-host .bbai-banner__meta.bbai-dashboard-hero__next-step:not([hidden]) {
    margin-top: 0;
}

.bbai-command-hero-host .bbai-banner__utility.bbai-dashboard-hero__usage-block {
    margin-top: 0;
}

/* Banner progress: smooth fill when width changes (inline / JS) */
.bbai-command-hero-host .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
#bbai-dashboard-main .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill {
    transition: width var(--bbai-motion-slow, 420ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
    transform-origin: left center;
}

/* Primary CTA: pressed = settle down, no rubber scale */
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary:active,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary:active,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary:active,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary:active {
    transform: translateY(1px) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

/* Secondary banner CTAs: subtle lift, still quieter than primary */
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary:hover,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary:hover,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition:
        background-color var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        color var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        transform var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary:active,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary:active,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary:active,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--tertiary,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--tertiary,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--tertiary,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--tertiary {
    transition:
        color var(--bbai-motion-fast, 140ms) ease,
        text-decoration-color var(--bbai-motion-fast, 140ms) ease,
        opacity var(--bbai-motion-fast, 140ms) ease;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--tertiary:hover,
.bbai-command-hero-host .bbai-banner .bbai-banner__link--tertiary:hover,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--tertiary:hover,
#bbai-dashboard-main .bbai-banner .bbai-banner__link--tertiary:hover {
    opacity: 0.92;
}

/* ── Dashboard command cards ───────────────────────────────────────────── */
#bbai-dashboard-main .bbai-command-card {
    transition:
        transform var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color var(--bbai-motion-base, 180ms) ease;
}

#bbai-dashboard-main .bbai-command-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

/* Pair cards + library list: same hover lift + shadow as .bbai-banner--success (not the heavy default card hover). */
#bbai-dashboard-main
    .bbai-dashboard-command__grid
    > .bbai-dashboard-card.bbai-command-card:not(.bbai-command-card--coverage-complete):hover {
    box-shadow: var(--bbai-command-hero-success-shadow-hover, 0 4px 14px rgba(15, 23, 42, 0.06));
}

/* Status breakdown rows: arrow + press */
#bbai-dashboard-main .bbai-command-breakdown__arrow {
    display: inline-block;
    opacity: 0.55;
    transform: translateX(0);
    transition:
        opacity var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        transform var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

#bbai-dashboard-main .bbai-command-breakdown:hover .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown:focus-visible .bbai-command-breakdown__arrow,
#bbai-dashboard-main .bbai-command-breakdown.is-active .bbai-command-breakdown__arrow {
    opacity: 1;
    transform: translateX(2px);
}

#bbai-dashboard-main .bbai-command-breakdown {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        transform var(--bbai-motion-micro, 90ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

#bbai-dashboard-main .bbai-command-breakdown.is-pressed {
    transform: translateY(1px);
}

/* Donut: smooth cross-fade when segment focus changes (JS sets background) */
#bbai-dashboard-main [data-bbai-status-donut] {
    transition: background var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

/* Refresh control */
#bbai-dashboard-main .bbai-command-card__refresh {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease,
        transform var(--bbai-motion-micro, 90ms) ease;
}

#bbai-dashboard-main .bbai-command-card__refresh:hover:not([disabled]) {
    background-color: rgba(148, 163, 184, 0.12);
}

#bbai-dashboard-main .bbai-command-card__refresh-icon svg {
    transition: transform var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

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

#bbai-dashboard-main .bbai-command-card__refresh.is-loading .bbai-command-card__refresh-icon svg {
    animation: bbai-refresh-spin 0.7s linear infinite;
}

/* Plan / usage meters */
#bbai-dashboard-main .bbai-command-meter__fill {
    transition: width var(--bbai-motion-slow, 420ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

#bbai-dashboard-main .bbai-command-meter__fill--growth {
    transition: width var(--bbai-motion-slow, 420ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

/* ── Global buttons (unified) ──────────────────────────────────────────── */
.bbai-btn-primary:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

.bbai-btn-secondary:active:not(:disabled),
.bbai-btn-ghost:active:not(:disabled) {
    transform: translateY(1px);
}

.bbai-btn {
    transition:
        transform var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease;
}

/* ── Modals (unified shell) ───────────────────────────────────────────── */
.bbai-modal-backdrop {
    transition:
        opacity var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        visibility var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.bbai-modal {
    transform: scale(0.985) translateY(8px);
    opacity: 0;
    transition:
        transform var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        opacity var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.bbai-modal-backdrop.active .bbai-modal,
.bbai-modal-backdrop.is-visible .bbai-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.bbai-modal-close {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        box-shadow var(--bbai-motion-fast, 140ms) ease;
    border: 1px solid transparent;
}

.bbai-modal-close:hover {
    border-color: var(--bbai-border, #e5e7eb);
}

/* ── ALT Library workspace ───────────────────────────────────────────── */
.bbai-library-workspace #bbai-review-filter-tabs .bbai-filter-group__item {
    transition:
        background-color var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color var(--bbai-motion-fast, 140ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        color var(--bbai-motion-fast, 140ms) ease,
        box-shadow var(--bbai-motion-fast, 140ms) ease;
}

.bbai-library-workspace #bbai-review-filter-tabs .bbai-filter-group__item:active {
    transform: scale(0.98);
}

.bbai-library-workspace .bbai-library-row,
.bbai-library-workspace .bbai-library-review-card {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        box-shadow var(--bbai-motion-fast, 140ms) ease;
}

.bbai-library-workspace .bbai-library-card__quick-action {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease,
        filter var(--bbai-motion-micro, 90ms) ease,
        box-shadow var(--bbai-motion-fast, 140ms) ease;
}

.bbai-library-workspace .bbai-library-card__quick-action:active {
    filter: brightness(0.97);
}

.bbai-library-workspace .bbai-library-score-badge {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease;
}

.bbai-library-workspace .bbai-library-card__extra-actions .bbai-library-card__quick-action {
    transition:
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        box-shadow var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease,
        filter var(--bbai-motion-micro, 90ms) ease;
}

/* ── Primary CTA: hover lift + shadow ────────────────────────────────── */
.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary,
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary,
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary,
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary {
    will-change: transform;
}

.bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary:hover:not(:disabled):not(.is-loading),
.bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary:hover:not(:disabled):not(.is-loading),
#bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary:hover:not(:disabled):not(.is-loading) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

/* ── CTA loading state ───────────────────────────────────────────────── */
.bbai-btn.is-loading,
.bbai-dashboard-hero__cta.is-loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.bbai-btn.is-loading::after,
.bbai-dashboard-hero__cta.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bbai-spin 0.6s linear infinite;
}

.bbai-btn.is-loading[data-loading-text]::before {
    content: attr(data-loading-text);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: inherit;
    font-weight: inherit;
    padding-left: 24px;
}

.bbai-btn.is-loading[data-loading-text]::after {
    left: calc(50% - 40px);
}

/* ── Donut chart: stroke + completion ────────────────────────────────── */
.bbai-circular-progress-bar {
    transition: stroke-dashoffset 800ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.bbai-circular-progress-percent {
    transition: color var(--bbai-motion-base, 180ms) ease;
}

@keyframes bbai-donut-complete {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.bbai-circular-progress.is-complete .bbai-circular-progress-bar {
    animation: bbai-donut-complete 400ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) 1;
}

/* ── Progress block fill ─────────────────────────────────────────────── */
.bbai-ui-progress-block__fill {
    transition: width var(--bbai-motion-slow, 420ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1));
}

/* ── Success sequence ────────────────────────────────────────────────── */
@keyframes bbai-success-enter {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.bbai-success-inline {
    animation: bbai-success-enter 320ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) both;
}

.bbai-success-inline__icon {
    display: inline-flex;
    align-items: center;
    opacity: 0;
    animation: bbai-fade-in 240ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) 120ms both;
}

.bbai-success-inline__text {
    color: #059669;
    font-weight: 600;
}

@keyframes bbai-value-highlight {
    0% { color: inherit; }
    30% { color: #059669; }
    100% { color: inherit; }
}

.bbai-metric-value.is-updated {
    animation: bbai-value-highlight 1.2s var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) 1;
}

/* ── Before / After card hover polish ────────────────────────────────── */
.bbai-before-after-card {
    transition:
        transform var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        background-color var(--bbai-motion-fast, 140ms) ease,
        box-shadow var(--bbai-motion-fast, 140ms) ease;
}

.bbai-before-after-card--after:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border-color: rgba(22, 163, 74, 0.34);
}

.bbai-before-after-showcase[data-bbai-entered] .bbai-before-after-card--after {
    animation: bbai-success-enter 240ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) 100ms both;
}

/* ── Card state transitions ──────────────────────────────────────────── */
.bbai-dashboard-card,
.bbai-ui-section-card {
    transition:
        opacity var(--bbai-motion-base, 180ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)),
        transform var(--bbai-motion-base, 180ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.bbai-dashboard-card.is-transitioning,
.bbai-ui-section-card.is-transitioning {
    opacity: 0;
    transform: translateY(4px);
}

/* ── Upgrade interactions ────────────────────────────────────────────── */
.bbai-upsell-cta,
.bbai-pro-upsell-card {
    transition:
        transform var(--bbai-motion-fast, 140ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow var(--bbai-motion-fast, 140ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color var(--bbai-motion-fast, 140ms) ease;
}

.bbai-upsell-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.bbai-pro-upsell-card:hover .bbai-command-meter__fill--growth {
    opacity: 1;
    filter: brightness(1.08);
}

/* ── Inline process message ──────────────────────────────────────────── */
.bbai-process-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    animation: bbai-success-enter 160ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) both;
}

.bbai-process-msg__text {
    transition: opacity 80ms ease;
}

.bbai-process-msg--exiting {
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.bbai-process-msg--success {
    color: #059669;
}

/* ── Credits warning ─────────────────────────────────────────────────── */
.bbai-credits-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
    animation: bbai-success-enter 240ms var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) both;
}

.bbai-credits-warning__icon {
    flex-shrink: 0;
    font-size: 14px;
}

/* ── Status-row pill count transitions ────────────────────────────────── */
@keyframes bbai-count-leave {
    0%   { opacity: 1; }
    40%  { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes bbai-count-enter {
    0%   { opacity: 1; background-color: transparent; }
    30%  { background-color: rgba(5, 150, 105, 0.08); }
    100% { opacity: 1; background-color: transparent; }
}

[data-bbai-dashboard-status-pill].is-count-leaving {
    animation: bbai-count-leave 220ms var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)) 1;
}

[data-bbai-dashboard-status-pill].is-count-entering {
    animation: bbai-count-enter 240ms var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)) 1;
}

/* Donut gradient: smooth transition during live updates */
[data-bbai-status-donut] {
    transition: background var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1));
}

/* ── Card success glow ───────────────────────────────────────────────── */
@keyframes bbai-card-glow {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
    40% { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.10); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.is-success-glow {
    animation: bbai-card-glow 1.2s var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) 1 !important;
}

/* ── Upgrade CTA pulse ───────────────────────────────────────────────── */
@keyframes bbai-upgrade-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 141, 252, 0); }
    50% { box-shadow: 0 0 0 4px rgba(79, 141, 252, 0.15); }
}

.is-pulsing {
    animation: bbai-upgrade-pulse 2s var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) 1;
}

/* ── CTA morph crossfade ─────────────────────────────────────────────── */
.bbai-btn,
.bbai-dashboard-hero__cta {
    transition:
        transform var(--bbai-motion-fast, 140ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow var(--bbai-motion-fast, 140ms) var(--bbai-ease-standard, cubic-bezier(0.2, 0.8, 0.2, 1)),
        background-color var(--bbai-motion-fast, 140ms) ease,
        border-color var(--bbai-motion-fast, 140ms) ease,
        color var(--bbai-motion-fast, 140ms) ease,
        opacity 120ms ease;
}

/* ── Skeleton / loading placeholders ─────────────────────────────────── */
@keyframes bbai-skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.bbai-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bbai-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .bbai-command-hero-host .bbai-banner.bbai-dashboard-hero--command {
        animation: none;
    }

    #bbai-dashboard-main .bbai-command-card:hover {
        transform: none;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-workspace-card:hover {
        transform: none;
    }

    .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta--primary:hover,
    .bbai-command-hero-host .bbai-banner .bbai-banner__cta--primary:hover,
    #bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__cta--primary:hover,
    #bbai-dashboard-main .bbai-banner .bbai-banner__cta--primary:hover,
    .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary:hover,
    .bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary:hover,
    #bbai-dashboard-main .bbai-banner .bbai-dashboard-hero__link--secondary:hover,
    #bbai-dashboard-main .bbai-banner .bbai-banner__link--secondary:hover {
        transform: none;
    }

    #bbai-dashboard-main .bbai-command-breakdown:hover .bbai-command-breakdown__arrow,
    #bbai-dashboard-main .bbai-command-breakdown:focus-visible .bbai-command-breakdown__arrow,
    #bbai-dashboard-main .bbai-command-breakdown.is-active .bbai-command-breakdown__arrow {
        transform: none;
    }

    #bbai-dashboard-main [data-bbai-status-donut],
    #bbai-dashboard-main .bbai-command-meter__fill,
    #bbai-dashboard-main .bbai-command-meter__fill--growth,
    .bbai-command-hero-host .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill,
    #bbai-dashboard-main .bbai-banner__progress-fill.bbai-dashboard-hero-progress-fill {
        transition: none;
    }

    #bbai-dashboard-main .bbai-command-card__refresh.is-loading .bbai-command-card__refresh-icon svg {
        animation: none;
    }

    .bbai-modal,
    .bbai-modal-backdrop {
        transition: opacity 0.01ms !important;
    }

    .bbai-btn-primary:hover:not(:disabled),
    .bbai-btn-primary:active:not(:disabled) {
        transform: none;
    }

    .bbai-library-workspace #bbai-review-filter-tabs .bbai-filter-group__item:active,
    .bbai-library-workspace .bbai-library-card__quick-action:active {
        transform: none;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__close:hover {
        transform: none;
    }

    #bbai-upgrade-modal .bbai-upgrade-modal__content {
        transition: opacity 0.01ms !important;
    }

    /* Flow-aware motion additions */
    .bbai-process-msg {
        animation: none;
    }

    .bbai-credits-warning {
        animation: none;
    }

    .is-success-glow {
        animation: none !important;
    }

    .is-pulsing {
        animation: none;
    }

    .bbai-upsell-cta:hover {
        transform: none;
    }

    .bbai-circular-progress-bar {
        transition: none;
    }

    .bbai-circular-progress.is-complete .bbai-circular-progress-bar {
        animation: none;
    }

    .bbai-success-inline,
    .bbai-success-inline__icon {
        animation: none;
        opacity: 1;
    }

    .bbai-metric-value.is-updated {
        animation: none;
    }

    .bbai-before-after-showcase[data-bbai-entered] .bbai-before-after-card--after {
        animation: none;
    }

    [data-bbai-dashboard-status-pill].is-count-leaving,
    [data-bbai-dashboard-status-pill].is-count-entering {
        animation: none;
    }

    .bbai-dashboard-card.is-transitioning,
    .bbai-ui-section-card.is-transitioning {
        opacity: 1;
        transform: none;
    }

    .bbai-ui-progress-block__fill {
        transition: none;
    }

    .bbai-skeleton {
        animation: none;
    }
}

/* Source: assets/css/system/bbai-card-rhythm.css */
/**
 * Card vertical rhythm — typography + spacing via shared --bbai-rhythm-* / --bbai-space-* tokens.
 * Scoped to body.bbai-dashboard so marketing/guide surfaces stay unchanged.
 *
 * @package BeepBeep_AI
 */

:root {
    --bbai-card-label-size: var(--bbai-admin-type-label, 12px);
    --bbai-card-label-weight: var(--bbai-admin-type-weight-semibold, 600);
    --bbai-card-label-leading: 1.3;
    --bbai-card-label-tracking: 0.08em;
    --bbai-card-label-margin-bottom: var(--bbai-rhythm-label-to-title, var(--bbai-space-2));
    --bbai-card-label-color: var(--bbai-admin-color-text-muted, #7b8aa0);

    --bbai-card-title-size: var(--bbai-admin-type-card-title, 20px);
    --bbai-card-title-weight: var(--bbai-admin-type-weight-semibold, 600);
    --bbai-card-title-leading: 1.2;
    --bbai-card-title-margin-bottom: var(--bbai-rhythm-title-to-description, var(--bbai-space-2));
    --bbai-card-title-tracking: -0.02em;
    --bbai-card-title-color: var(--bbai-admin-color-text, #0f172a);

    --bbai-card-description-size: var(--bbai-admin-type-body, 14px);
    --bbai-card-description-weight: var(--bbai-admin-type-weight-regular, 400);
    --bbai-card-description-leading: 1.5;
    --bbai-card-description-margin-bottom: var(--bbai-rhythm-description-to-content, var(--bbai-space-4));
    --bbai-card-description-max-width: 35rem;
    --bbai-card-description-color: var(--bbai-admin-color-text-secondary, #475569);

    --bbai-card-section-gap: var(--bbai-rhythm-section-gap, var(--bbai-space-4));
    --bbai-card-chips-margin-top: var(--bbai-space-3);

    --bbai-card-padding-x: var(--bbai-rhythm-card-padding-inline, var(--bbai-space-6));
    --bbai-card-padding-y-header: var(--bbai-rhythm-card-header-padding-y, var(--bbai-space-4));
    --bbai-card-padding-y-body: var(--bbai-rhythm-card-body-padding-y, var(--bbai-space-4));

    --bbai-card-meta-size: var(--bbai-admin-type-meta, 13px);
    --bbai-card-meta-weight: var(--bbai-admin-type-weight-medium, 500);
    --bbai-card-meta-leading: 1.35;
    --bbai-card-meta-color: var(--bbai-admin-color-text-muted, #64748b);

    --bbai-command-card-padding: var(--bbai-rhythm-card-padding, var(--bbai-space-6));
}

body.bbai-dashboard #bbai-dashboard-main {
    --bbai-command-card-padding: var(--bbai-rhythm-card-padding, var(--bbai-space-6));
}

/* ── Explicit rhythm classes (scoped so guide / marketing .bbai-card-title is untouched) ─ */

body.bbai-dashboard .bbai-ui-section-header__text > .bbai-card-label,
body.bbai-dashboard .bbai-command-card__header .bbai-card-label,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-card-label,
body.bbai-dashboard .bbai-analytics-trend-block__head .bbai-card-label {
    margin: 0 0 var(--bbai-card-label-margin-bottom);
    font-size: var(--bbai-card-label-size);
    font-weight: var(--bbai-card-label-weight);
    line-height: var(--bbai-card-label-leading);
    letter-spacing: var(--bbai-card-label-tracking);
    text-transform: uppercase;
    color: var(--bbai-card-label-color);
}

body.bbai-dashboard .bbai-ui-section-header__text > .bbai-card-title,
body.bbai-dashboard .bbai-command-card__header .bbai-card-title,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-card-title,
body.bbai-dashboard .bbai-analytics-trend-block__head .bbai-card-title,
body.bbai-dashboard .bbai-settings-plan-summary-card > .bbai-settings-card-title.bbai-card-title {
    margin: 0 0 var(--bbai-card-title-margin-bottom);
    font-size: var(--bbai-card-title-size);
    font-weight: var(--bbai-card-title-weight);
    line-height: var(--bbai-card-title-leading);
    letter-spacing: var(--bbai-card-title-tracking);
    color: var(--bbai-card-title-color);
}

body.bbai-dashboard .bbai-ui-section-header__text > .bbai-card-description,
body.bbai-dashboard .bbai-usage-activity-section__header .bbai-card-description,
body.bbai-dashboard .bbai-usage-insights-card__header .bbai-card-description {
    margin: 0 0 var(--bbai-card-description-margin-bottom);
    max-width: var(--bbai-card-description-max-width);
    font-size: var(--bbai-card-description-size);
    font-weight: var(--bbai-card-description-weight);
    line-height: var(--bbai-card-description-leading);
    color: var(--bbai-card-description-color);
}

body.bbai-dashboard .bbai-ui-section-header__text > .bbai-card-description:last-child,
body.bbai-dashboard .bbai-usage-activity-section__header .bbai-card-description:last-child,
body.bbai-dashboard .bbai-usage-insights-card__header .bbai-card-description:last-child {
    margin-bottom: 0;
}

body.bbai-dashboard .bbai-card-section {
    margin-top: var(--bbai-card-section-gap);
}

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

body.bbai-dashboard .bbai-command-card__meta-group .bbai-card-meta,
body.bbai-dashboard .bbai-section-header--split-end .bbai-card-meta {
    margin: 0;
    font-size: var(--bbai-card-meta-size);
    font-weight: var(--bbai-card-meta-weight);
    line-height: var(--bbai-card-meta-leading);
    color: var(--bbai-card-meta-color);
    font-variant-numeric: tabular-nums;
}

body.bbai-dashboard .bbai-card-body-stack {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-rhythm-action-stack-gap, var(--bbai-space-2));
}

body.bbai-dashboard .bbai-card-body-stack > p {
    margin: 0;
    max-width: var(--bbai-card-description-max-width);
    font-size: var(--bbai-card-description-size);
    line-height: var(--bbai-card-description-leading);
    color: var(--bbai-card-description-color);
}

body.bbai-dashboard .bbai-card-chip-row,
body.bbai-dashboard ul.bbai-card-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bbai-rhythm-chip-gap, var(--bbai-space-2));
    margin: var(--bbai-card-chips-margin-top) 0 0;
    padding: 0;
    list-style: none;
}

/* ── Alias: legacy section classes inside product card headers ─────────── */

body.bbai-dashboard .bbai-section-header .bbai-section-label,
body.bbai-dashboard .bbai-ui-section-header__text > .bbai-section-label,
body.bbai-dashboard .bbai-command-card__header .bbai-section-label,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-section-label {
    margin: 0 0 var(--bbai-card-label-margin-bottom);
    font-size: var(--bbai-card-label-size);
    font-weight: var(--bbai-card-label-weight);
    line-height: var(--bbai-card-label-leading);
    letter-spacing: var(--bbai-card-label-tracking);
    text-transform: uppercase;
    color: var(--bbai-card-label-color);
}

body.bbai-dashboard .bbai-section-header .bbai-section-title,
body.bbai-dashboard .bbai-ui-section-header__text > .bbai-section-title,
body.bbai-dashboard .bbai-command-card__header .bbai-section-title,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-section-title {
    margin: 0 0 var(--bbai-card-title-margin-bottom);
    font-size: var(--bbai-card-title-size);
    font-weight: var(--bbai-card-title-weight);
    line-height: var(--bbai-card-title-leading);
    letter-spacing: var(--bbai-card-title-tracking);
    color: var(--bbai-card-title-color);
}

body.bbai-dashboard .bbai-section-header .bbai-section-title:last-child {
    margin-bottom: 0;
}

body.bbai-dashboard .bbai-analytics-trend-block__head .bbai-section-title:last-child {
    margin-bottom: 0;
}

body.bbai-dashboard #bbai-dashboard-main .bbai-command-card__header h2.bbai-section-title {
    margin: 0 0 var(--bbai-card-title-margin-bottom);
}

body.bbai-dashboard #bbai-dashboard-main .bbai-command-card__header h2.bbai-section-title:last-child {
    margin-bottom: 0;
}

body.bbai-dashboard .bbai-section-header .bbai-section-description,
body.bbai-dashboard .bbai-ui-section-header__text > .bbai-section-description {
    margin: 0 0 var(--bbai-card-description-margin-bottom);
    max-width: var(--bbai-card-description-max-width);
    font-size: var(--bbai-card-description-size);
    font-weight: var(--bbai-card-description-weight);
    line-height: var(--bbai-card-description-leading);
    color: var(--bbai-card-description-color);
}

body.bbai-dashboard .bbai-section-header .bbai-section-description:last-child {
    margin-bottom: 0;
}

body.bbai-dashboard .bbai-section-header--split-end .bbai-section-meta,
body.bbai-dashboard .bbai-section-header--split-end .bbai-command-card__meta.bbai-card-meta {
    font-size: var(--bbai-card-meta-size);
    font-weight: var(--bbai-card-meta-weight);
    line-height: var(--bbai-card-meta-leading);
    color: var(--bbai-card-meta-color);
}

/* Source: assets/css/features/dashboard/bbai-section-header.css */
/**
 * Shared section header typography + vertical rhythm.
 * Tokens default from bbai-card-rhythm.css when enqueued first; literals are fallbacks.
 *
 * Load order: after bbai-card-rhythm, admin-ui-components, status-card-refresh, analytics-page.
 */

:root {
    --bbai-section-label-size: var(--bbai-admin-type-label, var(--bbai-card-label-size, 12px));
    --bbai-section-label-weight: var(--bbai-admin-type-weight-semibold, var(--bbai-card-label-weight, 600));
    --bbai-section-label-leading: var(--bbai-card-label-leading, 1.3);
    --bbai-section-label-tracking: var(--bbai-card-label-tracking, 0.08em);
    --bbai-section-label-color: var(--bbai-admin-color-text-muted, var(--bbai-card-label-color, #7b8aa0));

    --bbai-section-title-size: var(--bbai-admin-type-section-title, 24px);
    --bbai-section-title-weight: var(--bbai-admin-type-weight-semibold, 600);
    --bbai-section-title-leading: 1.15;
    --bbai-section-title-tracking: var(--bbai-tracking-tight, -0.02em);
    --bbai-section-title-color: var(--bbai-admin-color-text, #0f172a);

    --bbai-section-meta-size: var(--bbai-admin-type-meta, var(--bbai-card-meta-size, 13px));
    --bbai-section-meta-weight: var(--bbai-admin-type-weight-medium, var(--bbai-card-meta-weight, 500));
    --bbai-section-meta-leading: 1.45;
    --bbai-section-meta-color: var(--bbai-admin-color-text-muted, var(--bbai-card-meta-color, #64748b));

    --bbai-section-label-title-gap: 0px;
    --bbai-section-title-content-gap: var(--bbai-rhythm-title-to-description, var(--bbai-space-2));
    --bbai-section-header-gap: var(--bbai-rhythm-section-header-split-gap, var(--bbai-space-4));
    --bbai-section-header-pad-y: var(--bbai-rhythm-section-header-pad-y, var(--bbai-space-2));
    --bbai-section-header-pad-b: var(--bbai-rhythm-section-header-pad-b, var(--bbai-space-1));
    --bbai-section-header-pad-x: var(--bbai-rhythm-section-header-inline-pad, var(--bbai-space-6));
}

/* ── Core type ─────────────────────────────────────────────────────────── */

.bbai-section-label,
#bbai-dashboard-main .bbai-command-card__eyebrow,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-command-card__eyebrow,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-ui-section-header__eyebrow,
.bbai-ui-section-header__eyebrow {
    font-size: var(--bbai-section-label-size);
    font-weight: var(--bbai-section-label-weight);
    line-height: var(--bbai-section-label-leading);
    letter-spacing: var(--bbai-section-label-tracking);
    text-transform: uppercase;
    color: var(--bbai-section-label-color);
}

.bbai-section-label {
    margin: 0;
}

#bbai-dashboard-main .bbai-command-card__eyebrow,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-command-card__eyebrow,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-ui-section-header__eyebrow {
    margin: 0 0 var(--bbai-card-label-margin-bottom, 8px);
}

.bbai-ui-section-header__eyebrow {
    margin: 0 0 var(--bbai-card-label-margin-bottom, 8px);
}

.bbai-section-title,
#bbai-dashboard-main .bbai-command-card__title,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-command-card__title,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-ui-section-header__title,
.bbai-ui-section-header__title {
    font-size: var(--bbai-section-title-size);
    font-weight: var(--bbai-section-title-weight);
    line-height: var(--bbai-section-title-leading);
    letter-spacing: var(--bbai-section-title-tracking);
    color: var(--bbai-section-title-color);
}

#bbai-dashboard-main .bbai-command-card__title,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-command-card__title,
body.bbai-dashboard .bbai-library-workspace-card__head .bbai-ui-section-header__title {
    margin: 0;
}

.bbai-ui-section-header__title {
    margin: 0 0 var(--bbai-card-title-margin-bottom, var(--bbai-space-2));
}

.bbai-section-title {
    margin: 0;
}

/*
 * WordPress admin: #wpbody-content h2 out-specifies component classes — match Dashboard card title scale.
 */
body.bbai-dashboard #wpbody-content .bbai-library-workspace-card__head h2.bbai-command-card__title,
body.bbai-dashboard #wpbody-content .bbai-library-workspace-card__head h2.bbai-ui-section-header__title,
body.bbai-dashboard #wpbody-content .bbai-library-workspace-card__head h2.bbai-section-title {
    font-size: var(--bbai-section-title-size) !important;
    font-weight: var(--bbai-section-title-weight) !important;
    line-height: var(--bbai-section-title-leading) !important;
    letter-spacing: var(--bbai-section-title-tracking);
    color: var(--bbai-section-title-color);
    margin: 0 0 var(--bbai-card-title-margin-bottom, var(--bbai-space-2)) !important;
}

body.bbai-dashboard #wpbody-content .bbai-library-workspace-card__head h2.bbai-section-title:last-child {
    margin-bottom: 0 !important;
}

.bbai-section-meta {
    margin: 0;
    font-size: var(--bbai-section-meta-size);
    font-weight: var(--bbai-section-meta-weight);
    line-height: var(--bbai-section-meta-leading);
    color: var(--bbai-section-meta-color);
    font-variant-numeric: tabular-nums;
}

/* ── Layout: label stack + optional right meta (workspace / cards) ─────── */

.bbai-section-header__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--bbai-section-label-title-gap);
    min-width: 0;
}

.bbai-section-header--split-end {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--bbai-section-header-gap);
    padding: var(--bbai-section-header-pad-y) var(--bbai-section-header-pad-x) var(--bbai-section-header-pad-b);
    box-sizing: border-box;
}

.bbai-section-header--split-end .bbai-section-meta,
.bbai-section-header--split-end .bbai-command-card__meta {
    flex: 0 0 auto;
    max-width: min(42ch, 46vw);
    text-align: right;
    white-space: nowrap;
}

/*
 * ALT Library workspace card — match Dashboard command-card header rhythm:
 * horizontal inset 24px, label→title 6px (eyebrow margin), title→filters 16px (toolbar padding-top).
 */
body.bbai-dashboard .bbai-library-workspace-card__head.bbai-section-header--split-end {
    --bbai-section-header-pad-y: 0px;
    --bbai-section-header-pad-b: 0px;
    --bbai-section-header-pad-x: var(--bbai-rhythm-section-header-inline-pad, var(--bbai-space-6));
    --bbai-section-header-gap: var(--bbai-rhythm-section-header-split-gap, var(--bbai-space-4));
    /* First row aligns with command cards: content starts after card “gutter” */
    padding-top: var(--bbai-command-card-padding, var(--bbai-rhythm-card-padding, var(--bbai-space-6)));
}

@media (max-width: 782px) {
    .bbai-section-header--split-end {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .bbai-section-header--split-end .bbai-section-meta,
    .bbai-section-header--split-end .bbai-command-card__meta {
        max-width: none;
        text-align: left;
        white-space: normal;
    }

    body.bbai-dashboard .bbai-library-workspace-card__head.bbai-section-header--split-end {
        padding-top: var(--bbai-space-5);
    }
}

/* Source: assets/css/features/dashboard/dashboard-header.css */
/**
 * Dashboard Page Header
 *
 * Premium SaaS-style greeting row above the main dashboard cards.
 * Layout: heading + subtitle on the left, status pill on the right.
 * Collapses to a vertical stack on tablet/mobile.
 *
 * Design tokens fall back to literal values so this file works even if the
 * unified token sheet hasn't loaded yet (same contract as logged-in-state.css).
 *
 * @package BeepBeep_AI
 * @since   5.3.0
 */

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

.bbai-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding-bottom: 28px;
    /* No background, no border — plain dashboard surface */
}

/* ─────────────────────────────────────────────────────────────────────────────
   LEFT — heading + subtitle
───────────────────────────────────────────────────────────────────────────── */

.bbai-dashboard-header__left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bbai-dashboard-header__heading {
    margin: 0;
    padding: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #0f172a;
    border: none;
    box-shadow: none;
    background: none;
    white-space: nowrap;
}

.bbai-dashboard-header__subtitle {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #64748b;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RIGHT — status pill
───────────────────────────────────────────────────────────────────────────── */

.bbai-dashboard-header__right {
    flex-shrink: 0;
}

.bbai-dashboard-header__status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding-inline: 16px;
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.30);
    background: rgba(240, 253, 244, 1);
    box-shadow: none;
    white-space: nowrap;
}

.bbai-dashboard-header__status-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #15803d;
}

/* Green status dot — soft glow, not neon */
.bbai-dashboard-header__status-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.14),
        0 0 6px rgba(34, 197, 94, 0.20);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────────────────────── */

/* Mobile — stack vertically, allow wrap */
@media (max-width: 767px) {
    .bbai-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 16px;
    }

    .bbai-dashboard-header__heading {
        font-size: 22px;
        white-space: normal;
    }

    .bbai-dashboard-header__subtitle {
        font-size: 13px;
    }

    .bbai-dashboard-header__right {
        width: 100%;
    }

    .bbai-dashboard-header__status-pill {
        width: auto;
    }
}

/* Source: assets/css/system/bbai-admin-controls.css */
/**
 * BeepBeep AI — Phase 2 shared controls (buttons, links, fields, icon buttons)
 *
 * Scoped to body.bbai-dashboard. Source of truth: bbai-admin-foundation-tokens.css + unified :root.
 * Aliases: .bbai-btn--* (BEM) ↔ .bbai-btn-* (legacy) ↔ .bbai-ds-* (design-system primitives).
 */

/* -------------------------------------------------------------------------- */
/* Shared focus-visible (controls + links)                                    */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn:focus,
body.bbai-dashboard .bbai-ds-btn:focus,
body.bbai-dashboard .bbai-btn--icon:focus,
body.bbai-dashboard .bbai-ds-icon-btn:focus,
body.bbai-dashboard .bbai-toolbar__icon-btn:focus,
body.bbai-dashboard .bbai-link:focus,
body.bbai-dashboard .bbai-ds-link:focus,
body.bbai-dashboard .bbai-link-btn:focus,
body.bbai-dashboard .bbai-input:focus,
body.bbai-dashboard .bbai-textarea:focus,
body.bbai-dashboard .bbai-select:focus,
body.bbai-dashboard .bbai-ds-input:focus,
body.bbai-dashboard .bbai-ds-textarea:focus,
body.bbai-dashboard .bbai-ds-select:focus {
    outline: none;
}

body.bbai-dashboard .bbai-btn:focus-visible,
body.bbai-dashboard .bbai-ds-btn:focus-visible,
body.bbai-dashboard .bbai-btn--icon:focus-visible,
body.bbai-dashboard .bbai-ds-icon-btn:focus-visible,
body.bbai-dashboard .bbai-toolbar__icon-btn:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
}

body.bbai-dashboard .bbai-link:focus-visible,
body.bbai-dashboard .bbai-ds-link:focus-visible,
body.bbai-dashboard .bbai-link--action:focus-visible,
body.bbai-dashboard .bbai-link-btn:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
    border-radius: var(--bbai-admin-radius-xs);
}

body.bbai-dashboard .bbai-input:focus-visible,
body.bbai-dashboard .bbai-textarea:focus-visible,
body.bbai-dashboard .bbai-select:focus-visible,
body.bbai-dashboard .bbai-ds-input:focus-visible,
body.bbai-dashboard .bbai-ds-textarea:focus-visible,
body.bbai-dashboard .bbai-ds-select:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
}

/* -------------------------------------------------------------------------- */
/* Buttons — base (medium ≈ 36px, token radii)                                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn,
body.bbai-dashboard .bbai-ds-btn {
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-admin-space-2);
    min-height: var(--bbai-admin-size-btn-md);
    padding: var(--bbai-btn-padding-y) var(--bbai-btn-padding-x);
    margin: 0;
    border-radius: var(--bbai-admin-btn-radius);
    border: var(--bbai-admin-border-width-hairline) solid transparent;
    font-family: var(--bbai-admin-font-sans);
    font-size: var(--bbai-admin-type-body);
    font-weight: var(--bbai-admin-type-weight-semibold);
    line-height: var(--bbai-admin-type-leading-tight);
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: var(--bbai-admin-ix-transition-interactive),
        box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
    box-shadow: var(--bbai-admin-shadow-control);
    background-color: var(--bbai-admin-color-bg-muted);
    color: var(--bbai-admin-color-text);
}

body.bbai-dashboard .bbai-btn:hover:not(:disabled):not(.is-disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-btn:hover:not(:disabled):not([aria-disabled='true']) {
    background-color: var(--bbai-admin-color-bg-subtle);
}

body.bbai-dashboard .bbai-btn:active:not(:disabled):not(.is-disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-btn:active:not(:disabled):not([aria-disabled='true']) {
    transform: none;
    filter: var(--bbai-admin-ix-filter-press);
}

body.bbai-dashboard .bbai-btn:disabled,
body.bbai-dashboard .bbai-btn.is-disabled,
body.bbai-dashboard .bbai-ds-btn:disabled,
body.bbai-dashboard .bbai-ds-btn[aria-disabled='true'] {
    background: var(--bbai-gray-200) !important;
    color: var(--bbai-gray-600) !important;
    border-color: var(--bbai-gray-300) !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
    opacity: var(--bbai-admin-interaction-disabled-opacity);
}

body.bbai-dashboard .bbai-btn[aria-busy='true'],
body.bbai-dashboard .bbai-btn.is-loading,
body.bbai-dashboard .bbai-ds-btn[aria-busy='true'],
body.bbai-dashboard .bbai-ds-btn.is-loading {
    pointer-events: none;
    opacity: var(--bbai-admin-ix-loading-opacity);
    cursor: progress;
}

/* Primary */
body.bbai-dashboard .bbai-btn.bbai-btn-primary,
body.bbai-dashboard .bbai-btn--primary,
body.bbai-dashboard .bbai-ds-btn--primary,
body.bbai-dashboard .bbai-ui-btn--primary {
    min-height: var(--bbai-admin-size-btn-lg);
    border-color: var(--bbai-admin-btn-primary-border) !important;
    background: var(--bbai-admin-btn-primary-bg) !important;
    color: var(--bbai-admin-color-primary-on-brand) !important;
    box-shadow: var(--bbai-admin-btn-primary-shadow);
    font-weight: var(--bbai-admin-type-weight-semibold);
}

body.bbai-dashboard .bbai-btn.bbai-btn-primary:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn--primary:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-ds-btn--primary:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ui-btn--primary:hover:not(:disabled):not([aria-disabled='true']) {
    border-color: var(--bbai-admin-color-primary-hover) !important;
    filter: brightness(0.97);
    box-shadow: var(--bbai-admin-btn-primary-shadow-hover);
    transform: var(--bbai-admin-btn-primary-lift);
}

body.bbai-dashboard .bbai-btn.bbai-btn-primary:active:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn--primary:active:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-ds-btn--primary:active:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ui-btn--primary:active:not(:disabled):not([aria-disabled='true']) {
    border-color: var(--bbai-admin-color-primary-active) !important;
    transform: none;
    filter: var(--bbai-admin-ix-filter-press-primary);
    box-shadow: var(--bbai-admin-shadow-control);
}

/* Secondary / outline calm */
body.bbai-dashboard .bbai-btn.bbai-btn-secondary,
body.bbai-dashboard .bbai-btn--secondary,
body.bbai-dashboard .bbai-ds-btn--secondary,
body.bbai-dashboard .bbai-ui-btn--secondary {
    background: var(--bbai-admin-btn-secondary-bg) !important;
    color: var(--bbai-admin-btn-secondary-text) !important;
    border: 1px solid var(--bbai-admin-btn-secondary-border) !important;
    box-shadow: none !important;
    font-weight: var(--bbai-admin-type-weight-medium);
}

body.bbai-dashboard .bbai-btn.bbai-btn-secondary:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn--secondary:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-ds-btn--secondary:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ui-btn--secondary:hover:not(:disabled):not([aria-disabled='true']) {
    background: var(--bbai-admin-btn-secondary-bg-hover) !important;
    border-color: var(--bbai-admin-btn-secondary-border-hover) !important;
    color: var(--bbai-admin-btn-secondary-text-hover) !important;
    transform: none;
}

/* Ghost / tertiary */
body.bbai-dashboard .bbai-btn-tertiary,
body.bbai-dashboard .bbai-btn-ghost,
body.bbai-dashboard .bbai-btn--ghost,
body.bbai-dashboard .bbai-ds-btn--ghost,
body.bbai-dashboard .bbai-ds-btn--tertiary,
body.bbai-dashboard .bbai-ui-btn--tertiary {
    background: transparent !important;
    color: var(--bbai-admin-btn-tertiary-text) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    min-height: auto;
    padding: 0;
    font-weight: var(--bbai-admin-type-weight-medium);
}

body.bbai-dashboard .bbai-btn-tertiary:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn-ghost:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn--ghost:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-ds-btn--ghost:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-btn--tertiary:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ui-btn--tertiary:hover:not(:disabled):not([aria-disabled='true']) {
    background: var(--bbai-admin-btn-tertiary-bg-hover) !important;
    color: var(--bbai-admin-btn-tertiary-text-hover) !important;
    transform: none;
}

/* Outline primary */
body.bbai-dashboard .bbai-btn-outline-primary,
body.bbai-dashboard .bbai-btn--outline-primary {
    background: transparent !important;
    color: var(--bbai-admin-color-primary) !important;
    border: var(--bbai-admin-border-width-hairline) solid var(--bbai-admin-color-primary) !important;
    box-shadow: none !important;
}

body.bbai-dashboard .bbai-btn-outline-primary:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn--outline-primary:hover:not(:disabled):not(.is-disabled) {
    background: var(--bbai-admin-color-primary-muted) !important;
    transform: none;
}

/* Destructive */
body.bbai-dashboard .bbai-btn.bbai-btn-danger,
body.bbai-dashboard .bbai-btn--danger,
body.bbai-dashboard .bbai-ds-btn--danger {
    background: var(--bbai-admin-semantic-error-accent) !important;
    color: var(--bbai-admin-color-primary-on-brand) !important;
    border-color: var(--bbai-admin-semantic-error-accent) !important;
    box-shadow: none !important;
}

body.bbai-dashboard .bbai-btn.bbai-btn-danger:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-btn--danger:hover:not(:disabled):not(.is-disabled),
body.bbai-dashboard .bbai-ds-btn--danger:hover:not(:disabled):not([aria-disabled='true']) {
    filter: brightness(0.95);
    transform: none;
}

/* Sizes */
body.bbai-dashboard .bbai-btn.bbai-btn-sm,
body.bbai-dashboard .bbai-btn-sm,
body.bbai-dashboard .bbai-ds-btn--sm {
    min-height: var(--bbai-admin-size-btn-sm);
    padding: var(--bbai-btn-padding-sm-y) var(--bbai-btn-padding-sm-x) !important;
    font-size: var(--bbai-text-xs) !important;
    border-radius: var(--bbai-admin-radius-sm) !important;
}

body.bbai-dashboard .bbai-btn.bbai-btn-primary.bbai-btn-sm,
body.bbai-dashboard .bbai-btn-primary.bbai-btn-sm,
body.bbai-dashboard .bbai-btn--primary.bbai-btn-sm {
    min-width: 0 !important;
    min-height: var(--bbai-admin-size-btn-md) !important;
}

body.bbai-dashboard .bbai-btn.bbai-btn-lg,
body.bbai-dashboard .bbai-btn-lg,
body.bbai-dashboard .bbai-ds-btn--lg {
    min-height: var(--bbai-admin-size-btn-lg);
    padding: var(--bbai-btn-padding-lg-y) var(--bbai-btn-padding-lg-x) !important;
    font-size: var(--bbai-admin-type-body-lg) !important;
    border-radius: var(--bbai-admin-radius-lg) !important;
}

/* -------------------------------------------------------------------------- */
/* Icon buttons (toolbar, menus, square targets)                               */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn--icon,
body.bbai-dashboard .bbai-ds-icon-btn,
body.bbai-dashboard .bbai-toolbar__icon-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--bbai-admin-size-icon-button);
    min-width: var(--bbai-admin-size-icon-button);
    height: var(--bbai-admin-size-icon-button);
    min-height: var(--bbai-admin-size-icon-button);
    padding: 0 !important;
    border-radius: var(--bbai-admin-radius-md);
    border: var(--bbai-admin-border-subtle);
    background: var(--bbai-admin-color-bg);
    color: var(--bbai-admin-color-text-secondary);
    box-shadow: none !important;
    cursor: pointer;
    transition: var(--bbai-admin-ix-transition-interactive);
}

body.bbai-dashboard .bbai-btn--icon:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-icon-btn:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-toolbar__icon-btn:hover:not(:disabled):not([aria-disabled='true']) {
    border-color: var(--bbai-gray-400);
    background: var(--bbai-admin-color-bg-muted);
    color: var(--bbai-admin-color-text);
}

body.bbai-dashboard .bbai-btn--icon:disabled,
body.bbai-dashboard .bbai-ds-icon-btn:disabled,
body.bbai-dashboard .bbai-toolbar__icon-btn:disabled {
    opacity: var(--bbai-admin-interaction-disabled-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Links                                                                      */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-link,
body.bbai-dashboard .bbai-ds-link {
    font-family: var(--bbai-admin-font-sans);
    font-size: inherit;
    font-weight: var(--bbai-admin-type-weight-medium);
    color: var(--bbai-admin-color-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    transition: var(--bbai-admin-ix-transition-interactive);
    background: none;
    border: none;
    padding: 0;
}

body.bbai-dashboard .bbai-link:hover,
body.bbai-dashboard .bbai-ds-link:hover {
    color: var(--bbai-admin-color-primary-hover);
}

body.bbai-dashboard .bbai-link--action {
    font-weight: var(--bbai-admin-type-weight-semibold);
    text-decoration: none;
}

body.bbai-dashboard .bbai-link--action:hover {
    text-decoration: underline;
}

body.bbai-dashboard .bbai-link--muted,
body.bbai-dashboard .bbai-link-muted {
    color: var(--bbai-admin-color-text-muted);
    font-weight: var(--bbai-admin-type-weight-medium);
}

body.bbai-dashboard .bbai-link--muted:hover,
body.bbai-dashboard .bbai-link-muted:hover {
    color: var(--bbai-admin-color-text-secondary);
}

body.bbai-dashboard .bbai-link-btn,
body.bbai-dashboard .bbai-link-sm {
    font-family: var(--bbai-admin-font-sans);
    font-size: var(--bbai-admin-type-body);
    font-weight: var(--bbai-admin-type-weight-medium);
    color: var(--bbai-admin-color-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: var(--bbai-admin-ix-transition-interactive);
}

body.bbai-dashboard .bbai-link-btn:hover,
body.bbai-dashboard .bbai-link-sm:hover {
    color: var(--bbai-admin-color-primary-hover);
    text-decoration: underline;
}

body.bbai-dashboard .bbai-link-btn:disabled,
body.bbai-dashboard .bbai-link-sm:disabled,
body.bbai-dashboard .bbai-link-sm--disabled {
    color: var(--bbai-admin-color-text-disabled);
    cursor: not-allowed;
    opacity: 0.65;
    text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/* Inputs, textareas, selects — shared field primitive                         */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-input,
body.bbai-dashboard .bbai-textarea,
body.bbai-dashboard .bbai-select,
body.bbai-dashboard .bbai-ds-input,
body.bbai-dashboard .bbai-ds-textarea,
body.bbai-dashboard .bbai-ds-select,
body.bbai-dashboard .bbai-settings-form-input,
body.bbai-dashboard .bbai-settings-form-textarea,
body.bbai-dashboard .bbai-credit-filter-input,
body.bbai-dashboard .bbai-credit-filter-select,
body.bbai-dashboard .bbai-filter-input,
body.bbai-dashboard .bbai-filter-select,
body.bbai-dashboard .bbai-toolbar__search-input,
body.bbai-dashboard .bbai-library-filter-select,
body.bbai-dashboard .bbai-library-inline-alt__textarea,
body.bbai-dashboard .bbai-library-edit-modal__textarea,
body.bbai-dashboard .bbai-bulk-edit-form-textarea,
body.bbai-dashboard textarea.bbai-contact-form-textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: var(--bbai-admin-size-input-min-height);
    padding: var(--bbai-input-padding-y) var(--bbai-input-padding-x);
    border-radius: var(--bbai-admin-radius-input);
    border: var(--bbai-input-border);
    background: var(--bbai-input-bg);
    font-family: var(--bbai-admin-font-sans);
    font-size: var(--bbai-admin-type-body);
    line-height: var(--bbai-admin-type-leading-normal);
    color: var(--bbai-admin-color-text);
    transition: var(--bbai-admin-ix-transition-interactive),
        box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

body.bbai-dashboard .bbai-textarea,
body.bbai-dashboard .bbai-ds-textarea,
body.bbai-dashboard .bbai-settings-form-textarea,
body.bbai-dashboard .bbai-library-inline-alt__textarea,
body.bbai-dashboard .bbai-library-edit-modal__textarea,
body.bbai-dashboard .bbai-bulk-edit-form-textarea,
body.bbai-dashboard textarea.bbai-contact-form-textarea {
    min-height: 5rem;
    resize: vertical;
}

body.bbai-dashboard .bbai-toolbar__search-input {
    min-height: var(--bbai-admin-size-btn-sm);
}

body.bbai-dashboard .bbai-input:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-textarea:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-select:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-input:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-textarea:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-select:hover:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-settings-form-input:hover:not(:disabled),
body.bbai-dashboard .bbai-settings-form-textarea:hover:not(:disabled),
body.bbai-dashboard .bbai-credit-filter-input:hover:not(:disabled),
body.bbai-dashboard .bbai-credit-filter-select:hover:not(:disabled),
body.bbai-dashboard .bbai-filter-input:hover:not(:disabled),
body.bbai-dashboard .bbai-filter-select:hover:not(:disabled),
body.bbai-dashboard .bbai-toolbar__search-input:hover:not(:disabled),
body.bbai-dashboard .bbai-library-inline-alt__textarea:hover:not(:disabled),
body.bbai-dashboard .bbai-library-edit-modal__textarea:hover:not(:disabled) {
    border-color: var(--bbai-gray-400);
}

body.bbai-dashboard .bbai-input:focus,
body.bbai-dashboard .bbai-textarea:focus,
body.bbai-dashboard .bbai-select:focus,
body.bbai-dashboard .bbai-ds-input:focus,
body.bbai-dashboard .bbai-ds-textarea:focus,
body.bbai-dashboard .bbai-ds-select:focus,
body.bbai-dashboard .bbai-settings-form-input:focus,
body.bbai-dashboard .bbai-settings-form-textarea:focus,
body.bbai-dashboard .bbai-credit-filter-input:focus,
body.bbai-dashboard .bbai-credit-filter-select:focus,
body.bbai-dashboard .bbai-filter-input:focus,
body.bbai-dashboard .bbai-filter-select:focus,
body.bbai-dashboard .bbai-toolbar__search-input:focus,
body.bbai-dashboard .bbai-library-inline-alt__textarea:focus,
body.bbai-dashboard .bbai-library-edit-modal__textarea:focus {
    border-color: var(--bbai-admin-color-border-focus);
    box-shadow: var(--bbai-admin-shadow-focus);
}

body.bbai-dashboard .bbai-input:disabled,
body.bbai-dashboard .bbai-textarea:disabled,
body.bbai-dashboard .bbai-select:disabled,
body.bbai-dashboard .bbai-ds-input:disabled,
body.bbai-dashboard .bbai-ds-textarea:disabled,
body.bbai-dashboard .bbai-ds-select:disabled,
body.bbai-dashboard .bbai-settings-form-input:disabled,
body.bbai-dashboard .bbai-settings-form-textarea:disabled {
    opacity: var(--bbai-admin-interaction-disabled-opacity);
    cursor: not-allowed;
    background: var(--bbai-admin-color-bg-subtle);
}

body.bbai-dashboard .bbai-input::placeholder,
body.bbai-dashboard .bbai-textarea::placeholder,
body.bbai-dashboard .bbai-ds-input::placeholder,
body.bbai-dashboard .bbai-ds-textarea::placeholder,
body.bbai-dashboard .bbai-settings-form-input::placeholder,
body.bbai-dashboard .bbai-toolbar__search-input::placeholder {
    color: var(--bbai-placeholder-color);
    opacity: var(--bbai-placeholder-opacity);
}

/* Search input variant (optional class) */
body.bbai-dashboard .bbai-input--search,
body.bbai-dashboard input.bbai-input[type='search'] {
    min-height: var(--bbai-admin-size-btn-md);
}

/* Numeric */
body.bbai-dashboard input.bbai-input[type='number'],
body.bbai-dashboard .bbai-input--number {
    font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------- */
/* Toolbar + bulk bar buttons (markup unchanged; align to family)              */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-toolbar__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-admin-space-2);
    min-height: var(--bbai-admin-size-btn-sm);
    padding: var(--bbai-btn-padding-sm-y) var(--bbai-btn-padding-sm-x);
    font-family: var(--bbai-admin-font-sans);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-admin-type-weight-semibold);
    line-height: var(--bbai-admin-type-leading-tight);
    border-radius: var(--bbai-admin-btn-radius-sm);
    border: var(--bbai-admin-border-subtle);
    background: var(--bbai-admin-color-bg);
    color: var(--bbai-admin-color-text-secondary);
    cursor: pointer;
    transition: var(--bbai-admin-ix-transition-interactive);
    box-shadow: none;
}

body.bbai-dashboard .bbai-toolbar__btn:hover:not(:disabled) {
    background: var(--bbai-admin-color-bg-muted);
    border-color: var(--bbai-gray-300);
    color: var(--bbai-gray-700);
}

body.bbai-dashboard .bbai-toolbar__btn--primary {
    border-color: var(--bbai-admin-btn-primary-border);
    background: var(--bbai-admin-btn-primary-bg);
    color: var(--bbai-admin-color-primary-on-brand);
    box-shadow: var(--bbai-admin-btn-primary-shadow);
}

body.bbai-dashboard .bbai-toolbar__btn--primary:hover:not(:disabled):not(.bbai-is-locked) {
    border-color: var(--bbai-admin-color-primary-hover);
    filter: brightness(0.97);
    box-shadow: var(--bbai-admin-btn-primary-shadow-hover);
    transform: var(--bbai-admin-btn-primary-lift);
}

body.bbai-dashboard .bbai-toolbar__btn:focus-visible,
body.bbai-dashboard .bbai-bulk-actions-toolbar__btn:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
}

body.bbai-dashboard .bbai-bulk-actions-toolbar__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--bbai-admin-size-btn-sm);
    padding: var(--bbai-btn-padding-sm-y) var(--bbai-btn-padding-sm-x);
    font-family: var(--bbai-admin-font-sans);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-admin-type-weight-semibold);
    border-radius: var(--bbai-admin-btn-radius-sm);
    border: var(--bbai-admin-border-subtle);
    background: var(--bbai-admin-color-bg);
    color: var(--bbai-admin-color-text-secondary);
    cursor: pointer;
    transition: var(--bbai-admin-ix-transition-interactive);
}

body.bbai-dashboard .bbai-bulk-actions-toolbar__btn:hover:not(:disabled) {
    background: var(--bbai-admin-color-bg-muted);
}

body.bbai-dashboard .bbai-bulk-actions-toolbar__btn--primary {
    border-color: var(--bbai-admin-btn-primary-border);
    background: var(--bbai-admin-btn-primary-bg);
    color: var(--bbai-admin-color-primary-on-brand);
    box-shadow: var(--bbai-admin-btn-primary-shadow);
}

body.bbai-dashboard .bbai-bulk-actions-toolbar__btn--primary:hover:not(:disabled):not(.bbai-is-locked) {
    filter: brightness(0.97);
    box-shadow: var(--bbai-admin-btn-primary-shadow-hover);
    transform: var(--bbai-admin-btn-primary-lift);
}

/* Pagination as compact secondary */
body.bbai-dashboard a.bbai-pagination-btn,
body.bbai-dashboard button.bbai-pagination-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--bbai-admin-size-btn-sm);
    padding: var(--bbai-btn-padding-sm-y) var(--bbai-btn-padding-sm-x);
    font-family: var(--bbai-admin-font-sans);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-admin-type-weight-medium);
    border-radius: var(--bbai-admin-radius-sm);
    border: var(--bbai-admin-border-subtle);
    background: var(--bbai-admin-color-bg);
    color: var(--bbai-admin-color-text);
    text-decoration: none !important;
    cursor: pointer;
    transition: var(--bbai-admin-ix-transition-interactive);
}

body.bbai-dashboard a.bbai-pagination-btn:hover,
body.bbai-dashboard button.bbai-pagination-btn:hover {
    background: var(--bbai-admin-color-bg-muted);
}

body.bbai-dashboard a.bbai-pagination-btn:focus-visible,
body.bbai-dashboard button.bbai-pagination-btn:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
}

/* -------------------------------------------------------------------------- */
/* Labels + helper text paired with .bbai-input (optional)                     */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-label,
body.bbai-dashboard .bbai-ds-label {
    display: block;
    margin: 0 0 var(--bbai-space-1-5);
    font-size: var(--bbai-admin-type-label);
    font-weight: var(--bbai-admin-type-label-weight);
    letter-spacing: var(--bbai-admin-type-label-tracking);
    text-transform: var(--bbai-admin-type-label-transform);
    color: var(--bbai-admin-color-text-muted);
}

body.bbai-dashboard .bbai-help,
body.bbai-dashboard .bbai-ds-help,
body.bbai-dashboard .bbai-ds-helper {
    margin: var(--bbai-space-1-5) 0 0;
    font-size: var(--bbai-admin-type-meta);
    line-height: var(--bbai-admin-type-leading-snug);
    color: var(--bbai-admin-color-text-muted);
}

body.bbai-dashboard .bbai-help--error,
body.bbai-dashboard .bbai-ds-help--error {
    color: var(--bbai-admin-semantic-error-accent);
}

/* WordPress core buttons inside plugin shell (logged-out FTUE, etc.) */
body.bbai-dashboard .bbai-dashboard-container .button.button-primary,
body.bbai-dashboard .bbai-logged-out__panel .button.button-primary {
    min-height: var(--bbai-admin-size-btn-lg);
    padding: var(--bbai-btn-padding-lg-y) var(--bbai-btn-padding-lg-x) !important;
    font-size: var(--bbai-admin-type-body) !important;
    font-weight: var(--bbai-admin-type-weight-semibold) !important;
    border-radius: var(--bbai-admin-btn-radius) !important;
    border: 1px solid var(--bbai-admin-btn-primary-border) !important;
    background: var(--bbai-admin-btn-primary-bg) !important;
    color: var(--bbai-admin-color-primary-on-brand) !important;
    box-shadow: var(--bbai-admin-btn-primary-shadow);
    line-height: var(--bbai-admin-type-leading-tight) !important;
    transition: var(--bbai-admin-ix-transition-interactive), box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease) !important;
}

body.bbai-dashboard .bbai-dashboard-container .button.button-secondary,
body.bbai-dashboard .bbai-logged-out__panel .button.button-secondary {
    min-height: var(--bbai-admin-size-btn-md);
    padding: var(--bbai-btn-padding-y) var(--bbai-btn-padding-x) !important;
    font-size: var(--bbai-admin-type-body) !important;
    font-weight: var(--bbai-admin-type-weight-medium) !important;
    border-radius: var(--bbai-admin-btn-radius) !important;
    border: 1px solid var(--bbai-admin-btn-secondary-border) !important;
    background: var(--bbai-admin-btn-secondary-bg) !important;
    color: var(--bbai-admin-btn-secondary-text) !important;
    box-shadow: none !important;
    transition: var(--bbai-admin-ix-transition-interactive), box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease) !important;
}

body.bbai-dashboard .bbai-dashboard-container .button.button-primary:hover:not(:disabled),
body.bbai-dashboard .bbai-logged-out__panel .button.button-primary:hover:not(:disabled) {
    box-shadow: var(--bbai-admin-btn-primary-shadow-hover) !important;
    transform: var(--bbai-admin-btn-primary-lift);
}

body.bbai-dashboard .bbai-dashboard-container .button.button-secondary:hover:not(:disabled),
body.bbai-dashboard .bbai-logged-out__panel .button.button-secondary:hover:not(:disabled) {
    background: var(--bbai-admin-btn-secondary-bg-hover) !important;
    border-color: var(--bbai-admin-btn-secondary-border-hover) !important;
    color: var(--bbai-admin-btn-secondary-text-hover) !important;
}

body.bbai-dashboard .bbai-dashboard-container .button.button-primary:focus-visible,
body.bbai-dashboard .bbai-dashboard-container .button.button-secondary:focus-visible,
body.bbai-dashboard .bbai-logged-out__panel .button:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
}

/* Source: assets/css/system/bbai-admin-interactions.css */
/**
 * BeepBeep AI — Phase 9: shared interaction system
 *
 * Unified motion, loading, pressed states, row feedback, and reduced-motion.
 * Tokens: bbai-admin-foundation-tokens.css (--bbai-admin-ix-*).
 * Primitives: bbai-admin-controls.css (buttons, fields, links).
 *
 * @package BeepBeep_AI
 */

/* -------------------------------------------------------------------------- */
/* Motion primitives                                                          */
/* -------------------------------------------------------------------------- */

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

@keyframes bbai-ix-row-ack {
    0% {
        background-color: var(--bbai-admin-ix-row-ack-bg);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes bbai-ix-settle-in {
    from {
        opacity: 0.88;
    }

    to {
        opacity: 1;
    }
}

/* -------------------------------------------------------------------------- */
/* Loading — inline spinners (matches .bbai-btn__spinner markup)               */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn__spinner,
body.bbai-dashboard .bbai-btn .bbai-btn__spinner {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.bbai-dashboard .bbai-btn.is-loading .bbai-btn__spinner,
body.bbai-dashboard .bbai-btn[aria-busy='true'] .bbai-btn__spinner,
body.bbai-dashboard .bbai-ds-btn.is-loading .bbai-btn__spinner,
body.bbai-dashboard .bbai-ds-btn[aria-busy='true'] .bbai-btn__spinner {
    display: inline-flex;
}

body.bbai-dashboard .bbai-btn.is-loading .bbai-btn__spinner svg,
body.bbai-dashboard .bbai-btn[aria-busy='true'] .bbai-btn__spinner svg,
body.bbai-dashboard .bbai-ds-btn[aria-busy='true'] .bbai-btn__spinner svg {
    width: var(--bbai-admin-ix-spinner-size);
    height: var(--bbai-admin-ix-spinner-size);
    animation: bbai-ix-spin 0.7s linear infinite;
}

body.bbai-dashboard .bbai-btn.is-loading .bbai-btn__text,
body.bbai-dashboard .bbai-btn[aria-busy='true'] .bbai-btn__text {
    opacity: 0.92;
}

/* Standalone spinner for row/toolbar slots */
body.bbai-dashboard .bbai-ix-spinner {
    display: inline-block;
    width: var(--bbai-admin-ix-spinner-size);
    height: var(--bbai-admin-ix-spinner-size);
    border: 2px solid var(--bbai-admin-color-border);
    border-top-color: var(--bbai-admin-color-primary);
    border-radius: 50%;
    animation: bbai-ix-spin 0.65s linear infinite;
    vertical-align: middle;
}

body.bbai-dashboard .bbai-ix-spinner--sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 1.5px;
}

/* -------------------------------------------------------------------------- */
/* Icon buttons — pressed (no scale; same language as text buttons)          */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn--icon:active:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-ds-icon-btn:active:not(:disabled):not([aria-disabled='true']),
body.bbai-dashboard .bbai-toolbar__icon-btn:active:not(:disabled):not([aria-disabled='true']) {
    filter: var(--bbai-admin-ix-filter-press);
}

body.bbai-dashboard .bbai-btn--icon[aria-busy='true'],
body.bbai-dashboard .bbai-ds-icon-btn[aria-busy='true'],
body.bbai-dashboard .bbai-toolbar__icon-btn[aria-busy='true'] {
    opacity: var(--bbai-admin-ix-loading-opacity);
    cursor: progress;
    pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Toolbar + bulk — pressed                                                   */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-toolbar__btn:active:not(:disabled),
body.bbai-dashboard .bbai-bulk-actions-toolbar__btn:active:not(:disabled) {
    filter: var(--bbai-admin-ix-filter-press);
}

body.bbai-dashboard .bbai-toolbar__btn--primary:active:not(:disabled):not(.bbai-is-locked),
body.bbai-dashboard .bbai-bulk-actions-toolbar__btn--primary:active:not(:disabled):not(.bbai-is-locked) {
    filter: var(--bbai-admin-ix-filter-press-primary);
}

/* -------------------------------------------------------------------------- */
/* Pagination — hover lift + press (transition from bbai-admin-controls)     */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard a.bbai-pagination-btn:hover:not(.bbai-pagination-btn--disabled):not(.bbai-pagination-btn--current),
body.bbai-dashboard button.bbai-pagination-btn:hover:not(.bbai-pagination-btn--disabled):not(.bbai-pagination-btn--current) {
    box-shadow: var(--bbai-admin-ix-hover-lift-shadow);
}

body.bbai-dashboard a.bbai-pagination-btn:active:not(.bbai-pagination-btn--disabled):not(.bbai-pagination-btn--current),
body.bbai-dashboard button.bbai-pagination-btn:active:not(.bbai-pagination-btn--disabled):not(.bbai-pagination-btn--current) {
    filter: var(--bbai-admin-ix-filter-press);
}

/* -------------------------------------------------------------------------- */
/* Design-system filter pills — pressed                                      */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-ds-filter-pill:active {
    filter: var(--bbai-admin-ix-filter-press);
}

body.bbai-dashboard .bbai-ds-filter-pill[aria-pressed='true']:active,
body.bbai-dashboard .bbai-ds-filter-pill--active:active {
    filter: var(--bbai-admin-ix-filter-press-on-dark);
}

/* -------------------------------------------------------------------------- */
/* Semantic filter pills — pressed (shared with alt-review toolbar)           */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-filter-pill:active,
body.bbai-dashboard .bbai-alt-review-filters__btn:active {
    filter: var(--bbai-admin-ix-filter-press);
}

body.bbai-dashboard .bbai-alt-review-filters__btn--active:active,
body.bbai-dashboard .bbai-filter-pill--active:active {
    filter: var(--bbai-admin-ix-filter-press-on-dark);
}

/* -------------------------------------------------------------------------- */
/* Links — keyboard focus parity + light press                                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-link-btn:active:not(:disabled),
body.bbai-dashboard .bbai-link-sm:active:not(:disabled) {
    filter: var(--bbai-admin-ix-filter-press);
}

/* -------------------------------------------------------------------------- */
/* Section / surface loading (opt-in class for async regions)                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-ix-surface-loading {
    pointer-events: none;
    opacity: var(--bbai-admin-ix-loading-opacity);
    transition: opacity var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

body.bbai-dashboard .bbai-ix-content-settle {
    animation: bbai-ix-settle-in var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease) 1;
}

/* -------------------------------------------------------------------------- */
/* Row success acknowledgment (add class briefly from JS after save)          */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-table tbody tr.bbai-ix-row-ack > td,
body.bbai-dashboard .bbai-library-table tbody tr.bbai-ix-row-ack > td {
    animation: bbai-ix-row-ack 1.25s var(--bbai-admin-ix-ease) 1;
}

/* -------------------------------------------------------------------------- */
/* Reduced motion                                                             */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    body.bbai-dashboard .bbai-btn,
    body.bbai-dashboard .bbai-ds-btn,
    body.bbai-dashboard .bbai-btn--icon,
    body.bbai-dashboard .bbai-ds-icon-btn,
    body.bbai-dashboard .bbai-toolbar__icon-btn,
    body.bbai-dashboard .bbai-toolbar__btn,
    body.bbai-dashboard .bbai-bulk-actions-toolbar__btn,
    body.bbai-dashboard .bbai-input,
    body.bbai-dashboard .bbai-textarea,
    body.bbai-dashboard .bbai-select,
    body.bbai-dashboard .bbai-ds-input,
    body.bbai-dashboard .bbai-ds-textarea,
    body.bbai-dashboard .bbai-ds-select,
    body.bbai-dashboard .bbai-ds-filter-pill,
    body.bbai-dashboard .bbai-filter-pill,
    body.bbai-dashboard .bbai-alt-review-filters__btn,
    body.bbai-dashboard a.bbai-pagination-btn,
    body.bbai-dashboard button.bbai-pagination-btn {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    body.bbai-dashboard .bbai-btn__spinner svg,
    body.bbai-dashboard .bbai-ds-btn[aria-busy='true'] .bbai-btn__spinner svg,
    body.bbai-dashboard .bbai-ix-spinner,
    body.bbai-dashboard .bbai-row-action-spinner {
        animation: none !important;
    }

    body.bbai-dashboard .bbai-ix-content-settle,
    body.bbai-dashboard .bbai-table tbody tr.bbai-ix-row-ack > td,
    body.bbai-dashboard .bbai-library-table tbody tr.bbai-ix-row-ack > td {
        animation: none !important;
    }
}

/* Source: assets/css/system/bbai-admin-product-states.css */
/**
 * BeepBeep AI — Phase 11: shared product states (loading, empty, error, partial, retry)
 *
 * Scoped: body.bbai-dashboard
 * Depends: bbai-admin-foundation-tokens.css, bbai-admin-interactions.css (spinner)
 *
 * @package BeepBeep_AI
 */

/* -------------------------------------------------------------------------- */
/* Base block                                                                */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-state {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--bbai-admin-space-3);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    padding: var(--bbai-admin-space-8) var(--bbai-admin-space-6);
    border-radius: var(--bbai-admin-radius-lg);
    border: var(--bbai-admin-border-default);
    background: var(--bbai-admin-color-bg);
    color: var(--bbai-admin-color-text);
    transition: opacity var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

body.bbai-dashboard .bbai-state--compact {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: var(--bbai-admin-space-5) var(--bbai-admin-space-4);
    gap: var(--bbai-admin-space-2);
}

body.bbai-dashboard .bbai-state--section {
    max-width: none;
    width: 100%;
    min-height: 8rem;
    justify-content: center;
}

body.bbai-dashboard tr.bbai-state-row > td {
    padding: 0 !important;
    vertical-align: middle;
    border-bottom: none !important;
}

body.bbai-dashboard tr.bbai-state-row .bbai-state {
    border: none;
    background: transparent;
    margin: 0;
    max-width: none;
}

body.bbai-dashboard .bbai-library-filter-empty__cell .bbai-state {
    border: none;
    background: transparent;
    margin: 0 auto;
    max-width: 28rem;
    padding: var(--bbai-admin-space-4) var(--bbai-admin-space-3);
}

body.bbai-dashboard .bbai-analytics-result-card .bbai-analytics-trend-block__empty.bbai-state {
    width: 100%;
    margin-top: var(--bbai-admin-space-2);
    margin-bottom: var(--bbai-admin-space-1);
}

/* -------------------------------------------------------------------------- */
/* Elements                                                                  */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bbai-admin-color-text-muted);
}

body.bbai-dashboard .bbai-state__icon svg {
    display: block;
}

body.bbai-dashboard .bbai-state__icon--loading {
    color: var(--bbai-admin-color-primary);
}

body.bbai-dashboard .bbai-state__title {
    margin: 0;
    font-size: var(--bbai-admin-type-h5);
    font-weight: var(--bbai-admin-type-weight-semibold);
    line-height: var(--bbai-admin-type-leading-snug);
    color: var(--bbai-admin-color-text);
}

body.bbai-dashboard .bbai-state--compact .bbai-state__title {
    font-size: var(--bbai-admin-type-body);
}

body.bbai-dashboard .bbai-state__body {
    margin: 0;
    font-size: var(--bbai-admin-type-body);
    line-height: var(--bbai-admin-type-leading-relaxed);
    color: var(--bbai-admin-color-text-secondary);
    max-width: 32rem;
}

body.bbai-dashboard .bbai-state--compact .bbai-state__body {
    font-size: var(--bbai-admin-type-body-sm);
}

body.bbai-dashboard .bbai-state__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-admin-space-2);
    margin-top: var(--bbai-admin-space-1);
}

body.bbai-dashboard .bbai-state__meta {
    margin: 0;
    font-size: var(--bbai-admin-type-meta);
    color: var(--bbai-admin-color-text-muted);
}

/* -------------------------------------------------------------------------- */
/* Modifiers — tone                                                          */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-state--loading {
    border-style: dashed;
    border-color: var(--bbai-admin-color-border-strong);
    background: var(--bbai-admin-color-bg-muted);
}

body.bbai-dashboard .bbai-state--empty {
    background: var(--bbai-admin-color-bg-muted);
    border-color: var(--bbai-gray-200);
}

body.bbai-dashboard .bbai-state--error {
    border-color: var(--bbai-admin-semantic-error-border);
    background: var(--bbai-admin-semantic-error-bg);
}

body.bbai-dashboard .bbai-state--error .bbai-state__icon {
    color: var(--bbai-admin-semantic-error-fg);
}

body.bbai-dashboard .bbai-state--error .bbai-state__title {
    color: var(--bbai-admin-semantic-error-fg);
}

body.bbai-dashboard .bbai-state--partial {
    border-color: var(--bbai-admin-semantic-warning-border);
    background: var(--bbai-admin-semantic-warning-bg);
    text-align: left;
    align-items: flex-start;
}

body.bbai-dashboard .bbai-state--partial .bbai-state__title {
    color: var(--bbai-admin-semantic-warning-fg);
}

body.bbai-dashboard .bbai-state--partial .bbai-state__body {
    color: var(--bbai-admin-semantic-warning-fg);
}

body.bbai-dashboard .bbai-state--retry {
    border-color: var(--bbai-admin-semantic-info-border);
    background: var(--bbai-admin-semantic-info-bg);
}

body.bbai-dashboard .bbai-state--retry .bbai-state__title {
    color: var(--bbai-admin-semantic-info-fg);
}

/* -------------------------------------------------------------------------- */
/* Card-wrapped empty (library) — outer card unchanged, inner uses bbai-state   */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-library-empty-state .bbai-state,
body.bbai-dashboard .bbai-credit-activity-state.bbai-state {
    border: none;
    background: transparent;
    padding: var(--bbai-admin-space-2) 0;
}

body.bbai-dashboard .bbai-credit-activity-state.bbai-state--empty {
    align-items: flex-start;
    text-align: left;
    max-width: none;
    padding: var(--bbai-admin-space-6);
    border: var(--bbai-admin-border-default);
    background: var(--bbai-admin-color-bg-muted);
    border-radius: var(--bbai-admin-radius-md);
}

body.bbai-dashboard .bbai-credit-activity-state__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bbai-admin-space-2);
    margin-top: var(--bbai-admin-space-3);
}

/* Legacy class harmony */
body.bbai-dashboard .bbai-credit-activity-state__title {
    margin: 0 0 var(--bbai-admin-space-2);
    font-size: var(--bbai-admin-type-h5);
    font-weight: var(--bbai-admin-type-weight-semibold);
    color: var(--bbai-admin-color-text);
}

body.bbai-dashboard .bbai-credit-activity-state__description {
    margin: 0;
    font-size: var(--bbai-admin-type-body);
    color: var(--bbai-admin-color-text-secondary);
    line-height: var(--bbai-admin-type-leading-relaxed);
}

/* -------------------------------------------------------------------------- */
/* In-product exhausted trial wall                                           */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-trial-upgrade-wall {
    display: grid;
    /* Tighter than space-5: trust line + usage meta should read as one footer stack */
    gap: var(--bbai-admin-space-3);
    border: 1px solid #f5d0a9;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 38%),
        linear-gradient(180deg, #fffaf4 0%, #ffffff 100%);
}

/* Extra top inset only; bottom matches normal cards so the block is not “heavy” at the bottom. */
/* Bottom margin: this section sits outside .bbai-dashboard-command / .bbai-top-section-stack, so it does not get that stack’s gap — match section spacing to the row below. */
#bbai-dashboard-main .bbai-trial-upgrade-wall.bbai-command-card {
    margin-bottom: var(--section-spacing, var(--bbai-admin-space-6));
    padding-top: calc(var(--bbai-command-card-padding, var(--bbai-admin-space-6)) + var(--bbai-admin-space-2));
    padding-bottom: var(--bbai-command-card-padding, var(--bbai-admin-space-6));
    padding-inline: var(--bbai-command-card-padding, var(--bbai-admin-space-6));
}

body.bbai-dashboard .bbai-trial-upgrade-wall__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bbai-admin-space-5);
    flex-wrap: wrap;
    min-width: 0;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__copy {
    display: grid;
    gap: var(--bbai-admin-space-3);
    max-width: min(760px, 100%);
    min-width: 0;
    flex: 1 1 280px;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__copy > .bbai-command-card__eyebrow {
    margin-bottom: 0;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__copy > .bbai-command-card__title {
    margin-top: calc(var(--bbai-admin-space-1) * -1);
    margin-bottom: 0;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__body,
body.bbai-dashboard .bbai-trial-upgrade-wall__value,
body.bbai-dashboard .bbai-trial-upgrade-wall__trust {
    margin: 0;
    color: var(--bbai-admin-color-text-secondary, #526071);
    line-height: 1.6;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__value {
    color: var(--bbai-admin-color-text, #11253f);
    font-weight: 600;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__trust {
    margin-top: 0;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bbai-admin-space-2);
    align-items: center;
    flex-shrink: 0;
    /* flex-start: if buttons are taller than copy, do not leave a dead band under the trust line */
    align-self: flex-start;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(251, 146, 60, 0.22);
    color: #8b4b17;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__meta {
    padding-top: var(--bbai-admin-space-3);
    padding-bottom: var(--bbai-admin-space-2);
    margin-top: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    min-width: 0;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.4em;
    row-gap: 0.35em;
    margin: 0;
    font-size: var(--bbai-admin-type-body, 14px);
    line-height: 1.55;
    color: var(--bbai-admin-color-text-secondary, #526071);
}

body.bbai-dashboard .bbai-trial-upgrade-wall__meta-dot {
    color: var(--bbai-admin-color-text-muted, #94a3b8);
    font-weight: 700;
    user-select: none;
    flex: 0 0 auto;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__usage {
    color: var(--bbai-admin-color-text, #11253f);
    font-weight: 600;
}

body.bbai-dashboard .bbai-trial-upgrade-wall__metric {
    font-weight: 400;
    color: inherit;
}

/*
 * Side-by-side command cards (Library status + Plan / trial usage): identical header grid,
 * label→title rhythm, and stretched card bodies so both “banners” match.
 */
#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card > .bbai-command-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(168px, max-content);
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card > .bbai-command-card__header > div:first-child {
    min-width: 0;
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card .bbai-command-card__meta-group {
    justify-self: end;
    width: 100%;
    justify-content: flex-end;
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card--plan .bbai-command-card__meta-group--plan-trailing {
    min-width: 168px;
    min-height: 28px;
    box-sizing: border-box;
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card .bbai-command-card__title {
    font-size: var(--bbai-card-title-size, var(--bbai-admin-type-card-title, 20px));
    font-weight: var(--bbai-card-title-weight, var(--bbai-admin-type-weight-semibold, 600));
    line-height: var(--bbai-card-title-leading, 1.2);
    letter-spacing: var(--bbai-card-title-tracking, -0.02em);
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card .bbai-command-card__eyebrow {
    margin-bottom: var(--bbai-card-label-margin-bottom, var(--bbai-space-2));
}

#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card--status .bbai-command-status,
#bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card--plan .bbai-command-plan {
    flex: 1 1 auto;
    min-height: 0;
}

@media (max-width: 480px) {
    #bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card > .bbai-command-card__header {
        grid-template-columns: minmax(0, 1fr);
    }

    #bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card .bbai-command-card__meta-group {
        justify-self: start;
        width: 100%;
        justify-content: flex-start;
    }

    #bbai-dashboard-main .bbai-dashboard-command__grid > .bbai-command-card--plan .bbai-command-card__meta-group--plan-trailing {
        min-width: 0;
    }
}

/* -------------------------------------------------------------------------- */
/* Reduced motion                                                            */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    body.bbai-dashboard .bbai-state {
        transition: none;
    }
}

@media (max-width: 782px) {
    body.bbai-dashboard .bbai-trial-upgrade-wall__main {
        flex-direction: column;
    }

    body.bbai-dashboard .bbai-trial-upgrade-wall__actions {
        align-self: stretch;
        width: 100%;
    }

    #bbai-dashboard-main .bbai-trial-upgrade-wall.bbai-command-card {
        padding-top: calc(var(--bbai-command-card-padding, var(--bbai-admin-space-4)) + var(--bbai-admin-space-2));
        padding-bottom: var(--bbai-command-card-padding, var(--bbai-admin-space-4));
    }
}

/* Source: assets/css/system/bbai-admin-surfaces.css */
/**
 * BeepBeep AI — Phase 3 structural surfaces (cards, section headers, dividers)
 *
 * Depends: bbai-admin-foundation-tokens, bbai-admin-controls, bbai-section-header.css (typography scale).
 * Scope: body.bbai-dashboard
 *
 * Pairs with: .bbai-section-label, .bbai-section-title, .bbai-section-meta (bbai-section-header.css)
 */

:root {
    --bbai-surface-card-radius: var(--bbai-admin-radius-card);
    --bbai-surface-card-border: var(--bbai-admin-border-default);
    --bbai-surface-card-bg: var(--bbai-admin-color-bg);
    --bbai-surface-card-shadow: var(--bbai-admin-shadow-card);
    --bbai-surface-card-shadow-hover: var(--bbai-admin-shadow-card-hover);
    --bbai-surface-padding-outer: var(--bbai-admin-space-inset-card);
    --bbai-surface-padding-outer-sm: var(--bbai-admin-space-inset-card-sm);
    --bbai-surface-soft-bg: var(--bbai-admin-color-bg-muted);
    --bbai-surface-soft-shadow: var(--bbai-shadow-sm);
    --bbai-surface-divider-color: var(--bbai-gray-200);
    --bbai-surface-header-content-gap: var(--bbai-section-title-content-gap, 8px);
}

/* -------------------------------------------------------------------------- */
/* Card shell — .bbai-card family + DS aliases                                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-card,
body.bbai-dashboard .bbai-ds-card {
    box-sizing: border-box;
    border-radius: var(--bbai-surface-card-radius);
    border: var(--bbai-surface-card-border);
    background: var(--bbai-surface-card-bg);
    box-shadow: var(--bbai-surface-card-shadow);
}

body.bbai-dashboard .bbai-card--soft {
    background: var(--bbai-surface-soft-bg);
    box-shadow: var(--bbai-surface-soft-shadow);
    border-color: var(--bbai-gray-200);
}

body.bbai-dashboard .bbai-card--compact {
    --bbai-surface-padding-outer: var(--bbai-surface-padding-outer-sm);
}

body.bbai-dashboard .bbai-card--interactive,
body.bbai-dashboard .bbai-ds-card--interactive {
    transition: box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

body.bbai-dashboard .bbai-card--interactive:hover,
body.bbai-dashboard .bbai-ds-card--interactive:hover {
    box-shadow: var(--bbai-surface-card-shadow-hover);
}

/* Padding utilities (compose with shell; does not replace page-specific gutters) */
body.bbai-dashboard .bbai-card--pad-sm,
body.bbai-dashboard .bbai-ds-pad-sm {
    padding: var(--bbai-surface-padding-outer-sm);
}

body.bbai-dashboard .bbai-card--pad-md,
body.bbai-dashboard .bbai-ds-pad-md {
    padding: var(--bbai-surface-padding-outer);
}

body.bbai-dashboard .bbai-card--pad-lg,
body.bbai-dashboard .bbai-ds-pad-lg {
    padding: var(--bbai-card-padding-lg);
}

/* Existing dashboard / analytics shells: align radius & border weight when paired */
body.bbai-dashboard .bbai-dashboard-surface-card.bbai-card,
body.bbai-dashboard .bbai-ui-section-card.bbai-card {
    border-radius: var(--bbai-surface-card-radius);
}

/* -------------------------------------------------------------------------- */
/* Section header layout (typography stays in bbai-section-header.css)        */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-section-header {
    box-sizing: border-box;
}

/* Default stack: matches .bbai-ui-section-header rhythm */
body.bbai-dashboard .bbai-section-header:not(.bbai-section-header--split-end) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bbai-admin-space-3) var(--bbai-admin-space-5);
}

body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__text {
    flex: 1 1 15rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bbai-section-label-title-gap, 2px);
}

body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-admin-space-2-5);
}

/* Title → description/meta spacing */
body.bbai-dashboard .bbai-section-header .bbai-section-title + .bbai-section-description,
body.bbai-dashboard .bbai-section-header .bbai-section-title + .bbai-ui-section-header__description,
body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__title + .bbai-section-description,
body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__title + .bbai-ui-section-header__description {
    margin-top: var(--bbai-surface-header-content-gap);
}

body.bbai-dashboard .bbai-section-header .bbai-section-label + .bbai-section-title,
body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__eyebrow + .bbai-section-title,
body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__eyebrow + .bbai-ui-section-header__title {
    margin-top: 0;
}

body.bbai-dashboard .bbai-section-header .bbai-ui-section-header__title {
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/* Section description (body copy under title — not hero scale)                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-section-description,
body.bbai-dashboard .bbai-ui-section-header__description {
    margin: 0;
    max-width: 68ch;
    font-size: var(--bbai-admin-type-body);
    font-weight: var(--bbai-admin-type-weight-regular);
    line-height: var(--bbai-admin-type-leading-relaxed);
    color: var(--bbai-admin-color-text-muted);
}

/* -------------------------------------------------------------------------- */
/* Inner regions                                                              */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-card-section {
    box-sizing: border-box;
}

body.bbai-dashboard .bbai-card-section--padded {
    padding-left: var(--bbai-surface-padding-outer);
    padding-right: var(--bbai-surface-padding-outer);
}

body.bbai-dashboard .bbai-card-section + .bbai-card-section {
    margin-top: var(--bbai-admin-space-4);
    padding-top: var(--bbai-admin-space-4);
    border-top: 1px solid var(--bbai-surface-divider-color);
}

body.bbai-dashboard hr.bbai-surface-divider,
body.bbai-dashboard .bbai-surface-divider {
    display: block;
    width: 100%;
    height: 0;
    margin: var(--bbai-admin-space-4) 0;
    padding: 0;
    border: none;
    border-top: 1px solid var(--bbai-surface-divider-color);
    background: transparent;
}

/* -------------------------------------------------------------------------- */
/* Usage / insights: map legacy headings onto section scale                    */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-usage-insights__lead.bbai-section-description,
body.bbai-dashboard .bbai-usage-activity-section__lead.bbai-section-description {
    margin-top: var(--bbai-surface-header-content-gap);
}

body.bbai-dashboard .bbai-usage-insights__label.bbai-section-label {
    display: block;
    margin-bottom: var(--bbai-admin-space-1);
}

/* -------------------------------------------------------------------------- */
/* Settings: plan summary title uses section title scale                        */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-settings-plan-summary-card .bbai-settings-card-title:not(.bbai-card-title) {
    font-size: var(--bbai-section-title-size);
    font-weight: var(--bbai-section-title-weight);
    line-height: var(--bbai-section-title-leading);
    letter-spacing: var(--bbai-section-title-tracking);
    color: var(--bbai-section-title-color);
    margin: 0 0 var(--bbai-rhythm-title-to-description, var(--bbai-space-2));
}

/* -------------------------------------------------------------------------- */
/* DS composition aliases (same tokens as .bbai-card)                          */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-ds-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bbai-space-3) var(--bbai-space-5);
}

body.bbai-dashboard .bbai-ds-section-head__text {
    flex: 1 1 15rem;
    min-width: 0;
}

body.bbai-dashboard .bbai-ds-section-head__eyebrow {
    margin: 0 0 var(--bbai-space-1-5);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    letter-spacing: var(--bbai-tracking-wider);
    text-transform: uppercase;
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-ds-section-head__title {
    margin: 0 0 var(--bbai-space-2);
    font-size: var(--bbai-ds-section-title);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-ds-section-head__desc {
    margin: 0;
    max-width: 68ch;
    font-size: var(--bbai-ds-body);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-ds-section-head__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-space-2-5);
}

/* Source: assets/css/system/bbai-admin-design-system.css */
/**
 * BeepBeep AI — Admin design system (Phase 4+ compositions)
 *
 * Phase 1: bbai-admin-foundation-tokens.css
 * Phase 2: bbai-admin-controls.css
 * Phase 3: bbai-admin-surfaces.css (.bbai-card, section headers, dividers)
 */

/* -------------------------------------------------------------------------- */
/* Phase 4 — Badges + filter pills                                            */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-ds-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: var(--bbai-badge-padding-y) var(--bbai-badge-padding-x);
    border-radius: var(--bbai-badge-radius);
    font-size: var(--bbai-badge-font-size);
    font-weight: var(--bbai-badge-font-weight);
    line-height: var(--bbai-leading-none);
    border: 1px solid transparent;
    vertical-align: middle;
}

body.bbai-dashboard .bbai-ds-badge--neutral {
    background: var(--bbai-ds-status-neutral-bg);
    color: var(--bbai-ds-status-neutral-fg);
    border-color: var(--bbai-ds-status-neutral-border);
}

body.bbai-dashboard .bbai-ds-badge--success {
    background: var(--bbai-ds-status-success-bg);
    color: var(--bbai-ds-status-success-fg);
    border-color: var(--bbai-ds-status-success-border);
}

body.bbai-dashboard .bbai-ds-badge--warning {
    background: var(--bbai-ds-status-warning-bg);
    color: var(--bbai-ds-status-warning-fg);
    border-color: var(--bbai-ds-status-warning-border);
}

body.bbai-dashboard .bbai-ds-badge--error {
    background: var(--bbai-ds-status-error-bg);
    color: var(--bbai-ds-status-error-fg);
    border-color: var(--bbai-ds-status-error-border);
}

body.bbai-dashboard .bbai-ds-badge--info {
    background: var(--bbai-ds-status-info-bg);
    color: var(--bbai-ds-status-info-fg);
    border-color: var(--bbai-ds-status-info-border);
}

body.bbai-dashboard .bbai-ds-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1-5);
    min-height: var(--bbai-ds-control-height-sm);
    padding: var(--bbai-space-1) var(--bbai-space-3);
    border-radius: var(--bbai-radius-full);
    border: 1px solid var(--bbai-border);
    background: var(--bbai-bg-primary);
    font-family: var(--bbai-font-family);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-secondary);
    cursor: pointer;
    transition: var(--bbai-ds-transition);
}

body.bbai-dashboard .bbai-ds-filter-pill:hover {
    border-color: var(--bbai-gray-400);
    background: var(--bbai-bg-secondary);
}

body.bbai-dashboard .bbai-ds-filter-pill[aria-pressed='true'],
body.bbai-dashboard .bbai-ds-filter-pill--active {
    border-color: var(--bbai-primary);
    background: var(--bbai-primary-soft);
    color: var(--bbai-primary-dark);
}

body.bbai-dashboard .bbai-ds-filter-pill:focus {
    outline: none;
}

body.bbai-dashboard .bbai-ds-filter-pill:focus-visible {
    outline: var(--bbai-ds-focus-outline);
    outline-offset: var(--bbai-ds-focus-offset);
}

/* -------------------------------------------------------------------------- */
/* Phase 5 — Table / list rows: bbai-admin-table-workspace.css               */
/* Phase 4 — Toolbar; DS row/table primitives (extend with .bbai-row-*)     */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-ds-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-space-2-5) var(--bbai-space-3);
}

body.bbai-dashboard .bbai-ds-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: var(--bbai-space-2);
    min-width: 0;
}

body.bbai-dashboard .bbai-ds-row-actions--row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

body.bbai-dashboard .bbai-ds-status-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-space-1-5);
}

body.bbai-dashboard .bbai-ds-table-row > th,
body.bbai-dashboard .bbai-ds-table-row > td,
body.bbai-dashboard tr.bbai-ds-table-row > th,
body.bbai-dashboard tr.bbai-ds-table-row > td {
    vertical-align: middle;
    border-bottom: 1px solid var(--bbai-border);
    transition: background-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

body.bbai-dashboard tbody tr.bbai-ds-table-row:hover > td,
body.bbai-dashboard .bbai-ds-table-row--div:hover {
    background: var(--bbai-bg-secondary);
}

body.bbai-dashboard .bbai-ds-table-row--div {
    display: grid;
    align-items: center;
    min-height: var(--bbai-space-14);
    padding: var(--bbai-space-3) 0;
    border-bottom: 1px solid var(--bbai-border);
}

/* -------------------------------------------------------------------------- */
/* Compositions — product patterns (opt-in wrappers)                          */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-ds-command-host {
    /* Reserved: align with .bbai-dashboard-hero / banner; use tokens only */
    --bbai-ds-command-pad: var(--bbai-space-6);
}

body.bbai-dashboard .bbai-ds-stat-card {
    box-sizing: border-box;
    padding: var(--bbai-ds-card-padding);
    border-radius: var(--bbai-ds-card-radius);
    border: var(--bbai-ds-card-border);
    background: var(--bbai-ds-card-bg);
    box-shadow: var(--bbai-ds-card-shadow);
}

body.bbai-dashboard .bbai-ds-stat-card__label {
    margin: 0 0 var(--bbai-space-1);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--bbai-tracking-wide);
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-ds-stat-card__value {
    margin: 0;
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-ds-workspace-card {
    box-sizing: border-box;
    padding: var(--bbai-ds-card-padding);
    border-radius: var(--bbai-ds-card-radius);
    border: var(--bbai-ds-card-border);
    background: var(--bbai-ds-card-bg);
    box-shadow: var(--bbai-ds-card-shadow);
}

body.bbai-dashboard .bbai-ds-plan-card {
    box-sizing: border-box;
    padding: var(--bbai-space-5);
    border-radius: var(--bbai-radius-xl);
    border: 1px solid var(--bbai-border);
    background: linear-gradient(145deg, var(--bbai-bg-primary) 0%, var(--bbai-bg-secondary) 100%);
    box-shadow: var(--bbai-shadow-sm);
}

body.bbai-dashboard .bbai-ds-empty {
    box-sizing: border-box;
    padding: var(--bbai-space-10) var(--bbai-space-6);
    text-align: center;
    border-radius: var(--bbai-ds-card-radius);
    border: 1px dashed var(--bbai-border-secondary);
    background: var(--bbai-bg-secondary);
}

body.bbai-dashboard .bbai-ds-empty__title {
    margin: 0 0 var(--bbai-space-2);
    font-size: var(--bbai-ds-subsection-title);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-ds-empty__text {
    margin: 0 auto;
    max-width: 42ch;
    font-size: var(--bbai-ds-body);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-ds-stack {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-3);
}

body.bbai-dashboard .bbai-ds-stack--sm {
    gap: var(--bbai-space-2);
}

body.bbai-dashboard .bbai-ds-stack--lg {
    gap: var(--bbai-space-5);
}

/* -------------------------------------------------------------------------- */
/* Typography utilities + shared page/card aliases                            */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-heading-xl,
body.bbai-dashboard .bbai-page-title {
    font-size: var(--bbai-admin-type-page-title);
    font-weight: var(--bbai-font-bold);
    line-height: 1.1;
    letter-spacing: var(--bbai-tracking-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-heading-lg {
    font-size: var(--bbai-admin-type-section-title);
    font-weight: var(--bbai-font-semibold);
    line-height: 1.15;
    letter-spacing: var(--bbai-tracking-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-heading-md,
body.bbai-dashboard .bbai-card-title {
    font-size: var(--bbai-admin-type-card-title);
    font-weight: var(--bbai-font-semibold);
    line-height: 1.2;
    letter-spacing: var(--bbai-tracking-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-text-body,
body.bbai-dashboard .bbai-page-subtitle,
body.bbai-dashboard .bbai-card-subtitle,
body.bbai-dashboard .bbai-subtitle {
    font-size: var(--bbai-admin-type-body);
    font-weight: var(--bbai-font-normal);
    line-height: 1.55;
    color: var(--bbai-text-secondary);
}

body.bbai-dashboard .bbai-text-muted,
body.bbai-dashboard .bbai-card-meta,
body.bbai-dashboard .bbai-section-meta {
    font-size: var(--bbai-admin-type-meta);
    font-weight: var(--bbai-font-medium);
    line-height: 1.5;
    color: var(--bbai-text-muted);
}

/* Page title scale helper (Settings, Usage, etc.) */
body.bbai-dashboard .bbai-ds-page-title {
    margin: 0 0 var(--bbai-space-2);
    font-size: var(--bbai-ds-page-title);
    font-weight: var(--bbai-font-extrabold);
    line-height: var(--bbai-leading-tight);
    letter-spacing: var(--bbai-tracking-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-ds-page-subtitle {
    margin: 0 0 var(--bbai-space-4);
    max-width: 72ch;
    font-size: var(--bbai-ds-body-lg);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-muted);
}

/* Source: assets/css/system/bbai-admin-semantic-status.css */
/**
 * BeepBeep AI — Phase 4 semantic status system
 *
 * Single visual language for: status badges, filter pills, score pills, row left rails.
 * Tokens: bbai-admin-foundation-tokens.css (--bbai-status-*).
 *
 * Depends: bbai-admin-foundation-tokens, bbai-admin-design-system (toolbar primitives).
 */

/* -------------------------------------------------------------------------- */
/* Badges — product + DS alias                                                   */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-badge,
body.bbai-dashboard .bbai-ds-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: var(--bbai-badge-padding-y) var(--bbai-badge-padding-x);
    border-radius: var(--bbai-badge-radius);
    font-size: var(--bbai-badge-font-size);
    font-weight: var(--bbai-badge-font-weight);
    line-height: var(--bbai-leading-none);
    border: 1px solid transparent;
    vertical-align: middle;
}

body.bbai-dashboard .bbai-badge--neutral,
body.bbai-dashboard .bbai-ds-badge--neutral {
    background: var(--bbai-ds-status-neutral-bg);
    color: var(--bbai-ds-status-neutral-fg);
    border-color: var(--bbai-ds-status-neutral-border);
}

body.bbai-dashboard .bbai-badge--optimized,
body.bbai-dashboard .bbai-badge--success,
body.bbai-dashboard .bbai-ds-badge--success {
    background: var(--bbai-status-optimized-bg);
    color: var(--bbai-status-optimized-fg);
    border-color: var(--bbai-status-optimized-border);
}

body.bbai-dashboard .bbai-badge--needs-review,
body.bbai-dashboard .bbai-badge--warning,
body.bbai-dashboard .bbai-ds-badge--warning {
    background: var(--bbai-status-needs-review-bg);
    color: var(--bbai-status-needs-review-fg);
    border-color: var(--bbai-status-needs-review-border);
}

body.bbai-dashboard .bbai-badge--missing {
    background: var(--bbai-status-missing-bg);
    color: var(--bbai-status-missing-fg);
    border-color: var(--bbai-status-missing-border);
}

body.bbai-dashboard .bbai-ds-badge--error {
    background: var(--bbai-ds-status-error-bg);
    color: var(--bbai-ds-status-error-fg);
    border-color: var(--bbai-ds-status-error-border);
}

body.bbai-dashboard .bbai-badge--info,
body.bbai-dashboard .bbai-ds-badge--info {
    background: var(--bbai-ds-status-info-bg);
    color: var(--bbai-ds-status-info-fg);
    border-color: var(--bbai-ds-status-info-border);
}

/* -------------------------------------------------------------------------- */
/* Score pills (quality tiers)                                                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-score-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-1);
    padding: 3px 8px;
    border-radius: var(--bbai-radius-full);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-snug);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.bbai-dashboard .bbai-score-pill--excellent {
    background: var(--bbai-status-score-excellent-bg);
    color: var(--bbai-status-score-excellent-fg);
    border-color: var(--bbai-status-score-excellent-border);
}

body.bbai-dashboard .bbai-score-pill--good {
    background: var(--bbai-status-score-good-bg);
    color: var(--bbai-status-score-good-fg);
    border-color: var(--bbai-status-score-good-border);
}

body.bbai-dashboard .bbai-score-pill--needs-improvement {
    background: var(--bbai-status-score-needs-improvement-bg);
    color: var(--bbai-status-score-needs-improvement-fg);
    border-color: var(--bbai-status-score-needs-improvement-border);
}

body.bbai-dashboard .bbai-score-pill--poor {
    background: var(--bbai-status-score-poor-bg);
    color: var(--bbai-status-score-poor-fg);
    border-color: var(--bbai-status-score-poor-border);
}

body.bbai-dashboard .bbai-score-pill--critical {
    background: var(--bbai-status-score-critical-bg);
    color: var(--bbai-status-score-critical-fg);
    border-color: var(--bbai-status-score-critical-border);
}

/* Library score badge = score pill family */
body.bbai-dashboard .bbai-library-score-badge {
    border: 1px solid transparent;
}

body.bbai-dashboard .bbai-library-score-badge--good {
    background: var(--bbai-status-score-good-bg);
    color: var(--bbai-status-score-good-fg);
    border-color: var(--bbai-status-score-good-border);
}

body.bbai-dashboard .bbai-library-score-badge--review {
    background: var(--bbai-status-score-needs-improvement-bg);
    color: var(--bbai-status-score-needs-improvement-fg);
    border-color: var(--bbai-status-score-needs-improvement-border);
}

body.bbai-dashboard .bbai-library-score-badge--weak {
    background: var(--bbai-status-score-poor-bg);
    color: var(--bbai-status-score-poor-fg);
    border-color: var(--bbai-status-score-poor-border);
}

body.bbai-dashboard .bbai-library-score-badge--missing {
    background: var(--bbai-status-missing-bg);
    color: var(--bbai-status-missing-fg);
    border-color: var(--bbai-status-missing-border);
}

/* Row status badges in library cards */
body.bbai-dashboard .bbai-library-status-badge--optimized {
    background: var(--bbai-status-optimized-bg);
    color: var(--bbai-status-optimized-fg);
    border: 1px solid var(--bbai-status-optimized-border);
}

body.bbai-dashboard .bbai-library-status-badge--weak {
    background: var(--bbai-status-needs-review-bg);
    color: var(--bbai-status-needs-review-fg);
    border: 1px solid var(--bbai-status-needs-review-border);
}

body.bbai-dashboard .bbai-library-status-badge--missing {
    background: var(--bbai-status-missing-bg);
    color: var(--bbai-status-missing-fg);
    border: 1px solid var(--bbai-status-missing-border);
}

/* -------------------------------------------------------------------------- */
/* Row left accent — reusable hook (library cards already use data-status)      */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-row-accent {
    position: relative;
}

body.bbai-dashboard .bbai-row-accent--missing {
    --bbai-row-rail-current: var(--bbai-status-missing-rail);
    --bbai-row-rail-hover: var(--bbai-status-missing-rail-strong);
    background: var(--bbai-status-missing-row-bg);
}

body.bbai-dashboard .bbai-row-accent--needs-review {
    --bbai-row-rail-current: var(--bbai-status-needs-review-rail);
    --bbai-row-rail-hover: var(--bbai-status-needs-review-rail-strong);
    background: var(--bbai-status-needs-review-row-bg);
}

body.bbai-dashboard .bbai-row-accent--optimized {
    --bbai-row-rail-current: var(--bbai-status-optimized-rail);
    --bbai-row-rail-hover: var(--bbai-status-optimized-rail-strong);
    background: var(--bbai-status-optimized-row-bg);
}

/* -------------------------------------------------------------------------- */
/* Filter pill family — ALT review (all surfaces: library tab + workspace)    */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-filter-pill,
body.bbai-dashboard .bbai-alt-review-filters__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 12px;
    min-height: var(--bbai-ds-control-height-sm);
    font-family: var(--bbai-font-family);
    font-size: 13px;
    font-weight: var(--bbai-font-semibold);
    line-height: 1;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background-color var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease),
        border-color var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease),
        color var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease),
        box-shadow var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease);
}

body.bbai-dashboard .bbai-filter-pill:focus,
body.bbai-dashboard .bbai-alt-review-filters__btn:focus {
    outline: none;
}

body.bbai-dashboard .bbai-filter-pill:focus-visible,
body.bbai-dashboard .bbai-alt-review-filters__btn:focus-visible {
    outline: none;
    z-index: 2;
    box-shadow: var(--bbai-status-filter-focus-ring);
}

body.bbai-dashboard .bbai-filter-pill .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    margin-left: 0;
    padding: 3px 8px;
    border-radius: var(--bbai-radius-full);
    font-size: 12px;
    font-weight: var(--bbai-font-bold);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition:
        background-color var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease),
        border-color var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease),
        color var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease),
        box-shadow var(--bbai-status-filter-transition-duration) var(--bbai-status-filter-transition-ease);
}

/* Neutral / All */
body.bbai-dashboard .bbai-filter-pill--all:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active),
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='all']:not(.bbai-alt-review-filters__btn--active) {
    background: var(--bbai-status-filter-all-inactive-bg);
    border-color: var(--bbai-status-filter-all-inactive-border);
    color: var(--bbai-status-filter-all-inactive-fg);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

body.bbai-dashboard .bbai-filter-pill--all:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active) .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='all']:not(.bbai-alt-review-filters__btn--active) .bbai-alt-review-filters__count {
    color: #475569;
    background: rgba(15, 23, 42, 0.06);
    border-color: var(--bbai-status-filter-count-border-muted);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--all:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active):hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='all']:not(.bbai-alt-review-filters__btn--active):hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: var(--bbai-status-filter-hover-lift);
}

body.bbai-dashboard .bbai-filter-pill--all.bbai-alt-review-filters__btn--active,
body.bbai-dashboard .bbai-filter-pill--all.bbai-filter-pill--active,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='all'].bbai-alt-review-filters__btn--active {
    background: var(--bbai-status-filter-all-active-bg);
    border-color: #020617;
    color: var(--bbai-status-filter-all-active-fg);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

body.bbai-dashboard .bbai-filter-pill--all.bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-filter-pill--all.bbai-filter-pill--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='all'].bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count {
    color: var(--bbai-status-filter-all-count-fg);
    background: var(--bbai-status-filter-count-surface);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--all.bbai-alt-review-filters__btn--active:hover,
body.bbai-dashboard .bbai-filter-pill--all.bbai-filter-pill--active:hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='all'].bbai-alt-review-filters__btn--active:hover {
    background: #020617;
    border-color: #020617;
    color: var(--bbai-status-filter-all-active-fg);
}

/* Missing */
body.bbai-dashboard .bbai-filter-pill--missing:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active),
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing']:not(.bbai-alt-review-filters__btn--active) {
    background: var(--bbai-status-missing-bg);
    border-color: var(--bbai-status-missing-border);
    color: var(--bbai-status-missing-fg);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

body.bbai-dashboard .bbai-filter-pill--missing:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active) .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing']:not(.bbai-alt-review-filters__btn--active) .bbai-alt-review-filters__count {
    color: var(--bbai-status-missing-count-fg);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(201, 122, 0, 0.24);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--missing:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active):hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing']:not(.bbai-alt-review-filters__btn--active):hover {
    background: rgba(255, 247, 237, 0.92);
    border-color: rgba(201, 122, 0, 0.48);
    box-shadow: var(--bbai-status-filter-hover-lift);
}

body.bbai-dashboard .bbai-filter-pill--missing.bbai-alt-review-filters__btn--active,
body.bbai-dashboard .bbai-filter-pill--missing.bbai-filter-pill--active,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing'].bbai-alt-review-filters__btn--active {
    background: var(--bbai-status-missing-active-bg);
    border-color: var(--bbai-status-missing-active-border);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(201, 122, 0, 0.18), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

body.bbai-dashboard .bbai-filter-pill--missing.bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-filter-pill--missing.bbai-filter-pill--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing'].bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count {
    color: var(--bbai-status-missing-count-fg);
    background: var(--bbai-status-filter-count-surface);
    border-color: rgba(190, 18, 60, 0.22);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--missing.bbai-alt-review-filters__btn--active:hover,
body.bbai-dashboard .bbai-filter-pill--missing.bbai-filter-pill--active:hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing'].bbai-alt-review-filters__btn--active:hover {
    background: #9f1239;
    border-color: #881337;
    color: #ffffff;
}

/* Needs review (data-filter weak) */
body.bbai-dashboard .bbai-filter-pill--needs-review:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active),
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak']:not(.bbai-alt-review-filters__btn--active) {
    background: var(--bbai-status-needs-review-bg);
    border-color: var(--bbai-status-needs-review-border);
    color: var(--bbai-status-needs-review-fg);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

body.bbai-dashboard .bbai-filter-pill--needs-review:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active) .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak']:not(.bbai-alt-review-filters__btn--active) .bbai-alt-review-filters__count {
    color: var(--bbai-status-needs-review-count-fg);
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--needs-review:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active):hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak']:not(.bbai-alt-review-filters__btn--active):hover {
    background: rgba(254, 243, 199, 0.88);
    border-color: rgba(217, 119, 6, 0.52);
    box-shadow: var(--bbai-status-filter-hover-lift);
}

body.bbai-dashboard .bbai-filter-pill--needs-review.bbai-alt-review-filters__btn--active,
body.bbai-dashboard .bbai-filter-pill--needs-review.bbai-filter-pill--active,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak'].bbai-alt-review-filters__btn--active {
    background: var(--bbai-status-needs-review-active-bg);
    border-color: var(--bbai-status-needs-review-active-border);
    color: #fffbeb;
    box-shadow: 0 2px 10px rgba(180, 83, 9, 0.18), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

body.bbai-dashboard .bbai-filter-pill--needs-review.bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-filter-pill--needs-review.bbai-filter-pill--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak'].bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count {
    color: var(--bbai-status-needs-review-count-fg);
    background: var(--bbai-status-filter-count-surface);
    border-color: rgba(180, 83, 9, 0.28);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--needs-review.bbai-alt-review-filters__btn--active:hover,
body.bbai-dashboard .bbai-filter-pill--needs-review.bbai-filter-pill--active:hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak'].bbai-alt-review-filters__btn--active:hover {
    background: #92400e;
    border-color: #78350f;
    color: #fffbeb;
}

/* Optimized */
body.bbai-dashboard .bbai-filter-pill--optimized:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active),
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized']:not(.bbai-alt-review-filters__btn--active) {
    background: var(--bbai-status-optimized-bg);
    border-color: var(--bbai-status-optimized-border);
    color: var(--bbai-status-optimized-fg);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

body.bbai-dashboard .bbai-filter-pill--optimized:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active) .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized']:not(.bbai-alt-review-filters__btn--active) .bbai-alt-review-filters__count {
    color: var(--bbai-status-optimized-count-fg);
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(34, 197, 94, 0.22);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--optimized:not(.bbai-alt-review-filters__btn--active):not(.bbai-filter-pill--active):hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized']:not(.bbai-alt-review-filters__btn--active):hover {
    background: rgba(220, 252, 231, 0.9);
    border-color: rgba(22, 163, 74, 0.45);
    box-shadow: var(--bbai-status-filter-hover-lift);
}

body.bbai-dashboard .bbai-filter-pill--optimized.bbai-alt-review-filters__btn--active,
body.bbai-dashboard .bbai-filter-pill--optimized.bbai-filter-pill--active,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized'].bbai-alt-review-filters__btn--active {
    background: var(--bbai-status-optimized-active-bg);
    border-color: var(--bbai-status-optimized-active-border);
    color: #f0fdf4;
    box-shadow: 0 2px 10px rgba(21, 128, 61, 0.18), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

body.bbai-dashboard .bbai-filter-pill--optimized.bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-filter-pill--optimized.bbai-filter-pill--active .bbai-alt-review-filters__count,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized'].bbai-alt-review-filters__btn--active .bbai-alt-review-filters__count {
    color: var(--bbai-status-optimized-count-fg);
    background: var(--bbai-status-filter-count-surface);
    border-color: rgba(21, 128, 61, 0.28);
    box-shadow: var(--bbai-status-filter-count-shadow);
}

body.bbai-dashboard .bbai-filter-pill--optimized.bbai-alt-review-filters__btn--active:hover,
body.bbai-dashboard .bbai-filter-pill--optimized.bbai-filter-pill--active:hover,
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized'].bbai-alt-review-filters__btn--active:hover {
    background: #166534;
    border-color: #14532d;
    color: #f0fdf4;
}

/* Problem emphasis (non-zero queue) */
body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing'].bbai-alt-review-filters__btn--problem:not(.bbai-alt-review-filters__btn--active) {
    border-color: rgba(201, 122, 0, 0.42);
}

body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak'].bbai-alt-review-filters__btn--problem:not(.bbai-alt-review-filters__btn--active) {
    border-color: rgba(217, 164, 65, 0.48);
}

body.bbai-dashboard .bbai-filter-pill.bbai-pill--attention,
body.bbai-dashboard .bbai-alt-review-filters__btn.bbai-pill--attention {
    position: relative;
    isolation: isolate;
}

body.bbai-dashboard .bbai-filter-pill.bbai-pill--attention::after,
body.bbai-dashboard .bbai-alt-review-filters__btn.bbai-pill--attention::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    animation: bbai-soft-breathe 2.8s ease-in-out infinite;
}

body.bbai-dashboard .bbai-pill--attention[data-filter='missing'] {
    --bbai-pill-attention-glow: rgba(201, 122, 0, 0.12);
}

body.bbai-dashboard .bbai-pill--attention[data-filter='weak'] {
    --bbai-pill-attention-glow: rgba(217, 164, 65, 0.12);
}

@keyframes bbai-soft-breathe {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        opacity: 0;
    }

    50% {
        box-shadow: 0 0 0 4px var(--bbai-pill-attention-glow, rgba(15, 23, 42, 0.04));
        opacity: 1;
    }
}

/* Active + focus-visible stacked shadow */
body.bbai-dashboard .bbai-alt-review-filters__btn--active:focus-visible {
    box-shadow: var(--bbai-status-filter-focus-ring), 0 2px 10px rgba(15, 23, 42, 0.12);
}

body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='missing'].bbai-alt-review-filters__btn--active:focus-visible {
    box-shadow: var(--bbai-status-filter-focus-ring), 0 2px 10px rgba(190, 18, 60, 0.2);
}

body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='weak'].bbai-alt-review-filters__btn--active:focus-visible {
    box-shadow: var(--bbai-status-filter-focus-ring), 0 2px 10px rgba(180, 83, 9, 0.18);
}

body.bbai-dashboard .bbai-alt-review-filters__btn[data-filter='optimized'].bbai-alt-review-filters__btn--active:focus-visible {
    box-shadow: var(--bbai-status-filter-focus-ring), 0 2px 10px rgba(21, 128, 61, 0.18);
}

@media (prefers-reduced-motion: reduce) {
    body.bbai-dashboard .bbai-filter-pill,
    body.bbai-dashboard .bbai-alt-review-filters__btn,
    body.bbai-dashboard .bbai-alt-review-filters__count {
        transition: none;
    }

    body.bbai-dashboard .bbai-filter-pill.bbai-pill--attention::after,
    body.bbai-dashboard .bbai-alt-review-filters__btn.bbai-pill--attention::after {
        animation: none;
        opacity: 0;
    }
}

/* Source: assets/css/system/bbai-admin-table-workspace.css */
/**
 * BeepBeep AI — Phase 5 table / workspace row system
 *
 * Structural patterns: .bbai-table*, .bbai-row*, .bbai-row-actions*
 * Bridges: ALT Library (.bbai-library-*), design-system (.bbai-ds-table-row)
 *
 * Depends: bbai-admin-foundation-tokens, bbai-admin-semantic-status (load order)
 */

/* -------------------------------------------------------------------------- */
/* Tokens bridge (dashboard)                                                   */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard {
    --bbai-table-row-pad-y: var(--bbai-admin-table-row-pad-y);
    --bbai-table-row-pad-x: var(--bbai-admin-table-row-pad-x);
    --bbai-table-row-gap-x: var(--bbai-admin-table-row-gap-x);
    --bbai-table-row-gap-y: var(--bbai-admin-table-row-gap-y);
}

/* -------------------------------------------------------------------------- */
/* Table shell — wrappers, semantic <table>                                   */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-table-wrap,
body.bbai-dashboard .bbai-table__scroll {
    overflow-x: auto;
    overflow-y: clip;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

body.bbai-dashboard .bbai-table--workspace {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: transparent;
}

body.bbai-dashboard .bbai-table__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

body.bbai-dashboard .bbai-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-3);
    flex-wrap: wrap;
    padding: 0 0 var(--bbai-space-2);
    border-bottom: 1px solid var(--bbai-border);
    margin-bottom: var(--bbai-space-2);
}

body.bbai-dashboard .bbai-table-header__title {
    margin: 0;
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-primary);
}

/* Semantic data tables (Debug, exports, etc.) */
body.bbai-dashboard .bbai-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--bbai-text-sm);
    line-height: var(--bbai-leading-snug);
    background: var(--bbai-bg-primary);
}

body.bbai-dashboard .bbai-table thead th {
    text-align: left;
    padding: var(--bbai-admin-table-cell-pad-y) var(--bbai-admin-table-cell-pad-x);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--bbai-tracking-wide);
    color: var(--bbai-text-muted);
    background: var(--bbai-admin-table-header-bg);
    border-bottom: var(--bbai-admin-table-border);
    white-space: nowrap;
}

body.bbai-dashboard .bbai-table tbody td {
    padding: var(--bbai-admin-table-cell-pad-y) var(--bbai-admin-table-cell-pad-x);
    vertical-align: middle;
    border-bottom: var(--bbai-admin-table-border);
    color: var(--bbai-text-primary);
    transition: background-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
}

body.bbai-dashboard .bbai-table tbody tr:last-child td {
    border-bottom: none;
}

body.bbai-dashboard .bbai-table tbody tr:hover > td {
    background: var(--bbai-admin-table-hover-bg);
}

body.bbai-dashboard tr.bbai-ds-table-row > td,
body.bbai-dashboard tr.bbai-ds-table-row > th {
    vertical-align: middle;
}

/* -------------------------------------------------------------------------- */
/* Row surface — list / card rows (ALT Library)                                 */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-row,
body.bbai-dashboard .bbai-library-review-card.bbai-row {
    box-sizing: border-box;
    position: relative;
    min-width: 0;
    min-height: 0;
}

body.bbai-dashboard .bbai-row__main,
body.bbai-dashboard .bbai-library-card__main.bbai-row__main {
    min-width: 0;
    width: 100%;
}

body.bbai-dashboard .bbai-row__media,
body.bbai-dashboard .bbai-row__meta,
body.bbai-dashboard .bbai-row__status,
body.bbai-dashboard .bbai-row__content,
body.bbai-dashboard .bbai-row__actions {
    min-width: 0;
}

body.bbai-dashboard .bbai-row__media {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

body.bbai-dashboard .bbai-row__meta {
    align-self: center;
}

body.bbai-dashboard .bbai-row__status {
    align-self: center;
}

body.bbai-dashboard .bbai-row__content {
    align-self: center;
}

body.bbai-dashboard .bbai-row__actions {
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: min(var(--bbai-admin-table-actions-col-max), 100%);
}

@media (min-width: 900px) {
    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main {
        display: grid;
        grid-template-columns:
            minmax(0, min(200px, 20vw))
            minmax(108px, 128px)
            minmax(0, 1fr)
            minmax(var(--bbai-admin-table-actions-col-min), var(--bbai-admin-table-actions-col-max));
        column-gap: var(--bbai-table-row-gap-x);
        row-gap: var(--bbai-table-row-gap-y);
        align-items: center;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main > .bbai-row__meta {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main > .bbai-row__status {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        align-self: center;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main > .bbai-library-card__review-body {
        display: contents;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main .bbai-row__content {
        grid-column: 3;
        grid-row: 1;
        min-width: 0;
        align-self: center;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main .bbai-row__actions {
        grid-column: 4;
        grid-row: 1;
        min-width: 0;
        justify-self: end;
        align-self: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        max-width: var(--bbai-admin-table-actions-col-max);
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__review-body .bbai-library-alt-slot {
        width: 100%;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__review-body .bbai-library-card__action-cluster {
        width: 100%;
        max-width: var(--bbai-admin-table-actions-col-max);
        justify-content: center;
        margin-top: 0;
    }
}

@media (min-width: 1200px) {
    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__main.bbai-row__main {
        grid-template-columns:
            minmax(0, min(220px, 18vw))
            minmax(112px, 136px)
            minmax(0, 1fr)
            minmax(var(--bbai-admin-table-actions-col-min-lg), var(--bbai-admin-table-actions-col-max-lg));
    }
}

/* -------------------------------------------------------------------------- */
/* Row actions column                                                         */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-row-actions,
body.bbai-dashboard .bbai-library-card__action-cluster.bbai-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: var(--bbai-space-2);
    min-width: 0;
    width: 100%;
    margin-top: 0;
}

body.bbai-dashboard .bbai-library-workspace .bbai-library-card__action-cluster.bbai-row-actions .bbai-library-card__quick-actions {
    width: 100%;
}

@media (min-width: 900px) {
    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__action-cluster.bbai-row-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__action-cluster.bbai-row-actions .bbai-library-card__quick-actions {
        flex-direction: column;
        align-items: stretch;
    }

    body.bbai-dashboard .bbai-library-workspace .bbai-library-card__action-cluster.bbai-row-actions .bbai-library-card__quick-action {
        width: 100%;
        min-width: 0;
    }
}

body.bbai-dashboard .bbai-row-actions__primary,
body.bbai-dashboard .bbai-row-actions__secondary {
    flex: 0 0 auto;
    min-width: 0;
}

body.bbai-dashboard .bbai-library-card__extra-actions {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Table meta + pagination                                                    */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-table-meta,
body.bbai-dashboard nav.bbai-pagination.bbai-table-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bbai-space-3);
    flex-wrap: wrap;
    margin-top: var(--bbai-space-4);
    padding-top: var(--bbai-space-4);
    border-top: 1px solid var(--bbai-border);
}

body.bbai-dashboard .bbai-table-meta .bbai-pagination-info,
body.bbai-dashboard .bbai-pagination.bbai-table-meta .bbai-pagination-info {
    font-size: var(--bbai-text-xs);
    line-height: var(--bbai-leading-snug);
    font-weight: var(--bbai-font-medium);
    color: var(--bbai-admin-table-meta-color);
}

body.bbai-dashboard .bbai-pagination-controls,
body.bbai-dashboard .bbai-pagination-pages {
    display: flex;
    align-items: center;
    gap: var(--bbai-space-2);
    flex-wrap: wrap;
}

body.bbai-dashboard .bbai-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.375rem;
    min-height: 2.375rem;
    padding: 0 var(--bbai-space-3);
    border-radius: var(--bbai-radius-md);
    border: 1px solid var(--bbai-border);
    background: var(--bbai-bg-primary);
    color: var(--bbai-text-secondary);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color var(--bbai-transition-fast) var(--bbai-ease-out),
        background-color var(--bbai-transition-fast) var(--bbai-ease-out),
        color var(--bbai-transition-fast) var(--bbai-ease-out),
        box-shadow var(--bbai-transition-fast) var(--bbai-ease-out);
}

body.bbai-dashboard .bbai-pagination-btn:hover:not(.bbai-pagination-btn--current):not(.bbai-pagination-btn--disabled) {
    border-color: var(--bbai-border-secondary);
    background: var(--bbai-bg-secondary);
    box-shadow: var(--bbai-shadow-sm);
}

body.bbai-dashboard .bbai-pagination-btn--current {
    background: var(--bbai-primary);
    border-color: var(--bbai-primary);
    color: var(--bbai-text-inverse);
    cursor: default;
}

body.bbai-dashboard .bbai-pagination-ellipsis {
    color: var(--bbai-text-muted);
    font-size: var(--bbai-text-sm);
    padding: 0 var(--bbai-space-1);
    user-select: none;
}

@media (max-width: 782px) {
    body.bbai-dashboard .bbai-table-meta,
    body.bbai-dashboard nav.bbai-pagination.bbai-table-meta {
        flex-direction: column;
        align-items: stretch;
    }

    body.bbai-dashboard .bbai-pagination-controls {
        justify-content: flex-start;
    }
}

/* -------------------------------------------------------------------------- */
/* Empty states                                                               */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-table-empty {
    box-sizing: border-box;
    text-align: center;
}

body.bbai-dashboard .bbai-table-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto var(--bbai-space-4);
    border-radius: var(--bbai-radius-xl);
    background: var(--bbai-bg-secondary);
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-table-empty__title {
    margin: 0;
    font-size: var(--bbai-text-xl);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-tight);
    letter-spacing: -0.02em;
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-table-empty__copy {
    margin: var(--bbai-space-3) auto 0;
    max-width: 36rem;
    font-size: var(--bbai-text-sm);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-table-empty__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-2);
    flex-wrap: wrap;
    margin-top: var(--bbai-space-6);
}

/* Filter / inline empty (inside list body) */
body.bbai-dashboard .bbai-library-filter-empty.bbai-table-empty--inline {
    width: 100%;
}

body.bbai-dashboard .bbai-library-empty-card,
body.bbai-dashboard .bbai-table-empty__panel {
    padding: var(--bbai-space-6) var(--bbai-space-5);
    margin-top: var(--bbai-space-1);
    border-radius: var(--bbai-radius-xl);
    border: 1px dashed var(--bbai-border);
    background: linear-gradient(180deg, var(--bbai-bg-secondary) 0%, var(--bbai-bg-primary) 100%);
    text-align: center;
}

body.bbai-dashboard .bbai-library-empty-card__title,
body.bbai-dashboard .bbai-table-empty__panel-title {
    margin: 0;
    font-size: var(--bbai-text-lg);
    font-weight: var(--bbai-font-bold);
    line-height: var(--bbai-leading-tight);
    color: var(--bbai-text-primary);
}

body.bbai-dashboard .bbai-library-empty-card__copy,
body.bbai-dashboard .bbai-table-empty__panel-copy {
    margin: var(--bbai-space-2) auto 0;
    max-width: 30rem;
    font-size: var(--bbai-text-sm);
    line-height: var(--bbai-leading-relaxed);
    color: var(--bbai-text-muted);
}

body.bbai-dashboard .bbai-library-empty-card__actions,
body.bbai-dashboard .bbai-table-empty__panel-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bbai-space-2);
    flex-wrap: wrap;
    margin-top: var(--bbai-space-4);
}

body.bbai-dashboard .bbai-table-empty--cell {
    padding: var(--bbai-space-8) var(--bbai-space-4) !important;
    text-align: center;
    color: var(--bbai-text-muted);
    font-size: var(--bbai-text-sm);
    vertical-align: middle;
}

/* ALT Library — full empty (no images) keeps workspace rhythm */
body.bbai-dashboard .bbai-library-workspace .bbai-library-empty-state.bbai-table-empty {
    padding: var(--bbai-space-8);
    border-radius: var(--bbai-radius-xl);
    border: 1px solid var(--bbai-border);
    background: linear-gradient(180deg, var(--bbai-bg-secondary) 0%, var(--bbai-bg-primary) 100%);
    box-shadow: var(--bbai-shadow-sm);
}

body.bbai-dashboard .bbai-library-workspace-card__table-surface .bbai-pagination.bbai-table-meta {
    margin: var(--bbai-space-3) 0 0;
    padding: var(--bbai-space-3) 0 var(--bbai-space-2);
    border-top: 1px solid var(--bbai-border);
}

/* Source: assets/css/system/bbai-admin-page-adoption.css */
/**
 * BeepBeep AI — Phase 6 page adoption (Usage + shared shells)
 *
 * Uses foundation + surface tokens only. Depends on surfaces / semantic-status.
 * Scope: body.bbai-dashboard
 */

/* -------------------------------------------------------------------------- */
/* Usage workspace root                                                         */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-credit-usage-page.bbai-usage-workspace {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.bbai-dashboard .bbai-usage-back-wrap {
    margin-bottom: var(--bbai-admin-space-card-gap, var(--card-gap, 16px));
}

body.bbai-dashboard .bbai-usage-after-banner {
    margin-top: var(--bbai-admin-space-section, var(--section-spacing, 24px));
}

/* -------------------------------------------------------------------------- */
/* Usage insights — standard card (not a banner; shared section header)         */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-usage-insights-card {
    margin-bottom: var(--bbai-admin-space-section, var(--section-spacing, 24px));
    overflow: hidden;
    border-left: var(--bbai-status-row-rail-width, 3px) solid var(--bbai-status-neutral-indicator);
}

body.bbai-dashboard .bbai-usage-insights-card--healthy {
    border-left-color: var(--bbai-status-optimized-accent);
}

body.bbai-dashboard .bbai-usage-insights-card--warning {
    border-left-color: var(--bbai-status-needs-review-accent);
}

body.bbai-dashboard .bbai-usage-insights-card--danger {
    border-left-color: var(--bbai-status-missing-accent);
}

body.bbai-dashboard .bbai-usage-insights-card__header {
    padding: var(--bbai-card-padding-y-header) var(--bbai-card-padding-x) var(--bbai-space-3);
    border-bottom: 1px solid var(--bbai-surface-divider-color);
}

body.bbai-dashboard .bbai-usage-insights-card.bbai-card {
    padding: 0;
}

body.bbai-dashboard .bbai-usage-insights-card__body {
    padding: var(--bbai-card-padding-y-body) var(--bbai-card-padding-x) var(--bbai-card-padding-y-body);
}

body.bbai-dashboard .bbai-usage-insights-card__footer {
    margin: 0;
    font-size: var(--bbai-card-description-size, 14px);
}

/* -------------------------------------------------------------------------- */
/* Usage activity card — interior rhythm                                      */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-usage-activity-section.bbai-card {
    overflow: hidden;
    margin-bottom: var(--bbai-admin-space-section, var(--section-spacing, 24px));
}

body.bbai-dashboard .bbai-usage-activity-section.bbai-card {
    padding: 0;
}

body.bbai-dashboard .bbai-usage-activity-section__header {
    padding: var(--bbai-card-padding-y-header) var(--bbai-card-padding-x) var(--bbai-card-padding-y-header);
    border-bottom: 1px solid var(--bbai-surface-divider-color);
}

body.bbai-dashboard .bbai-usage-activity-section__body {
    padding: var(--bbai-card-padding-y-body) var(--bbai-card-padding-x) var(--bbai-card-section-gap);
}

/* -------------------------------------------------------------------------- */
/* Credit activity results title                                              */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-credit-activity-results .bbai-card-title {
    margin: 0 0 var(--bbai-rhythm-title-to-description, var(--bbai-space-2));
}

/* -------------------------------------------------------------------------- */
/* Usage log table — row affordance                                             */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-usage-table {
    width: 100%;
}

body.bbai-dashboard .bbai-usage-table__row {
    transition: background-color 0.16s ease;
}

body.bbai-dashboard .bbai-usage-table__row.is-clickable {
    cursor: pointer;
}

body.bbai-dashboard .bbai-usage-table__row.is-clickable:hover,
body.bbai-dashboard .bbai-usage-table__row.is-clickable:focus-within {
    background: var(--bbai-admin-table-hover-bg, var(--bbai-bg-secondary));
}

body.bbai-dashboard .bbai-table-subtitle {
    font-size: var(--bbai-admin-type-caption);
    color: var(--bbai-admin-color-text-muted);
    margin-top: var(--bbai-space-0-5, 2px);
}

/* -------------------------------------------------------------------------- */
/* Billing + contributors                                                       */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-usage-billing {
    border-radius: var(--bbai-surface-card-radius);
    border: var(--bbai-surface-card-border);
    background: var(--bbai-surface-soft-bg);
    padding: var(--bbai-space-5) var(--bbai-space-6);
    margin-bottom: var(--bbai-admin-space-section, var(--section-spacing, 24px));
}

body.bbai-dashboard .bbai-usage-billing__title {
    margin: 0 0 var(--bbai-admin-space-3);
}

/* Billing block title uses section title scale (not eyebrow/label) */
body.bbai-dashboard .bbai-usage-billing__title.bbai-section-title {
    font-size: var(--bbai-section-title-size, var(--bbai-text-lg));
    font-weight: var(--bbai-section-title-weight, 600);
    line-height: var(--bbai-section-title-leading, 25px);
    letter-spacing: var(--bbai-section-title-tracking, -0.02em);
    color: var(--bbai-section-title-color, #0f172a);
    text-transform: none;
}

body.bbai-dashboard .bbai-usage-billing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--bbai-admin-space-3) var(--bbai-admin-space-6);
    margin-bottom: var(--bbai-admin-space-3);
}

body.bbai-dashboard .bbai-usage-billing__item dt {
    margin: 0 0 var(--bbai-space-1);
    font-size: var(--bbai-admin-type-label);
    font-weight: var(--bbai-font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--bbai-tracking-wide);
    color: var(--bbai-admin-color-text-muted);
}

body.bbai-dashboard .bbai-usage-billing__item dd {
    margin: 0;
    font-size: var(--bbai-admin-type-body-lg);
    font-weight: var(--bbai-admin-type-weight-semibold);
    color: var(--bbai-admin-color-text);
    line-height: var(--bbai-admin-type-leading-snug);
}

body.bbai-dashboard .bbai-usage-billing__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bbai-admin-space-3) var(--bbai-admin-space-4);
    padding-top: var(--bbai-admin-space-3);
    border-top: 1px solid var(--bbai-surface-divider-color);
    font-size: var(--bbai-admin-type-body-sm);
}

body.bbai-dashboard .bbai-usage-billing__links a {
    color: var(--bbai-admin-color-primary);
    text-decoration: none;
    font-weight: var(--bbai-admin-type-weight-semibold);
}

body.bbai-dashboard .bbai-usage-billing__links a:hover {
    text-decoration: underline;
}

body.bbai-dashboard .bbai-usage-billing__note {
    margin: var(--bbai-admin-space-3) 0 0;
    font-size: var(--bbai-admin-type-caption);
    color: var(--bbai-admin-color-text-muted);
    line-height: var(--bbai-admin-type-leading-snug);
}

body.bbai-dashboard .bbai-usage-contributors {
    border-radius: var(--bbai-surface-card-radius);
    border: var(--bbai-surface-card-border);
    background: var(--bbai-surface-card-bg);
    box-shadow: var(--bbai-surface-card-shadow);
    padding: var(--bbai-space-4) var(--bbai-space-5);
    margin-bottom: var(--bbai-admin-space-card-gap, var(--card-gap, 16px));
}

body.bbai-dashboard .bbai-usage-contributors__title {
    margin: 0 0 var(--bbai-space-1);
}

body.bbai-dashboard .bbai-usage-contributors__lead {
    margin: 0 0 var(--bbai-admin-space-3);
    font-size: var(--bbai-admin-type-meta);
    color: var(--bbai-admin-color-text-muted);
    line-height: var(--bbai-admin-type-leading-snug);
}

body.bbai-dashboard .bbai-usage-contributors .widefat {
    font-size: var(--bbai-admin-type-body-sm);
}

body.bbai-dashboard .bbai-usage-contributors .widefat th,
body.bbai-dashboard .bbai-usage-contributors .widefat td {
    padding: var(--bbai-space-2) 10px;
}

body.bbai-dashboard .bbai-usage-supplemental {
    margin-top: var(--bbai-admin-space-card-gap, var(--card-gap, 16px));
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    body.bbai-dashboard .bbai-usage-activity-section__header,
    body.bbai-dashboard .bbai-usage-activity-section__body {
        padding-left: var(--bbai-space-5);
        padding-right: var(--bbai-space-5);
    }
}

/* Source: assets/css/system/bbai-admin-surface-taxonomy.css */
/**
 * Top-of-page surface taxonomy: primary banner vs compact status strip vs cards.
 * Banners use .bbai-banner (product-banner.css). Strips use .bbai-status-strip.
 *
 * @package BeepBeep_AI
 */

/* ── Compact status strip (subordinate to primary banner; not a second hero) ─ */
/* Retention uses .bbai-retention-strip for its own chrome — exclude from neutral shell */
body.bbai-dashboard .bbai-status-strip:not(.bbai-retention-strip) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--card-gap, var(--bbai-space-4));
    padding: var(--bbai-rhythm-strip-padding-block, var(--bbai-space-3)) var(--bbai-rhythm-strip-padding-inline, var(--bbai-space-4));
    border-radius: 10px;
    border: 1px solid var(--bbai-border-muted, #e5e7eb);
    background: var(--bbai-surface-soft, #f8fafc);
    box-shadow: none;
}

body.bbai-dashboard .bbai-status-strip__main {
    min-width: 0;
}

body.bbai-dashboard .bbai-status-strip__eyebrow {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

body.bbai-dashboard .bbai-status-strip__title {
    margin: 0 0 var(--bbai-space-1);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

body.bbai-dashboard .bbai-status-strip__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
}

body.bbai-dashboard .bbai-status-strip__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--bbai-rhythm-strip-stack-gap, var(--bbai-space-2));
    margin-top: var(--bbai-rhythm-strip-actions-margin-top, var(--bbai-space-3));
}

body.bbai-dashboard .bbai-status-strip__actions--row {
    flex-direction: row;
    justify-content: flex-start;
}

/* First-win milestone — compact strip, not a second command hero */
body.bbai-dashboard .bbai-first-win-strip {
    border-color: #cfe9d8;
    background: linear-gradient(135deg, #f7fff9 0%, #f4fbf7 100%);
}

body.bbai-dashboard .bbai-first-win-strip .bbai-btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
}

/* Retention: same vertical rhythm as other strips, lighter than a second banner */
body.bbai-dashboard .bbai-retention-strip {
    margin-bottom: 16px;
    box-shadow: none;
}

/* Source: assets/css/system/bbai-admin-library-workspace-polish.css */
/**
 * Phase 6 — ALT Library workspace polish (extracted from library-tab.php)
 * Scoped to body.bbai-dashboard
 * Owns the former inline <style id="bbai-library-workspace-styles"> block from library-workspace.php.
 */


    body.bbai-dashboard #bbai-alt-coverage-card,
    body.bbai-dashboard #bbai-review-filter-tabs { display: block !important; visibility: visible !important; opacity: 1 !important; }
    /* Banner → library card: same gap as Dashboard plan hero → command row (command-hero-host.css). */
    body.bbai-dashboard .bbai-library-workspace #bbai-alt-coverage-card.bbai-library-surface-root {
        --bbai-command-banner-gap: var(--section-spacing, var(--bbai-space-6));
        margin-bottom: var(--bbai-command-banner-gap, 24px);
    }
    body.bbai-dashboard .bbai-library-workspace #bbai-alt-coverage-card.bbai-library-surface-root > .bbai-command-hero-host.bbai-hero-full,
    body.bbai-dashboard .bbai-library-workspace #bbai-alt-coverage-card.bbai-library-surface-root > .bbai-hero-full {
        margin-bottom: 0;
    }
    body.bbai-dashboard .bbai-toolbar.bbai-library-toolbar { margin: var(--card-gap, 16px) 0 var(--card-gap, 16px); }
    body.bbai-dashboard .bbai-library-summary-card,
    body.bbai-dashboard .bbai-library-selection-bar {
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    }
    body.bbai-dashboard .bbai-library-summary-card { padding: var(--section-spacing, 24px); margin: var(--section-spacing, 24px) 0 var(--card-gap, 16px); }
    body.bbai-dashboard .bbai-library-summary-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--section-spacing, 24px); }
    body.bbai-dashboard .bbai-library-summary-card__eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 8px;
        font-size: var(--bbai-admin-type-label, 12px);
        font-weight: var(--bbai-admin-type-weight-semibold, 600);
        letter-spacing: .12em;
        text-transform: uppercase;
        color: #0f766e;
    }
    body.bbai-dashboard .bbai-library-summary-card__title { margin: 0; font-size: var(--bbai-admin-type-section-title, 24px); line-height: 1.15; color: var(--bbai-admin-color-text, #0f172a); }
    body.bbai-dashboard .bbai-library-summary-card__copy { margin: 8px 0 0; max-width: 640px; font-size: var(--bbai-admin-type-body, 14px); line-height: 1.55; color: var(--bbai-admin-color-text-secondary, #475569); }
    body.bbai-dashboard .bbai-library-summary-card__stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--card-gap, 16px);
        margin: var(--section-spacing, 24px) 0 var(--card-gap, 16px);
    }
    body.bbai-dashboard .bbai-library-summary-card__stat {
        padding: 14px 16px;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
    }
    body.bbai-dashboard .bbai-library-summary-card__stat-label { display: block; font-size: var(--bbai-admin-type-meta, 13px); color: var(--bbai-admin-color-text-muted, #64748b); }
    body.bbai-dashboard .bbai-library-summary-card__stat-value { display: block; margin-top: 6px; font-size: var(--bbai-text-3xl, 28px); font-weight: var(--bbai-admin-type-weight-bold, 700); color: var(--bbai-admin-color-text, #0f172a); }
    body.bbai-dashboard .bbai-library-summary-card__stat--optimized { border-color: #bbf7d0; background: #f0fdf4; }
    body.bbai-dashboard .bbai-library-summary-card__stat--weak { border-color: #fde68a; background: #fffbeb; }
    body.bbai-dashboard .bbai-library-summary-card__stat--missing {
        border-color: #e2e8f0;
        background: #ffffff;
        box-shadow: inset 3px 0 0 rgba(201, 122, 0, 0.38);
    }
    body.bbai-dashboard .bbai-library-summary-card__bar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--card-gap, 16px);
        align-items: center;
    }
    body.bbai-dashboard .bbai-library-summary-card__progress {
        grid-column: 1 / -1;
        height: 12px;
        border-radius: 999px;
        overflow: hidden;
        background: #e2e8f0;
        display: flex;
    }
    body.bbai-dashboard .bbai-library-summary-card__segment { height: 100%; display: block; }
    body.bbai-dashboard .bbai-library-summary-card__segment--optimized { background: linear-gradient(90deg, #20b26c 0%, #22b573 100%); }
    body.bbai-dashboard .bbai-library-summary-card__segment--weak { background: linear-gradient(90deg, #d9a441 0%, #e0b35a 100%); }
    body.bbai-dashboard .bbai-library-summary-card__segment--missing { background: linear-gradient(90deg, #c97a00 0%, #d48806 100%); }
    body.bbai-dashboard .bbai-library-summary-card__foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--card-gap, 16px);
        margin-top: var(--card-gap, 16px);
        color: var(--bbai-admin-color-text-secondary, #475569);
        font-size: var(--bbai-admin-type-meta, 13px);
    }
    body.bbai-dashboard .bbai-library-summary-card__foot strong { color: var(--bbai-admin-color-text, #0f172a); }
    body.bbai-dashboard .bbai-library-guidance-host {
        margin-bottom: var(--card-gap, 16px);
    }
    body.bbai-dashboard .bbai-library-credits-banner-host {
        margin-top: var(--card-gap, 16px);
    }
    body.bbai-dashboard .bbai-library-workspace-cta-host {
        padding: 0 var(--bbai-ws-space-lg) var(--bbai-ws-space-sm);
    }
    body.bbai-dashboard .bbai-library-bulk-banner {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--card-gap, 16px);
        margin: 0 0 var(--card-gap, 16px);
        padding: 20px 22px;
        border-radius: 18px;
        border: 1px solid #fcd34d;
        background: linear-gradient(180deg, #fffdf5 0%, #fffbeb 100%);
        box-shadow: 0 18px 40px rgba(120, 53, 15, 0.08);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--ready {
        border-color: #dbe7f5;
        background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--blocked {
        border-color: #fecaca;
        background: linear-gradient(180deg, #fff7f7 0%, #fef2f2 100%);
        box-shadow: 0 18px 40px rgba(153, 27, 27, 0.08);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--workspace {
        margin: 0;
        padding: 16px 18px;
        border-radius: 16px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__main {
        display: flex;
        align-items: flex-start;
        gap: var(--card-gap, 16px);
        min-width: 0;
        flex: 1;
    }
    body.bbai-dashboard .bbai-library-bulk-banner__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        border-radius: 12px;
        color: #b45309;
        background: rgba(251, 191, 36, 0.18);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--ready .bbai-library-bulk-banner__icon {
        color: #1d4ed8;
        background: rgba(59, 130, 246, 0.12);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--blocked .bbai-library-bulk-banner__icon {
        color: #b91c1c;
        background: rgba(239, 68, 68, 0.12);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__eyebrow {
        margin: 0 0 6px;
        font-size: var(--bbai-admin-type-label, 12px);
        font-weight: var(--bbai-admin-type-weight-semibold, 600);
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #92400e;
    }
    body.bbai-dashboard .bbai-library-bulk-banner--ready .bbai-library-bulk-banner__eyebrow {
        color: #1d4ed8;
    }
    body.bbai-dashboard .bbai-library-bulk-banner--blocked .bbai-library-bulk-banner__eyebrow {
        color: #b91c1c;
    }
    body.bbai-dashboard .bbai-library-bulk-banner__title {
        margin: 0;
        font-size: var(--bbai-admin-type-card-title, 20px);
        line-height: 1.15;
        color: var(--bbai-admin-color-text, #111827);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__copy {
        margin: 8px 0 0;
        color: var(--bbai-admin-color-text-secondary, #4b5563);
        font-size: var(--bbai-admin-type-body, 14px);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__stats {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 12px 0 0;
    }
    body.bbai-dashboard .bbai-library-bulk-banner__fact {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.82);
        border: 1px solid rgba(148, 163, 184, 0.2);
        color: #334155;
        font-size: var(--bbai-admin-type-meta, 13px);
        font-weight: var(--bbai-admin-type-weight-medium, 500);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__fact strong {
        color: #0f172a;
    }
    body.bbai-dashboard .bbai-library-bulk-banner--blocked .bbai-library-bulk-banner__fact {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(98, 116, 184, 0.28);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__meta {
        margin: 10px 0 0;
        color: #92400e;
        font-size: var(--bbai-admin-type-meta, 13px);
        font-weight: var(--bbai-admin-type-weight-semibold, 600);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--ready .bbai-library-bulk-banner__meta {
        color: #1e40af;
    }
    body.bbai-dashboard .bbai-library-bulk-banner--blocked .bbai-library-bulk-banner__meta {
        color: #b91c1c;
    }
    body.bbai-dashboard .bbai-library-bulk-banner__actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--card-gap, 16px);
        flex: 0 0 auto;
    }
    body.bbai-dashboard .bbai-library-bulk-banner__cta {
        min-width: 232px;
        justify-content: center;
        box-shadow: var(--bbai-admin-btn-primary-shadow);
    }
    body.bbai-dashboard .bbai-library-bulk-banner__cta--secondary {
        min-width: 232px;
        justify-content: center;
    }
    body.bbai-dashboard .bbai-library-bulk-banner__plan-note {
        margin: 0;
        color: #92400e;
        font-size: var(--bbai-admin-type-label, 12px);
        font-weight: var(--bbai-admin-type-weight-semibold, 600);
    }
    body.bbai-dashboard .bbai-library-bulk-banner--ready .bbai-library-bulk-banner__plan-note {
        color: #475569;
    }
    body.bbai-dashboard .bbai-library-bulk-banner--blocked .bbai-library-bulk-banner__plan-note {
        color: #991b1b;
    }
    body.bbai-dashboard .bbai-library-selection-bar {
        position: sticky;
        top: var(--section-spacing, 24px);
        z-index: 6;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--card-gap, 16px);
        padding: 14px 18px;
        margin: 0 0 var(--card-gap, 16px);
    }
    body.bbai-dashboard .bbai-library-selection-bar__summary {
        display: flex;
        align-items: center;
        gap: var(--card-gap, 16px);
        min-width: 0;
        flex-wrap: wrap;
    }
    body.bbai-dashboard .bbai-library-selection-bar__lead {
        display: inline-flex;
        align-items: center;
        gap: var(--card-gap, 16px);
        font-weight: 700;
        color: #0f172a;
    }
    body.bbai-dashboard .bbai-library-selection-bar__count { font-size: var(--bbai-admin-type-body, 14px); color: var(--bbai-admin-color-text-secondary, #475569); }
    body.bbai-dashboard .bbai-library-selection-bar__actions { display: flex; align-items: center; gap: var(--card-gap, 16px); flex-wrap: wrap; }
    body.bbai-dashboard .bbai-library-selection-bar .bbai-toolbar__btn { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
    body.bbai-dashboard .bbai-library-selection-bar .bbai-toolbar__btn:disabled { opacity: var(--bbai-admin-interaction-disabled-opacity); cursor: not-allowed; }
    body.bbai-dashboard .bbai-library-table-wrapper { margin-top: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05); }
    body.bbai-dashboard .bbai-library-table thead th {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .12em;
        color: #64748b;
        background: #f8fafc;
    }
    body.bbai-dashboard .bbai-library-table tbody td { vertical-align: top; border-bottom: 1px solid #edf2f7; }
    body.bbai-dashboard .bbai-library-table tbody tr:hover,
    body.bbai-dashboard .bbai-library-table tbody tr:hover > td { background: var(--bbai-admin-table-hover-bg) !important; }
    body.bbai-dashboard .bbai-library-row--hidden { display: none; }
    body.bbai-dashboard .bbai-library-cell--select { width: 56px; }
    body.bbai-dashboard .bbai-library-cell--asset { width: 270px; }
    body.bbai-dashboard .bbai-library-cell--alt-text { width: 42%; min-width: 320px; }
    body.bbai-dashboard .bbai-library-cell--status { width: 280px; }
    body.bbai-dashboard .bbai-library-asset { display: flex; gap: 14px; }
    body.bbai-dashboard .bbai-library-thumbnail-button {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        padding: 0;
        cursor: pointer;
    }
    body.bbai-dashboard .bbai-library-thumbnail,
    body.bbai-dashboard .bbai-library-thumbnail-placeholder {
        width: 72px;
        height: 72px;
        border-radius: 16px;
        object-fit: cover;
        background: #e2e8f0;
        border: 1px solid #dbeafe;
    }
    body.bbai-dashboard .bbai-library-hover-preview {
        position: absolute;
        left: calc(100% + 14px);
        top: 50%;
        transform: translateY(-50%);
        width: 190px;
        padding: 10px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
        z-index: 4;
    }
    body.bbai-dashboard .bbai-library-hover-preview img { display: block; width: 100%; border-radius: 12px; }
    body.bbai-dashboard .bbai-library-thumbnail-button:hover .bbai-library-hover-preview,
    body.bbai-dashboard .bbai-library-thumbnail-button:focus-visible .bbai-library-hover-preview {
        opacity: 1;
        transform: translateY(-50%) scale(1.01);
    }
    body.bbai-dashboard .bbai-library-info-cell { display: flex; flex-direction: column; gap: 6px; }
    body.bbai-dashboard .bbai-library-info-name { font-size: 14px; font-weight: 700; color: #0f172a; word-break: break-word; }
    body.bbai-dashboard .bbai-library-info-meta,
    body.bbai-dashboard .bbai-library-info-updated { font-size: 12px; color: #64748b; }
    body.bbai-dashboard .bbai-library-review-block { display: flex; flex-direction: column; gap: 8px; }
    body.bbai-dashboard .bbai-library-review-label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 700;
        color: #475569;
        text-transform: uppercase;
        letter-spacing: .08em;
    }
    body.bbai-dashboard .bbai-library-review-tip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        border: 1px solid #cbd5e1;
        color: #475569;
        background: #ffffff;
    }
    body.bbai-dashboard .bbai-library-alt-trigger {
        width: 100%;
        min-height: 70px;
        padding: 14px 16px;
        border-radius: 14px;
        border: 1px solid #dbe4ee;
        background: #ffffff;
        text-align: left;
        cursor: text;
        transition: border-color var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease), box-shadow var(--bbai-admin-ix-duration) var(--bbai-admin-ix-ease);
    }
    body.bbai-dashboard .bbai-library-alt-trigger:hover,
    body.bbai-dashboard .bbai-library-alt-trigger:focus-visible {
        border-color: #38bdf8;
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
        outline: none;
    }
    body.bbai-dashboard .bbai-alt-text-preview {
        font-size: 14px;
        line-height: 1.55;
        color: #0f172a;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        white-space: normal;
    }
    body.bbai-dashboard .bbai-alt-text-missing { font-size: 13px; color: #64748b; font-style: italic; }
    body.bbai-dashboard .bbai-library-alt-helper { margin: 0; font-size: 12px; color: #64748b; }
    body.bbai-dashboard .bbai-library-alt-summary { margin: 0; font-size: 12px; color: #92400e; }
    body.bbai-dashboard .bbai-library-inline-edit { display: flex; flex-direction: column; gap: 10px; }
    body.bbai-dashboard .bbai-library-inline-edit__textarea {
        width: 100%;
        min-height: 96px;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid #38bdf8;
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
        resize: vertical;
    }
    body.bbai-dashboard .bbai-library-inline-edit__actions { display: flex; align-items: center; gap: 8px; }
    body.bbai-dashboard .bbai-library-inline-edit__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        background: #ffffff;
        color: #334155;
        cursor: pointer;
    }
    body.bbai-dashboard .bbai-library-inline-edit__icon--save { background: #dcfce7; border-color: #86efac; color: #166534; }
    body.bbai-dashboard .bbai-library-inline-edit__error { margin: 0; min-height: 18px; font-size: 12px; color: #dc2626; }
    body.bbai-dashboard .bbai-library-status-stack { display: flex; flex-direction: column; gap: 12px; }
    body.bbai-dashboard .bbai-library-status-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 12px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
        width: fit-content;
    }
    body.bbai-dashboard .bbai-library-status-badge--optimized { background: #dcfce7; color: #166534; }
    body.bbai-dashboard .bbai-library-status-badge--weak { background: #fff8e8; color: #7c5719; border: 1px solid rgba(217, 164, 65, 0.34); }
    body.bbai-dashboard .bbai-library-status-badge--missing { background: #fff7ed; color: #805112; border: 1px solid rgba(201, 122, 0, 0.28); }
    body.bbai-dashboard .bbai-library-status-copy { margin: 0; font-size: 12px; color: #64748b; }
    body.bbai-dashboard .bbai-library-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
    body.bbai-dashboard .bbai-library-actions__main { display: flex; flex-direction: column; gap: 6px; }
    body.bbai-dashboard .bbai-library-actions__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    body.bbai-dashboard .bbai-row-action-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        background: #ffffff;
        color: #334155;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        transition: var(--bbai-admin-ix-transition-interactive);
    }
    body.bbai-dashboard .bbai-row-action-btn:focus-visible {
        outline: var(--bbai-ds-focus-outline);
        outline-offset: 2px;
    }
    body.bbai-dashboard .bbai-row-action-btn:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; box-shadow: var(--bbai-admin-ix-hover-lift-shadow); }
    body.bbai-dashboard .bbai-row-action-btn:active:not(:disabled) { filter: var(--bbai-admin-ix-filter-press); }
    body.bbai-dashboard .bbai-row-action-btn svg { flex: 0 0 auto; }
    body.bbai-dashboard .bbai-row-action-btn--primary {
        background: var(--bbai-cta-primary-bg, #10b981);
        border-color: var(--bbai-cta-primary-bg-active, #047857);
        color: #ffffff;
    }
    body.bbai-dashboard .bbai-row-action-btn--primary:hover:not(:disabled) {
        background: var(--bbai-cta-primary-bg-hover, #059669);
        border-color: var(--bbai-cta-primary-bg-active, #047857);
    }
    body.bbai-dashboard .bbai-row-action-btn--primary:focus-visible {
        outline: var(--bbai-ds-focus-outline);
        outline-offset: 2px;
    }
    body.bbai-dashboard .bbai-row-action-btn--primary:active:not(:disabled) { filter: var(--bbai-admin-ix-filter-press-primary); }
    body.bbai-dashboard .bbai-row-action-btn--ghost {
        background: #ffffff;
        border-color: #e2e8f0;
        color: #64748b;
        font-weight: 600;
    }
    body.bbai-dashboard .bbai-row-action-btn--ghost:hover:not(:disabled) {
        background: #f8fafc;
        border-color: #cbd5e1;
        color: #334155;
    }
    body.bbai-dashboard .bbai-row-action-btn--ghost:focus-visible {
        outline: var(--bbai-ds-focus-outline);
        outline-offset: 2px;
    }
    body.bbai-dashboard .bbai-row-action-btn--ghost.bbai-is-locked {
        cursor: pointer;
        background: #fffbeb;
        border-color: #fde68a;
        color: #b45309;
    }
    body.bbai-dashboard .bbai-row-action-btn.is-loading { opacity: var(--bbai-admin-ix-loading-opacity); pointer-events: none; cursor: progress; }
    body.bbai-dashboard .bbai-row-action-spinner {
        width: 12px;
        height: 12px;
        border-radius: 999px;
        border: 2px solid currentColor;
        border-right-color: transparent;
        animation: bbai-ix-spin 0.7s linear infinite;
    }
    body.bbai-dashboard .bbai-library-reviewing { display: inline-flex; align-items: center; gap: 8px; color: #0f172a; font-size: 13px; font-weight: 600; }
    body.bbai-dashboard .bbai-library-row--regen-flash {
        animation: bbai-library-row-regen-flash 1.6s ease-out;
    }
    @keyframes bbai-library-row-regen-flash {
        0% {
            background: rgba(16, 185, 129, 0.16);
            box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.22);
        }
        65% {
            background: rgba(16, 185, 129, 0.06);
            box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1);
        }
        100% {
            background: transparent;
            box-shadow: none;
        }
    }
    body.bbai-dashboard .bbai-library-filter-empty__cell { padding: 28px !important; text-align: center; color: #64748b; }
    body.bbai-dashboard .bbai-library-preview-modal__dialog { border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); padding: 24px; }
    @media (max-width: 960px) {
        body.bbai-dashboard .bbai-library-summary-card__stats { grid-template-columns: 1fr; }
        body.bbai-dashboard .bbai-library-summary-card__head,
        body.bbai-dashboard .bbai-library-selection-bar { flex-direction: column; align-items: stretch; }
        body.bbai-dashboard .bbai-library-bulk-banner { flex-direction: column; align-items: stretch; }
        body.bbai-dashboard .bbai-library-bulk-banner__actions { width: 100%; }
        body.bbai-dashboard .bbai-library-bulk-banner__cta { width: 100%; min-width: 0; }
        body.bbai-dashboard .bbai-library-selection-bar__actions { width: 100%; }
    }
    @media (max-width: 782px) {
        body.bbai-dashboard .bbai-library-table thead { display: none; }
        body.bbai-dashboard .bbai-library-table,
        body.bbai-dashboard .bbai-library-table tbody,
        body.bbai-dashboard .bbai-library-table tr,
        body.bbai-dashboard .bbai-library-table td { display: block; width: 100%; }
        body.bbai-dashboard .bbai-library-table tbody tr { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; }
        body.bbai-dashboard .bbai-library-cell--select { padding-bottom: 4px !important; }
        body.bbai-dashboard .bbai-library-cell--alt-text,
        body.bbai-dashboard .bbai-library-cell--status,
        body.bbai-dashboard .bbai-library-cell--asset { width: 100%; min-width: 0; }
        body.bbai-dashboard .bbai-library-hover-preview { display: none; }
    }
    


/* Library workspace surface styles migrated from admin/partials/library-workspace.php */
.bbai-library-workspace {
/* Map to unified + foundation tokens — keeps Library on the same colour rail as Dashboard/filters */
--bbai-library-border: var(--bbai-border, #dfe8f6);
--bbai-library-border-strong: var(--bbai-border-secondary, #cfd9ea);
--bbai-library-surface: linear-gradient(135deg, var(--bbai-bg-secondary, #f7fbff) 0%, var(--bbai-info-bg, #eef4ff) 58%, var(--bbai-bg-primary, #ffffff) 100%);
--bbai-library-card-shadow: var(--bbai-surface-card-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
--bbai-library-soft-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
--bbai-library-text: var(--bbai-text-primary, #111827);
--bbai-library-muted: var(--bbai-text-secondary, #6b7280);
--bbai-library-subtle: var(--bbai-status-neutral-indicator, #94a3b8);
--bbai-library-track: var(--bbai-bg-tertiary, #e6edf8);
--bbai-library-green: var(--bbai-status-optimized-accent, #22b573);
--bbai-library-green-bg: var(--bbai-status-optimized-bg, #effbf3);
--bbai-library-amber: var(--bbai-status-needs-review-accent, #d9a441);
--bbai-library-amber-bg: var(--bbai-status-needs-review-bg, #fffbeb);
--bbai-library-red: var(--bbai-status-missing-accent, #c97a00);
--bbai-library-red-bg: var(--bbai-status-missing-bg, #fff7ed);
/* Legacy name — maps to brand primary (green CTAs), not UI info blue */
--bbai-library-blue: var(--bbai-primary, #10b981);
--bbai-library-blue-bg: var(--bbai-info-bg, #eff6ff);
/* Row rail + status wash — Phase 4 tokens (bbai-admin-foundation-tokens.css) */
--bbai-row-rail-w: var(--bbai-status-row-rail-width);
--bbai-row-rail-radius: var(--bbai-status-row-rail-radius);
--bbai-row-rail-missing: var(--bbai-status-missing-rail);
--bbai-row-rail-missing-strong: var(--bbai-status-missing-rail-strong);
--bbai-row-rail-weak: var(--bbai-status-needs-review-rail);
--bbai-row-rail-weak-strong: var(--bbai-status-needs-review-rail-strong);
--bbai-row-rail-opt: var(--bbai-status-optimized-rail);
--bbai-row-rail-opt-strong: var(--bbai-status-optimized-rail-strong);
--bbai-row-content-inset: var(--bbai-status-row-content-inset);
--bbai-link-row-strong: #047857;
--bbai-link-row-secondary: #1d4ed8;
--bbai-link-row-secondary-border: rgba(59, 130, 246, 0.42);
--bbai-link-row-tertiary: #2563eb;
/* Row action stack — one system for primary / secondary / menu trigger */
--bbai-lib-act-h: 36px;
--bbai-lib-act-radius: 9px;
--bbai-lib-act-fs: 12px;
--bbai-lib-act-fw: 600;
--bbai-lib-act-gap: 8px;
--bbai-lib-act-pad-x: 12px;
--bbai-lib-act-border: #cbd5e1;
--bbai-lib-act-border-strong: #94a3b8;
--bbai-lib-act-surface: #ffffff;
--bbai-lib-act-surface-hover: #f8fafc;
--bbai-lib-act-text: #334155;
--bbai-lib-act-text-muted: #64748b;
color: var(--bbai-library-text);
}
 /* Full-width tool surface — horizontal inset lives on body.bbai-dashboard .bbai-content-shell (saas-consistency.css) */
.bbai-library-container.bbai-library-workspace.bbai-container {
max-width: none;
width: 100%;
box-sizing: border-box;
padding-left: 0;
padding-right: 0;
}
 /* Dimensions + radius: bbai-admin-button-system.css (shared .bbai-btn scale) */
 .bbai-library-page-actions .bbai-btn,
.bbai-library-summary-actions .bbai-btn,
.bbai-library-task-banner__actions .bbai-btn,
.bbai-library-sidebar-card .bbai-btn,
.bbai-library-selection-bar .bbai-btn {
box-shadow: none;
font-weight: var(--bbai-admin-type-weight-semibold, 600);
}
 .bbai-library-page-actions .bbai-btn-primary,
.bbai-library-summary-actions .bbai-btn-primary,
.bbai-library-task-banner__actions .bbai-btn-primary,
.bbai-library-sidebar-card .bbai-btn-primary,
.bbai-library-selection-bar .bbai-btn-primary {
box-shadow: var(--bbai-admin-btn-primary-shadow);
}
 .bbai-library-page-actions .bbai-btn-primary:hover:not(:disabled),
.bbai-library-summary-actions .bbai-btn-primary:hover:not(:disabled),
.bbai-library-task-banner__actions .bbai-btn-primary:hover:not(:disabled),
.bbai-library-sidebar-card .bbai-btn-primary:hover:not(:disabled),
.bbai-library-selection-bar .bbai-btn-primary:hover:not(:disabled) {
box-shadow: var(--bbai-admin-btn-primary-shadow-hover);
transform: var(--bbai-admin-btn-primary-lift, translateY(-1px));
}
 .bbai-library-page-actions .bbai-btn-secondary,
.bbai-library-summary-actions .bbai-btn-secondary,
.bbai-library-task-banner__actions .bbai-btn-secondary,
.bbai-library-sidebar-card .bbai-btn-secondary,
.bbai-library-selection-bar .bbai-btn-secondary {
border-color: var(--bbai-admin-btn-secondary-border);
background: var(--bbai-admin-btn-secondary-bg);
color: var(--bbai-admin-btn-secondary-text);
font-weight: var(--bbai-admin-type-weight-medium, 500);
}
 .bbai-library-page-actions .bbai-btn-secondary:hover:not(:disabled),
.bbai-library-summary-actions .bbai-btn-secondary:hover:not(:disabled),
.bbai-library-task-banner__actions .bbai-btn-secondary:hover:not(:disabled),
.bbai-library-sidebar-card .bbai-btn-secondary:hover:not(:disabled),
.bbai-library-selection-bar .bbai-btn-secondary:hover:not(:disabled) {
border-color: var(--bbai-admin-btn-secondary-border-hover);
background: var(--bbai-admin-btn-secondary-bg-hover);
color: var(--bbai-admin-btn-secondary-text-hover);
}
 .bbai-library-scan-feedback {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--card-gap, 16px);
margin: 0 0 20px;
padding: 18px 20px;
border: 1px solid #dbe7f5;
border-radius: 16px;
background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
 .bbai-library-trial-banner,
.bbai-library-generation-feedback {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin: 0 0 20px;
padding: 14px 18px;
border: 1px solid #dbe7f5;
border-radius: 16px;
background: #f8fbff;
}
 .bbai-library-generation-feedback[hidden] {
display: none !important;
}
 .bbai-library-trial-banner__copy,
.bbai-library-generation-feedback__copy {
min-width: 0;
flex: 1;
}
 .bbai-library-trial-banner__eyebrow {
margin: 0 0 4px;
font-size: 11px;
line-height: 1;
letter-spacing: 0.08em;
text-transform: uppercase;
font-weight: 700;
color: #0f766e;
}
 .bbai-library-trial-banner__remaining,
.bbai-library-generation-feedback__summary,
.bbai-library-generation-feedback__detail {
margin: 0;
}
 .bbai-library-trial-banner__remaining,
.bbai-library-generation-feedback__summary {
font-size: 14px;
line-height: 1.5;
font-weight: 600;
color: var(--bbai-library-text);
}
 .bbai-library-generation-feedback__detail {
margin-top: 4px;
font-size: 13px;
line-height: 1.5;
color: var(--bbai-library-muted);
}
 .bbai-library-trial-banner__cta {
flex-shrink: 0;
font-size: 13px;
line-height: 1.4;
font-weight: 600;
color: #0f766e;
text-decoration: none;
}
 .bbai-library-trial-banner__cta:hover,
.bbai-library-trial-banner__cta:focus-visible {
color: #115e59;
text-decoration: underline;
}
 .bbai-library-generation-feedback[data-state="success"] {
border-color: #bbf7d0;
background: #f6fff8;
}
 .bbai-library-generation-feedback[data-state="warning"] {
border-color: #fde68a;
background: #fffaf0;
}
 .bbai-library-scan-feedback[hidden] {
display: none !important;
}
 .bbai-library-scan-feedback[data-state="attention"] {
border-color: #bfdbfe;
background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
}
 .bbai-library-scan-feedback[data-state="clear"] {
border-color: #bbf7d0;
background: linear-gradient(135deg, #f7fff9 0%, #effbf3 100%);
}
 .bbai-library-scan-feedback__copy {
min-width: 0;
flex: 1;
}
 .bbai-library-scan-feedback__eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
margin: 0 0 6px;
font-size: 11px;
line-height: 1;
letter-spacing: 0.12em;
text-transform: uppercase;
font-weight: 700;
color: #0f766e;
}
 .bbai-library-scan-feedback__summary,
.bbai-library-scan-feedback__detail {
margin: 0;
color: var(--bbai-library-text);
line-height: 1.55;
}
 .bbai-library-scan-feedback__summary {
font-size: 15px;
font-weight: 600;
}
 .bbai-library-scan-feedback__detail {
margin-top: 4px;
font-size: 13px;
color: var(--bbai-library-muted);
}
 .bbai-library-scan-feedback__actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
flex-shrink: 0;
}
 .bbai-library-results--highlight {
outline: 2px solid rgba(59, 130, 246, 0.45);
outline-offset: 4px;
animation: bbaiLibraryResultsPulse 1.6s ease;
}
 @keyframes bbaiLibraryResultsPulse {
0% {
    outline-color: rgba(59, 130, 246, 0.55);
}
 100% {
    outline-color: transparent;
}
}
 .bbai-library-summary-card,
.bbai-library-task-banner,
.bbai-library-sidebar-card,
.bbai-library-selection-bar {
border: 1px solid var(--bbai-library-border);
border-radius: 16px;
background: #ffffff;
box-shadow: var(--bbai-library-card-shadow);
}
 .bbai-library-summary-card {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
gap: var(--section-spacing, 24px);
padding: 22px 24px;
margin: 0 0 18px;
background: var(--bbai-library-surface);
}
 .bbai-library-summary-main {
min-width: 0;
}
 .bbai-library-summary-layout {
display: flex;
align-items: flex-start;
gap: var(--card-gap, 16px);
}
 .bbai-library-summary-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 14px;
flex: 0 0 48px;
background: rgba(255, 255, 255, 0.88);
border: 1px solid rgba(15, 23, 42, 0.08);
color: #166534;
}
 .bbai-library-summary-card[data-state="missing"] .bbai-library-summary-icon {
color: #b91c1c;
}
 .bbai-library-summary-card[data-state="weak"] .bbai-library-summary-icon {
color: #b45309;
}
 .bbai-library-summary-eyebrow,
.bbai-library-task-banner__eyebrow,
.bbai-library-sidebar-card__eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
margin: 0 0 8px;
font-size: 11px;
line-height: 1;
letter-spacing: 0.12em;
text-transform: uppercase;
font-weight: 700;
color: #0f766e;
}
 .bbai-library-summary-title,
.bbai-library-task-banner__title,
.bbai-library-sidebar-card__title {
margin: 0;
font-size: 24px;
line-height: 1.15;
letter-spacing: -0.03em;
color: var(--bbai-library-text);
}
 .bbai-library-summary-copy,
.bbai-library-task-banner__copy,
.bbai-library-sidebar-card__copy {
margin: 10px 0 0;
font-size: 14px;
line-height: 1.6;
color: var(--bbai-library-muted);
}
 .bbai-library-summary-stats {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
margin-top: var(--card-gap, 16px);
}
 .bbai-library-summary-stat {
padding: 11px 13px;
border-radius: 12px;
border: 1px solid #e4ebf4;
background: rgba(255, 255, 255, 0.88);
}
 .bbai-library-summary-stat--optimized {
background: var(--bbai-library-green-bg);
border-color: #bbf7d0;
}
.bbai-library-summary-stat--missing {
background: rgba(255, 255, 255, 0.88);
border-color: #e4ebf4;
box-shadow: inset 3px 0 0 rgba(201, 122, 0, 0.38);
}
 .bbai-library-summary-stat-label {
display: block;
font-size: 12px;
line-height: 1.4;
color: var(--bbai-library-muted);
}
 .bbai-library-summary-stat-value {
display: block;
margin-top: 4px;
font-size: 22px;
line-height: 1;
font-weight: 700;
letter-spacing: -0.02em;
color: var(--bbai-library-text);
}
 .bbai-library-summary-progress-wrap {
margin-top: var(--card-gap, 16px);
}
 .bbai-library-summary-progress {
display: flex;
overflow: hidden;
width: 100%;
height: 12px;
border-radius: 999px;
background: var(--bbai-library-track);
}
 .bbai-library-summary-progress > span {
display: block;
height: 100%;
}
 .bbai-library-summary-progress > .bbai-library-summary-progress__optimized {
background: linear-gradient(90deg, #20b26c 0%, #22b573 100%);
}
 .bbai-library-summary-progress > .bbai-library-summary-progress__missing {
background: linear-gradient(90deg, #c97a00 0%, #d48806 100%);
}
 .bbai-library-summary-foot {
margin-top: var(--card-gap, 16px);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
font-size: 12px;
color: var(--bbai-library-muted);
}
 .bbai-library-summary-foot strong {
color: var(--bbai-library-text);
}
 .bbai-library-summary-side {
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: 14px;
padding: 18px;
border-radius: 14px;
border: 1px solid rgba(37, 99, 235, 0.08);
background: rgba(255, 255, 255, 0.84);
}
 .bbai-library-summary-next {
display: flex;
flex-direction: column;
gap: 7px;
}
 .bbai-library-summary-next-label {
margin: 0;
font-size: 12px;
line-height: 1.4;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--bbai-library-subtle);
}
 .bbai-library-summary-next-copy {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: var(--bbai-library-text);
}
 .bbai-library-summary-usage {
display: flex;
flex-direction: column;
gap: 7px;
}
 .bbai-library-summary-usage-line,
.bbai-library-summary-usage-copy {
margin: 0;
font-size: 13px;
line-height: 1.6;
color: var(--bbai-library-muted);
}
 .bbai-library-summary-usage-line strong {
color: var(--bbai-library-text);
}
 .bbai-library-summary-usage-bar {
width: 100%;
height: 10px;
border-radius: 999px;
overflow: hidden;
background: #e5edf6;
}
 .bbai-library-summary-usage-fill {
display: block;
height: 100%;
width: 0;
border-radius: inherit;
background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
transition: width 0.3s ease;
}
 .bbai-library-summary-actions {
display: flex;
flex-direction: column;
gap: 8px;
align-items: stretch;
flex-wrap: wrap;
}
 .bbai-library-summary-actions .bbai-btn {
justify-content: center;
text-align: center;
}
 /* No card chrome — avoids a “divider” seam between coverage grid and review workspace */
.bbai-library-toolbar-card {
position: sticky;
top: 24px;
z-index: 9;
margin: 8px 0 0;
padding: 4px 0 10px;
border: none;
border-radius: 0;
background: transparent;
box-shadow: none;
backdrop-filter: none;
}
 /*
 * Workspace card — lightweight dashboard-style sectioning (spacing + dividers, no nested boxes).
 */
.bbai-library-workspace-card {
--bbai-ws-space-xs: 8px;
--bbai-ws-space-sm: 12px;
--bbai-ws-space-md: 16px;
--bbai-ws-space-lg: 24px;
--bbai-ws-radius: var(--bbai-surface-card-radius, 14px);
--bbai-ws-divider: #eef2f7;
 background: var(--bbai-surface-card-bg, #ffffff);
border: var(--bbai-surface-card-border, 1px solid #e5e7eb);
border-radius: var(--bbai-ws-radius);
box-shadow: var(--bbai-surface-card-shadow, 0 1px 3px rgba(15, 23, 42, 0.04));
overflow: hidden;
/* Spacing from plan banner lives on #bbai-alt-coverage-card (parity with Dashboard hero margin). */
margin-top: 0;
}
 /* Card header: padding + type from bbai-section-header.css + saas-consistency (Dashboard command-card parity) */
 .bbai-library-workspace-card__head.bbai-section-header--split-end {
	background: transparent;
	border-bottom: none;
	}
	.bbai-library-workspace-cta-host[hidden],
	.bbai-library-credits-banner-host[hidden] {
	display: none !important;
	}
 /* Inline filter toolbar — flows from same section as header */
	.bbai-library-workspace-card__filter-toolbar {
	padding: 16px var(--bbai-ws-space-lg) var(--bbai-ws-space-sm);
margin: 0;
background: transparent;
border: none;
border-bottom: 1px solid var(--bbai-ws-divider);
border-radius: 0;
}
 /* Table region — same surface as card; padding only */
.bbai-library-workspace-card__table-surface {
padding: var(--bbai-ws-space-sm) var(--bbai-ws-space-lg) var(--bbai-ws-space-md);
background: #ffffff;
border: none;
}
 .bbai-library-workspace-card__controls-row {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: var(--bbai-ws-space-xs);
padding: 0 0 var(--bbai-ws-space-sm);
margin: 0;
background: transparent;
border-bottom: none;
}
 .bbai-library-workspace-card__controls-row .bbai-library-search {
flex: 1 1 220px;
min-width: 0;
max-width: 420px;
margin-right: auto;
}
 .bbai-library-workspace-card__table-surface .bbai-library-main {
margin: 0;
padding: 0;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
overflow: visible;
}
 .bbai-library-workspace-card__table-surface .bbai-library-table-shell {
margin: 0;
padding: 0;
background: transparent;
}
  @media (max-width: 960px) {
.bbai-library-workspace-card__controls-row {
    justify-content: stretch;
}
.bbai-library-workspace-card__controls-row .bbai-library-search {
    flex: 1 1 100%;
    max-width: none;
    margin-right: 0;
}
}
 @media (max-width: 782px) {
.bbai-library-workspace-card__filter-toolbar {
    padding: 16px var(--bbai-ws-space-md) var(--bbai-ws-space-sm);
}
.bbai-library-workspace-card__table-surface {
    padding: var(--bbai-ws-space-sm) var(--bbai-ws-space-md) var(--bbai-ws-space-md);
}
}
/* Hide hero duplicate primary when Missing bulk bar is the in-context primary */
.bbai-library-top-hero--suppress-duplicate-missing-cta [data-bbai-hero-primary-item] {
    display: none !important;
}

/* Missing filter: credit-aware “generate all” row (ties CTA to the list) */
.bbai-library-missing-bulk-bar {
    padding: 0 var(--bbai-ws-space-md, 20px) 12px;
    border-bottom: 1px solid #eef2f7;
}
.bbai-library-missing-bulk-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 16px;
}
.bbai-library-missing-bulk-bar__ready {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    min-width: 0;
}
.bbai-library-missing-bulk-bar__helper {
    margin: 0;
    max-width: min(52ch, 100%);
    font-size: 13px;
    line-height: 1.45;
    color: var(--bbai-admin-color-text-muted, var(--bbai-library-muted));
}
.bbai-library-missing-bulk-bar__no-credits {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    min-width: 0;
}
/* Author `display:flex` wins over the HTML hidden attribute otherwise — keep out of layout + a11y when hidden */
.bbai-library-missing-bulk-bar__ready[hidden],
.bbai-library-missing-bulk-bar__no-credits[hidden] {
    display: none !important;
}
.bbai-library-missing-bulk-bar__no-credits-text {
    margin: 0;
    max-width: min(60ch, 100%);
    font-size: 13px;
    line-height: 1.45;
    color: var(--bbai-admin-color-text-secondary, #475569);
}
@media (max-width: 600px) {
    .bbai-library-missing-bulk-bar__ready,
    .bbai-library-missing-bulk-bar__no-credits {
        flex-direction: column;
        align-items: stretch;
    }
    .bbai-library-missing-bulk-bar__ready .bbai-btn,
    .bbai-library-missing-bulk-bar__no-credits .bbai-btn {
        width: 100%;
        justify-content: center;
    }
}
 /* Old filter-strip now lives inside the card — hide the standalone version */
.bbai-library-workspace-filter-strip {
display: none;
}
 .bbai-library-workspace-intro {
margin: 0;
padding: 14px 0 8px;
border-bottom: 1px solid #eef2f7;
}
.bbai-library-workspace-intro__title {
margin: 0 0 4px;
font-size: var(--bbai-admin-type-card-title, 20px);
line-height: 1.22;
font-weight: var(--bbai-admin-type-weight-bold, 700);
letter-spacing: var(--bbai-tracking-tight, -0.03em);
color: var(--bbai-admin-color-text, #0f172a);
}
 .bbai-library-workspace-intro__tagline {
margin: 0 0 6px;
font-size: var(--bbai-admin-type-body, 14px);
line-height: 1.45;
color: var(--bbai-admin-color-text-secondary, var(--bbai-library-text));
max-width: min(56ch, 100%);
}
 .bbai-library-workspace-intro__meta {
margin: 0;
font-size: var(--bbai-admin-type-meta, 13px);
line-height: 1.4;
font-weight: var(--bbai-admin-type-weight-medium, 500);
color: var(--bbai-admin-color-text-muted, var(--bbai-library-muted));
font-variant-numeric: tabular-nums;
}
 .bbai-library-workspace-intro__hint {
margin: 6px 0 0;
font-size: var(--bbai-admin-type-meta, 13px);
line-height: 1.42;
color: var(--bbai-admin-color-text-muted, var(--bbai-library-subtle));
max-width: min(68ch, 100%);
}
 .bbai-library-section-head {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: var(--card-gap, 16px);
margin-bottom: var(--card-gap, 16px);
}
 .bbai-library-section-title {
margin: 0;
font-size: var(--bbai-admin-type-card-title, 20px);
line-height: 1.3;
color: var(--bbai-admin-color-text, var(--bbai-library-text));
}
 .bbai-library-section-copy {
margin: 4px 0 0;
font-size: var(--bbai-admin-type-body, 14px);
line-height: 1.6;
color: var(--bbai-admin-color-text-secondary, var(--bbai-library-muted));
}
 .bbai-library-toolbar {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--card-gap, 16px);
flex-wrap: wrap;
}
 .bbai-library-toolbar__left {
min-width: 0;
}
 .bbai-library-toolbar__right {
flex: 1 1 260px;
display: flex;
justify-content: flex-end;
gap: 12px;
flex-wrap: wrap;
min-width: 0;
}
 .bbai-library-toolbar__right--full {
flex: 1 1 100%;
max-width: 100%;
justify-content: flex-end;
}
 .bbai-library-toolbar__controls {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
 .bbai-library-search {
display: flex;
align-items: center;
gap: 10px;
min-width: 260px;
padding: 0 14px;
border-radius: 12px;
border: 1px solid #dce4f0;
background: #ffffff;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
 .bbai-library-search svg {
flex: 0 0 auto;
color: var(--bbai-library-subtle);
}
 .bbai-library-search input {
width: 100%;
min-height: 42px;
border: 0;
padding: 0;
background: transparent;
color: var(--bbai-library-text);
font-size: 14px;
box-shadow: none;
}
 .bbai-library-search input:focus {
outline: none;
box-shadow: none;
}
 .bbai-library-select {
min-width: 150px;
min-height: 42px;
padding: 0 38px 0 14px;
border-radius: 12px;
border: 1px solid #dce4f0;
background-color: #ffffff;
color: var(--bbai-library-text);
font-size: 14px;
line-height: 1.4;
}
 .bbai-library-select:focus,
.bbai-library-search input:focus-visible,
.bbai-filter-group__item:focus-visible,
.bbai-library-row-action:focus-visible,
.bbai-row-action-btn:focus-visible,
.bbai-library-alt-trigger:focus-visible,
.bbai-library-thumbnail-button:focus-visible {
outline: 3px solid rgba(37, 99, 235, 0.28);
outline-offset: 2px;
}
 .bbai-library-work-grid {
display: block;
}
 .bbai-library-main {
min-width: 0;
}
 .bbai-library-sidebar {
min-width: 0;
}
 .bbai-library-sidebar__inner {
position: sticky;
top: 104px;
display: flex;
flex-direction: column;
gap: var(--card-gap, 16px);
}
 .bbai-library-sidebar-card {
padding: 20px;
}
 .bbai-library-sidebar-card__meta {
margin: 10px 0 0;
font-size: 13px;
line-height: 1.6;
color: var(--bbai-library-muted);
}
 .bbai-library-sidebar-card__actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-top: var(--card-gap, 16px);
}
 .bbai-library-sidebar-card--queue {
background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
 .bbai-library-sidebar-card--upgrade {
background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}
 .bbai-library-sidebar-card--selection[hidden] {
display: none !important;
}
 .bbai-library-upgrade-price {
display: flex;
align-items: baseline;
gap: 8px;
margin-top: var(--card-gap, 16px);
color: var(--bbai-library-text);
}
 .bbai-library-upgrade-price strong {
font-size: 28px;
line-height: 1;
letter-spacing: -0.03em;
}
 .bbai-library-upgrade-price span {
font-size: 14px;
color: var(--bbai-library-muted);
}
 .bbai-library-upgrade-list {
display: grid;
gap: 10px;
padding: 0;
margin: 16px 0 0;
list-style: none;
}
 .bbai-library-upgrade-list li {
display: flex;
align-items: flex-start;
gap: 10px;
font-size: 14px;
line-height: 1.5;
color: var(--bbai-library-text);
}
 .bbai-library-upgrade-list svg {
flex: 0 0 auto;
margin-top: 2px;
color: var(--bbai-library-green);
}
 .bbai-library-selection-bar {
position: sticky;
top: 76px;
z-index: 8;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
padding: 11px 14px;
margin: 0 0 12px;
background: rgba(255, 255, 255, 0.97);
backdrop-filter: blur(12px);
}
 .bbai-library-selection-bar[hidden] {
display: none !important;
}
 .bbai-library-selection-bar__summary {
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
min-width: 0;
}
 .bbai-library-selection-bar__lead {
display: inline-flex;
align-items: center;
gap: 10px;
font-weight: 700;
color: var(--bbai-library-text);
}
 .bbai-library-selection-bar__count,
.bbai-library-selection-bar__credits {
font-size: 13px;
line-height: 1.5;
color: var(--bbai-library-muted);
}
 .bbai-library-selection-bar__actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
 .bbai-library-table-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding: 4px 0 10px;
margin: 0 0 2px;
border-bottom: 1px solid #e2e8f0;
}
 .bbai-library-table-head--bulk-only {
padding: 10px 0 12px;
margin: 0;
border-bottom: 1px solid #eef2f7;
min-height: 0;
}
 .bbai-library-main:not([data-bbai-bulk-mode="true"]) .bbai-library-table-head--bulk-only {
display: none;
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-table-head--bulk-only {
display: flex;
align-items: center;
}
 .bbai-library-table-title {
margin: 0;
font-size: 18px;
line-height: 1.25;
font-weight: 700;
letter-spacing: -0.025em;
color: #0f172a;
}
 .bbai-library-table-meta {
margin: 4px 0 0;
font-size: 13px;
line-height: 1.5;
color: var(--bbai-library-muted);
}
 .bbai-library-table {
width: 100%;
min-width: 880px;
border-collapse: separate;
border-spacing: 0 8px;
margin: -8px 0 0;
}
 .bbai-library-table thead th {
padding: 0 16px 8px;
font-size: 11px;
line-height: 1.2;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--bbai-library-subtle);
}
 .bbai-library-table tbody td {
vertical-align: top;
padding: 12px 13px;
background: #ffffff;
border-top: 1px solid #e7edf6;
border-bottom: 1px solid #e7edf6;
transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
 .bbai-library-table tbody td:first-child {
border-left: 1px solid #e7edf6;
border-top-left-radius: 18px;
border-bottom-left-radius: 18px;
}
 .bbai-library-table tbody td:last-child {
border-right: 1px solid #e7edf6;
border-top-right-radius: 18px;
border-bottom-right-radius: 18px;
}
 .bbai-library-table tbody tr:hover td,
.bbai-library-table tbody tr:focus-within td {
background: #fbfdff;
border-color: #d7e2f0;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 16px 30px rgba(15, 23, 42, 0.04);
}
 .bbai-library-row--hidden {
display: none;
}
 .bbai-library-table .bbai-library-cell--select {
width: 52px;
padding-top: var(--card-gap, 16px) !important;
}
 .bbai-library-table .bbai-library-cell--asset {
width: 280px;
}
 .bbai-library-table .bbai-library-cell--alt-text {
width: 42%;
min-width: 300px;
}
 .bbai-library-table .bbai-library-cell--status {
width: 280px;
}
 .bbai-library-asset {
display: flex;
gap: 14px;
}
 .bbai-library-thumbnail-button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
padding: 0;
border: 0;
background: transparent;
cursor: pointer;
}
 .bbai-library-thumbnail,
.bbai-library-thumbnail-placeholder {
width: 58px;
height: 58px;
border-radius: 10px;
object-fit: cover;
background: #e5edf7;
border: 1px solid #dbe5f2;
}
 .bbai-library-thumbnail-placeholder {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--bbai-library-subtle);
}
 .bbai-library-hover-preview {
position: absolute;
left: calc(100% + 14px);
top: 50%;
transform: translateY(-50%);
width: 180px;
padding: 10px;
border-radius: 18px;
background: rgba(15, 23, 42, 0.96);
box-shadow: 0 28px 56px rgba(15, 23, 42, 0.24);
opacity: 0;
pointer-events: none;
transition: opacity 0.16s ease, transform 0.16s ease;
z-index: 6;
}
 .bbai-library-hover-preview img {
display: block;
width: 100%;
border-radius: 12px;
}
 .bbai-library-thumbnail-button:hover .bbai-library-hover-preview,
.bbai-library-thumbnail-button:focus-visible .bbai-library-hover-preview {
opacity: 1;
transform: translateY(-50%) scale(1.01);
}
 .bbai-library-info-cell {
display: flex;
flex-direction: column;
gap: 5px;
min-width: 0;
}
 .bbai-library-info-name {
margin: 0;
font-size: 13px;
line-height: 1.4;
font-weight: 700;
color: var(--bbai-library-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 210px;
}
 .bbai-library-info-meta,
.bbai-library-info-updated {
display: block;
font-size: 11px;
line-height: 1.5;
color: var(--bbai-library-muted);
}
 .bbai-library-review-block {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
}
 .bbai-library-review-label {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 12px;
line-height: 1.2;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--bbai-library-subtle);
}
 .bbai-library-review-tip {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
border-radius: 999px;
border: 1px solid #dbe4ee;
background: #ffffff;
color: var(--bbai-library-muted);
font-size: 11px;
line-height: 1;
}
 .bbai-library-alt-trigger {
width: 100%;
min-height: 62px;
padding: 12px 14px;
border-radius: 12px;
border: 1px solid #dbe5f2;
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
text-align: left;
cursor: text;
transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
 .bbai-library-alt-trigger:hover {
border-color: #bfd1ea;
transform: translateY(-1px);
}
 .bbai-alt-text-preview {
display: block;
font-size: 14px;
line-height: 1.65;
color: var(--bbai-library-text);
white-space: normal;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
 .bbai-alt-text-missing {
display: block;
font-size: 14px;
line-height: 1.5;
font-style: italic;
color: var(--bbai-library-red);
}
 .bbai-library-status-stack {
display: flex;
flex-direction: column;
gap: 9px;
min-height: 100%;
}
 .bbai-library-status-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: fit-content;
padding: 3px 8px;
border-radius: 999px;
font-size: 11px;
line-height: 1.15;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
 /* Status + score chips — colors from bbai-admin-semantic-status.css (--bbai-status-*) */
 .bbai-library-score-badge {
display: inline-flex;
align-items: baseline;
gap: 3px;
padding: 3px 8px;
border-radius: 999px;
font-size: 11px;
line-height: 1.2;
font-weight: 700;
letter-spacing: 0.01em;
border: 1px solid transparent;
white-space: nowrap;
}
 .bbai-library-score-badge__value {
font-variant-numeric: tabular-nums;
}
 .bbai-library-score-badge__label {
font-weight: 600;
opacity: 0.92;
}
 .bbai-library-card__score-hint {
margin: 4px 0 0;
font-size: 11px;
line-height: 1.4;
color: var(--bbai-library-muted);
}
 .bbai-library-actions {
display: flex;
align-items: stretch;
gap: var(--bbai-lib-act-gap);
flex-wrap: wrap;
margin-top: auto;
}
 .bbai-row-action-btn {
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: var(--bbai-lib-act-h);
height: var(--bbai-lib-act-h);
padding: 0 var(--bbai-lib-act-pad-x);
border-radius: var(--bbai-lib-act-radius);
border: 1px solid var(--bbai-lib-act-border);
background: var(--bbai-lib-act-surface);
color: var(--bbai-lib-act-text);
font-size: var(--bbai-lib-act-fs);
line-height: 1.2;
font-weight: var(--bbai-lib-act-fw);
cursor: pointer;
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
 .bbai-row-action-btn:hover:not(:disabled) {
background: var(--bbai-lib-act-surface-hover);
border-color: var(--bbai-lib-act-border-strong);
color: #0f172a;
}
 .bbai-row-action-btn:focus-visible {
outline: none;
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(100, 116, 139, 0.35);
}
 .bbai-row-action-btn--primary {
background: var(--bbai-admin-btn-primary-bg, #10b981);
border-color: var(--bbai-admin-btn-primary-border, #047857);
color: #ffffff;
box-shadow: var(--bbai-admin-btn-primary-shadow);
}
 .bbai-row-action-btn--primary:hover:not(:disabled) {
background: var(--bbai-admin-btn-primary-bg, #059669);
border-color: var(--bbai-admin-color-primary-active, #047857);
color: #ffffff;
box-shadow: var(--bbai-admin-btn-primary-shadow-hover);
transform: var(--bbai-admin-btn-primary-lift, translateY(-1px));
}
 .bbai-row-action-btn--primary:focus-visible {
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(16, 185, 129, 0.4);
}
 .bbai-row-action-btn--ghost {
background: var(--bbai-lib-act-surface);
color: var(--bbai-lib-act-text-muted);
border-color: #e2e8f0;
font-weight: var(--bbai-admin-type-weight-medium, 500);
}
 .bbai-row-action-btn.is-loading {
pointer-events: none;
opacity: 0.78;
}
 .bbai-row-action-btn.bbai-is-locked,
 .bbai-row-action-btn.bbai-is-locked[aria-disabled="true"] {
background: #f9f7ff;
border-color: rgba(102, 87, 189, 0.18);
color: #6657bd;
box-shadow: 0 2px 6px rgba(102, 87, 189, 0.045);
opacity: 1;
cursor: pointer;
pointer-events: auto;
}
 .bbai-row-action-btn.bbai-is-locked:hover,
 .bbai-row-action-btn.bbai-is-locked:focus-visible {
background: #f5f2ff;
border-color: rgba(102, 87, 189, 0.24);
color: #5548a8;
box-shadow: 0 3px 8px rgba(102, 87, 189, 0.06);
outline: none;
}
 .bbai-row-action-spinner {
width: 12px;
height: 12px;
border-radius: 999px;
border: 2px solid currentColor;
border-right-color: transparent;
animation: bbaiLibrarySpin 0.8s linear infinite;
}
 .bbai-library-inline-edit {
display: flex;
flex-direction: column;
gap: 8px;
}
 .bbai-library-inline-edit__textarea {
width: 100%;
min-height: 64px;
max-height: 200px;
padding: 10px 12px;
border-radius: 12px;
border: 1px solid #60a5fa;
box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
resize: vertical;
line-height: 1.45;
box-sizing: border-box;
}
 .bbai-library-inline-edit__actions {
display: flex;
align-items: center;
gap: 8px;
}
 .bbai-library-inline-edit__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 999px;
border: 1px solid #dbe4ee;
background: #ffffff;
color: #334155;
cursor: pointer;
}
 .bbai-library-inline-edit__icon--save {
background: var(--bbai-library-green-bg);
border-color: #86efac;
color: #166534;
}
 .bbai-library-inline-edit__error {
margin: 0;
min-height: 18px;
font-size: 12px;
color: var(--bbai-library-red);
}
 .bbai-library-filter-empty__cell {
padding: 0 !important;
background: transparent !important;
border: 0 !important;
}
 @keyframes bbaiLibrarySpin {
to {
    transform: rotate(360deg);
}
}
 @media (max-width: 1180px) {
.bbai-library-summary-card {
    grid-template-columns: 1fr;
}
 .bbai-library-work-grid {
    grid-template-columns: 1fr;
}
 .bbai-library-sidebar__inner {
    position: static;
}
}
 @media (max-width: 960px) {
.bbai-library-hover-preview {
    display: none;
}
}
 @media (max-width: 782px) {
.bbai-library-summary-card,
.bbai-library-selection-bar,
.bbai-library-workspace .bbai-pagination.bbai-table-meta {
    flex-direction: column;
    align-items: stretch;
}
 .bbai-library-summary-actions,
.bbai-library-selection-bar__actions,
.bbai-library-workspace .bbai-pagination.bbai-table-meta .bbai-pagination-controls {
    justify-content: flex-start;
}
 .bbai-library-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
 .bbai-library-toolbar-card {
    position: static;
}
 .bbai-library-section-head,
.bbai-library-summary-layout,
.bbai-library-summary-side {
    align-items: flex-start;
}
}
 @media (max-width: 640px) {
.bbai-library-container {
    padding-bottom: 24px;
}
 .bbai-library-surface-root .bbai-page-hero .bbai-banner__headline.bbai-dashboard-hero__headline {
    font-size: 20px;
}
 .bbai-library-summary-title,
.bbai-library-sidebar-card__title {
    font-size: 22px;
}
 .bbai-library-search {
    min-width: 100%;
}
 .bbai-library-select,
#bbai-library-apply-bulk,
.bbai-library-toolbar__controls > .bbai-btn {
    width: 100%;
}
 .bbai-library-toolbar__right,
.bbai-library-toolbar__controls {
    width: 100%;
    justify-content: stretch;
}
 .bbai-library-summary-stats {
    grid-template-columns: 1fr;
}
}
 /* ALT Library refactor overrides */
 .bbai-library-workspace .bbai-queue-workflow[data-bbai-wf-mode="compact"] .bbai-queue-workflow__steps {
display: none;
}
 .bbai-library-workspace .bbai-queue-workflow[data-bbai-wf-mode="steps"] .bbai-queue-workflow__healthy {
display: none;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy {
display: grid;
grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr) auto;
gap: var(--card-gap, 16px);
align-items: center;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-main {
display: flex;
align-items: flex-start;
gap: 14px;
min-width: 0;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border-radius: 14px;
color: #166534;
background: #ecfdf3;
border: 1px solid #bbf7d0;
flex: 0 0 44px;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-eyebrow {
margin: 0 0 6px;
font-size: 11px;
font-weight: 700;
letter-spacing: .12em;
text-transform: uppercase;
color: #15803d;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-title {
margin: 0;
font-size: 22px;
line-height: 1.15;
letter-spacing: -.02em;
color: #0f172a;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-copy {
margin: 8px 0 0;
font-size: 14px;
line-height: 1.6;
color: #475569;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 10px;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-metric {
padding: 14px;
border-radius: 14px;
background: rgba(255, 255, 255, 0.9);
border: 1px solid #dbe7f4;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-metric-label {
display: block;
font-size: 11px;
line-height: 1.4;
letter-spacing: .08em;
text-transform: uppercase;
color: #64748b;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-metric-value {
display: block;
margin-top: 6px;
font-size: 22px;
line-height: 1;
letter-spacing: -.03em;
color: #0f172a;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 42px;
padding: 0 16px;
border-radius: 12px;
border: 1px solid #dce6f2;
background: #ffffff;
color: #1e293b;
font-size: 13px;
font-weight: 700;
text-decoration: none;
cursor: pointer;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-btn--primary {
background: #0f172a;
border-color: #0f172a;
color: #ffffff;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-btn--upgrade {
background: #f8fbff;
}
 .bbai-library-summary-stat--weak {
background: var(--bbai-library-amber-bg);
border-color: #fcd34d;
}
 .bbai-library-summary-stat--credits {
background: var(--bbai-library-blue-bg);
border-color: #bfdbfe;
}
 .bbai-library-summary-progress > .bbai-library-summary-progress__weak {
background: linear-gradient(90deg, #d9a441 0%, #e0b35a 100%);
}
 .bbai-library-summary-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
margin-top: var(--card-gap, 16px);
}
 .bbai-library-summary-next-title {
margin: 0;
font-size: 17px;
line-height: 1.25;
letter-spacing: -.02em;
color: var(--bbai-library-text);
}
 .bbai-library-summary-automation {
display: flex;
flex-direction: column;
gap: 6px;
padding: 11px 13px;
border-radius: 12px;
border: 1px solid #dbe7f4;
background: #f8fbff;
}
 .bbai-library-summary-tension {
padding: 9px 12px;
border-radius: 10px;
border: 1px solid #fde68a;
background: #fffbeb;
font-size: 12px;
line-height: 1.55;
color: #92400e;
font-weight: 600;
margin: 0;
}
 .bbai-library-summary-reassurance {
margin: 0;
font-size: 11px;
line-height: 1.5;
color: var(--bbai-library-subtle);
text-align: center;
}
 .bbai-library-usage-alert {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding: 11px 13px;
border-radius: 12px;
border: 1px solid rgba(252, 211, 77, 0.78);
background: #fffbeb;
}
 .bbai-library-usage-alert--out {
border-color: rgba(254, 202, 202, 0.82);
background: #fff1f2;
}
 .bbai-library-usage-alert__copy {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
font-size: 13px;
line-height: 1.5;
color: #475569;
}
 .bbai-library-usage-alert__copy strong {
color: #0f172a;
}
 .bbai-library-toolbar__upgrade {
border-style: dashed;
}
 .bbai-library-selection-bar {
top: 72px;
}
 .bbai-library-selection-bar__meta {
display: flex;
flex-direction: column;
gap: 2px;
}
 .bbai-library-selection-bar__plan {
font-size: 12px;
line-height: 1.5;
color: var(--bbai-library-subtle);
}
 .bbai-library-info-meta-grid {
display: flex;
align-items: center;
gap: 4px;
flex-wrap: wrap;
}
 .bbai-library-info-meta {
display: inline-flex;
align-items: center;
padding: 2px 6px;
border-radius: 999px;
background: #f1f5f9;
border: 1px solid #e2e8f0;
font-size: 10px;
line-height: 1;
color: #64748b;
}
 .bbai-library-alt-preview-card {
display: flex;
flex-direction: column;
gap: 8px;
padding: 11px 13px;
border-radius: 12px;
border: 1px solid #dbe5f2;
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
 .bbai-library-alt-preview-card--collapsible .bbai-alt-text-preview {
-webkit-line-clamp: 2;
}
 .bbai-library-alt-preview-card.is-expanded .bbai-alt-text-preview {
display: block;
overflow: visible;
}
 .bbai-library-alt-expand {
align-self: flex-start;
padding: 0;
border: 0;
background: transparent;
color: var(--bbai-link-row-tertiary);
font-size: 12px;
font-weight: 700;
cursor: pointer;
text-decoration: underline;
text-decoration-color: rgba(37, 99, 235, 0.35);
text-underline-offset: 3px;
transition: color 0.14s ease, text-decoration-color 0.14s ease;
}
 .bbai-library-alt-expand:hover,
.bbai-library-alt-expand:focus-visible {
color: #1d4ed8;
text-decoration-color: rgba(29, 78, 216, 0.75);
outline: none;
}
 .bbai-library-alt-helper,
.bbai-library-status-copy {
margin: 0;
font-size: 12px;
line-height: 1.6;
color: var(--bbai-library-muted);
}
 .bbai-library-status-tags {
display: inline-flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
padding: 5px 8px;
border-radius: 10px;
background: rgba(248, 250, 252, 0.95);
border: 1px solid #e8edf4;
max-width: 100%;
}
 .bbai-library-status-badge--secondary {
background: #f8fafc;
color: #475569;
border: 1px solid #dbe5f2;
}
 .bbai-library-status-badge--ai {
background: #eff6ff;
color: #1d4ed8;
border-color: #bfdbfe;
}
 .bbai-library-status-badge--reviewed {
background: #f0fdf4;
color: #166534;
border-color: #bbf7d0;
}
 .bbai-library-actions {
flex-direction: column;
align-items: flex-start;
gap: 6px;
}
 .bbai-library-action-group {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
 .bbai-row-action-btn--review {
background: #ecfdf3;
border-color: #bbf7d0;
color: #166534;
}
 .bbai-row-action-btn--quiet {
background: #f8fafc;
}
 .bbai-library-filter-empty__cell .bbai-library-empty-card {
margin-top: var(--card-gap, 16px);
}
 @media (max-width: 1120px) {
.bbai-library-workspace .bbai-queue-workflow__healthy {
    grid-template-columns: 1fr;
}
}
 @media (max-width: 960px) {
.bbai-library-summary-side,
.bbai-library-usage-alert {
    gap: 12px;
}
 .bbai-library-selection-bar {
    position: static;
}
}
 @media (max-width: 782px) {
.bbai-library-scan-feedback {
    flex-direction: column;
}
 .bbai-library-scan-feedback__actions {
    width: 100%;
}
 .bbai-library-usage-alert,
.bbai-library-workspace .bbai-queue-workflow__healthy-actions {
    flex-direction: column;
    align-items: stretch;
}
 .bbai-library-workspace .bbai-queue-workflow__healthy-metrics {
    grid-template-columns: 1fr;
}
}
 /* Library command hero: use shared product-banner.css surfaces + CTA rail (parity with Analytics). */
 .bbai-library-credits-banner-host--strip {
display: none;
}
 /* =====================================================
   REVIEW WORKSPACE — Table v2
   ===================================================== */
 /* Single-line metadata (PNG • 1200×630 • 37KB • Updated 22 Mar) */
.bbai-library-info-meta-line {
display: block;
font-size: 11px;
line-height: 1.4;
color: var(--bbai-library-subtle);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
margin-top: 2px;
}
 /* ALT preview card — v2: no label, cleaner bg */
.bbai-library-alt-preview-card--v2 {
min-height: 40px;
background: #f6f9fd;
border-color: #dde8f4;
cursor: pointer;
}
 .bbai-library-alt-preview-card--v2:hover {
border-color: #b8cfe8;
background: #f0f6fc;
}
 .bbai-library-alt-preview-card--v2 .bbai-alt-text-preview {
font-size: 14px;
line-height: 1.45;
color: var(--bbai-library-text);
-webkit-line-clamp: 2;
}
 .bbai-library-alt-preview-card--v2 .bbai-alt-text-missing {
font-size: 13px;
color: var(--bbai-library-subtle);
font-style: normal;
}
 /* Actions v2 — Generate/Regenerate is primary when AI action leads; Edit manually is secondary */
.bbai-library-actions--v2 {
flex-direction: row;
flex-wrap: wrap;
gap: 6px;
}
 /* Row inline text links (View image • Copy ALT) */
.bbai-library-row-links {
display: flex;
align-items: center;
gap: 7px;
margin-top: 4px;
}
 .bbai-row-link {
padding: 0;
border: 0;
background: transparent;
color: var(--bbai-link-row-secondary);
font-size: 11px;
font-weight: 600;
cursor: pointer;
text-underline-offset: 2px;
text-decoration-color: rgba(37, 99, 235, 0.35);
transition: color 0.14s ease, text-decoration-color 0.14s ease;
line-height: 1;
}
 .bbai-row-link:hover,
.bbai-row-link:focus-visible {
color: #1e3a8a;
text-decoration: underline;
text-decoration-color: rgba(30, 58, 138, 0.65);
outline: none;
}
 .bbai-row-link:disabled,
.bbai-row-link[aria-disabled='true'] {
color: #94a3b8 !important;
text-decoration: none !important;
cursor: not-allowed !important;
opacity: 1;
}
 .bbai-row-link:disabled:hover,
.bbai-row-link[aria-disabled='true']:hover {
color: #94a3b8 !important;
text-decoration: none !important;
}
 .bbai-row-link-sep {
color: #d1dae8;
font-size: 11px;
user-select: none;
}
 /* Compact selection / bulk bar */
.bbai-selection-bar-left {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
min-width: 0;
}
 .bbai-selection-all-label {
display: inline-flex;
align-items: center;
gap: 7px;
font-size: 13px;
font-weight: 600;
color: var(--bbai-library-text);
cursor: pointer;
user-select: none;
}
 .bbai-selection-bar-count {
font-size: 13px;
font-weight: 700;
color: var(--bbai-library-text);
}
 .bbai-selection-bar-sep {
color: #d1dae8;
font-size: 14px;
user-select: none;
}
 .bbai-selection-clear {
color: var(--bbai-library-muted) !important;
background: transparent !important;
border-color: transparent !important;
font-weight: 600 !important;
text-decoration: underline;
text-underline-offset: 2px;
text-decoration-color: transparent;
padding-left: 4px !important;
padding-right: 4px !important;
}
 .bbai-selection-clear:hover {
color: var(--bbai-library-text) !important;
text-decoration-color: currentColor;
background: transparent !important;
}
 /* Table cell column widths — v2 (legacy <table> layout only; not review cards) */
.bbai-library-table .bbai-library-cell--asset { width: 240px; }
.bbai-library-table .bbai-library-cell--alt-text { width: auto; min-width: 280px; }
.bbai-library-table .bbai-library-cell--status { width: 200px; }
 /* =====================================================
   REVIEW QUEUE — Card workflow
   ===================================================== */
.bbai-library-toolbar {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 12px 20px;
align-items: center;
}
 @media (min-width: 720px) {
.bbai-library-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
}
 .bbai-library-toolbar__right {
    justify-self: end;
}
}
 .bbai-library-toolbar__left,
.bbai-library-toolbar__right,
.bbai-library-toolbar__controls {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
 .bbai-library-toolbar__right {
justify-content: flex-end;
}
 .bbai-library-toolbar__controls {
justify-content: flex-end;
}
 .bbai-library-filter-reset {
display: inline-flex;
align-items: center;
min-height: 34px;
padding: 0 4px;
border: 0;
background: transparent;
color: var(--bbai-link-row-secondary);
font-size: 12px;
font-weight: 700;
text-decoration: underline;
text-underline-offset: 2px;
text-decoration-color: rgba(37, 99, 235, 0.35);
cursor: pointer;
transition: color 0.14s ease, text-decoration-color 0.14s ease;
}
 .bbai-library-filter-reset:hover,
.bbai-library-filter-reset:focus-visible {
color: #1e3a8a;
text-decoration-color: rgba(30, 58, 138, 0.65);
outline: none;
}
 .bbai-library-container[data-bbai-has-filters="false"] .bbai-library-filter-reset {
display: none;
}
 .bbai-library-bulk-toggle[aria-pressed="true"] {
background: #eef4ff;
border-color: #c6d7f1;
color: var(--bbai-library-text);
}
 .bbai-library-selection-bar {
top: 76px;
z-index: 8;
padding: 12px 14px;
border: 1px solid #dbe6f2;
border-radius: 18px;
box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
 .bbai-library-selection-bar__credits {
display: none;
}
 .bbai-library-table-shell {
padding: 0;
margin: 2px 0 0;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
}
 .bbai-library-head-bulk {
display: none;
align-items: center;
gap: 8px;
margin-top: 2px;
flex: 0 0 auto;
font-size: 13px;
font-weight: 600;
color: var(--bbai-library-text);
cursor: pointer;
user-select: none;
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-head-bulk {
display: inline-flex;
}
 .bbai-library-head-bulk__label {
line-height: 1.2;
}
 .bbai-library-table-perfect-hint {
margin: 6px 0 0;
font-size: 13px;
line-height: 1.45;
color: var(--bbai-library-subtle);
max-width: min(72ch, 100%);
}
 .bbai-library-review-queue {
display: flex;
flex-direction: column;
gap: 0;
margin: 0;
padding: 0;
background: transparent;
border: none;
border-top: 1px solid #f1f5f9;
}
 .bbai-library-review-card {
--bbai-row-rail-current: transparent;
--bbai-row-rail-hover: transparent;
position: relative;
display: grid;
grid-template-columns: 60px minmax(0, 1fr);
align-items: center;
gap: var(--bbai-table-row-gap-y, var(--bbai-admin-table-row-gap-y)) var(--bbai-table-row-gap-x, var(--bbai-admin-table-row-gap-x));
padding: var(--bbai-table-row-pad-y, var(--bbai-admin-table-row-pad-y)) var(--bbai-table-row-pad-x, var(--bbai-admin-table-row-pad-x)) var(--bbai-table-row-pad-y, var(--bbai-admin-table-row-pad-y)) calc(var(--bbai-row-rail-w) + var(--bbai-row-content-inset));
margin: 0;
background: #ffffff;
border: none;
border-bottom: 1px solid #f1f5f9;
border-radius: 0;
box-shadow: none;
min-height: 0;
box-sizing: border-box;
isolation: isolate;
transition:
    background-color 0.16s ease,
    border-color 0.16s ease;
}
 /* Structural left rail — flush to row edge, full height */
.bbai-library-review-card[data-status]::after {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: var(--bbai-row-rail-w);
border-radius: 0 var(--bbai-row-rail-radius) var(--bbai-row-rail-radius) 0;
background: var(--bbai-row-rail-current);
pointer-events: none;
z-index: 0;
transition: background-color 0.16s ease, opacity 0.16s ease;
}
 .bbai-library-review-card[data-status] > * {
position: relative;
z-index: 1;
}
 .bbai-library-review-card[data-status='missing'] {
--bbai-row-rail-current: var(--bbai-row-rail-missing);
--bbai-row-rail-hover: var(--bbai-row-rail-missing-strong);
background: var(--bbai-status-missing-row-bg);
}
 .bbai-library-review-card[data-status='weak'] {
--bbai-row-rail-current: var(--bbai-row-rail-weak);
--bbai-row-rail-hover: var(--bbai-row-rail-weak-strong);
background: var(--bbai-status-needs-review-row-bg);
}
 .bbai-library-review-card[data-status='optimized'] {
--bbai-row-rail-current: var(--bbai-row-rail-opt);
--bbai-row-rail-hover: var(--bbai-row-rail-opt-strong);
background: var(--bbai-status-optimized-row-bg);
}
 .bbai-library-review-card:last-child {
border-bottom: none;
}
 .bbai-library-review-card:hover,
.bbai-library-review-card:focus-within {
background: #fafbfc;
}
 .bbai-library-review-card[data-status='missing']:hover,
.bbai-library-review-card[data-status='missing']:focus-within {
background: #f8fafc;
}
 .bbai-library-review-card[data-status='missing']:hover::after,
.bbai-library-review-card[data-status='missing']:focus-within::after {
background: var(--bbai-row-rail-hover);
}
 .bbai-library-review-card[data-status='weak']:hover,
.bbai-library-review-card[data-status='weak']:focus-within {
background: rgba(254, 243, 199, 0.52);
}
 .bbai-library-review-card[data-status='weak']:hover::after,
.bbai-library-review-card[data-status='weak']:focus-within::after {
background: var(--bbai-row-rail-hover);
}
 .bbai-library-review-card[data-status='optimized']:hover,
.bbai-library-review-card[data-status='optimized']:focus-within {
background: rgba(220, 252, 231, 0.52);
}
 .bbai-library-review-card[data-status='optimized']:hover::after,
.bbai-library-review-card[data-status='optimized']:focus-within::after {
background: var(--bbai-row-rail-hover);
}
 .bbai-library-review-card.bbai-library-row--editing {
background: rgba(239, 246, 255, 0.72);
border-bottom-color: #dbeafe;
}
 .bbai-library-review-card.bbai-library-row--editing::after {
background: rgba(59, 130, 246, 0.55);
border-radius: 0 var(--bbai-row-rail-radius) var(--bbai-row-rail-radius) 0;
}
 .bbai-library-review-card.bbai-library-row--editing:hover::after,
.bbai-library-review-card.bbai-library-row--editing:focus-within::after {
background: rgba(37, 99, 235, 0.72);
}
 .bbai-library-review-card.bbai-library-row--saved-flash {
animation: bbai-library-row-saved 0.85s ease;
}
 @keyframes bbai-library-row-saved {
0% {
    background-color: rgba(220, 252, 231, 0.78);
}
100% {
    background-color: transparent;
}
}
 .bbai-library-inline-alt {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
min-width: 0;
}
 .bbai-library-inline-alt__textarea {
width: 100%;
min-height: 48px;
max-height: 120px;
margin: 0;
padding: 8px 11px;
border: 1px solid #c7d5e8;
border-radius: 10px;
background: #ffffff;
font-size: 14px;
line-height: 1.45;
color: var(--bbai-library-text);
resize: vertical;
transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
box-sizing: border-box;
}
 .bbai-library-inline-alt__textarea:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(15, 23, 42, 0.06);
background: #ffffff;
}
 .bbai-library-inline-alt__toolbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
 .bbai-library-inline-alt__toolbar .bbai-btn {
min-height: 34px;
}
 .bbai-library-inline-alt__saved {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
font-weight: 600;
color: #15803d;
opacity: 0;
transition: opacity 0.2s ease;
}
 .bbai-library-inline-alt__saved.is-visible {
opacity: 1;
}
 .bbai-library-inline-alt__error {
margin: 0;
font-size: 12px;
color: #b91c1c;
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card {
grid-template-columns: auto 60px minmax(0, 1fr);
}
 .bbai-library-card__select {
display: none;
align-items: center;
padding-top: 0;
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-card__select {
display: flex;
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card.is-selected {
background: rgba(239, 246, 255, 0.72);
border-bottom-color: #dbeafe;
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card.is-selected::after {
background: rgba(37, 99, 235, 0.58);
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card.is-selected:hover::after,
.bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card.is-selected:focus-within::after {
background: rgba(29, 78, 216, 0.72);
}
 .bbai-library-review-card .bbai-library-thumbnail,
.bbai-library-review-card .bbai-library-thumbnail-placeholder {
width: 52px;
height: 52px;
border-radius: 8px;
}
 .bbai-library-card__thumb {
display: flex;
align-items: center;
justify-content: center;
padding-top: 0;
}
 /* Main cell: full width of row track (do not inherit legacy table .bbai-library-cell--alt-text 42% width). */
.bbai-library-review-card .bbai-library-cell--alt-text.bbai-library-card__main {
width: 100%;
max-width: none;
min-width: 0;
}
 .bbai-library-card__main {
min-width: 0;
width: 100%;
display: flex;
flex-direction: column;
gap: 6px;
}
 .bbai-library-card__col--meta {
min-width: 0;
}
 .bbai-library-card__col--status {
min-width: 0;
}
 .bbai-library-status-tags {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
 .bbai-library-card__review-body {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 6px;
min-width: 0;
width: 100%;
}
 .bbai-library-card__review-body .bbai-library-alt-slot {
flex: 0 1 auto;
min-width: 0;
width: 100%;
}
 .bbai-library-card__review-body .bbai-library-card__action-cluster {
flex: 0 0 auto;
align-self: stretch;
}
 .bbai-library-card__tool-row,
.bbai-library-card__action-cluster {
display: flex;
align-items: stretch;
justify-content: flex-start;
gap: var(--bbai-lib-act-gap);
flex-wrap: wrap;
}
 .bbai-library-card__tool-row.bbai-row-actions {
flex-direction: column;
flex-wrap: nowrap;
align-items: stretch;
gap: 6px;
}
 .bbai-library-card__tool-row.bbai-row-actions .bbai-library-card__quick-actions {
flex-direction: column;
width: 100%;
gap: 6px;
}
 .bbai-library-card__extra-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
width: 100%;
}
 .bbai-library-card__action-cluster {
margin-top: 0;
width: 100%;
min-width: 0;
}
 .bbai-library-card__quick-actions {
display: flex;
align-items: stretch;
flex-wrap: wrap;
gap: var(--bbai-lib-act-gap);
opacity: 0.92;
transition: opacity 0.18s ease;
}
 .bbai-library-review-card:hover .bbai-library-card__quick-actions,
.bbai-library-review-card:focus-within .bbai-library-card__quick-actions {
opacity: 1;
}
 @media (hover: none) {
.bbai-library-card__quick-actions {
    opacity: 1;
}
}
 /* Shared metrics: every row action control uses the same box model */
.bbai-library-card__quick-action {
box-sizing: border-box;
margin: 0;
display: inline-flex;
align-items: center;
justify-content: center;
min-height: var(--bbai-lib-act-h);
height: var(--bbai-lib-act-h);
padding: 0 var(--bbai-lib-act-pad-x);
border-radius: var(--bbai-lib-act-radius);
font-size: var(--bbai-lib-act-fs);
font-weight: var(--bbai-lib-act-fw);
line-height: 1.2;
cursor: pointer;
border: 1px solid transparent;
text-decoration: none;
-webkit-appearance: none;
appearance: none;
transition: box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}
 /* Primary — Generate / Regenerate on missing & needs-review rows */
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--primary:not(:disabled):not(.bbai-is-locked) {
background: var(--bbai-admin-btn-primary-bg, #10b981) !important;
background-color: var(--bbai-admin-btn-primary-bg, #10b981) !important;
border-color: var(--bbai-admin-btn-primary-border, #047857) !important;
color: #ffffff !important;
font-weight: var(--bbai-lib-act-fw);
box-shadow: var(--bbai-admin-btn-primary-shadow) !important;
opacity: 1 !important;
cursor: pointer !important;
pointer-events: auto !important;
filter: none;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--primary:hover:not(:disabled):not(.bbai-is-locked),
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--primary:focus-visible:not(.bbai-is-locked) {
background: var(--bbai-admin-btn-primary-bg, #059669) !important;
background-color: var(--bbai-admin-btn-primary-bg, #059669) !important;
border-color: var(--bbai-admin-color-primary-active, #047857) !important;
color: #ffffff !important;
box-shadow: var(--bbai-admin-btn-primary-shadow-hover) !important;
filter: brightness(0.98);
outline: none;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--primary:focus-visible:not(.bbai-is-locked) {
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(16, 185, 129, 0.4) !important;
}
 /* Secondary — Edit manually (outlined) */
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--secondary:not(:disabled):not(.bbai-is-locked) {
background: var(--bbai-admin-btn-secondary-bg) !important;
border: 1px solid var(--bbai-admin-btn-secondary-border) !important;
color: var(--bbai-admin-btn-secondary-text) !important;
font-weight: var(--bbai-admin-type-weight-medium, 500);
box-shadow: none !important;
opacity: 1 !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--secondary:hover:not(:disabled):not(.bbai-is-locked),
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--secondary:focus-visible:not(.bbai-is-locked) {
background: var(--bbai-admin-btn-secondary-bg-hover) !important;
border-color: var(--bbai-admin-btn-secondary-border-hover) !important;
color: var(--bbai-admin-btn-secondary-text-hover) !important;
outline: none;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--secondary:focus-visible:not(.bbai-is-locked) {
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(100, 116, 139, 0.35) !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--soft-primary:not(:disabled):not(.bbai-is-locked) {
background: #ecfdf5 !important;
border: 1px solid #86efac !important;
color: #166534 !important;
font-weight: var(--bbai-admin-type-weight-semibold, 600);
box-shadow: none !important;
opacity: 1 !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--soft-primary:hover:not(:disabled):not(.bbai-is-locked),
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--soft-primary:focus-visible:not(.bbai-is-locked) {
background: #dcfce7 !important;
border-color: #4ade80 !important;
color: #14532d !important;
outline: none;
box-shadow: 0 1px 3px rgba(22, 101, 52, 0.08) !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--soft-primary:focus-visible:not(.bbai-is-locked) {
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(34, 197, 94, 0.24) !important;
}
 /* Quiet secondary — Regenerate on optimized rows (same shape, lower urgency than primary pipeline) */
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--quiet:not(:disabled):not(.bbai-is-locked) {
background: var(--bbai-lib-act-surface) !important;
border: 1px solid #e2e8f0 !important;
color: var(--bbai-lib-act-text-muted) !important;
font-weight: var(--bbai-admin-type-weight-medium, 500);
box-shadow: none !important;
opacity: 1 !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--quiet:hover:not(:disabled):not(.bbai-is-locked),
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--quiet:focus-visible:not(.bbai-is-locked) {
background: var(--bbai-lib-act-surface-hover) !important;
border-color: var(--bbai-lib-act-border) !important;
color: #475569 !important;
outline: none;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--quiet:focus-visible:not(.bbai-is-locked) {
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(148, 163, 184, 0.35) !important;
}
 /* Native disabled — not confused with primary */
.bbai-library-workspace button.bbai-library-card__quick-action:disabled {
background: #e5e7eb !important;
border-color: #d1d5db !important;
color: #6b7280 !important;
box-shadow: none !important;
opacity: 0.85 !important;
cursor: not-allowed !important;
pointer-events: none !important;
filter: none !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--primary:disabled {
background: #e5e7eb !important;
color: #6b7280 !important;
border-color: #d1d5db !important;
}
 /* Legacy class aliases (older rows / cached markup) */
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--lead:not(:disabled):not(.bbai-is-locked) {
background: var(--bbai-lib-act-surface) !important;
border: 1px solid var(--bbai-lib-act-border) !important;
color: var(--bbai-lib-act-text) !important;
font-weight: var(--bbai-lib-act-fw);
box-shadow: none !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--lead:hover:not(:disabled):not(.bbai-is-locked),
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--lead:focus-visible:not(.bbai-is-locked) {
background: var(--bbai-lib-act-surface-hover) !important;
border-color: var(--bbai-lib-act-border-strong) !important;
color: #0f172a !important;
outline: none;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--ghost:not(:disabled):not(.bbai-is-locked) {
background: var(--bbai-lib-act-surface) !important;
border: 1px solid #e2e8f0 !important;
color: var(--bbai-lib-act-text-muted) !important;
font-weight: var(--bbai-lib-act-fw);
box-shadow: none !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--ghost:hover:not(:disabled):not(.bbai-is-locked),
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-library-card__quick-action--ghost:focus-visible:not(.bbai-is-locked) {
background: var(--bbai-lib-act-surface-hover) !important;
border-color: var(--bbai-lib-act-border) !important;
color: #475569 !important;
outline: none;
}
 /* Locked / credits — muted non-primary; still clickable for upgrade (delegated click) */
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-is-locked {
opacity: 1 !important;
cursor: pointer !important;
pointer-events: auto !important;
transform: none;
background: #f9f7ff !important;
border: 1px solid rgba(102, 87, 189, 0.18) !important;
color: #6657bd !important;
box-shadow: 0 2px 6px rgba(102, 87, 189, 0.045) !important;
filter: none !important;
}
 .bbai-library-workspace button.bbai-library-card__quick-action.bbai-is-locked:hover,
.bbai-library-workspace button.bbai-library-card__quick-action.bbai-is-locked:focus-visible {
background: #f5f2ff !important;
border-color: rgba(102, 87, 189, 0.24) !important;
color: #5548a8 !important;
outline: none;
box-shadow: 0 3px 8px rgba(102, 87, 189, 0.06) !important;
}
 .bbai-library-card__meta-wrap {
min-width: 0;
display: grid;
gap: 2px;
flex: 1;
}
 .bbai-library-card__filename {
margin: 0;
font-size: 12px;
line-height: 1.35;
font-weight: 700;
color: var(--bbai-library-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
 .bbai-library-card__meta {
margin: 0;
font-size: 10px;
line-height: 1.4;
letter-spacing: 0.02em;
color: rgba(100, 116, 139, 0.88);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
 .bbai-library-workspace .bbai-library-card__extra-actions .bbai-library-card__quick-action--ghost.bbai-is-locked {
opacity: 1 !important;
cursor: pointer !important;
pointer-events: auto !important;
background: #f9f7ff !important;
border-color: rgba(102, 87, 189, 0.18) !important;
color: #6657bd !important;
box-shadow: 0 2px 6px rgba(102, 87, 189, 0.045) !important;
}
 .bbai-library-alt-preview-card--queue {
box-sizing: border-box;
width: 100%;
min-width: 0;
max-width: 100%;
min-height: 48px;
max-height: 5.5rem;
padding: 8px 10px;
border-radius: 10px;
background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
border: 1px solid #c7d2e4;
cursor: pointer;
transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
overflow: hidden;
}
 .bbai-library-alt-preview-card--queue.is-expanded,
.bbai-library-review-card.bbai-library-row--editing .bbai-library-alt-preview-card--queue {
max-height: none;
overflow: visible;
}
 .bbai-library-alt-preview-card--queue:hover {
background: linear-gradient(180deg, #f1f5f9 0%, #e8edf4 100%);
border-color: #94a3b8;
box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
 .bbai-library-alt-preview-card--queue:focus-within {
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2), 0 2px 10px rgba(15, 23, 42, 0.06);
background: #f8fafc;
}
 .bbai-library-alt-preview-card--queue .bbai-alt-text-preview {
font-size: 14px;
line-height: 1.45;
-webkit-line-clamp: 2;
}
 .bbai-library-alt-preview-card--queue.is-expanded .bbai-alt-text-preview {
-webkit-line-clamp: unset;
max-height: none;
}
 .bbai-library-alt-preview-card--queue .bbai-alt-text-missing {
font-size: 13px;
line-height: 1.5;
font-style: italic;
color: #475569;
}
 .bbai-library-filter-empty {
display: block;
}
 .bbai-library-filter-empty[hidden] {
display: none !important;
}
 .bbai-library-filter-empty__cell {
display: block;
padding: 0;
background: transparent;
border: 0;
}
 @media (max-width: 1100px) {
.bbai-library-toolbar__controls {
    justify-content: flex-start;
}
 .bbai-library-review-card {
    grid-template-columns: 60px minmax(0, 1fr);
}
 .bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card {
    grid-template-columns: auto 60px minmax(0, 1fr);
}
 .bbai-library-workspace-filter-strip {
    padding-top: 12px;
    padding-bottom: 14px;
}
 .bbai-library-workspace-intro {
    padding-top: 16px;
}
}
 @media (max-width: 720px) {
.bbai-library-selection-bar {
    top: 64px;
}
 .bbai-library-review-card,
.bbai-library-main[data-bbai-bulk-mode="true"] .bbai-library-review-card {
    grid-template-columns: 1fr;
}
 .bbai-library-card__select {
    order: -1;
    padding-top: 0;
}
 .bbai-library-card__thumb {
    justify-content: flex-start;
}
 }
 /* =====================================================
   ALT EDIT MODAL
   ===================================================== */
.bbai-library-edit-modal {
position: fixed;
inset: 0;
z-index: 100000;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.22s ease, visibility 0.22s ease;
}
 .bbai-library-edit-modal.is-visible {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
 .bbai-library-edit-modal__backdrop {
position: absolute;
inset: 0;
background: rgba(15, 23, 42, 0.44);
backdrop-filter: blur(10px);
}
 .bbai-library-edit-modal__dialog {
position: relative;
width: min(1040px, calc(100vw - 32px));
max-height: min(820px, calc(100vh - 32px));
overflow: auto;
background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
border: 1px solid rgba(219, 230, 242, 0.92);
border-radius: 28px;
box-shadow: 0 36px 90px rgba(15, 23, 42, 0.22);
padding: 28px;
}
 .bbai-library-edit-modal__close {
position: absolute;
top: 18px;
right: 18px;
width: 38px;
height: 38px;
border-radius: 999px;
border: 1px solid #dbe6f2;
background: rgba(248, 251, 255, 0.92);
color: var(--bbai-library-text);
font-size: 22px;
line-height: 1;
cursor: pointer;
transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
 .bbai-library-edit-modal__close:hover,
.bbai-library-edit-modal__close:focus-visible {
background: #ffffff;
border-color: #c7d7ea;
transform: translateY(-1px);
}
 .bbai-library-edit-modal__layout {
display: grid;
grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
gap: 28px;
align-items: start;
}
 .bbai-library-edit-modal__media {
display: grid;
gap: 14px;
padding: 14px;
border-radius: 22px;
background: #f7fafe;
border: 1px solid #e3ebf5;
}
 .bbai-library-edit-modal__preview-wrap {
aspect-ratio: 1 / 1;
border-radius: 18px;
overflow: hidden;
background: #eef4fb;
display: flex;
align-items: center;
justify-content: center;
}
 .bbai-library-edit-modal__preview {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
 .bbai-library-edit-modal__preview-fallback {
display: grid;
place-items: center;
color: #8ca0b8;
width: 100%;
height: 100%;
}
 .bbai-library-edit-modal__meta {
display: grid;
gap: 10px;
}
 .bbai-library-edit-modal__meta-row {
display: grid;
gap: 4px;
padding: 10px 12px;
border-radius: 14px;
background: #ffffff;
border: 1px solid #e7eef7;
}
 .bbai-library-edit-modal__meta-label {
font-size: var(--bbai-admin-type-label, 12px);
line-height: 1.2;
font-weight: var(--bbai-admin-type-weight-semibold, 600);
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--bbai-library-subtle);
}
 .bbai-library-edit-modal__meta-value {
font-size: var(--bbai-admin-type-meta, 13px);
line-height: 1.5;
color: var(--bbai-library-text);
word-break: break-word;
}
 .bbai-library-edit-modal__panel {
display: grid;
gap: var(--section-spacing, 24px);
min-width: 0;
}
 .bbai-library-edit-modal__header {
display: grid;
gap: 6px;
padding-right: 42px;
}
 .bbai-library-edit-modal__title {
margin: 0;
font-size: var(--bbai-admin-type-section-title, 24px);
line-height: 1.05;
letter-spacing: var(--bbai-tracking-tight, -0.03em);
color: var(--bbai-admin-color-text, var(--bbai-library-text));
}
 .bbai-library-edit-modal__subtitle {
margin: 0;
font-size: var(--bbai-admin-type-body, 14px);
line-height: 1.6;
color: var(--bbai-admin-color-text-secondary, var(--bbai-library-muted));
}
 .bbai-library-edit-modal__stack {
display: grid;
gap: 10px;
}
 .bbai-library-edit-modal__label {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: var(--bbai-admin-type-label, 12px);
line-height: 1.2;
font-weight: var(--bbai-admin-type-weight-semibold, 600);
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--bbai-library-subtle);
}
 .bbai-library-edit-modal__label-badge {
display: inline-flex;
align-items: center;
min-height: 20px;
padding: 0 8px;
border-radius: 999px;
background: #eef4ff;
color: #425c8c;
font-size: 10px;
line-height: 1;
font-weight: 700;
letter-spacing: 0.08em;
}
 .bbai-library-edit-modal__suggestion {
padding: 16px 18px;
border-radius: 18px;
background: #f7fafe;
border: 1px solid #dfe8f4;
color: var(--bbai-library-text);
font-size: var(--bbai-admin-type-body, 14px);
line-height: 1.7;
min-height: 78px;
white-space: pre-wrap;
}
 .bbai-library-edit-modal__suggestion--empty {
color: var(--bbai-library-muted);
}
 .bbai-library-edit-modal__textarea {
width: 100%;
min-height: 150px;
padding: 16px 18px;
border-radius: 18px;
border: 1px solid #c7d8ec;
background: #ffffff;
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03), 0 0 0 0 rgba(96, 165, 250, 0);
font-size: var(--bbai-admin-type-body-lg, 16px);
line-height: 1.7;
color: var(--bbai-library-text);
resize: vertical;
transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
 .bbai-library-edit-modal__textarea:focus {
outline: none;
border-color: #60a5fa;
box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
background: #ffffff;
}
 .bbai-library-edit-modal__toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--card-gap, 16px);
flex-wrap: wrap;
}
 .bbai-library-edit-modal__ai-actions {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
 .bbai-library-edit-modal__ai-btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 34px;
padding: 0 12px;
border-radius: 999px;
border: 1px solid #d6e1ee;
background: #f9fbfe;
color: var(--bbai-library-text);
font-size: var(--bbai-admin-type-label, 12px);
font-weight: var(--bbai-admin-type-weight-semibold, 600);
cursor: pointer;
transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, color 0.16s ease;
}
 .bbai-library-edit-modal__ai-btn:hover,
.bbai-library-edit-modal__ai-btn:focus-visible {
background: #eef5fc;
border-color: #c3d5e9;
transform: translateY(-1px);
}
 .bbai-library-edit-modal__ai-btn.is-loading {
pointer-events: none;
color: #547293;
}
 .bbai-library-edit-modal__quality {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-radius: 14px;
background: #f7fafc;
border: 1px solid #e2e8f0;
}
 .bbai-library-edit-modal__quality-label {
font-size: var(--bbai-admin-type-label, 12px);
line-height: 1.3;
color: var(--bbai-library-muted);
}
 .bbai-library-edit-modal__quality-value {
display: inline-flex;
align-items: center;
min-height: 24px;
padding: 0 10px;
border-radius: 999px;
font-size: var(--bbai-admin-type-label, 12px);
line-height: 1;
font-weight: var(--bbai-admin-type-weight-semibold, 600);
}
 .bbai-library-edit-modal__quality-value--high {
background: rgba(22, 163, 74, 0.10);
color: #166534;
}
 .bbai-library-edit-modal__quality-value--good {
background: rgba(59, 130, 246, 0.10);
color: #1d4ed8;
}
 .bbai-library-edit-modal__quality-value--needs-work {
background: rgba(245, 158, 11, 0.14);
color: #92400e;
}
 .bbai-library-edit-modal__quality-copy {
font-size: var(--bbai-admin-type-meta, 13px);
line-height: 1.5;
color: var(--bbai-library-muted);
}
 .bbai-library-edit-modal__automation {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
flex-wrap: wrap;
padding: 14px 16px;
border-radius: 18px;
background: linear-gradient(180deg, #faf7ff 0%, #f6faff 100%);
border: 1px solid #e6def7;
}
 .bbai-library-edit-modal__automation-copy {
display: grid;
gap: 4px;
min-width: 0;
}
 .bbai-library-edit-modal__automation-title {
margin: 0;
font-size: var(--bbai-admin-type-body, 14px);
line-height: 1.4;
font-weight: var(--bbai-admin-type-weight-semibold, 600);
color: var(--bbai-library-text);
}
 .bbai-library-edit-modal__automation-text {
margin: 0;
font-size: var(--bbai-admin-type-meta, 13px);
line-height: 1.5;
color: var(--bbai-library-muted);
}
 .bbai-library-edit-modal__footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
flex-wrap: wrap;
}
.bbai-library-edit-modal__hint,
.bbai-library-edit-modal__error {
margin: 0;
font-size: var(--bbai-admin-type-meta, 13px);
line-height: 1.5;
}
 .bbai-library-edit-modal__hint {
color: var(--bbai-library-subtle);
}
 .bbai-library-edit-modal__error {
color: var(--bbai-library-red);
min-height: 18px;
}
 .bbai-library-edit-modal__actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
 @media (max-width: 900px) {
.bbai-library-edit-modal__layout {
    grid-template-columns: 1fr;
}
 .bbai-library-edit-modal__media {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: start;
}
 .bbai-library-edit-modal__preview-wrap {
    aspect-ratio: 1 / 1;
}
}
 @media (max-width: 640px) {
.bbai-library-edit-modal {
    padding: 12px;
}
 .bbai-library-edit-modal__dialog {
    width: min(100vw - 8px, 100%);
    max-height: calc(100vh - 16px);
    padding: 20px 16px 18px;
    border-radius: 22px;
}
 .bbai-library-edit-modal__media {
    grid-template-columns: 1fr;
}
 .bbai-library-edit-modal__footer {
    align-items: stretch;
}
 .bbai-library-edit-modal__actions {
    width: 100%;
}
 .bbai-library-edit-modal__actions .bbai-btn {
    flex: 1 1 auto;
    justify-content: center;
}
}

/* ─── Row processing / done states ──────────────────────────────────────── */

/* Bulk generation: queued (waiting) vs failed (single row error) */
.bbai-library-row--bulk-queued {
	position: relative;
	opacity: 0.92;
}

.bbai-library-row--bulk-queued::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	border: 1px dashed rgba(100, 116, 139, 0.35);
}

.bbai-library-row--bulk-failed {
	box-shadow: inset 0 0 0 2px rgba(220, 38, 38, 0.35);
}

.bbai-library-review-card.bbai-library-row--processing {
    background: rgba(239, 246, 255, 0.55);
    border-bottom-color: #bfdbfe;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.bbai-library-review-card.bbai-library-row--processing::after {
    background: rgba(59, 130, 246, 0.45) !important;
}

/* "Generating..." shimmer on the alt-text slot while a regen is in-flight */
.bbai-library-row--processing .bbai-library-inline-alt,
.bbai-library-row--processing [data-bbai-alt-slot] {
    opacity: 0.55;
    pointer-events: none;
}

.bbai-library-row--done {
    animation: bbai-row-done-flash 0.9s ease forwards;
}

.bbai-library-review-card.bbai-library-row--resolved {
    background: rgba(220, 252, 231, 0.72);
    border-bottom-color: #86efac;
}

.bbai-library-row--filter-exit {
    opacity: 1;
    overflow: hidden;
    transition:
        opacity 0.24s ease,
        transform 0.24s ease,
        max-height 0.28s ease,
        margin 0.28s ease,
        padding 0.28s ease,
        border-bottom-width 0.28s ease;
}

.bbai-library-row--filter-exit.bbai-library-row--filter-exit-active {
    opacity: 0;
    transform: translateX(10px);
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-bottom-width: 0 !important;
    pointer-events: none;
}

.bbai-library-row--next-up {
    animation: bbai-row-next-up 1.2s ease;
}

@keyframes bbai-row-done-flash {
    0%   { background-color: rgba(220, 252, 231, 0.85); }
    60%  { background-color: rgba(220, 252, 231, 0.6); }
    100% { background-color: transparent; }
}

@keyframes bbai-row-next-up {
    0%   { box-shadow: inset 0 0 0 0 rgba(59, 130, 246, 0); }
    25%  { box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.22); }
    100% { box-shadow: inset 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ─── Approve → fade-out transition ─────────────────────────────────────── */

.bbai-library-row--approve-pending {
    opacity: 1;
    transition: opacity 0.35s ease, max-height 0.4s ease 0.3s, padding 0.4s ease 0.3s, margin 0.4s ease 0.3s;
    overflow: hidden;
}

.bbai-library-row--approve-out {
    opacity: 0;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-bottom-width: 0 !important;
    pointer-events: none;
}

/* ─── Global library progress bar — processing state ────────────────────── */

[data-bbai-library-progressbar].bbai-library-progressbar--busy [data-bbai-library-progress-optimized] {
    transition: flex-basis 0.5s ease;
}

[data-bbai-library-progressbar].bbai-library-progressbar--busy [data-bbai-library-progress-weak] {
    transition: flex-basis 0.5s ease;
}

[data-bbai-library-progressbar].bbai-library-progressbar--busy [data-bbai-library-progress-missing] {
    transition: flex-basis 0.5s ease;
}

body.bbai-dashboard .bbai-library-workspace .bbai-queue-workflow { display: none !important; }

/* ─── Surface parity: plan top banner (.bbai-banner--success) + ALT Library workspace card ─── */
body.bbai-dashboard .bbai-library-workspace .bbai-library-workspace-card {
    --bbai-ws-radius: 16px;
    background: var(--bbai-command-hero-success-bg);
    border: 1px solid var(--bbai-command-hero-success-border);
    border-radius: var(--bbai-ws-radius);
    box-shadow: var(--bbai-command-hero-success-shadow-rest);
    transition:
        transform var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        box-shadow var(--bbai-motion-base, 180ms) var(--bbai-ease-premium, cubic-bezier(0.2, 0.8, 0.2, 1)),
        border-color var(--bbai-motion-base, 180ms) ease;
}

body.bbai-dashboard .bbai-library-workspace .bbai-library-workspace-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--bbai-command-hero-success-shadow-hover);
}

body.bbai-dashboard .bbai-library-workspace-card__head .bbai-ui-section-header__title,
body.bbai-dashboard .bbai-library-workspace-card__head h2.bbai-section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #0f172a;
}

/* Source: assets/css/system/bbai-admin-button-system.css */
/**
 * BeepBeep AI — unified admin button system
 *
 * Single visual language for .bbai-btn + row/banner/modal actions.
 * Loads after saas-consistency + library polish so tokens win over one-offs.
 *
 * Modifier aliases (optional in markup, equivalent to legacy classes):
 *   .bbai-btn--primary   ↔ .bbai-btn-primary
 *   .bbai-btn--secondary ↔ .bbai-btn-secondary
 *   .bbai-btn--tertiary, .bbai-btn--ghost ↔ .bbai-btn-tertiary, .bbai-btn-ghost
 *   .bbai-btn--sm       ↔ .bbai-btn-sm
 *   .bbai-btn--full     ↔ .bbai-btn-block
 *
 * @package BeepBeep_AI
 */

/* -------------------------------------------------------------------------- */
/* Core .bbai-btn — dimensions, flex centering, radius                         */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn,
.wrap.bbai-wrap .bbai-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: var(--bbai-btn-height);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: var(--bbai-btn-padding-x) !important;
    padding-right: var(--bbai-btn-padding-x) !important;
    line-height: var(--bbai-btn-line-height);
    border-radius: var(--bbai-btn-radius) !important;
    font-size: var(--bbai-btn-font-size);
    font-weight: var(--bbai-btn-font-weight);
    gap: var(--bbai-btn-gap);
    transition: var(--bbai-btn-transition);
}

body.bbai-dashboard .bbai-btn-sm,
body.bbai-dashboard .bbai-btn.bbai-btn--sm,
.wrap.bbai-wrap .bbai-btn-sm,
.wrap.bbai-wrap .bbai-btn.bbai-btn--sm {
    min-height: var(--bbai-btn-height-sm);
    min-width: 0;
    padding: 8px 16px !important;
    font-size: var(--bbai-btn-font-size-sm) !important;
    border-radius: var(--bbai-btn-radius) !important;
    line-height: var(--bbai-btn-line-height);
}

body.bbai-dashboard .bbai-btn-primary,
body.bbai-dashboard .bbai-btn.bbai-btn-primary,
body.bbai-dashboard .bbai-btn.bbai-btn--primary,
.wrap.bbai-wrap .bbai-btn-primary,
.wrap.bbai-wrap .bbai-btn.bbai-btn-primary,
.wrap.bbai-wrap .bbai-btn.bbai-btn--primary {
    min-height: var(--bbai-btn-height);
    font-weight: var(--bbai-btn-font-weight-primary) !important;
    padding-left: var(--bbai-btn-padding-x-compact) !important;
    padding-right: var(--bbai-btn-padding-x-compact) !important;
}

body.bbai-dashboard .bbai-btn-primary.bbai-btn-sm,
body.bbai-dashboard .bbai-btn.bbai-btn-primary.bbai-btn-sm,
body.bbai-dashboard .bbai-btn.bbai-btn--primary.bbai-btn-sm,
.wrap.bbai-wrap .bbai-btn-primary.bbai-btn-sm,
.wrap.bbai-wrap .bbai-btn.bbai-btn-primary.bbai-btn-sm,
.wrap.bbai-wrap .bbai-btn.bbai-btn--primary.bbai-btn-sm {
    min-height: var(--bbai-btn-height-sm);
}

/* Secondary: same hit-area as primary when paired; medium weight (not 400) */
body.bbai-dashboard .bbai-btn-secondary:not(.bbai-btn-sm),
body.bbai-dashboard .bbai-btn.bbai-btn-secondary:not(.bbai-btn-sm),
body.bbai-dashboard .bbai-btn.bbai-btn--secondary:not(.bbai-btn-sm):not(.bbai-btn--sm),
.wrap.bbai-wrap .bbai-btn-secondary:not(.bbai-btn-sm),
.wrap.bbai-wrap .bbai-btn.bbai-btn-secondary:not(.bbai-btn-sm),
.wrap.bbai-wrap .bbai-btn.bbai-btn--secondary:not(.bbai-btn-sm):not(.bbai-btn--sm) {
    min-height: var(--bbai-btn-height);
    font-weight: var(--bbai-btn-font-weight-secondary) !important;
    padding-left: var(--bbai-btn-padding-x-compact) !important;
    padding-right: var(--bbai-btn-padding-x-compact) !important;
}

body.bbai-dashboard .bbai-btn-tertiary,
body.bbai-dashboard .bbai-btn-ghost,
body.bbai-dashboard .bbai-btn.bbai-btn--tertiary,
body.bbai-dashboard .bbai-btn.bbai-btn--ghost,
.wrap.bbai-wrap .bbai-btn-tertiary,
.wrap.bbai-wrap .bbai-btn-ghost,
.wrap.bbai-wrap .bbai-btn.bbai-btn--tertiary,
.wrap.bbai-wrap .bbai-btn.bbai-btn--ghost {
    min-height: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: var(--bbai-btn-line-height);
}

body.bbai-dashboard .bbai-btn-block,
body.bbai-dashboard .bbai-btn.bbai-btn--full,
.wrap.bbai-wrap .bbai-btn-block,
.wrap.bbai-wrap .bbai-btn.bbai-btn--full {
    width: 100%;
    justify-content: center;
}

/* -------------------------------------------------------------------------- */
/* Button groups — consistent rhythm                                           */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-btn-group:not(.bbai-btn-group--segmented),
.wrap.bbai-wrap .bbai-btn-group:not(.bbai-btn-group--segmented) {
    gap: var(--bbai-btn-group-gap);
    align-items: center;
}

body.bbai-dashboard .bbai-ui-button-group:not(.bbai-ui-button-group--segmented),
.wrap.bbai-wrap .bbai-ui-button-group:not(.bbai-ui-button-group--segmented) {
    gap: var(--bbai-btn-group-gap);
    align-items: center;
}

/* -------------------------------------------------------------------------- */
/* Banner / hero CTA primitives (classes from ui-button.php)                   */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta,
body.bbai-dashboard .bbai-command-hero-host .bbai-banner .bbai-banner__cta,
body.bbai-dashboard .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary,
body.bbai-dashboard .bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary,
.wrap.bbai-wrap .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__cta,
.wrap.bbai-wrap .bbai-command-hero-host .bbai-banner .bbai-banner__cta,
.wrap.bbai-wrap .bbai-command-hero-host .bbai-banner .bbai-dashboard-hero__link--secondary,
.wrap.bbai-wrap .bbai-command-hero-host .bbai-banner .bbai-banner__link--secondary {
    line-height: var(--bbai-btn-line-height);
}

/* -------------------------------------------------------------------------- */
/* Library row + table actions                                                */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-row-action-btn,
.wrap.bbai-wrap .bbai-row-action-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: var(--bbai-btn-height-sm);
    padding: 8px 14px !important;
    line-height: var(--bbai-btn-line-height);
    border-radius: var(--bbai-btn-radius) !important;
    font-size: var(--bbai-btn-font-size-sm);
    font-weight: var(--bbai-btn-font-weight-secondary);
    gap: 6px;
}

body.bbai-dashboard .bbai-library-workspace .bbai-library-card__quick-action,
.wrap.bbai-wrap .bbai-library-workspace .bbai-library-card__quick-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: var(--bbai-btn-height-sm);
    line-height: var(--bbai-btn-line-height);
    border-radius: var(--bbai-btn-radius) !important;
    font-size: var(--bbai-btn-font-size-sm);
}

/* -------------------------------------------------------------------------- */
/* Library chrome: drop duplicate radius/height overrides                       */
/* -------------------------------------------------------------------------- */

body.bbai-dashboard .bbai-library-page-actions .bbai-btn,
body.bbai-dashboard .bbai-library-summary-actions .bbai-btn,
body.bbai-dashboard .bbai-library-task-banner__actions .bbai-btn,
body.bbai-dashboard .bbai-library-sidebar-card .bbai-btn,
body.bbai-dashboard .bbai-library-selection-bar .bbai-btn,
body.bbai-dashboard .bbai-library-missing-bulk-bar .bbai-btn,
.wrap.bbai-wrap .bbai-library-page-actions .bbai-btn,
.wrap.bbai-wrap .bbai-library-summary-actions .bbai-btn,
.wrap.bbai-wrap .bbai-library-task-banner__actions .bbai-btn,
.wrap.bbai-wrap .bbai-library-sidebar-card .bbai-btn,
.wrap.bbai-wrap .bbai-library-selection-bar .bbai-btn,
.wrap.bbai-wrap .bbai-library-missing-bulk-bar .bbai-btn {
    min-height: var(--bbai-btn-height-sm);
    border-radius: var(--bbai-btn-radius) !important;
}

body.bbai-dashboard .bbai-library-selection-bar .bbai-btn-primary,
body.bbai-dashboard .bbai-library-missing-bulk-bar .bbai-btn-primary,
.wrap.bbai-wrap .bbai-library-selection-bar .bbai-btn-primary,
.wrap.bbai-wrap .bbai-library-missing-bulk-bar .bbai-btn-primary {
    min-height: var(--bbai-btn-height-sm);
}

/* Source: assets/css/bbai-modal.css */
/**
 * BeepBeep AI - Custom Modal Styles
 * Modern, accessible modal system to replace native alerts
 *
 * @package BeepBeep_AI_Alt_Text_Generator
 * @since 4.3.0
 */

/* ==========================================
   Modal Overlay & Backdrop
   ========================================== */

.bbai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bbai-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: bbai-modal-fade-in 0.2s ease;
}

/* ==========================================
   Modal Container
   ========================================== */

.bbai-modal-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    animation: bbai-modal-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bbai-modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 32px;
    text-align: center;
}

/* ==========================================
   Modal Icon
   ========================================== */

.bbai-modal-icon {
    margin: 0 auto 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbai-modal-icon svg {
    width: 48px;
    height: 48px;
}

/* Icon colors by type */
.bbai-modal--error .bbai-modal-icon {
    color: #EF4444;
}

.bbai-modal--warning .bbai-modal-icon {
    color: #F59E0B;
}

.bbai-modal--info .bbai-modal-icon {
    color: #3B82F6;
}

.bbai-modal--success .bbai-modal-icon {
    color: #10B981;
}

/* ==========================================
   Modal Title
   ========================================== */

.bbai-modal-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
    line-height: 1.3;
}

/* ==========================================
   Modal Message
   ========================================== */

.bbai-modal-message {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #4B5563;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bbai-modal-message:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Modal Buttons
   ========================================== */

.bbai-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.bbai-modal-button {
    min-width: 100px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.bbai-modal-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Primary button */
.bbai-modal-button--primary {
    background: #3B82F6;
    color: #ffffff;
}

.bbai-modal-button--primary:hover {
    background: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.bbai-modal-button--primary:active {
    transform: translateY(0);
}

/* Error type primary button */
.bbai-modal--error .bbai-modal-button--primary {
    background: #EF4444;
}

.bbai-modal--error .bbai-modal-button--primary:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Warning type primary button */
.bbai-modal--warning .bbai-modal-button--primary {
    background: #F59E0B;
}

.bbai-modal--warning .bbai-modal-button--primary:hover {
    background: #D97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Success type primary button */
.bbai-modal--success .bbai-modal-button--primary {
    background: #10B981;
}

.bbai-modal--success .bbai-modal-button--primary:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Secondary button */
.bbai-modal-button--secondary {
    background: #F3F4F6;
    color: #374151;
}

.bbai-modal-button--secondary:hover {
    background: #E5E7EB;
    transform: translateY(-1px);
}

.bbai-modal-button--secondary:active {
    transform: translateY(0);
}

/* ==========================================
   Animations
   ========================================== */

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

@keyframes bbai-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 640px) {
    .bbai-modal-overlay {
        padding: 16px;
    }

    .bbai-modal-content {
        padding: 24px;
    }

    .bbai-modal-title {
        font-size: 18px;
    }

    .bbai-modal-message {
        font-size: 14px;
    }

    .bbai-modal-buttons {
        flex-direction: column;
    }

    .bbai-modal-button {
        width: 100%;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .bbai-modal-backdrop,
    .bbai-modal-container {
        animation: none;
    }

    .bbai-modal-button {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bbai-modal-content {
        border: 2px solid #000000;
    }

    .bbai-modal-button {
        border: 2px solid currentColor;
    }
}

/* Source: assets/css/system/bbai-bulk-progress-refresh.css */
.bbai-bulk-progress__subtitle {
    margin: 0 0 var(--bbai-space-1) 0;
    font-size: var(--bbai-text-sm);
    color: var(--bbai-text-muted);
}

.bbai-bulk-progress__summary {
    display: flex;
    flex-direction: column;
    gap: var(--bbai-space-4);
    margin-bottom: var(--bbai-space-6);
}

.bbai-bulk-progress__summary-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bbai-space-3);
}

.bbai-bulk-progress__summary-item {
    padding: var(--bbai-space-3) var(--bbai-space-4);
    border-radius: var(--bbai-radius);
    border: 1px solid var(--bbai-border);
    background: var(--bbai-bg-secondary);
}

.bbai-bulk-progress__summary-item--warning {
    background: var(--bbai-warning-bg, #fff7ed);
    border-color: rgba(217, 119, 6, 0.22);
}

.bbai-bulk-progress__summary-label {
    display: block;
    margin-bottom: var(--bbai-space-1);
    font-size: var(--bbai-text-xs);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bbai-bulk-progress__summary-value {
    font-size: var(--bbai-text-xl);
    line-height: 1.1;
    color: var(--bbai-text);
}

.bbai-bulk-progress__summary-callout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bbai-space-4);
    padding: var(--bbai-space-4);
    border-radius: var(--bbai-radius);
    border: 1px solid rgba(217, 119, 6, 0.22);
    background: var(--bbai-warning-bg, #fff7ed);
}

.bbai-bulk-progress__summary-callout-title {
    margin: 0 0 var(--bbai-space-1) 0;
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    color: var(--bbai-text);
}

.bbai-bulk-progress__summary-callout-text,
.bbai-bulk-progress__summary-callout-support {
    margin: 0;
    color: var(--bbai-text-muted);
    line-height: 1.5;
}

.bbai-bulk-progress__summary-callout-support {
    margin-top: var(--bbai-space-2);
}

.bbai-bulk-progress__summary-callout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bbai-space-2);
    justify-content: flex-end;
}

.bbai-bulk-progress__log-entry--warning {
    background: var(--bbai-warning-bg, #fff7ed);
    border-left: 3px solid var(--bbai-warning, #d97706);
}

@media (max-width: 720px) {
    .bbai-bulk-progress__summary-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bbai-bulk-progress__summary-callout {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .bbai-bulk-progress__summary-stats {
        grid-template-columns: 1fr;
    }
}

/* Source: assets/css/features/automation/phase17-assistant.css */
/**
 * Phase 17 — Assistant widget (scoped; does not replace dashboard design system).
 */

#bbai-phase17-assistant {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 100000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bbai-phase17-assistant__fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: 999px;
    border: none;
    background: #10b981;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.bbai-phase17-assistant__fab:hover,
.bbai-phase17-assistant__fab:focus-visible {
    background: #059669;
    color: #fff;
}

.bbai-phase17-assistant__panel {
    position: absolute;
    right: 0;
    bottom: 52px;
    width: min(380px, calc(100vw - 40px));
    max-height: min(420px, 70vh);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.bbai-phase17-assistant__panel[hidden] {
    display: none !important;
}

.bbai-phase17-assistant__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.875rem;
}

.bbai-phase17-assistant__close {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.bbai-phase17-assistant__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.75rem 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
}

.bbai-phase17-assistant__reply {
    margin: 0 0 0.5rem;
}

.bbai-phase17-assistant__sources {
    margin: 0;
    padding-left: 1.1rem;
}

.bbai-phase17-assistant__foot {
    padding: 0.65rem 0.85rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bbai-phase17-assistant__foot textarea {
    width: 100%;
    resize: vertical;
    min-height: 48px;
    font-size: 0.8125rem;
}

@media (max-width: 600px) {
    #bbai-phase17-assistant {
        right: 12px;
        bottom: 12px;
    }
}

/* Source: assets/css/bbai-tooltips.css */
/**
 * BeepBeep AI - Tooltip Styles
 * Accessible tooltip system for user guidance
 *
 * @package BeepBeep_AI_Alt_Text_Generator
 * @since 4.3.0
 */

/* ==========================================
   Tooltip Container
   ========================================== */

.bbai-tooltip {
    position: absolute;
    z-index: 999999;
    max-width: 280px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #FFFFFF;
    background: #1F2937;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
    font-weight: 400;
    text-align: left;
}

/* ==========================================
   Tooltip Arrows
   ========================================== */

.bbai-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Top tooltip (arrow on bottom) */
.bbai-tooltip--top::before {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px 6px 0 6px;
    border-color: #1F2937 transparent transparent transparent;
}

/* Bottom tooltip (arrow on top) */
.bbai-tooltip--bottom::before {
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent #1F2937 transparent;
}

/* Left tooltip (arrow on right) */
.bbai-tooltip--left::before {
    top: 50%;
    right: -6px;
    margin-top: -6px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent #1F2937;
}

/* Right tooltip (arrow on left) */
.bbai-tooltip--right::before {
    top: 50%;
    left: -6px;
    margin-top: -6px;
    border-width: 6px 6px 6px 0;
    border-color: transparent #1F2937 transparent transparent;
}

/* ==========================================
   Element with Tooltip
   ========================================== */

.bbai-has-tooltip {
    position: relative;
    cursor: help;
}

.bbai-has-tooltip:hover,
.bbai-has-tooltip:focus {
    outline: none;
}

/* Optional: Add subtle indicator for tooltips */
.bbai-has-tooltip::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%236B7280"><circle cx="8" cy="8" r="7" fill="none" stroke="%236B7280" stroke-width="1.5"/><path d="M8 7v4M8 5v.5"/></svg>') center/contain no-repeat;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.bbai-has-tooltip:hover::after {
    opacity: 1;
}

/* ==========================================
   Animations
   ========================================== */

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

.bbai-tooltip {
    animation: bbai-tooltip-fade-in 0.15s ease;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 640px) {
    .bbai-tooltip {
        max-width: 200px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .bbai-tooltip {
        border: 2px solid #FFFFFF;
    }
}

/* Source: assets/css/features/dashboard/logged-in-state.css */
/**
 * 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);
}

@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: 210px;
    font-size: 14px;
    line-height: 1.32;
}

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;
    }
}

/* Source: assets/css/features/dashboard/dashboard-composition.css */
/**
 * Logged-in dashboard reference composition.
 *
 * Matches the approved fully-optimised dashboard: hero status card, usage card,
 * optimisation strip, insight cards, and footer.
 *
 * @package BeepBeep_AI
 * @since   5.3.0
 */

body.toplevel_page_bbai.bbai-dashboard {
    --bbai-ref-bg: #f8fafc;
    --bbai-ref-card: #ffffff;
    --bbai-ref-border: rgba(148, 163, 184, 0.12);
    --bbai-ref-text: #172033;
    --bbai-ref-muted: #708096;
    --bbai-ref-soft: #f3f6fa;
    --bbai-ref-green: #22b573;
    --bbai-ref-green-dark: #08785c;
    --bbai-ref-quota: #6274b8;
    --bbai-ref-quota-dark: #4c5f9f;
    --bbai-ref-amber: #c97a00;
    --bbai-ref-amber-dark: #8a5200;
    --bbai-ref-gold: #d9a441;
    --bbai-ref-gold-dark: #8f6419;
    --bbai-ref-slate: #64748b;
    --bbai-ref-purple: #6657bd;
    --bbai-ref-progress-height: 6px;
    --bbai-ref-progress-track: rgba(226, 232, 240, 0.62);
    --bbai-ref-shadow: 0 1px 2px rgba(15, 23, 42, 0.014), 0 6px 14px rgba(15, 23, 42, 0.018);
    --bbai-ref-radius: 18px;
}

body.toplevel_page_bbai.bbai-dashboard #wpcontent {
    background: var(--bbai-ref-bg);
}

body.toplevel_page_bbai.bbai-dashboard--connected .wrap.bbai-wrap {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard--connected .wrap.bbai-wrap > .bbai-container.bbai-content-shell.bbai-dashboard-shell {
    width: min(100%, 1230px) !important;
    max-width: 1230px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 24px 38px 40px !important;
    box-sizing: border-box !important;
}

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 {
    width: min(100%, 1124px) !important;
    max-width: 1124px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-growth-review-notice,
body.toplevel_page_bbai.bbai-dashboard .bbai-legacy-dashboard-runtime,
body.toplevel_page_bbai.bbai-dashboard #bbai-dashboard-main .bbai-dashboard-command[hidden] {
    display: none !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-logged-in-dashboard--daily-pass {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--bbai-ref-text);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 4px !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__left {
    display: grid !important;
    gap: 8px !important;
    min-width: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__heading {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--bbai-ref-text) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.14 !important;
    letter-spacing: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__subtitle {
    margin: 0 !important;
    color: var(--bbai-ref-muted) !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__right {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__status-pill {
    min-height: 42px !important;
    padding: 0 18px !important;
    border: 1px solid var(--bbai-ref-border) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.018) !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__status-text {
    color: var(--bbai-ref-text) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: #ffffff;
    color: #526174;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.018);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__logout:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__logout:focus-visible {
    border-color: rgba(148, 163, 184, 0.24);
    color: #334155;
    outline: none;
}

body.toplevel_page_bbai.bbai-dashboard #adminmenu .toplevel_page_bbai > a {
    min-height: 32px;
    font-weight: 500;
}

body.toplevel_page_bbai.bbai-dashboard #adminmenu .toplevel_page_bbai.wp-has-current-submenu > a.wp-has-current-submenu,
body.toplevel_page_bbai.bbai-dashboard #adminmenu .toplevel_page_bbai.current > a.menu-top {
    background: #2f74b4;
    color: #ffffff;
}

body.toplevel_page_bbai.bbai-dashboard #adminmenu .toplevel_page_bbai .wp-menu-image::before {
    font-size: 18px;
    line-height: 20px;
}

body.toplevel_page_bbai.bbai-dashboard #adminmenu .toplevel_page_bbai .wp-submenu a {
    padding-top: 6px;
    padding-bottom: 6px;
    padding-left: 14px;
    font-weight: 500;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-card {
    border: 1px solid var(--bbai-ref-border);
    border-radius: var(--bbai-ref-radius);
    background: var(--bbai-ref-card);
    box-shadow: var(--bbai-ref-shadow);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 26px;
    align-items: stretch;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-card {
    display: grid;
    gap: 32px;
    min-height: 528px;
    padding: 46px 36px 36px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-main {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-donut {
    display: grid;
    place-items: center;
    width: 158px;
    height: 158px;
    margin: 0 auto;
    border: 7.9px solid var(--bbai-ref-green);
    border-radius: 999px;
    color: var(--bbai-ref-green-dark);
    font-size: 40px;
    font-weight: 580;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(15, 163, 115, 0.05), 0 4px 10px rgba(15, 163, 115, 0.04);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-card--incomplete .bbai-daily-donut {
    border-color: var(--bbai-ref-amber);
    color: var(--bbai-ref-amber-dark);
    box-shadow: inset 0 0 0 1px rgba(201, 130, 24, 0.045), 0 3px 8px rgba(201, 130, 24, 0.035);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-card--review .bbai-daily-donut {
    border-color: var(--bbai-ref-gold);
    color: var(--bbai-ref-gold-dark);
    box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.045), 0 3px 8px rgba(217, 164, 65, 0.035);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-donut span {
    display: block;
    line-height: 1;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-copy {
    display: grid;
    align-content: center;
    gap: 18px;
    min-width: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-badge,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(236, 253, 245, 0.72);
    color: #047857;
    font-size: 11px;
    font-weight: 620;
    line-height: 1;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-title {
    max-width: 300px;
    margin: 0;
    color: var(--bbai-ref-text);
    font-size: 24px;
    font-weight: 650;
    line-height: 1.16;
    letter-spacing: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-text {
    max-width: 284px;
    margin: 0;
    color: #526174;
    font-size: 15px;
    line-height: 1.55;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-mini-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 22px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-mini-stats span {
    display: grid;
    grid-template-columns: 30px auto;
    column-gap: 8px;
    align-items: center;
    color: var(--bbai-ref-muted);
    font-size: 11px;
    line-height: 1.1;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-mini-stats i {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(236, 253, 245, 0.72);
    color: var(--bbai-ref-green-dark);
    font-style: normal;
    font-size: 16px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-mini-stats strong {
    color: var(--bbai-ref-text);
    font-size: 17px;
    font-weight: 650;
    line-height: 1;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-actions,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-side-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-actions {
    margin-top: 8px;
    margin-bottom: 8px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 620;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn:focus {
    text-decoration: none;
    transform: translateY(-1px);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--primary {
    background: var(--bbai-ref-green);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 163, 115, 0.085);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--primary:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--primary:focus {
    background: var(--bbai-ref-green-dark);
    color: #ffffff;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--premium-gated {
    border-color: rgba(102, 87, 189, 0.18);
    background: #f9f7ff;
    color: var(--bbai-ref-purple);
    box-shadow: 0 2px 6px rgba(102, 87, 189, 0.045);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--premium-gated:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--premium-gated:focus {
    border-color: rgba(102, 87, 189, 0.24);
    background: #f5f2ff;
    color: #5548a8;
    box-shadow: 0 3px 8px rgba(102, 87, 189, 0.06);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--secondary,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--upgrade {
    border-color: rgba(148, 163, 184, 0.13);
    background: #ffffff;
    color: #526174;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.01);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--upgrade {
    border-color: rgba(102, 87, 189, 0.16);
    background: #ffffff;
    color: var(--bbai-ref-purple);
    box-shadow: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--secondary:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--secondary:focus {
    border-color: rgba(148, 163, 184, 0.19);
    background: #f8fafc;
    color: var(--bbai-ref-text);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--upgrade:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn--upgrade:focus {
    border-color: rgba(102, 87, 189, 0.22);
    background: #faf9ff;
    color: #5548a8;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn[disabled],
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn[aria-disabled="true"],
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-btn.is-disabled {
    border-color: rgba(148, 163, 184, 0.18);
    background: #f8fafc;
    color: #64748b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-row {
    display: flex;
    gap: 36px;
    align-items: center;
    padding: 30px 34px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #64748b;
    font-size: 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.16s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-link:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-link:focus-visible {
    color: #334155;
    outline: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-link--disabled {
    pointer-events: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-row strong {
    color: #334155;
    font-weight: 650;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-dot--red { background: var(--bbai-ref-amber); }
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-dot--amber { background: var(--bbai-ref-amber); }
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-dot--gold { background: var(--bbai-ref-gold); }

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-flow-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    align-items: center;
    color: #94a3b8;
    font-size: 14px;
    min-height: 28px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-flow-row .is-active {
    color: var(--bbai-ref-green-dark);
    font-weight: 620;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-flow-row [data-bbai-daily-flow-step="generate"].is-active {
    color: var(--bbai-ref-amber-dark);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-flow-row [data-bbai-daily-flow-step="review"].is-active {
    color: var(--bbai-ref-gold-dark);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-usage-panel {
    display: grid;
    gap: 36px;
    align-content: start;
    min-height: 528px;
    padding: 34px 30px 30px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-eyebrow {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 620;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-usage-head {
    display: grid;
    gap: 18px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-usage-head strong {
    color: var(--bbai-ref-text);
    font-size: 25px;
    font-weight: 650;
    line-height: 1.15;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-usage-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--bbai-ref-muted);
    font-size: 14px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-meter {
    overflow: hidden;
    width: 100%;
    height: var(--bbai-ref-progress-height);
    border-radius: 999px;
    background: var(--bbai-ref-progress-track);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bbai-ref-green);
    transition: width 0.35s ease, background-color 0.2s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-meter--low span {
    background: var(--bbai-ref-quota);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-meter--empty span {
    background: var(--bbai-ref-quota);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-automation-box,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-credit-box {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    background: #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-automation-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 21px 20px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-automation-box h3 {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 0 10px;
    color: var(--bbai-ref-text);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.2;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-automation-box h3 span {
    color: var(--bbai-ref-green-dark);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-automation-box p,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-credit-box a,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-credit-box strong {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-automation-box p {
    max-width: 31ch;
    margin-top: 2px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-switch {
    position: relative;
    width: 52px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #d3dbe6;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-switch span {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-switch:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-switch:focus-visible {
    background: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
    outline: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-credit-box {
    display: grid;
    gap: 16px;
    padding: 19px 18px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-credit-box strong {
    color: var(--bbai-ref-text);
    font-weight: 650;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-credit-box a {
    color: var(--bbai-ref-purple);
    font-weight: 620;
    text-decoration: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip {
    display: grid;
    grid-template-columns: auto minmax(230px, 1fr) minmax(210px, 240px) minmax(150px, 168px) minmax(132px, 148px);
    gap: 30px;
    align-items: center;
    padding: 32px 56px 32px 26px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-strip-check {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--bbai-ref-green);
    color: #ffffff;
    font-size: 20px;
    font-weight: 650;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip--incomplete .bbai-daily-strip-check {
    background: var(--bbai-ref-amber);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip--incomplete .bbai-daily-meter span {
    background: var(--bbai-ref-green);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip--review .bbai-daily-strip-check {
    background: var(--bbai-ref-gold);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip--review .bbai-daily-meter span {
    background: var(--bbai-ref-green);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip strong {
    display: block;
    color: var(--bbai-ref-text);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.18;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 13px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn--primary {
    background: var(--bbai-ref-green);
    box-shadow: 0 2px 6px rgba(15, 163, 115, 0.07);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn--primary:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn--primary:focus {
    background: var(--bbai-ref-green-dark);
    box-shadow: 0 3px 8px rgba(15, 163, 115, 0.08);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn--secondary {
    border-color: rgba(148, 163, 184, 0.13);
    color: #5f6f83;
    font-weight: 620;
    box-shadow: none;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn--secondary:hover,
body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn--secondary:focus {
    border-color: rgba(148, 163, 184, 0.18);
    background: #fbfdff;
    color: #334155;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip p {
    margin: 4px 0 0;
    color: #526174;
    font-size: 14px;
    line-height: 1.35;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-strip-progress {
    display: grid;
    justify-self: stretch;
    gap: 12px;
    max-width: 240px;
    color: #334155;
    font-size: 14px;
    line-height: 1.2;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-strip-progress span {
    font-weight: 620;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-strip-progress .bbai-daily-meter {
    height: var(--bbai-ref-progress-height);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-meter span {
    background: var(--bbai-ref-green);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-meter--segmented {
    display: flex;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-meter--segmented .bbai-daily-meter__segment {
    display: block;
    flex: 0 0 auto;
    height: 100%;
    min-width: 0;
    border-radius: 0;
    transition: width 0.35s ease, background-color 0.2s ease;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-meter--segmented .bbai-daily-meter__segment--optimised {
    background: var(--bbai-ref-green);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-meter--segmented .bbai-daily-meter__segment--review {
    background: var(--bbai-ref-gold);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-meter--segmented .bbai-daily-meter__segment--missing {
    background: var(--bbai-ref-amber);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto auto 1fr auto;
    align-content: stretch;
    gap: 14px;
    min-height: 292px;
    padding: 22px;
    overflow: hidden;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--accessibility {
    background: #fefffe;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--time {
    background: #fefeff;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--seo {
    background: #fff;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight-head > div:last-child {
    display: grid;
    gap: 8px;
    min-width: 0;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(240, 253, 247, 0.72);
    color: var(--bbai-ref-green-dark);
    font-size: 21px;
    font-weight: 700;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--time .bbai-daily-insight-icon {
    background: #f6f8fb;
    color: var(--bbai-ref-slate);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--seo .bbai-daily-insight-icon {
    background: #fbfaff;
    color: var(--bbai-ref-purple);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight .bbai-daily-eyebrow {
    color: var(--bbai-ref-green-dark);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--time .bbai-daily-eyebrow {
    color: var(--bbai-ref-slate);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--seo .bbai-daily-eyebrow {
    color: var(--bbai-ref-purple);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight h3 {
    max-width: 238px;
    margin: 0;
    color: var(--bbai-ref-text);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.16;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight p {
    margin: 0;
    color: #526174;
    font-size: 13px;
    max-width: 29ch;
    line-height: 1.42;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight > strong {
    justify-self: start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(240, 253, 247, 0.72);
    color: #047857;
    font-size: 13px;
    font-weight: 620;
    line-height: 1;
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--time > strong {
    background: #f6f8fb;
    color: var(--bbai-ref-slate);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight--seo > strong {
    background: #fbfaff;
    color: var(--bbai-ref-purple);
}

body.toplevel_page_bbai.bbai-dashboard .bbai-daily-insight .bbai-daily-btn {
    align-self: end;
    justify-self: stretch;
    margin-top: auto;
    min-height: 44px;
}

@media (max-width: 1180px) {
    body.toplevel_page_bbai.bbai-dashboard--connected .wrap.bbai-wrap > .bbai-container.bbai-content-shell.bbai-dashboard-shell {
        padding-right: 28px !important;
        padding-left: 28px !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header {
        flex-wrap: wrap !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header__right {
        flex: 1 1 100% !important;
        justify-content: flex-start !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip {
        grid-template-columns: auto minmax(230px, 1fr) minmax(210px, 240px);
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn {
        justify-self: stretch;
    }
}

@media (max-width: 900px) {
    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-top-grid,
    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip {
        grid-template-columns: 1fr;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-optimised-strip .bbai-daily-btn {
        justify-self: start;
    }

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

@media (max-width: 782px) {
    body.toplevel_page_bbai.bbai-dashboard--connected .wrap.bbai-wrap > .bbai-container.bbai-content-shell.bbai-dashboard-shell {
        padding: 28px 16px 38px !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header {
        padding-right: 0 !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header::before,
    body.toplevel_page_bbai.bbai-dashboard .bbai-dashboard-header::after {
        display: none !important;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-card,
    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-usage-panel {
        min-height: 0;
        padding: 24px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-main,
    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-actions,
    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-side-actions {
        grid-template-columns: 1fr;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-donut {
        width: 148px;
        height: 148px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-hero-title {
        max-width: none;
        font-size: 25px;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-queue-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding-right: 0;
        padding-left: 0;
    }

    body.toplevel_page_bbai.bbai-dashboard .bbai-daily-flow-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

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

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

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

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

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

/* Logged-out conversion optimisation: site health, benefits, and account value. */
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;
    }
}
