/* ==========================================================================
   MODULO: ANALISE DE CRESCIMENTO DE FORNECEDORES (EXECUTIVE UI v2)
   ========================================================================== */
.cf-view {
    width: 100%;
    padding: 14px 18px 80px;
    background: #f1f5f9;
    min-height: 100vh;
    box-sizing: border-box;
    color: #0f172a;
}

.cf-container {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cf-mt { margin-top: 14px; }

/* Barra de Comando Compacta */
.cf-command-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.cf-cmd-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cf-cmd-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0284c7;
}

.cf-cmd-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.cf-cmd-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.cf-cmd-search {
    flex: 1 1 280px;
    max-width: 440px;
    min-width: 220px;
}

.cf-cmd-select {
    width: auto;
    min-width: 155px;
    height: 38px;
}

.cf-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cf-search-input-wrap svg {
    position: absolute;
    left: 11px;
    pointer-events: none;
}

.cf-search-input-wrap input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 35px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cf-search-input-wrap input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.cf-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
    max-height: 320px;
    overflow-y: auto;
    z-index: 920;
}

.cf-ac-item {
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cf-ac-item:hover { background: #f0f9ff; }
.cf-ac-name { font-size: 0.82rem; font-weight: 700; color: #0f172a; }
.cf-ac-sub { font-size: 0.72rem; color: #64748b; }
.cf-ac-id {
    font-family: monospace;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
    flex-shrink: 0;
}

.cf-select, .cf-input-date {
    height: 38px;
    padding: 0 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.cf-custom-dates {
    display: flex;
    gap: 6px;
}

.cf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 15px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.cf-btn:disabled { opacity: 0.42; cursor: not-allowed; }

.cf-btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.24);
}

.cf-btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.cf-btn-icon {
    width: 38px;
    padding: 0;
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}

.cf-btn-icon:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Loading & Empty State */
.cf-loading-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 58px 24px;
    text-align: center;
}

.cf-spinner {
    width: 38px;
    height: 38px;
    border: 3.5px solid #e2e8f0;
    border-top-color: #0284c7;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: cfSpin 0.8s linear infinite;
}

@keyframes cfSpin { to { transform: rotate(360deg); } }

.cf-loading-title { font-size: 1rem; font-weight: 800; color: #0f172a; }
.cf-loading-sub { margin-top: 6px; font-size: 0.82rem; color: #64748b; }

.cf-empty-state { display: flex; flex-direction: column; gap: 16px; }

.cf-empty-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 28px;
    text-align: center;
}

.cf-empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-empty-hero h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; }
.cf-empty-hero p { margin: 0 auto; max-width: 660px; font-size: 0.86rem; color: #cbd5e1; }

.cf-top-suppliers-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
}

.cf-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.cf-section-head h3 { margin: 0; font-size: 0.96rem; font-weight: 800; color: #0f172a; }
.cf-section-hint { font-size: 0.76rem; color: #64748b; }

.cf-top-suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.cf-top-sup-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 13px 15px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cf-top-sup-card:hover {
    border-color: #0284c7;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.cf-top-sup-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cf-top-sup-name { font-size: 0.83rem; font-weight: 800; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-top-sup-val { font-size: 0.95rem; font-weight: 800; color: #0369a1; font-variant-numeric: tabular-nums; }
.cf-top-sup-meta { font-size: 0.72rem; color: #64748b; }
.cf-top-loading { color: #64748b; font-size: 0.84rem; padding: 10px 0; }

/* ==========================================================================
   BANNER EXECUTIVO ESCURO (HERO)
   ========================================================================== */
.cf-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #172554 55%, #0f172a 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.cf-hero-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1050px) {
    .cf-hero-top { grid-template-columns: 1fr; }
}

.cf-hero-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cf-hero-pill-id {
    font-family: monospace;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.22);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.38);
}

.cf-hero-pill-muted {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.cf-hero-pill-store {
    font-size: 0.71rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.cf-hero-name {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.cf-hero-meta {
    margin-top: 4px;
    font-size: 0.79rem;
    color: #94a3b8;
}

.cf-hero-dates {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.76rem;
    color: #cbd5e1;
}

.cf-hero-diag-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 13px 16px;
}

.cf-hero-diag-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cf-hero-score {
    font-family: monospace;
    font-size: 0.84rem;
    font-weight: 800;
    color: #e2e8f0;
}

.cf-score-bar-bg {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-bottom: 10px;
}

.cf-score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.cf-hero-motivos {
    margin: 0;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.76rem;
    color: #e2e8f0;
    line-height: 1.4;
}

.cf-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.cf-status-dot { width: 8px; height: 8px; border-radius: 50%; }

/* 4 Pilares no Hero */
.cf-hero-pillars {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1100px) {
    .cf-hero-pillars { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .cf-hero-pillars { grid-template-columns: 1fr; }
}

.cf-pillar {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-top: 3px solid #38bdf8;
    border-radius: 11px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cf-pillar-compras { border-top-color: #38bdf8; }
.cf-pillar-fat { border-top-color: #34d399; }
.cf-pillar-margem { border-top-color: #a78bfa; }
.cf-pillar-perdas { border-top-color: #fbbf24; }

.cf-pillar-lbl {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.cf-pillar-val {
    font-size: 1.42rem;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.cf-pillar-sub {
    font-size: 0.75rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==========================================================================
   NAVEGACAO POR 4 ABAS PRINCIPAIS
   ========================================================================== */
.cf-main-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    margin-top: 14px;
    margin-bottom: 14px;
    overflow-x: auto;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.cf-main-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cf-main-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cf-main-tab.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

.cf-tab-badge {
    font-size: 0.69rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
}

.cf-main-tab.active .cf-tab-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.cf-tab-panel { display: none; }
.cf-tab-panel.active { display: block; }

/* Cards & Grids */
.cf-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.cf-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cf-card-head h3 { margin: 0; font-size: 0.96rem; font-weight: 800; color: #0f172a; }
.cf-card-sub { margin: 3px 0 0; font-size: 0.76rem; color: #64748b; }

.cf-delta-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.70rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.cf-delta-pos { background: #dcfce7; color: #15803d; }
.cf-delta-neg { background: #fee2e2; color: #dc2626; }
.cf-delta-neu { background: #e2e8f0; color: #475569; }

/* Comparativo */
.cf-comp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1100px) { .cf-comp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cf-comp-grid { grid-template-columns: 1fr; } }

.cf-comp-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 13px 15px;
    background: #f8fafc;
}

.cf-comp-title { font-size: 0.80rem; font-weight: 800; color: #0f172a; }
.cf-comp-sub { font-size: 0.70rem; color: #64748b; margin-bottom: 9px; }

.cf-comp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.77rem;
    border-bottom: 1px dashed #e2e8f0;
}

.cf-comp-row:last-child { border-bottom: none; }

/* Charts 12-col Grid */
.cf-charts-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.cf-chart-span-7 { grid-column: span 7; }
.cf-chart-span-5 { grid-column: span 5; }
.cf-chart-span-6 { grid-column: span 6; }

@media (max-width: 1100px) {
    .cf-chart-span-7, .cf-chart-span-5, .cf-chart-span-6 { grid-column: span 12; }
}

.cf-chart-canvas-wrap { position: relative; height: 320px; width: 100%; }

.cf-chart-tabs, .cf-subbox-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: #f1f5f9;
    border-radius: 8px;
}

.cf-subbox-tabs { margin-bottom: 12px; }

.cf-tab-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.14s;
}

.cf-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Alerts */
.cf-alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.cf-alert-item {
    border-radius: 10px;
    padding: 13px 15px;
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
}

.cf-alert-oportunidade { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #16a34a; }
.cf-alert-atencao { background: #fffbeb; border-color: #fde68a; border-left-color: #d97706; }
.cf-alert-risco { background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; }

.cf-alert-tag { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.cf-alert-title { font-size: 0.84rem; font-weight: 800; color: #0f172a; margin-bottom: 3px; }
.cf-alert-desc { font-size: 0.77rem; color: #475569; line-height: 1.4; }

/* Faturamento & Perdas */
.cf-fat-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.cf-fat-kpi {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-fat-kpi-highlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #bbf7d0;
}

.cf-kpi-lbl { font-size: 0.70rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.cf-kpi-val { font-size: 1.24rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.cf-kpi-sub { font-size: 0.75rem; color: #475569; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.cf-fat-split {
    display: grid;
    grid-template-columns: 1fr 1.65fr;
    gap: 16px;
}

@media (max-width: 1100px) { .cf-fat-split { grid-template-columns: 1fr; } }

.cf-fat-subbox {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    background: #ffffff;
}

.cf-fat-subbox h4 { margin: 0 0 10px; font-size: 0.84rem; font-weight: 800; color: #0f172a; }

.cf-store-row {
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.14s ease;
}

.cf-store-row:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.cf-store-row.active-store {
    background: #eff6ff;
    border-color: #0284c7;
}

.cf-store-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.80rem; margin-bottom: 4px; }
.cf-store-bar-bg { height: 7px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.cf-store-bar-fill { height: 100%; background: linear-gradient(90deg, #16a34a 0%, #059669 100%); border-radius: 999px; }
.cf-store-meta { margin-top: 3px; font-size: 0.72rem; color: #64748b; display: flex; justify-content: space-between; }

.cf-loss-types-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.cf-loss-chip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 7px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    margin-bottom: 6px;
    font-size: 0.77rem;
}

.cf-link-btn {
    border: none;
    background: none;
    color: #0284c7;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

/* Status Filter Pills */
.cf-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.cf-st-pill {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.14s;
}

.cf-st-pill:hover { border-color: #0284c7; color: #0369a1; }
.cf-st-pill.active { background: #0f172a; color: #ffffff; border-color: #0f172a; }

/* Tables */
.cf-prod-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cf-prod-search { height: 34px; padding: 0 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.80rem; min-width: 240px; }
.cf-count-pill { font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; color: #334155; }

.cf-table-wrap { width: 100%; overflow-x: auto; }
.cf-table-scroll { max-height: 540px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; }

.cf-table { width: 100%; border-collapse: collapse; font-size: 0.79rem; }

.cf-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.69rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 9px;
    text-align: left;
    border-bottom: 1.5px solid #e2e8f0;
    white-space: nowrap;
    z-index: 2;
}

.cf-table thead th.sortable { cursor: pointer; user-select: none; }
.cf-table thead th.sortable:hover { color: #0284c7; background: #f0f9ff; }
.cf-table thead th.active-sort { color: #0284c7; }
.cf-table thead th.active-sort.desc::after { content: " ▼"; font-size: 0.62rem; }
.cf-table thead th.active-sort.asc::after { content: " ▲"; font-size: 0.62rem; }

.cf-table thead th.num, .cf-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cf-table tbody td { padding: 8px 9px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.cf-table tbody tr:hover { background: #f8fafc; }

.cf-status-tag { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 800; white-space: nowrap; }
.cf-st-CRESCIMENTO { background: #dcfce7; color: #15803d; }
.cf-st-NOVO_NO_MIX { background: #e0f2fe; color: #0369a1; }
.cf-st-ESTAVEL { background: #f1f5f9; color: #475569; }
.cf-st-QUEDA { background: #fee2e2; color: #dc2626; }
.cf-st-DEIXOU_DE_COMPRAR { background: #ffedd5; color: #c2410c; }
.cf-st-SEM_MOVIMENTACAO_RECENTE { background: #f1f5f9; color: #64748b; }

.cf-row-ai-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0369a1;
    font-size: 0.69rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.14s;
}

.cf-row-ai-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* ==========================================================================
   CHAT ANALISTA IA (FAB + DRAWER LATERAL)
   ========================================================================== */
.cf-ai-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 48px;
    padding: 0 18px 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.cf-ai-fab:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(15, 23, 42, 0.36); }
.cf-ai-fab.is-loading { opacity: 0.86; cursor: wait; border-color: rgba(148, 163, 184, 0.45); }
.cf-ai-fab.is-ready { border-color: rgba(52, 211, 153, 0.55); }

.cf-ai-fab-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-ai-mini-spin {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-top-color: #38bdf8;
    border-radius: 50%;
    display: inline-block;
    animation: cfSpin 0.8s linear infinite;
}

.cf-ai-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.cf-ai-backdrop.open { opacity: 1; pointer-events: auto; }

.cf-ai-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 490px;
    max-width: 96vw;
    height: 100vh;
    background: #ffffff;
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 36px rgba(15, 23, 42, 0.22);
    transform: translateX(100%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-ai-drawer.open { transform: translateX(0); }

.cf-ai-head {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cf-ai-head-left { display: flex; align-items: center; gap: 11px; }

.cf-ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cf-ai-clear-btn {
    height: 30px;
    padding: 0 11px;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.cf-ai-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 11px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cf-ai-chip {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.14s;
}

.cf-ai-chip:hover:not(:disabled) { border-color: #0284c7; background: #f0f9ff; color: #0369a1; }

.cf-ai-messages {
    flex: 1;
    min-height: 0;
    padding: 16px 18px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.cf-ai-msg { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: 0.83rem; line-height: 1.55; word-wrap: break-word; }

.cf-ai-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 600;
    white-space: pre-wrap;
}

.cf-ai-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.cf-ai-msg-bot ul { margin: 6px 0; padding-left: 18px; }
.cf-ai-msg-bot li { margin-bottom: 4px; }
.cf-ai-msg-meta { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; color: #0284c7; }

.cf-ai-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.cf-ai-input {
    flex: 1;
    min-height: 42px;
    max-height: 130px;
    padding: 10px 13px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.4;
    color: #0f172a;
    resize: none;
    overflow-y: auto;
    outline: none;
    box-sizing: border-box;
}

.cf-ai-input:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14); }
.cf-ai-send-btn { height: 42px; padding: 0 15px; flex-shrink: 0; }
