/* ============================================================
   FaroB2B — Premium Design System
   ============================================================ */

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

:root {
    /* Colors (Cristal Clear - v3.0) */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.4);
    --bg-hover: rgba(71, 85, 105, 0.05);
    --border-color: rgba(71, 85, 105, 0.1);
    --border-hover: rgba(71, 85, 105, 0.2);
    --text-primary: #1E293B; /* Cinza Profissional Escuro */
    --text-secondary: #000000; /* Preto Sólido Faro (v3.1.2) */
    --text-muted: #64748B;
    --accent-primary: #0EA5E9; /* Azul Corporativo */
    --accent-secondary: #0284C7;
    --accent-tertiary: #0891B2;
    --accent-success: #10B981;
    --accent-warning: #F59E0B;
    --accent-danger: #EF4444;
    --gradient-primary: linear-gradient(135deg, #0EA5E9, #0284C7);
    --gradient-bg: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    
    /* Spacing & Others (Faro Density v3.1.2) */
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
    --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
    --radius-sm: 4px; /* Faro Compact */
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-xs: 11px; --font-sm: 13px; --font-base: 14px; --font-md: 16px; --font-lg: 20px; --font-xl: 28px; --font-2xl: 36px;
    --sidebar-width: 240px; /* Faro Reduced */
    --sidebar-collapsed-width: 64px;
    --right-sidebar-width: 50px;
    --header-height: 50px; /* Faro Fix */
    --btn-height: 28px;
    --nav-tab-height: 32px;
    
    /* Variables de Tema dinâmicas - Faro Glass */
    --sidebar-bg: rgba(255, 255, 255, 0.4);
    --sidebar-text: #000000;
    --sidebar-border: rgba(0, 0, 0, 0.08);
    --panel-bg: rgba(255, 255, 255, 0.4);
    --panel-border: rgba(255, 255, 255, 0.2);
    --logo-bg: var(--gradient-primary);

    /* Faro Login: Branding Neutralization */
    --login-branding-overlay: none;

    /* Manifesto Faro v3.1.2-FINAL */
    --icon-gray: #000000;
    --glass-blur: blur(15px);
    --glass-bg: rgba(255, 255, 255, 0.4); /* Cristal Faro Standard */
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --ambient-stroke: 1px #000000;
    --faro-aura: 0 0 1px #fff;
    --slate-faro: #475569;

    /* Geometria Padronizada Faro v3.9.7 */
    --radius-faro: 2px;
    --height-faro: 42px;

    /* Faro Tabs v5.0 */
    --tab-bg: rgba(255, 255, 255, 0.4);
    --tab-active: rgba(14, 165, 233, 0.1);
    --tab-border: rgba(14, 165, 233, 1);
}

/* --- LIGHT GLASSMORPHISM FARO v3.3.1 --- */
.glass-card {
    background: var(--bg-glass) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.glass-input {
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--radius-faro) !important;
    color: var(--text-primary) !important;
    font-size: var(--font-sm) !important;
    padding: 0 12px !important;
    height: var(--height-faro) !important;
    text-align: left !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: var(--accent-primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.switch-faro.mini {
    transform: scale(0.7);
    margin: 0;
}

.badge-pulsing {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulsing 2s infinite;
}

.badge-pulsing.success { background-color: #10B981; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
.badge-pulsing.warning { background-color: #F59E0B; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
.badge-pulsing.danger { background-color: #EF4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }

@keyframes pulsing {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- Faro v3.2.6: Gestão Soberana --- */
.contact-stale {
    color: #94A3B8 !important;
    text-decoration: line-through !important;
    opacity: 0.7;
    filter: grayscale(1);
    cursor: not-allowed;
}

.vinculo-badge {
    cursor: help;
    transition: transform 0.2s, background-color 0.2s;
}

.vinculo-badge:hover {
    transform: translateY(-1px);
    background-color: var(--accent-secondary) !important;
}

/* --- Microponto & Alerts Faro v3.1.3 --- */
.microponto-alert {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--slate-faro) !important;
    margin-left: 12px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    -webkit-text-stroke: 0 !important; /* Reseta o stroke da page-title */
}

.microponto-alert .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.microponto-alert .dot-warning {
    background: var(--accent-warning);
}

/* Semáforos de Estoque Faro v3.3.17 */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
}
.dot-red { background-color: var(--accent-danger); box-shadow: 0 0 4px var(--accent-danger); }
.dot-yellow { background-color: var(--accent-warning); box-shadow: 0 0 4px var(--accent-warning); }
.dot-green { background-color: var(--accent-success); box-shadow: 0 0 4px var(--accent-success); }
.dot-blue { background-color: var(--accent-primary); box-shadow: 0 0 4px var(--accent-primary); }

/* Ícones de Informação BI v3.3.17 */
.bi-info-icon {
    font-size: 14px;
    color: #94a3b8;
    cursor: help;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bi-info-icon:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* Matriz de Giro (Churn Rate) Faro v3.3.17 */
.matriz-giro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.giro-item {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}
.giro-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateX(5px);
}
.giro-item span.status-dot {
    flex-shrink: 0;
}
.giro-item strong {
    color: #1e293b;
    width: 110px; /* Largura fixa para rótulos */
    flex-shrink: 0;
}
.giro-count-wrapper {
    flex: 1;
    text-align: center;
    font-weight: 800;
    color: var(--accent-primary);
    display: flex;
    justify-content: center;
    gap: 5px;
}
.giro-value-col {
    width: 130px; /* Largura fixa para valores */
    text-align: right;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
}
.giro-detail-icon {
    margin-left: 10px;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s ease;
    width: 20px;
    text-align: center;
}
.giro-detail-icon:hover {
    color: var(--accent-primary);
}

/* Modais Faro v3.3.17 */
.faro-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.faro-modal-content {
    background: #FFFFFF;
    border-radius: 12px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: slideInUp 0.3s ease;
}
.faro-modal-header {
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faro-modal-header h2 { font-size: 1.1rem; font-weight: 800; color: #1e293b; margin: 0; }
.close-modal { font-size: 24px; cursor: pointer; color: #64748b; }
.faro-modal-body { padding: 20px; }
.faro-modal-footer { padding: 15px 20px; border-top: 1px solid #e2e8f0; text-align: right; }

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

/* --- Sniper v3.1.5: Parity & Reactivity --- */
.faro-mandatory-input {
    border: 1.5px solid rgba(14, 165, 233, 0.3) !important;
    transition: all 0.2s ease;
}
.faro-mandatory-input:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.dot-mandatory {
    width: 6px;
    height: 6px;
    background-color: #0ea5e9;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

/* --- Bulk Actions Bar (v1.14 Faro Glass) --- */
.bulk-actions-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 550px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-xl);
    padding: 12px 30px;
    display: none; /* Ativado via JS updateSelection */
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    animation: slideUpSniper 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
}

@keyframes slideUpSniper {
    from { transform: translate(-50%, 120%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.bulk-actions-bar .action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bulk-actions-bar .selection-count {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    background: rgba(14, 165, 233, 0.1);
    padding: 4px 12px;
    border-radius: 30px;
    white-space: nowrap;
}

.bulk-actions-info {
    font-size: 11px;
    color: var(--slate-faro);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Identidade Visual Faro v3.1.2-FINAL — Ajustado p/ Altíssima Clareza */
.page-title {
    font-size: 16px !important; /* Aumentado levemente p/ peso visual */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em; /* Espaçamento equilibrado */
    -webkit-text-stroke: 0 !important;
    color: #1e293b !important; /* Sólido Profundo Faro */
    text-shadow: none !important; 
    line-height: 1.2;
    margin-bottom: 4px;
}

.page-title span, .page-title span.gradient-text {
    -webkit-text-stroke: 0 !important;
    color: #1e293b !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

.fi-faro, .fi-slate {
    color: var(--slate-faro) !important;
}

.icon-gold {
    color: #F59E0B !important; /* Dourado Faro */
}

.badge-faro-soberano {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 900;
    color: #1E40AF; /* Azul Naval Soberano */
    background: rgba(30, 64, 175, 0.08); /* Glass sutil */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(30, 64, 175, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    letter-spacing: 0.5px;
}

.badge-faro-automatico {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 900;
    color: #B45309; /* Laranja Terra */
    background: rgba(245, 158, 11, 0.1); /* Fundo Âmbar translúcido */
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 4px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.05);
}

/* --- Matriz Dual-Core Faro v5.5 --- */
.micro-progress-bar-wrapper {
    background: rgba(0, 0, 0, 0.05);
    height: 4px;
    border-radius: 4px;
    width: 100%;
    margin-top: 4px;
    overflow: hidden;
    position: relative;
}

.micro-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
}

.micro-progress-bar.red { background-color: var(--accent-danger); }
.micro-progress-bar.yellow { background-color: var(--accent-warning); }
.micro-progress-bar.green { background-color: var(--accent-success); }
.micro-progress-bar.gray { background-color: #94a3b8; }

.text-audit-master {
    font-size: 13px;
    font-weight: 800;
    color: #000000;
    line-height: 1.2;
}

.text-objective-support {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-faro);
    line-height: 1.2;
}

/* ============================================================
   Lightbox Soberano Faro (v3.9.7)
   ============================================================ */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-content { transform: scale(1); }

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    transition: transform 0.2s;
}

.lightbox-close:hover { transform: scale(1.2); }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.product-thumbnail:hover {
    transform: scale(1.1);
}

.fi-spin {
    animation: fi-spinner-spin 1s linear infinite;
    display: inline-block;
}

@keyframes fi-spinner-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow: hidden; font-weight: 400; }
::selection { background: rgba(14, 165, 233, 0.1); color: var(--text-primary); }
::-webkit-scrollbar { width: 4px; height: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }

#app-background-stage {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background-image 0.8s ease-in-out;
    background-color: var(--bg-primary); /* Fallback */
}

/* Layout: Faro Shell v3.0.1 */
.app-container { 
    display: flex; 
    height: 100vh; 
    overflow: hidden;
    background: transparent;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    height: 100vh;
}

.main-content { 
    flex: 1;
    overflow-y: auto; 
    padding: var(--space-5); 
    position: relative;
}

/* Sidebar Faro: A Coluna Soberana (v3.1.2) */
.sidebar { 
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg) !important;
    backdrop-filter: var(--glass-blur);
    display: flex; 
    flex-direction: column;
    height: 100vh;
    z-index: 1000; 
    border-right: 1px solid var(--sidebar-border);
    padding: 8px 8px; /* Faro Density */
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px; /* Aumentado para acomodar a logo Faro */
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.brand-anchor {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brand-logo-img {
    max-width: 180px; 
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none;
    transition: transform 0.3s ease;
}

.brand-anchor:hover .brand-logo-img {
    transform: scale(1.05);
}

/* --- Faro Accordion Sidebar v3.3.23 --- */
.nav-group {
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-group-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #1E293B;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    user-select: none;
}

.nav-group-header:hover {
    background: rgba(255, 255, 255, 0.6);
}

.nav-group.active .nav-group-header {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.group-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-group.active .group-arrow {
    transform: rotate(180deg);
}

.nav-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.1);
}

.nav-group.active .nav-group-content {
    max-height: 600px; /* Suficiente para a expansão */
    padding: 8px 0;
}

/* Sub-items Faro */
.nav-sub-item {
    height: 38px;
    padding: 0 16px 0 24px; /* Faro Density: Reduzido de 44px para 24px p/ visibilidade total */
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-sub-item i {
    font-size: 14px;
    color: #94a3b8;
}

.nav-sub-item:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #1E293B;
}

.nav-sub-item:hover i {
    color: #475569;
}

.nav-sub-item.active {
    color: #000000;
    background: rgba(255, 255, 255, 0.7);
}

.nav-sub-item.active::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

/* COMERCIAL ERP (Azul Royal #1E40AF) */
.nav-group.erp-royal .nav-group-header {
    background: rgba(30, 64, 175, 0.08);
    border: 1px solid rgba(30, 64, 175, 0.1);
}

.nav-group.erp-royal .nav-group-header span.nav-text {
    color: #1E40AF;
}

.nav-group.erp-royal .nav-group-header i {
    color: #1E40AF !important;
}

.nav-group.erp-royal.active .nav-group-header {
    background: rgba(30, 64, 175, 0.15);
}

.nav-group.erp-royal .nav-sub-item.active {
    background: rgba(30, 64, 175, 0.1);
    color: #1E40AF;
}

/* Retrocompatibilidade e Ajustes UI */
.fi-faro { color: #475569 !important; }
.dot-alert::after { --dot-color: var(--accent-danger); }

/* Tipografia Faro: Efeito Ambient (v3.1.2) */

#logo-farob2b {
    height: 40px;
    transition: all 0.3s ease;
}

/* Header Faro: O Teto Operacional (v3.1.2) */
.Faro-ceiling {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 900;
    flex-shrink: 0;
    width: 100%; /* O content-wrapper garante que ele nasça à direita da sidebar */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.glass-select-master {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 800; /* Bold Faro */
    color: #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    min-width: 300px;
}

.client-logo-faro img {
    height: 32px;
    opacity: 1;
}

/* Cápsula Cristal — Badge de Créditos Faro v3.1.2 */
.capsula-cristal {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1E293B;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Iconografia Dossiê Faro — Soberania do Cinza Slate */
.dossier-icon {
    color: #475569 !important;
    font-size: 14px;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
}

.badge-faro {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Header User Profile (v3.4.0 Faro) */
.header-user-container {
    position: relative;
    display: flex;
    align-items: center;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.header-user:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.header-user .user-avatar {
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.user-info-header {
    display: flex;
    flex-direction: column;
}

.user-name-header {
    font-size: 12px;
    font-weight: 800;
    color: #1E293B;
    line-height: 1.2;
}

/* User Dropdown Header (v3.4.0) */
.header-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 1100;
    animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-user-dropdown.active {
    display: flex;
}

.header-user-dropdown .dropdown-item {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-user-dropdown .dropdown-item i {
    font-size: 14px;
    color: #64748b;
}

.header-user-dropdown .dropdown-item:hover {
    background: rgba(14, 165, 233, 0.08);
    color: #0ea5e9;
}

.header-user-dropdown .dropdown-item:hover i {
    color: #0ea5e9;
}

.header-user-dropdown .dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 6px 0;
}

.header-user-dropdown .logout:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.header-user-dropdown .logout:hover i {
    color: #ef4444;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Sidebar Scroll (Ordem de Reparo) */
.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* Geomarketing Layout Stability */
#page-geomarketing {
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.sniper-filters {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sniper-filters::-webkit-scrollbar { width: 4px; }
.sniper-filters::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

#container-lote-leads {
    overflow: hidden;
    max-width: 100%;
}

#main-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.sidebar-logo { width: 40px; height: 40px; background: var(--gradient-primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--font-lg); color: white; }
.sidebar-title { font-size: var(--font-md); font-weight: 700; letter-spacing: -0.02em; }
.sidebar-subtitle { font-size: var(--font-xs); color: #1E293B; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
/* Sidebar Menu (Scroll Control) */
.sidebar-menu { 
    flex-grow: 1; 
    overflow-y: auto; 
    scrollbar-width: thin; 
    padding: var(--space-2) var(--space-4);
}

.sidebar-nav { flex: 1; padding: var(--space-2) var(--space-4); overflow-y: auto; }

/* Dynamic Temperature Badges (Phase 13) */
.badge-temperatura {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
}

.badge-quente {
    background-color: #fee2e2; /* Fundo vermelho claro */
    color: #ef4444; /* Texto vermelho forte */
    border-color: #fca5a5;
}

.badge-morno {
    background-color: #fef3c7; /* Fundo amarelo/laranja claro */
    color: #f59e0b; /* Texto laranja forte */
    border-color: #fde68a;
}

.badge-frio {
    background-color: #e0f2fe; /* Fundo azul claro */
    color: #0ea5e9; /* Texto azul forte */
    border-color: #bae6fd;
}
/* ⚠️ DUPLICATAS REMOVIDAS — Regras consolidadas na seção Sidebar Faro (linhas ~130-165) */
/* As regras de .nav-section-label, .nav-item, .nav-item:hover e .nav-item.active
   agora vivem exclusivamente na seção Sidebar Sovereign Legibility acima. */
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-footer { 
    margin-top: auto; 
    padding: 15px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
}
.sidebar-user { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); }
.user-avatar { width: 36px; height: 36px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--font-sm); }
.user-name { font-size: var(--font-sm); font-weight: 600; }
.user-credits { font-size: var(--font-xs); color: var(--accent-primary); }

/* Leaflet Sanitize Z-Index */
.leaflet-container { 
    z-index: 10 !important; 
}

/* Sidebar Light Theme Fixes */

/* User Dropdown */
.user-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 10px;
    right: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
    animation: slideUp 0.2s ease;
}

.user-dropdown.active {
    display: block;
}

.dropdown-item {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}


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

/* Page Sections */
.page-section { 
    display: none; 
    animation: fadeIn 0.3s ease; 
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 25px;
    min-height: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-header { margin-bottom: var(--space-8); }
/* Título de Página: Ajustado Faro v3.4.2 (Foco em Clareza) */
.page-title { 
    font-size: 16px; 
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    -webkit-text-stroke: 0 !important;
    color: #1e293b !important;
    text-transform: uppercase;
}
.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.page-description { font-size: var(--font-sm); color: #1E293B; font-weight: 600; /* Cinza Faro Profundo — era text-muted */ }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-5); margin-bottom: var(--space-6); }
.kpi-card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-6); position: relative; overflow: hidden; transition: all 0.3s; }
.kpi-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.kpi-primary::before { background: var(--gradient-primary); }
.kpi-success::before { background: var(--accent-success); }
.kpi-danger::before { background: var(--accent-danger); }
.kpi-warning::before { background: var(--accent-warning); }
.kpi-info::before { background: var(--accent-tertiary); }
.kpi-icon { font-size: 24px; margin-bottom: var(--space-3); }
.kpi-value { font-size: var(--font-2xl); font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--space-1); }
.kpi-label { font-size: var(--font-sm); color: var(--text-muted); }
.kpi-change { font-size: var(--font-xs); margin-top: var(--space-2); }
.kpi-change.positive { color: var(--accent-success); }
.kpi-change.negative { color: var(--accent-danger); }

/* Cards (Faro v3.1.2 Solid - Transformed into Soberana Glass) */
.card { 
    background: rgba(255, 255, 255, 0.5) !important; 
    backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important; 
    border-radius: var(--radius-sm); 
    padding: var(--space-5); 
    transition: all 0.3s; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
}
.card:hover { border-color: rgba(0,0,0,0.1); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-5); }
.card-title { font-size: 13px; font-weight: 700; color: #000000; letter-spacing: -0.01em; margin-bottom: 4px; }
.card-subtitle { font-size: 11px; color: var(--text-secondary); }
.charts-grid, .charts-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: var(--space-5); margin-bottom: var(--space-6); }
.chart-container { position: relative; min-height: 280px; }

/* Search Bar */
.search-bar { display: flex; gap: var(--space-3); margin-bottom: var(--space-6); align-items: center; flex-wrap: wrap; }
.search-input-wrapper { flex: 1; min-width: 250px; position: relative; }
.search-icon { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); font-size: 18px; }
.form-input { 
    width: 100%; 
    height: var(--height-faro);
    padding: 0 12px; /* Faro Density: Sincronizado para alinhamento frontal próximo à borda */
    background: var(--bg-glass); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-faro); 
    color: var(--text-primary); 
    font-size: var(--font-base); 
    font-family: inherit; 
    text-align: left;
    transition: all 0.2s; 
}
.form-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.form-input::placeholder { color: var(--text-muted); }
.form-select { 
    height: var(--height-faro);
    padding: 0 12px; 
    background: var(--bg-glass); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-faro); 
    color: var(--text-primary); 
    font-size: var(--font-sm); 
    font-family: inherit;
    text-align: left;
}
.form-select:focus { outline: none; border-color: var(--accent-primary); }

/* Buttons (Faro v3.1.2) */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 6px; 
    height: var(--btn-height);
    padding: 0 16px; 
    border-radius: var(--radius-sm); 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase;
    font-family: inherit; 
    border: none; 
    cursor: pointer; 
    transition: all 0.2s; 
    white-space: nowrap; 
}
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: #FFFFFF; color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--text-secondary); background: #F8FAFC; }
.btn-sm { height: 24px; padding: 0 12px; font-size: 10px; }
.btn-icon { width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 4px; }

/* Data Tables */
.data-table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--font-sm); }
.data-table th { text-align: left; padding: var(--space-3) var(--space-4); color: var(--text-muted); font-weight: 600; font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.data-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; }
.data-table tr:hover { background: var(--bg-hover); }

/* Badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: var(--font-xs); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.badge-primary { background: rgba(99,102,241,0.15); color: var(--accent-primary); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--accent-success); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--accent-danger); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--accent-warning); }
.badge-info { background: rgba(6,182,212,0.15); color: var(--accent-tertiary); }
.badge-muted { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* --- STICKY HEADER CATALOGO Faro v3.9.8 --- */
#table-catalogo-omie-flat thead th {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f8fafc;
    box-shadow: 0 1px 0 #e2e8f0;
}
#table-catalogo-omie-flat {
    border-collapse: separate; /* Necessário para sticky border */
    border-spacing: 0;
}

/* Map Container */
.map-container { width: 100%; height: calc(100vh - 220px); border-radius: var(--radius-lg); }
.leaflet-popup-content-wrapper { background: rgba(15,23,42,0.95) !important; backdrop-filter: var(--glass-blur); border: 1px solid var(--border-color) !important; border-radius: var(--radius-md) !important; color: var(--text-primary) !important; box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important; }
.leaflet-popup-tip { background: rgba(15,23,42,0.95) !important; }

/* SNIPER Graph */
.graph-container { width: 100%; min-height: 550px; position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.graph-legend { position: absolute; bottom: var(--space-4); left: var(--space-4); display: flex; gap: var(--space-4); background: rgba(10,14,30,0.9); padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); font-size: var(--font-xs); z-index: 10; }
.legend-item { display: flex; align-items: center; gap: var(--space-2); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Risk Analysis */
.risk-meter { display: flex; gap: var(--space-8); align-items: flex-start; padding: var(--space-4) 0; flex-wrap: wrap; }
.risk-gauge { width: 160px; height: 160px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--accent-primary) 0deg, var(--accent-primary) var(--risk-angle, 0deg), rgba(255,255,255,0.05) var(--risk-angle, 0deg)); flex-shrink: 0; }
.risk-gauge::before { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--bg-secondary); }
.risk-value { position: relative; z-index: 1; font-size: var(--font-2xl); font-weight: 800; }
.risk-gauge.risk-baixo { --gauge-color: var(--accent-success); }
.risk-gauge.risk-médio { --gauge-color: var(--accent-warning); }
.risk-gauge.risk-alto { --gauge-color: var(--accent-danger); }
.risk-gauge.risk-crítico { --gauge-color: #dc2626; }
.risk-factors { flex: 1; min-width: 250px; }
.risk-factor { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) 0; font-size: var(--font-sm); color: var(--text-secondary); }
.risk-factor .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-primary); margin-top: 7px; flex-shrink: 0; }

/* Side Panel (Drawer) Faro Density (v3.0) */

/* ==========================================================================
   IMPRESSÃO SOBERANA FARO (Print CSS Avançado)
   ========================================================================== */
@media print {
    /* Esconde todos os elementos da interface iterativa global */
    body > *:not(#cc-print-container) {
        display: none !important;
    }

    /* Exibe apenas o nosso layout de impressão */
    #cc-print-container {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    /* Regras universais para tabelas na impressão */
    #cc-print-container table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 11px !important;
        margin-bottom: 20px !important;
    }
    
    #cc-print-container th {
        background-color: #f1f5f9 !important;
        color: #1e293b !important;
        font-weight: bold !important;
        padding: 8px !important;
        border-bottom: 2px solid #cbd5e1 !important;
        text-align: left;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #cc-print-container td {
        padding: 8px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
        vertical-align: top;
    }

    /* Remover cores de fundo e estilos supérfluos para poupar tinta */
    .print-no-bg {
        background: transparent !important;
    }

    /* Títulos e espaçamentos */
    .print-section-title {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        border-bottom: 1px solid #cbd5e1 !important;
        padding-bottom: 5px !important;
        margin-top: 20px !important;
        margin-bottom: 10px !important;
        text-transform: uppercase;
    }

    /* Quebras de página forçadas e evitadas */
    .print-page-break {
        page-break-before: always !important;
    }

    .print-avoid-break {
        page-break-inside: avoid !important;
    }
    
    #cc-print-container tr {
        page-break-inside: avoid !important;
    }
}

.side-panel-overlay, .drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); /* Slate 900 semi-transparent */
    backdrop-filter: var(--glass-blur);
    z-index: 2400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-panel-overlay.active, .drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.faro-drawer, .side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px; /* Faro v3.3.6 Standard */
    max-width: 95vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--border-color);
    box-shadow: none; /* Faro v3.3.17: Removido p/ evitar sangramento lateral */
    z-index: 2500;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Faro Fix: Garante que o painel não cresça além da tela */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(110%); /* Garante que some totalmente */
}

.faro-drawer.active, .side-panel.active {
    transform: translateX(0);
    box-shadow: -15px 0 50px rgba(0,0,0,0.15); /* Aplicado apenas quando ativo */
}

/* Caso específico do Perfil Premium (Mais Largo) */
#modal-perfil.faro-drawer {
    width: 850px;
}

.side-panel-overlay.active .side-panel,
.side-panel.active, 
.side-panel.open,
.faro-drawer.active,
.faro-drawer.open {
    transform: translateX(0) !important;
}

/* Modal v3.1.3 (Bottom Drawer Fallback) */
.drawer-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: #FFFFFF;
    border-top: 1px solid var(--sidebar-border);
    border-radius: 16px 16px 0 0;
    z-index: 2500;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

.drawer-bottom.active {
    transform: translateY(0);
}

.side-panel-body, .side-panel-content {
    flex: 1;
    overflow-y: auto !important; /* Faro Fix: Scroll habilitado para alcançar botões de rodapé */
    min-height: 0;
    padding: 0; /* Padding será interno nos panes */
    display: flex;
    flex-direction: column;
}

/* Faro v3.1.2: Ilhas de Dados Sólidas (Legibilidade Industrial) - Soberana */
.dossier-card {
    background: transparent !important;
    border: none !important;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: none !important;
    animation: fadeIn 0.3s ease;
}

.dossier-card-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 15px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--sidebar-border);
    z-index: 1020;
}

.side-panel-close {
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
    padding: 8px;
}

.side-panel-close:hover {
    color: var(--accent-danger);
}


.detail-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,0.03); font-size: 13px; flex-wrap: wrap; gap: 8px; }
.detail-row .label { color: var(--text-muted); font-weight: 500; min-width: 100px; }
.detail-row .value { font-weight: 600; text-align: right; flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 150px; color: var(--text-primary); }

/* Toast */
.toast-container { position: fixed; top: var(--space-5); right: var(--space-5); z-index: 9999; display: flex; flex-direction: column; gap: var(--space-3); }
.toast { padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); font-size: var(--font-sm); font-weight: 500; display: flex; align-items: center; gap: var(--space-3); animation: slideIn 0.3s ease; backdrop-filter: var(--glass-blur); border: 1px solid rgba(255,255,255,0.1); }
.toast-success { background: rgba(16,185,129,0.15); color: var(--accent-success); border-color: rgba(16,185,129,0.3); }
.toast-error { background: rgba(239,68,68,0.15); color: var(--accent-danger); border-color: rgba(239,68,68,0.3); }
.toast-info { background: rgba(99,102,241,0.15); color: var(--accent-primary); border-color: rgba(99,102,241,0.3); }
.toast-warning { background: rgba(245,158,11,0.15); color: var(--accent-warning); border-color: rgba(245,158,11,0.3); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* Intelligent Niche Chips */
.niche-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.niche-chip {
    padding: 6px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.niche-chip:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.niche-chip.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-danger { color: var(--accent-danger); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-6 { margin-top: var(--space-6); }

/* Spinner */
.loading-spinner { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-12); color: var(--text-muted); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty State */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-12); }
.empty-icon { font-size: 48px; opacity: 0.5; }
.empty-text { color: var(--text-muted); font-size: var(--font-sm); text-align: center; }

/* ================================================================
   KANBAN BOARD
   ================================================================ */

.kanban-board { display: flex; gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-4); min-height: 500px; transform: rotateX(180deg); }
.kanban-column { flex: 0 0 300px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); display: flex; flex-direction: column; height: calc(100vh - 180px); transition: all 0.2s; overflow: hidden; transform: rotateX(180deg); }
.kanban-column.drag-over { border-color: var(--accent-primary); background: rgba(56, 189, 248, 0.04); box-shadow: 0 0 0 2px rgba(99,102,241,0.2), 0 0 20px rgba(99,102,241,0.1); }
.kanban-column-header { padding: var(--space-4); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.kanban-column-title { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; font-size: var(--font-sm); }
.kanban-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.kanban-count { background: var(--bg-glass); padding: 2px 10px; border-radius: 100px; font-size: var(--font-xs); font-weight: 700; color: var(--text-muted); }
.kanban-cards-container { flex: 1; overflow-y: auto; padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-3); }

.kanban-card { background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: var(--space-4); cursor: grab; transition: all 0.2s; }
.kanban-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.kanban-card.dragging { opacity: 0.2; border: 2px dashed var(--accent-primary); transform: scale(0.98); cursor: grabbing; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.kanban-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-2); }
.kanban-card-title { font-size: var(--font-sm); font-weight: 700; line-height: 1.3; flex: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.kanban-card-subtitle { font-size: var(--font-xs); color: var(--text-muted); margin-bottom: var(--space-2); }
.kanban-card-calor { font-size: var(--font-xs); font-weight: 700; padding: 2px 8px; border-radius: 100px; white-space: nowrap; flex-shrink: 0; }
.calor-hot { background: rgba(239,68,68,0.15); color: #ef4444; }
.calor-warm { background: rgba(245,158,11,0.15); color: #f59e0b; }
.calor-cold { background: rgba(6,182,212,0.15); color: #06b6d4; }
.kanban-card-meta { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-2); flex-wrap: wrap; }
.kanban-card-cnae { font-size: var(--font-xs); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.kanban-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: var(--font-xs); color: var(--text-muted); padding-top: var(--space-2); border-top: 1px solid rgba(255,255,255,0.03); }
 
 .kanban-card-dates { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--space-2); }
 .card-date-item { font-size: 10px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 4px; }
 
 .kanban-card-actions { display: flex; gap: var(--space-2); margin: var(--space-3) 0; }
 
 .hidden-card { display: none !important; }
 
 /* Atomic Filtering v3.3.17 (Case Insensitive Support) */
 #kanban-board[data-filter-temp="quente"] .kanban-card:not([data-status*="quente" i]),
 #kanban-board[data-filter-temp="morno"] .kanban-card:not([data-status*="morno" i]),
 #kanban-board[data-filter-temp="frio"] .kanban-card:not([data-status*="frio" i]) {
     display: none !important;
 }
 .btn-card-action { flex: 1; padding: 6px; border-radius: var(--radius-sm); font-size: 10px; font-weight: 800; border: 2px solid transparent; cursor: pointer; transition: all 0.2s; text-align: center; }
 
 .btn-won { border-color: rgba(16, 185, 129, 0.4); color: var(--accent-success); background: rgba(16, 185, 129, 0.05); }
 .btn-won:hover { background: rgba(16, 185, 129, 0.15); border-color: var(--accent-success); }
 .btn-won.active { background: var(--accent-success) !important; color: white !important; transform: scale(0.95); }
 
 .btn-lost { border-color: rgba(239, 68, 68, 0.4); color: var(--accent-danger); background: rgba(239, 68, 68, 0.05); }
 .btn-lost:hover { background: rgba(239, 68, 68, 0.15); border-color: var(--accent-danger); }
 .btn-lost.active { background: var(--accent-danger) !important; color: white !important; transform: scale(0.95); }

/* ================================================================
   CARD DETAIL & TIMELINE
   ================================================================ */

.card-detail-section { padding: var(--space-5) 0; border-bottom: 1px solid var(--border-color); }
.card-detail-section:last-child { border-bottom: none; }
.form-textarea { width: 100%; min-height: 80px; padding: var(--space-3) var(--space-4); background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: var(--font-sm); font-family: inherit; resize: vertical; }
.form-textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.termometro-container { text-align: center; }
.termometro-bar { width: 100%; height: 12px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; margin-bottom: var(--space-2); }
.termometro-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease, background 0.3s; }
.termometro-labels { display: flex; justify-content: space-between; align-items: center; font-size: var(--font-xs); color: var(--text-muted); }

.timeline { position: relative; padding-left: var(--space-8); }
.timeline::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--border-color); }
.timeline-item { position: relative; padding-bottom: var(--space-5); }
.timeline-icon { position: absolute; left: calc(-32px + 4px); top: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); border: 2px solid var(--border-color); border-radius: 50%; font-size: 12px; z-index: 1; }
.timeline-content { background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.timeline-tipo { font-weight: 700; font-size: var(--font-sm); color: var(--accent-primary); }
.timeline-desc { font-size: var(--font-sm); color: var(--text-secondary); margin-top: var(--space-1); }
.timeline-date { font-size: var(--font-xs); color: var(--text-muted); margin-top: var(--space-1); }
.timeline-agendamento { font-size: var(--font-xs); color: var(--accent-warning); margin-top: var(--space-1); }

/* ================================================================
   ALERTAS
   ================================================================ */

.alerta-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4); border-bottom: 1px solid var(--border-color); gap: var(--space-4); transition: all 0.2s; }
.alerta-item:hover { background: var(--bg-hover); }
.alerta-item.nao-lido { border-left: 3px solid var(--accent-warning); }
.alerta-item.vencido.nao-lido { border-left: 3px solid var(--accent-danger); }
.alerta-item.lido { opacity: 0.6; }
.alerta-msg { font-size: var(--font-sm); font-weight: 600; margin-bottom: var(--space-1); }
.alerta-meta { font-size: var(--font-xs); color: var(--text-muted); }
.alerta-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }

/* ================================================================
   ADMIN: NAV BADGE, PROGRESS BAR
   ================================================================ */

.nav-badge { background: var(--accent-danger); color: white; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 100px; margin-left: auto; min-width: 20px; text-align: center; line-height: 16px; }
.nav-item { position: relative; }

.progress-bar { width: 100%; height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

/* ================================================================
   SUGGESTIONS (Busca Inteligente — Interactive)
   ================================================================ */

.sugestoes-container { margin-bottom: var(--space-4); }
.sugestao-card {
    background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.18);
    border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-3);
    animation: fadeSlideIn 0.3s ease;
}
.sugestao-header { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.sugestao-icon { font-size: 20px; flex-shrink: 0; }
.sugestao-msg { font-size: var(--font-sm); color: var(--text-primary); line-height: 1.5; }
.sugestao-opcoes { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.sugestao-cnae-tag {
    display: inline-block; padding: 3px 10px; background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.25); border-radius: 20px;
    font-size: 11px; color: var(--accent-primary); font-weight: 500;
}
.sugestao-cidade-tag {
    display: inline-block; padding: 3px 10px; background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.25); border-radius: 20px;
    font-size: 11px; color: var(--accent-success); font-weight: 500;
}
.sugestao-actions { display: flex; gap: var(--space-2); }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ================================================================
   MAP TOOLBAR (Layer Toggles)
   ================================================================ */

.map-toolbar {
    display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0;
    margin-bottom: var(--space-2); flex-wrap: wrap;
}
.map-toolbar-label {
    font-size: var(--font-sm); color: var(--text-muted); font-weight: 600;
    margin-right: var(--space-2);
}

/* ================================================================
   TERRITORY LEGEND OVERLAY
   ================================================================ */

.territorios-legend {
    position: absolute; bottom: 16px; right: 16px; z-index: 500;
    background: rgba(10,14,26,0.92); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4); min-width: 160px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .nav-text, .sidebar-title, .sidebar-subtitle, .nav-section-label, .user-info { display: none; }
    .sidebar-header { justify-content: center; padding: var(--space-4); }
    .main-content { padding-left: calc(60px + var(--space-4)); padding: var(--space-4); }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .kanban-board { flex-direction: column; }
    .kanban-column { flex: 0 0 auto; max-height: none; }
    .map-toolbar { justify-content: center; }
}

/* --- Detail Side Panel --- */

/* Removidos duplicados Faro v3.1.2 */


.side-panel-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-panel-content {
    flex: 1;
    overflow-y: auto !important;
    min-height: 0; /* Faro Fix: Permite que o flex child respeite o pai */
    padding: var(--space-6);
    padding-bottom: 120px; /* Padding extra para o botão fixo */
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.side-panel-section-title {
    color: var(--text-secondary);
    font-size: var(--font-xs);
    text-transform: uppercase;
    margin-bottom: var(--space-3);
    letter-spacing: 0.1em;
    font-weight: 600;
}

.side-panel-block {
    background: var(--bg-card);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.side-panel-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.painel-rodape-fixo {
    position: sticky;
    bottom: -1px; /* Garante que cubra a borda se necessário */
    background-color: var(--bg-card); /* Ajustado para var do sistema */
    padding: 15px 0;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    z-index: 10;
}


/* Removido duplicado Faro v3.1.2 */


.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

/* --- Dual Range Slider (Fase 21) --- */
.dual-range-container {
    position: relative;
    width: 100%;
    height: 6px;
    margin: 15px 0 25px;
}

.dual-range-track {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--border-color);
    border-radius: 5px;
    z-index: 1;
}

.range-input {
    position: absolute;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
    margin: 0;
}

/* Base thumb styling */
.range-input::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #007bff; /* Azul solicitado no comando */
    border: 3px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-input::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #007bff;
    border: 3px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    pointer-events: auto;
    cursor: pointer;
}

#range-capital-min {
    z-index: 3;
}

#range-capital-max {
    z-index: 4;
}

@keyframes dots {
    0%, 20% { color: rgba(0,0,0,0); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    40% { color: var(--text-secondary); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
    60% { text-shadow: .25em 0 0 var(--text-secondary), .5em 0 0 rgba(0,0,0,0); }
    80%, 100% { text-shadow: .25em 0 0 var(--text-secondary), .5em 0 0 var(--text-secondary); }
}

.kanban-card:active {
    cursor: grabbing !important;
}
.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* --- CRM Tabs --- */
.crm-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    margin: 0 0 20px 0;
    padding: 0 20px;
    overflow-x: auto;
    white-space: nowrap;
    box-sizing: border-box;
}

.crm-tab-btn {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

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

.crm-tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.crm-tab-pane {
    display: none;
    padding: 20px;
    padding-bottom: 120px; /* Faro Fix: Garante que o último campo não seja cortado */
    height: calc(100vh - 180px);
    overflow-y: auto;
}

.crm-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.heat-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- Cockpit de Atividades --- */
.action-buttons-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

/* Cockpit de Ações — Botão Faro (Tabela v3.1.2: 28px, 4px, Branco Sólido) */
.btn-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px; /* Tabela Faro: Altura exata */
    padding: 0 8px;
    font-size: 14px;
    background: #FFFFFF; /* Branco Sólido — não cápsula */
    border: 1px solid rgba(0, 0, 0, 0.08); /* Volume 3D sutil */
    border-radius: 4px; /* Tabela Faro: NÃO cápsula */
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #475569; /* Cinza Slate Soberano */
}

/* Cockpit Action Button — Padrão Faro Dossiê */
.cockpit-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px; /* Tabela Faro: Altura exata */
    padding: 0;
    background: #FFFFFF; /* Branco Sólido */
    border: 1px solid rgba(0, 0, 0, 0.08); /* Borda fina — Volume 3D */
    border-radius: 4px; /* Tabela Faro: NÃO cápsula */
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.cockpit-action-btn:hover {
    background: #F8FAFC;
    border-color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.cockpit-action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
/* Micropontos de Status no Cockpit */
.cockpit-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    right: 4px;
}
.dot-call-active { background: #0ea5e9; /* Azul Ligação */ }
.dot-whatsapp-active { background: #10b981; /* Verde WhatsApp */ }

/* Semáforo de Micropontos — Esquecimento Zero (Faro v3.1.2) */
.semaforo-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}
.semaforo-verde { background: #10b981; box-shadow: 0 0 4px rgba(16, 185, 129, 0.5); }
.semaforo-vermelho { background: #ef4444; box-shadow: 0 0 4px rgba(239, 68, 68, 0.5); }
.semaforo-perigo {
    background: transparent;
    border: 1.5px solid #94a3b8; /* Cinza Slate vazado */
}

/* Radar de Calor — Cápsula Cristal (Header) */
.radar-perigo {
    background: rgba(239, 68, 68, 0.08);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-icon[title]::after {
    content: attr(title);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid var(--border-color);
}

.btn-icon:hover[title]::after {
    opacity: 1;
}

/* --- Tarefas Container --- */
.tarefas-container {
    padding: 4px 0;
}

.tarefas-container h4 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.tarefas-container input[type="text"],
.tarefas-container input[type="datetime-local"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: border-color 0.2s;
}

.tarefas-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-agendar {
    width: 100%;
    padding: 12px;
    background: var(--accent-warning);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-agendar:hover {
    opacity: 0.9;
}

.lista-tarefas {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}

.lista-tarefas li {
    padding: 10px 12px;
    border-left: 3px solid var(--accent-warning);
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lista-tarefas li .tarefa-data {
    font-size: 11px;
    color: var(--text-muted);
}

/* Customização do Pop-up do Leaflet para o FaroB2B (Fase 14.8) */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-content {
    margin: 15px;
    line-height: 1.5;
}
/* ================================================================
   MODAL SYSTEM (Fase 16.2)
   ================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: var(--glass-blur);
    z-index: 2000; /* Faro Modal Layer */
    display: none;

    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 600px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.modal-title {
    font-size: var(--font-lg);
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--accent-danger);
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

/* === Team Table Extra === */
.team-table {
    width: 100%;
    border-collapse: collapse;
}

.team-table th {
    text-align: left;
    padding: var(--space-4);
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.team-table td {
    padding: var(--space-4);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.profile-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-admin { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.profile-gestor { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.profile-vendedor { background: rgba(56, 189, 248, 0.1); color: #38bdf8; }

.leaflet-popup-content button {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}
/* ================================================================
   RISCO SNIPER & SCORES
   ================================================================ */
.risk-stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.2s;
}
.risk-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}
.nav-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 20px;
    margin-top: 15px;
}

/* --- Faro v3.9.7: Catálogo de Alta Densidade --- */
.nowrap-values {
    white-space: nowrap;
}

.product-thumbnail {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
    cursor: zoom-in;
}

.product-thumbnail:hover {
    transform: scale(2.5);
    z-index: 100;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-icon-edit {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon-edit:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}
.risk-stat-card label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}
.risk-stat-card strong {
    font-size: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}
.risk-flag-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s;
}
.risk-flag-item:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.02);
}
.badge-verde { background: var(--accent-success); color: white; }
.badge-amarelo { background: var(--accent-warning); color: white; }
.badge-vermelho { background: var(--accent-danger); color: white; }

#risk-gauge-container svg {
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.15));
}
/* Right Sidebar (Shortcut Bar) */
.right-sidebar {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--space-10);
    z-index: 95;
}

.shortcut-item {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: var(--space-4);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}

.shortcut-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.shortcut-divider {
    width: 24px;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-2) 0 var(--space-6);
}

/* Modal Premium (Amanda Batista) */
.modal-premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: var(--glass-blur);
    z-index: 2000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

.modal-premium.active {
    display: flex;
}

.modal-premium-content {
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-premium-sidebar {
    width: 300px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.profile-card-static {
    padding: var(--space-8);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.profile-photo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-5);
    position: relative;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-primary);
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
}

.profile-presence-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
    background: var(--text-muted);
}

.profile-presence-indicator.online { background: var(--accent-success); }
.profile-presence-indicator.offline { background: var(--text-muted); }

#profile-full-name { font-size: var(--font-lg); font-weight: 700; margin-bottom: 4px; }
#profile-role { color: var(--text-secondary); font-size: var(--font-sm); margin-bottom: var(--space-5); }

.profile-action-btns {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}

.profile-tabs-nav {
    flex: 1;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pt-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 16px;
    text-align: left;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-sm);
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pt-item.horizontal {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
}

.pt-item:hover { 
    background: var(--bg-hover); 
    color: var(--text-primary); 
}

.pt-item.active { 
    background: var(--gradient-primary); 
    color: white; 
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.pt-item.horizontal.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

.profile-tabs-horizontal::-webkit-scrollbar {
    display: none;
}

.profile-photo-wrapper.clickable-photo:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-premium-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-premium-header {
    height: 70px;
    padding: 0 var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

#profile-tab-title { font-size: var(--font-lg); font-weight: 600; }

.close-premium {
    background: transparent;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-premium-scroll {
    flex: 1;
    padding: var(--space-8);
    overflow-y: auto;
}

/* Sidebar Collapsed states */
.sidebar-collapsed .nav-text,
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .user-info {
    display: none;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: var(--space-4) 0;
}

.sidebar-collapsed .nav-icon {
    margin-right: 0;
    font-size: 20px;
}

.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: var(--space-4) 0;
}
/* --- CONSULTA CNPJ: FILTROS AVANÇADOS (Fase 23.2) --- */
.advanced-filters-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-top: var(--space-4);
    display: none; /* Controlado via JS */
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.filter-card {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-card-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    cursor: pointer;
}

#contador-nicho {
    margin-top: var(--space-4);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-color);
    color: var(--accent-primary);
}

.btn-filter-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

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

/* --- SPIDER GRAPH & N:N CONTACTS (Fase 23.3) --- */

.btn-icon-mini {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 5px;
    border-radius: 4px;
    transition: transform 0.2s;
    vertical-align: middle;
}

.btn-icon-mini:hover {
    transform: scale(1.2) rotate(10deg);
    background: rgba(56, 189, 248, 0.1);
}

.spider-graph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.contact-node-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-node-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--accent-primary);
    opacity: 0.7;
}

.contact-node-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.15);
    border-color: var(--accent-primary);
}

.contact-meios-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.meio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.meio-item:hover {
    background: white;
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-invalidate {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.2;
    transition: all 0.2s;
    padding: 4px;
}

.btn-invalidate:hover {
    opacity: 1;
    color: #ef4444;
    transform: scale(1.2);
}

.detail-row {
    background: #fcfcfc;
}

#contador-nicho {
    margin-top: 20px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    background: rgba(56, 189, 248, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cristal Clear v3.0 — Glassmorphism & UI Refactor */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-3d-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-md);
}

/* Fallback Mobile — Veto de Performance */
@media (max-width: 768px) {
    .glass-panel, .side-panel, .modal-content {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Side Panel (Drawer) Premium */
/* Side Panel definitions combined above in Faro Density section */


/* Removidos duplicados Faro v3.1.2 Final */


/* Visual Timeline Faro */
.rich-timeline {
    position: relative;
    padding: 20px 0;
    margin-left: 20px;
}

.rich-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    padding-left: 35px;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -12px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-muted);
}

.timeline-user {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
}

.timeline-body {
    font-size: 13.5px;
    color: var(--text-primary); /* Cristal Clear Contrast */
    line-height: 1.5;
}

.timeline-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

/* Kanban Card: OBRIGATÓRIO FUNDO SÓLIDO (v3.0) */
.kanban-card {
    background: #FFFFFF !important; /* Branco Puro Sólido para legibilidade */
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Sombra leve para flutuar */
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kanban-card-title {
    color: #1e293b; /* Cinza Profissional */
    font-weight: 600;
}

.card-badge-glance {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
}

/* Loader Overlay (Faro v1.14) */
.loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: var(--glass-blur);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
}
.loader-overlay.active { display: flex; }
.loader-content { text-align: center; }
.loader-spinner {
    width: 50px; height: 50px;
    border: 3px solid rgba(71, 85, 105, 0.1);
    border-top: 3px solid #1e293b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}
.loader-text { font-size: 13px; font-weight: 600; color: #1e293b; }

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

/* Microponto Animado (Faro Status CRM) */
.microponto-faro {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: pulse-dot 2s infinite ease-in-out;
}
@keyframes pulse-dot { 
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* --- GAVETA FARO TAB STYLES v3.3.9 --- */
.tab-btn-drawer {
    flex: 1;
    padding: 15px 5px;
    border: none;
    background: none;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn-drawer.active {
    color: var(--accent-primary) !important;
    border-bottom: 3px solid var(--accent-primary) !important;
    filter: drop-shadow(0 0 4px rgba(14, 165, 233, 0.4));
    background: rgba(14, 165, 233, 0.02);
}

.tab-btn-drawer:hover:not(.active) {
    background: rgba(0,0,0,0.02);
    color: var(--text-primary);
}
/* --- Faro v3.3.1: Switch & Form Elements --- */
.switch-faro {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch-faro input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-faro {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(71, 85, 105, 0.2);
    transition: .4s;
    border-radius: 34px;
}

.slider-faro:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-faro {
    background-color: var(--accent-primary);
}

input:focus + .slider-faro {
    box-shadow: 0 0 1px var(--accent-primary);
}

input:checked + .slider-faro:before {
    transform: translateX(16px);
}

.switch-faro.mini {
    width: 28px;
    height: 16px;
}

.switch-faro.mini .slider-faro:before {
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
}

.switch-faro.mini input:checked + .slider-faro:before {
    transform: translateX(12px);
}

.conectores-grid .dossier-card {
    transition: all 0.3s ease;
}

.conectores-grid .dossier-card:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow);
}
/* --- Faro v3.3.1: Sales Motor (Solid Design) --- */
.checkout-card-solido {
    background: #FFFFFF !important;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-card-solido:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: var(--accent-primary);
}

.btn-faro-add {
    background: #FFFFFF;
    color: #475569;
    border: 1.5px solid #475569;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.btn-faro-add:hover {
    background: #475569;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
}

.badge-faro-slate {
    background: rgba(71, 85, 105, 0.05);
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.checkout-cart-item-solido {
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s;
}

.checkout-cart-item-solido:hover {
    transform: scale(1.01);
    border-color: var(--accent-primary);
}

/* Faro Wallet Status & Glassmorphism (Sprint 3) */
.status-pill {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-pendente_conciliacao {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-conciliado {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-rejeitado {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.kpi-card[style*="blur(15px)"] {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kpi-card[style*="blur(15px)"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* ================================================================
   AMBIENTE FARO (Theme Gallery)
   ================================================================ */

.theme-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.theme-card {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--accent-primary);
}

.theme-card.active {
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.theme-preview {
    height: 100px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.theme-active-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-primary);
    color: #FFFFFF;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: scaleIn 0.3s ease;
}

.theme-info {
    padding: 12px;
    text-align: center;
}

.theme-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* ================================================================
   GAVETA FARO (SIDE DRAWER) v4
   ================================================================ */
.faro-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faro-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.faro-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: none; /* Faro v3.3.17: Removido p/ evitar sangramento lateral */
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0,0,0,0.05);
    will-change: transform;
}

.faro-drawer.active {
    transform: translateX(0);
    box-shadow: -15px 0 50px rgba(0,0,0,0.15); /* Aplicado apenas quando ativo */
}

.drawer-header {
    padding: 30px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.drawer-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.drawer-footer {
    padding: 25px 30px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    display: flex;
    gap: 12px;
}

.drawer-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0;
    text-transform: uppercase;
}

.drawer-subtitle {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.drawer-image-preview {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: #f1f5f9;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.drawer-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================================================
   Faro Tabs & Internal Navigation v5.0
   ============================================================ */
.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.tab-btn:hover:not(.active) {
    background: rgba(0,0,0,0.02);
    color: #1e293b;
}

.tab-content {
    animation: fadeInTab 0.4s ease;
}

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

.form-group-faro {
    margin-bottom: 20px;
}

.form-group-faro label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Hotfix Faro v3.3.17 - Estabiliza��o de Scroll em Gavetas */
.side-panel-body {
    overflow-y: auto !important;
    display: block !important;
}

.side-panel-body form {
    height: auto !important;
    min-height: min-content;
    padding-bottom: 40px;
}

/* --- FARO SWITCH TOGGLE (PBAC) --- */
.faro-switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.faro-switch input { opacity: 0; width: 0; height: 0; }
.faro-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; }
.faro-slider:before { position: absolute; content: ''; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
.faro-switch input:checked + .faro-slider { background-color: #3b82f6; }
.faro-switch input:checked + .faro-slider:before { transform: translateX(20px); }

/* =============================================================================
   MÓDULO CONTA CORRENTE MULTITENANT SOBERANO (v6.0)
   ============================================================================= */
.cc-row-credito {
    background-color: rgba(16, 185, 129, 0.03) !important;
    transition: background 0.2s;
}
.cc-row-credito:hover {
    background-color: rgba(16, 185, 129, 0.06) !important;
}
.cc-row-credito td {
    color: #065f46 !important;
}

.cc-row-debito {
    background-color: rgba(239, 68, 68, 0.03) !important;
    transition: background 0.2s;
}
.cc-row-debito:hover {
    background-color: rgba(239, 68, 68, 0.06) !important;
}
.cc-row-debito td {
    color: #991b1b !important;
}

.cc-badge-pendente {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}
.cc-badge-pendente:hover {
    transform: scale(1.05);
}

.cc-badge-em-aberto {
    background: #f59e0b !important;
    color: #ffffff !important;
    border: 1px solid #d97706 !important;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.cc-badge-pago {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #059669 !important;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.cc-badge-projeto {
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 800;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.cc-saldo-header {
    background: rgba(30, 64, 175, 0.06);
    border: 1px solid rgba(30, 64, 175, 0.15);
    padding: 8px 20px;
    border-radius: 14px;
    text-align: right;
    box-shadow: inset 0 2px 4px rgba(30,64,175,0.02);
}

.cc-obs-editor {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-style: italic;
    color: #64748b;
    transition: color 0.2s;
}
.cc-obs-editor:hover {
    color: var(--accent-primary);
}
.cc-obs-editor i {
    font-size: 11px;
    opacity: 0.7;
}

.cc-tab-btn {
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.cc-tab-btn.active {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
    background: rgba(255,255,255,0.5);
}
.cc-tab-btn:hover {
    color: var(--accent-primary);
}

