/* ================================================================================
   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)

================================================================================
*/

/* ============================================================
   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;
}

/* --- BLOCOS DE TEMAS (Sincronizados com seu PHP set_theme) --- */

body.theme-dark {
    --bg-main: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-sidebar-tabs: #000000;
    --bg-submenu: #0f172a;
    --bg-vistas-wrapper: rgba(255, 255, 255, 0.05);
    --text-primary: #f1f5f9;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-link: #f1f5f9;
    --text-link-sub: #cbd5e1;
    --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: #f8f9fa;
    --text-tooltip: #1e293b;
    --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;
    /* Tons de score mais saturados para fundo escuro */
    --score-low: #ff5f52;
    --score-high: #81c784;

    --bg-accepted-row: rgba(0, 184, 148, 0.15); /* Verde escuro translúcido */
    --border-accepted-row: var(--color-imoveis);
    --bg-file-header: #0f172a;
    --border-list: #334155;
}

body.theme-minimalist {
    --bg-main: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-tabs: #ffffff;
    --text-primary: #000000;
    --text-muted: #717171;
    --accent: #000000;
    --border: #e0e0e0;
    --border-strong: #b3b3b3;
    --soft-shadow: none;

    /* --- ESTADOS DE LEADS (Minimal) --- */
    --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;

    /* No minimalista, forçamos bordas nas badges para compensar a falta de cor de fundo */
    --border-lead: 1px solid #000000;

    /* --- TEMPERATURA E TIMERS --- */
    --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;
}

body.theme-high-contrast {
    --bg-main: #000000;
    --bg-sidebar: #000000;
    --bg-sidebar-tabs: #000000;
    --text-primary: #00ff00;
    --text-muted: #00ff00;
    --accent: #00ff00;
    --border: #00ff00;
    --border-strong: #00ff00;
    --soft-shadow: none;
    --text-soft: #00ff00;
    --bg-lead-insta: #000;
    --text-lead-insta: #00ff00;
    --bg-lead-site: #000;
    --text-lead-site: #00ff00;
    --bg-lead-portal: #000;
    --text-lead-portal: #00ff00;
    --bg-lead-indica: #000;
    --text-lead-indica: #00ff00;
    --bg-lead-outros: #000;
    --text-lead-outros: #00ff00;
    --color-temp-hot: #00ff00;
    --color-temp-warm: #00ff00;
    --color-temp-cold: #00ff00;

    --bg-gauge-track: #000;
    --score-low: #00ff00;
    --score-med: #00ff00;
    --score-good: #00ff00;
    --score-high: #00ff00;
    --bg-accepted-row: #000;
    --border-accepted-row: #00ff00;
}

body.theme-win31 {
    --bg-main: #008080; /* Teal clássico */
    --bg-sidebar: #c0c0c0;
    --bg-sidebar-tabs: #c0c0c0;
    --text-primary: #000000;
    --accent: #000080; /* Navy Blue */
    --border: #000000;
    --border-strong: #808080;

    /* --- ESTADOS DE LEADS (Retro 16-bit) --- */
    --bg-lead-insta: #ff00ff;   --text-lead-insta: #ffffff; /* Fuchsia */
    --bg-lead-site: #0000ff;    --text-lead-site: #ffffff;  /* Blue */
    --bg-lead-portal: #ff0000;  --text-lead-portal: #ffffff;  /* Red */
    --bg-lead-indica: #00ffff;  --text-lead-indica: #000000;  /* Cyan */
    --bg-lead-outros: #ffffff;  --text-lead-outros: #000000;

    /* --- TEMPERATURA E TIMERS --- */
    --color-temp-hot: #ff0000;
    --color-temp-warm: #ffff00;
    --color-temp-cold: #000080;

    --bg-timer-warn: #ffff00;   --text-timer-warn: #000000; /* Yellow */
    --bg-timer-danger: #ff0000; --text-timer-danger: #ffffff; /* Red */

    --bg-gauge-track: #808080;
    --bg-accepted-row: #ffffff;
    --border-accepted-row: #000000;
}

/* --- ESTILOS GERAIS --- */

body {
    background-color: var(--bg-main); /* FIX: Removido cor fixa que matava o tema */
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* No Dark Theme, o fundo da borda deve ser escuro */
body.theme-dark .avatar-container {
    background: var(--bg-sidebar);
}

body.theme-dark .dropdown-menu {
    background-color: var(--bg-surface) !important;
    background: #1e293b !important; /* Cor sólida do seu tema dark */
    border-color: var(--border) !important;
}

/* ########## 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); }
.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: var(--text-soft) !important;
}

.table-rh thead th {
    background-color: var(--color-rh) !important;
    color: var(--text-soft) !important;
}

.table-adm thead th {
    background-color: var(--color-adm) !important;
    color: var(--text-soft) !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);
}

.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: #fff9c4; border: none; border-bottom-right-radius: 40px 5px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1); padding: 15px; position: relative;
    color: #333; /* Mantido escuro para simular papel real */
}

.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: 0 !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 */
}

/* 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; }

/* ########## BOTÃO CALCULADORA CUSTOM ########## */
.btn-calc-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #6f42c1; /* Cor de marca mantida ou pode usar var(--color-rh) se for o caso */
    color: var(--white);
    padding: 8px 18px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.btn-calc-custom:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.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;
}

.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: 10px; right: 10px; border: none; background: none;
    color: var(--text-sidebar-icon); /* Variabilizado: remove #adb5bd */
    transition: 0.2s;
}

.btn-config-portal:hover { color: var(--accent); transform: rotate(45deg); }

/* ########## 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);
    position: relative;
    z-index: 1040;
    background: var(--bg-sidebar-body) !important; /* Garante que o fundo acompanhe o tema */
}

/* Estado Escondido */
.drawer-hidden #topDrawer {
    margin-top: -80px;
}

.drawer-hidden #iconDrawer {
    transform: rotate(180deg);
}

#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;
}

#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; top: 0; bottom: 0; left: 40px;
    width: 2px; background: var(--border); /* Variabilizado: remove #e9ecef */
}
.timeline-item { position: relative; margin-bottom: 30px; padding-left: 70px; }
.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-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);
}

/* 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: var(--shadow-lg) !important;
    border: 1px solid var(--border-strong) !important;
    background-color: var(--bg-surface) !important;
    background: #ffffff !important; /* Fallback de segurança para Desktop */
    opacity: 1 !important; /* Força 100% de opacidade */
    backdrop-filter: none !important; /* Remove transparências de 'vidro' */
    position: absolute !important;
    margin-top: 5px !important;
    color: var(--text-main);
    visibility: visible !important;
    display: none
}

.dropdown-menu.show {
    display: block !important;
    background-color: #ffffff !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);
}

/* Efeito de fade na direita para rolagem de abas */
.card-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    /* Gradiente que se adapta ao fundo do card header */
    background: linear-gradient(to right, rgba(255,255,255,0), var(--bg-surface));
    pointer-events: none;
}

/* ########## 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: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 16px;
    transition: transform 0.2s;
    cursor: pointer;
    z-index: 10;
    color: var(--text-muted);
}

.btn-help-portal:hover {
    transform: scale(1.1);
    color: var(--accent);
}

/* ########## 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-column { min-width: 320px; width: 320px; flex-shrink: 0; background: #f8f9fa; border-radius: 16px; border: 1px solid #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);
}
/* FIM DO ARQUIVO style.css */