/* ============================================
   Dashboard Comercial — Design System
   Corporate Clean (White + Navy Blue #000033)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
    /* Cores Base — SaaS Clean Premium */
    --bg-primary: #F3F4F6;           /* Fundo global (Off-white/Cinza claro) */
    --bg-secondary: #ffffff;         /* Modais, painéis */
    --bg-tertiary: #f1f5f9;          /* Fundos de seções, thead */
    --bg-card: #ffffff;              /* Cards KPI: Branco puro */
    --bg-card-hover: #f9fafb;
    --bg-nav: #000033;               /* Header/Nav: Azul Marinho fixo */
    --bg-surface: #ffffff;

    /* Bordas */
    --border-subtle: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-accent: #94a3b8;
    --border-color: #e2e8f0;

    /* Texto — Alto contraste sobre branco */
    --text-primary: #000033;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;

    /* Texto sobre fundo escuro (header/nav) */
    --text-on-dark: #ffffff;
    --text-on-dark-secondary: rgba(255, 255, 255, 0.85);
    --text-on-dark-muted: rgba(255, 255, 255, 0.6);

    /* Cores de Destaque — Corporate */
    --accent-primary: #000033;
    --accent-primary-hover: #1e3a5f;
    --accent-secondary: #1e3a5f;

    /* Status — Semânticos (verde/vermelho SOMENTE para variação) */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* Unidades — Tons corporativos diferenciáveis */
    --color-anapolis: #000033;
    --color-bh: #1e3a5f;
    --color-cuiaba: #2563eb;
    --color-londrina: #0ea5e9;

    /* Sombras — Sutis, sem glow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Bordas Arredondadas — Leve */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: #F3F4F6;
    color: #000033;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background — Clean solid (no animated gradient) */
body::before {
    display: none;
}

/* ===== Scrollbar Customizada ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== Layout Storytelling ===== */
.story-section-title {
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.story-section-title:first-child {
    margin-top: 0;
}
.story-section-title h2 {
    font-size: 1.25rem;
    color: #000033;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.story-section-title p {
    font-size: 0.85rem;
    color: #334155;
}
.mt-4 { margin-top: 2rem; }

/* ===== Layout Principal ===== */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.app-header {
    background: #000033;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--bg-primary);
}

.header-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.header-subtitle {
    font-size: 0.7rem;
    color: var(--text-on-dark-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-filter label {
    font-size: 0.75rem;
    color: var(--text-on-dark-secondary);
    font-weight: 500;
}

.header-filter select,
.header-filter input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.8rem;
    outline: none;
    transition: border-color var(--transition-fast);
    cursor: pointer;
}

.header-filter select option {
    color: #000033;
    background: #ffffff;
}

.header-filter select:focus,
.header-filter input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* Override para o Card de Filtro de Período Claro */
.period-filter-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

.period-filter-card label {
    color: #475569 !important;
}

.period-filter-card select,
.period-filter-card input {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    cursor: pointer !important;
}

.period-filter-card select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
}

.period-filter-card select:focus,
.period-filter-card input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25) !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
}

.btn-icon {
    padding: 0.4rem;
    width: 32px;
    height: 32px;
    justify-content: center;
}

/* ===== Navegação por Abas ===== */
.tab-navigation {
    background: #000033;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1.5rem;
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-on-dark-muted);
    padding: 0.85rem 1.25rem;
    font-family: var(--font-family);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-on-dark-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn .tab-icon {
    font-size: 1rem;
}

/* ===== Conteúdo Principal ===== */
.main-content {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: #F3F4F6;
    color: #000033;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* ===== KPI Cards ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: #ffffff;              /* Branco puro */
    border: none;                     /* Sem bordas sólidas */
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);     /* Sombra suave */
    color: #000033;                   /* Texto principal azul marinho */
}

.kpi-card::before {
    display: none;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;                   /* Cinza chumbo para label */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    font-size: 1.2rem;
    color: #000033;                   /* Ícone azul marinho */
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #000033;                   /* Azul marinho bold para valores */
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.kpi-variation {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.kpi-variation.up {
    color: #10B981;                   /* Verde crescimento/meta batida */
}

.kpi-variation.down {
    color: #EF4444;                   /* Vermelho queda/gap */
}

.kpi-subtitle {
    color: #6b7280;                   /* Cinza escuro para texto secundário */
    font-size: 0.7rem;
}

/* ===== Cards / Painéis ===== */
.panel {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title .icon {
    font-size: 1.1rem;
}

/* ===== Grid Layouts ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.25rem;
}

/* ===== Tabelas ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.data-table thead th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border-medium);
    white-space: nowrap;
    font-size: 0.7rem;
    position: sticky;
    top: 0;
    z-index: 1;
    cursor: pointer;
    user-select: none;
}

.data-table thead th:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody td {
    padding: 0.55rem 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.data-table tfoot td {
    background: #f8fafc;
    padding: 0.65rem 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    border-top: 2px solid var(--accent-primary);
}

/* ===== Status Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-neutral {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* ===== Progress Bars ===== */
.progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-wrapper {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill.green { background: var(--color-success); }
.progress-bar-fill.yellow { background: var(--color-warning); }
.progress-bar-fill.red { background: var(--color-danger); }
.progress-bar-fill.blue { background: var(--color-info); }
.progress-bar-fill.purple { background: var(--accent-primary); }

.progress-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 55px;
    text-align: right;
}

/* ===== Ranking / Seller Cards ===== */
.seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.seller-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.seller-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.seller-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.seller-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.seller-unit {
    font-size: 0.68rem;
    color: var(--text-tertiary);
}

.seller-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.seller-stat {
    text-align: center;
    padding: 0.4rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
}

.seller-stat-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.seller-stat-label {
    font-size: 0.62rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== Pipeline Kanban ===== */
.pipeline-kanban {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    min-height: 400px;
}

.pipeline-column {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pipeline-column-title {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pipeline-column-count {
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    color: var(--text-secondary);
}

.pipeline-card {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
}

.pipeline-card:hover {
    border-color: var(--border-medium);
    transform: translateX(2px);
}

.pipeline-card-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pipeline-card-client {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-card-seller {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 51, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ===== Formulários ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.55rem 0.85rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.82rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 51, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* ===== Search / Filter Bar ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.8rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 51, 0.08);
}

.filter-select {
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.5rem;
}

.pagination-info {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.pagination-controls {
    display: flex;
    gap: 0.25rem;
}

.pagination-btn {
    padding: 0.3rem 0.65rem;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.pagination-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

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

/* ===== Loading Spinner ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 51, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 0.85rem;
    color: #ffffff;
}

/* ===== Toasts / Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    color: var(--text-primary);
}

.toast.toast-success { border-left: 3px solid var(--color-success); }
.toast.toast-error { border-left: 3px solid var(--color-danger); }
.toast.toast-warning { border-left: 3px solid var(--color-warning); }
.toast.toast-info { border-left: 3px solid var(--color-info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon { font-size: 1.1rem; }
.toast-message { font-size: 0.8rem; color: var(--text-primary); flex: 1; }

/* ===== Chart Containers ===== */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.chart-container canvas {
    width: 100% !important;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state .empty-description {
    font-size: 0.82rem;
}

/* ===== Connection Status ===== */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

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

.status-dot.connected { background: var(--color-success); }
.status-dot.disconnected { background: var(--color-danger); }
.status-dot.loading { background: var(--color-warning); animation: pulse 1s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== Utility Classes ===== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-info { color: var(--color-info); }
.text-muted { color: var(--text-tertiary); }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.font-bold { font-weight: 700; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Meta Tracking Specific ===== */
.meta-status-atingida { color: var(--color-success); }
.meta-status-em-andamento { color: var(--color-warning); }
.meta-status-critico { color: var(--color-danger); }
.meta-status-sem-meta { color: var(--text-tertiary); }

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
}

.ranking-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1a1a; }
.ranking-2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #1a1a1a; }
.ranking-3 { background: linear-gradient(135deg, #d97706, #b45309); color: white; }
.ranking-other { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2-1 { grid-template-columns: 1fr; }
    .grid-1-2 { grid-template-columns: 1fr; }
    .pipeline-kanban { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    html { font-size: 13px; }
    .app-header { padding: 0.5rem 1rem; flex-wrap: wrap; }
    .header-controls { width: 100%; justify-content: flex-end; }
    .tab-navigation { padding: 0 0.75rem; }
    .main-content { padding: 1rem; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .seller-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
}

/* ===== Multi-select Dropdown ===== */
.multi-select {
    position: relative;
    user-select: none;
    min-width: 140px;
}
.ms-header {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ms-header:hover {
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-clear-filter {
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    transition: all var(--transition-fast);
    line-height: 1;
}
.btn-clear-filter:hover {
    background: rgba(239, 68, 68, 0.45);
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.1);
}
.ms-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
}
.ms-list.active {
    display: flex;
    flex-direction: column;
}
.ms-list label {
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #000033;
    background-color: #ffffff;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.ms-list label:hover {
    background-color: #000033;
    color: #ffffff;
}
.ms-list label:hover input[type="checkbox"] {
    accent-color: #ffffff;
}
.ms-list input[type="checkbox"] {
    cursor: pointer;
    accent-color: #000033;
}
.ms-search-input {
    width: 100%;
    padding: 6px 10px;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: #000033 !important;
    background: #ffffff !important;
    outline: none;
    box-sizing: border-box;
}
.ms-search-input::placeholder {
    color: #94a3b8;
}
.ms-search-input:focus {
    background: #ffffff;
    border-bottom-color: #000033;
}

/* ===== Comparison Switch Toggle ===== */
.comparison-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: 0.75rem;
    color: var(--text-on-dark-secondary);
    white-space: nowrap;
}
.comparison-toggle .toggle-label {
    font-size: 0.7rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    user-select: none;
    color: var(--text-on-dark-muted);
}
.comparison-toggle .toggle-label.active {
    color: #ffffff;
    font-weight: 600;
}
.switch-track {
    position: relative;
    width: 36px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}
.switch-track.active {
    background: #ffffff;
    border-color: #ffffff;
}
.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}
.switch-track.active .switch-thumb {
    transform: translateX(18px);
    background: var(--bg-primary);
}

/* ===== KPI Comparison Badges ===== */
.kpi-comparison {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    min-height: 18px;
}
.kpi-comparison .comp-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.65rem;
}
.kpi-comparison .comp-badge.up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}
.kpi-comparison .comp-badge.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.kpi-comparison .comp-badge.neutral {
    color: var(--text-tertiary);
    background: rgba(100, 116, 139, 0.1);
}
.kpi-comparison .comp-prev {
    color: var(--text-muted);
    font-size: 0.63rem;
}

/* ===== Penetration Card Export Button ===== */
.kpi-card-export {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0;
    transition: all var(--transition-fast);
    color: var(--text-tertiary);
    z-index: 2;
}
.kpi-card:hover .kpi-card-export {
    opacity: 0.6;
}
.kpi-card-export:hover {
    opacity: 1 !important;
    background: #f1f5f9;
    border-color: var(--border-medium);
    color: var(--accent-primary);
}

/* ===== Doughnut / Team Grid — Equal Height ===== */
.grid-equal-height {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: stretch;
}
.grid-equal-height > .panel {
    display: flex;
    flex-direction: column;
    min-height: 380px;
}
.grid-equal-height > .panel > .chart-container,
.grid-equal-height > .panel > .table-container {
    flex: 1;
}

/* ===== Action Plan Section in Overview ===== */
.overview-action-plan {
    margin-top: 15px;
}
.overview-action-plan .pipeline-kanban {
    min-height: 300px;
}
.overview-action-plan .action-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Marketshare Badges */
.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.status-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.status-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* ===== Chart & Table Cards (Marketshare) ===== */
.chart-card,
.table-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.chart-card .chart-header,
.table-card .table-header {
    margin-bottom: 1rem;
}
.chart-card .chart-header h3,
.table-card .table-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 1200px) {
    .charts-grid { grid-template-columns: 1fr; }
}

/* ===== Global Filter Bar (Marketshare) ===== */
.ms-global-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.ms-global-filter-bar label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.ms-global-filter-bar select {
    padding: 0.4rem 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    min-width: 160px;
}
.ms-global-filter-bar select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 51, 0.08);
}

/* =======================================================================
   SALESCOPE DESIGN SYSTEM & STAGING VALIDATION BANNER
   ======================================================================= */

.staging-environment-banner {
    background: #0f172a;
    border-bottom: 2px solid #3b82f6;
    color: #f8fafc;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.seb-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
}

.seb-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    animation: sebPulse 2s infinite;
}

@keyframes sebPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.seb-info {
    color: #cbd5e1;
    font-size: 12px;
}

.seb-info strong {
    color: #38bdf8;
}

.seb-metric {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 4px 12px;
    border-radius: 6px;
    color: #10b981;
    font-weight: 600;
    font-family: monospace;
    font-size: 12px;
}

/* Salescope High-Density Grid Container */
.salescope-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.salescope-header-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.salescope-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.salescope-header-title h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.salescope-header-title span.badge-dim {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.salescope-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.salescope-dimension-nav {
    display: flex;
    background: #e2e8f0;
    padding: 2px;
    border-radius: 6px;
}

.btn-dimension {
    background: transparent;
    border: none;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-dimension:hover {
    color: #0f172a;
}

.btn-dimension.active {
    background: #ffffff;
    color: #000033;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.salescope-search {
    position: relative;
}

.salescope-search input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 10px 5px 28px;
    font-size: 12px;
    width: 220px;
    outline: none;
    color: #0f172a;
}

.salescope-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

.salescope-search .icon-search {
    position: absolute;
    left: 8px;
    top: 6px;
    color: #94a3b8;
    font-size: 12px;
}

/* Salescope High-Density Table */
.salescope-table-wrap {
    max-height: 480px;
    overflow-y: auto;
    position: relative;
}

.salescope-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.salescope-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 2px solid #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 10;
}

.salescope-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.1s ease;
    cursor: pointer;
}

.salescope-table tbody tr:hover {
    background-color: #f0f7ff !important;
}

.salescope-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.salescope-table td {
    padding: 7px 12px;
    color: #1e293b;
    vertical-align: middle;
}

.salescope-primary-title {
    font-weight: 600;
    color: #0f172a;
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.salescope-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.salescope-pill {
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.salescope-pill.curve-A { background: #dcfce7; color: #15803d; }
.salescope-pill.curve-B { background: #fef3c7; color: #b45309; }
.salescope-pill.curve-C { background: #fee2e2; color: #b91c1c; }

.salescope-pill-sub {
    color: #64748b;
    font-size: 10px;
}

/* Proportional Horizontal Bars inside Cell */
.salescope-bar-cell {
    position: relative;
}

.salescope-bar-track {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 8px;
    right: 8px;
    background: transparent;
    pointer-events: none;
}

.salescope-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.22));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.salescope-cell-val {
    position: relative;
    z-index: 2;
    font-variant-numeric: tabular-nums;
}

.salescope-margin-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    display: inline-block;
}

.salescope-margin-badge.good { background: #dcfce7; color: #166534; }
.salescope-margin-badge.regular { background: #fef9c3; color: #854d0e; }
.salescope-margin-badge.low { background: #fee2e2; color: #991b1b; }

/* Sticky Totals Row (Salescope Standard) */
.salescope-totals-row {
    background: #f1f5f9 !important;
    border-top: 2px solid #94a3b8 !important;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.salescope-totals-row td {
    padding: 10px 12px;
}

.salescope-totals-label {
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Click-to-filter visual hint */
.salescope-row:active {
    background-color: #dbeafe !important;
}

/* ===== Salescope "+ Adicionar Filtros" Button & Active Chips Bar ===== */
.btn-salescope-filter {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.btn-salescope-filter:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.salescope-active-chips-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.chips-label {
    font-weight: 700;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chips-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 3px 8px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    animation: fadeInChip 0.15s ease-out;
}

.filter-chip .chip-cat {
    color: #0284c7;
    font-size: 10px;
    text-transform: uppercase;
}

.filter-chip .chip-remove {
    background: none;
    border: none;
    color: #0369a1;
    font-weight: 800;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.filter-chip .chip-remove:hover {
    background: #0284c7;
    color: #ffffff;
}

.btn-clear-all-chips {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.btn-clear-all-chips:hover {
    background: #fee2e2;
}

@keyframes fadeInChip {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== Salescope Filter Modal ===== */
.salescope-filter-modal-content {
    background: #ffffff;
    width: 820px;
    max-width: 95vw;
    height: 560px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: slideUpModal 0.2s ease-out;
}

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

.sfm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #0f172a;
    color: #ffffff;
}

.sfm-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sfm-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.sfm-badge {
    background: #10b981;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.sfm-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sfm-sidebar {
    width: 240px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sfm-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.15s ease;
}

.sfm-cat-btn:hover {
    background: #edf2f7;
    color: #1e293b;
}

.sfm-cat-btn.active {
    background: #ffffff;
    color: #2563eb;
    border-left: 4px solid #2563eb;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.sfm-cat-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.sfm-cat-btn.active .sfm-cat-count {
    background: #2563eb;
    color: #ffffff;
}

.sfm-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
}

.sfm-panel-search {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sfm-panel-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

.sfm-panel-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.sfm-quick-actions {
    display: flex;
    gap: 6px;
}

.sfm-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-content: start;
    gap: 6px;
}

.sfm-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #1e293b;
    transition: background 0.1s ease;
    user-select: none;
}

.sfm-item-label:hover {
    background: #f1f5f9;
}

.sfm-item-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2563eb;
}

.sfm-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sfm-footer-status {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.sfm-footer-buttons {
    display: flex;
    gap: 10px;
}

/* ================================================================
   GESTÃO DE USUÁRIOS E MODAL DE CADASTRO (FUNDO BRANCO ARREDONDADO)
   ================================================================ */
.users-dashboard-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    padding: 24px 28px;
    margin-bottom: 24px;
}

.users-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.users-card-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.users-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.users-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px 0;
    letter-spacing: -0.01em;
}

.users-card-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

.users-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-btn-new {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    border: none;
    transition: all 0.15s ease;
}

.users-btn-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.users-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.users-kpi-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.users-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.users-kpi-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
}

.users-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.users-search-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.users-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
}

.users-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #0f172a;
    outline: none;
    transition: all 0.15s ease;
}

.users-search-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.users-select-filter {
    padding: 9px 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    cursor: pointer;
}

.users-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.users-modern-table {
    width: 100%;
    border-collapse: collapse;
}

.users-modern-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.users-modern-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s ease;
}

.users-modern-table tbody tr:last-child {
    border-bottom: none;
}

.users-modern-table tbody tr:hover {
    background-color: #f8fafc;
}

.users-modern-table td {
    padding: 13px 16px;
    vertical-align: middle;
    color: #1e293b;
    font-size: 0.85rem;
}

.user-row-identity {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-row-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.user-login-code {
    background: #f1f5f9;
    color: #334155;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.78rem;
    border: 1px solid #e2e8f0;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.user-role-badge.role-MASTER {
    background: #f3e8ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.user-role-badge.role-COORDENADOR {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.user-role-badge.role-VENDEDOR {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.user-restriction-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.user-rest-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.user-rest-pill.pill-equipe {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.user-rest-pill.pill-vendedor {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.user-rest-pill.pill-free {
    background: #f8fafc;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    font-weight: 500;
}

.user-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.btn-user-action {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-user-action.btn-simulate {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-user-action.btn-simulate:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.btn-user-action.btn-edit {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-user-action.btn-edit:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-user-action.btn-delete {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.btn-user-action.btn-delete:hover {
    background: #dc2626;
    color: #ffffff;
}

/* ================================================================
   MODAL DE CADASTRO / EDIÇÃO DE USUÁRIO (CARD BRANCO ARREDONDADO)
   ================================================================ */
.modal-content.user-modal-card {
    background: #ffffff !important;
    color: #0f172a;
    width: 95%;
    max-width: 780px;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 8px 20px -6px rgba(15, 23, 42, 0.12) !important;
    overflow: hidden;
    padding: 0;
    animation: userModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes userModalPop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-modal-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 20px 26px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.user-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px 0;
}

.user-modal-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.user-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.user-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.user-modal-body {
    padding: 22px 26px;
    background: #ffffff;
    max-height: 74vh;
    overflow-y: auto;
}

.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 18px;
    margin-bottom: 18px;
}

@media (max-width: 640px) {
    .user-form-grid,
    .user-restrictions-grid {
        grid-template-columns: 1fr !important;
    }
}

.user-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}

.user-form-label .req {
    color: #dc2626;
}

.user-label-hint {
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.72rem;
}

.user-form-input,
.user-form-select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.86rem;
    outline: none;
    transition: all 0.15s ease;
}

.user-form-input:focus,
.user-form-select:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.user-restrictions-banner {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 11px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.79rem;
    color: #0c4a6e;
    margin-bottom: 16px;
    line-height: 1.45;
}

.user-restrictions-banner .banner-icon {
    font-size: 16px;
    line-height: 1;
    margin-top: 1px;
}

.user-restrictions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.user-restriction-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.urb-header {
    padding: 11px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.urb-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
}

.urb-subtitle {
    font-size: 0.7rem;
    color: #64748b;
}

.urb-counter {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.urb-counter.has-selection {
    background: #dbeafe;
    color: #1d4ed8;
}

.urb-toolbar {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
}

.urb-search {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
}

.urb-search:focus {
    background: #ffffff;
    border-color: #2563eb;
}

.urb-btn-link {
    background: transparent;
    border: none;
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.urb-btn-link:hover {
    background: #eff6ff;
}

.urb-check-list {
    max-height: 195px;
    min-height: 150px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #ffffff;
}

.urb-check-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 9px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #1e293b;
    transition: background 0.1s ease;
    user-select: none;
}

.urb-check-item:hover {
    background: #f1f5f9;
}

.urb-check-item.checked {
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

.urb-check-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #2563eb;
    cursor: pointer;
    margin: 0;
}

.user-modal-footer {
    background: #f8fafc;
    padding: 15px 26px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.user-modal-footer-info {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.user-modal-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-btn-cancel {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.user-btn-cancel:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.user-btn-save {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* =====================================================================
   FRENTE 1: TÓPICO 3 — GRID SIMÉTRICO CURVA ABC & FIDELIZAÇÃO / RECOMPRA
   ===================================================================== */
.topic3-symmetric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
    margin-bottom: 1.25rem;
}

@media (max-width: 1100px) {
    .topic3-symmetric-grid {
        grid-template-columns: 1fr;
    }
}

.topic3-table-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.topic3-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    box-sizing: border-box;
}

.topic3-card-header .panel-title {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.2;
}

.topic3-card-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #f1f5f9;
    border: 1px solid var(--border-subtle);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.topic3-table-wrapper {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    flex: 1;
}

.topic3-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.76rem;
}

.topic3-table thead th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.65rem 0.7rem;
    font-size: 0.68rem;
    border-bottom: 1px solid var(--border-medium);
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic3-table tbody td {
    padding: 0.55rem 0.7rem;
    font-size: 0.76rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic3-table tbody tr:hover {
    background: #f1f5f9;
}

.badge-a {
    background: #10b981;
    color: #ffffff;
    font-weight: 700;
    min-width: 24px;
    justify-content: center;
}

.badge-b {
    background: #f59e0b;
    color: #ffffff;
    font-weight: 700;
    min-width: 24px;
    justify-content: center;
}

.badge-c {
    background: #ef4444;
    color: #ffffff;
    font-weight: 700;
    min-width: 24px;
    justify-content: center;
}

/* =====================================================================
   FRENTE 2: ABA GESTÃO DE CARTEIRA & POSITIVAÇÃO (4 BASES UNIFICADAS)
   ===================================================================== */
.portfolio-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border-medium);
    margin-bottom: 16px;
}

.portfolio-view-tab {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.portfolio-view-tab:hover {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.portfolio-view-tab.active {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.portfolio-view-tab .tab-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
}

.portfolio-view-tab:not(.active) .tab-counter {
    background: #e2e8f0;
    color: #334155;
}

.status-fun-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.status-fun-s {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-fun-n {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-fun-ni {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.positivacao-bar-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 115px;
}

.positivacao-bar-track {
    width: 60px;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.positivacao-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.cohort-active-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(37, 99, 235, 0.3);
}



