/* ================================================================================
   REALTY IQ - DESIGN SYSTEM & CRM ARCHITECTURE
   MAPA DE NAVEGAÇÃO DO ARQUIVO (TABLE OF CONTENTS)
================================================================================

   1. CORE & TOKENS (:root) ........................................
      1.1 Estrutura e Timings
      1.2 Paleta de Marca (Brand Colors)
      1.3 Variáveis Semânticas (Default Light Theme)
      1.4 Estados de Leads (Origens)
      1.5 Medidores de Score & Gauge
      1.6 Tabelas, Propostas e Arquivos

   2. ENGINE DE TEMAS (Overrides Globais) ..........................
      2.1 body.theme-dark (Modo OLED/Dark)
      2.2 body.theme-minimalist (Clean Style)
      2.3 body.theme-high-contrast (Acessibilidade WCAG)
      2.4 body.theme-win31 (Retro 16-bit)

   3. ESTRUTURA BASE ...............................................
      3.1 Resets de Body e Tipografia
      3.2 Ajustes de Avatar e Layout Global

   4. SIDEBAR REVOLUCIONÁRIA .......................................
      4.1 Sidebar Tabs (Ícones Fixos)
      4.2 Sidebar Body (Navegação Dinâmica)
      4.3 Temas de Header por Departamento
      4.4 Links, Submenus e Estados Ativos
      4.5 Módulo de Visitas (Sidebar Interna)
      4.6 Tooltip Premium (Lógica CSS de Balão)

   5. INTERFACE DE LANÇAMENTO (Launchpad) ..........................
      5.1 Painel flutuante e Blur
      5.2 Folders (Pastas de ícones) e Hovers

   6. MENU SUPERIOR (Top Menu) .....................................
      6.1 Avatar Containers e Dropdowns
      6.2 Bordas Dinâmicas de Usuário

   7. VISUALIZAÇÃO DE DADOS & CARDS ................................
      7.1 Glass Cards (Efeito Vidro)
      7.2 Tabelas Modernas (Thead/Tbody variabilizado)
      7.3 Badges de Status e Botões Premium
      7.4 Divisores de Seção e Upload de Fotos

   8. ENGINE DE PALETAS DO KANBAN (20 Temas) .......................
      8.1 Atributos [data-theme] (Default a Modern Dark)
      8.2 Seletor de Cores (Palette Picker UI)

   9. PIPELINE & KANBAN ARCHITECTURE ...............................
      9.1 Containers de Scroll Lateral
      9.2 Kanban Labels, Badges e Favoritos
      9.3 Efeitos de Hover e Ghosting de Arraste

  10. LEADS & COMPONENTES DE FILTRO ................................
      10.1 Inputs Realty IQ e Botões Circulares
      10.2 Modais Customizados
      10.3 Floating Notes (Post-its) e Cronômetros

  11. SMART VIEWS & PAGINAÇÃO ......................................
      11.1 Pílulas de Filtro (Smart View Pills)
      11.2 Kanban de Chamados e Prioridades
      11.3 Paginação Customizada (Círculos)

  12. PORTAL CARDS & MÉTRICAS ......................................
      12.1 Logo Containers e Inline Editing
      12.2 Funil de Vendas (Funnel Segments)
      12.3 Plaquinhas de Conversão (Conversion Bridges)

  13. INTERAÇÃO UI (Context Menu & Dock) ...........................
      13.1 Menu de Contexto (Botão Direito)
      13.2 Taskbar Dock (Taskbar inferior)
      13.3 Flyout Panels e Widgets de Visitas

  14. COMPONENTES AVANÇADOS ........................................
      14.1 Timeline do Pipeline (Histórico)
      14.2 Select2 Premium Overrides (Pílulas múltiplas)
      14.3 Pipeline Steps (Chevrons/Setas)

  15. MULTI-PIPELINE & CHECKLISTS ..................................
      15.1 Custom Tabs (Scroll Horizontal de abas)
      15.2 Sistema de Mapas (Real IQ Maps)
      15.3 Checklists Trello-style (SortableJS + Progress)

  16. GESTÃO DE JANELAS (Floating Windows) .........................
      16.1 Realty Window Engine (Drag & Drop)
      16.2 Estados Minimizado/Maximizado
      16.3 Lógica de Conversão de Modal para Aba

  17. NOTEPAD PRO (Editor Definitivo) ..............................
      17.1 Barra de Abas e Toolbar do Quill
      17.2 Números de Linha e Calha do Editor
      17.3 Customização de Scroll e Busca interna

  18. FIXES DE ACESSIBILIDADE & TEMAS ..............................
      18.1 Overrides para Windows 3.1 (Bevel Effect)
      18.2 Overrides para High Contrast (Neon Borders)

  19. REALTY DRIVE .........................................
      19.1 Sidebar e Estrutura Base
      19.2 Cards, Seleção em Massa (Marquee) e Interações
      19.3 Alternância de Visualização (Grade / Lista)

================================================================================
*/

/* ============================================================
   REALTY IQ - SIDEBAR REVOLUCIONÁRIA (VERSÃO VARIABILIZADA)
   ============================================================ */
:root {
    --sidebar-tabs-width: 40px;
    --sidebar-body-width: 260px;
    --sidebar-total-width: 310px;
    --transition-speed: 0.3s;

    /* Cores dos Temas (Marca) */
    --color-adm: #0984e3;
    --color-imoveis: #00b894;
    --color-rh: #6c5ce7;
    --color-marketing: #e17055;
    --color-suporte: #f1c40f;
    --color-financeiro: #d63031;
    --color-condo: #1abc9c;
    --color-multipp: #b17200;

    /* VARIÁVEIS SEMÂNTICAS (DEFAULT LIGHT) */
    --bg-main: #f8f9fa;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #1e293b;
    --bg-submenu: #fafafa;
    --bg-surface: #ffffff;
    --bg-vistas-wrapper: rgba(0, 0, 0, 0.02);
    --bg-vistas-footer: rgba(0, 0, 0, 0.01);

    --text-primary: #2d3436;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --text-soft: #f8f9fa;
    --text-link: #555;
    --text-link-sub: #666;
    --text-sidebar-icon: rgba(255, 255, 255, 0.4);
    --text-sidebar-pin: rgba(255, 255, 255, 0.6);
    --text-tooltip: #ffffff;

    --accent: #0984e3;
    --card-bg: #ffffff;
    --surface-card: #ffffff;
    --border: #edf2f7;
    --border-strong: #dee2e6;
    --border-vistas: rgba(0, 0, 0, 0.05);
    --border-tooltip: rgba(255, 255, 255, 0.1);

    --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-sidebar: 5px 0 25px rgba(0, 0, 0, 0.05);
    --shadow-tooltip: 0 5px 15px rgba(0, 0, 0, 0.3);
    --primary-gradient: linear-gradient(135deg, #0984e3 0%, #00cec9 100%);
    --tooltip-bg: #1e293b;

    /* KANBAN */
    --kb-main-bg: #f4f6f9;
    --kb-text: #212529;
    --kb-text-muted: #6c757d;
    --kb-card-bg: #ffffff;
    --kb-col-header: #ffffff;
    --kb-col-body: rgba(244, 246, 249, 0.85);
    --kb-filter-bg: #ffffff;
    --kb-border: #dee2e6;
    --kb-accent: #0d6efd;
    --kb-input-bg: #ffffff;

    /* --- ESTADOS DE LEADS (ORIGENS) --- */
    --bg-lead-insta: #f3e5f5;
    --text-lead-insta: #6f42c1;
    --bg-lead-site: #e3f2fd;
    --text-lead-site: #0d6efd;
    --bg-lead-portal: #fff3e0;
    --text-lead-portal: #fd7e14;
    --bg-lead-indica: #e0f2f1;
    --text-lead-indica: #20c997;
    --bg-lead-outros: #f8f9fa;
    --text-lead-outros: #6c757d;

    /* --- TEMPERATURA E TIMERS --- */
    --color-temp-hot: #ff4757;
    --color-temp-warm: #ffa502;
    --color-temp-cold: #2f3542;

    --bg-timer-warn: #fff3cd;
    --text-timer-warn: #856404;
    --bg-timer-danger: #f8d7da;
    --text-timer-danger: #721c24;

    /* --- SCORE & GAUGE --- */
    --bg-gauge-track: #e0e0e0;
    --score-low: #f44336;
    --score-med: #ff9800;
    --score-good: #8bc34a;
    --score-high: #4caf50;

    /* --- PROPOSTAS E ARQUIVOS --- */
    --bg-accepted-row: #e8f5e9;
    --border-accepted-row: #c8e6c9;
    --bg-file-header: #f8fafc;
    --border-list: #e0e5f2;

    /* --- STATUS DE FUNIL & MAPAS (Cores Funcionais Rígidas Globais) --- */
    --status-lead-novo: #3b82f6;
    --status-visita: #8b5cf6;
    --status-proposta: #f59e0b;
    --status-venda: #10b981;
    --status-perdido: #ef4444;

    --map-pin-disponivel: #10b981;
    --map-pin-reservado: #f59e0b;
    --map-pin-vendido: #ef4444;
    --map-pin-locado: #3b82f6;
}

/* ================================================================================
   CATÁLOGO COMPLETO DE TEMAS (Sincronizado com CRM/config/app.php)
   ================================================================================ */

/* --- 1. NÚCLEO DO PRODUTO (Dark & Slate Premium) --- */

/* Emerald Graphite (Padrão Dark RealtyIQ) */
body.theme-emerald-graphite {
    --bg-main: #111827;
    --bg-sidebar: #1f2937;
    --bg-sidebar-tabs: #0f172a;
    --bg-submenu: #111827;
    --bg-surface: #1f2937;
    --bg-vistas-wrapper: rgba(16, 185, 129, 0.05);
    --bg-vistas-footer: rgba(0, 0, 0, 0.2);
    --text-primary: #f3f4f6;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-link: #10b981;
    --text-link-sub: #34d399;
    --text-sidebar-icon: rgba(255, 255, 255, 0.6);
    --text-sidebar-pin: rgba(255, 255, 255, 0.7);
    --text-tooltip: #ffffff;
    --accent: #10b981;
    --card-bg: #1f2937;
    --surface-card: #1f2937;
    --border: #374151;
    --border-strong: #4b5563;
    --border-vistas: rgba(255, 255, 255, 0.08);
    --shadow-sidebar: 5px 0 25px rgba(0, 0, 0, 0.4);
    --tooltip-bg: #10b981;
    --kb-main-bg: #111827;
    --kb-text: #f3f4f6;
    --kb-text-muted: #9ca3af;
    --kb-card-bg: #1f2937;
    --kb-col-header: #1f2937;
    --kb-col-body: rgba(31, 41, 55, 0.85);
    --kb-filter-bg: #1f2937;
    --kb-border: #374151;
    --kb-accent: #10b981;
    --kb-input-bg: #111827;
    --bg-lead-insta: rgba(111, 66, 193, 0.25);
    --text-lead-insta: #c084fc;
    --bg-lead-site: rgba(16, 185, 129, 0.25);
    --text-lead-site: #6ee7b7;
    --bg-lead-portal: rgba(245, 158, 11, 0.25);
    --text-lead-portal: #fcd34d;
    --bg-lead-indica: rgba(59, 130, 246, 0.25);
    --text-lead-indica: #93c5fd;
    --bg-lead-outros: rgba(255, 255, 255, 0.1);
    --text-lead-outros: #9ca3af;
    --bg-gauge-track: #374151;
    --bg-accepted-row: rgba(16, 185, 129, 0.15);
    --border-accepted-row: #10b981;
    --bg-file-header: #111827;
    --border-list: #374151;
}

/* Navy Slate */
body.theme-navy-slate {
    --bg-main: #0b1329;
    --bg-sidebar: #152238;
    --bg-sidebar-tabs: #080d1a;
    --bg-submenu: #0b1329;
    --bg-surface: #152238;
    --bg-vistas-wrapper: rgba(59, 130, 246, 0.05);
    --bg-vistas-footer: rgba(0, 0, 0, 0.2);
    --text-primary: #f8fafc;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-link: #60a5fa;
    --text-link-sub: #93c5fd;
    --text-sidebar-icon: rgba(255, 255, 255, 0.6);
    --text-sidebar-pin: rgba(255, 255, 255, 0.7);
    --text-tooltip: #ffffff;
    --accent: #3b82f6;
    --card-bg: #152238;
    --surface-card: #152238;
    --border: #1e3a5f;
    --border-strong: #2d4f7c;
    --border-vistas: rgba(255, 255, 255, 0.08);
    --shadow-sidebar: 5px 0 25px rgba(0, 0, 0, 0.4);
    --tooltip-bg: #3b82f6;
    --kb-main-bg: #0b1329;
    --kb-text: #f8fafc;
    --kb-text-muted: #94a3b8;
    --kb-card-bg: #152238;
    --kb-col-header: #152238;
    --kb-col-body: rgba(21, 34, 56, 0.85);
    --kb-filter-bg: #152238;
    --kb-border: #1e3a5f;
    --kb-accent: #3b82f6;
    --kb-input-bg: #0b1329;
    --bg-lead-insta: rgba(111, 66, 193, 0.25);
    --text-lead-insta: #c084fc;
    --bg-lead-site: rgba(59, 130, 246, 0.25);
    --text-lead-site: #93c5fd;
    --bg-lead-portal: rgba(245, 158, 11, 0.25);
    --text-lead-portal: #fcd34d;
    --bg-lead-indica: rgba(16, 185, 129, 0.25);
    --text-lead-indica: #6ee7b7;
    --bg-lead-outros: rgba(255, 255, 255, 0.1);
    --text-lead-outros: #94a3b8;
    --bg-gauge-track: #1e3a5f;
    --bg-accepted-row: rgba(59, 130, 246, 0.15);
    --border-accepted-row: #3b82f6;
    --bg-file-header: #0b1329;
    --border-list: #1e3a5f;
}

/* Architect Black (Luxo & Titânio) */
body.theme-architect-black {
    --bg-main: #0a0a0a;
    --bg-sidebar: #171717;
    --bg-sidebar-tabs: #000000;
    --bg-submenu: #0a0a0a;
    --bg-surface: #171717;
    --bg-vistas-wrapper: rgba(217, 119, 6, 0.05);
    --bg-vistas-footer: rgba(0, 0, 0, 0.3);
    --text-primary: #fafafa;
    --text-main: #fafafa;
    --text-muted: #a3a3a3;
    --text-link: #d97706;
    --text-link-sub: #fbbf24;
    --text-sidebar-icon: rgba(255, 255, 255, 0.6);
    --text-sidebar-pin: rgba(255, 255, 255, 0.7);
    --text-tooltip: #000000;
    --accent: #d97706;
    --card-bg: #171717;
    --surface-card: #171717;
    --border: #262626;
    --border-strong: #404040;
    --border-vistas: rgba(255, 255, 255, 0.08);
    --shadow-sidebar: 5px 0 25px rgba(0, 0, 0, 0.6);
    --tooltip-bg: #fbbf24;
    --kb-main-bg: #0a0a0a;
    --kb-text: #fafafa;
    --kb-text-muted: #a3a3a3;
    --kb-card-bg: #171717;
    --kb-col-header: #171717;
    --kb-col-body: rgba(23, 23, 23, 0.85);
    --kb-filter-bg: #171717;
    --kb-border: #262626;
    --kb-accent: #d97706;
    --kb-input-bg: #0a0a0a;
    --bg-lead-insta: rgba(111, 66, 193, 0.25);
    --text-lead-insta: #d8b4fe;
    --bg-lead-site: rgba(217, 119, 6, 0.25);
    --text-lead-site: #fde68a;
    --bg-lead-portal: rgba(239, 68, 68, 0.25);
    --text-lead-portal: #fca5a5;
    --bg-lead-indica: rgba(16, 185, 129, 0.25);
    --text-lead-indica: #6ee7b7;
    --bg-lead-outros: rgba(255, 255, 255, 0.1);
    --text-lead-outros: #a3a3a3;
    --bg-gauge-track: #262626;
    --bg-accepted-row: rgba(217, 119, 6, 0.15);
    --border-accepted-row: #d97706;
    --bg-file-header: #0a0a0a;
    --border-list: #262626;
}

/* --- 2. CORPORATIVOS TRADICIONAIS (Light Elegante) --- */

/* Corporate Blue */
body.theme-corporate-blue {
    --bg-main: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #1e3a8a;
    --bg-submenu: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-link: #2563eb;
    --text-link-sub: #1d4ed8;
    --accent: #2563eb;
    --card-bg: #ffffff;
    --surface-card: #ffffff;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --tooltip-bg: #1e3a8a;
    --text-tooltip: #ffffff;
    --kb-main-bg: #f1f5f9;
    --kb-text: #1e293b;
    --kb-text-muted: #64748b;
    --kb-card-bg: #ffffff;
    --kb-col-header: #ffffff;
    --kb-col-body: rgba(241, 245, 249, 0.85);
    --kb-filter-bg: #ffffff;
    --kb-border: #e2e8f0;
    --kb-accent: #2563eb;
    --kb-input-bg: #ffffff;
}

/* Slate Charcoal */
body.theme-slate-charcoal {
    --bg-main: #e2e8f0;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #334155;
    --bg-submenu: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-link: #334155;
    --text-link-sub: #1e293b;
    --accent: #475569;
    --card-bg: #ffffff;
    --surface-card: #ffffff;
    --border: #cbd5e1;
    --border-strong: #94a3b8;
    --tooltip-bg: #334155;
    --text-tooltip: #ffffff;
    --kb-main-bg: #e2e8f0;
    --kb-text: #0f172a;
    --kb-text-muted: #475569;
    --kb-card-bg: #ffffff;
    --kb-col-header: #ffffff;
    --kb-col-body: rgba(226, 232, 240, 0.85);
    --kb-filter-bg: #ffffff;
    --kb-border: #cbd5e1;
    --kb-accent: #475569;
    --kb-input-bg: #ffffff;
}

/* Mint Emerald */
body.theme-mint-emerald {
    --bg-main: #f0fdf4;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #064e3b;
    --bg-submenu: #f7fee7;
    --bg-surface: #ffffff;
    --text-primary: #064e3b;
    --text-main: #064e3b;
    --text-muted: #059669;
    --text-link: #059669;
    --text-link-sub: #047857;
    --accent: #059669;
    --card-bg: #ffffff;
    --surface-card: #ffffff;
    --border: #dcfce7;
    --border-strong: #bbf7d0;
    --tooltip-bg: #064e3b;
    --text-tooltip: #ffffff;
    --kb-main-bg: #f0fdf4;
    --kb-text: #064e3b;
    --kb-text-muted: #059669;
    --kb-card-bg: #ffffff;
    --kb-col-header: #ffffff;
    --kb-col-body: rgba(240, 253, 244, 0.85);
    --kb-filter-bg: #ffffff;
    --kb-border: #dcfce7;
    --kb-accent: #059669;
    --kb-input-bg: #ffffff;
}

/* --- 3. MODERNOS & CRIATIVOS --- */

/* Amethyst Indigo */
body.theme-amethyst-indigo {
    --bg-main: #0f0c29;
    --bg-sidebar: #1d1945;
    --bg-sidebar-tabs: #0b0821;
    --bg-submenu: #0f0c29;
    --bg-surface: #1d1945;
    --bg-vistas-wrapper: rgba(99, 102, 241, 0.05);
    --text-primary: #ede9fe;
    --text-main: #ede9fe;
    --text-muted: #a78bfa;
    --text-link: #818cf8;
    --text-link-sub: #a5b4fc;
    --accent: #6366f1;
    --card-bg: #1d1945;
    --surface-card: #1d1945;
    --border: #312e81;
    --border-strong: #4338ca;
    --tooltip-bg: #6366f1;
    --text-tooltip: #ffffff;
    --kb-main-bg: #0f0c29;
    --kb-text: #ede9fe;
    --kb-text-muted: #a78bfa;
    --kb-card-bg: #1d1945;
    --kb-col-header: #1d1945;
    --kb-col-body: rgba(29, 25, 69, 0.85);
    --kb-filter-bg: #1d1945;
    --kb-border: #312e81;
    --kb-accent: #6366f1;
    --kb-input-bg: #0f0c29;
}

/* Amber Rust */
body.theme-amber-rust {
    --bg-main: #1c130c;
    --bg-sidebar: #2b1d14;
    --bg-sidebar-tabs: #120c08;
    --bg-submenu: #1c130c;
    --bg-surface: #2b1d14;
    --bg-vistas-wrapper: rgba(217, 119, 6, 0.05);
    --text-primary: #fef3c7;
    --text-main: #fef3c7;
    --text-muted: #fcd34d;
    --text-link: #f59e0b;
    --text-link-sub: #fbbf24;
    --accent: #d97706;
    --card-bg: #2b1d14;
    --surface-card: #2b1d14;
    --border: #451a03;
    --border-strong: #78350f;
    --tooltip-bg: #d97706;
    --text-tooltip: #ffffff;
    --kb-main-bg: #1c130c;
    --kb-text: #fef3c7;
    --kb-text-muted: #fcd34d;
    --kb-card-bg: #2b1d14;
    --kb-col-header: #2b1d14;
    --kb-col-body: rgba(43, 29, 20, 0.85);
    --kb-filter-bg: #2b1d14;
    --kb-border: #451a03;
    --kb-accent: #d97706;
    --kb-input-bg: #1c130c;
}

/* Ocean Breeze */
body.theme-ocean-breeze {
    --bg-main: #ecfeff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #083344;
    --bg-submenu: #f0fdfa;
    --bg-surface: #ffffff;
    --text-primary: #083344;
    --text-main: #083344;
    --text-muted: #0891b2;
    --text-link: #06b6d4;
    --text-link-sub: #0284c7;
    --accent: #0891b2;
    --card-bg: #ffffff;
    --surface-card: #ffffff;
    --border: #cffafe;
    --border-strong: #a5f3fc;
    --tooltip-bg: #0891b2;
    --text-tooltip: #ffffff;
    --kb-main-bg: #ecfeff;
    --kb-text: #083344;
    --kb-text-muted: #0891b2;
    --kb-card-bg: #ffffff;
    --kb-col-header: #ffffff;
    --kb-col-body: rgba(236, 254, 255, 0.85);
    --kb-filter-bg: #ffffff;
    --kb-border: #cffafe;
    --kb-accent: #0891b2;
    --kb-input-bg: #ffffff;
}

/* --- 4. ACESSIBILIDADE & CONFORTO --- */

/* Dark OLED / Slate */
body.theme-dark {
    --bg-main: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-sidebar-tabs: #000000;
    --bg-submenu: #0f172a;
    --bg-surface: #1e293b;
    --bg-vistas-wrapper: rgba(255, 255, 255, 0.05);
    --text-primary: #f1f5f9;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-link: #38bdf8;
    --text-link-sub: #7dd3fc;
    --accent: #38bdf8;
    --card-bg: #1e293b;
    --surface-card: #1e293b;
    --border: #334155;
    --border-strong: #475569;
    --border-vistas: rgba(255, 255, 255, 0.1);
    --shadow-sidebar: 5px 0 25px rgba(0, 0, 0, 0.3);
    --tooltip-bg: #38bdf8;
    --text-tooltip: #0f172a;
    --kb-main-bg: #0f172a;
    --kb-text: #f1f5f9;
    --kb-text-muted: #94a3b8;
    --kb-card-bg: #1e293b;
    --kb-col-header: #1e293b;
    --kb-col-body: rgba(30, 41, 59, 0.85);
    --kb-filter-bg: #1e293b;
    --kb-border: #334155;
    --kb-accent: #38bdf8;
    --kb-input-bg: #0f172a;
    --bg-lead-insta: rgba(111, 66, 193, 0.2);
    --text-lead-insta: #d8b4fe;
    --bg-lead-site: rgba(13, 110, 253, 0.2);
    --text-lead-site: #7dd3fc;
    --bg-lead-portal: rgba(253, 126, 20, 0.2);
    --text-lead-portal: #fdba74;
    --bg-lead-indica: rgba(32, 201, 151, 0.2);
    --text-lead-indica: #6ee7b7;
    --bg-lead-outros: rgba(255, 255, 255, 0.1);
    --text-lead-outros: #94a3b8;
    --color-temp-cold: #94a3b8;
    --bg-timer-warn: rgba(255, 193, 7, 0.2);
    --text-timer-warn: #fde047;
    --bg-timer-danger: rgba(220, 53, 69, 0.2);
    --text-timer-danger: #fca5a5;
    --bg-gauge-track: #334155;
    --score-low: #ff5f52;
    --score-high: #81c784;
    --bg-accepted-row: rgba(0, 184, 148, 0.15);
    --border-accepted-row: var(--color-imoveis);
    --bg-file-header: #0f172a;
    --border-list: #334155;
}

/* High Contrast (WCAG AAA) */
body.theme-high-contrast {
    --bg-main: #000000;
    --bg-sidebar: #000000;
    --bg-sidebar-tabs: #000000;
    --bg-surface: #000000;
    --bg-submenu: #000000;
    --text-primary: #00ff66;
    --text-main: #00ff66;
    --text-muted: #ffff00;
    --text-link: #00ffff;
    --text-link-sub: #ffff00;
    --accent: #00ff66;
    --card-bg: #000000;
    --surface-card: #000000;
    --border: #00ff66;
    --border-strong: #00ff66;
    --soft-shadow: none;
    --text-soft: #00ff66;
    --tooltip-bg: #00ff66;
    --text-tooltip: #000000;
    --kb-main-bg: #000000;
    --kb-text: #00ff66;
    --kb-text-muted: #ffff00;
    --kb-card-bg: #000000;
    --kb-col-header: #000000;
    --kb-col-body: #000000;
    --kb-filter-bg: #000000;
    --kb-border: #00ff66;
    --kb-accent: #00ff66;
    --kb-input-bg: #000000;
    --bg-lead-insta: #000;
    --text-lead-insta: #00ff66;
    --bg-lead-site: #000;
    --text-lead-site: #00ff66;
    --bg-lead-portal: #000;
    --text-lead-portal: #00ff66;
    --bg-lead-indica: #000;
    --text-lead-indica: #00ff66;
    --bg-lead-outros: #000;
    --text-lead-outros: #00ff66;
    --color-temp-hot: #00ff66;
    --color-temp-warm: #00ff66;
    --color-temp-cold: #00ff66;
    --bg-gauge-track: #000;
    --score-low: #00ff66;
    --score-med: #00ff66;
    --score-good: #00ff66;
    --score-high: #00ff66;
    --bg-accepted-row: #000;
    --border-accepted-row: #00ff66;
}

/* Minimalist */
body.theme-minimalist {
    --bg-main: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #ffffff;
    --bg-surface: #ffffff;
    --bg-submenu: #ffffff;
    --text-primary: #000000;
    --text-main: #000000;
    --text-muted: #717171;
    --text-link: #000000;
    --text-link-sub: #333333;
    --accent: #000000;
    --card-bg: #ffffff;
    --surface-card: #ffffff;
    --border: #e0e0e0;
    --border-strong: #b3b3b3;
    --soft-shadow: none;
    --tooltip-bg: #000000;
    --text-tooltip: #ffffff;
    --kb-main-bg: #ffffff;
    --kb-text: #000000;
    --kb-text-muted: #717171;
    --kb-card-bg: #ffffff;
    --kb-col-header: #ffffff;
    --kb-col-body: rgba(255, 255, 255, 0.95);
    --kb-filter-bg: #ffffff;
    --kb-border: #e0e0e0;
    --kb-accent: #000000;
    --kb-input-bg: #ffffff;
    --bg-lead-insta: #ffffff;
    --text-lead-insta: #000000;
    --bg-lead-site: #ffffff;
    --text-lead-site: #000000;
    --bg-lead-portal: #ffffff;
    --text-lead-portal: #000000;
    --bg-lead-indica: #ffffff;
    --text-lead-indica: #000000;
    --bg-lead-outros: #ffffff;
    --text-lead-outros: #717171;
    --border-lead: 1px solid #000000;
    --color-temp-hot: #000000;
    --color-temp-warm: #444444;
    --color-temp-cold: #999999;
    --bg-timer-warn: #f5f5f5;
    --text-timer-warn: #000000;
    --bg-timer-danger: #000000;
    --text-timer-danger: #ffffff;
}

/* Win31 Retro */
body.theme-win31 {
    --bg-main: #008080;
    --bg-sidebar: #c0c0c0;
    --bg-sidebar-tabs: #c0c0c0;
    --bg-surface: #c0c0c0;
    --bg-submenu: #c0c0c0;
    --text-primary: #000000;
    --text-main: #000000;
    --text-muted: #404040;
    --accent: #000080;
    --card-bg: #c0c0c0;
    --surface-card: #c0c0c0;
    --border: #000000;
    --border-strong: #808080;
    --tooltip-bg: #000080;
    --text-tooltip: #ffffff;
    --kb-main-bg: #008080;
    --kb-text: #000000;
    --kb-text-muted: #404040;
    --kb-card-bg: #c0c0c0;
    --kb-col-header: #c0c0c0;
    --kb-col-body: #c0c0c0;
    --kb-filter-bg: #c0c0c0;
    --kb-border: #000000;
    --kb-accent: #000080;
    --kb-input-bg: #ffffff;
    --bg-lead-insta: #ff00ff;
    --text-lead-insta: #ffffff;
    --bg-lead-site: #0000ff;
    --text-lead-site: #ffffff;
    --bg-lead-portal: #ff0000;
    --text-lead-portal: #ffffff;
    --bg-lead-indica: #00ffff;
    --text-lead-indica: #000000;
    --bg-lead-outros: #ffffff;
    --text-lead-outros: #000000;
    --color-temp-hot: #ff0000;
    --color-temp-warm: #ffff00;
    --color-temp-cold: #000080;
    --bg-timer-warn: #ffff00;
    --text-timer-warn: #000000;
    --bg-timer-danger: #ff0000;
    --text-timer-danger: #ffffff;
    --bg-gauge-track: #808080;
    --bg-accepted-row: #ffffff;
    --border-accepted-row: #000000;
}

/* ================================================================================
   ADAPTAÇÃO DINÂMICA DE COMPONENTES & CONTRASTE GLOBAL UNIVERSAL
   (Garante 100% de legibilidade e acessibilidade WCAG em todos os temas)
   ================================================================================ */

/* --- 1. Resets e Tipografia Base --- */
body {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Títulos, Cabeçalhos e Textos Fortes */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
strong,
b,
.fw-bold,
.fw-semibold {
    color: var(--text-main) !important;
}

/* Subtítulos, Textos Descritivos e Muted (SEMPRE LEGÍVEL) */
.text-muted,
.form-text,
small.text-muted,
span.text-muted,
p.text-muted,
div.text-muted,
.text-secondary {
    color: var(--text-muted) !important;
}

/* Labels de Formulário */
label,
.form-label,
legend,
.col-form-label,
.form-check-label {
    color: var(--text-main) !important;
    font-weight: 500;
}

.modal {
    --bs-modal-zindex: 1055;
    --bs-modal-width: 540px !important;
}

/* --- 2. Adaptação Dinâmica de Componentes e Superfícies (Baseado em Variáveis do Tema) --- */

/* Cards, Superfícies e Containers */
.card,
.glass-card,
.widget-card,
.bg-surface,
.kanban-col-container {
    background-color: var(--card-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border-color: var(--border, #e2e8f0) !important;
}

.bg-white {
    background-color: var(--card-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
}

.btn-white {
    background-color: var(--card-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border-color: var(--border, #e2e8f0) !important;
}

/* Dropdown Menus em Todos os Temas */
.dropdown-menu {
    background-color: var(--card-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border: 1px solid var(--border-strong, #cbd5e1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
}

.dropdown-menu .border-bottom,
.dropdown-menu .border-top {
    border-color: var(--border, #e2e8f0) !important;
}

.dropdown-item {
    color: var(--text-main, #0f172a) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(125, 125, 125, 0.12) !important;
    color: var(--accent) !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}

.dropdown-divider {
    border-color: var(--border, #e2e8f0) !important;
}

/* Formulários e Inputs */
.form-control,
.form-select,
.input-group-text,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
    background-color: var(--kb-input-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border-color: var(--border-strong, #cbd5e1) !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    background-color: var(--kb-input-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.2) !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

.input-group-text {
    background-color: rgba(125, 125, 125, 0.06) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

/* Modais: Devem ficar sempre à frente da sidebar (#sidebar z-index: 1090) */
.modal-backdrop {
    z-index: 1095 !important;
}

.modal {
    z-index: 1100 !important;
}

body.modal-open #global-taskbar,
body.modal-open #topDrawer {
    z-index: 1040 !important;
}

.modal-content {
    background-color: var(--card-bg, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border-color: var(--border-strong, #cbd5e1) !important;
}

.modal-header,
.modal-footer {
    border-color: var(--border, #e2e8f0) !important;
}

/* Drawer e Topbar */
.topbar-drawer,
#topDrawer {
    position: relative;
    z-index: 1040;
    background-color: var(--card-bg, #ffffff) !important;
    border-color: var(--border, #e2e8f0) !important;
    color: var(--text-main) !important;
}

#topDrawer .dropdown-menu {
    z-index: 1045 !important;
}

#btnToggleDrawer {
    background-color: var(--card-bg, #ffffff) !important;
    border-color: var(--border, #e2e8f0) !important;
    color: var(--text-main) !important;
    position: relative;
    z-index: 1039;
}

#btnToggleDrawer i {
    color: var(--text-muted) !important;
}

/* Botões do Topo */
.btn-topbar {
    background-color: var(--bg-surface, rgba(125, 125, 125, 0.08)) !important;
    color: var(--text-main) !important;
    border-color: var(--border, #e2e8f0) !important;
}

.btn-topbar:hover {
    background-color: rgba(125, 125, 125, 0.15) !important;
    color: var(--text-main) !important;
}

/* Layout Principal e Containers de Conteúdo (Garante que nunca fique branco no tema escuro) */
html,
body,
.main-content,
#main-container,
#dashboard-commander,
.page-pipeline,
.page-imoveis-container,
.tab-content {
    background-color: var(--bg-main, #111827) !important;
    color: var(--text-main, #0f172a) !important;
}

/* Kanban Containers e Colunas do Pipeline de Vendas & Atividades */
.kanban-col-container,
.kanban-col>.card {
    background-color: var(--bg-surface, #1f2937) !important;
    border: 1px solid var(--border, #374151) !important;
    color: var(--text-main, #0f172a) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.kanban-col .card-header {
    background-color: transparent !important;
    color: var(--text-main, #0f172a) !important;
    border-bottom: 1px solid var(--border, #374151) !important;
}

.kanban-col-container .kanban-column,
.kanban-col .kanban-list {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    flex-shrink: 1 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 4px;
    box-sizing: border-box;
}

/* Cards do Kanban (Pipeline de Vendas, Chamados e Atividades) com Contraste e Limites 100% Nítidos */
.post-it-card,
.kanban-item,
.pipeline-card,
.mp-card-item {
    background-color: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-strong, #cbd5e1) !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
    padding: 14px 16px !important;
    position: relative;
    color: var(--text-main, #0f172a) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 12px 0 !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-it-card:hover,
.kanban-item:hover,
.pipeline-card:hover,
.mp-card-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent, #3b82f6) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22) !important;
}

.post-it-card p,
.post-it-card .text-muted,
.kanban-item .text-muted {
    color: var(--text-muted) !important;
}

/* Dropdowns & Popups Globais Variabilizados */
.dropdown-menu {
    background-color: var(--bg-surface, #ffffff) !important;
    color: var(--text-main, #0f172a) !important;
    border: 1px solid var(--border-strong, #dee2e6) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.dropdown-item {
    color: var(--text-main, #0f172a) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(125, 125, 125, 0.1) !important;
    color: var(--text-main, #0f172a) !important;
}

.dropdown-divider {
    border-top-color: var(--border, #e2e8f0) !important;
}

/* Itens de Notificação */
.item-notificacao {
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border, #e2e8f0) !important;
    background-color: transparent !important;
    transition: background-color 0.2s ease;
}

.item-notificacao h6,
.item-notificacao p,
.item-notificacao span,
.item-notificacao small {
    color: var(--text-main) !important;
}

.item-notificacao .text-muted {
    color: var(--text-muted) !important;
}

.item-notificacao:hover,
.hover-bg-light:hover {
    background-color: rgba(125, 125, 125, 0.1) !important;
}

/* Spotlight de Busca da Home */
.search-spotlight .input-group {
    background-color: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-strong, #cbd5e1) !important;
}

.search-spotlight input {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

.search-spotlight .input-group-text {
    background-color: transparent !important;
    border: none !important;
}

/* Botões Globais */
.btn-primary,
.btn-success,
.btn-danger,
.btn-info,
.btn-dark,
.btn-premium {
    color: #ffffff !important;
    font-weight: 600;
}

.btn-premium {
    background: linear-gradient(135deg, var(--accent, #00b894), #0984e3) !important;
    border: none !important;
}

.btn-warning {
    color: #1e293b !important;
    font-weight: 600;
}

/* ================================================================================
   BLINDAGEM UNIVERSAL DE CONTRASTE PARA TODOS OS TEMAS ESCUROS
   (Elimina qualquer caixa branca, feedback box clara, badge branco ou texto ilegível)
   ================================================================================ */
body:not([class*="theme-"]) .text-light,
body.theme-corporate-blue .text-light,
body.theme-slate-charcoal .text-light,
body.theme-mint-emerald .text-light,
body.theme-ocean-breeze .text-light,
body.theme-minimalist .text-light,
body.theme-win31 .text-light {
    color: var(--text-main) !important;
}

body.theme-emerald-graphite,
body.theme-navy-slate,
body.theme-architect-black,
body.theme-amethyst-indigo,
body.theme-amber-rust,
body.theme-dark,
body.theme-high-contrast {

    /* Força fundos de componentes Bootstrap a acompanharem o tema */
    .bg-white,
    .bg-light,
    .bg-body,
    .bg-body-secondary,
    .bg-body-tertiary,
    .bg-light-subtle,
    .bg-soft-gray,
    .bg-soft-secondary,
    .card-footer,
    .card-header,
    .card-footer.bg-white,
    .card-header.bg-white,
    .btn-white,
    .btn-group.bg-white,
    .btn-group.bg-light,
    .dropdown-menu,
    .dropdown-menu.show,
    .modal-content,
    .modal-header,
    .modal-body,
    .modal-footer,
    .upload-area,
    .preview-container,
    .alert-light,
    .border-start.ps-2.bg-light,
    .border-start.border-primary.ps-2.bg-light,
    .border-start.border-primary.border-3.ps-2.bg-light,
    .border-start.ps-2,
    .p-2.bg-light,
    .p-3.bg-light,
    .p-4.bg-light,
    .p-2.bg-white,
    .p-3.bg-white,
    .p-4.bg-white,
    .border.bg-light,
    .border.bg-white {
        background-color: var(--bg-surface) !important;
        background: var(--bg-surface) !important;
        color: var(--text-main) !important;
        border-color: var(--border-strong) !important;
    }

    /* Badges translúcidos elegantes de alto contraste */
    .badge.bg-light,
    .badge.bg-white,
    .badge-origem,
    .badge-origem.bg-soft-gray,
    .badge.bg-light.text-dark {
        background-color: rgba(255, 255, 255, 0.08) !important;
        background: rgba(255, 255, 255, 0.08) !important;
        color: var(--text-main) !important;
        border: 1px solid var(--border-strong) !important;
    }

    /* Textos escuros do Bootstrap ajustados para alto contraste */
    .text-dark,
    .text-black,
    .text-body,
    .text-body-secondary,
    .fw-bold.text-dark,
    .dropdown-item,
    .table td,
    .table th,
    .table-modern td,
    .table-modern th,
    .small.fw-bold,
    .text-secondary {
        color: var(--text-main) !important;
    }

    .text-muted {
        color: var(--text-muted) !important;
    }

    /* Inputs, selects e textareas em tema escuro */
    .form-control,
    .form-select,
    .input-group-text {
        background-color: var(--bg-main) !important;
        color: var(--text-main) !important;
        border-color: var(--border-strong) !important;
    }

    .form-control:focus,
    .form-select:focus {
        background-color: var(--bg-main) !important;
        color: var(--text-main) !important;
        border-color: var(--accent) !important;
    }

    /* Botão fechar invertido para visibilidade */
    .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
    }

    /* Caixas de anotação de feedback em tabelas */
    .border-start.ps-2.bg-light,
    .border-start.border-primary.ps-2.bg-light {
        background-color: rgba(255, 255, 255, 0.04) !important;
        color: var(--text-main) !important;
        border-color: var(--accent) !important;
    }

    .border-start.ps-2.bg-light small,
    .border-start.ps-2.bg-light span,
    .border-start.ps-2.bg-light p,
    .border-start.ps-2.bg-light i {
        color: var(--text-main) !important;
    }
}

.post-it-card.card-arquivado {
    opacity: 0.65;
    border-style: dashed !important;
}

.post-it-card.card-arquivado:hover {
    opacity: 0.95;
}

/* Tag de Prazo Atrasado (Nítida e sem borrão) */
.tag-prazo-atrasado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2.5px 8px;
    border-radius: 6px;
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 11px;
    font-weight: 700;
}

.tag-prazo-atrasado i {
    color: #ef4444;
    font-size: 11px;
}

/* Tabelas */
.table {
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.table> :not(caption)>*>* {
    background-color: transparent !important;
    color: var(--text-main) !important;
    border-bottom-color: var(--border) !important;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(125, 125, 125, 0.05) !important;
}

/* List Groups & Tabs */
.list-group-item {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.nav-tabs {
    border-bottom-color: var(--border) !important;
}

.nav-tabs .nav-link {
    color: var(--text-muted) !important;
}

.nav-tabs .nav-link.active {
    background-color: var(--card-bg) !important;
    color: var(--accent) !important;
    border-color: var(--border) var(--border) var(--card-bg) !important;
}

/* Avatar Containers e Dropdowns */
.avatar-container {
    background: var(--bg-sidebar);
}

/* ########## SIDE BAR ########## */
/* Container Principal */
#sidebar.sidebar-revolutionary {
    width: var(--sidebar-total-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1090;
    background: var(--bg-sidebar);
    /* FIX: Removido #fff */
    display: flex;
    transition: width var(--transition-speed) ease;
    box-shadow: var(--shadow-sidebar);
}

.btn-toggle-mini {
    border-radius: 50px;
    width: 30px;
}

/* ESTADO RECOLHIDO (Esconde a segunda coluna) */
#sidebar.collapsed {
    width: var(--sidebar-tabs-width) !important;
}

#sidebar.collapsed .sidebar-body {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    width: 0;
}

/* Botão PIN */
.btn-pin {
    background: transparent;
    border: none;
    color: var(--text-sidebar-pin);
    /* Variabilizado */
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-pin.pinned {
    color: #fff;
    transform: rotate(45deg);
}

.btn-pin:hover {
    color: #fff;
}

/* Painel 1: Ícones (Fixos à esquerda) */
.sidebar-tabs {
    width: var(--sidebar-tabs-width);
    background: var(--bg-sidebar-tabs);
    /* FIX: Removido #1e293b */
    flex-shrink: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-btn {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-sidebar-icon);
    /* Variabilizado */
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active.btn-adm {
    background: var(--color-adm);
    color: #fff;
}

.tab-btn.active.btn-imoveis {
    background: var(--color-imoveis);
    color: #fff;
}

.tab-btn.active.btn-rh {
    background: var(--color-rh);
    color: #fff;
}

.tab-btn.active.btn-marketing {
    background: var(--color-marketing);
    color: #fff;
}

.tab-btn.active.btn-suporte {
    background: var(--color-suporte);
    color: #fff;
}

.tab-btn.active.btn-financeiro {
    background: var(--color-financeiro);
    color: #fff;
}

/* Painel 2: Links (Dinâmico) */
.sidebar-body {
    width: var(--sidebar-body-width);
    background: var(--bg-sidebar);
    /* FIX: Removido #fff */
    border-right: 1px solid var(--border);
    transition: all var(--transition-speed) ease;
    overflow-y: auto;
}

.tab-pane-content {
    display: none;
}

.tab-pane-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.tab-header {
    padding: 20px;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Temas de Header */
.adm-theme {
    background: var(--color-adm);
}

.imoveis-theme {
    background: var(--color-imoveis);
}

.rh-theme {
    background: var(--color-rh);
}

.marketing-theme {
    background: var(--color-marketing);
}

.suporte-theme {
    background: var(--color-suporte);
}

.financeiro-theme {
    background: var(--color-financeiro);
}

.tab-btn.active.btn-condo {
    background: var(--color-condo);
    color: #fff;
}

.condo-theme {
    background: var(--color-condo);
}

.tab-btn.active.btn-processos {
    background: var(--color-multipp);
    color: #fff;
}

.processos-theme {
    background-color: var(--color-multipp) !important;
    color: var(--text-soft);
}

#kanbanBoard {
    transition: all 0.3s ease-in-out;
}

/* Garante que o container de links tenha o mesmo comportamento dos outros */
#mp-menu-list .nav-link-modern {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-link);
    /* Variabilizado */
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

#mp-menu-list .nav-link-modern i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 10px;
    text-align: center;
}

.border-theme-condominio {
    border-color: var(--color-condo) !important;
}

/* Estilo para o ícone específico de condomínio quando hover no link */
.tab-pane-content#content-condo .nav-link-modern:hover {
    color: var(--color-condo);
}

.tab-pane-content#content-condo .nav-link-modern.active {
    background: rgba(26, 188, 156, 0.1);
    color: var(--color-condo);
}

#user-avatar-container {
    transition: border-color 0.4s ease, transform 0.2s ease !important;
}

/* Estilo dos Links Internos */
.nav-link-modern {
    display: flex;
    align-items: center;
    padding: 5px;
    color: var(--text-link);
    /* FIX: Removido #555 */
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0px;
    transition: 0.2s;
}

.nav-link-modern:hover {
    background: var(--bg-main);
    color: var(--color-adm);
}

.nav-link-modern.active {
    background: rgba(13, 110, 253, 0.1);
    /* Variabilizado para azul suave */
    color: var(--color-adm);
    font-weight: 600;
}

.nav-link-modern i {
    width: 25px;
    margin-right: 10px;
    text-align: center;
}

/* Submenus Pipeline */
.submenu {
    background: var(--bg-submenu);
    /* FIX: Removido #fafafa */
    margin: 0 10px 5px;
    border-radius: 8px;
    padding: 5px 0;
}

.nav-link-modern-sub {
    display: block;
    padding: 6px 15px 6px 20px;
    color: var(--text-link-sub);
    /* FIX: Removido #666 */
    text-decoration: none;
    font-size: 0.85rem;
}

/* AJUSTE DINÂMICO DA PÁGINA */
.main-content {
    margin-left: var(--sidebar-total-width) !important;
    transition: margin-left var(--transition-speed) ease;
    width: auto;
}

#sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-tabs-width) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/**** SIDEBAR VISITAS ****/
.vistas-envelope {
    background: var(--bg-vistas-wrapper);
    border-radius: 12px;
    margin: 8px 12px;
    border: 1px solid var(--border-vistas);
}

.vistas-footer {
    background: var(--bg-vistas-footer);
}

/* Garante que todas as páginas iniciem escondidas */
.vistas-page {
    display: none !important;
}

/* Mostra apenas a que tiver a classe active */
.vistas-page.active {
    display: block !important;
    animation: fadeInSlide 0.3s ease-in-out;
}

.btn-vistas-nav {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-vistas);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: var(--text-link);
    transition: all 0.2s;
}

.btn-vistas-nav:hover {
    background: var(--color-imoveis);
    color: #fff;
    border-color: var(--color-imoveis);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- ALINHAMENTO E TRUNCATE (RESOLVE PRINT 2) --- */
.nav-link-modern-sub {
    display: flex !important;
    align-items: center !important;
    padding: 8px 15px !important;
    position: relative;
    text-decoration: none;
}

.nav-link-modern-sub i {
    flex-shrink: 0;
    margin-right: 12px;
    font-size: 11px;
}

.vistas-text-truncate {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* --- TOOLTIP PREMIUM (CSS ONLY) --- */
.nav-link-modern-sub:hover::after {
    content: attr(data-full-title);
    position: absolute;
    left: 15px;
    right: 15px;
    top: 100%;
    background: var(--tooltip-bg);
    color: var(--text-tooltip);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: normal;
    z-index: 99999 !important;
    box-shadow: var(--shadow-tooltip);
    pointer-events: none;
    opacity: 0;
    display: block;
    animation: fadeInTooltip 0.2s forwards;
    animation-delay: 0.4s;
    border: 1px solid var(--border-tooltip);
}

/* Seta do Tooltip */
.nav-link-modern-sub:hover::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 90%;
    border: 6px solid transparent;
    border-bottom-color: var(--tooltip-bg);
    z-index: 99999 !important;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
    animation-delay: 0.4s;
}

@keyframes fadeInTooltip {
    to {
        opacity: 1;
        top: 105%;
    }
}

/* Overrides do Tooltip para Dark Theme (conforme lógica original) */
body.theme-dark .nav-link-modern-sub:hover::after {
    background: var(--bg-main);
    color: var(--text-primary);
}

body.theme-dark .nav-link-modern-sub:hover::before {
    border-bottom-color: var(--bg-main);
}

/* ########## SIDE BAR END ########## */
/* ########## LAUNCHPAD PANEL ########## */
/* ########## REALTY IQ | LAUNCHPAD PREMIUM (GOOGLE STYLE) ########## */

/* CORES PADRÃO GOOGLE */
.bg-google-blue {
    background-color: #4285F4 !important;
}

.bg-google-red {
    background-color: #EA4335 !important;
}

.bg-google-yellow {
    background-color: #FBBC05 !important;
}

.bg-google-green {
    background-color: #34A853 !important;
}

/* PAINEL PRINCIPAL */
.launchpad-panel {
    display: flex;
    flex-direction: column;
    position: absolute !important;
    bottom: 80px !important;
    right: 10px !important;
    width: 420px;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    border-radius: 28px !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25) !important;
    z-index: 10000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

/* HEADER E CONTROLES */
.launchpad-panel .flyout-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-launch-ctrl {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0 5px;
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-launch-ctrl:hover {
    color: #4285F4;
    transform: scale(1.1);
}

/* CONTAINER DE GRID E SCROLL */
.launchpad-grid-container {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 20px 15px;
}

/* Scrollbar Estilizada */
.launchpad-grid-container::-webkit-scrollbar {
    width: 5px;
}

.launchpad-grid-container::-webkit-scrollbar-track {
    background: transparent;
}

.launchpad-grid-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* SEÇÕES E TÍTULOS (AGORA NO TOPO) */
.launch-section {
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 5px;
}

.section-divider-label {
    font-size: 10px;
    font-weight: 800;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 15px;
    margin-left: 5px;
    user-select: none;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}

/* GRID DE APPS (AUTO-RECOMODAÇÃO) */
.launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 12px;
    width: 100%;
    justify-items: center;
}

/* ITEM DO APP */
.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    width: 85px;
    padding: 12px 5px;
    border-radius: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-item:hover {
    background-color: rgba(66, 133, 244, 0.08);
    transform: translateY(-4px);
}

/* Ícone do App */
.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.app-icon i {
    color: #ffffff;
    font-size: 1.35rem;
}

.app-item:hover .app-icon {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

/* Label do App */
.app-label {
    font-size: 11px;
    font-weight: 500;
    color: #3c4043;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.1px;
}

/* MODO FLUTUANTE (DETACHED) */
.launchpad-panel.is-detached {
    position: fixed !important;
    bottom: auto !important;
    right: auto !important;
    width: auto;
    max-height: 90vh !important;
    min-width: 350px;
    min-height: 250px;
    height: auto;
    border-radius: 20px !important;
    z-index: 100000;
}

.launchpad-panel.is-detached .flyout-header {
    cursor: move;
    background: #f8f9fa !important;
}

/* MODO MINIMIZADO */
.launchpad-panel.is-detached.minimized {
    height: 50px !important;
    width: 280px !important;
    min-height: 50px !important;
    overflow: hidden;
}

.launchpad-panel.is-detached.minimized .flyout-body {
    display: none;
}

/* REGRA DE OURO: Quando estiver desplugado (is-detached) */
.launchpad-panel.is-detached .flyout-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;

    /* Força o scroll no corpo, respeitando o limite do pai */
    max-height: 100% !important;
    overflow-y: auto !important;
    padding: 10px !important;
}

/* Garante que o container interno de scroll acompanhe o crescimento */
.launchpad-panel.is-detached .launchpad-grid-container {
    max-height: none !important;
    height: auto !important;
}

/* Ajuste das Alças de Resize */
.ui-resizable-handle {
    opacity: 0;
}

.launchpad-panel.is-detached:hover .ui-resizable-handle {
    opacity: 1;
}

/* ########## LAUNCHPAD PANEL END ########## */

/* ########## TOP MENU ########## */
/* --- ESTILO DO MENU DE USUÁRIO NO TOPO --- */

/* Remove a setinha padrão do dropdown do Bootstrap */
.no-caret::after {
    display: none;
}

.avatar-container {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.avatar-container:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md) !important;
    /* Variabilizado: remove 0 4px 12px rgba(0,0,0,0.15) */
}

.dropdown-menu .dropdown-item {
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-main);
    background-color: transparent !important;
    opacity: 1 !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: var(--bg-neutral-soft);
    /* Variabilizado: remove #f1f4f9 */
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    padding-left: 1.2rem;
    /* Efeito de deslize no hover */
}

/* Ajuste para o texto bem pequeno */
.x-small {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

/* --- BORDAS DINÂMICAS DO AVATAR --- */
.border-theme-adm {
    border-color: var(--color-adm) !important;
}

.border-theme-imoveis {
    border-color: var(--color-imoveis) !important;
}

.border-theme-rh {
    border-color: var(--color-rh) !important;
}

.border-theme-marketing {
    border-color: var(--color-marketing) !important;
}

.border-theme-suporte {
    border-color: var(--color-suporte) !important;
}

.border-theme-financeiro {
    border-color: var(--color-financeiro) !important;
}

/* Efeito de brilho suave na foto para destacar a cor */
.avatar-container {
    padding: 2px;
    /* Espaço para a borda colorida aparecer */
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    /* Garante que a borda exista para o tema Dark */
}

.avatar-container:hover {
    box-shadow: var(--shadow-soft) !important;
    /* Variabilizado: remove 0 0 15px rgba(0,0,0,0.1) */
}

/* ########## TOP MENU END ########## */

/* ============================================================
   REALTY IQ - DATA VISUALIZATION & PIPELINE (VARIABILIZADO)
   PARTE 3: CARDS, TABELAS, KANBAN E COMPONENTES DE UI
   ============================================================ */

/* ########## ESTILIZAÇÃO DE CARDS DE DADOS ########## */
.glass-card {
    background: var(--surface-card);
    border: none;
    border-radius: 16px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
    /* Variabilizado: remove rgba fixo */
}

/* ########## TABELA ESTILIZADA ########## */
.table-modern thead th {
    background-color: var(--bg-table-head);
    /* Variabilizado: remove #fcfcfc */
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-muted);
    border: none;
    padding: 20px;
}

/* Overrides de Header por Departamento (Mantendo !important original) */
.table-imoveis thead th {
    background-color: var(--color-imoveis) !important;
    color: #ffffff !important;
}

.table-rh thead th {
    background-color: var(--color-rh) !important;
    color: #ffffff !important;
}

.table-adm thead th {
    background-color: var(--color-adm) !important;
    color: #ffffff !important;
}

/* ########## ABAS AZUIS ATIVAS COM TEXTO E ICONE BRANCO ########## */
#unidadeTabs .nav-link.active,
#unidadeTabs .nav-link.active *,
#unidadeTabs .nav-link.active i,
.nav-pills .nav-link.active,
.nav-pills .nav-link.active *,
.nav-pills .nav-link.active i {
    color: #ffffff !important;
    background-color: #0d6efd !important;
}

#unidadeTabs .nav-link {
    color: #64748b !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#unidadeTabs .nav-link i {
    color: inherit !important;
}

#unidadeTabs .nav-link:not(.active):hover {
    color: #0d6efd !important;
    background-color: #f1f5f9 !important;
}

/* ########## CARDS INTERATIVOS DE CLASSIFICAÇÃO DA EMPRESA ########## */
.class-group-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.class-group-header {
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    display: flex;
    align-items: center;
}

.class-group-body {
    padding: 16px;
}

.class-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.class-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    margin: 0;
    position: relative;
}

.class-card-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.class-card-btn .class-card-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.class-card-btn .class-card-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    background: #ffffff;
    margin-left: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Quando ativo / selecionado */
.class-card-btn:has(input:checked),
.class-card-btn.active {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 1px #2563eb, 0 4px 10px rgba(37, 99, 235, 0.12) !important;
}

.class-card-btn:has(input:checked) .class-card-text,
.class-card-btn.active .class-card-text {
    color: #1d4ed8 !important;
    font-weight: 700 !important;
}

.class-card-btn:has(input:checked) .class-card-icon,
.class-card-btn.active .class-card-icon {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.table-modern tbody td {
    padding: 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    /* Variabilizado: remove #f1f2f6 */
    color: var(--text-main);
}

/* ########## BADGES PREMIUM ########## */
.badge-status {
    padding: 6px 14px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.7rem;
}

/* Cores de Badges Reativas ao Tema (RGBA para manter suavidade) */
.badge-active {
    background: var(--bg-vistas-wrapper);
    /* Usa tom suave do tema */
    color: var(--color-imoveis);
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.badge-inactive {
    background: rgba(214, 48, 49, 0.1);
    color: var(--color-financeiro);
}

/* ########## BOTÃO DE AÇÃO PREMIUM ########## */
.btn-premium {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    /* Variabilizado */
    transition: 0.3s;
}

.btn-premium:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    color: var(--white);
}

/* ########## DIVISORES DE SEÇÃO ########## */
.section-header {
    width: 100%;
    padding: 10px 15px;
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    border-left: 4px solid var(--accent);
    /* Reativo ao tema selecionado */
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ########## ÁREA DE UPLOAD DE FOTOS ########## */
.upload-area {
    border: 2px dashed var(--border-strong);
    /* Variabilizado: remove #dee2e6 */
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: var(--bg-table-head);
    /* Variabilizado: remove #fcfcfc */
    cursor: pointer;
    transition: 0.3s;
}

.upload-area:hover {
    border-color: var(--accent);
    background: var(--bg-vistas-wrapper);
    /* Efeito suave de hover */
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.bg-cep-success {
    background-color: var(--bg-vistas-wrapper) !important;
    /* Verde dinâmico ou suave */
    transition: background-color 0.5s;
}

.note-pinned {
    border-left: 4px solid #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.02) !important;
}

/* ########## KANBAN & PIPELINE ARCHITECTURE ########## */

/* ============================================================
   REALTY IQ - KANBAN PALETTE ENGINE (20 TEMAS)
   PARTE 3.1: DEFINIÇÃO DE CORES POR ATRIBUTO [data-theme]
   ============================================================ */

/* --- DEFINIÇÃO DAS 20 PALETAS (VARIABILIZADAS) --- */

/* 1. Default */
#kanbanBoard[data-theme="default"] {
    --kb-col-bg: var(--bg-neutral-soft);
    --kb-card-bg: var(--bg-surface);
    --kb-accent: var(--accent);
}

/* 2. Sunset */
#kanbanBoard[data-theme="sunset"] {
    --kb-col-bg: rgba(255, 245, 238, 0.85);
    --kb-card-bg: var(--white);
    --kb-accent: #FF5F6D;
    --kb-text-head: #4a1e1e;
}

/* 3. Ocean */
#kanbanBoard[data-theme="ocean"] {
    --kb-col-bg: rgba(224, 247, 250, 0.8);
    --kb-card-bg: var(--white);
    --kb-accent: #2193b0;
}

/* 4. Forest */
#kanbanBoard[data-theme="forest"] {
    --kb-col-bg: rgba(232, 245, 233, 0.85);
    --kb-card-bg: var(--white);
    --kb-accent: #11998e;
}

/* 5. Midnight (Otimizado para coexistir com Dark Mode Global) */
#kanbanBoard[data-theme="midnight"] {
    --kb-col-bg: rgba(30, 30, 30, 0.9);
    --kb-card-bg: #2d2d2d;
    --kb-text: #e0e0e0;
    --kb-text-head: var(--white);
    --kb-accent: var(--color-rh);
    /* Reutilizando variável de marca #6c5ce7 */
}

/* 6. Premium Gold */
#kanbanBoard[data-theme="premium"] {
    --kb-col-bg: rgba(18, 18, 18, 0.95);
    --kb-card-bg: #262626;
    --kb-accent: #c5a059;
    --kb-text: #dcdcdc;
    --kb-text-head: #c5a059;
}

/* 7. Berry */
#kanbanBoard[data-theme="berry"] {
    --kb-col-bg: rgba(252, 228, 236, 0.8);
    --kb-accent: #8E2DE2;
}

/* 8. Minimal Gray */
#kanbanBoard[data-theme="minimal"] {
    --kb-col-bg: rgba(248, 249, 250, 0.9);
    --kb-accent: var(--text-sidebar-icon);
}

/* 9. Nordic */
#kanbanBoard[data-theme="nordic"] {
    --kb-col-bg: rgba(215, 221, 232, 0.8);
    --kb-accent: #757F9A;
}

/* 10. Candy */
#kanbanBoard[data-theme="candy"] {
    --kb-col-bg: rgba(255, 240, 245, 0.85);
    --kb-accent: #ff9a9e;
}

/* 11. Citrus */
#kanbanBoard[data-theme="citrus"] {
    --kb-col-bg: rgba(255, 243, 224, 0.85);
    --kb-accent: #F37335;
}

/* 12. Deep Sea */
#kanbanBoard[data-theme="deepsea"] {
    --kb-col-bg: rgba(15, 12, 41, 0.9);
    --kb-card-bg: #1e1b4b;
    --kb-text: var(--white);
    --kb-accent: #00f2fe;
}

/* 13. Industrial */
#kanbanBoard[data-theme="industrial"] {
    --kb-col-bg: rgba(222, 203, 164, 0.4);
    --kb-accent: #3e5151;
}

/* 14. Neon Cyber (Acessibilidade Verde Neon) */
#kanbanBoard[data-theme="neon"] {
    --kb-col-bg: rgba(0, 0, 0, 0.8);
    --kb-card-bg: var(--black);
    --kb-text: #00f2fe;
    --kb-accent: #00f2fe;
}

/* 15. Vintage 80s */
#kanbanBoard[data-theme="vintage"] {
    --kb-col-bg: rgba(255, 0, 204, 0.1);
    --kb-accent: #3333ff;
}

/* 16. Earth */
#kanbanBoard[data-theme="earth"] {
    --kb-col-bg: rgba(239, 235, 233, 0.9);
    --kb-accent: #5D4037;
}

/* 17. Soft Blue */
#kanbanBoard[data-theme="soft_blue"] {
    --kb-col-bg: rgba(227, 242, 253, 0.85);
    --kb-accent: #66a6ff;
}

/* 18. Matcha */
#kanbanBoard[data-theme="matcha"] {
    --kb-col-bg: rgba(232, 245, 222, 0.9);
    --kb-accent: #9be15d;
}

/* 19. Rose Gold */
#kanbanBoard[data-theme="rose"] {
    --kb-col-bg: rgba(255, 235, 238, 0.85);
    --kb-accent: #f5576c;
}

/* 20. Modern Dark */
#kanbanBoard[data-theme="modern_dark"] {
    --kb-col-bg: #27293d;
    --kb-card-bg: #1e1e2f;
    --kb-text: var(--white);
    --kb-accent: #e14eca;
}

/* ########## PALETTE PICKER UI ########## */
.paleta-card {
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-surface);
}

.paleta-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    /* Variabilizado: remove #ddd */
}

.paleta-card.active {
    border-color: var(--accent);
    /* Variabilizado: remove var(--mp-theme) */
    box-shadow: var(--shadow-md);
}

.color-swatch {
    height: 25px;
    width: 100%;
    display: flex;
}

.swatch-item {
    flex: 1;
}

/* ########## UTILITY & EFFORT BOX ########## */
.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
    background: var(--bg-vistas-wrapper);
    /* Variabilizado: remove rgba fixo */
}

.effort-box h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
}

/* Container Principal do Módulo */
.pipeline-main-container {
    display: flex;
    flex-direction: column;
    width: calc(100vw - 345px);
    height: calc(100vh - 20px);
    overflow: hidden;
    position: relative;
}

/* Container de Scroll Lateral */
#kanbanScrollContainer {
    width: 100%;
    max-width: 100%;
    flex-grow: 1;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: var(--bg-main);
    /* Reativo ao Dark/Light */
    display: flex;
    padding: 15px;
}

/* Board de Colunas (Flex-Nowrap Vital) */
#kanbanBoard {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 15px;
    height: 100%;
}

.kanban-col {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Scroll Interno dos Cards */
.kanban-list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 240px);
    padding: 10px;
    background: var(--kb-col-body);
    /* Variabilizado: remove rgba(0,0,0,0.03) */
    border-radius: 8px;
}

/* ########## KANBAN LABELS & FAVS ########## */

/* Container do Item no Kanban */
.kanban-item {
    position: relative !important;
    padding-top: 15px !important;
    /* Espaço para as labels no topo */
}

/* Container de Labels - Agora como badges reais */
.card-kanban-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

/* Estilo do Badge da Label no Card */
.kanban-label-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--white);
    /* Texto fixo branco para contraste com a cor da label */
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estrela de Favorito */
.card-kanban-fav {
    position: absolute;
    top: 10px;
    right: 32px;
    font-size: 13px;
    color: #ffc107;
    /* Cor de 'ouro' mantida por ser ícone universal de favorito */
}

/* A Label em si - Barrinha Fina */
.kanban-label-dot {
    height: 4px;
    flex: 1;
    max-width: 40px;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}

/* Efeito de Hover no Card Item */
.mp-card-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.mp-card-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
    border-left: 3px solid var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
}

/* --- OVERRIDES ESPECÍFICOS PARA TEMAS --- */

/* Windows 3.1 - Remoção de arredondamentos e bordas chanfradas */
body.theme-win31 .nav-tabs-custom .nav-link,
body.theme-win31 .nav-tabs-custom .nav-link.active {
    border-radius: 0 !important;
    border: 2px solid !important;
    border-color: #fff #808080 #808080 #fff !important;
}

body.theme-win31 .mp-card-item:hover {
    border-left: 3px solid var(--accent) !important;
    transform: none;
    /* Windows 3.1 não tinha animações de translateY */
}

/* Minimalista - Bordas finas e sem sombras */
body.theme-minimalist .nav-tabs-custom .nav-link.active {
    box-shadow: none !important;
    border: 1px solid var(--black);
}

/* Estilização dos Scrollbars (Variabilizado para visibilidade) */
#kanbanScrollContainer::-webkit-scrollbar {
    height: 12px;
}

#kanbanScrollContainer::-webkit-scrollbar-track {
    background: var(--bg-main);
}

#kanbanScrollContainer::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
    border: 3px solid var(--bg-main);
    /* Cria um respiro visual */
}

@media (max-width: 991px) {
    .pipeline-main-container {
        width: 100vw;
        height: auto;
    }

    #kanbanScrollContainer {
        padding: 10px;
    }

    .kanban-col {
        min-width: 85vw;
    }
}

.hover-shadow {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

/* ########## LEADS E MODAIS (ESTILO REALTY IQ) ########## */

/* Tabela de Leads */
.table-leads thead th {
    background-color: var(--bg-header-dark);
    /* Variabilizado: remove #2d3436 */
    color: var(--text-soft);
    font-size: 0.8rem;
    padding: 15px;
}

.table-leads tbody td {
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.value-highlight {
    color: var(--color-imoveis);
    font-weight: 700;
}

/* Inputs Compactos */
.form-control-realty {
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-input);
    /* Reativo ao Dark Mode */
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 8px 12px;
}

.form-control-realty:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
    outline: none;
}

/* Botão de Ação Circular */
.btn-circle-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    transition: 0.2s;
}

.btn-circle-add:hover {
    background: var(--accent);
    color: var(--white);
}

/* Modais Realty IQ */
.modal-realty .modal-header {
    background: var(--accent);
    color: var(--white);
    border-radius: 12px 12px 0 0;
}

.modal-realty .modal-content {
    background-color: var(--bg-surface);
    /* Reativo */
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-lg);
    top: 130px;
}

.modal-realty .form-label {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-primary);
}

@media print {
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ########## FLOATING NOTES & ALERTS ########## */
.btn-floating-note {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffeb3b;
    border: none;
    font-size: 1.5rem;
    color: #856404;
    z-index: 1050;
    transition: transform 0.2s;
    box-shadow: var(--shadow-md);
}

.btn-floating-note:hover {
    transform: scale(1.1) rotate(10deg);
}

.post-it-card {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    padding: 12px 14px !important;
    position: relative;
    color: var(--text-main, #0f172a) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.post-it-card p,
.post-it-card .text-muted {
    color: var(--text-muted) !important;
}

.post-it-card.card-arquivado {
    opacity: 0.65;
    border-style: dashed !important;
}

.timer-warning {
    font-size: 0.7rem;
    color: #d32f2f;
    font-weight: bold;
}

.cursor-pointer {
    cursor: pointer;
    transition: color 0.2s;
}

.cursor-pointer:hover {
    color: var(--accent);
}

.sort-active {
    color: var(--accent) !important;
}

/* Incomplete Items Logic */
tr.imovel-incompleto {
    background-color: rgba(220, 53, 69, 0.05) !important;
    /* Variabilizado por cor semântica */
    transition: background-color 0.3s ease;
}

tr.imovel-incompleto:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.badge-incompleto {
    font-size: 10px;
    padding: 4px 8px;
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 50px;
    font-weight: 700;
}

@keyframes blink-border {
    0% {
        border-color: #ef4444;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        border-color: #fca5a5;
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    }

    100% {
        border-color: #ef4444;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
}

.field-incomplete {
    border: 2px solid #ef4444 !important;
    background-color: #fff1f2 !important;
    animation: blink-border 1.5s infinite ease-in-out;
}

/* Offcanvas Overlay Fix */
.offcanvas {
    z-index: 3000 !important;
    background-color: var(--bg-surface);
}

.offcanvas-backdrop {
    z-index: 2999 !important;
}

/* ============================================================
   REALTY IQ - FILTROS INTELIGENTES, KANBAN E COMPONENTES
   PARTE 4: SMART VIEWS, PRIORIDADES E PAGINAÇÃO
   ============================================================ */

/* ########## CONTAINER DE ATALHOS INTELIGENTES ########## */
#smart_views_container {
    min-height: 45px;
    padding: 5px 0;
}

/* Estilo para os itens de 'Smart Views' no topo */
#smart_views_container .badge {
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

#smart_views_container .badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    /* Variabilizado: remove rgba fixo */
}

/* Estilo Base da Pílula */
.smart-view-pill {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border) !important;
    /* Variabilizado: remove #e0e0e0 */
    background-color: var(--bg-main) !important;
    /* Variabilizado: remove #f8f9fa */
    color: var(--text-muted) !important;
    /* Variabilizado: remove #6c757d */
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px !important;
    user-select: none;
}

/* Hover: Leve levantamento e sombra */
.smart-view-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
    /* Variabilizado: remove rgba fixo */
    background-color: var(--bg-surface) !important;
    /* Variabilizado: remove #ffffff */
    border-color: var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    color: var(--accent) !important;
}

/* Estado Ativo: Quando o filtro está aplicado */
.smart-view-pill.active {
    background-color: var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    border-color: var(--accent) !important;
    color: var(--white) !important;
    /* Variabilizado: remove #ffffff */
    box-shadow: var(--shadow-md) !important;
}

/* Corrigindo o seletor duplicado do final para manter integridade */
.smart-view-pill.active {
    background-color: var(--accent) !important;
    color: var(--white) !important;
    border: 2px solid var(--accent);
    /* Mantendo a lógica de borda mais grossa no active */
}

.smart-view-pill.active i.fa-star {
    color: #ffc107 !important;
    /* Estrela dourada mantida para destaque visual */
}

/* Botão de Deletar dentro da pílula */
.smart-view-pill .btn-delete-filter {
    margin-left: 8px;
    padding: 2px 5px;
    border-radius: 50%;
    transition: background 0.2s;
    opacity: 0.6;
}

.smart-view-pill .btn-delete-filter:hover {
    background-color: rgba(214, 48, 49, 0.1);
    /* Usando tom de erro suave */
    color: var(--color-financeiro) !important;
    /* Variabilizado: remove #dc3545 */
    opacity: 1;
}

.smart-view-pill.active .btn-delete-filter:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white) !important;
}

/* ########## REALTY IQ - KANBAN DE CHAMADOS ########## */
.chamado-kanban-wrapper {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    gap: 1.5rem;
    padding: 1rem 0;
    align-items: flex-start;
    min-height: calc(100vh - 250px);
}

.chamado-column {
    flex: 0 0 320px !important;
    min-width: 320px !important;
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    /* Adicionado para suporte a temas */
}

.chamado-list {
    padding: 12px;
    min-height: 450px;
    flex-grow: 1;
}

.kanban-card {
    cursor: grab;
    margin-bottom: 12px;
    background: var(--card-bg);
    /* Garante que o card seja reativo */
    border: 1px solid var(--border);
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

.ghost-card {
    opacity: 0.4;
    background: var(--bg-neutral-soft) !important;
    /* Variabilizado: remove #ebecf0 */
    border: 2px dashed var(--accent) !important;
    /* Variabilizado: remove #4c9aff */
}

.count-kanban {
    font-size: 0.65rem;
    vertical-align: middle;
    color: var(--text-muted);
}

/* ########## BADGES DE PRIORIDADE ########## */
.badge-prio {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    padding: 4px 10px;
    letter-spacing: 0.5px;
    border-radius: 50px;
}

/* Ajuste de Contraste para temas escuros nas prioridades */
.prio-urgente {
    background-color: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

.prio-alta {
    background-color: rgba(221, 107, 32, 0.1);
    color: #dd6b20;
    border: 1px solid #fbd38d;
}

.prio-media {
    background-color: rgba(47, 133, 90, 0.1);
    color: #2f855a;
    border: 1px solid #bbf7d0;
}

.prio-baixa {
    background-color: var(--bg-neutral-soft);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Ícone de fogo pulsante para Urgentes */
.prio-urgente i {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.4;
    }
}

/* Animação para o alerta de Urgência */
@keyframes urgent-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.text-blink-red {
    color: #e53e3e;
    animation: urgent-pulse 1s infinite ease-in-out;
    display: inline-block;
}

/* ########## FILTROS DE SIDEBAR (ACTIVE STATES) ########## */
.filter-status.active {
    background-color: var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    color: var(--white) !important;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.filter-status.active i,
.filter-status.active span {
    color: var(--white) !important;
}

.filter-status {
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 2px;
    color: var(--text-link);
}

/* Estilo para Filtro de Setor Ativo na Sidebar */
.filter-setor.active {
    background-color: var(--accent) !important;
    color: var(--white) !important;
    border-radius: 8px;
    font-weight: 600;
}

.filter-setor.active span,
.filter-setor.active i {
    color: var(--white) !important;
}

.filter-setor {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 12px;
    margin-bottom: 2px;
    border: none;
    background: transparent;
    width: 100%;
    color: var(--text-link);
}

/* ########## ULTRA LUXURY MAC DOCK (COLORED & ANIMATED) ########## */

/* 1. CONTAINER COM EFEITO CINEMATOGRÁFICO DE OCULTAÇÃO */
#global-taskbar {
    position: fixed !important;
    bottom: 15px !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    z-index: 99999 !important;
    overflow: visible !important;
    padding-bottom: 0px;
    /* Área magnética invisível para o mouse capturar a subida */

    /* ESTADO ESCONDIDO: Quase todo para baixo, meio transparente e com desfoque chique */
    transform: translateX(-50%) translateY(85%) scale(0.95) !important;
    opacity: 0.3;
    filter: blur(2px);

    /* Curva de física elástica para a subida/descida */
    transition:
        transform 0.45s cubic-bezier(0.25, 1.1, 0.4, 1),
        opacity 0.3s ease,
        filter 0.3s ease !important;
}

/* ESTADO REVELADO: Quando o mouse entra na região do rodapé */
#global-taskbar:hover {
    transform: translateX(-50%) translateY(-10px) scale(1) !important;
    /* Sobe e ganha tamanho real */
    opacity: 1;
    filter: blur(0);
}

/* 2. A PLATAFORMA DE CRISTAL 3D */
#global-taskbar .iq-dock-buttons {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    padding: 12px 25px 8px 25px !important;
    gap: 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative;
}

#global-taskbar .iq-dock-buttons::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 42px;
    background: linear-gradient(to bottom,
            rgba(240, 240, 240, 0.35) 0%,
            rgba(255, 255, 255, 0.2) 15%,
            rgba(255, 255, 255, 0.65) 30%,
            rgba(160, 160, 160, 0.5) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.4) !important;
    transform: perspective(300px) rotateX(40deg);
    transform-origin: bottom center;
    z-index: 1;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border-radius: 6px;
}

body.dark-theme #global-taskbar .iq-dock-buttons::before {
    background: linear-gradient(to bottom,
            rgba(40, 40, 40, 0.4) 0%,
            rgba(255, 255, 255, 0.05) 15%,
            rgba(255, 255, 255, 0.15) 30%,
            rgba(10, 10, 10, 0.75) 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* 3. OS ÍCONES: CORES DE APPS PREMIUM (iOS PALETTE GRADIENTS) */
.btn-dock-item {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    /* Cantos arredondados estilo Squircle Apple */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    /* Ícones internos sempre brancos contrastando com o gradiente */
    font-size: 1.15rem !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    position: relative;
    z-index: 2;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

    /* Efeito de reflexo fino tocando o chão de vidro */
    -webkit-box-reflect: below 6px linear-gradient(transparent 65%, rgba(255, 255, 255, 0.18));

    /* Transição rápida e elástica ao passar o mouse */
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s !important;
    transform-origin: bottom center;
}

/* MAPEAMENTO DE CORES EXCLUSIVAS POR SISTEMA (Grife Apple) */
#btn-dock-notepad {
    background: linear-gradient(135deg, #FF9500, #FF5E3A) !important;
    /* Laranja/Vermelho - Notas */
}

#btn-dock-agenda {
    background: linear-gradient(135deg, #007AFF, #5AC8FA) !important;
    /* Azul Esportivo - Agenda */
}

[onclick*="quickNote"] {
    background: linear-gradient(135deg, #FFCC00, #FF9500) !important;
    /* Amarelo Ouro - Bloco Rápido */
}

#btn-dock-launchpad {
    background: linear-gradient(135deg, #5856D6, #C643FC) !important;
    /* Roxo/Indigo - Launchpad */
}

#btn-dock-contatos {
    background: linear-gradient(135deg, #4CD964, #28CD41) !important;
    /* Verde Maçã - Contatos */
}

#btn-dock-drive {
    background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
    /* Ciano/Azul - Cloud Drive */
}

/* 4. COMPORTAMENTO DE FLUTUAÇÃO (HOVER INDIVIDUAL) */
.btn-dock-item:hover {
    transform: scale(1.35) translateY(-12px);
    /* O ícone cresce e flutua sobre o chão */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Indicador de App Ativo */
.btn-dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px #fff;
    z-index: 3;
}

/* Linha Divisória de Vidro */
.dock-divider {
    width: 1px !important;
    height: 26px !important;
    background: rgba(0, 0, 0, 0.15) !important;
    margin: 0 4px !important;
    align-self: flex-end;
    margin-bottom: 8px;
    z-index: 2;
}

body.dark-theme .dock-divider {
    background: rgba(255, 255, 255, 0.2) !important;
}

.btn-toggle-dock {
    display: none !important;
}

/* ########## REALTY IQ - BARRA DO TOPO (BOTÕES & ATALHOS PARAMETRIZADOS) ########## */
.topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 50px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.topbar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
    filter: brightness(1.08);
}

.topbar-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.topbar-btn i {
    font-size: 11.5px;
}

/* Modificadores Parametrizados por Área Departamental */
.topbar-btn-cliente {
    background-color: #2563eb;
    color: #ffffff !important;
}

.topbar-btn-lead {
    background-color: #10b981;
    color: #ffffff !important;
}

.topbar-btn-imovel {
    background-color: var(--color-imoveis, #00b894);
    color: #ffffff !important;
}

.topbar-btn-placa {
    background-color: #f59e0b;
    color: #1e293b !important;
}

.topbar-btn-locacao {
    background-color: #0284c7;
    color: #ffffff !important;
}

.topbar-btn-corretor {
    background-color: var(--color-rh, #6c5ce7);
    color: #ffffff !important;
}

.topbar-btn-condo {
    background-color: var(--color-condo, #1abc9c);
    color: #ffffff !important;
}

.topbar-btn-reembolso {
    background-color: var(--color-financeiro, #d63031);
    color: #ffffff !important;
}

.topbar-btn-calcleads {
    background-color: #059669;
    color: #ffffff !important;
}

.topbar-btn-calc {
    background-color: #7c3aed;
    color: #ffffff !important;
}

.topbar-btn-ext {
    background: linear-gradient(135deg, #0984e3 0%, #00cec9 100%);
    color: #ffffff !important;
}

.topbar-btn-launchpad {
    background-color: #1e293b;
    color: #ffffff !important;
}

/* Container de atalhos do desktop com scroll suave sem barra */
#container-acoes-desktop {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#container-acoes-desktop::-webkit-scrollbar {
    display: none;
}

/* Legado / Fallback Calculadora Custom */
.btn-calc-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #7c3aed;
    color: var(--white);
    padding: 0 13px;
    height: 32px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-calc-custom:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
}

.btn-calc-custom:active {
    transform: translateY(0);
}

/* ########## PAGINAÇÃO CUSTOMIZADA ########## */
.pagination-wrapper-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    border-top: 1px solid var(--border);
    /* Variabilizado: remove #f0f0f0 */
    border-radius: 0 0 15px 15px;
    width: 100%;
}

.pagination-summary {
    font-size: 14px;
    color: var(--text-muted);
    /* Variabilizado: remove #555 */
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pag-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pag-btn.active {
    background-color: var(--accent);
    /* Variabilizado: remove #007bff */
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.pag-btn.inactive {
    background-color: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    color: var(--text-primary);
    /* Variabilizado: remove #333 */
}

.pag-btn.inactive:hover {
    background-color: var(--border);
    /* Variabilizado: remove #e9ecef */
}

.pag-ellipsis {
    color: var(--border-strong);
    /* Variabilizado: remove #ccc */
    font-weight: bold;
    padding: 0 5px;
}

/* ============================================================
   REALTY IQ - PORTAL CARDS, FUNNEL & TOP DRAWER
   PARTE 5: GESTÃO DE PORTAIS E MÉTRICAS DE CONVERSÃO
   ============================================================ */

/* ########## PORTAL CARDS ########## */
.portal-card {
    transition: transform 0.2s;
    border: 1px solid var(--border-vistas);
    /* Variabilizado: remove rgba(0,0,0,0.05) */
    background: var(--bg-surface);
    /* Garante fundo reativo */
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    /* Adicionado para profundidade reativa */
}

/* Container do Logo Retangular (Definição 1) */
.portal-logo-container {
    width: 100%;
    height: 100px;
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

.portal-logo-container img {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    filter: grayscale(0.2);
}

.btn-edit-inline {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-sidebar-body);
    /* Variabilizado: remove white */
    border: 1px solid var(--border);
    /* Variabilizado: remove #eee */
    color: var(--text-muted);
    /* Variabilizado: remove #6c757d */
    transition: 0.2s;
}

.btn-edit-inline:hover {
    background: var(--accent);
    /* Variabilizado: remove #0d6efd */
    color: var(--white);
    border-color: var(--accent);
}

.badge-info-portal {
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f1f3f5 */
    color: var(--text-main);
    /* Variabilizado: remove #495057 */
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-block;
    margin: 2px;
    font-weight: 500;
}

.edit-mode {
    display: none;
}

/* Oculto por padrão */
.view-mode.hidden {
    display: none;
}

.edit-mode.active {
    display: block;
}

.input-portal-edit {
    font-size: 11px;
    padding: 5px 10px;
    background: var(--bg-input);
    /* Variabilizado: remove #f8f9fa */
    border: 1px solid var(--border);
    /* Variabilizado: remove #eee */
    color: var(--text-primary);
    margin-bottom: 5px;
    border-radius: 8px;
}

/* Switch Customizado */
.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}

/* Redundância mantida conforme original, mas variabilizada */
.badge-info-portal {
    background: var(--bg-neutral-soft);
    color: var(--text-main);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-block;
    margin: 2px;
}

.btn-delete-inline {
    position: absolute;
    top: 15px;
    right: 55px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-sidebar-body);
    /* Variabilizado: remove white */
    border: 1px solid var(--border);
    /* Variabilizado: remove #eee */
    color: var(--color-financeiro);
    /* Variabilizado: remove #dc3545 */
    transition: 0.2s;
    z-index: 10;
}

.btn-delete-inline:hover {
    background: var(--color-financeiro);
    color: var(--white);
    border-color: var(--color-financeiro);
}

/* Classe auxiliar para a busca */
.portal-item.hidden {
    display: none !important;
}

/* Container do Logo (Definição 2 - 80px) */
.portal-logo-container {
    width: 100%;
    height: 80px;
    background: var(--bg-neutral-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.portal-logo-container img {
    max-width: 70%;
    max-height: 60%;
    object-fit: contain;
}

.btn-config-portal {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-config-portal:hover {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
    transform: rotate(45deg);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.chk-capa,
.bg-capa {
    border-color: #e83e8c !important;
    background-color: #e83e8c !important;
}

.chk-capa:checked {
    background-color: #e83e8c !important;
}

/* ########## ESTRUTURA GLOBAL ########## */
/* Nota: Mantive estas variáveis aqui pois estavam no seu snippet original,
   mas elas agora são controladas pelo :root do topo */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 78px;
}

/* 1. ESTRUTURA GLOBAL (Garante que o Flexbox funcione) */
.d-flex.vh-100 {
    display: flex !important;
    overflow: hidden;
}

/* ########## FUNIL DE VENDAS ########## */
#funil-wrapper {
    padding-right: 160px;
    /* Joga o funil para a esquerda para caber a plaquinha */
    padding-left: 20px;
    margin-top: 20px;
    overflow: visible !important;
    /* Vital para as plaquinhas de conversão */
}

#funil-container {
    width: 100%;
    max-width: 600px;
    overflow: visible !important;
}

.funnel-segment {
    position: relative;
    width: 100%;
    height: 90px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
}

/* Elemento com o desenho (clip-path) do funil */
.funnel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: all 0.3s ease;
}

.funnel-segment:hover .funnel-bg {
    filter: brightness(1.1);
    transform: scaleX(1.02);
}

.funnel-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    /* Texto fixo branco para contraste com o fundo colorido */
    text-align: center;
    pointer-events: none;
}

/* Plaquinha de Conversão Lateral */
.conversion-bridge {
    position: absolute;
    right: -140px;
    top: 0;
    background: var(--bg-surface);
    /* Variabilizado: remove #ffffff */
    border: 1px solid var(--border-strong);
    /* Variabilizado: remove #dee2e6 */
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-main);
    /* Variabilizado: remove #343a40 */
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
    /* Variabilizado: remove rgba fixo */
    z-index: 100;
}

.conversion-bridge::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid var(--border-strong);
}

/* Override específico para Temas Escuros no Funil */
body.theme-dark .conversion-bridge {
    background: var(--bg-input);
    /* Tom levemente diferente para destaque */
    border-color: var(--border);
    color: var(--text-soft);
}

/* ########## MENU FLUTUANTE DE ATALHOS (DRAWER) ########## */
#topDrawer {
    transition: margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-sidebar-body) !important;
    /* Garante que o fundo acompanhe o tema */
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1040 !important;
    opacity: 1 !important;
}

#main-container {
    position: relative;
}

/* Estado Escondido */
.drawer-hidden #topDrawer {
    margin-top: -80px;
}

.drawer-hidden #iconDrawer {
    transform: rotate(180deg);
}

@media (max-width: 991px) {
    #container-acoes-desktop {
        display: none !important;
    }
}

#btnToggleDrawer {
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    border-color: var(--border-strong);
    /* Variabilizado: remove #dee2e6 */
    color: var(--text-muted);
    transition: all 0.3s;
}

#btnToggleDrawer:hover {
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    padding-bottom: 5px !important;
    color: var(--accent);
}

/* Garante que o conteúdo da página acompanhe o movimento */
#main-content-wrapper {
    transition: all 0.4s ease;
}

/* ============================================================
   REALTY IQ - INTERACTION UI & NAVIGATION DOCK
   PARTE 6: CONTEXT MENU, TASKBAR, TIMELINE E SELECTS
   ============================================================ */

/* ##### CLICK BOTÃO DIREITO ##### */
/* Menu de Contexto */
#context-menu {
    background: var(--bg-surface);
    /* Variabilizado: remove rgba(255, 255, 255, 0.95) */
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-vistas) !important;
    /* Variabilizado: remove rgba(0,0,0,0.05) */
    z-index: 11000;
    overflow: visible !important;
}

#context-menu .dropdown-item {
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-link);
    /* Variabilizado: remove #444 */
}

#context-menu .dropdown-item:hover {
    background-color: var(--bg-active-blue);
    /* Variabilizado: remove rgba(13, 110, 253, 0.08) */
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    transform: translateX(3px);
}

#context-menu .dropdown-item i {
    width: 20px;
    text-align: center;
}

@keyframes checkPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.check-success-anim {
    animation: checkPulse 0.5s ease-in-out;
    color: #198754 !important;
    /* Verde de confirmação mantido para semântica de sucesso */
}

/* ============================================================
   CENTRAL DE ATALHOS GLOBAL (TASKBAR DOCK)
   Estilização Premium Glassmorphism
   ============================================================ */

.iq-taskbar-dock {
    position: fixed;
    bottom: 20px;
    /* Subi um pouco para não colar no rodapé */
    right: 0px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Suavidade na transição de entrada/saída */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.iq-taskbar-dock.retracted {
    /* Deixa apenas cerca de 50px visíveis (o tamanho do botão da setinha) */
    transform: translateX(calc(100% - 55px));
}

.iq-dock-buttons {
    background: var(--bg-surface);
    /* Variabilizado: remove rgba(255, 255, 255, 0.85) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-tooltip);
    /* Variabilizado: remove rgba(255, 255, 255, 0.4) */
    /* Ajustado para encostar na borda direita */
    border-radius: 50px 0 0 50px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sidebar);
    /* Variabilizado: remove -5px 0 32px rgba(0, 0, 0, 0.1) */
}

.btn-dock-item {
    background: none;
    border: none;
    color: var(--text-link);
    /* Variabilizado: remove #444 */
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-dock-item:hover {
    background: var(--bg-active-blue);
    /* Variabilizado: remove rgba(13, 110, 253, 0.1) */
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    transform: translateY(-3px);
}

.btn-dock-item.active {
    background: var(--accent);
    /* Variabilizado: remove #0d6efd */
    color: var(--white);
    /* Variabilizado: remove #fff */
    box-shadow: var(--shadow-md);
}

.iq-taskbar-dock.retracted #dock-icon-toggle {
    transform: rotate(180deg);
}

.dock-divider {
    width: 1px;
    height: 25px;
    background: var(--border-vistas);
    /* Variabilizado: remove rgba(0, 0, 0, 0.1) */
}

.iq-flyout-panel {
    width: 340px;
    background: var(--bg-surface);
    /* Variabilizado: remove rgba(255, 255, 255, 0.98) */
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-vistas);
    /* Variabilizado: remove rgba(0, 0, 0, 0.08) */
    margin-bottom: 15px;
    box-shadow: var(--shadow-lg);
    /* Variabilizado: remove 0 15px 45px rgba(0, 0, 0, 0.15) */
    overflow: hidden;
    display: none;
    animation-duration: 0.3s;
}

.iq-flyout-panel.show {
    display: block;
    animation: animate__animated animate__fadeInUp animate__faster;
}

.flyout-header {
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    padding: 15px;
    border-bottom: 1px solid var(--border);
    /* Variabilizado: remove #eee */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flyout-body {
    max-height: 420px;
    overflow-y: auto;
    padding: 5px;
}

.flyout-body::-webkit-scrollbar {
    width: 4px;
}

.flyout-body::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

.widget-visit-item {
    padding: 12px 15px;
    border-radius: 12px;
    transition: background 0.2s;
    border-bottom: 1px solid var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f8f8 */
    margin: 2px 5px;
    color: var(--text-main);
}

.widget-visit-item:hover {
    background: var(--bg-active-blue);
}

.widget-visit-item:last-child {
    border-bottom: none;
}

/* ########## SELECT2 & INPUT OVERRIDES ########## */
.select2-search__field {
    display: block !important;
    visibility: visible !important;
    color: var(--text-primary) !important;
    /* Variabilizado: remove #333 */
    background: var(--bg-input) !important;
    /* Variabilizado: remove #fff */
    border: 1px solid var(--border) !important;
    /* Variabilizado: remove #ddd */
}

.select2-container--open {
    z-index: 9999 !important;
    /* Acima do modal */
}

/* Container de Ações para alinhar perfeitamente */
.btn-group-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    /* Espaço uniforme entre botões */
}

/* Botão de Ação Realty Estilizado */
.btn-action-realty {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    /* Variabilizado: remove #e1e8f0 */
    background: var(--bg-surface);
    /* Variabilizado: remove #ffffff */
    color: var(--text-muted);
    /* Variabilizado: remove #4b6584 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

/* Hover específico para cada função (Mantendo cores de marca) */
.btn-action-realty.history:hover {
    background-color: var(--color-adm);
    color: var(--white);
    border-color: var(--color-adm);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.3);
}

.btn-action-realty.calendar:hover {
    background-color: var(--color-imoveis);
    color: var(--white);
    border-color: var(--color-imoveis);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

/* ########## DETAILS PIPELINE & TIMELINE ########## */
.timeline {
    position: relative;
    padding: 20px 0;
    list-style: none;
}

.timeline:before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    border: 3px solid #0d6efd;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 10px;
}

.timeline-icon {
    position: absolute;
    left: 25px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    color: var(--white);
    background: var(--text-muted);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
}

.timeline-container {
    position: relative;
    min-height: 200px;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: block;
}

/* Cores por Tipo (Semânticas) */
.bg-etapa {
    background-color: var(--accent) !important;
}

.bg-visita {
    background-color: var(--color-rh) !important;
}

.bg-proposta {
    background-color: var(--color-imoveis) !important;
}

.bg-pausa {
    background-color: var(--color-marketing) !important;
}

.bg-obs {
    background-color: var(--text-muted) !important;
}

/* ########## ESTILIZAÇÃO PREMIUM PARA SELECTS ########## */
.form-select-realty {
    display: block;
    width: 100%;
    padding: 0.45rem 2rem 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    /* Variabilizado: remove #495057 */
    background-color: var(--bg-input);
    /* Variabilizado: remove #fff */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--border);
    /* Variabilizado: remove #e0e6ed */
    border-radius: 10px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    appearance: none;
    cursor: pointer;
}

.form-select-realty:focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(0, 188, 212, 0.1);
}

/* Fix para o Dropdown de Colunas ficar por CIMA de tudo */
.glass-card {
    position: relative;
    z-index: 1050;
    overflow: visible !important;
}

#columnToggle {
    z-index: 1060;
    border-radius: 15px;
    box-shadow: var(--shadow-lg) !important;
    background-color: var(--bg-surface);
    color: var(--text-main);
}

/* ########## PIPELINE STEPS (CHEVRONS) ########## */
#container_horizontal_pipeline {
    width: 100%;
    margin-bottom: 5px !important;
    padding: 0;
}

.pipeline-steps {
    display: flex;
    width: 100%;
    gap: 2px;
    padding: 0;
    margin: 0;
}

.step-item {
    flex: 1;
    min-width: 0;
    position: relative;
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: var(--border);
    /* Cor neutra padrão para steps inativos */
    color: var(--text-muted);

    /* Clip-path ajustado para um encaixe mais elegante */
    clip-path: polygon(95% 0%, 100% 50%, 95% 100%, 0% 100%, 5% 50%, 0% 0%);
}

.step-item.active {
    background-color: var(--accent);
    color: var(--white);
}

.step-item:first-child {
    clip-path: polygon(95% 0%, 100% 50%, 95% 100%, 0% 100%, 0% 50%, 0% 0%);
    border-radius: 5px 0 0 5px;
}

.step-item:last-child {
    clip-path: polygon(100% 0%, 100% 100%, 0% 100%, 5% 50%, 0% 0%);
    border-radius: 0 5px 5px 0;
}

/* Garante que o container da tabela não corte os menus */
.table-responsive {
    overflow: visible !important;
}

.card {
    overflow: visible !important;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
}



.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--bg-neutral-soft) !important;
    /* Variabilizado: remove #f8f9fa */
    border: none !important;
    border-radius: 0.375rem !important;
    color: var(--text-primary) !important;
}

/* Destaca as abas visitadas */
#modalCliente .nav-pills .nav-link.active {
    background-color: var(--accent);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

#modalCliente .nav-pills .nav-link:not(.active) {
    color: var(--text-muted);
}

.tab-content {
    padding: 20px;
}

/* Efeito de transição suave */
.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pílulas do Select2 Múltiplo */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    padding: 0 5px !important;
    margin: 0 !important;
    list-style: none !important;
    align-items: center !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    color: var(--white) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 2px 10px !important;
    margin: 3px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    background: rgba(255, 255, 255, 0.2) !important;
    /* Variabilizado para ser reativo ao fundo do badge */
    border: none !important;
    color: var(--white) !important;
    margin: 0 5px 0 5px !important;
    padding: 0px 5px !important;
    font-size: 15px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    order: 1;
    border-radius: 30px;
    line-height: 23px;
}

.select2-selection__choice__display {
    padding-left: 2px !important;
    order: 2;
}

.select2-search.select2-search--inline {
    display: inline-flex !important;
    flex-grow: 1 !important;
}

.select2-search__field {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-primary) !important;
}

.select2-dropdown {
    border: 1px solid var(--border-strong) !important;
    /* Variabilizado: remove #dee2e6 */
    box-shadow: var(--shadow-md) !important;
    background-color: var(--bg-surface) !important;
    z-index: 9999 !important;
}

.select2-selection__clear {
    margin-top: 5px !important;
    color: var(--text-muted) !important;
}


/* ============================================================
   REALTY IQ - PROPERTY CARDS & SALES FUNNEL
   PARTE 7: VIEW SWITCHER, CARDS DE IMÓVEIS E FLUXO DE CONVERSÃO
   ============================================================ */

/* ########## 1. VIEW SWITCHER ########## */
.view-toggle-pill {
    background: var(--bg-neutral-soft);
    /* Variabilizado: remove #f1f3f5 */
    padding: 4px;
    border-radius: 50px;
    display: inline-flex;
    gap: 2px;
    border: 1px solid var(--border-strong);
    /* Variabilizado: remove #dee2e6 */
    vertical-align: middle;
}

.view-toggle-pill .btn {
    border: none;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s;
    color: var(--text-muted);
    /* Variabilizado: remove #6c757d */
    background: transparent;
}

.view-toggle-pill .btn.active {
    background: var(--accent) !important;
    /* Variabilizado: remove #007bff */
    color: var(--white) !important;
    box-shadow: var(--shadow-md);
    /* Variabilizado: remove rgba fixo */
}

/* ########## 2. A SOLUÇÃO DO BOTÃO DIREITO (Z-INDEX) ########## */
/* Esta regra força a "gaveta" (coluna) do Bootstrap a ir para a frente */
#listaImoveisCards>div {
    position: relative;
    transition: z-index 0.2s;
}

#listaImoveisCards>div:hover,
#listaImoveisCards>div:focus-within,
#listaImoveisCards>div:has(.show) {
    z-index: 9999 !important;
}

.property-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    /* Adicionado para definição em temas dark */
    border-radius: 20px;
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    height: 100%;
    position: relative;
    overflow: visible !important;
    /* Permite que o menu saia do card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--soft-shadow);
}

.property-card .form-check-input:checked {
    background-color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.3);
}

.property-card .form-check-input {
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--bg-input);
    border-color: var(--border-strong);
}

/* Garante que o conteúdo do card empurre as ações para o fim */
.property-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg) !important;
    /* Variabilizado: remove rgba fixo */
}

/* ########## 3. FOTO 100% SEM BORDAS ########## */
.card-img-container {
    height: 220px;
    width: 100%;
    background-color: var(--bg-main);
    /* Variabilizado: remove #f8f9fa */
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.5s;
}

.property-card:hover .card-img-container img {
    transform: scale(1.08);
}

/* 🚀 Efeito Premium de Zoom na Foto de Capa (Sem desalinhamento) */
.thumb-zoom-wrapper {
    position: relative;
    width: 55px;
    height: 40px;
    margin: 0 auto;
}

.thumb-zoom-img {
    width: 55px;
    height: 40px;
    object-fit: cover;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transform-origin: center center;
}

/* Quando o mouse entra, ela expande 3.5x do tamanho original e ganha profundidade */
.thumb-zoom-wrapper:hover .thumb-zoom-img {
    transform: scale(3.5);
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    border-color: #ffffff !important;
}

/* ########## 4. FAIXA OPORTUNIDADE (GOLD) ########## */
.ribbon-opportunity {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 120px;
    height: 120px;
    overflow: hidden;
    z-index: 20;
}

.ribbon-opportunity span {
    position: absolute;
    display: block;
    width: 180px;
    padding: 6px 0;
    background-color: #ffd700;
    /* Cor de destaque "Gold" mantida por ser universal */
    box-shadow: 0 5px 10px rgba(0, 0, 0, .1);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    right: -45px;
    top: 25px;
    transform: rotate(45deg);
}

/* ########## 5. BADGE STATUS (ATIVO) ########## */
.status-badge-card {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 25;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 0 !important;
}

/* ########## 6. DROPDOWN (MENU) ########## */
.dropdown-menu {
    z-index: 100000 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid var(--border-strong, #cbd5e1) !important;
    background-color: var(--bg-surface) !important;
    background: var(--bg-surface) !important;
    opacity: 1 !important;
    position: absolute !important;
    margin-top: 5px !important;
    color: var(--text-main) !important;
    visibility: visible !important;
    display: none;
}

.dropdown-menu.show {
    display: block !important;
    background-color: var(--bg-surface) !important;
    background: var(--bg-surface) !important;
}

/* ########## 7. CONTEÚDO DO CARD ########## */
.card-body {
    flex-grow: 1;
    padding: 1.25rem !important;
    display: flex;
    flex-direction: column;
    overflow: visible !important;
}

.price-tag {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    letter-spacing: -0.5px;
}

.spec-badge {
    background: var(--bg-main);
    /* Variabilizado: remove #f8f9fa */
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 11px;
    color: var(--text-muted);
    /* Variabilizado: remove #555 */
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    /* Variabilizado: remove #eee */
}

.card-actions-wrapper {
    border-top: 1px solid var(--border-vistas);
    /* Variabilizado: remove rgba fixo */
    padding: 15px 1.25rem;
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    border-radius: 0 0 20px 20px;
    margin-top: auto;
    overflow: visible !important;
}

.img-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    padding: 25px 15px 10px;
    z-index: 5;
}

.img-placeholder {
    color: var(--text-sidebar-icon);
    /* Variabilizado: remove #adb5bd */
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ########## AUTOSAVE E INDICADORES ########## */
.input-autosave:focus {
    border-color: var(--accent);
    box-shadow: none;
}

.input-autosave.is-saving {
    border-color: #ffc107 !important;
    background-color: rgba(255, 193, 7, 0.05);
}

.input-autosave.is-saved {
    border-color: var(--color-imoveis) !important;
    background-color: rgba(0, 184, 148, 0.05);
}

.save-indicator {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: 0.7rem;
    transition: all 0.3s;
    color: var(--text-muted);
}

.x-small {
    font-size: 0.65rem;
}

.bg-light-subtle {
    background-color: var(--bg-main) !important;
}

/* ########## FUNIL DE VENDAS (STEPS) ########## */
.funnel-step-flow {
    position: relative;
    gap: 5px;
}

.step-arrow {
    flex: 1;
    background: var(--accent);
    /* Variabilizado: remove #4e73df */
    color: var(--white);
    padding: 12px 20px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%, 10% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: 0.3s;
}

.step-arrow:first-child {
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
}

.step-arrow.success {
    background: var(--color-imoveis);
}

/* Variabilizado: remove #198754 */
.step-arrow:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.conversion-rate-pill {
    background: var(--bg-surface);
    /* Variabilizado: remove #f8f9fa */
    border: 1px solid var(--border);
    /* Variabilizado: remove #eee */
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 13px;
    color: var(--text-main);
    /* Variabilizado: remove #2c3e50 */
    box-shadow: var(--shadow-soft);
}

/* ########## CARDS DE ESFORÇO ########## */
.effort-card {
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    border: 1px solid var(--border);
    /* Variabilizado: remove #f0f0f0 */
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.effort-card h2 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    color: var(--text-main);
    /* Variabilizado: remove #2c3e50 */
}

.effort-card label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* ########## SETAS DE FLUXO (CHEVRONS) ########## */
.conversion-flow-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 0;
}

.step-chevron {
    flex: 1;
    height: 50px;
    background: var(--accent);
    /* Variabilizado: remove #4e73df */
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    position: relative;
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%, 10% 50%);
    transition: 0.3s;
}

.step-chevron:first-child {
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
}

.step-chevron.venda {
    background: var(--color-imoveis);
    /* Variabilizado: remove #198754 */
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 10% 50%);
}

.conv-pill {
    background: var(--bg-surface);
    /* Variabilizado: remove #f8f9fa */
    border: 2px solid var(--white);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    /* Variabilizado: remove #2c3e50 */
    font-weight: 900;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 50px;
    z-index: 10;
    margin: 0 -15px;
    /* Sobrepõe levemente as setas */
}

/* ########## BOX DE ESFORÇO ########## */
.effort-box {
    background: var(--bg-surface);
    /* Variabilizado: remove #fdfdfd */
    border: 1px solid var(--border);
    /* Variabilizado: remove #f0f0f0 */
    border-radius: 16px;
    padding: 20px;
    transition: 0.3s;
}

.effort-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.effort-box label {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    /* Variabilizado: remove #4e73df */
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.effort-box h2 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    color: var(--accent);
    /* Variabilizado: remove #224abe */
}

.corretor-info-box {
    border-left: 4px solid var(--color-rh);
    /* Variabilizado: remove #6f42c1 */
    padding-left: 10px;
    margin: 5px 0;
    line-height: 1.2;
    text-align: left;
}

.equipe-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    /* Variabilizado: remove #6c757d */
    display: block;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.corretor-nome {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    /* Variabilizado: remove #2d3436 */
    display: block;
}

/* Fundo suave para destacar células críticas */
.bg-critical-discount {
    background-color: rgba(220, 53, 69, 0.08) !important;
    /* Cor de alerta financeiro */
    border-radius: 4px;
}

.text-xs-muted {
    font-size: 10px;
    color: var(--text-sidebar-icon);
    /* Variabilizado: remove #a0a0a0 */
}

.hover-primary:hover {
    color: var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    text-decoration: underline !important;
}

/* ########## BADGES DE ORIGEM ########## */
.badge-origem {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    /* Garante alinhamento em temas com borda */
}

/* Aplicando as Variáveis Semânticas */
.bg-soft-purple {
    background-color: var(--bg-lead-insta) !important;
    color: var(--text-lead-insta) !important;
}

.bg-soft-blue {
    background-color: var(--bg-lead-site) !important;
    color: var(--text-lead-site) !important;
}

.bg-soft-orange {
    background-color: var(--bg-lead-portal) !important;
    color: var(--text-lead-portal) !important;
}

.bg-soft-teal {
    background-color: var(--bg-lead-indica) !important;
    color: var(--text-lead-indica) !important;
}

.bg-soft-gray {
    background-color: var(--bg-lead-outros) !important;
    color: var(--text-lead-outros) !important;
}

/* ########## TEMPERATURA DO LEAD ########## */
.temp-quente {
    color: var(--color-temp-hot);
    text-shadow: 0 0 8px rgba(255, 71, 87, 0.3);
}

.temp-morno {
    color: var(--color-temp-warm);
}

.temp-frio {
    color: var(--color-temp-cold);
    opacity: 0.8;
}

/* ########## CRONÔMETRO DE INATIVIDADE ########## */
.timer-warning {
    background-color: var(--bg-timer-warn);
    color: var(--text-timer-warn);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.timer-danger {
    background-color: var(--bg-timer-danger);
    color: var(--text-timer-danger);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ########## HOVERS E LINKS ########## */
#listaClientes a.text-info:hover {
    color: var(--accent) !important;
    text-decoration: underline !important;
}

/* Estilo para a linha do favorito */
.bg-light-yellow {
    background-color: var(--bg-timer-warn) !important;
    /* Reutilizando cor de alerta suave */
    opacity: 0.9;
}

/* ============================================================
   REALTY IQ - SERASA, GAUGE & PROPOSTAS (VARIABILIZADO)
   PARTE 8: ANÁLISE DE CRÉDITO E HISTÓRICO DE ARQUIVOS
   ============================================================ */

/***** MODAL SERASA *****/
/* Ajuste das Abas */
#modalSerasa .nav-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    opacity: 0.7;
    color: var(--text-muted);
}

#modalSerasa .nav-tabs .nav-link.active {
    background-color: var(--bg-surface);
    /* Variabilizado: remove #fff */
    color: var(--accent);
    opacity: 1;
    border-bottom: 2px solid var(--bg-surface) !important;
}

#modalSerasa .nav-tabs .nav-link:hover {
    opacity: 1;
    background-color: var(--bg-neutral-soft);
    /* Variabilizado: remove rgba fixo */
}

/* Ajuste das Tabelas de Dívidas */
.table-serasa {
    font-size: 0.85rem;
}

.table-serasa th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.table-serasa td {
    vertical-align: middle;
    color: var(--text-main);
}

/* Fundo leve para restrições (Reativo ao tema) */
.table-serasa .bg-restricao {
    background-color: rgba(214, 48, 49, 0.05);
    /* Usando tom de erro do tema */
}

/* --- CSS do Gauge do Score (Estilo Print 2) --- */
.serasa-score-container {
    position: relative;
    width: 160px;
    height: 80px;
    margin: 0 auto;
    overflow: hidden;
}

.serasa-score-gauge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    border-radius: 50%;
    border: 12px solid var(--bg-gauge-track);
    /* Variabilizado: remove #e0e0e0 */
    border-bottom-color: transparent !important;
    border-left-color: transparent !important;
    transform: rotate(45deg);
    transition: transform 1s ease-out;
}

/* Cores do Preenchimento (Reativas via Variáveis) */
.score-range-1 {
    border-top-color: var(--score-low);
    border-right-color: var(--score-low);
}

.score-range-2 {
    border-top-color: var(--score-med);
    border-right-color: var(--score-med);
}

.score-range-3 {
    border-top-color: var(--score-good);
    border-right-color: var(--score-good);
}

.score-range-4 {
    border-top-color: var(--score-high);
    border-right-color: var(--score-high);
}

.serasa-score-value {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--text-primary);
}

/* ########## BOX DE TEXTO CONTRAPROPOSTA ########## */
.form-control-realty-prop {
    width: 100% !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-list) !important;
    /* Variabilizado: remove #e0e5f2 */
    padding: 12px 15px !important;
    background-color: var(--bg-input) !important;
    /* Variabilizado: remove #f8fafc */
    color: var(--text-primary) !important;
    transition: all 0.2s ease-in-out !important;
    font-size: 0.95rem !important;
    resize: none;
}

.form-control-realty-prop:focus {
    background-color: var(--bg-surface) !important;
    border-color: var(--brand-suporte) !important;
    /* Variabilizado para cor de atenção/amarelo */
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.15) !important;
    outline: none !important;
}

.form-label-custom {
    display: block !important;
    margin-bottom: 8px !important;
    color: var(--text-muted) !important;
    /* Variabilizado: remove #4a5568 */
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ########## PIPELINE & HISTÓRICO ########## */
.pipeline-historico {
    max-height: 2000px;
    overflow: auto !important;
}

#lista_arquivos {
    border: 1px solid var(--border-list);
    /* Variabilizado: remove #e0e5f2 */
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-surface);
}

#lista_arquivos .bg-light {
    background-color: var(--bg-file-header) !important;
    /* Variabilizado: remove #f8fafc */
    letter-spacing: 0.5px;
    font-size: 10px !important;
    border-top: 1px solid var(--border);
    /* Variabilizado: remove #eef2f7 */
    color: var(--text-muted);
}

#lista_arquivos .list-group-item:last-child {
    border-bottom: 0 !important;
}

#lista_arquivos div:first-child {
    border-top: 0 !important;
}

/* ########## BADGE DE CONCORRÊNCIA (PULSE) ########## */
.bg-warning.shadow-sm {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* ########## PROPOSTAS ACEITAS ########## */
.row-proposta-aceita {
    background-color: var(--bg-accepted-row) !important;
    /* Variabilizado: remove #e8f5e9 */
    transition: background-color 0.3s ease;
}

.row-proposta-aceita td {
    border-color: var(--border-accepted-row) !important;
    /* Variabilizado: remove #c8e6c9 */
    color: var(--text-primary);
}

/* ============================================================
   REALTY IQ - INTERACTIVE COMPONENTS & MULTI-PIPELINE
   PARTE 9: TABS, MAPS, CHECKLISTS E KANBAN LABELS
   ============================================================ */

/* ########## CUSTOM TAB STYLES ########## */
/* Transforma as abas em uma linha única com rolagem */
.nav-tabs-custom {
    display: flex !important;
    flex-wrap: nowrap !important;
    /* Impede de encavalar */
    overflow-x: auto;
    /* Ativa o scroll horizontal */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* Suaviza no iOS */
    white-space: nowrap;
    padding-bottom: 5px;
    /* Espaço para não cortar a sombra/borda ativa */
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid var(--border);
    /* Variabilizado */
}

/* Esconde a barra de rolagem para um visual mais "clean" */
.nav-tabs-custom::-webkit-scrollbar {
    display: none;
}

/* Garante que os itens não encolham */
.nav-tabs-custom .nav-item {
    flex: 0 0 auto;
}

.nav-tabs-custom:active {
    cursor: grabbing;
}

.nav-tabs-custom .nav-link {
    border: none;
    border-radius: 12px 12px 0 0 !important;
    /* Arredonda apenas o topo */
    padding: 10px 20px;
    font-weight: 600;
    color: var(--text-muted);
    /* Variabilizado: remove #6c757d */
    background-color: var(--bg-neutral-soft);
    /* Variabilizado: remove #f8f9fa */
    transition: all 0.3s ease;
    margin-bottom: -2px;
    /* Encosta na linha de base */
}

.nav-tabs-custom .nav-link:hover {
    background-color: var(--border);
    /* Variabilizado: remove #e9ecef */
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
}

.nav-tabs-custom .nav-link.active {
    background-color: var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    color: var(--white) !important;
    /* Variabilizado: remove white */
    position: relative;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    /* Sombra suavizada reativa */
}

/* Criando o efeito de conexão com a linha de baixo */
.nav-tabs-custom .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.iq-tabs-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Oculta no Firefox */
    cursor: grab;
    /* 🌟 Pista visual: Mãozinha aberta indicando arraste */
    user-select: none;
    padding-right: 50px;
    /* Dá espaço para a aba cortada respirar */
}

.iq-tabs-scroll-container:active {
    cursor: grabbing;
    /* 🌟 Mãozinha fechada ao arrastar */
}

.iq-tabs-scroll-container::-webkit-scrollbar {
    display: none;
    /* Oculta no Chrome/Safari/Edge */
}

.card-header {
    position: relative;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

/* Remoção definitiva de qualquer efeito de fade/esfumaçado em card-header em todo o CRM */
.card-header::after,
.card-header::before {
    display: none !important;
    content: none !important;
}

/* ########## MAPS & ALERTS ########## */
.realt-iq-map {
    filter: grayscale(0.1) contrast(1.1);
    transition: filter 0.3s ease;
    border: 1px solid var(--border);
}

.realt-iq-map:hover {
    filter: grayscale(0) contrast(1);
}

/* Animação de pulso para quando o número está faltando */
.map-pulse-warning {
    border: 2px solid var(--color-marketing) !important;
    /* Variabilizado: remove #ffc107 */
    animation: pulse-border-yellow 2s infinite;
}

@keyframes pulse-border-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* ########## MULTI-PIPELINE MODAL ARCHITECTURE ########## */
/* Container do Modal - Força colunas iguais e remove scrolls internos */
#modalMultiPipelineCard .modal-body {
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
    background-color: var(--bg-surface);
}

/* Coluna Lateral Cinza - Blindada */
#modalMultiPipelineCard .col-sidebar-cv {
    background-color: var(--bg-neutral-soft) !important;
    /* Variabilizado: remove #f1f3f5 */
    border-left: 1px solid var(--border);
    /* Variabilizado: remove #dee2e6 */
    display: flex;
    flex-direction: column;
}

/* Scroll Global da Lateral */
#modalMultiPipelineCard .sidebar-scroll-area {
    overflow-y: auto;
    flex: 1;
    max-height: 75vh;
}

/* Estilo dos itens de arquivo */
.arq-item-lista {
    transition: all 0.2s;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
}

.arq-item-lista:hover {
    background-color: var(--bg-main) !important;
    /* Variabilizado: remove #f8f9fa */
    transform: translateX(3px);
}

/* Scrollbar discreto para a lateral */
#modalMultiPipelineCard .sidebar-scroll-area::-webkit-scrollbar {
    width: 5px;
}

#modalMultiPipelineCard .sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    /* Variabilizado: remove #ccc */
    border-radius: 10px;
}

/* ########## CHECKLIST STYLE (TRELLO LIKE) ########## */
#modalMultiPipelineCard .item-checklist-row {
    cursor: grab;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

#modalMultiPipelineCard .item-checklist-row:active {
    cursor: grabbing;
}

/* Estilo da alça de arraste do checklist */
#modalMultiPipelineCard .checklist-handle {
    font-size: 10px;
    letter-spacing: -2px;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: var(--text-muted);
}

#modalMultiPipelineCard .item-checklist-row:hover .checklist-handle {
    opacity: 1;
}

/* Feedback visual do SortableJS (Drag & Drop) */
#modalMultiPipelineCard .sortable-ghost {
    opacity: 0.3;
    border: 1px dashed var(--accent) !important;
    /* Variabilizado: remove #0d6efd */
    background-color: var(--bg-neutral-soft) !important;
    /* Variabilizado: remove #f1f3f5 */
}

#modalMultiPipelineCard .sortable-chosen {
    box-shadow: var(--shadow-md) !important;
    /* Variabilizado: remove rgba fixo */
}

/* Barra de Progresso do Checklist */
#modalMultiPipelineCard .progress {
    background-color: var(--border);
    border-radius: 50px;
}

#modalMultiPipelineCard .progress-bar {
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Cores da barra (Estilo Semântico) */
#modalMultiPipelineCard .progress-bar.bg-success {
    background-color: var(--color-imoveis) !important;
    /* Variabilizado: remove #28a745 */
}

#modalMultiPipelineCard .progress-bar.bg-warning {
    background-color: var(--brand-suporte) !important;
    /* Variabilizado: remove #ffc107 */
}

/* Item riscado quando marcado */
#modalMultiPipelineCard .item-checklist-row.checked input[type="text"] {
    text-decoration: line-through;
    opacity: 0.6;
    color: var(--text-muted) !important;
    /* Variabilizado: remove #6c757d */
}

/* ============================================================
   REALTY IQ - FLOATING WINDOWS, NOTEPAD PRO & PERMISSIONS
   PARTE 10: COMPONENTES AVANÇADOS E REGRAS DE CONTEXTO
   ============================================================ */

/* ########## CONTAINER DO ITEM QUE TEM SUBMENU ########## */
.dropdown-submenu {
    position: relative !important;
}

/* O Submenu (O container técnico agora ENCOSTA no pai) */
.dropdown-submenu .submenu {
    display: none !important;
    position: absolute;
    top: 0;
    /* Move o início técnico para um pouco ANTES do fim do menu pai para garantir overlap */
    left: 95%;
    z-index: 10000;
    margin-top: -10px;

    /* 1. DISTÂNCIA VISUAL: O padding cria o buraco que você vê,
       mas a div .submenu continua ocupando esse espaço tecnicamente */
    padding-left: 0px;
    min-width: 250px;
}

/* 2. A PONTE DE SEGURANÇA (Blindagem total do vão) */
.dropdown-submenu .submenu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    /* Largura suficiente para cobrir todo o padding e um pouco mais */
    width: 40px;
    height: 100%;
    background: transparent;
    /* Invisível, mas funcional */
}

/* Mostra o container ao passar o mouse no item pai */
.dropdown-submenu:hover>.submenu {
    display: block !important;
}

/* 3. O BALÃO VISUAL (O que o usuário vê) */
.submenu-inner {
    background: var(--bg-surface) !important;
    /* Variabilizado: remove #fff */
    border: 1px solid var(--border-vistas) !important;
    /* Variabilizado: remove rgba(0,0,0,0.12) */
    border-radius: 14px !important;
    box-shadow: var(--shadow-lg) !important;
    /* Variabilizado: remove 0 10px 40px rgba(0,0,0,0.2) */
    padding: 8px !important;
    overflow: hidden;
}

/* --- SUPORTE AO LADO ESQUERDO (DROP-LEFT) --- */
#context-menu.drop-left .submenu {
    left: auto !important;
    right: 95% !important;
    padding-left: 0 !important;
    padding-right: 30px !important;
}

#context-menu.drop-left .submenu::before {
    left: auto;
    right: 0;
}

/* ########## SISTEMA DE PERMISSÕES ########## */
.parent-permission-block {
    background-color: var(--bg-active-blue) !important;
    /* Variabilizado: remove #edf6ff */
    border: 1px solid var(--border-tooltip);
    /* Variabilizado: remove #d0e5ff */
}

.permission-card {
    transition: all 0.3s ease;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
}

.permission-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.marcar-todos-link {
    color: var(--accent);
    /* Variabilizado: remove #0d6efd */
    text-decoration: none;
    font-size: 12px;
}

.marcar-todos-link:hover {
    text-decoration: underline;
}

.x-small {
    font-size: 11px;
}

.transition-all {
    transition: all 0.3s ease-in-out !important;
}

.btn-help-portal {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-help-portal:hover {
    transform: scale(1.1);
    color: #0284c7;
    background: #f0f9ff;
    border-color: #bae6fd;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2);
}

/* ########## GERENCIADOR DE JANELAS FLUTUANTES ########## */
#realty-floating-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 9999;
    pointer-events: none;
}

.realty-window {
    position: absolute;
    width: 500px;
    height: 600px;
    background: var(--bg-surface);
    /* Variabilizado: remove #fff */
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    /* Variabilizado: remove 0 15px 50px rgba(0,0,0,0.2) */
    display: flex;
    flex-direction: column;
    pointer-events: all;
    border: 1px solid var(--border-strong);
    /* Variabilizado: remove #ddd */
    overflow: hidden;
    animate__animated animate__zoomIn animate__faster;
}

.realty-window-header {
    padding: 12px 16px;
    background: var(--bg-header-dark);
    /* Variabilizado: remove #2d3748 */
    color: var(--white);
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.realty-window-controls button {
    background: none;
    border: none;
    color: var(--white);
    margin-left: 10px;
    font-size: 14px;
    opacity: 0.7;
    transition: 0.2s;
}

.realty-window-controls button:hover {
    opacity: 1;
}

.realty-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background-color: var(--bg-surface);
}

.realty-window.minimized {
    height: 45px !important;
    width: 350px !important;
    overflow: hidden;
}

.realty-window.minimized .realty-window-body {
    display: none;
}

.realty-window.maximized {
    top: 0 !important;
    left: var(--sidebar-total-width) !important;
    /* Ajuste dinâmico conforme largura da sidebar */
    width: calc(100vw - var(--sidebar-total-width)) !important;
    height: 100vh !important;
}

/* Alinhamento horizontal dos controles */
.realty-window-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.realty-window-controls button {
    margin-left: 0;
    padding: 2px 5px;
    line-height: 1;
}

/* Handle de redimensionamento do jQuery UI */
.ui-resizable-handle {
    background: transparent;
}

.ui-resizable-se {
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    cursor: nwse-resize;
}

/* ########## ALERTAS DE TABELA ########## */
.table-danger-light {
    background-color: rgba(220, 53, 69, 0.08) !important;
    /* Variabilizado: remove #fff0f0 */
    border-left: 4px solid var(--color-financeiro) !important;
    /* Variabilizado: remove #dc3545 */
}

/* Ajuste para não sobrepor o hover */
.table-hover tbody tr.table-danger-light:hover {
    background-color: rgba(220, 53, 69, 0.12) !important;
}

/* ########## CONVERSÃO DE MODAL PARA ABA (EDIÇÃO) ########## */
/* 1. Reset apenas para o Modal principal de Cliente virar uma Aba */
#tab-editar #modalCliente {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

/* 2. ESCONDER QUALQUER OUTRO MODAL que venha no arquivo */
#tab-editar .modal:not(#modalCliente) {
    display: none !important;
}

/* 3. Ajuste de layout para o Modal principal */
#tab-editar #modalCliente .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
}

#tab-editar #modalCliente .modal-content {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 4. Esconde o cabeçalho e o botão de fechar */
#tab-editar #modalCliente .modal-header {
    display: none !important;
}

/* 5. ESCONDE O HISTÓRICO/ANOTAÇÕES */
#tab-editar #containerAnotacoes {
    display: none !important;
}

/* 6. FAZ O FORMULÁRIO OCUPAR 100% */
#tab-editar .col-md-7 {
    width: 100% !important;
    flex: 0 0 100% !important;
    border: none !important;
    padding-right: 0 !important;
}

/* 7. Ajuste no Rodapé */
#tab-editar #modalCliente .modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 20px 0 0 0 !important;
    margin-top: 20px !important;
}

#tab-editar #modalCliente .modal-footer .btn-secondary {
    display: none !important;
}

.nav-item-details {
    margin-left: 5px !important;
}

/* ============================================================
   REALTY IQ - NOTEPAD PRO (VERSÃO DEFINITIVA VARIABILIZADA)
   ============================================================ */

/* 1. CONTAINER PRINCIPAL E ESTADOS */
#notepad-window.realty-window {
    position: fixed !important;
    z-index: 10005 !important;
    margin: 0 !important;
    background: var(--bg-surface) !important;
    /* Variabilizado: remove #fff */
    min-width: 400px;
    min-height: 350px;
    box-shadow: var(--shadow-lg) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-vistas) !important;
}

/* Garante que o cabeçalho seja a área de clique para arrastar */
.notepad-header {
    cursor: move;
    user-select: none;
    background: var(--bg-header-dark);
    color: var(--white);
    padding: 10px 15px;
}

/* Previne bugs durante o arraste */
#notepad-window.ui-draggable-dragging {
    transition: none !important;
    transform: none !important;
}

/* Estado Minimizado */
#notepad-window.minimized {
    height: 42px !important;
    width: 280px !important;
    min-height: 0 !important;
    top: auto !important;
    bottom: 20px !important;
    left: 80px !important;
    transform: none !important;
}

#notepad-window.minimized .notepad-tabs-bar,
#notepad-window.minimized #notepad-toolbar,
#notepad-window.minimized #notepad-search-bar,
#notepad-window.minimized .realty-window-body,
#notepad-window.minimized .notepad-status-bar {
    display: none !important;
}

/* Estado Maximizado */
#notepad-window.maximized {
    top: 0 !important;
    left: var(--sidebar-tabs-width) !important;
    width: calc(100vw - var(--sidebar-tabs-width)) !important;
    height: 100vh !important;
    transform: none !important;
}

/* 2. BARRA DE ABAS E EDIÇÃO */
.notepad-tabs-bar {
    height: 35px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--bg-file-header);
    /* Variabilizado: remove #f8fafc */
    border-bottom: 1px solid var(--border);
}

.notepad-tabs-bar::-webkit-scrollbar {
    display: none;
}

.notepad-tabs-bar .nav-link {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 15px;
    border: none !important;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid var(--border) !important;
    display: flex;
    align-items: center;
    height: 100%;
}

.notepad-tabs-bar .nav-link.active {
    background: var(--bg-surface) !important;
    color: var(--accent) !important;
    border-bottom: 2px solid var(--accent) !important;
}

.notepad-tabs-bar .btn-close-tab {
    font-size: 8px;
    margin-left: 8px;
    opacity: 0.5;
    transition: 0.2s;
}

.notepad-tabs-bar .btn-close-tab:hover {
    opacity: 1;
    color: var(--color-financeiro);
}

.notepad-edit-input {
    border: 1px solid var(--accent) !important;
    background: var(--bg-surface) !important;
    padding: 0 5px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--accent) !important;
    width: 100px !important;
    outline: none !important;
    border-radius: 4px !important;
}

/* 3. TOOLBAR E BUSCA */
#notepad-toolbar {
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--bg-file-header);
    padding: 2px 5px;
}

#notepad-toolbar button i {
    font-size: 12px;
    color: var(--text-muted);
}

#notepad-toolbar button:hover i {
    color: var(--accent);
}

#notepad-search-bar {
    animation: fadeInDown 0.2s;
    background: var(--bg-file-header);
    border-bottom: 1px solid var(--border);
}

/* 4. ÁREA DO EDITOR E NÚMEROS DE LINHA */
.realty-window-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: var(--bg-surface);
}

#notepad-line-numbers {
    width: 55px !important;
    background-color: var(--bg-gauge-track);
    /* Variabilizado: remove #f0f0f0 */
    color: var(--text-sidebar-icon);
    text-align: right;
    padding: 12px 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.42;
    border-right: 1px solid var(--border-strong);
    overflow: hidden;
    user-select: none;
    flex-shrink: 0;
}

#notepad-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#notepad-editor {
    flex: 1;
    border: none !important;
    background-color: var(--bg-surface);
}

/* Customização Quill */
.ql-container.ql-snow {
    border: none !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ql-editor {
    flex: 1;
    overflow-y: auto !important;
    padding: 12px 15px !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.42;
    height: auto !important;
    color: var(--text-primary);
}

/* Scrollbar Bonito para o Editor */
.ql-editor::-webkit-scrollbar {
    width: 8px;
}

.ql-editor::-webkit-scrollbar-track {
    background: var(--bg-main);
}

.ql-editor::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

.ql-editor::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.ql-snow.ql-toolbar select.ql-background,
.ql-snow.ql-toolbar select.ql-color {
    width: 28px !important;
    margin-right: 4px;
}

/* Estilo do botão de Link quando ativo */
.ql-snow.ql-toolbar button.ql-active {
    color: var(--accent) !important;
}

.ql-snow.ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--accent) !important;
}

.ql-find-result {
    background-color: var(--brand-suporte);
    /* Variabilizado: remove #ffeb3b */
    border-bottom: 2px solid var(--accent);
}

/* 5. RODAPÉ E AUXILIARES */
.notepad-status-bar {
    padding: 2px 15px;
    font-size: 10px;
    background: var(--bg-file-header);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.nav-link-modern-sub:hover::after,
.nav-link-modern-sub:hover::before {
    z-index: 100010 !important;
}

.notepad-rebaixado {
    z-index: 10 !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-warning-incomplete {
    background-color: rgba(253, 126, 20, 0.08) !important;
    /* Variabilizado: remove #fff4e6 */
    border-left: 4px solid var(--color-marketing) !important;
    /* Variabilizado: remove #fd7e14 */
}

.table-hover tbody tr.table-warning-incomplete:hover {
    background-color: rgba(253, 126, 20, 0.12) !important;
}

/* 1. Garante que submenus aninhados abram para a esquerda se o pai for drop-left */
#context-menu.drop-left .dropdown-submenu .submenu {
    left: auto !important;
    right: 100% !important;
    margin-right: 5px;
}

/* 2. REMOVA qualquer overflow que esteja cortando o menu */
#ctx-portais-list,
.submenu,
.submenu-inner {
    overflow: visible !important;
}

/* 3. Garante que o 3º nível fique acima de tudo */
.portal-item .submenu {
    z-index: 1100 !important;
}

/* ########## AJUSTES DE ACESSIBILIDADE E TEMAS ESPECÍFICOS ########## */

/* Windows 3.1 - Efeito Bevel e Remoção de Sombras */
body.theme-win31 .realty-window,
body.theme-win31 .submenu-inner,
body.theme-win31 .notepad-edit-input {
    border: 2px solid !important;
    border-color: #fff #808080 #808080 #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.theme-win31 .realty-window-header,
body.theme-win31 .notepad-header {
    background-color: #000080 !important;
    /* Navy clássico */
}

/* Alto Contraste - Força Bordas Neon */
body.theme-high-contrast .realty-window,
body.theme-high-contrast .submenu-inner {
    border: 2px solid #00ff00 !important;
    box-shadow: none !important;
}

/* ============================================================
    REALTY IQ - TALENT POOL
    PARTE 11: KANBAN, TALENT POOL, PORTAL e ENTREVISTAS
    ============================================================ */
/* Animação para candidatos parados (Aging) */
.aging-alert {
    animation: pulse-warning 2s infinite;
    border: 2px solid #ffc107 !important;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Zona de Descarte Rápido (Drop Zone) */
#drop-zone-discard {
    position: fixed;
    bottom: -100px;
    /* Escondido fora da tela */
    left: 0;
    width: 100%;
    /* Largura total */
    min-height: 150px !important;
    height: 200px;
    /* Mais baixo, menos intrusivo */
    background: rgba(220, 53, 69, 0.6);
    /* Vermelho translúcido */
    color: white;
    backdrop-filter: blur(5px);
    /* Efeito de vidro borrado Sênior */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Animação suave */
    z-index: 10000;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    /* Começa invisível */
    pointer-events: none;
    visibility: hidden;
}

/* Quando um card está sendo arrastado */
#drop-zone-discard.active {
    bottom: 0;
    /* Sob para o rodapé */
    opacity: 1;
    /* Fica visível */
    pointer-events: all;
    visibility: visible;
}

/* Quando o card é arrastado EXATAMENTE sobre a zona */
#drop-zone-discard.drag-over {
    background: rgba(167, 29, 42, 1);
    /* Vermelho mais escuro e sólido */
    height: 70px;
    /* Pequeno feedback de aumento de altura */
    font-size: 16px;
    /* Feedback no texto */
}

/* Tags de Competência */
.tag-pill {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.kanban-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    min-height: 75vh;
    align-items: flex-start;
}

.kanban-container>.kanban-column,
.talent-pool-container .kanban-column {
    min-width: 320px;
    width: 320px;
    flex-shrink: 0;
    background: var(--card-bg, #f8f9fa);
    border-radius: 16px;
    border: 1px solid var(--border, #e9ecef);
}

.kanban-list {
    min-height: 450px;
    padding: 10px;
}

.kanban-card {
    cursor: grab;
    transition: all 0.2s;
    border-left: 4px solid #ddd;
    margin-bottom: 10px;
}

.ghost-card {
    opacity: 0.3;
    background: #e9ecef !important;
    border: 2px dashed #6c757d !important;
}

/* Efeito de Card Dourado */
.top-talent-card {
    border: 2px solid #FFD700 !important;
    /* Dourado */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4) !important;
    background: linear-gradient(to right, #ffffff, #fffdf0) !important;
}

/* Badge de Ouro */
.badge-gold {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #fff;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estrela Pulsante para o Top Talent */
.top-talent-card .fa-star {
    animation: pulse-star 2s infinite;
}

@keyframes pulse-star {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


.header-arrow-icon {
    transition: transform 0.25s ease-in-out;
}

/* Quando o pai estiver aberto (aria-expanded="true"), gira em 180 graus */
[aria-expanded="true"] .header-arrow-icon {
    transform: rotate(180deg);
}

/* ============================================================
   19. REALTY DRIVE
   ============================================================ */

/* --- 19.1 Header e Barra Superior --- */
#drive-header-bar {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    background: linear-gradient(135deg, #0984E3 0%, #0652DD 100%) !important;
    color: #ffffff !important;
}

#drive-header-bar * {
    color: #ffffff;
}

#drive-breadcrumb {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.7);
}

#drive-breadcrumb .breadcrumb-item,
#drive-breadcrumb .breadcrumb-item a,
#drive-breadcrumb .breadcrumb-item.active,
#drive-breadcrumb li {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

#drive-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7) !important;
}

#drive-search {
    color: #ffffff !important;
    background: transparent !important;
}

#drive-search::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

#drive-search:focus {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
}

/* Modal Visualizador de Mídia */
#modalVisualizadorMedia .modal-header,
#modalVisualizadorMedia .modal-header h6,
#modalVisualizadorMedia #media-titulo,
#modalVisualizadorMedia #media-contador,
#modalVisualizadorMedia .modal-header a,
#modalVisualizadorMedia .modal-header button {
    color: #ffffff !important;
}

#modalVisualizadorMedia #media-contador {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

/* --- 19.2 Sidebar e Estrutura Base --- */
.cursor-pointer {
    cursor: pointer;
}

.drive-sidebar {
    width: 250px;
    min-width: 250px;
    /* Impede o Flexbox de esmagar o menu */
    transition: all var(--transition-speed) ease;
    /* Variabilizado */
}

/* Quando o JS adicionar a classe "collapsed", o menu encolhe */
.drive-sidebar.collapsed {
    width: 70px !important;
    min-width: 70px !important;
}

/* Esconde o texto quando estiver colapsado */
.drive-sidebar.collapsed .menu-text {
    display: none;
}

/* Centraliza os ícones no modo colapsado */
.drive-sidebar.collapsed .drive-menu-item {
    text-align: center;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Tira a margem do ícone para ele ficar centralizado perfeito */
.drive-sidebar.collapsed .drive-menu-item i {
    margin-right: 0 !important;
    font-size: 1.3rem;
}

.drive-sidebar .drive-menu-item {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.drive-sidebar .drive-menu-item:hover {
    background-color: rgba(9, 132, 227, 0.06) !important;
    color: #0984E3 !important;
}

.drive-sidebar .drive-menu-item.active {
    background-color: rgba(9, 132, 227, 0.12) !important;
    color: #0984E3 !important;
    font-weight: 700 !important;
}

.drive-sidebar .drive-menu-item.active i {
    color: #0984E3 !important;
}

/* Estilo da Árvore de Diretórios (Sidebar) */
.drive-sidebar .collapse {
    transition: height var(--transition-speed) ease;
}

.drive-tree-line {
    border-left: 2px solid #e2e8f0;
    padding-left: 0.75rem;
    margin-left: 0.5rem;
}

.tree-toggle:hover i {
    color: #0984E3 !important;
}

/* --- 19.2 Cards, Seleção em Massa (Marquee) e Interações --- */
.drive-folder-card {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.drive-folder-card:hover {
    background-color: rgba(9, 132, 227, 0.04);
    border-color: #0984E3 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.1) !important;
}

.drive-folder-card:hover i {
    color: #0984E3 !important;
}

.drive-file-card {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.drive-file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08) !important;
    border-color: #0984E3 !important;
}

#drive-selection-marquee {
    position: fixed;
    background: rgba(9, 132, 227, 0.15);
    border: 1px solid #0984E3;
    z-index: 9999;
    pointer-events: none;
}

/* Estado de card selecionado */
.drive-file-card.drive-selected {
    border-color: #0984E3 !important;
    background-color: rgba(9, 132, 227, 0.08) !important;
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.3) !important;
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.move-folder-item:hover {
    background-color: var(--bg-main);
    cursor: pointer;
}

/* Variabilizado */
.move-folder-item:active {
    background-color: var(--border);
}

/* Variabilizado */

/* --- 19.3 Alternância de Visualização (Grade / Lista) --- */

/* Por padrão (Grade), escondemos Data/Tamanho para o card ficar limpo */
.drive-card-meta {
    display: none;
}

.drive-view-list #drive-files-grid {
    display: flex;
    flex-direction: column;
}

.drive-view-list #drive-files-grid .drive-item-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0.5rem !important;
}

.drive-view-list #drive-files-grid .drive-file-card {
    flex-direction: row !important;
    align-items: center;
    height: auto !important;
    min-height: 60px;
    padding: 0.5rem 1rem;
}

/* Conserta o "Fundo Vazando" e volta a mostrar a Imagem */
.drive-view-list .drive-card-media {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    border-bottom: none !important;
    border-radius: 6px;
    margin-right: 1rem;
    overflow: hidden;
}

.drive-view-list .drive-card-media img {
    border-radius: 6px;
    /* Arredonda o thumb na lista */
}

.drive-view-list .drive-card-media i.fa-3x {
    font-size: 1.5rem !important;
    /* Encolhe o ícone de PDF/Word */
}

/* Ajusta o alinhamento dos textos */
.drive-view-list .drive-card-body {
    padding: 0 !important;
    flex-direction: row !important;
    flex-grow: 1;
    align-items: center;
    text-align: left !important;
}

.drive-view-list .drive-card-title {
    flex-grow: 1;
    font-size: 0.95rem;
}

/* Mostra Data e Tamanho (Alinhados à direita) */
.drive-view-list .drive-card-meta {
    display: flex !important;
    width: 220px;
    /* Largura fixa para criar colunas perfeitas */
    justify-content: space-between;
    margin-top: 0 !important;
}

/* Força o modal da calculadora a ficar na frente de qualquer menu */
#modalCalculadoraLeads {
    z-index: 105000 !important;
}

/* Garante que o fundo escuro (backdrop) também cubra o menu lateral */
.modal-backdrop.show {
    z-index: 1095 !important;
}

/* ==========================================================================
   PADRONIZAÇÃO VISUAL: ÁREA DE SUPORTE INTERNO (COR TEMA #f1c40f)
   Headers de Modais e Tabelas da mesma cor da área do menu lateral
   ========================================================================== */
.suporte-modal-header,
.modal-header-suporte {
    background-color: #f1c40f !important;
    color: #1e293b !important;
    border-bottom: 2px solid #dfb508 !important;
    border-top-left-radius: calc(var(--bs-modal-border-radius, 1rem) - 1px) !important;
    border-top-right-radius: calc(var(--bs-modal-border-radius, 1rem) - 1px) !important;
}

.suporte-modal-header h4,
.suporte-modal-header h5,
.suporte-modal-header h6,
.suporte-modal-header .modal-title,
.suporte-modal-header i,
.modal-header-suporte h4,
.modal-header-suporte h5,
.modal-header-suporte h6,
.modal-header-suporte .modal-title,
.modal-header-suporte i {
    color: #1e293b !important;
}

.suporte-modal-header .btn-close,
.modal-header-suporte .btn-close {
    filter: brightness(0.2);
    opacity: 0.8;
}
.suporte-modal-header .btn-close:hover,
.modal-header-suporte .btn-close:hover {
    opacity: 1;
}

/* Tabelas da Área de Suporte */
.suporte-table thead th,
.table-suporte thead th,
.table-area-suporte thead th,
.suporte-table-header,
.suporte-table-header th {
    background-color: #f1c40f !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #dfb508 !important;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   STATUS INDICATOR LIGHTS & DROPDOWN (Painel de Luzes Operacionais)
   ========================================================================== */
.status-light-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.status-light-indicator.bg-success, .status-glow-green {
    background-color: #22c55e !important;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8) !important;
}
.status-light-indicator.bg-warning, .status-glow-yellow {
    background-color: #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.85) !important;
}
.status-light-indicator.bg-danger, .status-glow-red {
    background-color: #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.95) !important;
}

.status-dropdown-menu {
    min-width: 220px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}
.status-dropdown-item {
    transition: background-color 0.15s ease;
    border-radius: 8px;
    margin: 2px 4px;
}
/* ==========================================================================
   ÁREA DE CONDOMÍNIO (Identidade Visual #1abc9c)
   ========================================================================== */
.condo-modal-header,
.modal-header-condo {
    background-color: var(--color-condo, #1abc9c) !important;
    color: #ffffff !important;
    border-bottom: 2px solid #16a085 !important;
}

.condo-modal-header .modal-title,
.modal-header-condo .modal-title,
.condo-modal-header h1, .modal-header-condo h1,
.condo-modal-header h2, .modal-header-condo h2,
.condo-modal-header h3, .modal-header-condo h3,
.condo-modal-header h4, .modal-header-condo h4,
.condo-modal-header h5, .modal-header-condo h5,
.condo-modal-header h6, .modal-header-condo h6,
.condo-modal-header span, .modal-header-condo span,
.condo-modal-header i, .modal-header-condo i,
.condo-modal-header p, .modal-header-condo p,
.condo-modal-header small, .modal-header-condo small,
.condo-modal-header b, .modal-header-condo b,
.condo-modal-header strong, .modal-header-condo strong {
    color: #ffffff !important;
}

.condo-modal-header .btn-close,
.modal-header-condo .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.85 !important;
}
.condo-modal-header .btn-close:hover,
.modal-header-condo .btn-close:hover {
    opacity: 1 !important;
}

.card-header-condo {
    background-color: var(--color-condo, #1abc9c) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
.card-header-condo h1,
.card-header-condo h2,
.card-header-condo h3,
.card-header-condo h4,
.card-header-condo h5,
.card-header-condo h6,
.card-header-condo span,
.card-header-condo i,
.card-header-condo p,
.card-header-condo small,
.card-header-condo b,
.card-header-condo strong {
    color: #ffffff !important;
}
.card-header-condo::after,
.card-header-condo::before,
.condo-modal-header::after,
.condo-modal-header::before,
.modal-header-condo::after,
.modal-header-condo::before {
    display: none !important;
    content: none !important;
}

.btn-condo:not(.tab-btn) {
    background-color: var(--color-condo, #1abc9c) !important;
    border-color: var(--color-condo, #1abc9c) !important;
    color: #ffffff !important;
}
.btn-condo:not(.tab-btn):hover,
.btn-condo:not(.tab-btn):focus,
.btn-condo:not(.tab-btn):active {
    background-color: #16a085 !important;
    border-color: #16a085 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   ÁREA DE IMÓVEIS (Identidade Visual #00b894)
   ========================================================================== */
.modal-header-imovel,
.imovel-modal-header {
    background-color: var(--color-imoveis, #00b894) !important;
    color: #ffffff !important;
    border-bottom: 2px solid #00a383 !important;
}

.modal-header-imovel .modal-title,
.imovel-modal-header .modal-title,
.modal-header-imovel h1, .imovel-modal-header h1,
.modal-header-imovel h2, .imovel-modal-header h2,
.modal-header-imovel h3, .imovel-modal-header h3,
.modal-header-imovel h4, .imovel-modal-header h4,
.modal-header-imovel h5, .imovel-modal-header h5,
.modal-header-imovel h6, .imovel-modal-header h6,
.modal-header-imovel span, .imovel-modal-header span,
.modal-header-imovel i, .imovel-modal-header i,
.modal-header-imovel p, .imovel-modal-header p,
.modal-header-imovel small, .imovel-modal-header small,
.modal-header-imovel b, .imovel-modal-header b,
.modal-header-imovel strong, .imovel-modal-header strong {
    color: #ffffff !important;
}

.modal-header-imovel .btn-close,
.imovel-modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.85 !important;
}
.modal-header-imovel .btn-close:hover,
.imovel-modal-header .btn-close:hover {
    opacity: 1 !important;
}
.modal-header-imovel::after,
.modal-header-imovel::before,
.imovel-modal-header::after,
.imovel-modal-header::before {
    display: none !important;
    content: none !important;
}

.card-header-imovel {
    background-color: var(--color-imoveis, #00b894) !important;
    color: #ffffff !important;
    border-bottom: 2px solid #00a383 !important;
}
.card-header-imovel h1,
.card-header-imovel h2,
.card-header-imovel h3,
.card-header-imovel h4,
.card-header-imovel h5,
.card-header-imovel h6,
.card-header-imovel span,
.card-header-imovel i,
.card-header-imovel p,
.card-header-imovel small,
.card-header-imovel b,
.card-header-imovel strong {
    color: #ffffff !important;
}
.card-header-imovel::after,
.card-header-imovel::before {
    display: none !important;
    content: none !important;
}

.btn-imovel:not(.tab-btn) {
    background-color: var(--color-imoveis, #00b894) !important;
    border-color: var(--color-imoveis, #00b894) !important;
    color: #ffffff !important;
}
.btn-imovel:not(.tab-btn):hover,
.btn-imovel:not(.tab-btn):focus,
.btn-imovel:not(.tab-btn):active {
    background-color: #00a383 !important;
    border-color: #00a383 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   FILTROS AVANÇADOS / INTELIGÊNCIA (ÁREA DE IMÓVEIS)
   ========================================================================== */
#offcanvasFiltros .form-control,
#offcanvasFiltros .form-select {
    border: 1px solid #ced4da !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    color: #212529 !important;
    box-shadow: none !important;
}
#offcanvasFiltros .form-control:focus,
#offcanvasFiltros .form-select:focus {
    border-color: var(--color-imoveis, #00b894) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 184, 148, 0.2) !important;
}
#offcanvasFiltros .input-group {
    border: 1px solid #ced4da !important;
    border-radius: 8px !important;
    overflow: hidden;
    background-color: #ffffff !important;
}
#offcanvasFiltros .input-group .form-control,
#offcanvasFiltros .input-group .input-group-text {
    border: none !important;
    border-radius: 0 !important;
}
#offcanvasFiltros .input-group-text {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
}

/* Header de Tabela em Gestão de Portais */
#table-portais-imoveis thead th,
#table-portais-imoveis thead #header-portais-main th {
    background-color: var(--color-imoveis, #00b894) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
#table-portais-imoveis thead #header-portais-main th i,
#table-portais-imoveis thead #header-portais-main th span {
    color: #ffffff !important;
}
#table-portais-imoveis thead #header-portais-actions th {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border-bottom: 2px solid #dee2e6 !important;
}

/* ==========================================================================
   ÁREA DE GOVERNANÇA RH (Identidade Visual #6c5ce7 / var(--color-rh))
   ========================================================================== */
.modal-header-rh,
.rh-modal-header {
    background-color: var(--color-rh, #6c5ce7) !important;
    color: #ffffff !important;
    border-bottom: 2px solid #5849c4 !important;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.modal-header-rh .modal-title,
.rh-modal-header .modal-title,
.modal-header-rh h1, .rh-modal-header h1,
.modal-header-rh h2, .rh-modal-header h2,
.modal-header-rh h3, .rh-modal-header h3,
.modal-header-rh h4, .rh-modal-header h4,
.modal-header-rh h5, .rh-modal-header h5,
.modal-header-rh h6, .rh-modal-header h6,
.modal-header-rh span, .rh-modal-header span,
.modal-header-rh i, .rh-modal-header i,
.modal-header-rh p, .rh-modal-header p,
.modal-header-rh small, .rh-modal-header small,
.modal-header-rh b, .rh-modal-header b,
.modal-header-rh strong, .rh-modal-header strong {
    color: #ffffff !important;
}

.modal-header-rh .btn-close,
.rh-modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.85 !important;
}
.modal-header-rh .btn-close:hover,
.rh-modal-header .btn-close:hover {
    opacity: 1 !important;
}
.modal-header-rh::after,
.modal-header-rh::before,
.rh-modal-header::after,
.rh-modal-header::before {
    display: none !important;
    content: none !important;
}

/* SweetAlert2 Governança RH Header */
.swal-modal-rh.swal2-popup {
    padding: 0 0 1.5rem 0 !important;
    overflow: hidden !important;
}
.swal-modal-rh .swal2-title {
    background-color: var(--color-rh, #6c5ce7) !important;
    color: #ffffff !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 1.25rem 1.5rem !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #5849c4 !important;
}
.swal-modal-rh .swal2-html-container {
    padding: 0 1.5rem !important;
    margin: 0 !important;
}
.swal-modal-rh .swal2-close {
    color: #ffffff !important;
}

.card-header-rh {
    background-color: var(--color-rh, #6c5ce7) !important;
    color: #ffffff !important;
    border-bottom: 2px solid #5849c4 !important;
}
.card-header-rh h1,
.card-header-rh h2,
.card-header-rh h3,
.card-header-rh h4,
.card-header-rh h5,
.card-header-rh h6,
.card-header-rh span,
.card-header-rh i,
.card-header-rh p,
.card-header-rh small,
.card-header-rh b,
.card-header-rh strong {
    color: #ffffff !important;
}
.card-header-rh::after,
.card-header-rh::before {
    display: none !important;
    content: none !important;
}

.btn-rh:not(.tab-btn) {
    background-color: var(--color-rh, #6c5ce7) !important;
    border-color: var(--color-rh, #6c5ce7) !important;
    color: #ffffff !important;
}
.btn-rh:not(.tab-btn):hover,
.btn-rh:not(.tab-btn):focus,
.btn-rh:not(.tab-btn):active {
    background-color: #5849c4 !important;
    border-color: #5849c4 !important;
    color: #ffffff !important;
}

/* Tabelas da Área de Condomínio */
.condo-table thead th,
.table-condo thead th,
.table-area-condo thead th {
    background-color: var(--color-condo, #1abc9c) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #16a085 !important;
    letter-spacing: 0.3px;
}

/* Nav-pills e Abas nos Módulos de Condomínio (Substitui azulão por tom de verde/teal) */
.condo-module-container .nav-pills .nav-link.active,
.nav-pills.condo-pills .nav-link.active,
#veiculosTabs .nav-link.active,
#tabFuncionario .nav-link.active,
#fichaFuncionarioTabs .nav-link.active,
#fichaApartamentoTabs .nav-link.active {
    background: linear-gradient(135deg, #1abc9c, #16a085) !important;
    color: #ffffff !important;
    border-color: #16a085 !important;
}

.condo-module-container .nav-pills .nav-link:not(.active),
.nav-pills.condo-pills .nav-link:not(.active),
#veiculosTabs .nav-link:not(.active) {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.condo-module-container .nav-pills .nav-link:hover:not(.active),
#veiculosTabs .nav-link:hover:not(.active) {
    background-color: #e8f8f5;
    color: #16a085;
    border-color: #a3e4d7;
}

.condo-module-container .btn-primary {
    background-color: #1abc9c !important;
    border-color: #16a085 !important;
    color: #ffffff !important;
}

.condo-module-container .btn-primary:hover {
    background-color: #16a085 !important;
    border-color: #149174 !important;
    color: #ffffff !important;
}

.condo-module-container .btn-outline-primary {
    color: #16a085 !important;
    border-color: #1abc9c !important;
}

.condo-module-container .btn-outline-primary:hover {
    background-color: #1abc9c !important;
    border-color: #16a085 !important;
    color: #ffffff !important;
}

/* SLIDER HORIZONTAL DE ABAS DA FICHA CONDOMINIAL */
.condo-tabs-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.condo-tabs-slider-container {
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #a3e4d7 transparent;
}

.condo-tabs-slider-container::-webkit-scrollbar {
    height: 4px;
}

#condoTabsScrollContainer::-webkit-scrollbar,
.condo-tabs-scroll-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.condo-tabs-slider-container::-webkit-scrollbar-thumb {
    background: #a3e4d7;
    border-radius: 4px;
}

.condo-tabs-slider-container ul.nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    margin-bottom: 0 !important;
    padding-bottom: 2px;
}

.condo-tabs-slider-container .nav-item {
    flex: 0 0 auto !important;
}

.condo-slider-nav-btn {
    border: none;
    background: #f1f8f6;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #16a085;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.condo-slider-nav-btn:hover {
    background: #1abc9c;
    color: #ffffff;
    transform: scale(1.05);
}

/* ==========================================
   👑 GESTÃO PREMIUM STYLES
   ========================================== */
#column_toggle_menu {
    max-height: 420px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    z-index: 1065 !important;
}
#column_toggle_menu::-webkit-scrollbar {
    width: 6px;
}
#column_toggle_menu::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Destaque de Linhas da Tabela Gestão (Multi-Tenant) */
tr.tr-gp-vendido-interno > td,
tr.tr-gp-vendido-realup > td {
    background-color: #d4edda !important; /* Verde Vendido Interno */
    color: #155724 !important;
}
tr.tr-gp-vendido-interno:hover > td,
tr.tr-gp-vendido-realup:hover > td {
    background-color: #c3e6cb !important;
}

tr.tr-gp-suspenso > td {
    background-color: #e2e3e5 !important; /* Cinza Suspenso/Terceiros */
    color: #383d41 !important;
}
tr.tr-gp-suspenso:hover > td {
    background-color: #d6d8db !important;
}

tr.tr-gp-redes > td {
    background-color: #f3e8fd !important; /* Roxo Redes */
    color: #4a154b !important;
}
tr.tr-gp-redes:hover > td {
    background-color: #e8d0fa !important;
}

/* Botão Gestão Premium no Topo */
.btn-gestao-premium-toggle {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: #fff !important;
    border: none;
    box-shadow: 0 3px 8px rgba(22, 160, 133, 0.25);
    transition: all 0.25s ease;
}
.btn-gestao-premium-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(22, 160, 133, 0.35);
}
.btn-gestao-premium-toggle.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

/* Card KPI Gestão Premium */
.gp-kpi-card {
    border-radius: 14px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}
/* Botão Tema Governança RH (Apenas para botões padrão de ações, não para a aba da sidebar) */
.btn.btn-rh {
    background: linear-gradient(135deg, #6c5ce7 0%, #5846e0 100%) !important;
    border-color: #5846e0 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3) !important;
    transition: all 0.25s ease !important;
}
.btn.btn-rh:hover, .btn.btn-rh:focus {
    background: linear-gradient(135deg, #5b4bd6 0%, #4834d4 100%) !important;
    border-color: #4834d4 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.45) !important;
    transform: translateY(-1px);
}
.btn.btn-rh:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3) !important;
}


.swal2-container {
    z-index: 30000 !important;
}

/* Correção de sobreposição de dropdowns em tabelas */
.table-responsive {
    overflow: visible !important;
}
.table tbody tr:has(.dropdown.show),
.table tbody tr.has-dropdown-open,
.table-rh tbody tr:has(.dropdown.show),
.table-rh tbody tr.has-dropdown-open {
    position: relative;
    z-index: 1050 !important;
}
.table .dropdown.show,
.table-rh .dropdown.show {
    position: relative;
    z-index: 1055 !important;
}
.table .dropdown-menu.show,
.table-rh .dropdown-menu.show {
    z-index: 1060 !important;
}

/* ==========================================================================
   CONDOMÍNIO INTELLIGENCE: MANUTENÇÃO, VISTORIAS, CERTIDÕES & FINANCEIRO
   ========================================================================== */
.condo-module-container .table thead,
.condo-module-container .table thead tr,
.condo-module-container .table thead tr th,
.condo-module-container thead th,
.condo-module-container thead tr th * {
    background: linear-gradient(135deg, #1abc9c, #16a085) !important;
    background-color: #1abc9c !important;
    color: #ffffff !important;
    border-color: #16a085 !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
}

.modal-header.condo-header,
.modal-header.condo-modal-header,
.condo-modal-header {
    background: linear-gradient(135deg, #1abc9c, #16a085) !important;
    color: #ffffff !important;
    border-bottom: none !important;
}

.modal-header.condo-header .modal-title,
.modal-header.condo-header h5,
.modal-header.condo-header p,
.modal-header.condo-modal-header .modal-title,
.modal-header.condo-modal-header h5,
.modal-header.condo-modal-header p,
.condo-modal-header .modal-title,
.condo-modal-header h5,
.condo-modal-header p {
    color: #ffffff !important;
}

.modal-header.condo-header .modal-title i,
.modal-header.condo-modal-header .modal-title i,
.condo-modal-header .modal-title i,
.modal-header.condo-header h5 i,
.modal-header.condo-modal-header h5 i,
.condo-modal-header h5 i {
    color: #ffffff !important;
}

.modal-header.condo-header .btn-close,
.modal-header.condo-modal-header .btn-close,
.condo-modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.85;
}

.modal-header.condo-header .btn-close:hover,
.modal-header.condo-modal-header .btn-close:hover,
.condo-modal-header .btn-close:hover {
    opacity: 1;
}

.icon-circle,
.modal-header .icon-circle,
.condo-modal-header .icon-circle {
    width: 42px !important;
    height: 42px !important;
    background-color: #ffffff !important;
    color: #16a085 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.icon-circle i,
.modal-header .icon-circle i,
.condo-modal-header .icon-circle i {
    color: #16a085 !important;
    font-size: 18px !important;
}

.canvas-assinatura-box {
    border: 2px dashed #16a085;
    border-radius: 10px;
    background-color: #ffffff;
    cursor: crosshair;
    touch-action: none;
}

.text-teal {
    color: #16a085 !important;
}

.bg-teal {
    background-color: #16a085 !important;
}

.bg-teal-subtle {
    background-color: #e8f8f5 !important;
}

.btn-teal {
    background-color: #1abc9c !important;
    border-color: #16a085 !important;
    color: #ffffff !important;
}

.btn-teal:hover {
    background-color: #16a085 !important;
    border-color: #149174 !important;
    color: #ffffff !important;
}

.btn-outline-teal {
    border-color: #1abc9c !important;
    color: #16a085 !important;
}

.btn-outline-teal:hover {
    background-color: #16a085 !important;
    color: #ffffff !important;
}

.active-chat {
    background-color: #e8f8f5 !important;
    border-left: 4px solid #16a085 !important;
}

.border-teal-subtle {
    border-color: #a3e4d7 !important;
}

.table-danger-subtle {
    background-color: #fdedec !important;
}

.table-warning-subtle {
    background-color: #fef9e7 !important;
}

.hover-shadow {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.hover-shadow:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

.transition {
    transition: all 0.2s ease-in-out !important;
}

/* Estilos de ordenação e destaques do Ecossistema de Empresas */
.th-sortable {
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}
.th-sortable:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
}
.th-sortable .sort-icon {
    font-size: 11px;
    vertical-align: middle;
}

tr.table-warning td {
    background-color: rgba(255, 193, 7, 0.09) !important;
}
tr.table-danger td {
    background-color: rgba(220, 53, 69, 0.08) !important;
}

/* FIM DO ARQUIVO style.css */