/* =========================================================================
   BDSA Sales Agent Stylesheet (Pixel-Perfect Light/Dark Theme)
   Matches Sales & Market Performance Dashboard Aesthetic
   ========================================================================= */

#bdsaSalesContainer,
#bdsaMarketingContainer {
    padding: 0.75rem 1.25rem 3rem 1.25rem;
    animation: bdsaFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #F8FAFC;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.light-theme #bdsaSalesContainer,
body.light-theme #bdsaMarketingContainer {
    color: #1E293B;
}

@keyframes bdsaFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Ribbon / Header ────────────────────────────────────────── */
.bdsa-sales-header {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.15rem 1.35rem;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.25rem;
}

body:not(.light-theme) .bdsa-sales-header {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bdsa-sales-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #F1F5F9;
}

body:not(.light-theme) .bdsa-sales-header-top {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.bdsa-sales-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0F172A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
}

body:not(.light-theme) .bdsa-sales-title {
    color: #FFFFFF;
}

.bdsa-sales-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.12);
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Header Action Buttons */
.btn-pill-reset {
    border-radius: 9999px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-pill-reset:hover {
    background: #E2E8F0;
    color: #1E293B;
}

.btn-pill-refresh {
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #0284c7;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-pill-refresh:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #0369a1;
}

.btn-pill-data {
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #0284c7;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Filter Strip */
.bdsa-sales-filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding-top: 0.9rem;
}

.bdsa-filter-group {
    flex: 1 1 145px;
    min-width: 135px;
}

.bdsa-filter-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

body:not(.light-theme) .bdsa-filter-group label {
    color: #94A3B8;
}

.bdsa-filter-group select,
.bdsa-filter-group input {
    width: 100%;
    font-size: 0.82rem;
    padding: 0.38rem 0.65rem;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background-color: #FFFFFF;
    color: #1E293B;
    font-weight: 500;
    transition: border-color 0.2s ease;
}

body:not(.light-theme) .bdsa-filter-group select,
body:not(.light-theme) .bdsa-filter-group input {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.12);
    color: #F8FAFC;
}

.bdsa-filter-group select:focus,
.bdsa-filter-group input:focus {
    border-color: #38BDF8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* ── 5 Vital KPI Cards ───────────────────────────────────────── */
.bdsa-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1200px) {
    .bdsa-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bdsa-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.bdsa-kpi-card {
    position: relative;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 135px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bdsa-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

body:not(.light-theme) .bdsa-kpi-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

.bdsa-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.bdsa-kpi-card.accent-green::before { background: #10B981; }
.bdsa-kpi-card.accent-amber::before { background: #F59E0B; }
.bdsa-kpi-card.accent-purple::before { background: #8B5CF6; }
.bdsa-kpi-card.accent-cyan::before { background: #06B6D4; }
.bdsa-kpi-card.accent-orange::before { background: #EA580C; }

.bdsa-kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bdsa-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B;
    font-weight: 700;
}

body:not(.light-theme) .bdsa-kpi-label {
    color: #94A3B8;
}

.bdsa-kpi-icon-pill {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.bdsa-kpi-icon-pill.green { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.bdsa-kpi-icon-pill.amber { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.bdsa-kpi-icon-pill.purple { background: rgba(139, 92, 246, 0.15); color: #8B5CF6; }
.bdsa-kpi-icon-pill.cyan { background: rgba(6, 182, 212, 0.15); color: #06B6D4; }
.bdsa-kpi-icon-pill.orange { background: rgba(234, 88, 12, 0.15); color: #EA580C; }

.bdsa-kpi-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.15;
    margin: 0.35rem 0 0.25rem 0;
}

body:not(.light-theme) .bdsa-kpi-val {
    color: #FFFFFF;
}

/* Metric Pill Badges */
.bdsa-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
}

.bdsa-pill-badge.green {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.bdsa-pill-badge.red {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

.bdsa-pill-badge.amber {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
}

.bdsa-pill-badge.cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #0284C7;
}

/* ── Standard Card Surface ───────────────────────────────────── */
.bdsa-surface-card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    margin-bottom: 1.25rem;
}

body:not(.light-theme) .bdsa-surface-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

.bdsa-card-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bdsa-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body:not(.light-theme) .bdsa-card-title {
    color: #FFFFFF;
}

.bdsa-card-subtitle {
    font-size: 0.78rem;
    color: #64748B;
    margin-top: 0.15rem;
}

body:not(.light-theme) .bdsa-card-subtitle {
    color: #94A3B8;
}

/* Pill Toggle Buttons (e.g. Sales, Units, Avg Price, Daily, Weekly) */
.bdsa-btn-group-pill {
    display: inline-flex;
    background: #F1F5F9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

body:not(.light-theme) .bdsa-btn-group-pill {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.bdsa-btn-group-pill button {
    border: none;
    background: transparent;
    padding: 0.25rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748B;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bdsa-btn-group-pill button.active {
    background: #0284C7;
    color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

body:not(.light-theme) .bdsa-btn-group-pill button {
    color: #94A3B8;
}

/* ── Matrix & Tables ─────────────────────────────────────────── */
.matrix-cell {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    text-align: center;
    transition: all 0.2s ease;
}

.matrix-cell:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

body:not(.light-theme) .matrix-cell {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

.matrix-val {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.2rem;
}

body:not(.light-theme) .matrix-val {
    color: #FFFFFF;
}

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #FFFFFF;
}

.rank-badge.gold { background: #EA580C; }
.rank-badge.silver { background: #64748B; }
.rank-badge.bronze { background: #D97706; }
.rank-badge.standard {
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid #CBD5E1;
}

/* Hierarchy Tags for L1 / L2 / L3 */
.hierarchy-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.hierarchy-pill.l1-inhaleable {
    background: rgba(56, 189, 248, 0.12);
    color: #0284C7;
    border-color: rgba(56, 189, 248, 0.25);
}

.hierarchy-pill.l1-ingestible {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
    border-color: rgba(245, 158, 11, 0.25);
}

.hierarchy-pill.l2-pill {
    background: rgba(241, 245, 249, 0.9);
    color: #334155;
    border-color: #E2E8F0;
}

body:not(.light-theme) .hierarchy-pill.l2-pill {
    background: rgba(30, 41, 59, 0.8);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Priority Pill Badges */
.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.priority-pill.high {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.priority-pill.med {
    background: #FEF3C7;
    color: #D97706;
    border: 1px solid #FCD34D;
}

.priority-pill.low {
    background: #E0F2FE;
    color: #0284C7;
    border: 1px solid #BAE6FD;
}

body:not(.light-theme) .priority-pill.high {
    background: rgba(220, 38, 38, 0.2);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.4);
}

body:not(.light-theme) .priority-pill.med {
    background: rgba(217, 119, 6, 0.2);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.4);
}

body:not(.light-theme) .priority-pill.low {
    background: rgba(2, 132, 199, 0.2);
    color: #38BDF8;
    border-color: rgba(56, 189, 248, 0.4);
}

/* Mini Progress Bar in Tables */
.mini-progress-bar {
    width: 60px;
    height: 7px;
    background: #E2E8F0;
    border-radius: 9999px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
}

body:not(.light-theme) .mini-progress-bar {
    background: rgba(255, 255, 255, 0.15);
}

.mini-progress-fill {
    display: block !important;
    height: 100% !important;
    min-width: 3px;
    background: linear-gradient(90deg, #00E5FF, #06B6D4) !important;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

body:not(.light-theme) .mini-progress-fill {
    background: linear-gradient(90deg, #00E5FF, #38BDF8) !important;
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

/* Pagination Controls */
.bdsa-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 9px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bdsa-pagination-btn:hover:not(:disabled) {
    background: #F1F5F9;
    border-color: #94A3B8;
    color: #0F172A;
}

.bdsa-pagination-btn.active {
    background: #0284C7 !important;
    border-color: #0284C7 !important;
    color: #FFFFFF !important;
}

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

body:not(.light-theme) .bdsa-pagination-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
    color: #CBD5E1;
}

body:not(.light-theme) .bdsa-pagination-btn:hover:not(:disabled) {
    background: rgba(51, 65, 85, 0.8);
    color: #FFFFFF;
}

body:not(.light-theme) .bdsa-pagination-btn.active {
    background: #00E5FF !important;
    border-color: #00E5FF !important;
    color: #0F172A !important;
}

/* Crisp Executive Bordered Ledger & Comparison Tables */
.bdsa-bordered-table {
    width: 100%;
    border-collapse: collapse !important;
    border: 1px solid #CBD5E1 !important;
    background: #FFFFFF;
}

.bdsa-bordered-table th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1E293B;
    background: #F1F5F9;
    padding: 0.65rem 0.85rem;
    border: 1px solid #CBD5E1 !important;
    border-bottom: 2px solid #94A3B8 !important;
    font-weight: 700;
}

.bdsa-bordered-table td {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    border: 1px solid #CBD5E1 !important;
    vertical-align: middle;
}

.bdsa-bordered-table tr:hover {
    background: #F8FAFC;
}

body:not(.light-theme) .bdsa-bordered-table {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

body:not(.light-theme) .bdsa-bordered-table th {
    background: rgba(30, 41, 59, 0.95);
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35) !important;
}

body:not(.light-theme) .bdsa-bordered-table td {
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #F8FAFC;
}

body:not(.light-theme) .bdsa-bordered-table tr:hover {
    background: rgba(30, 41, 59, 0.6);
}

/* Ledger Table with Clean Border Lines */
.bdsa-ledger-table {
    width: 100%;
    border-collapse: collapse !important;
    border: 1px solid #CBD5E1 !important;
}

.bdsa-ledger-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1E293B;
    background: #F1F5F9;
    padding: 0.7rem 0.85rem;
    border: 1px solid #CBD5E1 !important;
    border-bottom: 2px solid #94A3B8 !important;
    font-weight: 700;
}

body:not(.light-theme) .bdsa-ledger-table th {
    background: rgba(15, 23, 42, 0.95);
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35) !important;
}

.bdsa-ledger-table tbody tr {
    background: #FFFFFF;
    transition: background 0.15s ease;
}

body:not(.light-theme) .bdsa-ledger-table tbody tr {
    background: rgba(30, 41, 59, 0.45);
}

.bdsa-ledger-table tbody tr:hover {
    background: #F8FAFC;
}

body:not(.light-theme) .bdsa-ledger-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.85);
}

.bdsa-ledger-table td {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    border: 1px solid #CBD5E1 !important;
    vertical-align: middle;
}

body:not(.light-theme) .bdsa-ledger-table td {
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

/* Sub-Dashboard Tabs in Brand & SKU Benchmark */
#benchmarkSubTabs button {
    border-radius: 9999px;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border-color: #CBD5E1;
    color: #475569;
    background: transparent;
}

#benchmarkSubTabs button:hover {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border-color: #10B981;
}

#benchmarkSubTabs button.active {
    background: #10B981 !important;
    color: #FFFFFF !important;
    border-color: #10B981 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

body:not(.light-theme) #benchmarkSubTabs button {
    border-color: rgba(255, 255, 255, 0.15);
    color: #94A3B8;
}

body:not(.light-theme) #benchmarkSubTabs button:hover {
    background: rgba(16, 185, 129, 0.18);
    color: #34D399;
}

/* Priority Pills for Dispensary Whitespace Pipeline */
.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.priority-pill.high {
    background: rgba(239, 68, 68, 0.12);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-pill.med {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-pill.low {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

body:not(.light-theme) .priority-pill.high {
    background: rgba(239, 68, 68, 0.22);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.45);
}

body:not(.light-theme) .priority-pill.med {
    background: rgba(245, 158, 11, 0.22);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.45);
}

body:not(.light-theme) .priority-pill.low {
    background: rgba(148, 163, 184, 0.18);
    color: #CBD5E1;
    border-color: rgba(148, 163, 184, 0.35);
}

/* =========================================================================
   Tab 4: AI Promotions & Recommendations Styles
   ========================================================================= */

/* 5-Column Grid Helper */
@media (min-width: 768px) {
    .col-md-2dot4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Opportunity Pill Filters Strip */
.promo-opportunity-strip {
    background: transparent;
}

.opp-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.opp-pill:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
    color: #0F172A;
    transform: translateY(-1px);
}

.opp-pill.active {
    background: #f3b229 !important;
    background: linear-gradient(135deg, #f5c045 0%, #f3b229 100%) !important;
    border: none !important;
    border-radius: 9999px !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(243, 178, 41, 0.4) !important;
}

.opp-pill.active i,
.opp-pill.active i[class*="text-"] {
    color: #FFFFFF !important;
}

.opp-pill .pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 7px;
    min-width: 20px;
    height: 20px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #F1F5F9;
    color: #334155;
    transition: all 0.2s ease;
}

.opp-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
}

body:not(.light-theme) .opp-pill {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
    color: #CBD5E1;
}

body:not(.light-theme) .opp-pill:hover {
    background: rgba(51, 65, 85, 0.85);
    color: #FFFFFF;
}

body:not(.light-theme) .opp-pill.active {
    background: #f3b229 !important;
    background: linear-gradient(135deg, #f5c045 0%, #f3b229 100%) !important;
    border: none !important;
    border-radius: 9999px !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(243, 178, 41, 0.5) !important;
}

body:not(.light-theme) .opp-pill.active i,
body:not(.light-theme) .opp-pill.active i[class*="text-"] {
    color: #FFFFFF !important;
}

body:not(.light-theme) .opp-pill .pill-count {
    background: rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
}

body:not(.light-theme) .opp-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
}

/* Slicer Selects: Keep Standard Overview Style (No custom yellow border) */
.bdsa-surface-card .form-select {
    border: 1px solid #E2E8F0 !important;
    background-color: #FFFFFF !important;
    color: #1E293B !important;
    border-radius: 8px !important;
    font-size: 0.82rem;
    font-weight: 500;
}

.bdsa-surface-card .form-select:focus {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

body:not(.light-theme) .bdsa-surface-card .form-select {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

/* Sidebar Active Color: Warm Amber-Yellow matching sidebar active nav-link (#f3b229) */
.promo-preview-btn-yellow {
    background: #f3b229 !important;
    background: linear-gradient(135deg, #f5c045 0%, #f3b229 100%) !important;
    border: none !important;
    border-radius: 9999px !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 15px rgba(243, 178, 41, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.promo-preview-btn-yellow i {
    color: #FFFFFF !important;
}

.promo-preview-btn-yellow:hover {
    background: linear-gradient(135deg, #f7cb64 0%, #f3b229 100%) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 18px rgba(243, 178, 41, 0.5) !important;
    color: #FFFFFF !important;
}

.promo-preview-btn-yellow:hover i {
    color: #FFFFFF !important;
}

/* AI Promotion Card Anatomy & Rigid Alignment */
.bdsa-promo-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #E2E8F0 !important;
    background: #FFFFFF;
}

.bdsa-promo-card .promo-card-title {
    min-height: 2.85rem;
    max-height: 2.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bdsa-promo-card .promo-tags-wrap {
    min-height: 48px;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.bdsa-promo-card .promo-box.promo-problem {
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid #EF4444 !important;
}

.bdsa-promo-card .promo-box.promo-solution {
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-left: 4px solid #F97316 !important;
}

.bdsa-promo-card .promo-box .promo-box-text,
.bdsa-promo-card .bdsa-sub-item-card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.38;
    margin: 0;
    font-size: 0.79rem;
}

.bdsa-promo-card .promo-schedule {
    min-height: 24px;
    display: flex;
    align-items: center;
}

.bdsa-promo-card .promo-impact-tile {
    height: 56px;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bdsa-promo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    border-color: #CBD5E1 !important;
}

body:not(.light-theme) .bdsa-promo-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body:not(.light-theme) .bdsa-promo-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

/* Opportunity Badges */
.promo-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.promo-badge.slow-selling {
    background: rgba(239, 68, 68, 0.12);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.promo-badge.high-selling {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.promo-badge.dead-stock {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.promo-badge.peak-hour {
    background: rgba(6, 182, 212, 0.12);
    color: #0891B2;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.promo-badge.off-peak-hour {
    background: rgba(99, 102, 241, 0.12);
    color: #4F46E5;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.promo-badge.high-returns {
    background: rgba(244, 63, 94, 0.12);
    color: #E11D48;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.promo-badge.shelf-displacement,
.promo-badge.high-margin {
    background: rgba(20, 184, 166, 0.12);
    color: #0D9488;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.promo-badge.co-purchased {
    background: rgba(59, 130, 246, 0.12);
    color: #2563EB;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.promo-badge.volume-velocity,
.promo-badge.high-selling {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.promo-badge.onboarding {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.promo-badge.clearance,
.promo-badge.slow-selling {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.promo-badge.seasonal-offers {
    background: rgba(168, 85, 247, 0.12);
    color: #9333EA;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Problem & Solution Boxes */
.promo-box {
    border-radius: 6px;
}

.promo-box.promo-problem {
    background: #FEF2F2;
    border-left: 3px solid #EF4444;
}

.promo-box.promo-solution {
    background: #FFF7ED;
    border-left: 4px solid #F97316;
}

body:not(.light-theme) .promo-box.promo-problem {
    background: rgba(239, 68, 68, 0.12);
    border-left-color: #F87171;
}

body:not(.light-theme) .promo-box.promo-solution {
    background: rgba(249, 115, 22, 0.15);
    border-left-color: #FB923C;
}

/* Predicted Business Impact Tiles */
.promo-impact-tile {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    transition: background 0.15s ease;
}

body:not(.light-theme) .promo-impact-tile {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

.promo-impact-tile .impact-val {
    font-size: 0.95rem;
    line-height: 1.1;
    margin-bottom: 2px;
}

/* Accordion Styling */
.promo-details-accordion summary {
    user-select: none;
}

.promo-details-accordion[open] summary span {
    text-decoration: underline;
}

/* ── Overview Charts Responsive Layout ───────────────────────── */
#bdsaOverviewTrajectoryChart,
#bdsaOverviewDonutChart {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
}

#bdsaOverviewTrajectoryChart > div,
#bdsaOverviewDonutChart > div {
    width: 100% !important;
    max-width: 100% !important;
}

#bdsaOverviewTrajectoryChart svg,
#bdsaOverviewDonutChart svg {
    width: 100% !important;
    max-width: 100% !important;
}

#bdsaCategoryLegendPills {
    line-height: 1.35;
    word-break: break-word;
}

#bdsaCategoryLegendPills span {
    white-space: nowrap;
    font-weight: 500;
}

@media (max-width: 768px) {
    #bdsaOverviewTrajectoryChart {
        height: 240px !important;
    }
    #bdsaOverviewDonutChart {
        height: 200px !important;
    }
}

/* ── BDSA Marketing Agent Component Styling ────────────────── */
#chartMktBasketTrend,
#chartMktTripMission,
#chartDemoClusterPie,
#chartDemoScatter,
#chartTrendsFlavors {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
    position: relative;
}

#chartMktBasketTrend svg,
#chartMktTripMission svg,
#chartDemoClusterPie svg,
#chartDemoScatter svg,
#chartTrendsFlavors svg {
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
    #chartMktBasketTrend,
    #chartMktTripMission,
    #chartDemoClusterPie,
    #chartDemoScatter,
    #chartTrendsFlavors {
        height: 250px !important;
    }
}

/* Elasticity Banner */
.bdsa-elasticity-banner {
    border-radius: 14px;
    padding: 1.1rem 1.35rem;
    border-left: 5px solid #10B981 !important;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 1.25rem;
}

body:not(.light-theme) .bdsa-elasticity-banner {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* Marketing Sub-Card & Item Row */
.bdsa-sub-item-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    transition: all 0.2s ease;
}

.bdsa-sub-item-card:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
}

body:not(.light-theme) .bdsa-sub-item-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

body:not(.light-theme) .bdsa-sub-item-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Matrix Table Specifics */
.bdsa-matrix-cell {
    padding: 0.65rem 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-block;
    width: 90%;
    margin: 2px auto;
}

.bdsa-matrix-cell:hover {
    transform: scale(1.06);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.bdsa-matrix-cell.lift-high {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

body:not(.light-theme) .bdsa-matrix-cell.lift-high {
    background: rgba(16, 185, 129, 0.25);
    color: #34D399;
    border-color: rgba(16, 185, 129, 0.45);
}

.bdsa-matrix-cell.lift-med {
    background: rgba(6, 182, 212, 0.15);
    color: #0284C7;
    border: 1px solid rgba(6, 182, 212, 0.35);
}

body:not(.light-theme) .bdsa-matrix-cell.lift-med {
    background: rgba(6, 182, 212, 0.25);
    color: #38BDF8;
    border-color: rgba(6, 182, 212, 0.45);
}

.bdsa-matrix-cell.lift-base {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

body:not(.light-theme) .bdsa-matrix-cell.lift-base {
    background: rgba(100, 116, 139, 0.2);
    color: #94A3B8;
    border-color: rgba(255, 255, 255, 0.1);
}

.bdsa-matrix-cell.active-pair {
    outline: 2px solid #8B5CF6;
    outline-offset: 1px;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}


/* ── BDSA Sync Hub ────────────────────────────────────────── */

/* ── BDSA Sync Hub Universal Clean Global Theme (No Dark) ── */

#view-bdsa-sync-hub {
    color: #1e293b;
}

#view-bdsa-sync-hub .glass-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

#view-bdsa-sync-hub .card-header {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Sync Hub form inputs */
#snowflakeConfigForm .form-control,
#snowflakeConfigForm textarea {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
}

#snowflakeConfigForm .form-control:focus,
#snowflakeConfigForm textarea:focus {
    border-color: #1b5e46 !important;
    box-shadow: 0 0 0 3px rgba(27, 94, 70, 0.12) !important;
    outline: none !important;
}

#snowflakeConfigForm .input-group-text {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    border-radius: 8px 0 0 8px !important;
}

#snowflakeConfigForm .form-label {
    color: #475569 !important;
    font-weight: 600 !important;
}

#snowflakeConfigForm .form-text {
    color: #64748b !important;
}

/* Sync Hub action buttons */
#btnVerifyConnection {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#btnVerifyConnection:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

#btnSaveConfig {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#btnSaveConfig:hover:not(:disabled) {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

#btnTriggerSyncNow {
    background: linear-gradient(135deg, #1b5e46 0%, #237a5b 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(27, 94, 70, 0.25) !important;
    transition: all 0.2s ease !important;
}

#btnTriggerSyncNow:hover:not(:disabled) {
    background: linear-gradient(135deg, #164e3a 0%, #1b5e46 100%) !important;
    box-shadow: 0 4px 12px rgba(27, 94, 70, 0.35) !important;
}

/* Sync Hub table headers (Light, Clean, Elegant, No Dark) */
#dqTable,
#runsTable {
    background: #ffffff !important;
    --bs-table-bg: #ffffff !important;
    --bs-table-hover-bg: #f8fafc !important;
}

#dqTable thead,
#runsTable thead,
#dqTable thead tr,
#runsTable thead tr {
    background: #f8fafc !important;
}

#dqTable thead th,
#runsTable thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
    padding: 0.7rem 0.75rem !important;
}

#dqTable tbody tr,
#runsTable tbody tr {
    background: #ffffff !important;
    transition: background 0.15s ease !important;
}

#dqTable tbody tr:hover,
#runsTable tbody tr:hover {
    background: #f8fafc !important;
}

#dqTable tbody td,
#runsTable tbody td {
    background: transparent !important;
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: none !important;
    padding: 0.7rem 0.75rem !important;
    vertical-align: middle !important;
}

/* Progress bar */
#syncProgressCard .progress {
    background: #e2e8f0 !important;
}

/* Result alert code tag */
#verifyResultAlert code {
    background: rgba(27, 94, 70, 0.08) !important;
    color: #1b5e46 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}

